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.
dev
0afcabee8b
feat(eidos): port LinkPreview (Radix HoverCard equivalent)
#128. Eidos wrapper + types + recipe + canonical-depth demo. Trigger
renders as `<a>` (navigational anchor); on hover/focus after `openDelay`
(default 700ms) the Content panel reveals with SafePolygon bridging
trigger and content so the pointer can travel without dismissing.
Non-modal, no-op on touch (link follows directly).
Reference parity:
| Feature | Radix HoverCard | bits-ui LinkPreview | ark-ui HoverCard | this port |
|---|---|---|---|---|
| open with bind: | ✓ | ✓ | ✓ | ✓ |
| openDelay (700ms) / closeDelay (300ms) | ✓ | ✓ | ✓ | ✓ |
| disabled | ✗ | ✓ | ✓ | ✓ |
| Trigger as `<a>` | ✓ | ✓ | ✗ (`<button>`) | ✓ |
| Portal + Arrow | ✓ | ✓ | ✓ | ✓ |
| Floating layer (side/align/offsets/collision) | ✓ | ✓ | ✓ | ✓ |
| customAnchor | ✗ | ✓ | ✗ | ✓ |
| ContentStatic | ✗ | ✓ | ✗ | ⚠ deferred |
| lazyMount | ✗ | ✗ | ✓ | ⚠ deferred |
Naming choice: `LinkPreview` (matches air + bits-ui), not `HoverCard`.
Trigger semantic is navigational anchor — for a button-triggered
hover-card use `<Popover>` with `openDelay` or pass `child` snippet
to bypass the default `<a>`.
Variant set: only `size: 'xs'..'xl'` (no ControlVariant — LinkPreview
is a surface, not actionable). Defer color/intent per the canon rule
that surfaces are uncolored.
Parts shipped: Provider, Trigger, Portal, Content, Arrow.
Recipe: `link-preview.css` with anchor underline (subtle, intensifies
on hover/open), content panel chrome (border + surface bg + shadow),
arrow fill matching panel bg, slide+fade entrance per `data-side`,
reduced-motion skip.
Demo: 6 tabs (Live/API/Morfo/Sema/Recipe/A11y) at canonical depth per
DEMO_AUTHORING_GUIDE — Live wires every Provider+Content prop with
the right chip set, eidos+soma snippets generated, all 6 ARIA
contract rows + keyboard + pointer tables in A11y tab.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
5 months ago |
| .. |
|
routes
|
feat(eidos): port LinkPreview (Radix HoverCard equivalent)
|
5 months ago |