import type { JSX, ValidComponent } from "@solidjs/web"; import type { BaseUIComponentProps, Orientation } from "../../internals/types.js"; import { type AccordionRootChangeEventDetails, type AccordionRootChangeEventReason, type AccordionRootState, type AccordionValue } from "../accordion-root-context.js"; export type { AccordionRootChangeEventDetails, AccordionRootChangeEventReason, AccordionRootState, AccordionValue, }; export interface AccordionRootProps extends Omit>, "value"> { /** * Controlled open values. When provided (any defined value — an * explicitly passed empty array counts), the consumer owns the state — * pair with {@link onValueChange}. When omitted, the accordion manages * its own open set (seeded from {@link defaultValue}). An empty array * means "no item open". */ value?: AccordionValue | undefined; /** * Initial open values when uncontrolled. Read once at mount. * @default [] */ defaultValue?: AccordionValue | undefined; /** Tag/component to render. Defaults to `"div"`. */ as?: ValidComponent; /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean | undefined; /** * Allows the browser's built-in page search to find and expand closed * panels via `hidden="until-found"`. Forces panels to stay mounted. * @default false */ hiddenUntilFound?: boolean | undefined; /** * Whether panels stay mounted when closed. Ignored when * {@link hiddenUntilFound} is `true`. * @default false */ keepMounted?: boolean | undefined; /** * Whether arrow-key navigation between triggers wraps around at the * extents. * @default true */ loopFocus?: boolean | undefined; /** * Fired when an item expands or collapses. The first argument is the new * array of open values; the second is a cancel-capable details bag — * calling `eventDetails.cancel()` keeps the accordion's own * (uncontrolled) state unchanged, mirroring React Base UI; controlled * consumers simply don't update their signal. */ onValueChange?: ((value: AccordionValue, eventDetails: AccordionRootChangeEventDetails) => void) | undefined; /** * Whether multiple items can be open at the same time. * @default false */ multiple?: boolean | undefined; /** * Visual orientation — controls whether arrow-up/down or arrow-left/right * move roving focus between triggers. * @default "vertical" */ orientation?: Orientation | undefined; } /** * Groups all parts of the accordion. Renders a `
`. * * Solid 2 notes: * * - Accessor-form reads for every reactive input — no top-level reactive * reads, no destructuring of `props`. * - `value` is always stored internally as an array: single-expand mode is * encoded as `[]` or `[currentlyOpenValue]`, multi-expand as the full * open set. This lets the item's `isOpen` predicate be the same regardless * of mode. * - Context provider sits INSIDE `get children()` (not wrapped around the * root element) so the attribute getters and the `state` memo stay owned * by this component's setup scope — matches `radio-group.tsx`. * - Items register with a ``. The trigger's keyboard handler * walks that list to find sibling triggers (see `accordion-trigger.tsx`). */ export declare function AccordionRoot(props: AccordionRootProps): JSX.Element; //# sourceMappingURL=accordion-root.d.ts.map