@still-void/ui 2.0.1 → 3.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,68 @@
1
1
  # @still-void/ui
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#13](https://github.com/KalleoPinheiro/still-void/pull/13) [`18d4660`](https://github.com/KalleoPinheiro/still-void/commit/18d4660d0d4996adacdaf04d5a732952acf17e90) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Give every Radix-derived component in the client family a real `displayName`. `Dialog`, `Tabs`, `Tooltip`, `Select`, `DropdownMenu`, and `AlertDialog` previously copied `displayName` from the underlying Radix primitive (`X.displayName = XPrimitive.Y.displayName`), but `@radix-ui/react-dialog`, `-tabs`, `-tooltip`, `-select`, and `-dropdown-menu` never declare one — so every one of these components showed up as `ForwardRef` in React DevTools instead of its own name. No behavior change.
8
+
9
+ - [#13](https://github.com/KalleoPinheiro/still-void/pull/13) [`64fa362`](https://github.com/KalleoPinheiro/still-void/commit/64fa3625070259b167372151c52fa1f4bffb2b64) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - `Tabs` now emits the `sv-tabs` container class on its root element and merges any consumer `className`, matching every other member of the family. `.sv-tabs` was already published in the package's CSS but nothing rendered it — worse, its default `align-items: stretch` would have forced the `inline-flex` `.sv-tabs__list` to the container's full width the moment a consumer applied the class by hand, so the rule now sets `align-items: flex-start`. No existing usage changes: `Tabs` still accepts every prop `TabsPrimitive.Root` does.
10
+
11
+ ## 3.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [#12](https://github.com/KalleoPinheiro/still-void/pull/12) [`f5d7428`](https://github.com/KalleoPinheiro/still-void/commit/f5d7428dc40f62f87c38b62a635fa3d388cff0e5) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Require Tailwind v4 (drop the v3 preset), and give `DialogContent` a close button by default.
16
+
17
+ - **`tailwindcss` moves from `>=3 <4` to `>=4`**, still an optional peer — a consumer with no Tailwind installed at all is unaffected, since no component this package ships has needed Tailwind since this same release migrated the last holdouts (`Dialog`, `DropdownMenu`, `Select`, `Tabs`, `Tooltip`) to `sv-*` CSS.
18
+ - **`@still-void/ui/tailwind-preset` is removed**, along with `tailwind.config.ts`. It shipped in Tailwind v3's config format; keeping it exported under a v4 peer range would have re-enabled Tailwind's Preflight for anyone who loaded it, fighting `style.css`. `@still-void/ui/tailwind.css` (see the accompanying minor release) is the v4 replacement, for consumers composing their own markup with Tailwind utilities.
19
+ - **`DialogContent` now renders a close button by default** — an `X` icon with the accessible name "Close dialog", positioned top-right. Opt out with `showCloseButton={false}` to keep rendering your own. If your own tests query the dialog by the text "Close" and now get an ambiguous match against ours, either pass `showCloseButton={false}` or scope the query more specifically (e.g. `getByRole('button', { name: 'Close dialog' })`).
20
+
21
+ See [`docs/migration-v2-to-v3.md`](https://github.com/KalleoPinheiro/still-void/blob/main/docs/migration-v2-to-v3.md) for the full upgrade path.
22
+
23
+ ### Minor Changes
24
+
25
+ - [#10](https://github.com/KalleoPinheiro/still-void/pull/10) [`dd7b8a0`](https://github.com/KalleoPinheiro/still-void/commit/dd7b8a01e56868b963a63cb0ad9c4ea902969317) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Add server-safe form and table primitives: `Textarea`, `NativeSelect`, `FileInput`, `Checkbox`, `RadioGroup`/`RadioGroupItem`, and the `Table` family (`Table`, `TableHeader`, `TableBody`, `TableFooter`, `TableRow`, `TableHead`, `TableCell`, `TableCaption`). All of them import from `@still-void/ui/react`, render without `'use client'`, hooks, or a Radix dependency, and work inside a plain `<form>` — no new runtime dependencies were added.
26
+
27
+ - `Textarea` shares `Input`'s frame and adds the `rows` attribute.
28
+ - `NativeSelect` is a real `<select>` — serializes into `FormData` and works with `userEvent.selectOptions`. It coexists on purpose with the existing client-only `Select` (Radix combobox): `NativeSelect` is a form field, `Select` is a rich combobox — see the design-system docs for when to use each.
29
+ - `FileInput` is `<input type="file">` with a styled native file-selector button; passing another `type` has no effect.
30
+ - `Checkbox` is a bare `<input type="checkbox">` — pair it with your own `<label>` or the new `sv-choice` class.
31
+ - `RadioGroup`/`RadioGroupItem` render a `<fieldset>`/`<legend>` group of native radios; the group's `name` is injected into direct-child items only (a nested item needs its own `name`).
32
+ - `Table` renders inside a horizontally-scrolling container so a wide table never breaks page layout.
33
+
34
+ New recipes, also exported from `@still-void/ui/react`: `field()`/`fieldClasses` (the single source of truth for the form-field frame shared by all four field components) and `table()`/`tableClasses` (the class map behind the `Table` family, for consumers composing their own `<table>`).
35
+
36
+ Two new export subpaths: `@still-void/ui/tailwind-preset` (a Tailwind preset mapping Still Void's `sv-*` tokens to `var(--sv-*)`, for consumers who compose their own markup with Tailwind utilities) and `@still-void/ui/shadcn-overrides.css` (an opt-in `box-shadow` reset for bare shadcn elements — not imported automatically by anything in the package). `tailwindcss` is now declared as an **optional** peer dependency, pinned to `>=3 <4`: none of the package's own server-safe components require it, and the preset is a v3-format config. Tailwind v4 ignores `corePlugins`, so a v4 consumer loading this preset would get Preflight back and fight `style.css` — the v4 path is a CSS entry (`@theme` + `@source`) that this release does not ship. The five client-only components (`Dialog`, `DropdownMenu`, `Select`, `Tabs`, `Tooltip`) still emit Tailwind utilities and need one of the two paths to render styled.
37
+
38
+ - [#12](https://github.com/KalleoPinheiro/still-void/pull/12) [`f5d7428`](https://github.com/KalleoPinheiro/still-void/commit/f5d7428dc40f62f87c38b62a635fa3d388cff0e5) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Add `Icon`, the `AlertDialog` family, a `Button` accent variant, `Card`'s `as`/`asChild`, and a Tailwind v4 theme entry.
39
+
40
+ - **`Icon`** (`@still-void/ui/react`, server-safe) — a curated icon set over `@heroicons/react`, with `size` (`sm`/`md`/`lg`, sized entirely through CSS tokens, never a pixel prop) and an optional `label` for an accessible name. Every icon in the package's own components (the `Dialog` close button, `Select`'s chevron and check, `DropdownMenu`'s indicators) now renders through this same component.
41
+ - **`AlertDialog` family** (`@still-void/ui/react/client`) — `AlertDialog`, `AlertDialogTrigger`, `AlertDialogPortal`, `AlertDialogOverlay`, `AlertDialogContent`, `AlertDialogHeader`, `AlertDialogFooter`, `AlertDialogTitle`, `AlertDialogDescription`, `AlertDialogAction`, and `AlertDialogCancel`. `@radix-ui/react-alert-dialog` was already an installed dependency with zero call sites; this exports the family the documentation already announced. No close button by default — a destructive confirmation resolves through explicit `Action`/`Cancel`, composed with `Button` via `asChild`.
42
+ - **`Button variant="accent"`** — a filled button using the active accent color (`background: var(--sv-accent-ink)`, `color: var(--sv-bg)`), for the primary action in a view. Follows `[data-theme]`/`[data-accent]` like every other accent-bearing element.
43
+ - **`Card` gains `as` and `asChild`.** `as="section" | "article" | "li" | "aside"` picks the rendered tag (default stays `div`); `asChild` merges the card's class, ref, and props onto a single child instead of rendering a wrapper. `asChild` wins when both are given. `Card` stays fully server-safe — `asChild` is served by a small vendored ref-merge utility rather than `@radix-ui/react-slot`, which turned out to call a React hook internally and would have broken inside a real Server Component.
44
+ - **`@still-void/ui/tailwind.css`** — a Tailwind v4 CSS-first `@theme inline` entry mapping `--color-sv-*`, `--font-sv-*`, `--spacing`, and `--radius-sv-*` to `var(--sv-*)`, for consumers who want `bg-sv-surface`-style utilities in their **own** markup. No component this package ships needs it — every one of them already styles itself through `style.css`.
45
+
46
+ ### Patch Changes
47
+
48
+ - [#12](https://github.com/KalleoPinheiro/still-void/pull/12) [`f5d7428`](https://github.com/KalleoPinheiro/still-void/commit/f5d7428dc40f62f87c38b62a635fa3d388cff0e5) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Fix theming, accessibility, and value defects in the client-only `Dialog`, `AlertDialog`, `DropdownMenu`, `Select`, `Tabs`, and `Tooltip` family — the last components in the catalog still emitting Tailwind utility classes instead of the package's own `sv-*` CSS.
49
+
50
+ - **`shadow-lg`/`shadow-md`/`shadow-sm` are gone.** These violated the Flat-By-Default rule this package's own README declares; the components now carry no `box-shadow` anywhere.
51
+ - **Classes referencing colors that never existed in this package's config are gone.** `bg-background`, `ring-ring`, `ring-accent`, and `ring-offset-background` all resolved to nothing; every surface, border, and focus state now maps to a real `--sv-*` token.
52
+ - **Focus is visible again.** `outline: 2px solid var(--sv-accent-ink)` with a 2px offset, matching every other interactive component — never `ring-*`, never `box-shadow`.
53
+ - **`DialogContent` gains `aria-modal="true"`.** Radix marks sibling content `aria-hidden` when the dialog opens, which is an equivalent signal for most screen readers, but a consumer with an accessibility contract written against the attribute itself needed to add it by hand until now.
54
+ - **`Select`'s trigger no longer goes blank after picking a value.** `SelectItem` never wrapped its children in Radix's `ItemText`, so nothing fed the trigger's `SelectValue` node once a value was set — this shipped in `2.x` and none of the existing tests selected a value, so it went undetected. `SelectItem` and the checkbox/radio items in `DropdownMenu` also gain a check/dot indicator where the layout previously reserved space for one that was never rendered.
55
+ - **A visible fade replaces the previously-inert open/close animation.** The `animate-in`/`zoom-*`/`slide-*` classes these components emitted depended on `tailwindcss-animate`, which this package never installed, so nothing actually animated. Opening and closing now fades over `--sv-duration-fast`, driven by CSS `animation`/`@keyframes` rather than `transition` — Radix's `Presence` (the mechanism that keeps a closing element mounted long enough to animate out) detects an exit animation by its `animation-name`, never by a `transition`, so a transition-based fade would have compiled correctly but never actually been visible on close. Instant under `prefers-reduced-motion`, on both directions.
56
+ - **`prefers-reduced-motion` now actually applies.** Eight classes' reduced-motion overrides — including five already shipping in `2.x` (nav links, footer links, category pills, the copy button, the table of contents) — were declared in a stylesheet that loads before the base rule they were meant to override, so the override never won the CSS cascade. They're now declared in the same stylesheet as the rule they zero out.
57
+
58
+ - [#10](https://github.com/KalleoPinheiro/still-void/pull/10) [`dd7b8a0`](https://github.com/KalleoPinheiro/still-void/commit/dd7b8a01e56868b963a63cb0ad9c4ea902969317) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Fix theming, focus visibility, and packaging defects in the shadcn-derived components.
59
+
60
+ - **Components now follow `[data-theme]`.** The package's Tailwind config previously hard-coded its color tokens as literal hex values, so every shadcn-derived component (including `Input`) stayed locked to the dark palette even under `[data-theme='light']`. Colors now reference the same `var(--sv-*)` custom properties the rest of the system uses — `theme.css` itself is unchanged, this is a wiring fix, not a value change. The 9 `*-light` color aliases in the Tailwind config, which had no effect once the variables carried the switch, were removed.
61
+ - **Every form field now shows a visible focus ring.** `focus-visible:ring-accent` referenced a Tailwind color that didn't exist in the package's config, so keyboard focus was invisible on any field (a WCAG 2.4.7 failure). Focus is now `outline: 2px solid var(--sv-accent-ink)` with a 2px offset, on `Input`, `Textarea`, `NativeSelect`, `FileInput`, `Checkbox`, and `RadioGroupItem`.
62
+ - **`Button` and `Badge` no longer reference nonexistent colors.** Classes like `bg-destructive`, `bg-background`, `text-accent`, `ring-ring`, and `bg-red-500` resolved to nothing in the package's own config; they now map to the corresponding Still Void tokens (`--sv-danger`, `--sv-bg`, `--sv-accent-ink`, etc). `Badge`'s default variant no longer pins to cyan — it now follows the active `data-accent`, like every other accent-bearing element (the One-Accent Rule).
63
+ - **The Tailwind preset and `shadcn-overrides.css` now ship in the published package** — both were referenced in documentation but absent from the npm tarball until now.
64
+ - **One visual value changed:** the form-field frame's `font-size` moves from Tailwind's unspecified `text-sm` default (14px) to `var(--sv-text-base)` (15px). This affects `Input`, `Textarea`, `NativeSelect`, and `FileInput`. 14px was never a Still Void spec value — it was an unlabeled Tailwind default — so this is a correction against the token scale, not a redesign; height, corner radius, padding, and colors are unchanged.
65
+
3
66
  ## 2.0.1
4
67
 
5
68
  ### Patch Changes
package/README.md CHANGED
@@ -7,16 +7,19 @@
7
7
  `blog.kalleopinheiro.dev` prototype. Ships as two entry points: a server-safe entry that
8
8
  renders inside Next.js Server Components with zero hydration cost, and a `'use client'`
9
9
  entry for interactive pieces. See [docs/design-system.md](docs/design-system.md) for the
10
- full architecture and component catalog, and
10
+ full architecture and component catalog,
11
11
  [docs/migration-v1-to-v2.md](docs/migration-v1-to-v2.md) if you're upgrading from the
12
- framework-agnostic `1.x` line.
12
+ framework-agnostic `1.x` line, and
13
+ [docs/migration-v2-to-v3.md](docs/migration-v2-to-v3.md) for the `2.x` → `3.x` breaking
14
+ changes (Tailwind v4 is now required, and the v3 preset is gone).
13
15
 
14
16
  ## Architecture
15
17
 
16
18
  | Layer | Entry | Runs where | What it is |
17
19
  |---|---|---|---|
18
20
  | **Theme CSS** | `@still-void/ui/theme.css` | browser | CSS vars (`--sv-*`), dark/light via `data-theme`, accents via `data-accent`, signature utilities |
19
- | **Component CSS** | `@still-void/ui/style.css` | browser | All component classes (`sv-*`) |
21
+ | **Component CSS** | `@still-void/ui/style.css` | browser | All component classes (`sv-*`) — every component this package ships needs only this, never Tailwind |
22
+ | **Tailwind theme (optional)** | `@still-void/ui/tailwind.css` | browser (Tailwind v4 build) | `@theme inline` mapping `--color-sv-*`/`--font-sv-*`/`--spacing`/`--radius-sv-*` to `var(--sv-*)`, for `bg-sv-surface`-style utilities in **your own** markup |
20
23
  | **React (server-safe)** | `@still-void/ui/react` | server or client | Tokens, recipes, and components without hooks — render inside Server Components |
21
24
  | **React (client)** | `@still-void/ui/react/client` | client | `'use client'` bundle: DOM behaviors (`createThemeManager`, `createScrollSpy`, `createReadingProgress`, `copyToClipboard`), `ThemeProvider`, `ThemeToggle`, `CopyButton`, `TableOfContents`, `ReadingProgress`, hooks |
22
25
 
@@ -151,14 +154,25 @@ before your chosen font loads — see [Fidelity rules](#fidelity-rules-do-not-re
151
154
  A selection of **shadcn/ui** components has been ported to Still Void with the design system's palette, typography, and spacing applied. Both server-safe and client-only variants are available:
152
155
 
153
156
  **Server-safe components** (import from `@still-void/ui/react`):
154
- - `Button` — with variants (default, destructive, outline, secondary, ghost, link) and sizes (sm, default, lg, icon)
155
- - `Card` — with header, title, description, content, footer
157
+ - `Button` — with variants (default, destructive, outline, secondary, ghost, link, **accent**) and sizes (sm, default, lg, icon)
158
+ - `Card` — with header, title, description, content, footer; renders as `<div>` by default, or any of `section`/`article`/`li`/`aside` via `as`, or merges onto a single child via `asChild`
159
+ - `Icon` — a curated set of icons (`@heroicons/react` under the hood) with `size` (`sm`/`md`/`lg`) and an accessible `label`
156
160
  - `Input` — text input with placeholder, disabled, and focus states
157
161
  - `Alert` — with optional title and description
158
162
  - `Badge` — with variants (default, secondary, destructive, outline)
163
+ - `Textarea` — multi-line text field sharing `Input`'s frame, plus `rows`
164
+ - `NativeSelect` — a real `<select>`, serializable via `FormData`; coexists with the client-only `Select` combobox (see [docs/design-system.md](docs/design-system.md))
165
+ - `FileInput` — `<input type="file">` with a styled file-selector button
166
+ - `Checkbox` — `<input type="checkbox">`, no wrapper
167
+ - `RadioGroup` / `RadioGroupItem` — `<fieldset>`/`<legend>` group of native radios
168
+ - `Table` family — `Table`, `TableHeader`, `TableBody`, `TableFooter`, `TableRow`, `TableHead`, `TableCell`, `TableCaption`, a presentational data table with a scrolling container
169
+
170
+ All of the above style themselves through real `sv-*` CSS classes — **no Tailwind required**,
171
+ for any component this package ships, in any version.
159
172
 
160
173
  **Client-only components** (import from `@still-void/ui/react/client`):
161
- - `Dialog` — modal with trigger, content, header, footer, title, description
174
+ - `Dialog` — modal with trigger, content, header, footer, title, description; renders a close button by default (`showCloseButton={false}` to opt out)
175
+ - `AlertDialog` — the same modal mechanics as `Dialog`, without a close button, for destructive confirmations that must be resolved through explicit `Action`/`Cancel`
162
176
  - `Select` — dropdown with groups, labels, and scroll
163
177
  - `Dropdown` — menu with items, checkboxes, radio groups, labels, separators
164
178
  - `Tabs` — tabbed interface with triggers and content
@@ -203,7 +217,27 @@ export function SettingsDialog() {
203
217
  }
204
218
  ```
205
219
 
206
- **Note:** shadcn/ui components use Tailwind utility classes, so your app needs Tailwind CSS installed and configured to extend Still Void's tokens (see [DESIGN.md](DESIGN.md) for the full config).
220
+ **Note on Tailwind:** **no component this package ships requires Tailwind at all**, in either
221
+ entry. Every component — server-safe or client — styles itself through real `sv-*` classes in
222
+ `@still-void/ui/style.css`, driven by `var(--sv-*)`, so it follows `[data-theme]`/
223
+ `[data-accent]` with **zero Tailwind config**. That was not always true: before `3.0.0`, the
224
+ client-only family (`Dialog`, `DropdownMenu`, `Select`, `Tabs`, `Tooltip`) still emitted
225
+ Tailwind utility classes and rendered unstyled without one — see
226
+ [docs/migration-v2-to-v3.md](docs/migration-v2-to-v3.md) if you're coming from `2.x`.
227
+
228
+ `@still-void/ui/tailwind.css` exists for a different reason: if **your own** markup wants
229
+ `bg-sv-surface`/`text-sv-text`/`rounded-sv-lg`-style utilities built from this package's
230
+ tokens, `@import "@still-void/ui/tailwind.css";` in a Tailwind **v4** project wires them up —
231
+ a `@theme inline` block, so the generated utilities keep following `[data-theme]`/
232
+ `[data-accent]` at runtime instead of freezing on whichever value was in scope at build time.
233
+ This is why `tailwindcss` is declared as a peer dependency at `>=4` — the package no longer
234
+ supports Tailwind v3 in any form, preset included (see the migration doc). The peer stays
235
+ **optional**: a consumer with no Tailwind at all still gets every component correctly styled.
236
+
237
+ There is also an opt-in `@still-void/ui/shadcn-overrides.css` subpath (bare-element
238
+ `box-shadow: none !important` resets) for consumers who install additional unstyled shadcn
239
+ components of their
240
+ own — it is never imported automatically.
207
241
 
208
242
  ## Fidelity rules (do not regress)
209
243