import type { JsxElementProps } from '@ecopages/jsx'; export type RuiButtonVariant = 'filled' | 'outline' | 'destructive' | 'ghost' | 'link'; export type RuiButtonSize = 'none' | 'sm' | 'md' | 'lg'; type RuiButtonChrome = { /** Visual style. Default: `filled`. */ variant?: RuiButtonVariant; /** Control size. Default: `md`. Use `none` for inline `link` chrome. */ size?: RuiButtonSize; /** Makes a control-sized button square, for example for an icon-only action. */ square?: boolean; }; export type RuiButtonControlProps = JsxElementProps & RuiButtonChrome & { /** Native button type. Default: `button`. */ type?: 'button' | 'submit' | 'reset'; /** Disabled state. */ disabled?: boolean; /** Controlled pressed state for toggle buttons (`aria-pressed`). */ pressed?: boolean; /** Initial pressed state when `toggle` is used without a controlled `pressed` value. */ defaultPressed?: boolean; /** Toggle `aria-pressed` on click when `pressed` is not controlled. */ toggle?: boolean; href?: never; }; export type RuiButtonLinkProps = JsxElementProps & RuiButtonChrome & { /** Destination for the button-styled link. */ href: string; target?: '_self' | '_blank' | '_parent' | '_top'; rel?: string; download?: boolean | string; }; export type RuiButtonProps = RuiButtonControlProps | RuiButtonLinkProps; /** * Presentational wrapper around a native `