@wealthx/shadcn 1.5.6 → 1.5.8

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 (212) hide show
  1. package/.turbo/turbo-build.log +177 -171
  2. package/CHANGELOG.md +12 -0
  3. package/dist/{chunk-XHGISOX5.mjs → chunk-33VT74R4.mjs} +1 -1
  4. package/dist/{chunk-M4LTX3MH.mjs → chunk-3C4DZTGA.mjs} +1 -1
  5. package/dist/{chunk-ODO6BUOF.mjs → chunk-3CGM3QXQ.mjs} +3 -5
  6. package/dist/{chunk-QBPNYXTI.mjs → chunk-3NJPNSJG.mjs} +1 -1
  7. package/dist/{chunk-6SR4K5T5.mjs → chunk-3S6KVFF5.mjs} +1 -1
  8. package/dist/{chunk-7KT5HPYM.mjs → chunk-3VZ6CYY2.mjs} +1 -1
  9. package/dist/chunk-3Z75IKFO.mjs +34 -0
  10. package/dist/{chunk-DFL5CV75.mjs → chunk-4BHDDLWK.mjs} +2 -2
  11. package/dist/{chunk-KLJLDNCA.mjs → chunk-4LLTZ45R.mjs} +1 -1
  12. package/dist/{chunk-RAKBWNQH.mjs → chunk-54MTIKNC.mjs} +27 -66
  13. package/dist/{chunk-JTG5R5YV.mjs → chunk-54TRNCID.mjs} +287 -61
  14. package/dist/{chunk-KCKYGQVQ.mjs → chunk-5DAQU3B6.mjs} +1 -1
  15. package/dist/{chunk-CKPEFZNH.mjs → chunk-5LZZYODG.mjs} +2 -2
  16. package/dist/{chunk-2A53WPEC.mjs → chunk-5YVJSKFH.mjs} +2 -2
  17. package/dist/{chunk-JUBUN65Q.mjs → chunk-5YWUGE6F.mjs} +1 -1
  18. package/dist/chunk-65PZNG4Y.mjs +129 -0
  19. package/dist/{chunk-K7WSRWOU.mjs → chunk-6LWCFAB4.mjs} +1 -1
  20. package/dist/{chunk-Q5SGEIJV.mjs → chunk-6MDNL5I2.mjs} +3 -3
  21. package/dist/{chunk-AUEUTZIC.mjs → chunk-6U4NQGVM.mjs} +3 -3
  22. package/dist/{chunk-V4CUTCHS.mjs → chunk-77L3UPBW.mjs} +1 -1
  23. package/dist/{chunk-CW32WTZU.mjs → chunk-7UIL5UN3.mjs} +1 -1
  24. package/dist/{chunk-2LLFNGJZ.mjs → chunk-AANINK2B.mjs} +3 -3
  25. package/dist/{chunk-UEREFDAE.mjs → chunk-AZGLSIHF.mjs} +1 -1
  26. package/dist/{chunk-XN37434W.mjs → chunk-B3CTBLIY.mjs} +2 -2
  27. package/dist/{chunk-XTWAJWCQ.mjs → chunk-BAONSY54.mjs} +1 -1
  28. package/dist/{chunk-XIY5DJXI.mjs → chunk-BXL74CM2.mjs} +1 -1
  29. package/dist/{chunk-OYBIUEGE.mjs → chunk-BZGFW6L7.mjs} +1 -1
  30. package/dist/chunk-CEEVYRQA.mjs +61 -0
  31. package/dist/{chunk-BD3DWDT4.mjs → chunk-CEYEK3TI.mjs} +1 -1
  32. package/dist/{chunk-I3UDLWQ7.mjs → chunk-D3HKFRQO.mjs} +1 -1
  33. package/dist/{chunk-3AREQTZU.mjs → chunk-DCKT635J.mjs} +1 -1
  34. package/dist/{chunk-VLELWBEW.mjs → chunk-E2BNCA6L.mjs} +1 -1
  35. package/dist/{chunk-QRVEI6J3.mjs → chunk-E5EDZQ5J.mjs} +1 -3
  36. package/dist/{chunk-QHJDGB54.mjs → chunk-EAKRTKHJ.mjs} +2 -2
  37. package/dist/{chunk-Q35PNFJ7.mjs → chunk-FBNEIYSE.mjs} +1 -1
  38. package/dist/{chunk-KB7MZMED.mjs → chunk-FGMDBJCF.mjs} +1 -1
  39. package/dist/{chunk-S4CTM3UE.mjs → chunk-FRCTOAKZ.mjs} +35 -4
  40. package/dist/{chunk-K7TWMLLW.mjs → chunk-FW4U543X.mjs} +4 -4
  41. package/dist/{chunk-PGR53HMH.mjs → chunk-G2W754UJ.mjs} +1 -1
  42. package/dist/{chunk-46Q4335I.mjs → chunk-GS47ZSSA.mjs} +12 -22
  43. package/dist/{chunk-AHKHVBWR.mjs → chunk-GYWOD2YI.mjs} +1 -1
  44. package/dist/{chunk-HNDTLT5X.mjs → chunk-H5DTKPJ2.mjs} +1 -1
  45. package/dist/{chunk-C6SWS7OW.mjs → chunk-HB5BKRMH.mjs} +1 -1
  46. package/dist/{chunk-WUA546RX.mjs → chunk-IFSQWDRN.mjs} +1 -1
  47. package/dist/{chunk-KAD26MCC.mjs → chunk-IRZWYTGV.mjs} +1 -1
  48. package/dist/{chunk-AL6GOL2Y.mjs → chunk-IW33VLL5.mjs} +1 -1
  49. package/dist/{chunk-A6ER36CW.mjs → chunk-JGBV3XMQ.mjs} +1 -1
  50. package/dist/{chunk-Y6UM3VTN.mjs → chunk-JUMEIPII.mjs} +1 -1
  51. package/dist/{chunk-VFH632TB.mjs → chunk-K4WDPVFY.mjs} +3 -3
  52. package/dist/{chunk-PV3Y7QGK.mjs → chunk-LHWJQNLG.mjs} +3 -3
  53. package/dist/{chunk-NCUH54IZ.mjs → chunk-LI2CTS5O.mjs} +1 -1
  54. package/dist/{chunk-F24U4QQQ.mjs → chunk-LPVXO3TD.mjs} +1 -1
  55. package/dist/{chunk-VJ3GC7W3.mjs → chunk-MNMSHB2J.mjs} +5 -5
  56. package/dist/{chunk-J5NW5NCT.mjs → chunk-NCMV3LTP.mjs} +1 -1
  57. package/dist/{chunk-IXR4BQSQ.mjs → chunk-O5CP6VP6.mjs} +3 -3
  58. package/dist/{chunk-TGVXRD53.mjs → chunk-OZ2R6ERP.mjs} +1 -1
  59. package/dist/{chunk-D447W45Z.mjs → chunk-PCULNQWA.mjs} +42 -50
  60. package/dist/{chunk-CDVG7SFT.mjs → chunk-PGJRZHN7.mjs} +1 -1
  61. package/dist/{chunk-IKDTOCSY.mjs → chunk-RSEVIQEO.mjs} +1 -1
  62. package/dist/{chunk-GNER6MCO.mjs → chunk-SSUK6C2K.mjs} +1 -1
  63. package/dist/{chunk-6TX73WG7.mjs → chunk-TCE5L44O.mjs} +3 -2
  64. package/dist/{chunk-OECGKCVF.mjs → chunk-TLLD5IU6.mjs} +1 -1
  65. package/dist/{chunk-BFB3UH7V.mjs → chunk-TRM3KIHT.mjs} +2 -2
  66. package/dist/{chunk-TLYSVRSK.mjs → chunk-TUC2BNUR.mjs} +3 -3
  67. package/dist/{chunk-HXU5JGLQ.mjs → chunk-UBHBIWIA.mjs} +3 -3
  68. package/dist/{chunk-TXUBGKB7.mjs → chunk-UJMVXREM.mjs} +2 -2
  69. package/dist/{chunk-TAX3KL66.mjs → chunk-USOVLDGS.mjs} +1 -1
  70. package/dist/{chunk-HF4FUBCY.mjs → chunk-UTCW5YUX.mjs} +1 -1
  71. package/dist/{chunk-OL65UQHQ.mjs → chunk-UYRHYJPX.mjs} +27 -61
  72. package/dist/{chunk-BDESHD25.mjs → chunk-VLVEZHFE.mjs} +1 -1
  73. package/dist/{chunk-EUYPMDQG.mjs → chunk-VWZS32ZQ.mjs} +1 -1
  74. package/dist/{chunk-HROG643K.mjs → chunk-W5QJ57PU.mjs} +1 -1
  75. package/dist/{chunk-F4O2YPXJ.mjs → chunk-WHIW6KOB.mjs} +1 -1
  76. package/dist/{chunk-TOIVHWNC.mjs → chunk-WWIWRNBK.mjs} +1 -1
  77. package/dist/{chunk-2QNOPXMQ.mjs → chunk-XMP24PWA.mjs} +1 -1
  78. package/dist/{chunk-HO6S3ECM.mjs → chunk-XUCDPAVI.mjs} +2 -2
  79. package/dist/{chunk-EW72FINW.mjs → chunk-XVZGXPIX.mjs} +1 -1
  80. package/dist/{chunk-WDTXHLYM.mjs → chunk-XYSRRDBH.mjs} +17 -11
  81. package/dist/{chunk-QAX6HCUH.mjs → chunk-ZAXZBOWI.mjs} +1 -1
  82. package/dist/{chunk-E3PQDBYI.mjs → chunk-ZFKAYRFQ.mjs} +1 -1
  83. package/dist/components/ui/about-you-form.mjs +6 -6
  84. package/dist/components/ui/add-column-modal.js +56 -227
  85. package/dist/components/ui/add-column-modal.mjs +4 -5
  86. package/dist/components/ui/add-lead-modal.mjs +6 -6
  87. package/dist/components/ui/ai-assistant-drawer.mjs +4 -4
  88. package/dist/components/ui/ai-builder.mjs +4 -4
  89. package/dist/components/ui/ai-conversations.js +278 -58
  90. package/dist/components/ui/ai-conversations.mjs +6 -6
  91. package/dist/components/ui/alert-dialog.mjs +3 -3
  92. package/dist/components/ui/appointment-action-dialogs.mjs +7 -7
  93. package/dist/components/ui/appointment-availability-settings.js +1 -1
  94. package/dist/components/ui/appointment-availability-settings.mjs +9 -9
  95. package/dist/components/ui/appointment-book-dialog.js +11 -21
  96. package/dist/components/ui/appointment-book-dialog.mjs +7 -7
  97. package/dist/components/ui/appointment-calendar-view.mjs +2 -2
  98. package/dist/components/ui/appointment-detail-sheet.mjs +9 -9
  99. package/dist/components/ui/appointment-upcoming-card.mjs +6 -6
  100. package/dist/components/ui/assets-liabilities-side-card.mjs +3 -3
  101. package/dist/components/ui/backoffice-alert-history-chart.mjs +3 -3
  102. package/dist/components/ui/backoffice-alert-matching-chart.mjs +3 -3
  103. package/dist/components/ui/backoffice-alerts-chart.mjs +3 -3
  104. package/dist/components/ui/backoffice-connections-chart.mjs +3 -3
  105. package/dist/components/ui/backoffice-contact-history-chart.mjs +3 -3
  106. package/dist/components/ui/backoffice-contact-matching-chart.mjs +3 -3
  107. package/dist/components/ui/backoffice-signup-steps.mjs +9 -9
  108. package/dist/components/ui/bank-statement-generate-dialog.mjs +9 -9
  109. package/dist/components/ui/bank-statement-pdf-viewer.mjs +4 -4
  110. package/dist/components/ui/borrowing-capacity-card.mjs +3 -3
  111. package/dist/components/ui/borrowing-capacity-line-chart.mjs +3 -3
  112. package/dist/components/ui/calculator-section.mjs +4 -4
  113. package/dist/components/ui/calendar.mjs +2 -2
  114. package/dist/components/ui/cash-balance-line-chart.mjs +3 -3
  115. package/dist/components/ui/cashflow-bar-chart.mjs +3 -3
  116. package/dist/components/ui/category-edit-dialog.mjs +4 -4
  117. package/dist/components/ui/color-picker.mjs +4 -4
  118. package/dist/components/ui/contact-alert-dialog/index.mjs +5 -5
  119. package/dist/components/ui/create-contact-modal.mjs +5 -5
  120. package/dist/components/ui/csv-import-modal.mjs +4 -4
  121. package/dist/components/ui/dashboard-transactions-table.mjs +5 -5
  122. package/dist/components/ui/data-table.mjs +6 -6
  123. package/dist/components/ui/date-picker.mjs +6 -6
  124. package/dist/components/ui/delete-contact-component.mjs +4 -4
  125. package/dist/components/ui/dialog.mjs +3 -3
  126. package/dist/components/ui/document-checklist-template.mjs +4 -4
  127. package/dist/components/ui/drawer.mjs +3 -3
  128. package/dist/components/ui/dropdown-menu.mjs +3 -3
  129. package/dist/components/ui/dynamic-tabs.mjs +3 -3
  130. package/dist/components/ui/editable-money-item.mjs +4 -4
  131. package/dist/components/ui/expense-bar-chart.mjs +3 -3
  132. package/dist/components/ui/expense-work-details.mjs +4 -4
  133. package/dist/components/ui/file-preview-dialog.mjs +6 -6
  134. package/dist/components/ui/financial-cards.mjs +2 -2
  135. package/dist/components/ui/financial-drawers.mjs +4 -4
  136. package/dist/components/ui/financial-sections.mjs +3 -3
  137. package/dist/components/ui/frontend-signup-steps.mjs +7 -7
  138. package/dist/components/ui/income-bar-chart.mjs +3 -3
  139. package/dist/components/ui/income-work-details.mjs +4 -4
  140. package/dist/components/ui/integration-card.js +326 -0
  141. package/dist/components/ui/integration-card.mjs +11 -0
  142. package/dist/components/ui/kanban-column.js +151 -243
  143. package/dist/components/ui/kanban-column.mjs +6 -7
  144. package/dist/components/ui/loan-application-cards.mjs +1 -1
  145. package/dist/components/ui/money-item-with-color-indicator.mjs +4 -4
  146. package/dist/components/ui/onboarding-layout.js +65 -4
  147. package/dist/components/ui/onboarding-layout.mjs +6 -4
  148. package/dist/components/ui/opportunity-card.js +126 -216
  149. package/dist/components/ui/opportunity-card.mjs +5 -6
  150. package/dist/components/ui/opportunity-edit-modals.mjs +9 -9
  151. package/dist/components/ui/opportunity-summary-tab.mjs +11 -11
  152. package/dist/components/ui/pagination.mjs +4 -4
  153. package/dist/components/ui/password-strength-tooltip.mjs +4 -4
  154. package/dist/components/ui/pipeline-board.js +167 -261
  155. package/dist/components/ui/pipeline-board.mjs +7 -8
  156. package/dist/components/ui/pipeline-chart.js +128 -55
  157. package/dist/components/ui/pipeline-chart.mjs +4 -3
  158. package/dist/components/ui/pipeline-dialogs.mjs +9 -9
  159. package/dist/components/ui/popover.mjs +3 -3
  160. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +3 -3
  161. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +3 -3
  162. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +3 -3
  163. package/dist/components/ui/property-report-dialog.mjs +4 -4
  164. package/dist/components/ui/resource-center.mjs +4 -4
  165. package/dist/components/ui/review-alerts-dialog.mjs +4 -4
  166. package/dist/components/ui/savings-goal-modal.mjs +7 -7
  167. package/dist/components/ui/scenario-drawer.mjs +3 -3
  168. package/dist/components/ui/scenario-item.mjs +4 -4
  169. package/dist/components/ui/scenario-list.mjs +4 -4
  170. package/dist/components/ui/select.mjs +3 -3
  171. package/dist/components/ui/selectable-card.js +163 -0
  172. package/dist/components/ui/selectable-card.mjs +9 -0
  173. package/dist/components/ui/share-details-dialog.mjs +4 -4
  174. package/dist/components/ui/sheet.mjs +3 -3
  175. package/dist/components/ui/sidebar-nav.mjs +4 -4
  176. package/dist/components/ui/signup-form-primitives.mjs +6 -6
  177. package/dist/components/ui/signup-shell.js +3 -2
  178. package/dist/components/ui/signup-shell.mjs +2 -2
  179. package/dist/components/ui/stepper.js +3 -2
  180. package/dist/components/ui/stepper.mjs +1 -1
  181. package/dist/components/ui/tooltip.mjs +3 -3
  182. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +3 -3
  183. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +3 -3
  184. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +3 -3
  185. package/dist/index.js +2144 -1875
  186. package/dist/index.mjs +105 -95
  187. package/dist/lib/colors.js +36 -3
  188. package/dist/lib/colors.mjs +5 -1
  189. package/dist/lib/theme-provider.js +60 -13
  190. package/dist/lib/theme-provider.mjs +2 -2
  191. package/dist/styles.css +1 -1
  192. package/package.json +11 -1
  193. package/src/components/index.tsx +13 -1
  194. package/src/components/ui/add-column-modal.tsx +9 -58
  195. package/src/components/ui/ai-conversations.tsx +308 -42
  196. package/src/components/ui/appointment-availability-settings.tsx +1 -1
  197. package/src/components/ui/appointment-book-dialog.tsx +25 -48
  198. package/src/components/ui/integration-card.tsx +88 -0
  199. package/src/components/ui/kanban-column.tsx +0 -7
  200. package/src/components/ui/onboarding-layout.tsx +102 -1
  201. package/src/components/ui/opportunity-card.tsx +5 -53
  202. package/src/components/ui/pipeline-board.tsx +0 -3
  203. package/src/components/ui/pipeline-chart.tsx +47 -53
  204. package/src/components/ui/selectable-card.tsx +37 -0
  205. package/src/components/ui/stepper.tsx +3 -2
  206. package/src/lib/colors.ts +73 -5
  207. package/src/lib/format-date.ts +6 -6
  208. package/src/lib/theme-provider.tsx +13 -8
  209. package/src/styles/globals.css +37 -9
  210. package/src/styles/styles-css.ts +1 -1
  211. package/tsup.config.ts +2 -0
  212. package/dist/chunk-2P7HP7LR.mjs +0 -68
@@ -4,13 +4,13 @@ import {
4
4
  DropdownMenuItem,
5
5
  DropdownMenuSeparator,
6
6
  DropdownMenuTrigger
7
- } from "./chunk-HNDTLT5X.mjs";
7
+ } from "./chunk-H5DTKPJ2.mjs";
8
8
  import {
9
9
  Tooltip,
10
10
  TooltipContent,
11
11
  TooltipProvider,
12
12
  TooltipTrigger
13
- } from "./chunk-6SR4K5T5.mjs";
13
+ } from "./chunk-3S6KVFF5.mjs";
14
14
  import {
15
15
  Tabs,
16
16
  TabsList,
@@ -29,7 +29,7 @@ import {
29
29
  DialogFooter,
30
30
  DialogHeader,
31
31
  DialogTitle
32
- } from "./chunk-NCUH54IZ.mjs";
32
+ } from "./chunk-LI2CTS5O.mjs";
33
33
  import {
34
34
  Avatar,
35
35
  AvatarFallback
@@ -54,28 +54,34 @@ import {
54
54
  } from "./chunk-AFML43VJ.mjs";
55
55
 
56
56
  // src/components/ui/ai-conversations.tsx
57
- import { useState } from "react";
57
+ import React, { useState } from "react";
58
58
  import {
59
59
  Archive,
60
60
  ArrowLeft,
61
+ Bold,
61
62
  Bot,
62
63
  Briefcase,
63
64
  Calendar,
64
65
  CheckCircle2,
65
66
  ChevronLeft,
66
67
  ChevronRight,
68
+ ChevronDown,
67
69
  Flag,
68
70
  HelpCircle,
71
+ Italic,
72
+ Link2,
69
73
  Lock,
70
74
  Mail,
71
75
  MapPin,
72
76
  MessageSquare,
73
77
  MoreHorizontal,
78
+ Paperclip,
74
79
  Phone,
75
80
  PhoneCall,
76
81
  Plus,
77
82
  Search,
78
83
  Send,
84
+ Underline,
79
85
  UserCheck,
80
86
  UserPlus,
81
87
  Video
@@ -154,6 +160,7 @@ function ConversationListItem({
154
160
  /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(data.contact.name) }),
155
161
  /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
156
162
  data.status === "needs-attention" && /* @__PURE__ */ jsx(Flag, { className: "size-3 text-warning-text" }),
163
+ data.channel === "email" ? /* @__PURE__ */ jsx(Mail, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ jsx(MessageSquare, { className: "size-3 text-muted-foreground" }),
157
164
  /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: data.timestamp })
158
165
  ] })
159
166
  ] }),
@@ -187,12 +194,14 @@ function ConversationListItem({
187
194
  }
188
195
  );
189
196
  }
190
- function filterConversations(conversations, query, filter) {
197
+ function filterConversations(conversations, query, filter, channelFilter) {
191
198
  const q = query.toLowerCase();
192
199
  return conversations.filter((c) => {
200
+ var _a;
193
201
  const matchesFilter = filter === "all" || (filter === "open" ? c.status !== "closed" : c.status === filter);
202
+ const matchesChannel = channelFilter === "all" || ((_a = c.channel) != null ? _a : "chat") === channelFilter;
194
203
  const matchesSearch = !q || c.contact.name.toLowerCase().includes(q) || c.lastMessage.toLowerCase().includes(q);
195
- return matchesFilter && matchesSearch;
204
+ return matchesFilter && matchesChannel && matchesSearch;
196
205
  });
197
206
  }
198
207
  var FILTER_TABS = [
@@ -207,15 +216,25 @@ function ConversationList({
207
216
  activeId,
208
217
  searchQuery = "",
209
218
  activeFilter = "all",
219
+ channelFilter: channelFilterProp = "all",
210
220
  hasMore,
211
221
  isLoadingMore,
212
222
  onSearchChange,
213
223
  onFilterChange,
224
+ onChannelFilterChange,
214
225
  onSelect,
215
226
  onRead,
216
227
  onLoadMore,
217
228
  className
218
229
  }) {
230
+ const [channelFilter, setChannelFilter] = useState(channelFilterProp);
231
+ function handleChannelFilterChange(vals) {
232
+ const v = vals[0];
233
+ if (v) {
234
+ setChannelFilter(v);
235
+ onChannelFilterChange == null ? void 0 : onChannelFilterChange(v);
236
+ }
237
+ }
219
238
  return /* @__PURE__ */ jsxs(
220
239
  "div",
221
240
  {
@@ -225,18 +244,37 @@ function ConversationList({
225
244
  ),
226
245
  children: [
227
246
  /* @__PURE__ */ jsxs("div", { className: cn(PANEL_HEADER_HEIGHT, "flex shrink-0 flex-col"), children: [
228
- /* @__PURE__ */ jsx("div", { className: "border-b border-border p-3 shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
229
- /* @__PURE__ */ jsx(Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
230
- /* @__PURE__ */ jsx(
231
- Input,
247
+ /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-3 py-2.5", children: [
248
+ /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
249
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
250
+ /* @__PURE__ */ jsx(
251
+ Input,
252
+ {
253
+ value: searchQuery,
254
+ onChange: (e) => onSearchChange == null ? void 0 : onSearchChange(e.target.value),
255
+ placeholder: "Search conversations...",
256
+ className: "h-8 pl-8 text-sm"
257
+ }
258
+ )
259
+ ] }),
260
+ /* @__PURE__ */ jsxs(
261
+ ToggleGroup,
232
262
  {
233
- value: searchQuery,
234
- onChange: (e) => onSearchChange == null ? void 0 : onSearchChange(e.target.value),
235
- placeholder: "Search conversations...",
236
- className: "h-8 pl-8 text-sm"
263
+ type: "single",
264
+ variant: "outline",
265
+ size: "sm",
266
+ spacing: 0,
267
+ value: [channelFilter],
268
+ onValueChange: handleChannelFilterChange,
269
+ className: "shrink-0",
270
+ children: [
271
+ /* @__PURE__ */ jsx(ToggleGroupItem, { value: "all", "aria-label": "All channels", children: "All" }),
272
+ /* @__PURE__ */ jsx(ToggleGroupItem, { value: "chat", "aria-label": "Chat", children: /* @__PURE__ */ jsx(MessageSquare, { className: "size-3.5" }) }),
273
+ /* @__PURE__ */ jsx(ToggleGroupItem, { value: "email", "aria-label": "Email", children: /* @__PURE__ */ jsx(Mail, { className: "size-3.5" }) })
274
+ ]
237
275
  }
238
276
  )
239
- ] }) }),
277
+ ] }),
240
278
  /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center border-b border-border", children: /* @__PURE__ */ jsx(
241
279
  Tabs,
242
280
  {
@@ -266,7 +304,8 @@ function ConversationList({
266
304
  const filtered = filterConversations(
267
305
  conversations,
268
306
  searchQuery,
269
- activeFilter
307
+ activeFilter,
308
+ channelFilter
270
309
  );
271
310
  return filtered.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-2 p-8 text-muted-foreground", children: [
272
311
  /* @__PURE__ */ jsx(MessageSquare, { className: "size-8 opacity-30" }),
@@ -383,6 +422,9 @@ function ChatBubble({ message, className }) {
383
422
  }
384
423
  function ChatComposer({
385
424
  mode,
425
+ channel: channelProp = "chat",
426
+ onChannelChange,
427
+ contactEmail = "",
386
428
  inputValue = "",
387
429
  onInputChange,
388
430
  onSend,
@@ -390,68 +432,234 @@ function ChatComposer({
390
432
  onLetAiHandle,
391
433
  className
392
434
  }) {
393
- if (mode === "ai") {
394
- return /* @__PURE__ */ jsxs(
395
- "div",
435
+ const [channel, setChannel] = React.useState(channelProp);
436
+ const [emailTo, setEmailTo] = React.useState(contactEmail);
437
+ const [emailCc, setEmailCc] = React.useState("");
438
+ const [showCc, setShowCc] = React.useState(false);
439
+ const [emailSubject, setEmailSubject] = React.useState("");
440
+ const [bold, setBold] = React.useState(false);
441
+ const [italic, setItalic] = React.useState(false);
442
+ const [underline, setUnderline] = React.useState(false);
443
+ const handleChannelChange = (c) => {
444
+ setChannel(c);
445
+ onChannelChange == null ? void 0 : onChannelChange(c);
446
+ };
447
+ function ToolbarButton({
448
+ label,
449
+ icon: Icon,
450
+ pressed,
451
+ onToggle
452
+ }) {
453
+ return /* @__PURE__ */ jsx(
454
+ "button",
396
455
  {
456
+ type: "button",
457
+ "aria-label": label,
458
+ "aria-pressed": pressed,
459
+ onClick: onToggle,
397
460
  className: cn(
398
- "flex items-center gap-2 border-t border-border bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground",
399
- className
461
+ "flex size-7 items-center justify-center transition-colors",
462
+ pressed ? "bg-foreground text-background" : "text-muted-foreground hover:bg-muted hover:text-foreground"
400
463
  ),
401
- children: [
402
- /* @__PURE__ */ jsx(Bot, { className: "size-3.5 shrink-0 text-muted-foreground" }),
403
- /* @__PURE__ */ jsx("span", { children: "AI is handling this conversation." }),
404
- /* @__PURE__ */ jsx(
405
- Button,
406
- {
407
- variant: "link",
408
- size: "sm",
409
- className: "h-auto p-0 text-[12px] font-medium text-foreground",
410
- onClick: onTakeOver,
411
- children: "Take Over"
412
- }
413
- ),
414
- /* @__PURE__ */ jsx("span", { children: "to reply directly." })
415
- ]
464
+ children: /* @__PURE__ */ jsx(Icon, { className: "size-3.5" })
416
465
  }
417
466
  );
418
467
  }
468
+ function EmailFieldRow({
469
+ label,
470
+ children
471
+ }) {
472
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [
473
+ /* @__PURE__ */ jsx("span", { className: "w-14 shrink-0 text-sm text-muted-foreground", children: label }),
474
+ children
475
+ ] });
476
+ }
419
477
  return /* @__PURE__ */ jsxs(
420
478
  "div",
421
479
  {
422
480
  className: cn(
423
- "flex flex-col gap-2 border-t border-border bg-background p-3",
481
+ "flex flex-col border-t border-border bg-background",
424
482
  className
425
483
  ),
426
484
  children: [
427
- /* @__PURE__ */ jsx(
428
- Textarea,
485
+ /* @__PURE__ */ jsx("div", { className: "border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx(
486
+ Tabs,
429
487
  {
430
- value: inputValue,
431
- onChange: (e) => onInputChange == null ? void 0 : onInputChange(e.target.value),
432
- placeholder: "Reply to lead...",
433
- rows: 3,
434
- className: "resize-none text-sm"
488
+ value: channel,
489
+ onValueChange: (v) => v && handleChannelChange(v),
490
+ children: /* @__PURE__ */ jsxs(TabsList, { variant: "default", className: "w-full", children: [
491
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "chat", className: "flex-1 gap-1.5", children: [
492
+ /* @__PURE__ */ jsx(MessageSquare, { className: "size-3.5" }),
493
+ "Chat"
494
+ ] }),
495
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "email", className: "flex-1 gap-1.5", children: [
496
+ /* @__PURE__ */ jsx(Mail, { className: "size-3.5" }),
497
+ "Email"
498
+ ] })
499
+ ] })
435
500
  }
436
- ),
437
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
438
- /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
439
- /* @__PURE__ */ jsx(Bot, { className: "mr-1.5 size-3.5" }),
440
- "Let AI Handle"
441
- ] }),
442
- /* @__PURE__ */ jsxs(
501
+ ) }),
502
+ mode === "ai" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground", children: [
503
+ /* @__PURE__ */ jsx(Bot, { className: "size-3.5 shrink-0 text-muted-foreground" }),
504
+ /* @__PURE__ */ jsx("span", { children: "AI is handling this conversation." }),
505
+ /* @__PURE__ */ jsx(
443
506
  Button,
444
507
  {
508
+ variant: "link",
445
509
  size: "sm",
446
- onClick: () => onSend == null ? void 0 : onSend(inputValue),
447
- disabled: !inputValue.trim(),
448
- children: [
449
- /* @__PURE__ */ jsx(Send, { className: "mr-1.5 size-3.5" }),
450
- "Send"
451
- ]
510
+ className: "h-auto p-0 text-[12px] font-medium text-foreground",
511
+ onClick: onTakeOver,
512
+ children: "Take Over"
452
513
  }
453
- )
454
- ] })
514
+ ),
515
+ /* @__PURE__ */ jsx("span", { children: "to reply directly." })
516
+ ] }) : (
517
+ /* Email panel stays in normal flow to anchor container height;
518
+ chat panel is an absolute overlay so both tabs share identical dimensions */
519
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
520
+ /* @__PURE__ */ jsxs(
521
+ "div",
522
+ {
523
+ className: cn(
524
+ "flex flex-col",
525
+ channel !== "email" && "invisible pointer-events-none"
526
+ ),
527
+ "aria-hidden": channel !== "email",
528
+ children: [
529
+ /* @__PURE__ */ jsxs(EmailFieldRow, { label: "To", children: [
530
+ /* @__PURE__ */ jsx(
531
+ "input",
532
+ {
533
+ type: "email",
534
+ value: emailTo,
535
+ onChange: (e) => setEmailTo(e.target.value),
536
+ placeholder: "Recipient email",
537
+ className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
538
+ }
539
+ ),
540
+ /* @__PURE__ */ jsxs(
541
+ "button",
542
+ {
543
+ type: "button",
544
+ onClick: () => setShowCc((v) => !v),
545
+ className: "flex shrink-0 items-center gap-0.5 text-sm text-muted-foreground hover:text-foreground",
546
+ children: [
547
+ "CC",
548
+ /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5" })
549
+ ]
550
+ }
551
+ )
552
+ ] }),
553
+ showCc && /* @__PURE__ */ jsx(EmailFieldRow, { label: "CC", children: /* @__PURE__ */ jsx(
554
+ "input",
555
+ {
556
+ type: "email",
557
+ value: emailCc,
558
+ onChange: (e) => setEmailCc(e.target.value),
559
+ placeholder: "CC email",
560
+ className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
561
+ }
562
+ ) }),
563
+ /* @__PURE__ */ jsx(EmailFieldRow, { label: "Subject", children: /* @__PURE__ */ jsx(
564
+ "input",
565
+ {
566
+ type: "text",
567
+ value: emailSubject,
568
+ onChange: (e) => setEmailSubject(e.target.value),
569
+ placeholder: "Email subject",
570
+ className: "min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-muted-foreground"
571
+ }
572
+ ) }),
573
+ /* @__PURE__ */ jsx(
574
+ Textarea,
575
+ {
576
+ value: inputValue,
577
+ onChange: (e) => onInputChange == null ? void 0 : onInputChange(e.target.value),
578
+ placeholder: "Write your email...",
579
+ rows: 6,
580
+ className: "resize-y border-0 px-4 py-3 text-base shadow-none focus-visible:ring-0"
581
+ }
582
+ ),
583
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-border px-3 py-2", children: [
584
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
585
+ /* @__PURE__ */ jsx(
586
+ ToolbarButton,
587
+ {
588
+ label: "Bold",
589
+ icon: Bold,
590
+ pressed: bold,
591
+ onToggle: () => setBold((v) => !v)
592
+ }
593
+ ),
594
+ /* @__PURE__ */ jsx(
595
+ ToolbarButton,
596
+ {
597
+ label: "Italic",
598
+ icon: Italic,
599
+ pressed: italic,
600
+ onToggle: () => setItalic((v) => !v)
601
+ }
602
+ ),
603
+ /* @__PURE__ */ jsx(
604
+ ToolbarButton,
605
+ {
606
+ label: "Underline",
607
+ icon: Underline,
608
+ pressed: underline,
609
+ onToggle: () => setUnderline((v) => !v)
610
+ }
611
+ ),
612
+ /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mx-1.5 h-4" }),
613
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Link", icon: Link2 }),
614
+ /* @__PURE__ */ jsx(ToolbarButton, { label: "Attach file", icon: Paperclip })
615
+ ] }),
616
+ /* @__PURE__ */ jsxs(
617
+ Button,
618
+ {
619
+ size: "sm",
620
+ onClick: () => onSend == null ? void 0 : onSend(inputValue),
621
+ disabled: !inputValue.trim() || !emailTo.trim(),
622
+ children: [
623
+ /* @__PURE__ */ jsx(Send, { className: "mr-1.5 size-3.5" }),
624
+ "Send Email"
625
+ ]
626
+ }
627
+ )
628
+ ] })
629
+ ]
630
+ }
631
+ ),
632
+ channel === "chat" && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 flex flex-col gap-3 p-4", children: [
633
+ /* @__PURE__ */ jsx(
634
+ Textarea,
635
+ {
636
+ value: inputValue,
637
+ onChange: (e) => onInputChange == null ? void 0 : onInputChange(e.target.value),
638
+ placeholder: "Reply to lead...",
639
+ className: "min-h-0 flex-1 resize-none text-base"
640
+ }
641
+ ),
642
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
643
+ /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
644
+ /* @__PURE__ */ jsx(Bot, { className: "mr-1.5 size-3.5" }),
645
+ "Let AI Handle"
646
+ ] }),
647
+ /* @__PURE__ */ jsxs(
648
+ Button,
649
+ {
650
+ size: "sm",
651
+ onClick: () => onSend == null ? void 0 : onSend(inputValue),
652
+ disabled: !inputValue.trim(),
653
+ children: [
654
+ /* @__PURE__ */ jsx(Send, { className: "mr-1.5 size-3.5" }),
655
+ "Send"
656
+ ]
657
+ }
658
+ )
659
+ ] })
660
+ ] })
661
+ ] })
662
+ )
455
663
  ]
456
664
  }
457
665
  );
@@ -462,6 +670,8 @@ function ChatThread({
462
670
  mode,
463
671
  messages,
464
672
  isAiTyping = false,
673
+ channel,
674
+ onChannelChange,
465
675
  inputValue,
466
676
  onInputChange,
467
677
  onSend,
@@ -605,6 +815,9 @@ function ChatThread({
605
815
  ChatComposer,
606
816
  {
607
817
  mode,
818
+ channel,
819
+ onChannelChange,
820
+ contactEmail: contact.email,
608
821
  inputValue,
609
822
  onInputChange,
610
823
  onSend,
@@ -722,6 +935,7 @@ function LeadInfoPanel({
722
935
  contact,
723
936
  firstSeen,
724
937
  source = "Website Chatbot",
938
+ topic,
725
939
  aiFields = [],
726
940
  appointment,
727
941
  internalNotes = "",
@@ -799,7 +1013,8 @@ function LeadInfoPanel({
799
1013
  /* @__PURE__ */ jsx(ContactAvatar, { name: contact.name, size: "lg" }),
800
1014
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
801
1015
  /* @__PURE__ */ jsx("p", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
802
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: source })
1016
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: source }),
1017
+ topic && /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "mt-1 text-xs", children: topic })
803
1018
  ] })
804
1019
  ] }),
805
1020
  (contact.email || contact.phone || firstSeen) && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-col gap-1.5", children: [
@@ -949,8 +1164,13 @@ function ConversationsPage({
949
1164
  appointment,
950
1165
  leadFirstSeen,
951
1166
  leadSource,
1167
+ leadTopic,
952
1168
  searchQuery,
953
1169
  activeFilter,
1170
+ channelFilter,
1171
+ onChannelFilterChange,
1172
+ channel,
1173
+ onChannelChange,
954
1174
  inputValue,
955
1175
  internalNotes,
956
1176
  showLeadPanel = true,
@@ -1006,10 +1226,12 @@ function ConversationsPage({
1006
1226
  activeId: activeConversationId,
1007
1227
  searchQuery,
1008
1228
  activeFilter,
1229
+ channelFilter,
1009
1230
  hasMore,
1010
1231
  isLoadingMore,
1011
1232
  onSearchChange,
1012
1233
  onFilterChange,
1234
+ onChannelFilterChange,
1013
1235
  onSelect: handleSelectConversation,
1014
1236
  onRead,
1015
1237
  onLoadMore,
@@ -1028,6 +1250,8 @@ function ConversationsPage({
1028
1250
  mode,
1029
1251
  messages,
1030
1252
  isAiTyping,
1253
+ channel,
1254
+ onChannelChange,
1031
1255
  inputValue,
1032
1256
  onInputChange,
1033
1257
  onSend,
@@ -1044,7 +1268,8 @@ function ConversationsPage({
1044
1268
  "min-w-0 flex-1 border-r border-border",
1045
1269
  mobilePanel === "chat" ? "flex flex-col md:flex" : "hidden md:flex"
1046
1270
  )
1047
- }
1271
+ },
1272
+ contact.id
1048
1273
  ) : /* @__PURE__ */ jsx(
1049
1274
  "div",
1050
1275
  {
@@ -1075,6 +1300,7 @@ function ConversationsPage({
1075
1300
  contact,
1076
1301
  firstSeen: leadFirstSeen,
1077
1302
  source: leadSource,
1303
+ topic: leadTopic,
1078
1304
  aiFields,
1079
1305
  appointment,
1080
1306
  internalNotes,
@@ -10,7 +10,7 @@ import {
10
10
  AlertDialogFooter,
11
11
  AlertDialogHeader,
12
12
  AlertDialogTitle
13
- } from "./chunk-BD3DWDT4.mjs";
13
+ } from "./chunk-CEYEK3TI.mjs";
14
14
 
15
15
  // src/components/ui/delete-contact-component.tsx
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -17,14 +17,14 @@ import {
17
17
  SelectItem,
18
18
  SelectTrigger,
19
19
  SelectValue
20
- } from "./chunk-TAX3KL66.mjs";
20
+ } from "./chunk-USOVLDGS.mjs";
21
21
  import {
22
22
  Dialog,
23
23
  DialogContent,
24
24
  DialogFooter,
25
25
  DialogHeader,
26
26
  DialogTitle
27
- } from "./chunk-NCUH54IZ.mjs";
27
+ } from "./chunk-LI2CTS5O.mjs";
28
28
  import {
29
29
  Label
30
30
  } from "./chunk-P7CEBZM6.mjs";
@@ -7,7 +7,7 @@ import {
7
7
  SelectItem,
8
8
  SelectTrigger,
9
9
  SelectValue
10
- } from "./chunk-TAX3KL66.mjs";
10
+ } from "./chunk-USOVLDGS.mjs";
11
11
  import {
12
12
  Spinner
13
13
  } from "./chunk-JVMXMFBB.mjs";
@@ -17,7 +17,7 @@ import {
17
17
  DialogFooter,
18
18
  DialogHeader,
19
19
  DialogTitle
20
- } from "./chunk-NCUH54IZ.mjs";
20
+ } from "./chunk-LI2CTS5O.mjs";
21
21
  import {
22
22
  Label
23
23
  } from "./chunk-P7CEBZM6.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  DropdownMenuContent,
4
4
  DropdownMenuItem,
5
5
  DropdownMenuTrigger
6
- } from "./chunk-HNDTLT5X.mjs";
6
+ } from "./chunk-H5DTKPJ2.mjs";
7
7
  import {
8
8
  cn
9
9
  } from "./chunk-AFML43VJ.mjs";