@amogads/ui 1.1.1 → 1.1.3

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.mjs CHANGED
@@ -6098,18 +6098,30 @@ var init_sidebar_data2 = __esm({
6098
6098
 
6099
6099
  // src/design-system/templates/app-logo.tsx
6100
6100
  import { jsx as jsx103 } from "react/jsx-runtime";
6101
- function AppLogo({ className }) {
6102
- const { toggleSidebar } = useSidebar();
6101
+ function AppLogo({ className, onClick }) {
6102
+ const { toggleSidebar, setOpenMobile, isMobile } = useSidebar();
6103
6103
  const team = sidebarData2.teams[0];
6104
6104
  const Logo = team.logo;
6105
+ const handleClick = (e) => {
6106
+ e.stopPropagation();
6107
+ if (onClick) {
6108
+ onClick();
6109
+ return;
6110
+ }
6111
+ if (isMobile) {
6112
+ setOpenMobile(true);
6113
+ } else {
6114
+ toggleSidebar();
6115
+ }
6116
+ };
6105
6117
  return /* @__PURE__ */ jsx103(
6106
6118
  Button,
6107
6119
  {
6108
6120
  type: "button",
6109
6121
  variant: "ghost",
6110
- onClick: toggleSidebar,
6122
+ onClick: handleClick,
6111
6123
  className: cn(
6112
- "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9",
6124
+ "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9 cursor-pointer",
6113
6125
  className
6114
6126
  ),
6115
6127
  "aria-label": "Open sidebar menu",
@@ -18265,38 +18277,38 @@ function ChatHeader({
18265
18277
  onShowProfile
18266
18278
  }) {
18267
18279
  return /* @__PURE__ */ jsxs129("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: [
18268
- /* @__PURE__ */ jsxs129("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: [
18280
+ /* @__PURE__ */ jsx174("div", { className: "flex min-w-0 items-center gap-2 sm:gap-3", children: /* @__PURE__ */ jsxs129(
18281
+ "div",
18282
+ {
18283
+ onClick: onShowProfile,
18284
+ className: "flex cursor-pointer items-center gap-2.5 sm:gap-3 transition-opacity select-none hover:opacity-85 min-w-0",
18285
+ title: "Click to view info",
18286
+ children: [
18287
+ /* @__PURE__ */ jsx174("div", { className: "relative shrink-0", children: /* @__PURE__ */ jsxs129(Avatar, { className: "h-9 w-9 sm:h-10 sm:w-10 rounded-xl border border-border/60", children: [
18288
+ chatAvatar ? /* @__PURE__ */ jsx174(AvatarImage, { src: chatAvatar, alt: chatName }) : null,
18289
+ /* @__PURE__ */ jsx174(AvatarFallback, { className: "rounded-xl bg-primary/10 font-bold text-primary", children: chatName?.charAt(0)?.toUpperCase() })
18290
+ ] }) }),
18291
+ /* @__PURE__ */ jsxs129("div", { className: "flex min-w-0 flex-col", children: [
18292
+ /* @__PURE__ */ jsx174("span", { className: "block truncate text-sm leading-tight font-bold text-foreground", children: chatName }),
18293
+ /* @__PURE__ */ jsx174("span", { className: "truncate text-xs leading-tight text-muted-foreground", children: typingText || subtitle })
18294
+ ] })
18295
+ ]
18296
+ }
18297
+ ) }),
18298
+ /* @__PURE__ */ jsxs129("div", { className: "flex items-center gap-1 shrink-0", children: [
18299
+ /* @__PURE__ */ jsx174(HeaderActions, { onDelete: onBack }),
18269
18300
  onBack && /* @__PURE__ */ jsx174(
18270
18301
  "button",
18271
18302
  {
18272
18303
  type: "button",
18273
18304
  onClick: onBack,
18274
- 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",
18305
+ 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",
18275
18306
  title: "Close",
18276
18307
  "aria-label": "Close chat",
18277
18308
  children: /* @__PURE__ */ jsx174(X16, { className: "h-4.5 w-4.5" })
18278
18309
  }
18279
- ),
18280
- /* @__PURE__ */ jsxs129(
18281
- "div",
18282
- {
18283
- onClick: onShowProfile,
18284
- className: "flex cursor-pointer items-center gap-2.5 sm:gap-3 transition-opacity select-none hover:opacity-85 min-w-0",
18285
- title: "Click to view info",
18286
- children: [
18287
- /* @__PURE__ */ jsx174("div", { className: "relative shrink-0", children: /* @__PURE__ */ jsxs129(Avatar, { className: "h-9 w-9 sm:h-10 sm:w-10 rounded-xl border border-border/60", children: [
18288
- chatAvatar ? /* @__PURE__ */ jsx174(AvatarImage, { src: chatAvatar, alt: chatName }) : null,
18289
- /* @__PURE__ */ jsx174(AvatarFallback, { className: "rounded-xl bg-primary/10 font-bold text-primary", children: chatName?.charAt(0)?.toUpperCase() })
18290
- ] }) }),
18291
- /* @__PURE__ */ jsxs129("div", { className: "flex min-w-0 flex-col", children: [
18292
- /* @__PURE__ */ jsx174("span", { className: "block truncate text-sm leading-tight font-bold text-foreground", children: chatName }),
18293
- /* @__PURE__ */ jsx174("span", { className: "truncate text-xs leading-tight text-muted-foreground", children: typingText || subtitle })
18294
- ] })
18295
- ]
18296
- }
18297
18310
  )
18298
- ] }),
18299
- /* @__PURE__ */ jsx174("div", { className: "flex items-center gap-1 shrink-0", children: /* @__PURE__ */ jsx174(HeaderActions, { onDelete: onBack }) })
18311
+ ] })
18300
18312
  ] });
18301
18313
  }
18302
18314
 
@@ -24203,26 +24215,26 @@ function MsgContactTab({ contacts, onRefresh, onSelectContact, onClose }) {
24203
24215
  }
24204
24216
  };
24205
24217
  return /* @__PURE__ */ jsxs159(Card, { className: "w-full max-w-3xl mx-auto border-border/80 bg-card/60 backdrop-blur-md shadow-md rounded-2xl", children: [
24206
- /* @__PURE__ */ jsx204(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: /* @__PURE__ */ jsxs159("div", { className: "flex items-center gap-3 min-w-0", children: [
24218
+ /* @__PURE__ */ jsxs159(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
24219
+ /* @__PURE__ */ jsx204("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxs159("div", { className: "space-y-1 min-w-0", children: [
24220
+ /* @__PURE__ */ jsxs159(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24221
+ /* @__PURE__ */ jsx204(Users5, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24222
+ /* @__PURE__ */ jsx204("span", { className: "truncate", children: "Contact Manager" })
24223
+ ] }),
24224
+ /* @__PURE__ */ jsx204(CardDescription, { className: "truncate", children: "Manage your saved contacts and start direct chat conversations." })
24225
+ ] }) }),
24207
24226
  onClose && /* @__PURE__ */ jsx204(
24208
24227
  Button,
24209
24228
  {
24210
24229
  size: "icon",
24211
24230
  variant: "ghost",
24212
24231
  onClick: onClose,
24213
- className: "h-8 w-8 rounded-full md:hidden hover:bg-muted text-muted-foreground hover:text-foreground shrink-0 cursor-pointer",
24232
+ className: "h-8 w-8 rounded-lg md:hidden border border-border bg-muted/60 text-foreground hover:bg-muted shrink-0 cursor-pointer",
24214
24233
  title: "Close view",
24215
24234
  children: /* @__PURE__ */ jsx204(X26, { className: "h-4 w-4" })
24216
24235
  }
24217
- ),
24218
- /* @__PURE__ */ jsxs159("div", { className: "space-y-1 min-w-0", children: [
24219
- /* @__PURE__ */ jsxs159(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24220
- /* @__PURE__ */ jsx204(Users5, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24221
- /* @__PURE__ */ jsx204("span", { className: "truncate", children: "Contact Manager" })
24222
- ] }),
24223
- /* @__PURE__ */ jsx204(CardDescription, { className: "truncate", children: "Manage your saved contacts and start direct chat conversations." })
24224
- ] })
24225
- ] }) }),
24236
+ )
24237
+ ] }),
24226
24238
  /* @__PURE__ */ jsx204(CardContent, { className: "space-y-4", children: contacts.length === 0 ? /* @__PURE__ */ jsxs159("div", { className: "text-center py-12 border-2 border-dashed border-muted rounded-xl bg-muted/10", children: [
24227
24239
  /* @__PURE__ */ jsx204("p", { className: "text-muted-foreground mb-4 text-sm", children: "No contacts added yet." }),
24228
24240
  /* @__PURE__ */ jsxs159(
@@ -24675,26 +24687,26 @@ function MsgGroupTab({ groups, contacts, onRefresh, onSelectGroup, onClose }) {
24675
24687
  }
24676
24688
  };
24677
24689
  return /* @__PURE__ */ jsxs160(Card, { className: "w-full max-w-3xl mx-auto border-border/80 bg-card/60 backdrop-blur-md shadow-md rounded-2xl", children: [
24678
- /* @__PURE__ */ jsx205(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: /* @__PURE__ */ jsxs160("div", { className: "flex items-center gap-3 min-w-0", children: [
24690
+ /* @__PURE__ */ jsxs160(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
24691
+ /* @__PURE__ */ jsx205("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxs160("div", { className: "space-y-1 min-w-0", children: [
24692
+ /* @__PURE__ */ jsxs160(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24693
+ /* @__PURE__ */ jsx205(Users22, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24694
+ /* @__PURE__ */ jsx205("span", { className: "truncate", children: "Groups Manager" })
24695
+ ] }),
24696
+ /* @__PURE__ */ jsx205(CardDescription, { className: "truncate", children: "Manage your group channels and start team conversations." })
24697
+ ] }) }),
24679
24698
  onClose && /* @__PURE__ */ jsx205(
24680
24699
  Button,
24681
24700
  {
24682
24701
  size: "icon",
24683
24702
  variant: "ghost",
24684
24703
  onClick: onClose,
24685
- className: "h-8 w-8 rounded-full md:hidden hover:bg-muted text-muted-foreground hover:text-foreground shrink-0 cursor-pointer",
24704
+ className: "h-8 w-8 rounded-lg md:hidden border border-border bg-muted/60 text-foreground hover:bg-muted shrink-0 cursor-pointer",
24686
24705
  title: "Close view",
24687
24706
  children: /* @__PURE__ */ jsx205(X27, { className: "h-4 w-4" })
24688
24707
  }
24689
- ),
24690
- /* @__PURE__ */ jsxs160("div", { className: "space-y-1 min-w-0", children: [
24691
- /* @__PURE__ */ jsxs160(CardTitle, { className: "text-xl flex items-center gap-2", children: [
24692
- /* @__PURE__ */ jsx205(Users22, { className: "h-5 w-5 text-indigo-500 shrink-0" }),
24693
- /* @__PURE__ */ jsx205("span", { className: "truncate", children: "Groups Manager" })
24694
- ] }),
24695
- /* @__PURE__ */ jsx205(CardDescription, { className: "truncate", children: "Manage your group channels and start team conversations." })
24696
- ] })
24697
- ] }) }),
24708
+ )
24709
+ ] }),
24698
24710
  /* @__PURE__ */ jsx205(CardContent, { className: "space-y-4", children: groups.length === 0 ? /* @__PURE__ */ jsxs160("div", { className: "text-center py-12 border-2 border-dashed border-muted rounded-xl bg-muted/10", children: [
24699
24711
  /* @__PURE__ */ jsx205("p", { className: "text-muted-foreground mb-4 text-sm", children: "No groups created yet." }),
24700
24712
  /* @__PURE__ */ jsxs160(
@@ -26058,27 +26070,31 @@ Instructions:
26058
26070
  initialSentRef.current = true;
26059
26071
  }, []);
26060
26072
  return /* @__PURE__ */ jsxs169("div", { className: "fixed inset-0 z-50 flex h-full w-full flex-col bg-background overflow-hidden md:relative md:z-auto", children: [
26061
- /* @__PURE__ */ jsxs169("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: [
26062
- onBack && /* @__PURE__ */ jsx214(
26063
- "button",
26064
- {
26065
- type: "button",
26066
- onClick: onBack,
26067
- 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",
26068
- title: "Close",
26069
- "aria-label": "Close",
26070
- children: /* @__PURE__ */ jsx214(X29, { className: "h-4.5 w-4.5" })
26071
- }
26072
- ),
26073
- /* @__PURE__ */ jsx214("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__ */ jsx214(Bot10, { className: "h-4 w-4" }) }),
26074
- /* @__PURE__ */ jsxs169("div", { className: "min-w-0 flex-1", children: [
26075
- /* @__PURE__ */ jsxs169("p", { className: "flex items-center gap-1.5 truncate text-sm font-semibold text-foreground leading-tight", children: [
26076
- "AI Assistant",
26077
- /* @__PURE__ */ jsx214(Sparkles15, { className: "h-3 w-3 text-indigo-400" })
26078
- ] }),
26079
- /* @__PURE__ */ jsx214("p", { className: "truncate text-xs text-muted-foreground leading-tight", children: "Powered by AI \xB7 Ask anything" })
26073
+ /* @__PURE__ */ jsxs169("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: [
26074
+ /* @__PURE__ */ jsxs169("div", { className: "flex min-w-0 items-center gap-2.5 sm:gap-3 flex-1", children: [
26075
+ /* @__PURE__ */ jsx214("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__ */ jsx214(Bot10, { className: "h-4 w-4" }) }),
26076
+ /* @__PURE__ */ jsxs169("div", { className: "min-w-0 flex-1", children: [
26077
+ /* @__PURE__ */ jsxs169("p", { className: "flex items-center gap-1.5 truncate text-sm font-semibold text-foreground leading-tight", children: [
26078
+ "AI Assistant",
26079
+ /* @__PURE__ */ jsx214(Sparkles15, { className: "h-3 w-3 text-indigo-400" })
26080
+ ] }),
26081
+ /* @__PURE__ */ jsx214("p", { className: "truncate text-xs text-muted-foreground leading-tight", children: "Powered by AI \xB7 Ask anything" })
26082
+ ] })
26080
26083
  ] }),
26081
- /* @__PURE__ */ jsx214("div", { className: "flex items-center gap-1 shrink-0", children: /* @__PURE__ */ jsx214(HeaderActions, { onDelete: onBack }) })
26084
+ /* @__PURE__ */ jsxs169("div", { className: "flex items-center gap-1 shrink-0", children: [
26085
+ /* @__PURE__ */ jsx214(HeaderActions, { onDelete: onBack }),
26086
+ onBack && /* @__PURE__ */ jsx214(
26087
+ "button",
26088
+ {
26089
+ type: "button",
26090
+ onClick: onBack,
26091
+ 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",
26092
+ title: "Close",
26093
+ "aria-label": "Close",
26094
+ children: /* @__PURE__ */ jsx214(X29, { className: "h-4.5 w-4.5" })
26095
+ }
26096
+ )
26097
+ ] })
26082
26098
  ] }),
26083
26099
  /* @__PURE__ */ jsx214("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx214(
26084
26100
  MessageList,