@still-void/ui 2.0.1 → 3.0.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.
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Still Void — Tailwind v4 CSS-first theme entry.
3
+ * Import once, after theme.css: `@import "@still-void/ui/tailwind.css";`
4
+ *
5
+ * This file exists for the CONSUMER's own markup, not for this package's
6
+ * components — every component this package ships styles itself through
7
+ * `sv-*` classes in style.css and needs zero Tailwind configuration (AD-001).
8
+ * If a consumer wants `bg-sv-surface`, `text-sv-text` and similar utilities
9
+ * available in their own JSX, this is what wires the design tokens into
10
+ * Tailwind's utility generator.
11
+ *
12
+ * `@theme inline`, not a bare `@theme`: every value below is `var(--sv-*)`,
13
+ * and those variables are redeclared under `[data-theme='light']` and each
14
+ * `[data-accent]` in theme.css. Without `inline`, Tailwind resolves the
15
+ * theme variable once and bakes that value into the generated utility class
16
+ * — the utility would freeze on whichever value was in scope wherever the
17
+ * @theme block itself happened to be read, and stop following `[data-theme]`
18
+ * switches. `inline` keeps the utility referencing the CSS variable at the
19
+ * point of use instead, which is what lets it react to the runtime switch
20
+ * the same way every `sv-*` class in style.css already does. Confirmed
21
+ * against Tailwind's own docs before writing this (see design.md).
22
+ *
23
+ * No `@source` here (AD-011): after round 2 no component in `dist` emits a
24
+ * Tailwind class for a scanner to find — the family that used to (Dialog,
25
+ * DropdownMenu, Select, Tabs, Tooltip) migrated to `sv-*` in this same round.
26
+ * A `@source` pointed at this package's `dist` would scan an empty target.
27
+ *
28
+ * Color and radius keys are namespaced `sv-*` (`--color-sv-*`, `--radius-sv-*`)
29
+ * rather than overriding Tailwind's own `--color-gray-*` / `--radius-md` etc:
30
+ * a consumer using vanilla `rounded-md` elsewhere in their app must not have
31
+ * its value silently changed by importing this file.
32
+ */
33
+
34
+ @theme inline {
35
+ /* Colors -> bg-sv-*, text-sv-*, border-sv-*, fill-sv-*, ... */
36
+ --color-sv-bg: var(--sv-bg);
37
+ --color-sv-bg-elev: var(--sv-bg-elev);
38
+ --color-sv-surface: var(--sv-surface);
39
+ --color-sv-surface-2: var(--sv-surface-2);
40
+ --color-sv-border: var(--sv-border);
41
+ --color-sv-border-strong: var(--sv-border-strong);
42
+ --color-sv-text: var(--sv-text);
43
+ --color-sv-text-2: var(--sv-text-2);
44
+ --color-sv-text-3: var(--sv-text-3);
45
+ --color-sv-signal-cyan: var(--sv-accent-cyan);
46
+ --color-sv-twilight-violet: var(--sv-accent-violet);
47
+ --color-sv-quiet-mint: var(--sv-accent-mint);
48
+ --color-sv-warm-amber: var(--sv-accent-amber);
49
+
50
+ /* Fonts -> font-sv-display, font-sv-body, font-sv-mono */
51
+ --font-sv-display: var(--sv-font-display);
52
+ --font-sv-body: var(--sv-font-body);
53
+ --font-sv-mono: var(--sv-font-mono);
54
+
55
+ /*
56
+ * Spacing -> every padding, margin, gap, width and height utility.
57
+ * Tailwind computes its whole numeric spacing scale as
58
+ * calc(var(--spacing) times N); sv-space-1 IS that atomic unit (4px), and
59
+ * every other sv-space-N step is already N times it (sv-space-6 = 24px =
60
+ * 6 times 4px). Overriding the single multiplier ties the entire scale to
61
+ * the token in one line instead of redeclaring each step, and keeps
62
+ * values in sync automatically if sv-space-1 ever changes.
63
+ */
64
+ --spacing: var(--sv-space-1);
65
+
66
+ /* Radius -> rounded-sv-sm .. rounded-sv-full */
67
+ --radius-sv-sm: var(--sv-radius-sm);
68
+ --radius-sv-md: var(--sv-radius-md);
69
+ --radius-sv-lg: var(--sv-radius-lg);
70
+ --radius-sv-xl: var(--sv-radius-xl);
71
+ --radius-sv-full: var(--sv-radius-full);
72
+ }
package/dist/theme.css CHANGED
@@ -224,6 +224,35 @@
224
224
  }
225
225
  }
226
226
 
227
+ /* Shared fade for every portal surface in style.css (.sv-overlay, .sv-dialog,
228
+ .sv-pop). Radix's Presence decides whether to keep a closing element
229
+ mounted long enough to animate out by reading the node's computed
230
+ `animation-name` — it listens for `animationstart`/`animationend`, never
231
+ `transitionend` (verified directly in @radix-ui/react-presence's source).
232
+ A `transition`-based fade never sets `animation-name`, so Presence sees
233
+ "none" and unmounts before a single frame renders; `animation` +
234
+ `@keyframes` is what it is actually built to detect. Declared here, not in
235
+ style.css's Overlays/Dialog/Popovers sections: those sections are parsed by
236
+ a flat, non-recursive selector-body regex in the CSS contract tests, which
237
+ cannot handle a rule with nested braces — the same reason
238
+ `sv-skeleton-shimmer` above lives here instead of next to `.sv-skeleton`. */
239
+ @keyframes sv-fade-in {
240
+ from {
241
+ opacity: 0;
242
+ }
243
+ to {
244
+ opacity: 1;
245
+ }
246
+ }
247
+ @keyframes sv-fade-out {
248
+ from {
249
+ opacity: 1;
250
+ }
251
+ to {
252
+ opacity: 0;
253
+ }
254
+ }
255
+
227
256
  .sv-glass {
228
257
  background: color-mix(in srgb, var(--sv-bg-elev) 72%, transparent);
229
258
  backdrop-filter: blur(12px) saturate(1.4);
@@ -240,15 +269,8 @@
240
269
  .sv-skeleton {
241
270
  animation: none;
242
271
  }
243
- /* Hover/active color fades across nav, pills and the copy button are
244
- non-essential motion too — instant is the reduced-motion default.
245
- (The reading progress bar is intentionally excluded: its transition is
246
- 1:1 with the user's own scroll input, not decorative.) */
247
- .sv-header__link,
248
- .sv-footer__link,
249
- .sv-pill--interactive,
250
- .sv-code-block__copy,
251
- .sv-toc__link {
252
- transition: none;
253
- }
272
+ /* Everything else this block used to name is declared in style.css, which
273
+ loads after this file. A media query adds no specificity, so the override
274
+ lost the cascade to the base rule every time — the reduce rules for those
275
+ classes now live at the end of style.css, where they can win. */
254
276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "Still Void design system — React/Next.js design system with a server-safe entry and a client-only entry, built on shadcn/ui.",
5
5
  "license": "MIT",
6
6
  "author": "Kalleo Pinheiro",
@@ -56,6 +56,8 @@
56
56
  },
57
57
  "./theme.css": "./dist/theme.css",
58
58
  "./style.css": "./dist/style.css",
59
+ "./tailwind.css": "./dist/tailwind.css",
60
+ "./shadcn-overrides.css": "./dist/shadcn-overrides.css",
59
61
  "./package.json": "./package.json"
60
62
  },
61
63
  "typesVersions": {
@@ -80,7 +82,7 @@
80
82
  "test:watch": "vitest",
81
83
  "test:coverage": "vitest run --coverage",
82
84
  "typecheck": "tsc --noEmit",
83
- "lint:package": "publint --strict && attw --pack . --exclude-entrypoints theme.css style.css",
85
+ "lint:package": "publint --strict && attw --pack . --exclude-entrypoints theme.css style.css tailwind.css shadcn-overrides.css",
84
86
  "changeset": "changeset",
85
87
  "version-packages": "changeset version && npm install --package-lock-only --ignore-scripts",
86
88
  "release": "npm run build && changeset publish",
@@ -89,7 +91,13 @@
89
91
  },
90
92
  "peerDependencies": {
91
93
  "react": ">=18",
92
- "react-dom": ">=18"
94
+ "react-dom": ">=18",
95
+ "tailwindcss": ">=4"
96
+ },
97
+ "peerDependenciesMeta": {
98
+ "tailwindcss": {
99
+ "optional": true
100
+ }
93
101
  },
94
102
  "devDependencies": {
95
103
  "@arethetypeswrong/cli": "^0.18.5",
@@ -100,6 +108,7 @@
100
108
  "@storybook/react-vite": "^10.5.2",
101
109
  "@testing-library/jest-dom": "^6.9.1",
102
110
  "@testing-library/react": "^16.3.2",
111
+ "@testing-library/user-event": "^14.6.1",
103
112
  "@types/react": "^19",
104
113
  "@types/react-dom": "^19",
105
114
  "@vitest/coverage-v8": "^4.1.10",
@@ -117,6 +126,7 @@
117
126
  "vitest": "^4.1.10"
118
127
  },
119
128
  "dependencies": {
129
+ "@heroicons/react": "^2.2.0",
120
130
  "@radix-ui/react-alert-dialog": "^1.1.23",
121
131
  "@radix-ui/react-dialog": "^1.1.23",
122
132
  "@radix-ui/react-dropdown-menu": "^2.1.24",