import { Toggle } from '@base-ui/react/toggle';
import { ToggleGroup as BaseToggleGroup } from '@base-ui/react/toggle-group';
import { type VariantProps } from 'class-variance-authority';
import * as React from 'react';
/**
* A set of toggle buttons that share one selection.
*
* Base UI 1.6.0 ships both halves — `@base-ui/react/toggle-group` and `@base-ui/react/toggle` — and
* neither was used by Strix. **They are two single components rather than one namespace of parts**,
* which is worth stating because every other Base UI primitive here is `X.Root`/`X.Item`:
* `Object.keys(ToggleGroup)` is `['$$typeof', 'render']`, so `ToggleGroup.Item` is `undefined` and
* would render as a component named `undefined` with no error naming the cause.
*
* Eight behaviours, every one read off the DOM rather than the prose (skill 5), and **four of them
* differ from `Toolbar`**, which is the primitive `ButtonGroup` wraps and the obvious thing to
* assume this matches:
*
* 1. the root is `
` — a `group`, not a `toolbar`, so it
* needs its own accessible name for the same reason
* 2. items are ``, with `data-pressed` on the pressed one
* 3. a roving tabindex: `0` on the first enabled item, `-1` on the rest
* 4. `ArrowRight`/`ArrowLeft` move between items and the movement **loops** — `loopFocus`
* defaults to true
* 5. **`Home` and `End` work.** `Toolbar` gives neither, which is recorded in `ButtonGroup`'s
* manifest as a characterised gap; this primitive is not the same and does not need the caveat
* 6. **a disabled item sets BOTH the native `disabled` attribute and `aria-disabled`,** so it
* matches `:disabled` and every `disabled:`-prefixed utility fires. `Toolbar.Button` sets only
* `aria-disabled`, which is why `Button` had to grow an `aria-disabled:` twin for every
* disabled treatment. That is not needed here — but the twins are written anyway, because the
* group's own `disabled` prop and a future Base UI change both go through the same styles and a
* one-sided treatment is invisible until it is wrong
* 7. arrow navigation **skips** a disabled item rather than landing on it
* 8. selection is single by default; `multiple` allows more than one
*
* **The value is an array in both modes, and that is Base UI's API kept rather than smoothed over.**
* shadcn's Radix flavour takes `type="single"` with a bare string, which reads better for the common
* case and is a translation layer: it has to invent a discriminated union, map it onto an array, and
* then disagree with Base UI's own types at the edges. Plan D's rule about smart props applies —
* expose the substrate. `multiple` is Base UI's prop name, and `type` is deliberately absent.
*
* The visual has **no design authority**: neither `cr-web-demo` nor the Figma library draws a
* segmented control. `.button-selectable` is the nearest atom and is a different thing — a bordered
* two-line tile, which is `SelectableTile`. So the geometry is shadcn's, stated here and in the
* manifest, the same deliberate departure recorded for `sidebar`, `table`, `chart` and `drawer`.
*/
declare const toggleGroupStyles: (props?: ({
orientation?: "horizontal" | "vertical" | null | undefined;
variant?: "outline" | "plain" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
declare const toggleGroupItemStyles: (props?: ({
variant?: "outline" | "plain" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
export interface ToggleGroupProps extends Omit, 'className' | 'orientation'>, VariantProps {
className?: string;
}
/**
* A group of toggle buttons sharing one selection and one tab stop.
*
* `value` and `defaultValue` are arrays in both modes — see the module docblock. An accessible name
* is required in practice: the root is `role="group"`, and an unnamed group announces as nothing.
*
* @example
* next && setRange(next)}>
* Last 3 months
* Last 7 days
*
*/
export declare const ToggleGroup: React.ForwardRefExoticComponent>;
export interface ToggleGroupItemProps extends React.ComponentPropsWithoutRef {
}
/**
* One button inside a {@link ToggleGroup}.
*
* Reads the group's variant from context so it can draw the hairline on its leading edge. `border-s`
* rather than `border-l`, so the divider mirrors under `dir="rtl"` instead of ending up on the wrong
* side of the last item.
*/
export declare const ToggleGroupItem: React.ForwardRefExoticComponent>;
export { toggleGroupItemStyles, toggleGroupStyles };
//# sourceMappingURL=toggle-group.d.ts.map