import type React from 'react'; import type { ToggleDetail, ToggleItem } from './types.js'; export interface ToggleGroupRef extends HTMLElement { /** Returns the pressed item ID(s) as comma-separated string. */ getValue(): string; /** Sets the pressed items (comma-separated IDs or single ID). */ setValue(value: string): void; } /** * In React, reach the imperative methods through a ref: * `const api = useRef(null)`, pass `ref={api}`, then `api.current?.getValue()`. * Available: getValue(), setValue(). * * @csspart base */ export interface ToggleGroupOwnProps { /** * Unique identifier for the element. * @example 'example-id' */ id?: string; /** * Visible label text. * @example 'Example label' */ label?: string; /** * Visual style variant. Allowed values: `outline`, `ghost`, `filled`. * @example 'outline' */ variant?: 'outline' | 'ghost' | 'filled'; /** * Corner radius style. Allowed values: `sharp`, `rounded`, `pill`. * @example 'sharp' */ shape?: 'sharp' | 'rounded' | 'pill'; /** * Selection mode (single or multiple). Allowed values: `single`, `multiple`. * @example 'single' */ mode?: 'single' | 'multiple'; /** * Layout orientation (horizontal or vertical). Allowed values: `horizontal`, `vertical`. * @example 'horizontal' */ orientation?: 'horizontal' | 'vertical'; /** * Semantic color intent (e.g. primary, success, danger). Allowed values: `neutral`, `primary`, `info`, `success`, `warning`, `danger`. * @example 'neutral' */ intent?: 'neutral' | 'primary' | 'info' | 'success' | 'warning' | 'danger'; /** * Component size. Allowed values: `xs`, `sm`, `md`, `lg`, `xl`. * @example 'xs' */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; /** * Disables the component, preventing interaction. * @defaultValue false * @example true */ disabled?: boolean; /** * Controlled pressed item IDs. Pass a single ID or an array. * @example 'example' */ value?: string | string[]; /** * Typed array of item data objects. Bind as a property; do not stringify it or use children for list items. * @example [{ id: 'bold', label: 'Bold' }] */ items?: ToggleItem[]; /** * Fires on each user edit before the value is committed. Detail: `ToggleDetail`. * @example (event) => console.log(event.detail.pressed) */ onInput?: (event: CustomEvent) => void; /** * Fires when the committed component value or state changes. Detail: `ToggleDetail`. * @example (event) => console.log(event.detail.pressed) */ onChange?: (event: CustomEvent) => void; /** CSS class applied to the Custom Element host. * @example 'my-component' */ className?: string; /** Inline styles applied to the Custom Element host. * @example { marginTop: 8 } */ style?: React.CSSProperties; } /** * Props for ``: the component's own API plus every standard DOM * attribute and native React event handler, forwarded verbatim to the * `` host — `id`, `data-*`, `aria-*`, `title`, `tabIndex`, * `slot`, `onMouseEnter`, and the rest. Own props always win over a * same-named DOM attribute. */ export type ToggleGroupProps = ToggleGroupOwnProps & Omit, keyof ToggleGroupOwnProps | 'children' | 'dangerouslySetInnerHTML'>; export declare const ToggleGroup: React.ForwardRefExoticComponent, "children" | "dangerouslySetInnerHTML" | keyof ToggleGroupOwnProps> & React.RefAttributes>;