@vegastack/design 0.9.9 → 0.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vegastack/design",
3
- "version": "0.9.9",
3
+ "version": "0.10.0",
4
4
  "description": "VegaStack design system — cn utility, icon runtime, Tailwind v4 preset, and the vegastack-design CLI (tokens ship separately as @vegastack/design-tokens)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -70,7 +70,7 @@
70
70
  "test": "node test/compare.test.mjs && node test/check-updates.test.mjs && node test/skills-install.test.mjs && node test/doctor.test.mjs && node --test test/merge-refs.test.mjs test/registry-credentials.test.mjs test/registry-fetch.test.mjs"
71
71
  },
72
72
  "dependencies": {
73
- "@vegastack/design-tokens": "^0.8.38",
73
+ "@vegastack/design-tokens": "^0.10.0",
74
74
  "clsx": "^2.1.1",
75
75
  "tailwind-merge": "^3.6.0",
76
76
  "tsconfig-paths": "^4.2.0",
@@ -243,7 +243,7 @@ on shadcn's `neutral` base. Always use the utility, never a raw value.
243
243
  | Role | Utilities |
244
244
  | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
245
245
  | Surface | `bg-background` (page) · `bg-card` · `bg-popover` · `bg-sidebar` |
246
- | Fill | `bg-primary` (solid action, every checked control) · `bg-secondary` (soft) · `bg-muted` (well, track, skeleton) · `bg-accent` (hover) |
246
+ | Fill | `bg-primary` (solid action, every checked control) · `bg-secondary` (soft) · `bg-muted` (well, track, skeleton) · `state-layer` (hover + press) |
247
247
  | Text | `text-foreground` · `text-muted-foreground` · `text-{primary,secondary,accent,card,popover}-foreground` |
248
248
  | Status | `bg-{destructive,success,warning,info}` · `-foreground` (ink ON the fill) · `-text` (ink on the page or on the family's own tint) |
249
249
  | Border | `border-border` · `border-input` — there are no rings; focus is a global background tint (Tabs included) |
@@ -255,23 +255,31 @@ on shadcn's `neutral` base. Always use the utility, never a raw value.
255
255
  | Docked | `motion-dock-in` / `motion-dock-out` — a control parked at a viewport edge, 150ms in / 100ms out |
256
256
  | Prose | `proseClassName` from `@vegastack/design` — the whole rendered-rich-text recipe, one class |
257
257
 
258
- **Hover and pressed are written, not imported.** A component owns its own interaction chrome, the
259
- way shadcn writes it:
258
+ **Interaction states are one formula (COL-24).** Hover, press, selected, open and highlighted are
259
+ translucent foreground layers, so they read the same on any surface in both themes. Never write an
260
+ opaque `hover:bg-muted`/`hover:bg-accent` (lint rejects it):
260
261
 
261
262
  ```tsx
262
- // A transparent control on a known surface.
263
- <button className="rounded-md px-2 hover:bg-accent hover:text-accent-foreground" />;
263
+ // Any clickable surface — a row, a chip, a ghost control: hover AND press from one utility.
264
+ <button className="rounded-md px-2 state-layer" />;
264
265
 
265
- // A solid.
266
- <button className="bg-primary text-primary-foreground hover:bg-primary/80" />;
266
+ // Selected / current / open: the selected step (weight 500 on a current row). Over a filled
267
+ // part (a card, an outline button) use the layer form so the fill survives.
268
+ <a className="state-layer data-active:bg-state-selected data-active:font-medium" />;
269
+ <div className="bg-card state-layer data-selected:layer-selected" />;
267
270
 
268
- // A tinted status control. The ink on a tint is `-text`, never the fill.
271
+ // A tile inside a row: translucent, so it stays one step above the row in every state.
272
+ <span className="size-7 rounded-md bg-state-tile" />;
273
+
274
+ // A solid steps its own fill; a status tint keeps its `-text` ink.
275
+ <button className="bg-primary text-primary-foreground hover:bg-primary/80 active:bg-primary/70" />;
269
276
  <button className="bg-destructive/10 text-destructive-text hover:bg-destructive/20" />;
270
277
  ```
271
278
 
272
- A pressed step is optional. `surfaceInteractive`, `fillInteractive`, `fieldControl`,
273
- `fieldControlGroup` and `selectedChipVariants` were **deleted** from `@vegastack/design` with no
274
- alias; if you are upgrading, replace each with the literal it expanded to.
279
+ Keyboard focus is base.css's soft info-hue tint (`--state-focus`), never restated. Text entry
280
+ already shows hover (darker border), focus (`ring/50` border + `field-halo`) and read-only
281
+ (`readonly` fill) in the DS components. A list of rows inside a card is `ItemGroup variant="flush"`
282
+ (fills sit 8px inside the card); never hand-write `-mx-*` for it.
275
283
 
276
284
  **Rendered rich text comes from a recipe.** Anything the system did not author element by element —
277
285
  markdown, a contenteditable, CMS copy — wears one class on its root: