@archetypeai/ds-lib-tokens 0.13.0 → 0.15.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.
Files changed (3) hide show
  1. package/README.md +6 -1
  2. package/package.json +1 -1
  3. package/theme.css +12 -2
package/README.md CHANGED
@@ -34,7 +34,7 @@ Import the theme before Tailwind in your global CSS:
34
34
 
35
35
  | Feature | Details |
36
36
  |---------|---------|
37
- | **Semantic Tokens** | OKLCH CSS variables (shadcn-style): `background`, `foreground`, `card`, `popover`, `primary`, `secondary`, `muted`, `accent`, `destructive`, `border`, `input`, `ring`, `chart-1`–`5`, `sidebar`, `atai-neutral`, `atai-good`, `atai-warning`, `atai-critical`, `atai-always-black`, `atai-always-white` |
37
+ | **Semantic Tokens** | OKLCH CSS variables (shadcn-style): `background`, `foreground`, `card`, `popover`, `primary`, `secondary`, `muted`, `accent`, `destructive`, `border`, `separator`, `scrollbar`, `scrollbar-track`, `input`, `ring`, `chart-1`–`5`, `sidebar`, `atai-neutral`, `atai-good`, `atai-warning`, `atai-critical`, `atai-always-black`, `atai-always-white` |
38
38
  | **Brand Tokens** | 8 OKLCH palettes with shades 50–950: `atai-tangerine`, `atai-sunshine-yellow` (amber-leaning scale), `atai-lime`, `atai-screen-green`, `atai-fire-red`, `atai-energy-pink`, `atai-cool-purple`, `atai-baby-blue` |
39
39
  | **Spacing scale** | `--spacing-xs` (0.25rem) → `--spacing-xl` (1.5rem), used as `p-md`, `gap-lg`, … |
40
40
  | **Radius scale** | `--radius-xs` → `--radius-xl`, `--radius-full`, plus `--atai-radius-interactive` (radius for interactive elements, `rounded-interactive`) |
@@ -42,6 +42,7 @@ Import the theme before Tailwind in your global CSS:
42
42
  | **Width scale guard** | `--max-width-*`/`--min-width-*` alias Tailwind's `--container-*` scale, so `max-w-md` resolves to container sizes instead of the t-shirt spacing tokens |
43
43
  | **Dark mode** | `.dark` class via `@custom-variant dark (&:where(.dark, .dark *))` |
44
44
  | **Typography** | Font-family stacks with system fallbacks and semantic HTML base styles |
45
+ | **Scrollbars** | `--scrollbar`/`--scrollbar-track` (thumb + track colour, `bg-scrollbar`) and `--scrollbar-width`. Applied globally in the base layer, so every scroller follows the theme with no app code |
45
46
 
46
47
  Brand tokens are defined in `colors.css` and loaded automatically via `theme.css`.
47
48
 
@@ -49,6 +50,10 @@ Brand tokens are defined in `colors.css` and loaded automatically via `theme.css
49
50
 
50
51
  `theme.css` styles bare HTML elements so plain markup is on-brand without utility classes: `body`, `h1`–`h6`, `p`, `small`, `span`, `strong`, `em`, `label`, `a`, `code`, `blockquote`. All elements default to `border-border` and `outline-ring/50`.
51
52
 
53
+ **Scrollbars are governed by the base layer too**: the universal `*` rule sets `scrollbar-color` / `scrollbar-width` from `--scrollbar` / `--scrollbar-track` / `--scrollbar-width`, so every `overflow` box — including ones in your own app — gets a themed bar with **no classes**. The declaration sits on `*` rather than `:root` on purpose: both properties are inherited, but `var()` substitutes where the declaration lives, so `*` is what lets a `.dark` on *any* subtree flip that subtree's scrollbars.
54
+
55
+ Only the **standard** scrollbar properties are used. In Chromium 121+ / WebKit 18.2+ a non-`auto` `scrollbar-color` or `scrollbar-width` opts an element out of the legacy `::-webkit-scrollbar` pseudo-elements, so the two are mutually exclusive rather than layered — and the standard pair is the only one Chromium, WebKit and Gecko all implement. Consequences: thumb radius and an explicit hover colour are not expressible (engines derive hover from the thumb colour), `--scrollbar-width` takes only `auto | thin | none`, and macOS renders **overlay** scrollbars that take no layout space and ignore thickness. Retheme by redefining the tokens; hide a single scroller's bar with `[scrollbar-width:none]`.
56
+
52
57
  ---
53
58
 
54
59
  ## Fonts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archetypeai/ds-lib-tokens",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Archetype AI Design System Tokens",
5
5
  "type": "module",
6
6
  "exports": {
package/theme.css CHANGED
@@ -29,12 +29,15 @@
29
29
  --destructive: var(--color-red-600);
30
30
  --border: var(--color-zinc-200);
31
31
  --separator: var(--color-zinc-200);
32
+ --scrollbar: var(--color-zinc-400);
33
+ --scrollbar-track: transparent;
34
+ --scrollbar-width: thin;
32
35
  --input: var(--color-zinc-200);
33
36
  --ring: var(--color-atai-brand-babyblue);
34
37
  --chart-1: var(--color-yellow-600);
35
38
  --chart-2: var(--color-emerald-700);
36
39
  --chart-3: var(--color-fuchsia-500);
37
- --chart-4: var(--color-violet-700);
40
+ --chart-4: var(--color-indigo-500);
38
41
  --chart-5: var(--color-yellow-800);
39
42
  --sidebar: var(--color-zinc-50);
40
43
  --sidebar-foreground: var(--color-zinc-950);
@@ -84,12 +87,15 @@
84
87
  --destructive: var(--color-red-400);
85
88
  --border: var(--color-zinc-800);
86
89
  --separator: var(--color-zinc-700);
90
+ --scrollbar: var(--color-zinc-600);
91
+ --scrollbar-track: transparent;
92
+ --scrollbar-width: thin;
87
93
  --input: var(--color-zinc-800);
88
94
  --ring: var(--color-atai-brand-babyblue);
89
95
  --chart-1: var(--color-yellow-600);
90
96
  --chart-2: var(--color-emerald-700);
91
97
  --chart-3: var(--color-fuchsia-500);
92
- --chart-4: var(--color-violet-700);
98
+ --chart-4: var(--color-indigo-500);
93
99
  --chart-5: var(--color-yellow-800);
94
100
  --sidebar: var(--color-zinc-900);
95
101
  --sidebar-foreground: var(--color-zinc-50);
@@ -156,6 +162,8 @@
156
162
  --color-destructive: var(--destructive);
157
163
  --color-border: var(--border);
158
164
  --color-separator: var(--separator);
165
+ --color-scrollbar: var(--scrollbar);
166
+ --color-scrollbar-track: var(--scrollbar-track);
159
167
  --color-input: var(--input);
160
168
  --color-ring: var(--ring);
161
169
  --color-chart-1: var(--chart-1);
@@ -218,6 +226,8 @@
218
226
  * {
219
227
  @apply border-border;
220
228
  @apply outline-ring/50;
229
+ scrollbar-color: var(--scrollbar) var(--scrollbar-track);
230
+ scrollbar-width: var(--scrollbar-width);
221
231
  }
222
232
  body {
223
233
  @apply bg-background text-foreground font-sans;