@designa8/vibedesign-perplexity-internal-v1-2-176b 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-perplexity-internal-v1-2-176b
2
2
 
3
- Complete design system generated by Atoms Design, version **0.1.0**.
3
+ Complete design system generated by Atoms Design, version **0.1.1**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -7036,6 +7036,8 @@ var SidebarDesktop = React70.forwardRef(
7036
7036
  onUserClick,
7037
7037
  onNotifications,
7038
7038
  onSettings,
7039
+ notificationCount,
7040
+ footerActions,
7039
7041
  folded: foldedProp,
7040
7042
  defaultFolded = false,
7041
7043
  onFoldedChange,
@@ -7055,6 +7057,9 @@ var SidebarDesktop = React70.forwardRef(
7055
7057
  () => Object.fromEntries(items.filter((i) => i.children?.length).map((i) => [i.id, i.defaultOpen ?? true]))
7056
7058
  );
7057
7059
  const navId = React70.useId();
7060
+ const unread = typeof notificationCount === "number" && Number.isFinite(notificationCount) && notificationCount > 0 ? Math.floor(notificationCount) : 0;
7061
+ const unreadLabel = unread > 9 ? "9+" : String(unread);
7062
+ const notificationsLabel = unread > 0 ? `Notifications (${unread} unread)` : "Notifications";
7058
7063
  const foldIcon = side === "left" ? folded ? "panel-right" : "panel-left" : folded ? "panel-left" : "panel-right";
7059
7064
  const renderRow = (item, depth = 0) => {
7060
7065
  const isGroup = Boolean(item.children?.length);
@@ -7250,7 +7255,19 @@ var SidebarDesktop = React70.forwardRef(
7250
7255
  ]
7251
7256
  }
7252
7257
  ),
7253
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IconButton, { icon: "bell", label: "Notifications", variant: "ghost", size: "sm", onClick: onNotifications }),
7258
+ footerActions ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: cn60("flex shrink-0 items-center gap-xs", folded && "flex-col"), children: footerActions }) : null,
7259
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: cn60("relative inline-flex shrink-0", unread > 0 && "mr-xxs"), children: [
7260
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IconButton, { icon: "bell", label: notificationsLabel, variant: "ghost", size: "sm", onClick: onNotifications }),
7261
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
7262
+ "span",
7263
+ {
7264
+ "aria-hidden": "true",
7265
+ "data-state": unread > 0 ? "open" : "closed",
7266
+ className: "pointer-events-none absolute -right-xxs -top-xxs inline-flex origin-top-right transition duration-150 ease-out data-[state=open]:scale-100 data-[state=open]:opacity-100 data-[state=closed]:scale-75 data-[state=closed]:opacity-0",
7267
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Badge, { variant: "accent", size: "sm", pill: true, className: "justify-center px-xs tabular-nums", children: unreadLabel })
7268
+ }
7269
+ )
7270
+ ] }),
7254
7271
  /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IconButton, { icon: "settings", label: "Settings", variant: "ghost", size: "sm", onClick: onSettings })
7255
7272
  ]
7256
7273
  }
@@ -7289,6 +7306,8 @@ var SidebarMobile = React71.forwardRef(
7289
7306
  brandHref = "#",
7290
7307
  side = "left",
7291
7308
  items,
7309
+ notificationCount,
7310
+ footerActions,
7292
7311
  className,
7293
7312
  children,
7294
7313
  ...sidebarProps
@@ -7353,7 +7372,17 @@ var SidebarMobile = React71.forwardRef(
7353
7372
  closeLabel: "Close navigation",
7354
7373
  bodyClassName: "flex flex-col pb-0",
7355
7374
  className: "bg-surface-soft",
7356
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SidebarDesktop, { ...sidebarProps, items: wrapped, side, embedded: true })
7375
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
7376
+ SidebarDesktop,
7377
+ {
7378
+ ...sidebarProps,
7379
+ items: wrapped,
7380
+ side,
7381
+ notificationCount,
7382
+ footerActions,
7383
+ embedded: true
7384
+ }
7385
+ )
7357
7386
  }
7358
7387
  )
7359
7388
  ]
@@ -7370,6 +7399,8 @@ var Sidebar = React72.forwardRef(
7370
7399
  folded,
7371
7400
  defaultFolded,
7372
7401
  onFoldedChange,
7402
+ notificationCount,
7403
+ footerActions,
7373
7404
  mobileOpen,
7374
7405
  onMobileOpenChange,
7375
7406
  mobileActions,
@@ -7378,11 +7409,24 @@ var Sidebar = React72.forwardRef(
7378
7409
  children,
7379
7410
  ...shared
7380
7411
  }, ref) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { ref, className: ["h-full w-full", className].filter(Boolean).join(" "), children: [
7381
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "hidden h-full md:block", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SidebarDesktop, { ...shared, folded, defaultFolded, onFoldedChange, children }) }),
7412
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "hidden h-full md:block", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
7413
+ SidebarDesktop,
7414
+ {
7415
+ ...shared,
7416
+ notificationCount,
7417
+ footerActions,
7418
+ folded,
7419
+ defaultFolded,
7420
+ onFoldedChange,
7421
+ children
7422
+ }
7423
+ ) }),
7382
7424
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "h-full md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
7383
7425
  SidebarMobile,
7384
7426
  {
7385
7427
  ...shared,
7428
+ notificationCount,
7429
+ footerActions,
7386
7430
  open: mobileOpen,
7387
7431
  onOpenChange: onMobileOpenChange,
7388
7432
  actions: mobileActions,
package/dist/index.js CHANGED
@@ -6914,6 +6914,8 @@ var SidebarDesktop = React70.forwardRef(
6914
6914
  onUserClick,
6915
6915
  onNotifications,
6916
6916
  onSettings,
6917
+ notificationCount,
6918
+ footerActions,
6917
6919
  folded: foldedProp,
6918
6920
  defaultFolded = false,
6919
6921
  onFoldedChange,
@@ -6933,6 +6935,9 @@ var SidebarDesktop = React70.forwardRef(
6933
6935
  () => Object.fromEntries(items.filter((i) => i.children?.length).map((i) => [i.id, i.defaultOpen ?? true]))
6934
6936
  );
6935
6937
  const navId = React70.useId();
6938
+ const unread = typeof notificationCount === "number" && Number.isFinite(notificationCount) && notificationCount > 0 ? Math.floor(notificationCount) : 0;
6939
+ const unreadLabel = unread > 9 ? "9+" : String(unread);
6940
+ const notificationsLabel = unread > 0 ? `Notifications (${unread} unread)` : "Notifications";
6936
6941
  const foldIcon = side === "left" ? folded ? "panel-right" : "panel-left" : folded ? "panel-left" : "panel-right";
6937
6942
  const renderRow = (item, depth = 0) => {
6938
6943
  const isGroup = Boolean(item.children?.length);
@@ -7128,7 +7133,19 @@ var SidebarDesktop = React70.forwardRef(
7128
7133
  ]
7129
7134
  }
7130
7135
  ),
7131
- /* @__PURE__ */ jsx70(IconButton, { icon: "bell", label: "Notifications", variant: "ghost", size: "sm", onClick: onNotifications }),
7136
+ footerActions ? /* @__PURE__ */ jsx70("div", { className: cn60("flex shrink-0 items-center gap-xs", folded && "flex-col"), children: footerActions }) : null,
7137
+ /* @__PURE__ */ jsxs64("span", { className: cn60("relative inline-flex shrink-0", unread > 0 && "mr-xxs"), children: [
7138
+ /* @__PURE__ */ jsx70(IconButton, { icon: "bell", label: notificationsLabel, variant: "ghost", size: "sm", onClick: onNotifications }),
7139
+ /* @__PURE__ */ jsx70(
7140
+ "span",
7141
+ {
7142
+ "aria-hidden": "true",
7143
+ "data-state": unread > 0 ? "open" : "closed",
7144
+ className: "pointer-events-none absolute -right-xxs -top-xxs inline-flex origin-top-right transition duration-150 ease-out data-[state=open]:scale-100 data-[state=open]:opacity-100 data-[state=closed]:scale-75 data-[state=closed]:opacity-0",
7145
+ children: /* @__PURE__ */ jsx70(Badge, { variant: "accent", size: "sm", pill: true, className: "justify-center px-xs tabular-nums", children: unreadLabel })
7146
+ }
7147
+ )
7148
+ ] }),
7132
7149
  /* @__PURE__ */ jsx70(IconButton, { icon: "settings", label: "Settings", variant: "ghost", size: "sm", onClick: onSettings })
7133
7150
  ]
7134
7151
  }
@@ -7167,6 +7184,8 @@ var SidebarMobile = React71.forwardRef(
7167
7184
  brandHref = "#",
7168
7185
  side = "left",
7169
7186
  items,
7187
+ notificationCount,
7188
+ footerActions,
7170
7189
  className,
7171
7190
  children,
7172
7191
  ...sidebarProps
@@ -7231,7 +7250,17 @@ var SidebarMobile = React71.forwardRef(
7231
7250
  closeLabel: "Close navigation",
7232
7251
  bodyClassName: "flex flex-col pb-0",
7233
7252
  className: "bg-surface-soft",
7234
- children: /* @__PURE__ */ jsx71(SidebarDesktop, { ...sidebarProps, items: wrapped, side, embedded: true })
7253
+ children: /* @__PURE__ */ jsx71(
7254
+ SidebarDesktop,
7255
+ {
7256
+ ...sidebarProps,
7257
+ items: wrapped,
7258
+ side,
7259
+ notificationCount,
7260
+ footerActions,
7261
+ embedded: true
7262
+ }
7263
+ )
7235
7264
  }
7236
7265
  )
7237
7266
  ]
@@ -7248,6 +7277,8 @@ var Sidebar = React72.forwardRef(
7248
7277
  folded,
7249
7278
  defaultFolded,
7250
7279
  onFoldedChange,
7280
+ notificationCount,
7281
+ footerActions,
7251
7282
  mobileOpen,
7252
7283
  onMobileOpenChange,
7253
7284
  mobileActions,
@@ -7256,11 +7287,24 @@ var Sidebar = React72.forwardRef(
7256
7287
  children,
7257
7288
  ...shared
7258
7289
  }, ref) => /* @__PURE__ */ jsxs66("div", { ref, className: ["h-full w-full", className].filter(Boolean).join(" "), children: [
7259
- /* @__PURE__ */ jsx72("div", { className: "hidden h-full md:block", children: /* @__PURE__ */ jsx72(SidebarDesktop, { ...shared, folded, defaultFolded, onFoldedChange, children }) }),
7290
+ /* @__PURE__ */ jsx72("div", { className: "hidden h-full md:block", children: /* @__PURE__ */ jsx72(
7291
+ SidebarDesktop,
7292
+ {
7293
+ ...shared,
7294
+ notificationCount,
7295
+ footerActions,
7296
+ folded,
7297
+ defaultFolded,
7298
+ onFoldedChange,
7299
+ children
7300
+ }
7301
+ ) }),
7260
7302
  /* @__PURE__ */ jsx72("div", { className: "h-full md:hidden", children: /* @__PURE__ */ jsx72(
7261
7303
  SidebarMobile,
7262
7304
  {
7263
7305
  ...shared,
7306
+ notificationCount,
7307
+ footerActions,
7264
7308
  open: mobileOpen,
7265
7309
  onOpenChange: onMobileOpenChange,
7266
7310
  actions: mobileActions,
package/dist/styles.css CHANGED
@@ -335,6 +335,9 @@
335
335
  .-top-xs {
336
336
  top: calc(var(--spacing-xs) * -1);
337
337
  }
338
+ .-top-xxs {
339
+ top: calc(var(--spacing-xxs) * -1);
340
+ }
338
341
  .top-0 {
339
342
  top: 0;
340
343
  }
@@ -347,6 +350,9 @@
347
350
  .-right-xs {
348
351
  right: calc(var(--spacing-xs) * -1);
349
352
  }
353
+ .-right-xxs {
354
+ right: calc(var(--spacing-xxs) * -1);
355
+ }
350
356
  .right-0 {
351
357
  right: 0;
352
358
  }
@@ -446,6 +452,9 @@
446
452
  .-mr-xs {
447
453
  margin-right: calc(var(--spacing-xs) * -1);
448
454
  }
455
+ .mr-xxs {
456
+ margin-right: var(--spacing-xxs);
457
+ }
449
458
  .mb-xs {
450
459
  margin-bottom: var(--spacing-xs);
451
460
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-perplexity-internal-v1-2-176b",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Complete design system \"My Project perplexity-internal-v1\" generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -17,6 +17,8 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
17
17
  folded,
18
18
  defaultFolded,
19
19
  onFoldedChange,
20
+ notificationCount,
21
+ footerActions,
20
22
  mobileOpen,
21
23
  onMobileOpenChange,
22
24
  mobileActions,
@@ -29,13 +31,22 @@ export const Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>(
29
31
  ) => (
30
32
  <div ref={ref} className={["h-full w-full", className].filter(Boolean).join(" ")}>
31
33
  <div className="hidden h-full md:block">
32
- <SidebarDesktop {...shared} folded={folded} defaultFolded={defaultFolded} onFoldedChange={onFoldedChange}>
34
+ <SidebarDesktop
35
+ {...shared}
36
+ notificationCount={notificationCount}
37
+ footerActions={footerActions}
38
+ folded={folded}
39
+ defaultFolded={defaultFolded}
40
+ onFoldedChange={onFoldedChange}
41
+ >
33
42
  {children}
34
43
  </SidebarDesktop>
35
44
  </div>
36
45
  <div className="h-full md:hidden">
37
46
  <SidebarMobile
38
47
  {...shared}
48
+ notificationCount={notificationCount}
49
+ footerActions={footerActions}
39
50
  open={mobileOpen}
40
51
  onOpenChange={onMobileOpenChange}
41
52
  actions={mobileActions}
@@ -50,6 +50,10 @@ export interface SidebarDesktopProps extends Omit<React.HTMLAttributes<HTMLDivEl
50
50
  onUserClick?: () => void;
51
51
  onNotifications?: () => void;
52
52
  onSettings?: () => void;
53
+ /** Unread count on the bell; hidden when 0 or undefined, capped at 9+. */
54
+ notificationCount?: number;
55
+ /** Extra icon-sized controls in the user row, between the account link and the bell. */
56
+ footerActions?: React.ReactNode;
53
57
  /** Controlled fold state. */
54
58
  folded?: boolean;
55
59
  defaultFolded?: boolean;
@@ -85,6 +89,8 @@ export const SidebarDesktop = React.forwardRef<HTMLDivElement, SidebarDesktopPro
85
89
  onUserClick,
86
90
  onNotifications,
87
91
  onSettings,
92
+ notificationCount,
93
+ footerActions,
88
94
  folded: foldedProp,
89
95
  defaultFolded = false,
90
96
  onFoldedChange,
@@ -107,6 +113,12 @@ export const SidebarDesktop = React.forwardRef<HTMLDivElement, SidebarDesktopPro
107
113
  );
108
114
  const navId = React.useId();
109
115
 
116
+ const unread = typeof notificationCount === "number" && Number.isFinite(notificationCount) && notificationCount > 0
117
+ ? Math.floor(notificationCount)
118
+ : 0;
119
+ const unreadLabel = unread > 9 ? "9+" : String(unread);
120
+ const notificationsLabel = unread > 0 ? `Notifications (${unread} unread)` : "Notifications";
121
+
110
122
  const foldIcon: IconName =
111
123
  side === "left" ? (folded ? "panel-right" : "panel-left") : folded ? "panel-left" : "panel-right";
112
124
 
@@ -337,7 +349,21 @@ export const SidebarDesktop = React.forwardRef<HTMLDivElement, SidebarDesktopPro
337
349
  </>
338
350
  ) : null}
339
351
  </a>
340
- <IconButton icon="bell" label="Notifications" variant="ghost" size="sm" onClick={onNotifications} />
352
+ {footerActions ? (
353
+ <div className={cn("flex shrink-0 items-center gap-xs", folded && "flex-col")}>{footerActions}</div>
354
+ ) : null}
355
+ <span className={cn("relative inline-flex shrink-0", unread > 0 && "mr-xxs")}>
356
+ <IconButton icon="bell" label={notificationsLabel} variant="ghost" size="sm" onClick={onNotifications} />
357
+ <span
358
+ aria-hidden="true"
359
+ data-state={unread > 0 ? "open" : "closed"}
360
+ className="pointer-events-none absolute -right-xxs -top-xxs inline-flex origin-top-right transition duration-150 ease-out data-[state=open]:scale-100 data-[state=open]:opacity-100 data-[state=closed]:scale-75 data-[state=closed]:opacity-0"
361
+ >
362
+ <Badge variant="accent" size="sm" pill className="justify-center px-xs tabular-nums">
363
+ {unreadLabel}
364
+ </Badge>
365
+ </span>
366
+ </span>
341
367
  <IconButton icon="settings" label="Settings" variant="ghost" size="sm" onClick={onSettings} />
342
368
  </div>
343
369
  ) : null}
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { IconButton } from "../IconButton";
2
3
  import { SidebarDesktop, type SidebarNavItem } from "./SidebarDesktop";
3
4
 
4
5
  const build = (active: string, go: (id: string) => void): SidebarNavItem[] => {
@@ -25,29 +26,68 @@ const build = (active: string, go: (id: string) => void): SidebarNavItem[] => {
25
26
  ];
26
27
  };
27
28
 
29
+ const workspaces = [
30
+ { value: "personal", label: "Personal", icon: "user" as const },
31
+ { value: "team", label: "Team workspace", icon: "layers" as const },
32
+ ];
33
+
34
+ const promo = {
35
+ title: "Upgrade to Enterprise",
36
+ description: "Get more usage, security, and team features.",
37
+ href: "#upgrade",
38
+ };
39
+
40
+ /** Frame height from the spacing scale so no raw px lands in the preview. */
41
+ const frameHeight = { height: "calc(var(--spacing-section) * 10)" } as React.CSSProperties;
42
+
28
43
  export default function SidebarDesktopPreview() {
29
44
  const [folded, setFolded] = React.useState(false);
30
45
  const [active, setActive] = React.useState("discover");
31
46
  const [workspace, setWorkspace] = React.useState("personal");
47
+ const [dark, setDark] = React.useState(false);
48
+ const [unread, setUnread] = React.useState(12);
49
+
50
+ const themeToggle = (
51
+ <IconButton
52
+ icon={dark ? "sun" : "moon"}
53
+ label={dark ? "Switch to light theme" : "Switch to dark theme"}
54
+ variant="ghost"
55
+ size="sm"
56
+ onClick={() => setDark((d) => !d)}
57
+ />
58
+ );
32
59
 
33
60
  return (
34
- <div className="w-full">
35
- <div className="h-[680px] w-full border-y border-hairline bg-canvas">
61
+ <div className="w-full max-w-3xl mx-auto p-lg space-y-lg">
62
+ <div className="flex flex-wrap items-center gap-sm">
63
+ <IconButton
64
+ icon="bell"
65
+ label={unread > 0 ? `Simulate ${unread} unread` : "Simulate unread notifications"}
66
+ variant="secondary"
67
+ size="sm"
68
+ onClick={() => setUnread((n) => (n === 0 ? 4 : n === 4 ? 12 : 0))}
69
+ />
70
+ <span className="text-body-sm text-muted">
71
+ Unread: {unread === 0 ? "none — badge hidden" : unread > 9 ? "capped at 9+" : unread}
72
+ </span>
73
+ </div>
74
+
75
+ <div className="w-full border-y border-hairline bg-canvas" style={frameHeight}>
36
76
  <SidebarDesktop
37
77
  items={build(active, setActive)}
38
78
  folded={folded}
39
79
  onFoldedChange={setFolded}
40
- workspaces={[
41
- { value: "personal", label: "Personal", icon: "user" },
42
- { value: "team", label: "Team workspace", icon: "layers" },
43
- ]}
80
+ workspaces={workspaces}
44
81
  workspace={workspace}
45
82
  onWorkspaceChange={setWorkspace}
46
- promo={{ title: "Upgrade to Enterprise", description: "Get more usage, security, and team features.", href: "#upgrade" }}
83
+ promo={promo}
47
84
  user={{ name: "alexsmith2026", badge: "Pro" }}
85
+ notificationCount={unread}
86
+ footerActions={themeToggle}
48
87
  >
49
88
  <div className="p-lg text-body-sm text-muted">
50
- Viewing {active}. Use the panel button to fold the rail.
89
+ Viewing {active}. Fold the rail with the panel button — the theme toggle joins the icon column and the
90
+ count badge stays pinned to the bell.
51
91
  </div>
52
92
  </SidebarDesktop>
53
93
  </div>
@@ -30,6 +30,8 @@ export const SidebarMobile = React.forwardRef<HTMLDivElement, SidebarMobileProps
30
30
  brandHref = "#",
31
31
  side = "left",
32
32
  items,
33
+ notificationCount,
34
+ footerActions,
33
35
  className,
34
36
  children,
35
37
  ...sidebarProps
@@ -95,7 +97,14 @@ export const SidebarMobile = React.forwardRef<HTMLDivElement, SidebarMobileProps
95
97
  bodyClassName="flex flex-col pb-0"
96
98
  className="bg-surface-soft"
97
99
  >
98
- <SidebarDesktop {...sidebarProps} items={wrapped} side={side} embedded />
100
+ <SidebarDesktop
101
+ {...sidebarProps}
102
+ items={wrapped}
103
+ side={side}
104
+ notificationCount={notificationCount}
105
+ footerActions={footerActions}
106
+ embedded
107
+ />
99
108
  </Drawer>
100
109
  </div>
101
110
  );