@fluid-app/portal-sdk 0.1.172 → 0.1.174

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 (57) hide show
  1. package/dist/{ContactsScreen-Cx_EJtrO.mjs → ContactsScreen-C1TCBi7p.mjs} +175 -174
  2. package/dist/ContactsScreen-C1TCBi7p.mjs.map +1 -0
  3. package/dist/{ContactsScreen-DPabYFtr.cjs → ContactsScreen-DuUHlWxn.cjs} +1 -1
  4. package/dist/{ContactsScreen-Bufy88vw.cjs → ContactsScreen-RK8gQwUZ.cjs} +174 -173
  5. package/dist/ContactsScreen-RK8gQwUZ.cjs.map +1 -0
  6. package/dist/{MessagingScreen-CK6vqsQI.mjs → MessagingScreen-BDp1yqcC.mjs} +6 -3
  7. package/dist/{MessagingScreen-CK6vqsQI.mjs.map → MessagingScreen-BDp1yqcC.mjs.map} +1 -1
  8. package/dist/{MessagingScreen-mKNu6iHk.cjs → MessagingScreen-DVpyX0RH.cjs} +5 -2
  9. package/dist/{MessagingScreen-mKNu6iHk.cjs.map → MessagingScreen-DVpyX0RH.cjs.map} +1 -1
  10. package/dist/{MessagingScreen-DenN7Doe.cjs → MessagingScreen-DsduPj7E.cjs} +1 -1
  11. package/dist/{MySiteScreen-Y4dsjqFj.mjs → MySiteScreen-BsePIEvg.mjs} +141 -185
  12. package/dist/MySiteScreen-BsePIEvg.mjs.map +1 -0
  13. package/dist/{MySiteScreen-Cw7fTWT1.cjs → MySiteScreen-C_D3tfA8.cjs} +1 -1
  14. package/dist/{MySiteScreen-CaBd2GGy.cjs → MySiteScreen-rYmC05jG.cjs} +140 -184
  15. package/dist/MySiteScreen-rYmC05jG.cjs.map +1 -0
  16. package/dist/{OrdersScreen-CgndBekB.cjs → OrdersScreen-BFeY4w9X.cjs} +1 -1
  17. package/dist/{OrdersScreen-Bb0Ir9UQ.mjs → OrdersScreen-Br-KImu9.mjs} +6 -4
  18. package/dist/{OrdersScreen-Bb0Ir9UQ.mjs.map → OrdersScreen-Br-KImu9.mjs.map} +1 -1
  19. package/dist/{OrdersScreen-Ci3bLi5R.cjs → OrdersScreen-CJDd-LdN.cjs} +5 -3
  20. package/dist/{OrdersScreen-Ci3bLi5R.cjs.map → OrdersScreen-CJDd-LdN.cjs.map} +1 -1
  21. package/dist/{ProductsScreen-5aaLW_mi.mjs → ProductsScreen-CeNMvU4d.mjs} +3 -2
  22. package/dist/ProductsScreen-CeNMvU4d.mjs.map +1 -0
  23. package/dist/{ProductsScreen-uoTQR9PU.mjs → ProductsScreen-DIdRGVvA.mjs} +1 -1
  24. package/dist/{ProductsScreen-BA9KYBz7.cjs → ProductsScreen-fPFSKVOn.cjs} +3 -2
  25. package/dist/ProductsScreen-fPFSKVOn.cjs.map +1 -0
  26. package/dist/{ProductsScreen-CgNQv9T1.cjs → ProductsScreen-iQf4zOus.cjs} +1 -1
  27. package/dist/{ProfileScreen-BZA9PaER.cjs → ProfileScreen-BSWf_Rb-.cjs} +5 -3
  28. package/dist/{ProfileScreen-BZA9PaER.cjs.map → ProfileScreen-BSWf_Rb-.cjs.map} +1 -1
  29. package/dist/{ProfileScreen-0-xeqjHj.mjs → ProfileScreen-DQ7Mjq_K.mjs} +5 -3
  30. package/dist/{ProfileScreen-0-xeqjHj.mjs.map → ProfileScreen-DQ7Mjq_K.mjs.map} +1 -1
  31. package/dist/{ProfileScreen-_m0nqiDQ.cjs → ProfileScreen-Nric2qx3.cjs} +1 -1
  32. package/dist/{ShareablesScreen-C51d1euJ.cjs → ShareablesScreen-Bl6aT0vn.cjs} +3 -3
  33. package/dist/ShareablesScreen-Bl6aT0vn.cjs.map +1 -0
  34. package/dist/{ShareablesScreen-BdAGblEo.mjs → ShareablesScreen-CfchbhSH.mjs} +1 -1
  35. package/dist/{ShareablesScreen-DNWdru1i.cjs → ShareablesScreen-CtuGiQ7_.cjs} +1 -1
  36. package/dist/{ShareablesScreen-0iGOTfNW.mjs → ShareablesScreen-D2JbmO7a.mjs} +5 -5
  37. package/dist/ShareablesScreen-D2JbmO7a.mjs.map +1 -0
  38. package/dist/{SubscriptionsScreen-_iUOr_D1.cjs → SubscriptionsScreen-BuxFW2sw.cjs} +5 -3
  39. package/dist/{SubscriptionsScreen-_iUOr_D1.cjs.map → SubscriptionsScreen-BuxFW2sw.cjs.map} +1 -1
  40. package/dist/{SubscriptionsScreen-DzCRMlX5.cjs → SubscriptionsScreen-Bz6FVnmk.cjs} +1 -1
  41. package/dist/{SubscriptionsScreen-Gig1ciN_.mjs → SubscriptionsScreen-DBUELjIY.mjs} +6 -4
  42. package/dist/{SubscriptionsScreen-Gig1ciN_.mjs.map → SubscriptionsScreen-DBUELjIY.mjs.map} +1 -1
  43. package/dist/index.cjs +27 -27
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts.map +1 -1
  46. package/dist/index.d.mts.map +1 -1
  47. package/dist/index.mjs +28 -28
  48. package/dist/index.mjs.map +1 -1
  49. package/package.json +16 -16
  50. package/dist/ContactsScreen-Bufy88vw.cjs.map +0 -1
  51. package/dist/ContactsScreen-Cx_EJtrO.mjs.map +0 -1
  52. package/dist/MySiteScreen-CaBd2GGy.cjs.map +0 -1
  53. package/dist/MySiteScreen-Y4dsjqFj.mjs.map +0 -1
  54. package/dist/ProductsScreen-5aaLW_mi.mjs.map +0 -1
  55. package/dist/ProductsScreen-BA9KYBz7.cjs.map +0 -1
  56. package/dist/ShareablesScreen-0iGOTfNW.mjs.map +0 -1
  57. package/dist/ShareablesScreen-C51d1euJ.cjs.map +0 -1
@@ -41,6 +41,67 @@ function StatusBadge({ status, label, className }) {
41
41
  });
42
42
  }
43
43
  //#endregion
44
+ //#region ../../contacts/core/src/contacts-api-context.ts
45
+ const ContactsApiContext = (0, react.createContext)(null);
46
+ const ContactsApiProvider = ContactsApiContext.Provider;
47
+ function useContactsDomainApi() {
48
+ const api = (0, react.useContext)(ContactsApiContext);
49
+ if (!api) throw new Error("useContactsDomainApi must be used within a ContactsApiProvider");
50
+ return api;
51
+ }
52
+ function useContactsCrud() {
53
+ return useContactsDomainApi().contacts;
54
+ }
55
+ function useNotesApi() {
56
+ return useContactsDomainApi().notes;
57
+ }
58
+ function useTasksApi() {
59
+ return useContactsDomainApi().tasks;
60
+ }
61
+ /** Returns GroupsApi if the provider supplies one, otherwise null. */
62
+ function useGroupsApi() {
63
+ return useContactsDomainApi().groups ?? null;
64
+ }
65
+ //#endregion
66
+ //#region ../../contacts/core/src/query-keys.ts
67
+ const CONTACTS_QUERY_KEYS = {
68
+ all: (prefix) => [prefix],
69
+ list: (prefix) => [...CONTACTS_QUERY_KEYS.all(prefix), "list"],
70
+ detail: (prefix, id) => [
71
+ ...CONTACTS_QUERY_KEYS.all(prefix),
72
+ "detail",
73
+ id
74
+ ]
75
+ };
76
+ const contactsKeys = {
77
+ activities: (contactId) => [
78
+ "portal-contacts",
79
+ "activities",
80
+ contactId
81
+ ],
82
+ tasks: (contactId) => [
83
+ "portal-contacts",
84
+ "tasks",
85
+ contactId
86
+ ],
87
+ notes: (contactId) => [
88
+ "portal-contacts",
89
+ "notes",
90
+ contactId
91
+ ],
92
+ orders: (contactId) => [
93
+ "rep-contacts",
94
+ "orders",
95
+ contactId
96
+ ],
97
+ subscriptionOrders: (contactId) => [
98
+ "rep-contacts",
99
+ "subscription-orders",
100
+ contactId
101
+ ],
102
+ groups: () => ["portal-contacts", "groups"]
103
+ };
104
+ //#endregion
44
105
  //#region ../../contacts/ui/src/shared/components/contacts/allContacts/contactsTable.tsx
45
106
  function getInitials(fullName) {
46
107
  const trimmed = fullName?.trim();
@@ -137,11 +198,11 @@ function resolveContactGroupLabels(contact) {
137
198
  if (lead && String(lead).trim()) return [String(lead).replaceAll("_", " ")];
138
199
  return [];
139
200
  }
140
- function RepContactCard({ contact, selected, onToggleSelect, onRowClick, onEditContact, setSelectedContacts, setOpenDeleteModal }) {
201
+ function RepContactCard({ contact, selected, onToggleSelect, onRowClick, onEditContact, setSelectedContacts, setOpenDeleteModal, groupsByName }) {
141
202
  const groupLabels = resolveContactGroupLabels(contact);
142
203
  const groupTitle = groupLabels.length > 0 ? groupLabels.join(", ") : void 0;
143
204
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Card, {
144
- className: require_src.cn("border-border hover:bg-accent/30 h-[100px] w-full flex-col items-start justify-center gap-0 py-0 shadow-sm transition-colors", selected && "bg-accent/40 border-primary/25 ring-primary/20 ring-1"),
205
+ className: require_src.cn("border-border hover:bg-accent/30 min-h-[100px] w-full flex-col items-start justify-center gap-0 py-3 shadow-sm transition-colors sm:py-0", selected && "bg-accent/40 border-primary/25 ring-primary/20 ring-1"),
145
206
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.CardContent, {
146
207
  className: "w-full px-3 py-0",
147
208
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -162,46 +223,54 @@ function RepContactCard({ contact, selected, onToggleSelect, onRowClick, onEditC
162
223
  type: "button",
163
224
  className: "text-foreground focus-visible:ring-ring flex min-w-0 flex-1 items-center gap-2 rounded-md text-left outline-none focus-visible:ring-2 sm:gap-3",
164
225
  onClick: () => onRowClick?.(contact),
165
- children: [
166
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Avatar, {
167
- className: "size-12 shrink-0",
168
- children: [contact.avatar_url ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AvatarImage, {
169
- src: contact.avatar_url,
170
- alt: contact.full_name || "Contact"
171
- }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AvatarFallback, {
172
- className: "border-border text-foreground bg-accent ring-border/80 text-xs font-semibold ring-1",
173
- children: getInitials(contact.full_name)
174
- })]
175
- }),
176
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
177
- className: "max-w-[32%] min-w-0 shrink truncate text-sm leading-tight font-semibold sm:max-w-none sm:flex-[1.15]",
178
- title: contact.full_name,
179
- children: contact.full_name || "—"
180
- }),
181
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
182
- className: "text-muted-foreground min-w-0 flex-[1.35] truncate text-xs leading-tight",
183
- title: contact.email ?? void 0,
184
- children: contact.email || "—"
185
- }),
186
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
187
- className: "text-muted-foreground min-w-0 flex-[0.95] truncate text-xs leading-tight",
188
- title: contact.phone ?? void 0,
189
- children: contact.phone || "—"
190
- }),
191
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
192
- className: "text-muted-foreground flex min-w-0 flex-[0.95] items-center gap-1 text-xs leading-tight",
193
- title: groupTitle,
194
- children: [groupLabels.length > 0 ? groupLabels.slice(0, 2).map((label, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Badge, {
195
- variant: "secondary",
196
- className: "max-w-[min(100%,10rem)] shrink truncate font-normal capitalize",
197
- title: label,
198
- children: label
199
- }, `${contact.id}-group-${index}-${label}`)) : "—", groupLabels.length > 2 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
200
- className: "text-muted-foreground shrink-0 text-[10px]",
201
- children: ["+", groupLabels.length - 2]
202
- })]
203
- })
204
- ]
226
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Avatar, {
227
+ className: "size-12 shrink-0",
228
+ children: [contact.avatar_url ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AvatarImage, {
229
+ src: contact.avatar_url,
230
+ alt: contact.full_name || "Contact"
231
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.AvatarFallback, {
232
+ className: "border-border text-foreground bg-accent ring-border/80 text-xs font-semibold ring-1",
233
+ children: getInitials(contact.full_name)
234
+ })]
235
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
236
+ className: "flex min-w-0 flex-1 flex-col gap-0.5 sm:flex-row sm:items-center sm:gap-3",
237
+ children: [
238
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
239
+ className: "min-w-0 truncate text-sm leading-tight font-semibold sm:flex-[1.15]",
240
+ title: contact.full_name,
241
+ children: contact.full_name || "—"
242
+ }),
243
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
244
+ className: "text-muted-foreground min-w-0 truncate text-xs leading-tight sm:flex-[1.35]",
245
+ title: contact.email ?? void 0,
246
+ children: contact.email || "—"
247
+ }),
248
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
249
+ className: "text-muted-foreground min-w-0 truncate text-xs leading-tight sm:flex-[0.95]",
250
+ title: contact.phone ?? void 0,
251
+ children: contact.phone || "—"
252
+ }),
253
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
254
+ className: "text-muted-foreground flex min-w-0 flex-wrap items-center gap-1 text-xs leading-tight sm:flex-[0.95] sm:flex-nowrap",
255
+ title: groupTitle,
256
+ children: [groupLabels.length > 0 ? groupLabels.slice(0, 2).map((label, index) => {
257
+ const group = groupsByName.get(label);
258
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
259
+ className: "text-foreground border-border inline-flex max-w-[min(100%,10rem)] shrink items-center gap-1 truncate rounded-full border px-2 py-0.5 font-normal capitalize",
260
+ style: { backgroundColor: group?.avatar_background ?? "var(--color-muted)" },
261
+ title: label,
262
+ children: [group?.avatar && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: group.avatar }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
263
+ className: "truncate",
264
+ children: label
265
+ })]
266
+ }, `${contact.id}-group-${index}-${label}`);
267
+ }) : "—", groupLabels.length > 2 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
268
+ className: "text-muted-foreground shrink-0 text-[10px]",
269
+ children: ["+", groupLabels.length - 2]
270
+ })]
271
+ })
272
+ ]
273
+ })]
205
274
  }),
206
275
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
207
276
  className: "flex shrink-0 items-center",
@@ -234,11 +303,6 @@ function RepContactCard({ contact, selected, onToggleSelect, onRowClick, onEditC
234
303
  })
235
304
  });
236
305
  }
237
- const TABS = [
238
- "All",
239
- "Leads",
240
- "Customers"
241
- ];
242
306
  function getSortComparable(contact, field) {
243
307
  if (field === "name") return contact.full_name ?? "";
244
308
  return contact.email ?? "";
@@ -253,9 +317,20 @@ const CONTACT_SORT_COLUMNS = [{
253
317
  }];
254
318
  function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setOpenDeleteModal, onEditContact, onRowClick, resetKey, tableLayout }) {
255
319
  const isMemberLayout = tableLayout === "members";
320
+ const groupsApi = useGroupsApi();
321
+ const { data: availableGroups = [] } = (0, _tanstack_react_query.useQuery)({
322
+ queryKey: contactsKeys.groups(),
323
+ queryFn: () => groupsApi.listGroups(),
324
+ enabled: !!groupsApi && isMemberLayout,
325
+ select: (data) => data.groups
326
+ });
327
+ const groupsByName = (0, react.useMemo)(() => {
328
+ const map = /* @__PURE__ */ new Map();
329
+ for (const group of availableGroups) map.set(group.name, group);
330
+ return map;
331
+ }, [availableGroups]);
256
332
  const [currentPage, setCurrentPage] = (0, react.useState)(1);
257
333
  const [searchTerm, setSearchTerm] = (0, react.useState)("");
258
- const [activeTab, setActiveTab] = (0, react.useState)("All");
259
334
  const [sortValue, setSortValue] = (0, react.useState)("name_asc");
260
335
  const [selectedIds, setSelectedIds] = (0, react.useState)(/* @__PURE__ */ new Set());
261
336
  const parsedSort = (0, react.useMemo)(() => {
@@ -268,23 +343,17 @@ function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setO
268
343
  (0, react.useEffect)(() => {
269
344
  setCurrentPage(1);
270
345
  setSelectedIds(/* @__PURE__ */ new Set());
271
- }, [
272
- searchTerm,
273
- activeTab,
274
- sortValue
275
- ]);
346
+ }, [searchTerm, sortValue]);
276
347
  (0, react.useEffect)(() => {
277
348
  setSelectedIds(/* @__PURE__ */ new Set());
278
349
  }, [currentPage]);
279
350
  (0, react.useEffect)(() => {
280
351
  setSelectedIds(/* @__PURE__ */ new Set());
281
352
  }, [resetKey]);
282
- const resolvedStatus = activeTab === "Leads" ? "lead" : activeTab === "Customers" ? "customer" : null;
283
353
  const { data, isLoading } = (0, _tanstack_react_query.useQuery)({
284
354
  queryKey: [queryKeyPrefix, {
285
355
  searchTerm,
286
356
  currentPage,
287
- activeTab,
288
357
  sortField: parsedSort.id,
289
358
  sortDesc: parsedSort.desc
290
359
  }],
@@ -292,7 +361,6 @@ function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setO
292
361
  search_query: searchTerm || void 0,
293
362
  page: currentPage,
294
363
  per_page: PAGE_SIZE,
295
- ...resolvedStatus ? { status: resolvedStatus } : {},
296
364
  sort_by: parsedSort.id,
297
365
  sort_direction: parsedSort.desc ? "desc" : "asc"
298
366
  }),
@@ -348,20 +416,9 @@ function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setO
348
416
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
349
417
  className: "border-border overflow-hidden rounded-lg border shadow-sm",
350
418
  children: [
351
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
352
- className: "flex flex-col gap-2 p-3 sm:flex-row sm:items-center sm:justify-between",
353
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.ToggleGroup, {
354
- type: "single",
355
- value: activeTab,
356
- onValueChange: (v) => {
357
- if (v) setActiveTab(v);
358
- },
359
- variant: "ghost",
360
- children: TABS.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.ToggleGroupItem, {
361
- value: tab,
362
- children: tab
363
- }, tab))
364
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
419
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
420
+ className: "flex justify-end p-3",
421
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
365
422
  className: "w-full max-w-sm",
366
423
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchSort.SearchSort, {
367
424
  searchValue: searchTerm,
@@ -377,7 +434,7 @@ function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setO
377
434
  sortValue,
378
435
  onSortChange: setSortValue
379
436
  })
380
- })]
437
+ })
381
438
  }),
382
439
  isMemberLayout ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
383
440
  className: "space-y-3 p-3",
@@ -448,7 +505,8 @@ function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setO
448
505
  onRowClick,
449
506
  onEditContact,
450
507
  setSelectedContacts,
451
- setOpenDeleteModal
508
+ setOpenDeleteModal,
509
+ groupsByName
452
510
  }, contact.id))]
453
511
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
454
512
  className: "block md:hidden",
@@ -690,45 +748,6 @@ function ContactsTable({ listContacts, queryKeyPrefix, setSelectedContacts, setO
690
748
  });
691
749
  }
692
750
  //#endregion
693
- //#region ../../contacts/core/src/query-keys.ts
694
- const CONTACTS_QUERY_KEYS = {
695
- all: (prefix) => [prefix],
696
- list: (prefix) => [...CONTACTS_QUERY_KEYS.all(prefix), "list"],
697
- detail: (prefix, id) => [
698
- ...CONTACTS_QUERY_KEYS.all(prefix),
699
- "detail",
700
- id
701
- ]
702
- };
703
- const contactsKeys = {
704
- activities: (contactId) => [
705
- "portal-contacts",
706
- "activities",
707
- contactId
708
- ],
709
- tasks: (contactId) => [
710
- "portal-contacts",
711
- "tasks",
712
- contactId
713
- ],
714
- notes: (contactId) => [
715
- "portal-contacts",
716
- "notes",
717
- contactId
718
- ],
719
- orders: (contactId) => [
720
- "rep-contacts",
721
- "orders",
722
- contactId
723
- ],
724
- subscriptionOrders: (contactId) => [
725
- "rep-contacts",
726
- "subscription-orders",
727
- contactId
728
- ],
729
- groups: () => ["portal-contacts", "groups"]
730
- };
731
- //#endregion
732
751
  //#region ../../contacts/ui/src/shared/components/contacts/allContacts/contactsPage.tsx
733
752
  function ContactsPage({ listContacts, deleteContacts, queryKeyPrefix, header, onEditContact, onRowClick, tableLayout }) {
734
753
  const [openDeleteModal, setOpenDeleteModal] = (0, react.useState)(false);
@@ -1091,7 +1110,7 @@ const ContactInfoCard = ({ contact, className, onEdit, showActions = false, onCr
1091
1110
  renderer: renderBackground
1092
1111
  })
1093
1112
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1094
- className: "relative z-10 p-6",
1113
+ className: "relative p-6",
1095
1114
  children: [
1096
1115
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1097
1116
  className: "mb-5 flex items-center justify-between",
@@ -1103,7 +1122,7 @@ const ContactInfoCard = ({ contact, className, onEdit, showActions = false, onCr
1103
1122
  onClick: onEdit,
1104
1123
  disabled: isDimmed,
1105
1124
  className: "bg-card/90 text-card-foreground hover:bg-card rounded-lg px-4 py-1.5 text-sm font-medium shadow-sm backdrop-blur-sm transition-colors disabled:opacity-60",
1106
- children: isDimmed ? "Editing…" : "Edit"
1125
+ children: "Edit"
1107
1126
  })]
1108
1127
  }),
1109
1128
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -1281,7 +1300,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1281
1300
  onChange: (url) => setValue("avatar_url", url ?? "", { shouldDirty: true })
1282
1301
  })]
1283
1302
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1284
- className: "grid grid-cols-1 gap-6 md:grid-cols-2",
1303
+ className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
1285
1304
  children: [
1286
1305
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormField, {
1287
1306
  control,
@@ -1295,7 +1314,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1295
1314
  placeholder: "Enter first name",
1296
1315
  ...field,
1297
1316
  value: field.value ?? "",
1298
- className: "ring-input bg-white shadow-sm"
1317
+ className: "ring-input"
1299
1318
  }) }),
1300
1319
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1301
1320
  ] })
@@ -1312,7 +1331,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1312
1331
  placeholder: "Enter last name",
1313
1332
  ...field,
1314
1333
  value: field.value ?? "",
1315
- className: "ring-input bg-white shadow-sm"
1334
+ className: "ring-input"
1316
1335
  }) }),
1317
1336
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1318
1337
  ] })
@@ -1330,7 +1349,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1330
1349
  type: "email",
1331
1350
  ...field,
1332
1351
  value: field.value ?? "",
1333
- className: "ring-input bg-white shadow-sm"
1352
+ className: "ring-input"
1334
1353
  }) }),
1335
1354
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1336
1355
  ] })
@@ -1347,7 +1366,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1347
1366
  placeholder: "Enter phone number",
1348
1367
  ...field,
1349
1368
  value: field.value ?? "",
1350
- className: "ring-input bg-white shadow-sm"
1369
+ className: "ring-input"
1351
1370
  }) }),
1352
1371
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1353
1372
  ] })
@@ -1364,7 +1383,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1364
1383
  value: field.value ?? "",
1365
1384
  onValueChange: field.onChange,
1366
1385
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormControl, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectTrigger, {
1367
- className: "w-full bg-white shadow-sm",
1386
+ className: "w-full",
1368
1387
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectValue, { placeholder: "Select status" })
1369
1388
  }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectContent, {
1370
1389
  position: "popper",
@@ -1382,7 +1401,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1382
1401
  control,
1383
1402
  name: "address",
1384
1403
  render: ({ field }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.FormItem, {
1385
- className: "col-span-2",
1404
+ className: "lg:col-span-2",
1386
1405
  children: [
1387
1406
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormLabel, {
1388
1407
  className: "font-inter text-foreground font-medium",
@@ -1392,7 +1411,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1392
1411
  placeholder: "Enter street address",
1393
1412
  ...field,
1394
1413
  value: field.value ?? "",
1395
- className: "ring-input bg-white shadow-sm"
1414
+ className: "ring-input"
1396
1415
  }) }),
1397
1416
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1398
1417
  ]
@@ -1410,7 +1429,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1410
1429
  placeholder: "Enter city",
1411
1430
  ...field,
1412
1431
  value: field.value ?? "",
1413
- className: "ring-input bg-white shadow-sm"
1432
+ className: "ring-input"
1414
1433
  }) }),
1415
1434
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1416
1435
  ] })
@@ -1427,7 +1446,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1427
1446
  placeholder: "Enter state or province",
1428
1447
  ...field,
1429
1448
  value: field.value ?? "",
1430
- className: "ring-input bg-white shadow-sm"
1449
+ className: "ring-input"
1431
1450
  }) }),
1432
1451
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1433
1452
  ] })
@@ -1444,7 +1463,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1444
1463
  placeholder: "Enter postal code",
1445
1464
  ...field,
1446
1465
  value: field.value ?? "",
1447
- className: "ring-input bg-white shadow-sm"
1466
+ className: "ring-input"
1448
1467
  }) }),
1449
1468
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormMessage, {})
1450
1469
  ] })
@@ -1461,7 +1480,7 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1461
1480
  value: field.value ?? "",
1462
1481
  onValueChange: field.onChange,
1463
1482
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.FormControl, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectTrigger, {
1464
- className: "w-full bg-white shadow-sm",
1483
+ className: "w-full",
1465
1484
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectValue, { placeholder: "Select country" })
1466
1485
  }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.SelectContent, {
1467
1486
  position: "popper",
@@ -1480,28 +1499,6 @@ const ContactDetailsForm = ({ className, countries = DEFAULT_COUNTRIES, renderAv
1480
1499
  });
1481
1500
  };
1482
1501
  //#endregion
1483
- //#region ../../contacts/core/src/contacts-api-context.ts
1484
- const ContactsApiContext = (0, react.createContext)(null);
1485
- const ContactsApiProvider = ContactsApiContext.Provider;
1486
- function useContactsDomainApi() {
1487
- const api = (0, react.useContext)(ContactsApiContext);
1488
- if (!api) throw new Error("useContactsDomainApi must be used within a ContactsApiProvider");
1489
- return api;
1490
- }
1491
- function useContactsCrud() {
1492
- return useContactsDomainApi().contacts;
1493
- }
1494
- function useNotesApi() {
1495
- return useContactsDomainApi().notes;
1496
- }
1497
- function useTasksApi() {
1498
- return useContactsDomainApi().tasks;
1499
- }
1500
- /** Returns GroupsApi if the provider supplies one, otherwise null. */
1501
- function useGroupsApi() {
1502
- return useContactsDomainApi().groups ?? null;
1503
- }
1504
- //#endregion
1505
1502
  //#region ../../contacts/ui/src/portal/hooks/notes/use-delete-contact-note.ts
1506
1503
  function useDeleteContactNote(contactId, options) {
1507
1504
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
@@ -1697,14 +1694,14 @@ function NoteTaskEditor({ titlePlaceholder = "New Note", bodyPlaceholder = "Star
1697
1694
  fireOnChange();
1698
1695
  }, [dueDate]);
1699
1696
  const buttonBase = "flex h-7 w-7 items-center justify-center rounded text-xs transition-colors";
1700
- const buttonActive = "bg-gray-100 text-primary";
1701
- const buttonInactive = "text-gray-400 hover:bg-gray-50";
1702
- const toolbarSeparator = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "mx-1 h-5 w-px bg-gray-200" });
1697
+ const buttonActive = "bg-muted text-primary";
1698
+ const buttonInactive = "text-muted-foreground hover:bg-muted/50";
1699
+ const toolbarSeparator = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "bg-border mx-1 h-5 w-px" });
1703
1700
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1704
1701
  className: require_src.cn("border-border flex flex-col overflow-hidden rounded-lg border", className),
1705
1702
  children: [
1706
1703
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1707
- className: "border-border flex items-center gap-0.5 border-b bg-gray-50 px-2 py-1.5",
1704
+ className: "border-border bg-muted/50 flex items-center gap-0.5 border-b px-2 py-1.5",
1708
1705
  children: [
1709
1706
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1710
1707
  type: "button",
@@ -1793,7 +1790,7 @@ function NoteTaskEditor({ titlePlaceholder = "New Note", bodyPlaceholder = "Star
1793
1790
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1794
1791
  type: "button",
1795
1792
  onClick: () => dateInputRef.current?.showPicker(),
1796
- className: "flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-xs font-medium text-gray-400 transition-colors hover:bg-gray-50 hover:text-gray-600",
1793
+ className: "text-muted-foreground hover:bg-muted hover:text-foreground flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-xs font-medium transition-colors",
1797
1794
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Calendar, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "Due date" })]
1798
1795
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1799
1796
  ref: dateInputRef,
@@ -1823,7 +1820,7 @@ function NoteTaskEditor({ titlePlaceholder = "New Note", bodyPlaceholder = "Star
1823
1820
 
1824
1821
  .ProseMirror h1.is-empty::before,
1825
1822
  .ProseMirror p.is-empty::before {
1826
- color: #9ca3af;
1823
+ color: var(--color-muted-foreground);
1827
1824
  content: attr(data-placeholder);
1828
1825
  float: left;
1829
1826
  height: 0;
@@ -1921,7 +1918,7 @@ function NoteTaskModal({ open, onOpenChange, mode, type, initialTitle = "", init
1921
1918
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1922
1919
  type: "button",
1923
1920
  onClick: () => dateInputRef.current?.showPicker(),
1924
- className: "text-muted-foreground hover:text-foreground inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors hover:bg-gray-50",
1921
+ className: "text-muted-foreground hover:text-foreground hover:bg-muted inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors",
1925
1922
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Calendar, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "Add due date" })]
1926
1923
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1927
1924
  ref: dateInputRef,
@@ -1980,7 +1977,7 @@ function EmptyState$3({ onCreateNote }) {
1980
1977
  className: "flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-amber-100 to-yellow-100",
1981
1978
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.StickyNote, { className: "h-9 w-9 text-amber-500" })
1982
1979
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1983
- className: "absolute -right-2 -bottom-1 flex h-9 w-9 items-center justify-center rounded-full border-2 border-white bg-gradient-to-br from-orange-100 to-red-100 shadow-sm",
1980
+ className: "border-background absolute -right-2 -bottom-1 flex h-9 w-9 items-center justify-center rounded-full border-2 bg-gradient-to-br from-orange-100 to-red-100 shadow-sm",
1984
1981
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Pen, { className: "h-4 w-4 text-orange-500" })
1985
1982
  })]
1986
1983
  }),
@@ -2316,7 +2313,7 @@ function EmptyState$2({ onCreateTask }) {
2316
2313
  className: "flex h-20 w-20 items-center justify-center rounded-full bg-gradient-to-br from-teal-100 to-emerald-100",
2317
2314
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ClipboardList, { className: "h-9 w-9 text-teal-500" })
2318
2315
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2319
- className: "absolute -right-2 -bottom-1 flex h-9 w-9 items-center justify-center rounded-full border-2 border-white bg-gradient-to-br from-blue-100 to-indigo-100 shadow-sm",
2316
+ className: "border-background absolute -right-2 -bottom-1 flex h-9 w-9 items-center justify-center rounded-full border-2 bg-gradient-to-br from-blue-100 to-indigo-100 shadow-sm",
2320
2317
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SquareCheckBig, { className: "h-4 w-4 text-blue-500" })
2321
2318
  })]
2322
2319
  }),
@@ -2649,7 +2646,7 @@ function GroupsSection({ contactTags, availableGroups = [], onManageGroups, onAd
2649
2646
  return availableGroups.find((g) => g.name === tagName);
2650
2647
  };
2651
2648
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2652
- className: require_src.cn("rounded-lg border bg-white p-4 shadow-xs transition-all hover:shadow-md", disabled && "pointer-events-none opacity-45 select-none"),
2649
+ className: require_src.cn("bg-card rounded-lg border p-4 shadow-xs transition-all hover:shadow-md", disabled && "pointer-events-none opacity-45 select-none"),
2653
2650
  "aria-disabled": disabled || void 0,
2654
2651
  children: [
2655
2652
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -2668,10 +2665,10 @@ function GroupsSection({ contactTags, availableGroups = [], onManageGroups, onAd
2668
2665
  className: "flex flex-wrap gap-2",
2669
2666
  children: contactTags.map((tag) => {
2670
2667
  const group = getGroupDetails(tag);
2671
- const backgroundColor = group?.avatar_background ?? "#F3F4F6";
2668
+ const backgroundColor = group?.avatar_background ?? "var(--color-muted)";
2672
2669
  const emoji = group?.avatar;
2673
2670
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
2674
- className: "text-foreground inline-flex items-center gap-2 rounded-full border border-gray-100 px-3 py-1.5 text-xs",
2671
+ className: "text-foreground border-border inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs",
2675
2672
  style: { backgroundColor },
2676
2673
  children: [
2677
2674
  emoji && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: emoji }),
@@ -2703,7 +2700,7 @@ function GroupsSection({ contactTags, availableGroups = [], onManageGroups, onAd
2703
2700
  className: "flex cursor-pointer items-center gap-3",
2704
2701
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2705
2702
  className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-sm",
2706
- style: { backgroundColor: group.avatar_background ?? "#F3F4F6" },
2703
+ style: { backgroundColor: group.avatar_background ?? "var(--color-muted)" },
2707
2704
  children: group.avatar
2708
2705
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2709
2706
  className: "flex-1 truncate text-sm",
@@ -2766,14 +2763,14 @@ function ManageGroupsModal({ open, onOpenChange, contactName, currentTags, avail
2766
2763
  }),
2767
2764
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2768
2765
  className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-lg",
2769
- style: { backgroundColor: group.avatar_background ?? "#F3F4F6" },
2766
+ style: { backgroundColor: group.avatar_background ?? "var(--color-muted)" },
2770
2767
  children: group.avatar
2771
2768
  }),
2772
2769
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2773
2770
  className: "text-foreground min-w-0 flex-1 truncate text-sm font-medium",
2774
2771
  children: group.name
2775
2772
  }),
2776
- isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "h-4 w-4 shrink-0 text-green-600" })
2773
+ isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "text-primary h-4 w-4 shrink-0" })
2777
2774
  ]
2778
2775
  }, group.id);
2779
2776
  })
@@ -3133,11 +3130,11 @@ function RepContactDetailView({ contact, contactId, countryOptions = DEFAULT_COU
3133
3130
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3134
3131
  className: "flex h-full flex-col",
3135
3132
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3136
- className: "mx-auto w-full flex-1 overflow-hidden",
3133
+ className: "mx-auto w-full flex-1 lg:overflow-hidden",
3137
3134
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3138
- className: "flex h-full gap-6 px-6 py-8",
3135
+ className: "flex flex-col gap-6 px-4 py-4 lg:h-full lg:flex-row lg:px-6 lg:py-8",
3139
3136
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3140
- className: "w-80 space-y-6 overflow-y-auto",
3137
+ className: require_src.cn("w-full space-y-6 lg:w-80 lg:overflow-y-auto", isEditingProfile && "hidden lg:block"),
3141
3138
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContactInfoCard, {
3142
3139
  contact: contactInfo,
3143
3140
  isDimmed: isEditingProfile,
@@ -3161,15 +3158,15 @@ function RepContactDetailView({ contact, contactId, countryOptions = DEFAULT_COU
3161
3158
  disabled: isEditingProfile
3162
3159
  })]
3163
3160
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3164
- className: "flex flex-1 flex-col overflow-hidden",
3161
+ className: "flex flex-1 flex-col lg:overflow-hidden",
3165
3162
  children: [isEditingProfile ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3166
- className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2",
3163
+ className: "flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between sm:gap-x-4 sm:gap-y-2",
3167
3164
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3168
3165
  className: "flex min-w-0 items-center gap-1",
3169
3166
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3170
3167
  type: "button",
3171
3168
  onClick: () => setActiveTab("Tasks"),
3172
- className: "text-muted-foreground hover:bg-muted hover:text-foreground flex h-9 w-9 shrink-0 items-center justify-center rounded-md transition-colors",
3169
+ className: "text-muted-foreground hover:bg-muted hover:text-foreground hidden h-9 w-9 shrink-0 items-center justify-center rounded-md transition-colors sm:flex",
3173
3170
  "aria-label": "Back to Tasks",
3174
3171
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowLeft, { className: "h-4 w-4" })
3175
3172
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
@@ -3177,17 +3174,21 @@ function RepContactDetailView({ contact, contactId, countryOptions = DEFAULT_COU
3177
3174
  children: ["Editing ", fullName]
3178
3175
  })]
3179
3176
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3180
- className: "flex shrink-0 items-center gap-3",
3177
+ className: "flex w-full flex-col gap-2 sm:w-auto sm:shrink-0 sm:flex-row sm:items-center sm:gap-3",
3181
3178
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3182
3179
  type: "button",
3183
3180
  variant: "secondary",
3184
3181
  onClick: () => setActiveTab("Tasks"),
3182
+ disabled: isSubmitting,
3183
+ className: "w-full sm:w-auto",
3185
3184
  children: "Cancel"
3186
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
3185
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
3187
3186
  type: "button",
3188
3187
  onClick: onSave,
3189
3188
  disabled: !isDirty || isSubmitting,
3190
- children: isSubmitting ? "Updating…" : "Update Contact"
3189
+ "aria-busy": isSubmitting,
3190
+ className: "w-full sm:w-auto",
3191
+ children: [isSubmitting && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Spinner, { className: "size-4" }), isSubmitting ? "Saving" : "Update Contact"]
3191
3192
  })]
3192
3193
  })]
3193
3194
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -3199,7 +3200,7 @@ function RepContactDetailView({ contact, contactId, countryOptions = DEFAULT_COU
3199
3200
  children: tab
3200
3201
  }, tab))
3201
3202
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3202
- className: "flex-1 overflow-y-auto pt-6",
3203
+ className: "flex-1 pt-6 lg:overflow-y-auto",
3203
3204
  children: [
3204
3205
  activeTab === "Tasks" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskList, {
3205
3206
  tasks,
@@ -4606,4 +4607,4 @@ Object.defineProperty(exports, "contactsScreenPropertySchema", {
4606
4607
  }
4607
4608
  });
4608
4609
 
4609
- //# sourceMappingURL=ContactsScreen-Bufy88vw.cjs.map
4610
+ //# sourceMappingURL=ContactsScreen-RK8gQwUZ.cjs.map