import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react"; import type { DataAttributes } from "../Common/dataAttributes"; type LayoutProps = Pick; /** Themed Chakra Button (default size "sm"); loading shows a spinner and keeps the width. */ export type ButtonProps = LayoutProps & DataAttributes & Pick & { /** Button text; ignored when `children` is passed. No label or children plus an icon = icon-only. */ label?: string; /** Text beside the spinner while loading; omit it and the label stays laid out, hidden, so the width holds. */ loadingText?: string; /** Defaults to "fit-content", not 100%; the w alias only applies when width is unset — width wins if both are passed. */ width?: string | number; /** Control height xs 24 · sm 32 · md 40 · lg 48 (xl 56); defaults to "sm" via the theme, so a ButtonGroup size still applies. */ size?: "lg" | "md" | "sm" | "xs" | "xl"; /** Defaults to "solid"; "gradient" paints the theme's fixed brand gradient. */ variant?: "solid" | "outline" | "ghost" | "link" | "unstyled" | "gradient"; /** Chakra defaults this to "button", so pass "submit" explicitly inside a form. */ type?: "button" | "submit" | "reset"; /** Ignored when variant="gradient" — that variant always paints the theme's fixed gradient pair, not this scheme. */ colorScheme?: 'primary' | 'secondary' | 'tertiary' | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink'; /** Forwarded to the underlying `