You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/src/uix/eidos/components/tooltip/README.md

7.8 KiB

Eidos Tooltip

Fecha de revision: 2026-05-17.

Baseline

Air no tenia tooltip en glm-5:src/uix/air/components; este componente es una envoltura visual sobre Soma/Morfo, no un port de Air.

Talla y tema

23 clave(s) pública(s) en lib/recipes/base.ts (bloque tooltip), con sus pasos por talla y el nombre RESUELTO que consume la receta. Es el contrato vivo: la pestaña Tokens de su demo lista estas mismas claves y las resuelve sobre el escenario.

Token (--tooltip-…) Valor por defecto
content-z var(--z-index-overlay-tooltip)
max-width 22rem
padding-block-sm var(--space-1)
padding-inline-sm var(--space-2)
padding-block-md var(--space-1-5)
padding-inline-md var(--space-2-5)
padding-block-lg var(--space-2)
padding-inline-lg var(--space-3)
font-size-sm var(--size-sm-font-size)
font-size-md var(--size-md-font-size)
font-size-lg var(--size-lg-font-size)
font-family var(--style-label-font-family)
font-weight var(--font-weight-regular)
line-height var(--leading-text)
radius var(--radius-md)
border-width var(--border-width)
bg var(--color-surface-overlay)
fg var(--color-content-primary)
border color-mix( in srgb, var(--color-border-default) 84%, var(--tooltip-bg) )
shadow var(--depth-overlay-shadow), var(--depth-overlay-halo)
ghost-blur var(--blur-md)
outline-arrow-bg var(--color-surface-default)
outline-arrow-border var(--color-border-strong)

Lo que el guard R-5.4 da por silencioso, con su razón medida (scripts/theming-sentinel-exceptions.ts):

  • content-z — it lands on the floating WRAPPER, which carries no data-tooltip-* attr and so is outside the measured set; read on the wrapper -> reaches (90 -> 4321)
  • bg — SUPERSEDED by the overlay plane: [data-depth=overlay] declares background at the same specificity and later in the cascade, so the recipe loses. Measured: --tooltip-bg moves nothing, --depth…
  • border — same supersession: --depth-overlay-border repaints it, --tooltip-border does not
  • shadow — same supersession: --depth-overlay-shadow repaints it, --tooltip-shadow does not
  • font-family — same plane, the typography half of it (PLAN 12.9, unsigned)
  • line-height — same plane, same open decision
  • outline-arrow-bg — the arrow is painted through a SIBLING selector that needs the content carrying data-variant=outline AND the panel open; measured with the demo switch -> reaches (oklch(0.9911 0 0) -> rgb(1,…

Comparativa

Referencia Superficie relevante Estado Eidos
Air glm-5 No existe tooltip en Air. Sin baseline Air. La referencia local es Soma/Morfo.
Soma actual Group, Provider, Trigger, Content, Arrow; delay/skip-delay, hover/focus, hoverable content, disabled, side/align/collision, Floating CSS vars, aria-describedby, role="tooltip". Cubierto por passthrough. Eidos solo anade receta visual.
Radix Tooltip Provider global, Root, Trigger, Portal, Content, Arrow; abre en hover/focus, cierra en activacion del trigger o Escape, custom timings, collision, CSS vars para transform-origin/available size/trigger size. Cubierto. Se alinea Soma para cerrar al click de trigger por defecto y Eidos consume vars de Floating para medidas/animacion.
Ark UI Tooltip Root, Trigger, Positioner, Arrow/ArrowTip, Content; control, root provider, delay, positioning, fixed containers, context. Cubierto salvo Positioner/ArrowTip explicitos: en UIX viven dentro de Soma Floating/Arrow.
Bits UI / shadcn-svelte Provider recomendado en layout, Root, Trigger, Portal, Content, Arrow; delayDuration, skipDelayDuration, disableHoverableContent, forceMount, Floating vars, nested providers. Cubierto. disableCloseOnTriggerClick se soporta en Soma como escape hatch.

Fuentes externas consultadas:

Decisiones

  • No se crea Tooltip.Positioner. La posicion pertenece a Soma Floating; Eidos consume data-side, data-align y variables CSS publicadas por Soma.
  • No se crea Tooltip.ArrowTip. Soma Arrow ya encapsula la geometria del arrow; la receta solo pinta fill/stroke.
  • Tooltip.Content mantiene size y variant, y anade matchAnchorWidth, width, minWidth, maxWidth, height, minHeight, maxHeight como props visuales responsivas.
  • Las medidas se serializan como variables privadas del recipe (--_tooltip-content-*); el contrato publico de tokens sigue siendo la recipe.
  • La receta usa --floating-transform-origin para animaciones origin-aware y --floating-available-height como max-height por defecto cuando Floating ya lo conoce.
  • Soma cierra al activar/clicar el trigger por defecto, alineado con Radix. Si se necesita mantenerlo abierto, usar disableCloseOnTriggerClick.

Eventos Sema

El morfo declara tres eventos emerge minimos para que Sema pueda emitir percepcion en hover/focus reveal: emerge-present, emerge-dismiss y emerge-dismiss-escape (Escape) — verbos del libro cap. 26 §8/§9: el tooltip se OFRECE (present), no se invoca como lugar (open). Ninguno carga intent — la aparicion de un tooltip no tiene peso evaluativo propio. Si una experiencia necesita reforzar percepcion al mostrar ayuda contextual con un tinte concreto, esa politica debe vivir en el componente que dispara el tooltip, no en Tooltip por defecto.

Gaps

ID Disposicion Detalle
ignoreNonKeyboardFocus (Bits UI) diferir Sin caso real en accesibilidad/focus management. No debe vivir en Eidos hasta que aparezca el patron concreto.
customAnchor (Bits UI) diferir Popover ya cubre panel flotante anclado a otro elemento. Si Tooltip lo necesita, anadir primero a Soma.
data-disabled aplicado a Trigger implementar Morfo declara data-disabled opcional; soma debe propagar la prop del wrapped element. La receta ya estiliza el estado disabled.
Tinte sema configurable por intent prop descartar Reveal asistivo no carga intent; forzar uno duplica responsabilidades con el componente que dispara el tooltip.

Powered by TurnKey Linux.