feat: unify theme system #7

Merged
reya merged 14 commits from unify-theme into master 2026-11-16 12:58:35 +00:00
14 Commits
Author SHA1 Message Date
reya 7c1827b41d Add icon-only and icon-label toggles
CI / check (pull_request) Waiting to run
- Add an icon builder to Toggle.
- Render a square icon-only toggle when no label is set.
- Render icon and label together otherwise.
- Demonstrate both in the gallery.
2026-11-16 19:48:56 +07:00
reya 40beda76dc Shift avatar sizes down one class
- Map avatar small to xsmall, medium to small, and large to medium.
2026-11-16 19:32:01 +07:00
reya 51a23aa526 Add icon-only dropdown menu triggers
- Infer a square icon-only trigger when no label is set.
- Omit the chevron and horizontal padding in that mode.
- Demonstrate it with the gallery's More menu.
- Assert the icon-only trigger renders at 32x32.
2026-11-16 19:23:24 +07:00
reya 21faea00c5 Shrink xsmall controls
- Reduce xsmall control height from 24px to 20px.
- Scale xsmall text, icons, avatars, and switches down with it.
2026-11-16 19:07:10 +07:00
reya be457c1bba Add xsmall controls for close affordances
- Add the xsmall size class and Sizable::xsmall().
- Use xsmall close buttons in tabs, dialogs, and alerts.
- Assert xsmall and medium button heights.
2026-11-16 19:05:44 +07:00
reya 03648469ec Cap typography weight at semibold
- Render title and headline roles in semibold instead of bold.
2026-11-16 18:55:34 +07:00
reya bf8de7f6c4 Use normal field labels without descriptions
- Keep description-bearing field labels emphasized.
- Render plain row labels at the normal callout weight.
2026-11-16 18:44:40 +07:00
reya eebe267258 Center switch knob inside its border
- Account for the track border when positioning the switch thumb.
2026-11-16 18:43:19 +07:00
reya d59481c0a0 Size command palette rows with control text
- Set command labels to the medium control text size.
2026-11-16 18:40:25 +07:00
reya eaea1a4943 Use focus borders for inputs and selects
- Replace the input focus shadow with an accent border.
- Apply the same focus border to select triggers.
2026-11-16 18:39:06 +07:00
reya 2c92f26e20 Tokenize remaining component layout metrics
- Add combobox, alert edge, and code gutter tokens.
- Replace rem-derived literals in alert, combobox, code, and diff.
2026-11-16 18:35:43 +07:00
reya 1dafa87bef Use shared theme tokens across components
- Replace remaining raw component metrics with theme constants.
- Share disabled opacity, focus ring alpha, and code line height.
- Route editor borders, weights, and links through the theme.
- Align tab, alert, toast, panel, and resize spacing.
2026-11-16 18:35:00 +07:00
reya 9e61147ca9 Add control height regression test
- Lock the rendered medium button to the 32px token height.
2026-11-16 18:28:04 +07:00
reya b08516211c Unify theme sizing and spacing on Base UI metrics
- Read only mode, accent, accessibility, and native window material from the OS.
- Replace platform palettes, metrics, type ramps, borders, and elevations with unified tokens.
- Align controls, overlays, and data rows with Base UI sizing.
2026-11-16 18:27:44 +07:00