import { ThemeColor, ThemeSize } from "../../theme/types.js"; import { ButtonShadow, ButtonShape, ButtonVariant } from "../../styles/button.js"; import { IconProps, IconValue } from "../icon/types.js"; import { LinkProps } from "../link/types.js"; import { ButtonEmits, ButtonProps } from "@soybeanjs/headless/button"; import { Align, ClassValue, DataOrientation, Direction } from "@soybeanjs/headless/types"; //#region src/components/button/types.d.ts /** * Properties for the Button component. */ interface ButtonProps$1 extends ButtonProps { /** * Additional class names applied to the root element. */ class?: ClassValue; /** * Theme color of the component. */ color?: ThemeColor; /** * Visual size of the component. */ size?: ThemeSize; /** * Visual variant of the component. */ variant?: ButtonVariant; /** * Shape of the component. */ shape?: ButtonShape; /** * Shadow style of the component. */ shadow?: ButtonShadow; /** * Whether the component should fit its content width. */ fitContent?: boolean; } /** * Properties for the ButtonIcon component. */ interface ButtonIconProps extends ButtonProps$1 { /** The icon value of iconify. */ icon: IconValue; /** * The class of the icon. */ iconClass?: ClassValue; /** The props of the icon. */ iconProps?: Partial; } /** * Properties for the ButtonLoading component. */ interface ButtonLoadingProps extends ButtonProps$1 { /** * Whether the button is loading. * * @default false */ loading?: boolean; /** * The text to display when the button is loading. * * It will be displayed when the loading position is center. */ loadingText?: string; /** * The duration of the loading state in milliseconds. * * @default 150 ms */ loadingDuration?: number; /** * Whether to automatically handle loading state during click event. When true, the button will show loading state * during click event execution. When false, you need to manually control the loading state. * * @default false */ autoLoading?: boolean; /** * The icon name of iconify to display when the button is loading. * * @default 'svg-spinners:270-ring' */ loadingIcon?: IconValue; /** The props of the loading icon. */ loadingIconProps?: Partial; /** * The position of the loading icon. * * @default 'start' */ loadingPosition?: Align; } /** * Properties for the ButtonLink component. */ type ButtonLinkProps = ButtonProps$1 & LinkProps; /** * Properties for the ButtonGroup component. */ interface ButtonGroupProps extends ButtonProps$1 { /** * The orientation of the button group. * * @default 'horizontal' */ orientation?: DataOrientation; /** * The direction of the button group. * * @default 'ltr' */ dir?: Direction; } //#endregion export { type ButtonEmits, ButtonGroupProps, ButtonIconProps, ButtonLinkProps, ButtonLoadingProps, ButtonProps$1 as ButtonProps };