import { type ReactNode } from "react"; import { type ColorTokens, type StyleProp, type ViewStyle, type TextStyle } from "../../style/index.js"; export interface AccordionSkin { /** iOS/web dim the header on press; Android uses a ripple instead (null). */ pressedOpacity: number | null; /** Android header ripple; null on iOS/web. */ ripple: ((t: ColorTokens) => { color: string; borderless: boolean; }) | null; /** * Web-only focus-outline reset for the header Pressables, so the * react-native-web keyboard-focus blue ring (which a real device never shows) * is suppressed. No-op natively, where `outline*` are not real styles. */ focusOutlineReset?: ViewStyle; /** Chevron glyph size, in px. The glyph paints in the `muted-foreground` token * (the HIG tertiary-gray / M3 on-surface-variant disclosure tint) on every * platform, via the kit Icon's `muted` color prop. */ chevronSize: number; /** The disclosure chevron glyph at rest: `chevronRight` on iOS/web (the HIG/Radix * tree-disclosure caret, points right and rotates to point down), or `chevronDown` * on Android (the M3 in-place-expansion affordance, points down and rotates to * point up). */ chevronGlyph: "chevronRight" | "chevronDown"; /** Degrees the chevron rotates to when OPEN: 90 for the iOS/web right->down idiom, * 180 for the M3 down->up (expand_more -> expand_less) idiom. */ chevronSpinTo: number; /** The optional outer container shape (iOS inset-grouped card; flat on web/Android). */ container: (t: ColorTokens) => ViewStyle; /** The `card` variant's surface: an outlined card container wrapping the whole * group on web/Android. On iOS this ALIASES `container` (the default skin * already IS the inset-grouped card), so `card` is a documented no-op there. */ cardContainer: (t: ColorTokens) => ViewStyle; /** The extra header inset applied in `card` mode. Idempotent where the header * already carries the same horizontal inset (iOS/Android): style-array merge * overrides per key, it never sums. */ cardHeaderInset: ViewStyle; /** The extra content inset applied in `card` mode (idempotent, as above). */ cardContentInset: ViewStyle; /** The inter-row divider line, rendered by the shell only between rows (never after * the last one): a full-bleed hairline on web/Android, inset to the text leading * edge on iOS (the grouped-list separator). */ separator: (t: ColorTokens) => ViewStyle; /** The header trigger row layout/insets. */ header: (t: ColorTokens) => ViewStyle; /** The header title type. */ title: (t: ColorTokens) => TextStyle; /** The muted secondary description line under a row's title (the skin's type * ramp, one step below the title). */ description: (t: ColorTokens) => TextStyle; /** The content panel insets. */ content: (t: ColorTokens) => ViewStyle; /** The default content text type (when an item's content is a plain string). */ contentText: (t: ColorTokens) => TextStyle; } export interface AccordionItem { /** Stable identity for the panel; also its controlled-value token. */ key: string; /** The header label. */ title: string; /** The muted secondary line under this row's title. */ description?: string; /** The collapsible panel body. A string renders in the skin's content type; a * ReactNode renders as-is. */ content: ReactNode; /** A disabled row does not toggle and reads dimmed. */ disabled?: boolean; } export interface AccordionProps { /** The disclosure rows, top to bottom. */ items?: AccordionItem[]; /** * Controlled open state. A single key in single-open mode, an array of keys in * `multiple` mode. Pair with `onValueChange`. Omit for uncontrolled. */ value?: string | string[]; /** Initial open state for the uncontrolled case (read once). */ defaultValue?: string | string[]; /** Called with the next open value whenever a header toggles. */ onValueChange?: (value: string | string[]) => void; /** Allow more than one panel open at once (default: single-open). */ multiple?: boolean; /** * Card surface: wraps the group in an outlined card container with inset * headers and content (web/Android). On iOS the default Accordion already * renders as the inset-grouped card, so `card` is a no-op there. */ card?: boolean; /** Disable the whole group (every row stops toggling and dims). */ disabled?: boolean; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** Build an Accordion component from a platform skin. */ export declare function createAccordion(skin: AccordionSkin): (props: AccordionProps) => import("react").JSX.Element; //# sourceMappingURL=accordion.shared.d.ts.map