import React$1, { ReactNode } from 'react'; import { CommonProps, PolymorphicComponent, ExpandProps, PolymorphicProps } from '@contentful/f36-core'; import { SpacingTokens } from '@contentful/f36-tokens'; import { IconProps } from '@contentful/f36-icon'; import { WithEnhancedContent, TooltipInternalProps } from '@contentful/f36-tooltip'; type ButtonGroupVariants = 'spaced' | 'merged'; type ButtonGroupSpacing = SpacingTokens; interface BaseButtonGroupProps extends CommonProps { /** * Determines how the Button Group will display the buttons * @default merged */ variant?: ButtonGroupVariants; /** * Determines if the divider should be rendered between merged buttons * @default false */ withDivider?: boolean; /** * Sets the spacing of the buttons if variant is separate. * @default spacingS */ spacing?: ButtonGroupSpacing; children: ReactNode; } interface SpacedButtonGroupProps extends BaseButtonGroupProps { variant: 'spaced'; withDivider?: never; } interface MergedButtonGroupProps extends BaseButtonGroupProps { variant?: 'merged'; spacing?: never; } type ButtonGroupProps = SpacedButtonGroupProps | MergedButtonGroupProps; declare const ButtonGroup: React$1.ForwardRefExoticComponent>; type ButtonSize = 'small' | 'medium' | 'large'; type ButtonVariant = 'negative' | 'positive' | 'primary' | 'secondary' | 'transparent'; interface ButtonInternalProps extends CommonProps { children?: React.ReactNode; /** * Determines style variation of Button component * @default secondary */ variant?: ButtonVariant; /** * Determines size variation of Button component * @default medium */ size?: ButtonSize; /** * Applies active styles * @default false */ isActive?: boolean; /** * Disabled interaction and applies disabled styles * @default false */ isDisabled?: boolean; /** * Expects any of the icon components. Renders the icon aligned to the start */ startIcon?: React.ReactElement; /** * Expects any of the icon components. Renders the icon aligned to the end */ endIcon?: React.ReactElement; /** * Adds loading indicator icon and disables interactions */ isLoading?: boolean; /** * Forces button to take 100% of the container */ isFullWidth?: boolean; /** * The element used for the root node. * @default button */ as?: 'a' | 'button'; } interface ToggleButtonProps extends CommonProps { /** * Applies active styles * @default false */ isActive?: boolean; /** * Disabled interaction and applies disabled styles * @default false */ isDisabled?: boolean; /** * Expects any of the icon components */ icon?: React$1.ReactElement; /** * Function triggered when the toggle button is clicked. */ onToggle: () => void; /** * Determines size variation of Button component * @default medium */ size?: ButtonSize; /** * Aria label is required when using icon only */ 'aria-label'?: string; children?: React$1.ReactNode; } declare const ToggleButton: React$1.ForwardRefExoticComponent>; declare const BUTTON_DEFAULT_TAG = "button"; type ButtonProps = PolymorphicProps; /** * @description: Buttons communicate the action that will occur when the user clicks it */ declare const Button: PolymorphicComponent, typeof BUTTON_DEFAULT_TAG, "disabled">; type WithTooltipOrNot = { /** * Wrap the IconButton with a Tooltip to provide users with additional context about its purpose when they hover over it */ withTooltip?: boolean; /** * The tooltip properties to be passed to the Tooltip component wrapping the IconButton */ tooltipProps?: CommonProps & WithEnhancedContent & Omit; } | { withTooltip?: false; tooltipProps?: never; }; interface IconButtonInternalProps extends Omit { /** * Expects any of the icon components */ icon: React$1.ReactElement; /** * Aria label is required when using icon only */ 'aria-label': string; /** * Determines size variation of IconButton component * Note: 'large' is deprecated * */ size?: ButtonInternalProps['size']; } declare const ICON_BUTTON_DEFAULT_TAG = "button"; type ExtendedIconButtonProps = IconButtonInternalProps & WithTooltipOrNot; type IconButtonProps = PolymorphicProps; declare const IconButton: PolymorphicComponent, typeof ICON_BUTTON_DEFAULT_TAG, "disabled">; export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps, ToggleButton, type ToggleButtonProps };