import type { ComponentPropsWithRef, ReactNode } from 'react'; /** * Peek's Button (2026-08-28), verbatim, plus what Ship added and Peek should * adopt: a `destructive` variant — the muted button in the error colour, for * "Delete project" and its kind; a destructive action is a button like any * other, not a dotted link — and `type="button"` by default, so a button * inside a form submits it only when asked to. On Base UI's Button since * stage 2 of the migration (2026-09-07). * * Three variants and two sizes: 32px default / 24px small, 6px radius, 500 * weight. The sizes are the `btn-default` and `btn-small` type tokens. * * The primary reads in `text-inverse` on the accent — a theme decides what * that is (dark on Peek's light accents, light on Ship's dark one). Under * Signal it is also semibold, as Peek has it. * * `disabledReason` is the package's own rule, "only offer actions that can * succeed", done once: the button is disabled, stays reachable by keyboard * (Base UI's `focusableWhenDisabled`), and shows the reason as a tooltip on * hover. Ship wrote that wrapper by hand six times. */ /** * `resolve` is `primary` in every theme but Signal, where it is outlined at rest * and green when pointed at — Peek's Resolve (UIG-9, 17 September; Peek passed * it as classes before). `IconButton` has the same look. */ export type ButtonVariant = 'primary' | 'outlined' | 'muted' | 'destructive' | 'resolve'; export type ButtonSize = 'default' | 'small'; /** One labelled action a part draws as its own Button: EmptyState's `action`, EntryShell's. */ export interface ButtonAction { label: string; onClick: () => void; } /** * `ComponentPropsWithRef`, not `ButtonHTMLAttributes`, so a `ref` reaches the * element. React 19 passes `ref` to a function component as an ordinary prop, * so nothing here forwards it by hand — it rides in on the spread below. What * was missing was only the *type* saying so, which is enough to stop a caller. * * It matters because a Base UI part composes through `render`: at stage 4 a * `Menu.Trigger` or a `Dialog.Close` **is** this Button rather than wrapping * one, and a trigger that cannot be measured or focused is not a trigger. */ export interface ButtonProps extends ComponentPropsWithRef<'button'> { variant?: ButtonVariant; size?: ButtonSize; /** 16px, stroke 1.5 on the default size; 14px on small. */ leadingIcon?: ReactNode; /** Why the action cannot succeed right now. Disables the button, keeps it * reachable by keyboard, and shows the reason as a tooltip on hover. */ disabledReason?: string; children: ReactNode; } export declare function Button({ variant, size, leadingIcon, className, children, disabled, disabledReason, type, ...props }: ButtonProps): import("react").JSX.Element; //# sourceMappingURL=Button.d.ts.map