@bergetai/ui 0.11.3 → 0.12.0

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.
@@ -173,10 +173,20 @@
173
173
 
174
174
  /* ── Sidebar ────────────────────────────────────────────────────── */
175
175
  --berget-sidebar: color-mix(in oklch, var(--berget-brand-granite-900) 40%, transparent);
176
+ /* Opaque variant for surfaces that can't rely on the page bg behind them
177
+ (e.g. the mobile Sheet panel) — the 40% mix baked over the page bg. */
178
+ --berget-sidebar-solid: color-mix(
179
+ in oklch,
180
+ var(--berget-brand-granite-900) 40%,
181
+ var(--berget-background)
182
+ );
176
183
  --berget-sidebar-foreground: color-mix(in oklch, var(--berget-foreground) 80%, transparent);
177
- --berget-sidebar-accent: var(--berget-brand-moss-400);
178
- --berget-sidebar-accent-foreground: var(--berget-brand-granite-950);
179
- --berget-sidebar-border: color-mix(in oklch, var(--berget-foreground) 5%, transparent);
184
+ /* Hover/active surfaces for sidebar menus (menu buttons, group/menu actions,
185
+ badges) — neutral surface step, matching upstream shadcn's direction where
186
+ sidebar-accent is lighter than the sidebar fill in dark theme. */
187
+ --berget-sidebar-accent: var(--berget-surface-02);
188
+ --berget-sidebar-accent-foreground: var(--berget-foreground);
189
+ --berget-sidebar-border: var(--berget-border);
180
190
  --berget-sidebar-ring: var(--berget-brand-moss-300);
181
191
 
182
192
  /* ── Utility ──────────────────────────────────────────────────────── */
@@ -315,6 +325,11 @@
315
325
  invert correctly in light mode without per-theme overrides. */
316
326
  /* Focus ring: moss-300 on dark, moss-600 on light (both ≥3:1 vs bg, WCAG 2.4.7) */
317
327
  --berget-button-focus-ring: var(--berget-brand-moss-300);
328
+ /* Ghost: transparent fill, foreground text; hover adds the stronger fill,
329
+ press relaxes to the lighter one (10% / 5% of the theme foreground) */
330
+ --berget-button-ghost-fg: var(--berget-foreground);
331
+ --berget-button-ghost-hover: color-mix(in oklch, var(--berget-foreground) 10%, transparent);
332
+ --berget-button-ghost-active: color-mix(in oklch, var(--berget-foreground) 5%, transparent);
318
333
  /* Outline border (static across states — hover only gets a subtle fill) */
319
334
  --berget-button-outline-border: color-mix(in oklch, var(--berget-foreground) 25%, transparent);
320
335
  /* Outline hover fill: slight brightening (5% of the theme foreground) */
@@ -486,14 +501,19 @@
486
501
 
487
502
  /* ── Sidebar ────────────────────────────────────────────────────── */
488
503
  --berget-sidebar: color-mix(in oklch, var(--berget-brand-granite-100) 40%, transparent);
504
+ --berget-sidebar-solid: color-mix(
505
+ in oklch,
506
+ var(--berget-brand-granite-100) 40%,
507
+ var(--berget-background)
508
+ );
489
509
  --berget-sidebar-foreground: color-mix(
490
510
  in oklch,
491
511
  var(--berget-brand-granite-950) 80%,
492
512
  transparent
493
513
  );
494
- --berget-sidebar-accent: var(--berget-brand-moss-400);
495
- --berget-sidebar-accent-foreground: var(--berget-brand-granite-950);
496
- --berget-sidebar-border: color-mix(in oklch, var(--berget-brand-granite-950) 5%, transparent);
514
+ --berget-sidebar-accent: var(--berget-surface-02);
515
+ --berget-sidebar-accent-foreground: var(--berget-foreground);
516
+ --berget-sidebar-border: var(--berget-border);
497
517
  --berget-sidebar-ring: var(--berget-brand-moss-300);
498
518
 
499
519
  /* ── Utility ──────────────────────────────────────────────────────── */
@@ -637,6 +657,9 @@
637
657
  light palette automatically. Focus ring flips to moss-600 (≥3:1 on
638
658
  light surfaces). */
639
659
  --berget-button-focus-ring: var(--berget-brand-moss-600);
660
+ --berget-button-ghost-fg: var(--berget-foreground);
661
+ --berget-button-ghost-hover: color-mix(in oklch, var(--berget-foreground) 10%, transparent);
662
+ --berget-button-ghost-active: color-mix(in oklch, var(--berget-foreground) 5%, transparent);
640
663
  --berget-button-outline-border: color-mix(in oklch, var(--berget-foreground) 25%, transparent);
641
664
  --berget-button-outline-hover: color-mix(in oklch, var(--berget-foreground) 5%, transparent);
642
665
  --berget-button-outline-fg: var(--berget-foreground);
@@ -857,6 +880,13 @@
857
880
  --color-ring: var(--berget-ring);
858
881
  --color-background: var(--berget-background);
859
882
  --color-foreground: var(--berget-foreground);
883
+ --color-sidebar: var(--berget-sidebar);
884
+ --color-sidebar-solid: var(--berget-sidebar-solid);
885
+ --color-sidebar-foreground: var(--berget-sidebar-foreground);
886
+ --color-sidebar-accent: var(--berget-sidebar-accent);
887
+ --color-sidebar-accent-foreground: var(--berget-sidebar-accent-foreground);
888
+ --color-sidebar-border: var(--berget-sidebar-border);
889
+ --color-sidebar-ring: var(--berget-sidebar-ring);
860
890
 
861
891
  /* Feature card tokens */
862
892
  --spacing-feature-card-padding-vertical: 48px;
@@ -1039,6 +1069,9 @@
1039
1069
 
1040
1070
  /* Shared button state aliases */
1041
1071
  --color-berget-button-focus-ring: var(--berget-button-focus-ring);
1072
+ --color-berget-button-ghost-fg: var(--berget-button-ghost-fg);
1073
+ --color-berget-button-ghost-hover: var(--berget-button-ghost-hover);
1074
+ --color-berget-button-ghost-active: var(--berget-button-ghost-active);
1042
1075
  --color-berget-button-outline-border: var(--berget-button-outline-border);
1043
1076
  --color-berget-button-outline-hover: var(--berget-button-outline-hover);
1044
1077
  --color-berget-button-outline-fg: var(--berget-button-outline-fg);
@@ -1125,6 +1158,7 @@
1125
1158
 
1126
1159
  /* Sidebar aliases */
1127
1160
  --color-berget-sidebar: var(--berget-sidebar);
1161
+ --color-berget-sidebar-solid: var(--berget-sidebar-solid);
1128
1162
  --color-berget-sidebar-foreground: var(--berget-sidebar-foreground);
1129
1163
  --color-berget-sidebar-accent: var(--berget-sidebar-accent);
1130
1164
  --color-berget-sidebar-accent-foreground: var(--berget-sidebar-accent-foreground);
@@ -1218,7 +1252,7 @@
1218
1252
  /* Caption / overline (DM Sans, Sans) */
1219
1253
  --text-caption: 0.875rem;
1220
1254
  --leading-caption: 1.4;
1221
- --tracking-caption: 0.22em;
1255
+ --tracking-caption: 0.1em;
1222
1256
  --font-caption: 'DM Sans', sans-serif;
1223
1257
 
1224
1258
  /* Heading 5 (DM Sans, Sans) */
@@ -1265,3 +1299,22 @@
1265
1299
  color-mix(in oklab, var(--color-background) 80%, transparent) 100%
1266
1300
  );
1267
1301
  }
1302
+
1303
+ /* Mobile sidebar Sheet panel: opaque surface. The --berget-sidebar token is
1304
+ translucent (designed to sit over the page background); the mobile panel is
1305
+ a Sheet floating over content, so it bakes the mix over the background via
1306
+ --berget-sidebar-solid. Scoped to the primitive's mobile panel so the
1307
+ primitive itself stays unmodified. */
1308
+ [data-slot='sidebar'][data-mobile='true'] {
1309
+ background-color: var(--berget-sidebar-solid);
1310
+ }
1311
+
1312
+ /* Sidebar edge border. The primitive emits bare border-r/-l, which in stock
1313
+ shadcn is colored by the universal `* { border-color: var(--color-border) }`
1314
+ base rule — there --border equals --sidebar-border, so the sidebar edge
1315
+ matches adjacent page borders. Pin it here so the edge stays on the Berget
1316
+ border token even when an app-level stylesheet overrides --border (e.g. the
1317
+ keycloak theme in Storybook). */
1318
+ [data-slot='sidebar-container'] {
1319
+ border-color: var(--berget-sidebar-border);
1320
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bergetai/ui",
3
- "version": "0.11.3",
3
+ "version": "0.12.0",
4
4
  "description": "Berget Design System - Scandinavian-inspired design system with console aesthetic",
5
5
  "type": "module",
6
6
  "license": "MIT",