import * as React from 'react'; type ButtonGroupOrientation = 'horizontal' | 'vertical'; /** * What a ButtonGroup hands its segments: its `color` and `size` as their * defaults, its variant as the `band` a segment sits on — so the segment can * re-ink itself on a solid band, and can tell that it sits on a soft or * surface tint, without depending on DOM ancestry — and its orientation for * the separator. * * `band`, `color` and `size` are typed as plain strings here, deliberately. * This module ships as a supporting file of every popup in the package (each * one resets the context at its portal — see `ButtonGroupBoundary`), and even * a type-only import of Button or ButtonGroup from here would make them a * registry dependency of Tooltip, Select and the rest. button.tsx narrows the * fields to its own unions at the one place it reads them. */ type ButtonGroupContextValue = { band: string; color?: Color | null; size?: Size | null; variant?: string | null; orientation: ButtonGroupOrientation; }; /** * Provided by ButtonGroup and read by Button and ButtonLink, which render as * segments while it is set. `null` outside a group, and again inside a * `ButtonGroupBoundary`. */ declare const ButtonGroupContext: React.Context | null>; /** * Stops a ButtonGroup's context at a portal. * * React context follows the component tree, not the DOM. A Popover, Sheet, * Tooltip or Drawer opened from a segment renders its contents through a * portal, so without this its own Buttons would render as segments too: * squared, shadowless, ghost, and under a solid group inked in the band's * label colour on whatever surface the popup has. Every popup in this package * wraps its portal contents in this boundary; an overlay from another * library, opened from inside a group, should do the same. */ declare function ButtonGroupBoundary({ children }: { children: React.ReactNode; }): React.JSX.Element; export { ButtonGroupBoundary, ButtonGroupContext, type ButtonGroupContextValue, type ButtonGroupOrientation };