@amogads/ui 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pages.js CHANGED
@@ -6089,18 +6089,30 @@ var init_sidebar_data2 = __esm({
6089
6089
  });
6090
6090
 
6091
6091
  // src/design-system/templates/app-logo.tsx
6092
- function AppLogo({ className }) {
6093
- const { toggleSidebar } = useSidebar();
6092
+ function AppLogo({ className, onClick }) {
6093
+ const { toggleSidebar, setOpenMobile, isMobile } = useSidebar();
6094
6094
  const team = sidebarData2.teams[0];
6095
6095
  const Logo = team.logo;
6096
+ const handleClick = (e) => {
6097
+ e.stopPropagation();
6098
+ if (onClick) {
6099
+ onClick();
6100
+ return;
6101
+ }
6102
+ if (isMobile) {
6103
+ setOpenMobile(true);
6104
+ } else {
6105
+ toggleSidebar();
6106
+ }
6107
+ };
6096
6108
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6097
6109
  Button,
6098
6110
  {
6099
6111
  type: "button",
6100
6112
  variant: "ghost",
6101
- onClick: toggleSidebar,
6113
+ onClick: handleClick,
6102
6114
  className: cn(
6103
- "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9",
6115
+ "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9 cursor-pointer",
6104
6116
  className
6105
6117
  ),
6106
6118
  "aria-label": "Open sidebar menu",
@@ -18214,38 +18226,38 @@ function ChatHeader({
18214
18226
  onShowProfile
18215
18227
  }) {
18216
18228
  return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: "flex flex-none shrink-0 items-center justify-between border-b border-border bg-muted/10 p-3 sm:p-4 select-none", children: [
18217
- /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: [
18229
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
18230
+ "div",
18231
+ {
18232
+ onClick: onShowProfile,
18233
+ className: "flex cursor-pointer items-center gap-2.5 sm:gap-3 transition-opacity select-none hover:opacity-85 min-w-0",
18234
+ title: "Click to view info",
18235
+ children: [
18236
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: "relative shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(Avatar, { className: "h-9 w-9 sm:h-10 sm:w-10 rounded-xl border border-border/60", children: [
18237
+ chatAvatar ? /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(AvatarImage, { src: chatAvatar, alt: chatName }) : null,
18238
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(AvatarFallback, { className: "rounded-xl bg-primary/10 font-bold text-primary", children: chatName?.charAt(0)?.toUpperCase() })
18239
+ ] }) }),
18240
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
18241
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("span", { className: "block truncate text-sm leading-tight font-bold text-foreground", children: chatName }),
18242
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("span", { className: "truncate text-xs leading-tight text-muted-foreground", children: typingText || subtitle })
18243
+ ] })
18244
+ ]
18245
+ }
18246
+ ) }),
18247
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: "flex items-center gap-1 shrink-0", children: [
18248
+ /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(HeaderActions, { onDelete: onBack }),
18218
18249
  onBack && /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
18219
18250
  "button",
18220
18251
  {
18221
18252
  type: "button",
18222
18253
  onClick: onBack,
18223
- className: "flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground md:hidden",
18254
+ className: "flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-border bg-muted/60 text-foreground transition-colors hover:bg-muted md:hidden ml-1",
18224
18255
  title: "Close",
18225
18256
  "aria-label": "Close chat",
18226
18257
  children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(import_lucide_react95.X, { className: "h-4.5 w-4.5" })
18227
18258
  }
18228
- ),
18229
- /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
18230
- "div",
18231
- {
18232
- onClick: onShowProfile,
18233
- className: "flex cursor-pointer items-center gap-2.5 sm:gap-3 transition-opacity select-none hover:opacity-85 min-w-0",
18234
- title: "Click to view info",
18235
- children: [
18236
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: "relative shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(Avatar, { className: "h-9 w-9 sm:h-10 sm:w-10 rounded-xl border border-border/60", children: [
18237
- chatAvatar ? /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(AvatarImage, { src: chatAvatar, alt: chatName }) : null,
18238
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(AvatarFallback, { className: "rounded-xl bg-primary/10 font-bold text-primary", children: chatName?.charAt(0)?.toUpperCase() })
18239
- ] }) }),
18240
- /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
18241
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("span", { className: "block truncate text-sm leading-tight font-bold text-foreground", children: chatName }),
18242
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("span", { className: "truncate text-xs leading-tight text-muted-foreground", children: typingText || subtitle })
18243
- ] })
18244
- ]
18245
- }
18246
18259
  )
18247
- ] }),
18248
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)("div", { className: "flex items-center gap-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(HeaderActions, { onDelete: onBack }) })
18260
+ ] })
18249
18261
  ] });
18250
18262
  }
18251
18263
 
@@ -24022,26 +24034,26 @@ function MsgContactTab({ contacts, onRefresh, onSelectContact, onClose }) {
24022
24034
  }
24023
24035
  };
24024
24036
  return /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(Card, { className: "w-full max-w-3xl mx-auto border-border/80 bg-card/60 backdrop-blur-md shadow-md rounded-2xl", children: [
24025
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
24037
+ /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
24038
+ /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("div", { className: "space-y-1 min-w-0", children: [
24039
+ /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24040
+ /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_lucide_react122.Users, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24041
+ /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("span", { className: "truncate", children: "Contact Manager" })
24042
+ ] }),
24043
+ /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(CardDescription, { className: "truncate", children: "Manage your saved contacts and start direct chat conversations." })
24044
+ ] }) }),
24026
24045
  onClose && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
24027
24046
  Button,
24028
24047
  {
24029
24048
  size: "icon",
24030
24049
  variant: "ghost",
24031
24050
  onClick: onClose,
24032
- className: "h-8 w-8 rounded-full md:hidden hover:bg-muted text-muted-foreground hover:text-foreground shrink-0 cursor-pointer",
24051
+ className: "h-8 w-8 rounded-lg md:hidden border border-border bg-muted/60 text-foreground hover:bg-muted shrink-0 cursor-pointer",
24033
24052
  title: "Close view",
24034
24053
  children: /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_lucide_react122.X, { className: "h-4 w-4" })
24035
24054
  }
24036
- ),
24037
- /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("div", { className: "space-y-1 min-w-0", children: [
24038
- /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24039
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_lucide_react122.Users, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24040
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("span", { className: "truncate", children: "Contact Manager" })
24041
- ] }),
24042
- /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(CardDescription, { className: "truncate", children: "Manage your saved contacts and start direct chat conversations." })
24043
- ] })
24044
- ] }) }),
24055
+ )
24056
+ ] }),
24045
24057
  /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(CardContent, { className: "space-y-4", children: contacts.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)("div", { className: "text-center py-12 border-2 border-dashed border-muted rounded-xl bg-muted/10", children: [
24046
24058
  /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("p", { className: "text-muted-foreground mb-4 text-sm", children: "No contacts added yet." }),
24047
24059
  /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
@@ -24483,26 +24495,26 @@ function MsgGroupTab({ groups, contacts, onRefresh, onSelectGroup, onClose }) {
24483
24495
  }
24484
24496
  };
24485
24497
  return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(Card, { className: "w-full max-w-3xl mx-auto border-border/80 bg-card/60 backdrop-blur-md shadow-md rounded-2xl", children: [
24486
- /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
24498
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
24499
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { className: "space-y-1 min-w-0", children: [
24500
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24501
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_lucide_react123.Users2, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24502
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("span", { className: "truncate", children: "Groups Manager" })
24503
+ ] }),
24504
+ /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(CardDescription, { className: "truncate", children: "Manage your group channels and start team conversations." })
24505
+ ] }) }),
24487
24506
  onClose && /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
24488
24507
  Button,
24489
24508
  {
24490
24509
  size: "icon",
24491
24510
  variant: "ghost",
24492
24511
  onClick: onClose,
24493
- className: "h-8 w-8 rounded-full md:hidden hover:bg-muted text-muted-foreground hover:text-foreground shrink-0 cursor-pointer",
24512
+ className: "h-8 w-8 rounded-lg md:hidden border border-border bg-muted/60 text-foreground hover:bg-muted shrink-0 cursor-pointer",
24494
24513
  title: "Close view",
24495
24514
  children: /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_lucide_react123.X, { className: "h-4 w-4" })
24496
24515
  }
24497
- ),
24498
- /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { className: "space-y-1 min-w-0", children: [
24499
- /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24500
- /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(import_lucide_react123.Users2, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24501
- /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("span", { className: "truncate", children: "Groups Manager" })
24502
- ] }),
24503
- /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(CardDescription, { className: "truncate", children: "Manage your group channels and start team conversations." })
24504
- ] })
24505
- ] }) }),
24516
+ )
24517
+ ] }),
24506
24518
  /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(CardContent, { className: "space-y-4", children: groups.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { className: "text-center py-12 border-2 border-dashed border-muted rounded-xl bg-muted/10", children: [
24507
24519
  /* @__PURE__ */ (0, import_jsx_runtime206.jsx)("p", { className: "text-muted-foreground mb-4 text-sm", children: "No groups created yet." }),
24508
24520
  /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
@@ -25866,27 +25878,31 @@ Instructions:
25866
25878
  initialSentRef.current = true;
25867
25879
  }, []);
25868
25880
  return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "fixed inset-0 z-50 flex h-full w-full flex-col bg-background overflow-hidden md:relative md:z-auto", children: [
25869
- /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "flex shrink-0 items-center gap-2.5 sm:gap-3 border-b border-border bg-background px-3 sm:px-4 py-2.5 select-none", children: [
25870
- onBack && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
25871
- "button",
25872
- {
25873
- type: "button",
25874
- onClick: onBack,
25875
- className: "flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground md:hidden",
25876
- title: "Close",
25877
- "aria-label": "Close",
25878
- children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_lucide_react132.X, { className: "h-4.5 w-4.5" })
25879
- }
25880
- ),
25881
- /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { className: "flex h-8.5 w-8.5 shrink-0 items-center justify-center rounded-xl border border-indigo-200/40 bg-gradient-to-br from-indigo-500/20 to-purple-500/20 text-indigo-600 dark:border-indigo-800/40 dark:text-indigo-400", children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_lucide_react132.Bot, { className: "h-4 w-4" }) }),
25882
- /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "min-w-0 flex-1", children: [
25883
- /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("p", { className: "flex items-center gap-1.5 truncate text-sm font-semibold text-foreground leading-tight", children: [
25884
- "AI Assistant",
25885
- /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_lucide_react132.Sparkles, { className: "h-3 w-3 text-indigo-400" })
25886
- ] }),
25887
- /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("p", { className: "truncate text-xs text-muted-foreground leading-tight", children: "Powered by AI \xB7 Ask anything" })
25881
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "flex shrink-0 items-center justify-between gap-2.5 sm:gap-3 border-b border-border bg-background px-3 sm:px-4 py-2.5 select-none", children: [
25882
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5 sm:gap-3 flex-1", children: [
25883
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { className: "flex h-8.5 w-8.5 shrink-0 items-center justify-center rounded-xl border border-indigo-200/40 bg-gradient-to-br from-indigo-500/20 to-purple-500/20 text-indigo-600 dark:border-indigo-800/40 dark:text-indigo-400", children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_lucide_react132.Bot, { className: "h-4 w-4" }) }),
25884
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "min-w-0 flex-1", children: [
25885
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("p", { className: "flex items-center gap-1.5 truncate text-sm font-semibold text-foreground leading-tight", children: [
25886
+ "AI Assistant",
25887
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_lucide_react132.Sparkles, { className: "h-3 w-3 text-indigo-400" })
25888
+ ] }),
25889
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("p", { className: "truncate text-xs text-muted-foreground leading-tight", children: "Powered by AI \xB7 Ask anything" })
25890
+ ] })
25888
25891
  ] }),
25889
- /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { className: "flex items-center gap-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(HeaderActions, { onDelete: onBack }) })
25892
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: "flex items-center gap-1 shrink-0", children: [
25893
+ /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(HeaderActions, { onDelete: onBack }),
25894
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
25895
+ "button",
25896
+ {
25897
+ type: "button",
25898
+ onClick: onBack,
25899
+ className: "flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-border bg-muted/60 text-foreground transition-colors hover:bg-muted md:hidden ml-1",
25900
+ title: "Close",
25901
+ "aria-label": "Close",
25902
+ children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(import_lucide_react132.X, { className: "h-4.5 w-4.5" })
25903
+ }
25904
+ )
25905
+ ] })
25890
25906
  ] }),
25891
25907
  /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
25892
25908
  MessageList,