Files
zeekayandHanzo Dev 01dc7b5306 fix: shipped components spoke the fork's border vocabulary, which no longer exists
Swapping the forked token layer for the inherited one silently orphaned
two names. The fork declared --border-hairline (a solid #262626) and
--border-card; the substrate draws every one of those boundaries with a
single alpha --border, and explains at length why alpha beats a solid hex
there — a solid edge reads on the page and vanishes the moment it lands
on a lifted surface.

Nineteen shipped files still asked for the old names: Card, Avatar,
Badge, Table, Accordion, Dialog, DropdownMenu, Sheet, Toaster, seven
specimen cards, and the generation prompts. An undefined custom property
in `border:1px solid var(--gone)` does not fail. The declaration is
invalid at computed-value time, border-color falls back to currentColor,
and every one of those surfaces draws its edge in the INK colour — a
stark near-white hairline on black that reads as a bold design choice
rather than as nineteen broken files.

They are not re-declared as aliases. Both mapped to the substrate's
--border, so keeping them would be two names for one thing — exactly the
duplication this package exists to remove. The components now speak the
substrate's vocabulary.

check-tokens gains the check that would have caught it. Check 4 proves
the STYLESHEET is internally consistent and says nothing about the
components, kits, specimen cards and prompts shipped beside it — which
are the files a consumer actually renders. Now every var() in all 78 of
them must resolve against the sheet. Mutation-proven: pointing one card
back at --border-hairline fails the build.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-05 15:50:28 -07:00

16 lines
865 B
React

import React from 'react'
export function Avatar({ size = 32, style, children, ...rest }) {
return (
<span style={{position:'relative',display:'inline-flex',alignItems:'center',justifyContent:'center',width:size,height:size,flexShrink:0,borderRadius:'var(--radius-full)',overflow:'hidden',border:'1px solid var(--border)',background:'linear-gradient(to bottom right,var(--neutral-700),var(--neutral-900))',...style}} {...rest}>
{children}
</span>
)
}
export function AvatarImage({ src, alt = '', style, ...rest }) {
return <img src={src} alt={alt} style={{width:'100%',height:'100%',objectFit:'cover',...style}} {...rest} />
}
export function AvatarFallback({ style, children, ...rest }) {
return <span style={{fontSize:'var(--text-xs)',fontWeight:'var(--weight-medium)',color:'var(--text-secondary)',...style}} {...rest}>{children}</span>
}