// BlinkFree primitives — Button, Tag, Card, Input, Container
const Button = ({ variant = 'primary', icon, children, onClick, type = 'button' }) => {
const base = {
height: 38,
padding: '0 18px',
fontSize: 16.25,
fontWeight: 600,
fontFamily: 'inherit',
textTransform: 'uppercase',
letterSpacing: '0.04em',
borderRadius: 4,
border: 'none',
cursor: 'pointer',
display: 'inline-flex',
alignItems: 'center',
gap: 8,
transition: 'background 80ms cubic-bezier(0.2,0,0,1), color 80ms, border-color 80ms, transform 60ms cubic-bezier(0.2,0,0,1)',
whiteSpace: 'nowrap',
};
const variants = {
primary: { background: '#9146FF', color: '#fff' },
secondary: { background: '#2F2F35', color: '#EFEFF1' },
ghost: { background: 'transparent', color: '#EFEFF1', border: '1px solid #2F2F35' },
};
const [hover, setHover] = React.useState(false);
const [press, setPress] = React.useState(false);
const hoverStyles = {
primary: { background: '#A970FF' },
secondary: { background: '#3A3A42' },
ghost: { borderColor: '#9146FF', color: '#9146FF' },
};
return (
);
};
const Eyebrow = ({ children, color = '#9146FF' }) => (
{children}
);
const Tag = ({ children, variant = 'default' }) => {
const styles = {
default: { background: '#2F2F35', color: '#EFEFF1' },
purple: { background: 'rgba(145,70,255,0.15)', color: '#BF94FF' },
live: { background: '#EB0400', color: '#fff' },
};
return (
{children}
);
};
const LiveDot = () => (
<>
>
);
const Card = ({ children, hover, style, ...rest }) => {
const [h, setH] = React.useState(false);
return (
setH(true)}
onMouseLeave={() => setH(false)}
style={{
background: '#18181B',
borderRadius: 6,
boxShadow: (h && hover) ? '0 0 0 2px #9146FF' : '0 0 0 1px #1F1F23',
transition: 'box-shadow 80ms cubic-bezier(0.2,0,0,1)',
overflow: 'hidden',
...style,
}}
{...rest}
>{children}
);
};
const Input = ({ value, onChange, placeholder, type = 'text', as = 'input', rows }) => {
const [focus, setFocus] = React.useState(false);
const Tag = as;
return (
setFocus(true)}
onBlur={() => setFocus(false)}
style={{
background: '#0E0E10',
border: focus ? '2px solid #9146FF' : '1px solid #2F2F35',
borderRadius: 4,
padding: focus ? '11px 13px' : '12px 14px',
fontSize: 16.25,
color: '#EFEFF1',
fontFamily: 'inherit',
outline: 'none',
width: '100%',
boxSizing: 'border-box',
resize: as === 'textarea' ? 'vertical' : undefined,
minHeight: as === 'textarea' ? 96 : undefined,
}}
/>
);
};
const Container = ({ children, style }) => (
{children}
);
const Section = ({ children, eyebrow, eyebrowColor, style }) => (
{eyebrow && {eyebrow}}
{children}
);
Object.assign(window, { Button, Tag, LiveDot, Card, Input, Container, Section, Eyebrow });