/**
* @fileoverview ToggleGroup — grouped toggle buttons with shared state, variant styling, and configurable spacing.
* @module packages/ui/components/ui/toggle-group
* @layer core
*
* @component
* @example
* import { ToggleGroup, ToggleGroupItem } from '@saasflare/ui';
*
* Left
* Center
* Right
*
*/
import * as React from "react";
import { type VariantProps } from "class-variance-authority";
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
import { type SaasflareComponentProps } from "../../providers";
import { toggleVariants } from "./toggle";
/**
* Props for {@link ToggleGroup}.
*
* Combines the Radix ToggleGroup root props (`type`, `value`, …) with the
* shared toggle variant axes and {@link SaasflareComponentProps}. `variant`
* and `size` propagate to every {@link ToggleGroupItem} via context.
*/
type ToggleGroupProps = React.ComponentProps & Omit, "size"> & SaasflareComponentProps & {
/** Visual size of the items. (`"default"` is a deprecated alias for `"md"`.) */
size?: VariantProps["size"] | "default";
/** Gap (in spacing units) between items. `0` (default) renders a joined, segmented group; a positive value detaches the items into spaced pills. */
spacing?: number;
};
/**
* Set of two-state buttons with shared single or multiple selection. Renders
* as a joined, segmented control by default; set `spacing` to detach the items
* into spaced pills. `variant` and `size` apply to all items via context.
*
* @component
* @layer core
*
* @example
*
* Left
* Center
* Right
*
*/
declare function ToggleGroup({ className, variant, size, spacing, children, surface, radius, animated, iconWeight, ...props }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
/**
* A single toggle within a {@link ToggleGroup}. Inherits `variant`, `size`,
* and `spacing` from the group context; group values win over item props.
*
* @component
* @layer core
*/
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps & VariantProps): import("react/jsx-runtime").JSX.Element;
export { ToggleGroup, ToggleGroupItem, type ToggleGroupProps };