import { type HTMLAttributes, type ReactNode } from 'react'; import { type VariantProps } from 'class-variance-authority'; import type { ButtonProps } from '../button/button'; type ButtonIntent = NonNullable; declare const buttonGroupVariants: (props?: ({ orientation?: "vertical" | "horizontal" | null | undefined; separator?: boolean | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** One entry of a child's own menu, as More repeats it in a submenu. */ export interface ButtonGroupOverflowItem { label: string; icon?: ReactNode; onSelect: () => void; disabled?: boolean; /** Carried onto the menu item as `data-action`. */ action?: string; } export interface ButtonGroupProps extends HTMLAttributes, VariantProps { /** * Accessible label for the group. Falls back to the translated * `ui.buttonGroup.label` string when not provided. */ label?: string; /** * When the children are interactive toolbar-style controls (e.g. toggles), * set this to render `role="toolbar"` instead of `role="group"`. */ toolbar?: boolean; /** * Intent applied to every Button / IconButton child that does not set * its own `intent`. Defaults to `outline` — grouped buttons are peers, * not three solid-primary CTAs. */ intent?: ButtonIntent; /** * Backing paint behind the outline intents, applied to every child that * does not set its own `background` AND to the group's own overflow * trigger. `'transparent'` (default) lets the surface behind show through * — right on a toolbar or a tinted shell. `'surface'` paints * `--background` behind the whole strip, so it reads as one solid control * on a host page or a panel footer. A child's explicit `background` wins. * * Set this rather than passing `background` to each child: the ellipsis * trigger is the group's own, so no per-child prop can reach it and the * strip would collapse to a mismatched see-through button. */ background?: 'transparent' | 'surface'; /** * Size applied to every child that does not set its own `size` AND to the * group's own overflow trigger. Set it here rather than per child: the * ellipsis trigger is the group's, so a per-child `size` leaves it at the * default `md` and the strip ends on a button taller than the rest. */ size?: ButtonProps['size']; /** * `'menu'` keeps the strip on one line whatever the container width: * once the buttons stop fitting (after the optional `collapseToIcons` * stage) trailing ones move into a dropdown behind an ellipsis trigger. * The group then fills its container's inline size, so give it a bounded * parent. Horizontal only. Children needing to stay in the strip set * `data-overflow-pin`; children without a string label or `aria-label` * cannot be mirrored into the menu and are pinned automatically. When the * pinned children alone no longer fit beside the menu, trailing pins that * are plain actions (an `onClick`, a link or `overflowItems`) move into * it, so it stays reachable. A pin carrying `aria-expanded`, * `aria-pressed` or `aria-haspopup`, a pin with no action, and a child * set to `data-overflow-pin="always"` never move. A link child (`asChild` * over an ``) becomes an item that clicks the host's own link, so * its handler, target and download apply; a child with `overflowItems` * and a string label or `aria-label` becomes a submenu. */ overflow?: 'none' | 'menu'; /** * With `overflow="menu"`: before spilling into the menu, hide every * child's label (`hideLabel`) and keep only its `startIcon` — buttons * without an icon shrink to their padding, so give each child one. */ collapseToIcons?: boolean; } export declare const ButtonGroup: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=button-group.d.ts.map