import React, { type ReactElement, type ReactNode } from 'react'; import { ActivityIndicator, Text, View, type ActivityIndicatorProps, type PressableProps, type ViewProps, type TextProps } from 'react-native'; import { type IButtonProps } from '@cdx-ui/primitives'; import { IconProps } from '../Icon'; import { type IconSlotPosition } from '../../utils/positionToDataIcon'; import { type ButtonGroupVariantProps, type ButtonVariantProps } from './styles'; export type ButtonVariant = 'solid' | 'outline' | 'ghost'; /** @deprecated Use {@link ButtonVariant} (`'solid'`) instead. */ export type ButtonVariantStrong = 'strong'; export interface ButtonProps extends PressableProps, IButtonProps { /** * Visual style variant. * @default 'solid' * @remarks `'solid' | 'outline' | 'ghost'` * @fumadocsType `'solid' | 'outline' | 'ghost'` */ variant?: ButtonVariant /** * @deprecated Use `'solid'` instead. */ | 'strong'; /** * Color theme applied to the button surface and content. * @default 'action' */ color?: 'action' | 'danger' | 'warning' | 'success' | 'info'; /** * Height and horizontal padding scale. * @default 'default' */ size?: 'default' | 'small'; /** * Stretch the button to fill the width of its container. * @default false */ fullWidth?: boolean; /** Additional Uniwind/Tailwind classes, merged after the button's own styles. */ className?: string; /** Button content — typically `Button.Label`, `Button.Icon`, and/or `Button.Spinner`. */ children?: ReactNode; } declare const ButtonRoot: React.ForwardRefExoticComponent>; export interface ButtonLabelProps extends TextProps { /** Render the consumer's child element in place of the default `Text` host. */ asChild?: boolean; /** Additional Uniwind/Tailwind classes, merged after the label's own styles. */ className?: string; /** Label content (or a custom element when `asChild` is set). */ children?: ReactNode; } declare const ButtonLabel: React.ForwardRefExoticComponent>; export interface ButtonGroupProps extends Omit { /** Render the consumer's child element in place of the default `View` host. */ asChild?: boolean; /** Additional Uniwind/Tailwind classes, merged after the group's own styles. */ className?: string; /** The buttons to group together. */ children: ReactElement | ReactElement[]; /** * Layout direction of the grouped buttons. * @default 'row' */ flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse'; /** Disable every button in the group. */ isDisabled?: boolean; /** Remove the gap between buttons and merge their adjoining borders. */ isAttached?: boolean; /** Reverse the visual order of the buttons. */ reversed?: boolean; /** Alias of `reversed`. */ isReversed?: boolean; } declare const ButtonGroup: React.ForwardRefExoticComponent>; export interface ButtonIconProps extends Omit { /** Render the consumer's child element in place of the default icon host. */ asChild?: boolean; /** * Forge icon component to render. Required unless `asChild` is set, in which * case the consumer's substituted element is rendered instead. */ as?: IconProps['as']; /** * Position hint that emits `data-icon="inline-start"` or `data-icon="inline-end"`. * CVA uses this attribute to apply leading/trailing padding logically (RTL-aware). * Omit to apply the symmetric baseline gap. */ position?: IconSlotPosition; } declare const ButtonIcon: { ({ asChild, className, style, as, position, ...props }: ButtonIconProps): import("react/jsx-runtime").JSX.Element | null; displayName: string; }; export interface ButtonSpinnerProps extends ActivityIndicatorProps { /** Render the consumer's child element in place of the default `ActivityIndicator` host. */ asChild?: boolean; /** Additional Uniwind/Tailwind classes for the spinner container. */ className?: string; /** Uniwind `accent-*` color class override for the spinner. */ colorClassName?: string; /** * Position hint that emits `data-icon="inline-start"` or `data-icon="inline-end"`. * CVA uses this attribute to apply leading/trailing padding logically (RTL-aware). * Omit to apply the symmetric baseline gap. */ position?: IconSlotPosition; } declare const ButtonSpinner: React.ForwardRefExoticComponent>; type ButtonCompoundComponent = typeof ButtonRoot & { Label: typeof ButtonLabel; Group: typeof ButtonGroup; Icon: typeof ButtonIcon; Spinner: typeof ButtonSpinner; }; export declare const Button: ButtonCompoundComponent; export type { ButtonVariantProps, ButtonGroupVariantProps }; //# sourceMappingURL=index.d.ts.map