fix(eidos): --radius-default sm → md (radius archetype default)

Reconsidered Decisión 2 against the reference systems: the default radius should
equal the eidos control center-of-gravity (button / field / select-trigger = md /
6px), like Bootstrap / Chakra / Radix-medium. `sm` (4px) would leave the default
tighter than the controls themselves — backwards — and would shrink any control
that later adopts the token; md makes that adoption a no-op.

`--radius-default` = var(--radius-md). Verified in-browser: resolves to 6px. check 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
active-uix
dev 4 months ago
parent 845d6579d1
commit 3ae9ff339a

@ -140,8 +140,11 @@ arquetipo).
navigation-menu, words). dialog/drawer/popover/dropdown-menu/context-menu/menubar/ navigation-menu, words). dialog/drawer/popover/dropdown-menu/context-menu/menubar/
tooltip/listbox/select usan `surface-raised`/`surface-default` a dedo → **off-doctrine**. tooltip/listbox/select usan `surface-raised`/`surface-default` a dedo → **off-doctrine**.
**Decisión 2 — Radio por defecto = `sm`, vía variable de tema.** **Decisión 2 — Radio por defecto = `md` (reconsiderado 2026-06-22), vía variable de tema.**
- **NO existe** un `--radius-default` hoy → **hay que definirlo** = `var(--radius-sm)`. - `--radius-default` = `var(--radius-md)`. (Era `sm`; cambiado a `md` tras comparar
referencias — el default debe igualar el centro de gravedad de los controles eidos
= md/6px, como Bootstrap/Chakra/Radix-medium; `sm` dejaría el default MÁS apretado
que los propios controles. Implementado en `render-css > appendRadiusDeclarations`.)
Los componentes sin radio de arquetipo propio lo consumen por defecto. Los componentes sin radio de arquetipo propio lo consumen por defecto.
- El **radio concéntrico YA existe** en el shape engine: `[data-shape-nest]` + - El **radio concéntrico YA existe** en el shape engine: `[data-shape-nest]` +
`border-radius: max(0px, calc(var(--shape-outer-radius) − var(--shape-nest-gap)))`. `border-radius: max(0px, calc(var(--shape-outer-radius) − var(--shape-nest-gap)))`.
@ -809,7 +812,7 @@ cada una — no son faltas per-componente, son los arquetipos que faltan):
| eje | canon — QUÉ consumir | NO hacer (deriva) | estado | | eje | canon — QUÉ consumir | NO hacer (deriva) | estado |
|---|---|---|---| |---|---|---|---|
| **Superficie / elevación** | `data-depth='overlay'\|'modal'\|…` → **bundle completo** (surface·shadow·halo·border·blur·z) | `surface-raised`/`-default` a dedo; `--{c}-overlay-z` propio; frost arbitrario | **LIVE ✓** (B2, 2026-06-22; guard `elevation-plane.test.ts`) | | **Superficie / elevación** | `data-depth='overlay'\|'modal'\|…` → **bundle completo** (surface·shadow·halo·border·blur·z) | `surface-raised`/`-default` a dedo; `--{c}-overlay-z` propio; frost arbitrario | **LIVE ✓** (B2, 2026-06-22; guard `elevation-plane.test.ts`) |
| **Radio** | `--radius-default`(=sm) / factor global + `[data-shape-nest]` concéntrico | `calc(--radius-md − space)` a mano; px fijo | **A2** | | **Radio** | `--radius-default`(=md) / factor global + `[data-shape-nest]` concéntrico | `calc(--radius-md − space)` a mano; px fijo | **A2** (default+factor+scaling LIVE; falta migrar concéntricos) |
| **Estado (hover/active)** | `--state-{variant}-hover/active` (ghost = state-layer `currentColor`) | `color-mix` ad-hoc; 9 familias sueltas | **A3** | | **Estado (hover/active)** | `--state-{variant}-hover/active` (ghost = state-layer `currentColor`) | `color-mix` ad-hoc; 9 familias sueltas | **A3** |
| **Foco** | `--focus-ring-*` + `--focus-ring-surface` + `outline` (HCM-safe); intent vía `data-intent` | tokens de foco propios; box-shadow que muere en HCM | **A3** | | **Foco** | `--focus-ring-*` + `--focus-ring-surface` + `outline` (HCM-safe); intent vía `data-intent` | tokens de foco propios; box-shadow que muere en HCM | **A3** |
| **Label de campo** | rol label canónico (size-relativo + weight/color unificados) | redefinir `--{c}-label-*` | **A4** | | **Label de campo** | rol label canónico (size-relativo + weight/color unificados) | redefinir `--{c}-label-*` | **A4** |

@ -162,7 +162,7 @@
--radius-xl: calc(16px * var(--radius-factor) * var(--scaling)); --radius-xl: calc(16px * var(--radius-factor) * var(--scaling));
--radius-xxl: calc(20px * var(--radius-factor) * var(--scaling)); --radius-xxl: calc(20px * var(--radius-factor) * var(--scaling));
--radius-full: 9999px; --radius-full: 9999px;
--radius-default: var(--radius-sm); --radius-default: var(--radius-md);
--border-width-none: 0px; --border-width-none: 0px;
--border-width-thin: 1px; --border-width-thin: 1px;
--border-width-medium: 2px; --border-width-medium: 2px;

@ -2253,8 +2253,9 @@ function appendScaledMetricDeclarations(
// dials roundness or the user zooms. At factor=1 + scaling=100 both are 1, so output // dials roundness or the user zooms. At factor=1 + scaling=100 both are 1, so output
// equals the raw value (no regression). `none` (0) and `full` (the pill sentinel) are // equals the raw value (no regression). `none` (0) and `full` (the pill sentinel) are
// emitted verbatim — a factor/zoom must not curve a square corner nor shrink the pill. // emitted verbatim — a factor/zoom must not curve a square corner nor shrink the pill.
// Also emits `--radius-default` (= sm), the archetype default for components without a // Also emits `--radius-default` (= md), the archetype default for components without a
// radius reason of their own (Decisión 2 / §13). // radius reason of their own — md is the eidos control center-of-gravity (button /
// field / select-trigger), like Bootstrap / Chakra / Radix-medium (Decisión 2 / §13).
function appendRadiusDeclarations( function appendRadiusDeclarations(
declarations: string[], declarations: string[],
radius: Record<string, string | number> | undefined radius: Record<string, string | number> | undefined
@ -2272,7 +2273,7 @@ function appendRadiusDeclarations(
) )
) )
} }
declarations.push(cssVar('radius-default', 'var(--radius-sm)')) declarations.push(cssVar('radius-default', 'var(--radius-md)'))
} }
function mergeThemeColor( function mergeThemeColor(

Loading…
Cancel
Save

Powered by TurnKey Linux.