LibreChat/packages/client
Marco Beretta bdfd3012ea
📏 feat: Give Theme-Sized Controls Their Own Padding and Gap Roles (#16528)
* feat: Give Theme-Sized Controls Their Own Padding and Gap Roles

The theme variants of Button and Chip, CheckboxButton and every composer
control read spaceNormal and spaceCompact, which also pad message rows,
steer bubbles and the composer send button, so a theme could not give its
controls Click UI's button spacing without reshaping the chat.

Add controlPaddingX and controlGap appearance roles, which those controls
read instead. Their defaults are the shared spacing values, a theme that
names only spaceNormal or spaceCompact keeps its controls on them, and the
preset falls back to the shared roles for a stylesheet that predates these.

The ClickHouse theme takes Click UI's button.basic.space.x and space.gap,
and the drift guard pins both values and measures the themed Button's
padding and gap.

* test: Reach the Temporary Chat Chip Through a Sent Message

The header status chip only appears once a temporary chat has its first message, so the scenarios send one, and measure the real message bubble instead of a probe for the shared spacing.

* fix: Let the Control Spacing Roles Replace the Base Gap

Tailwind Merge could not classify px-theme-control-x or
gap-theme-control-gap, so a theme-sized Button kept the base gap-2 beside
the role and a caller's own padding beside both, leaving the winner to
stylesheet order. Register both utilities with their groups.

* fix: Alias the Stock Control Spacing to the Shared Spacing Roles

A stylesheet that set only --theme-space-normal or --theme-space-compact
stopped reaching Button, Chip and the composer controls once the stock CSS
declared the control roles as literals, so the preset's fallback never ran.
The stock declarations now read the shared roles, with the same defaults.

* test: Assert the Control Spacing Utilities Declare Their Own Properties
2026-09-30 08:58:31 +02:00
..
src 📏 feat: Give Theme-Sized Controls Their Own Padding and Gap Roles (#16528) 2026-09-30 08:58:31 +02:00
babel.config.js
jest.config.js 🧵 ci: Keep a Floor of Two Jest Workers in CI (#15819) 2026-09-14 00:32:20 -04:00
jest.resolver.cjs
jest.setup.ts
package.json 🔤 fix: Ship the Theme Font Faces With the Package (#16485) 2026-09-29 19:07:44 +02:00
tailwind.compat.cjs 🎨 feat: Check Color Tokens and Class Existence (#16041) 2026-09-23 21:34:14 +02:00
tailwind.config.js 🎨 feat: Check Color Tokens and Class Existence (#16041) 2026-09-23 21:34:14 +02:00
tailwind.preset.cjs 📏 feat: Give Theme-Sized Controls Their Own Padding and Gap Roles (#16528) 2026-09-30 08:58:31 +02:00
tsconfig.json
tsconfig.test.json
tsdown.config.mjs 🔤 fix: Ship the Theme Font Faces With the Package (#16485) 2026-09-29 19:07:44 +02:00