@designa8/vibedesign-perplexity-internal-v1-2-176b 0.0.1 → 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.0.1**.
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
@@ -232,7 +232,17 @@ var ICON_REGISTRY = {
232
232
  "circle-play": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "polygon", points: "10 8 16 12 10 16 10 8" }] },
233
233
  "rss": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M4 11a9 9 0 0 1 9 9" }, { tag: "path", d: "M4 4a16 16 0 0 1 16 16" }, { tag: "circle", cx: "5", cy: "19", r: "1" }] },
234
234
  "message-square": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }] },
235
- "film": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" }, { tag: "path", d: "M7 3v18" }, { tag: "path", d: "M3 7.5h4" }, { tag: "path", d: "M3 12h18" }, { tag: "path", d: "M3 16.5h4" }, { tag: "path", d: "M17 3v18" }, { tag: "path", d: "M17 7.5h4" }, { tag: "path", d: "M17 16.5h4" }] }
235
+ "film": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" }, { tag: "path", d: "M7 3v18" }, { tag: "path", d: "M3 7.5h4" }, { tag: "path", d: "M3 12h18" }, { tag: "path", d: "M3 16.5h4" }, { tag: "path", d: "M17 3v18" }, { tag: "path", d: "M17 7.5h4" }, { tag: "path", d: "M17 16.5h4" }] },
236
+ "sun": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M12 2v2" }, { tag: "path", d: "M12 20v2" }, { tag: "path", d: "m4.93 4.93 1.41 1.41" }, { tag: "path", d: "m17.66 17.66 1.41 1.41" }, { tag: "path", d: "M2 12h2" }, { tag: "path", d: "M20 12h2" }, { tag: "path", d: "m6.34 17.66-1.41 1.41" }, { tag: "path", d: "m19.07 4.93-1.41 1.41" }] },
237
+ "log-out": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 17 5-5-5-5" }, { tag: "path", d: "M21 12H9" }, { tag: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] },
238
+ "pencil": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { tag: "path", d: "m15 5 4 4" }] },
239
+ "users": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" }, { tag: "path", d: "M16 3.13a4 4 0 0 1 0 7.75" }] },
240
+ "bookmark": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }] },
241
+ "folder": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }] },
242
+ "credit-card": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "14", x: "2", y: "5", rx: "2" }, { tag: "line", x1: "2", x2: "22", y1: "10", y2: "10" }] },
243
+ "plug": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 22v-5" }, { tag: "path", d: "M9 8V2" }, { tag: "path", d: "M15 8V2" }, { tag: "path", d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z" }] },
244
+ "refresh-cw": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }, { tag: "path", d: "M21 3v5h-5" }, { tag: "path", d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }, { tag: "path", d: "M8 16H3v5" }] },
245
+ "external-link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 3h6v6" }, { tag: "path", d: "M10 14 21 3" }, { tag: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] }
236
246
  };
237
247
 
238
248
  // virtual-pkg:src/atoms/Icon/Icon.tsx
@@ -7026,6 +7036,8 @@ var SidebarDesktop = React70.forwardRef(
7026
7036
  onUserClick,
7027
7037
  onNotifications,
7028
7038
  onSettings,
7039
+ notificationCount,
7040
+ footerActions,
7029
7041
  folded: foldedProp,
7030
7042
  defaultFolded = false,
7031
7043
  onFoldedChange,
@@ -7045,6 +7057,9 @@ var SidebarDesktop = React70.forwardRef(
7045
7057
  () => Object.fromEntries(items.filter((i) => i.children?.length).map((i) => [i.id, i.defaultOpen ?? true]))
7046
7058
  );
7047
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";
7048
7063
  const foldIcon = side === "left" ? folded ? "panel-right" : "panel-left" : folded ? "panel-left" : "panel-right";
7049
7064
  const renderRow = (item, depth = 0) => {
7050
7065
  const isGroup = Boolean(item.children?.length);
@@ -7240,7 +7255,19 @@ var SidebarDesktop = React70.forwardRef(
7240
7255
  ]
7241
7256
  }
7242
7257
  ),
7243
- /* @__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
+ ] }),
7244
7271
  /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IconButton, { icon: "settings", label: "Settings", variant: "ghost", size: "sm", onClick: onSettings })
7245
7272
  ]
7246
7273
  }
@@ -7279,6 +7306,8 @@ var SidebarMobile = React71.forwardRef(
7279
7306
  brandHref = "#",
7280
7307
  side = "left",
7281
7308
  items,
7309
+ notificationCount,
7310
+ footerActions,
7282
7311
  className,
7283
7312
  children,
7284
7313
  ...sidebarProps
@@ -7343,7 +7372,17 @@ var SidebarMobile = React71.forwardRef(
7343
7372
  closeLabel: "Close navigation",
7344
7373
  bodyClassName: "flex flex-col pb-0",
7345
7374
  className: "bg-surface-soft",
7346
- 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
+ )
7347
7386
  }
7348
7387
  )
7349
7388
  ]
@@ -7360,6 +7399,8 @@ var Sidebar = React72.forwardRef(
7360
7399
  folded,
7361
7400
  defaultFolded,
7362
7401
  onFoldedChange,
7402
+ notificationCount,
7403
+ footerActions,
7363
7404
  mobileOpen,
7364
7405
  onMobileOpenChange,
7365
7406
  mobileActions,
@@ -7368,11 +7409,24 @@ var Sidebar = React72.forwardRef(
7368
7409
  children,
7369
7410
  ...shared
7370
7411
  }, ref) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { ref, className: ["h-full w-full", className].filter(Boolean).join(" "), children: [
7371
- /* @__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
+ ) }),
7372
7424
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "h-full md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
7373
7425
  SidebarMobile,
7374
7426
  {
7375
7427
  ...shared,
7428
+ notificationCount,
7429
+ footerActions,
7376
7430
  open: mobileOpen,
7377
7431
  onOpenChange: onMobileOpenChange,
7378
7432
  actions: mobileActions,
package/dist/index.js CHANGED
@@ -110,7 +110,17 @@ var ICON_REGISTRY = {
110
110
  "circle-play": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "10" }, { tag: "polygon", points: "10 8 16 12 10 16 10 8" }] },
111
111
  "rss": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M4 11a9 9 0 0 1 9 9" }, { tag: "path", d: "M4 4a16 16 0 0 1 16 16" }, { tag: "circle", cx: "5", cy: "19", r: "1" }] },
112
112
  "message-square": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }] },
113
- "film": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" }, { tag: "path", d: "M7 3v18" }, { tag: "path", d: "M3 7.5h4" }, { tag: "path", d: "M3 12h18" }, { tag: "path", d: "M3 16.5h4" }, { tag: "path", d: "M17 3v18" }, { tag: "path", d: "M17 7.5h4" }, { tag: "path", d: "M17 16.5h4" }] }
113
+ "film": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" }, { tag: "path", d: "M7 3v18" }, { tag: "path", d: "M3 7.5h4" }, { tag: "path", d: "M3 12h18" }, { tag: "path", d: "M3 16.5h4" }, { tag: "path", d: "M17 3v18" }, { tag: "path", d: "M17 7.5h4" }, { tag: "path", d: "M17 16.5h4" }] },
114
+ "sun": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M12 2v2" }, { tag: "path", d: "M12 20v2" }, { tag: "path", d: "m4.93 4.93 1.41 1.41" }, { tag: "path", d: "m17.66 17.66 1.41 1.41" }, { tag: "path", d: "M2 12h2" }, { tag: "path", d: "M20 12h2" }, { tag: "path", d: "m6.34 17.66-1.41 1.41" }, { tag: "path", d: "m19.07 4.93-1.41 1.41" }] },
115
+ "log-out": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 17 5-5-5-5" }, { tag: "path", d: "M21 12H9" }, { tag: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] },
116
+ "pencil": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { tag: "path", d: "m15 5 4 4" }] },
117
+ "users": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" }, { tag: "path", d: "M16 3.13a4 4 0 0 1 0 7.75" }] },
118
+ "bookmark": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }] },
119
+ "folder": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }] },
120
+ "credit-card": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "14", x: "2", y: "5", rx: "2" }, { tag: "line", x1: "2", x2: "22", y1: "10", y2: "10" }] },
121
+ "plug": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 22v-5" }, { tag: "path", d: "M9 8V2" }, { tag: "path", d: "M15 8V2" }, { tag: "path", d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z" }] },
122
+ "refresh-cw": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }, { tag: "path", d: "M21 3v5h-5" }, { tag: "path", d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }, { tag: "path", d: "M8 16H3v5" }] },
123
+ "external-link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 3h6v6" }, { tag: "path", d: "M10 14 21 3" }, { tag: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] }
114
124
  };
115
125
 
116
126
  // virtual-pkg:src/atoms/Icon/Icon.tsx
@@ -6904,6 +6914,8 @@ var SidebarDesktop = React70.forwardRef(
6904
6914
  onUserClick,
6905
6915
  onNotifications,
6906
6916
  onSettings,
6917
+ notificationCount,
6918
+ footerActions,
6907
6919
  folded: foldedProp,
6908
6920
  defaultFolded = false,
6909
6921
  onFoldedChange,
@@ -6923,6 +6935,9 @@ var SidebarDesktop = React70.forwardRef(
6923
6935
  () => Object.fromEntries(items.filter((i) => i.children?.length).map((i) => [i.id, i.defaultOpen ?? true]))
6924
6936
  );
6925
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";
6926
6941
  const foldIcon = side === "left" ? folded ? "panel-right" : "panel-left" : folded ? "panel-left" : "panel-right";
6927
6942
  const renderRow = (item, depth = 0) => {
6928
6943
  const isGroup = Boolean(item.children?.length);
@@ -7118,7 +7133,19 @@ var SidebarDesktop = React70.forwardRef(
7118
7133
  ]
7119
7134
  }
7120
7135
  ),
7121
- /* @__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
+ ] }),
7122
7149
  /* @__PURE__ */ jsx70(IconButton, { icon: "settings", label: "Settings", variant: "ghost", size: "sm", onClick: onSettings })
7123
7150
  ]
7124
7151
  }
@@ -7157,6 +7184,8 @@ var SidebarMobile = React71.forwardRef(
7157
7184
  brandHref = "#",
7158
7185
  side = "left",
7159
7186
  items,
7187
+ notificationCount,
7188
+ footerActions,
7160
7189
  className,
7161
7190
  children,
7162
7191
  ...sidebarProps
@@ -7221,7 +7250,17 @@ var SidebarMobile = React71.forwardRef(
7221
7250
  closeLabel: "Close navigation",
7222
7251
  bodyClassName: "flex flex-col pb-0",
7223
7252
  className: "bg-surface-soft",
7224
- 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
+ )
7225
7264
  }
7226
7265
  )
7227
7266
  ]
@@ -7238,6 +7277,8 @@ var Sidebar = React72.forwardRef(
7238
7277
  folded,
7239
7278
  defaultFolded,
7240
7279
  onFoldedChange,
7280
+ notificationCount,
7281
+ footerActions,
7241
7282
  mobileOpen,
7242
7283
  onMobileOpenChange,
7243
7284
  mobileActions,
@@ -7246,11 +7287,24 @@ var Sidebar = React72.forwardRef(
7246
7287
  children,
7247
7288
  ...shared
7248
7289
  }, ref) => /* @__PURE__ */ jsxs66("div", { ref, className: ["h-full w-full", className].filter(Boolean).join(" "), children: [
7249
- /* @__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
+ ) }),
7250
7302
  /* @__PURE__ */ jsx72("div", { className: "h-full md:hidden", children: /* @__PURE__ */ jsx72(
7251
7303
  SidebarMobile,
7252
7304
  {
7253
7305
  ...shared,
7306
+ notificationCount,
7307
+ footerActions,
7254
7308
  open: mobileOpen,
7255
7309
  onOpenChange: onMobileOpenChange,
7256
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.0.1",
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",
@@ -95,6 +95,16 @@ export const ICON_REGISTRY = {
95
95
  "rss": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M4 11a9 9 0 0 1 9 9" }, { tag: "path", d: "M4 4a16 16 0 0 1 16 16" }, { tag: "circle", cx: "5", cy: "19", r: "1" }] },
96
96
  "message-square": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }] },
97
97
  "film": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "18", height: "18", x: "3", y: "3", rx: "2" }, { tag: "path", d: "M7 3v18" }, { tag: "path", d: "M3 7.5h4" }, { tag: "path", d: "M3 12h18" }, { tag: "path", d: "M3 16.5h4" }, { tag: "path", d: "M17 3v18" }, { tag: "path", d: "M17 7.5h4" }, { tag: "path", d: "M17 16.5h4" }] },
98
+ "sun": { viewBox: "0 0 24 24", nodes: [{ tag: "circle", cx: "12", cy: "12", r: "4" }, { tag: "path", d: "M12 2v2" }, { tag: "path", d: "M12 20v2" }, { tag: "path", d: "m4.93 4.93 1.41 1.41" }, { tag: "path", d: "m17.66 17.66 1.41 1.41" }, { tag: "path", d: "M2 12h2" }, { tag: "path", d: "M20 12h2" }, { tag: "path", d: "m6.34 17.66-1.41 1.41" }, { tag: "path", d: "m19.07 4.93-1.41 1.41" }] },
99
+ "log-out": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m16 17 5-5-5-5" }, { tag: "path", d: "M21 12H9" }, { tag: "path", d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }] },
100
+ "pencil": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { tag: "path", d: "m15 5 4 4" }] },
101
+ "users": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { tag: "circle", cx: "9", cy: "7", r: "4" }, { tag: "path", d: "M22 21v-2a4 4 0 0 0-3-3.87" }, { tag: "path", d: "M16 3.13a4 4 0 0 1 0 7.75" }] },
102
+ "bookmark": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" }] },
103
+ "folder": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }] },
104
+ "credit-card": { viewBox: "0 0 24 24", nodes: [{ tag: "rect", width: "20", height: "14", x: "2", y: "5", rx: "2" }, { tag: "line", x1: "2", x2: "22", y1: "10", y2: "10" }] },
105
+ "plug": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M12 22v-5" }, { tag: "path", d: "M9 8V2" }, { tag: "path", d: "M15 8V2" }, { tag: "path", d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z" }] },
106
+ "refresh-cw": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }, { tag: "path", d: "M21 3v5h-5" }, { tag: "path", d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }, { tag: "path", d: "M8 16H3v5" }] },
107
+ "external-link": { viewBox: "0 0 24 24", nodes: [{ tag: "path", d: "M15 3h6v6" }, { tag: "path", d: "M10 14 21 3" }, { tag: "path", d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }] },
98
108
  } as const;
99
109
 
100
110
  export type IconName = keyof typeof ICON_REGISTRY;
@@ -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
  );
package/src/tokens.css CHANGED
@@ -151,6 +151,9 @@
151
151
  --shadow-modal: 0 16px 48px rgba(16,24,24,0.16);
152
152
  --shadow-overlay: 0 8px 28px rgba(16,24,24,0.14);
153
153
  --container-drawer: 28rem;
154
+ --container-page: 72rem;
155
+ --container-thread: 48rem;
156
+ --container-auth: 26rem;
154
157
  --grid-template-columns-system: repeat(12, minmax(0, 1fr));
155
158
  --default-font-family: var(--font-body);
156
159
  }