parent
6707034fbd
commit
5c0137e57e
@ -0,0 +1,50 @@
|
|||||||
|
# Eidos Popover
|
||||||
|
|
||||||
|
Fecha de revision: 2026-05-17.
|
||||||
|
|
||||||
|
## Baseline
|
||||||
|
|
||||||
|
Air no tenia `popover` en `glm-5:src/uix/air/components`; este componente no es
|
||||||
|
un port 1:1 de Air, sino una envoltura visual sobre la capacidad actual de
|
||||||
|
Soma/Morfo.
|
||||||
|
|
||||||
|
## Comparativa
|
||||||
|
|
||||||
|
| Referencia | Superficie relevante | Estado Eidos |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Air `glm-5` | No existe `popover` en Air. | Sin baseline Air. La referencia local es Soma/Morfo. |
|
||||||
|
| Soma actual | `Provider`, `Trigger`, `Content`, `Arrow`, `Close`, `Anchor`, `Overlay`; `modal`, hover open, focus/scroll/dismissal, side/align/offset/collision, custom anchor, Floating CSS vars. | Cubierto por passthrough. Eidos no duplica posicionamiento ni estado. |
|
||||||
|
| Radix Popover | Controlled/uncontrolled, `Trigger`, `Anchor`, `Portal`, `Content`, `Close`, `Arrow`; side/align/collision, modal/no-modal, focus managed, CSS vars para transform-origin, available width/height y trigger width. | Cubierto en comportamiento por Soma. Eidos consume `data-side` y ahora expone medidas visuales + `matchAnchorWidth`. |
|
||||||
|
| Ark UI Popover | `Root`, `Trigger`, `Anchor`, `Positioner`, `Arrow/ArrowTip`, `Content`, `Title`, `Description`, `CloseTrigger`; modal, close behavior, `positioning.sameWidth`, nested/multiple triggers, lazy mount. | Cubierto salvo `Positioner`/Title/Description como partes propias. `Positioner` queda internalizado en Soma Floating; Title/Description se dejan como contenido del usuario. |
|
||||||
|
| Bits UI / shadcn-svelte | Compound con `Root`, `Trigger`, `Portal`, `Overlay`, `Content`, `Close`, `Arrow`; hover open; `forceMount`; floating CSS vars; shadcn usa width por clases (`w-80`). | Cubierto. Eidos mantiene API compound y anade width constraints sin depender de clases externas. |
|
||||||
|
|
||||||
|
Fuentes externas consultadas:
|
||||||
|
|
||||||
|
- Radix Popover: https://www.radix-ui.com/primitives/docs/components/popover
|
||||||
|
- Ark UI Popover: https://ark-ui.com/docs/components/popover
|
||||||
|
- Bits UI Popover: https://bits-ui.com/docs/components/popover
|
||||||
|
- shadcn-svelte Popover: https://www.shadcn-svelte.com/docs/components/popover
|
||||||
|
|
||||||
|
## Decisiones
|
||||||
|
|
||||||
|
- No se crea `Popover.Positioner`. La posicion pertenece a Soma Floating; Eidos
|
||||||
|
consume `data-side`, `data-align` y las variables CSS publicadas por Soma.
|
||||||
|
- No se crean `Popover.Title` ni `Popover.Description` ahora. A diferencia de
|
||||||
|
Dialog/Drawer, Popover suele contener UI arbitraria y las referencias no
|
||||||
|
exigen esas partes para accesibilidad si el consumidor etiqueta su contenido.
|
||||||
|
- `Popover.Content` mantiene `size` canonico (`sm/md/lg/xl`) y anade
|
||||||
|
`matchAnchorWidth`, `width`, `minWidth`, `maxWidth`, `height`, `minHeight`,
|
||||||
|
`maxHeight` como props visuales responsivas.
|
||||||
|
- Las medidas se serializan como variables privadas del recipe
|
||||||
|
(`--_popover-content-*`); el contrato publico de tokens sigue siendo el de la
|
||||||
|
recipe.
|
||||||
|
- La receta usa `--soma-popover-content-transform-origin` para animaciones
|
||||||
|
origin-aware y `--soma-popover-content-available-height` como max-height por
|
||||||
|
defecto cuando Floating ya lo conoce.
|
||||||
|
|
||||||
|
## Pendiente deliberado
|
||||||
|
|
||||||
|
- Revisar `Popover.Title`/`Description` si aparece un caso real que necesite
|
||||||
|
partes canonicas para etiquetado consistente.
|
||||||
|
- Evaluar multiple trigger value solo si Soma decide modelarlo; Eidos no debe
|
||||||
|
inventar estado de trigger por encima de Soma.
|
||||||
Loading…
Reference in new issue