@tangle-network/sandbox-ui 0.5.1 → 0.5.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.
@@ -158,7 +158,7 @@ function Sidebar({ children, className }) {
158
158
  {
159
159
  "data-sidebar": "true",
160
160
  className: cn(
161
- "fixed inset-y-0 left-0 z-40 flex bg-sidebar border-r border-sidebar-border transition-[transform,width] duration-200 ease-in-out",
161
+ "fixed inset-y-0 left-0 z-40 flex bg-[var(--depth-1)] border-r border-[var(--border-subtle)] transition-[transform,width] duration-200 ease-in-out",
162
162
  hidden && "-translate-x-full",
163
163
  className
164
164
  ),
@@ -168,10 +168,10 @@ function Sidebar({ children, className }) {
168
168
  );
169
169
  }
170
170
  function SidebarRail({ children, className }) {
171
- return /* @__PURE__ */ jsx2("div", { className: cn("flex flex-col h-full w-16 shrink-0", className), children });
171
+ return /* @__PURE__ */ jsx2("div", { className: cn("flex flex-col h-full w-16 shrink-0 bg-[var(--depth-2)]", className), children });
172
172
  }
173
173
  function SidebarRailHeader({ children, className }) {
174
- return /* @__PURE__ */ jsx2("div", { className: cn("flex h-14 items-center justify-center border-b border-sidebar-border", className), children });
174
+ return /* @__PURE__ */ jsx2("div", { className: cn("flex h-14 items-center justify-center border-b border-[var(--border-subtle)]", className), children });
175
175
  }
176
176
  function SidebarRailNav({ children, className }) {
177
177
  return /* @__PURE__ */ jsx2("nav", { className: cn("flex flex-col items-center gap-1 py-3 flex-1", className), children });
@@ -180,7 +180,7 @@ function SidebarRailFooter({ children, className }) {
180
180
  return /* @__PURE__ */ jsx2("div", { className: cn("flex flex-col items-center gap-1 pb-3", className), children });
181
181
  }
182
182
  function RailSeparator({ className }) {
183
- return /* @__PURE__ */ jsx2("div", { className: cn("my-2 h-px w-10 bg-sidebar-border", className) });
183
+ return /* @__PURE__ */ jsx2("div", { className: cn("my-2 h-px w-10 bg-[var(--border-subtle)]", className) });
184
184
  }
185
185
  function RailButton({ icon: Icon2, label, isActive, badge, onClick, className }) {
186
186
  return /* @__PURE__ */ jsxs(
@@ -190,17 +190,21 @@ function RailButton({ icon: Icon2, label, isActive, badge, onClick, className })
190
190
  onClick,
191
191
  title: label,
192
192
  className: cn(
193
- "relative flex items-center justify-center w-10 h-10 rounded-lg transition-all duration-150",
194
- "hover:bg-sidebar-accent/80 hover:text-sidebar-accent-foreground",
193
+ "group relative flex flex-col items-center justify-center gap-0.5 w-12 h-12 rounded-lg transition-all duration-150",
194
+ "hover:bg-[var(--accent-surface-soft)] hover:text-[var(--accent-text)]",
195
195
  "active:scale-95",
196
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
197
- isActive && "bg-sidebar-accent text-sidebar-accent-foreground",
198
- !isActive && "text-sidebar-foreground/70",
196
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]",
197
+ isActive && "bg-[var(--accent-surface-strong)] text-[var(--accent-text)] shadow-[0_0_12px_-2px_rgba(130,99,255,0.3)]",
198
+ !isActive && "text-[var(--text-muted)]",
199
199
  className
200
200
  ),
201
201
  children: [
202
- /* @__PURE__ */ jsx2(Icon2, { className: "h-5 w-5" }),
203
- badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx2("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-sidebar-primary text-[10px] font-medium text-white px-1", children: badge > 99 ? "99+" : badge })
202
+ /* @__PURE__ */ jsx2(Icon2, { className: "h-[18px] w-[18px]" }),
203
+ /* @__PURE__ */ jsx2("span", { className: cn(
204
+ "text-[9px] leading-none font-medium tracking-tight truncate max-w-[44px]",
205
+ isActive ? "text-[var(--accent-text)]" : "text-[var(--text-dim)] group-hover:text-[var(--accent-text)]"
206
+ ), children: label }),
207
+ badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx2("span", { className: "absolute -top-0.5 -right-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-[var(--brand-primary)] text-[8px] font-medium text-white px-0.5", children: badge > 99 ? "99+" : badge })
204
208
  ]
205
209
  }
206
210
  );
@@ -225,7 +229,7 @@ function SidebarPanel({ children, className }) {
225
229
  "div",
226
230
  {
227
231
  className: cn(
228
- "transition-[opacity] duration-150 h-full overflow-hidden border-l border-sidebar-border",
232
+ "transition-[opacity] duration-150 h-full overflow-hidden border-l border-[var(--border-subtle)] bg-[var(--depth-1)]",
229
233
  panelOpen ? "w-[260px] opacity-100" : "w-0 opacity-0 pointer-events-none",
230
234
  className
231
235
  ),
@@ -234,7 +238,7 @@ function SidebarPanel({ children, className }) {
234
238
  );
235
239
  }
236
240
  function SidebarPanelHeader({ children, title, className }) {
237
- return /* @__PURE__ */ jsx2("div", { className: cn("flex h-14 items-center px-4 border-b border-sidebar-border shrink-0", className), children: children ?? /* @__PURE__ */ jsx2("h2", { className: "text-sm font-semibold text-sidebar-foreground", children: title }) });
241
+ return /* @__PURE__ */ jsx2("div", { className: cn("flex h-14 items-center px-4 border-b border-[var(--border-subtle)] shrink-0", className), children: children ?? /* @__PURE__ */ jsx2("h2", { className: "text-sm font-semibold text-[var(--text-primary)]", children: title }) });
238
242
  }
239
243
  function SidebarPanelContent({ children, className }) {
240
244
  return /* @__PURE__ */ jsx2("div", { className: cn("flex-1 overflow-y-auto px-2 py-2", className), children });
@@ -267,8 +271,8 @@ function ProfileAvatar({
267
271
  {
268
272
  type: "button",
269
273
  className: cn(
270
- "flex items-center justify-center w-10 h-10 rounded-lg transition-colors hover:bg-sidebar-accent",
271
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
274
+ "flex items-center justify-center w-12 h-12 rounded-lg transition-colors hover:bg-[var(--accent-surface-soft)]",
275
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--brand-cool)]",
272
276
  className
273
277
  ),
274
278
  "aria-label": "User menu",
package/dist/dashboard.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  SidebarRailNav,
31
31
  VariantList,
32
32
  useSidebar
33
- } from "./chunk-7DVFZEVW.js";
33
+ } from "./chunk-STHB4N22.js";
34
34
  import {
35
35
  BillingDashboard,
36
36
  PricingPage,
package/dist/index.js CHANGED
@@ -210,7 +210,7 @@ import {
210
210
  SidebarRailNav,
211
211
  VariantList,
212
212
  useSidebar
213
- } from "./chunk-7DVFZEVW.js";
213
+ } from "./chunk-STHB4N22.js";
214
214
  import {
215
215
  BillingDashboard,
216
216
  PricingPage,
package/dist/tokens.css CHANGED
@@ -84,6 +84,16 @@
84
84
  --error: var(--hsl-destructive);
85
85
  --info: var(--hsl-info);
86
86
 
87
+ /* Sidebar tokens */
88
+ --sidebar-background: 248 52% 5%;
89
+ --sidebar-foreground: 244 20% 94%;
90
+ --sidebar-primary: 247 100% 61%;
91
+ --sidebar-primary-foreground: 0 0% 100%;
92
+ --sidebar-accent: 245 28% 21%;
93
+ --sidebar-accent-foreground: 240 16% 92%;
94
+ --sidebar-border: 236 16% 18%;
95
+ --sidebar-ring: 247 100% 61%;
96
+
87
97
  /* Depth scale — Tangle deep indigo surfaces */
88
98
  --depth-1: #08071A;
89
99
  --depth-2: #131228;
@@ -323,6 +333,16 @@
323
333
  --surface-neutral-border: var(--border-subtle);
324
334
  --surface-neutral-text: var(--text-muted);
325
335
 
336
+ /* Sidebar — light */
337
+ --sidebar-background: 210 17% 97%;
338
+ --sidebar-foreground: 210 20% 10%;
339
+ --sidebar-primary: 248 100% 35%;
340
+ --sidebar-primary-foreground: 0 0% 100%;
341
+ --sidebar-accent: 210 20% 92%;
342
+ --sidebar-accent-foreground: 210 20% 10%;
343
+ --sidebar-border: 214 18% 88%;
344
+ --sidebar-ring: 248 100% 35%;
345
+
326
346
  --mesh-teal: rgba(44, 140, 134, 0.04);
327
347
  --mesh-violet: rgba(74, 58, 255, 0.03);
328
348
  --mesh-blue: rgba(29, 111, 164, 0.03);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -88,6 +88,7 @@
88
88
  },
89
89
  "./styles": "./dist/styles.css",
90
90
  "./globals.css": "./dist/globals.css",
91
+ "./tokens.css": "./dist/tokens.css",
91
92
  "./tailwind": "./tailwind.config.cjs"
92
93
  },
93
94
  "files": [
@@ -88,6 +88,17 @@ module.exports = {
88
88
  // MD3 inverse tokens
89
89
  "inverse-surface": "var(--md3-inverse-surface)",
90
90
  "inverse-primary": "var(--md3-inverse-primary)",
91
+ // Sidebar
92
+ sidebar: {
93
+ DEFAULT: "hsl(var(--sidebar-background))",
94
+ foreground: "hsl(var(--sidebar-foreground))",
95
+ primary: "hsl(var(--sidebar-primary))",
96
+ "primary-foreground": "hsl(var(--sidebar-primary-foreground))",
97
+ accent: "hsl(var(--sidebar-accent))",
98
+ "accent-foreground": "hsl(var(--sidebar-accent-foreground))",
99
+ border: "hsl(var(--sidebar-border))",
100
+ ring: "hsl(var(--sidebar-ring))",
101
+ },
91
102
  },
92
103
  borderRadius: {
93
104
  lg: "var(--radius)",