import { type ReactNode } from "react"; import { type Insets } from "react-native"; import { type ColorTokens, type StyleProp, type ViewStyle, type TextStyle } from "../../style/index.js"; export interface CarouselSkin { /** iOS/web dim the arrow/dot on press; Android uses a ripple instead (null). */ pressedOpacity: number | null; /** Android arrow/dot ripple; null on iOS/web. */ ripple: ((t: ColorTokens) => { color: string; borderless: boolean; }) | null; /** * Web-only focus-outline reset for the arrow/dot 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; /** * Whether the overlaid prev/next arrows show when the `showArrows` prop is * unset. Platform-adaptive: on for web (Embla), OFF for iOS (App Store cards * swipe with page-control dots, no overlay chrome) and Android (M3 carousel * anatomy is container + items only, snap-scroll navigation, no arrows). The * `showArrows` prop still opts them back in for pointer/iPad contexts. */ defaultShowArrows: boolean; /** * Whether the dot indicator strip shows when the `showDots` prop is unset. * Platform-adaptive: on for web + iOS (UIPageControl idiom), OFF for Android * (M3 defines no position/dot indicator). The `showDots` prop opts them in. */ defaultShowDots: boolean; /** * hitSlop padding each arrow's touch target out to the platform minimum * (>= 44pt iOS / >= 48dp Android). hitSlop never affects layout, so the visual * arrow size stays. Undefined on web (no touch-target minimum for a pointer). */ arrowHitSlop?: number | Insets; /** * hitSlop padding each dot's touch target out to the platform minimum. Larger * on the cross axis (to reach the 44/48 strip height) than the main axis (kept * near half the inter-dot pitch so adjacent dot targets barely overlap). */ dotHitSlop?: number | Insets; /** The slide wrapper shape (corner radius; the content clips to it). */ slide: (t: ColorTokens) => ViewStyle; /** The circular arrow button shape (size, radius, fill, border, shadow). */ arrow: (t: ColorTokens) => ViewStyle; /** The chevron glyph size inside an arrow button, in px. */ arrowIconSize: number; /** Extra inset of each arrow from the carousel edge, in px (left/right). */ arrowInset: number; /** The dot strip layout (the centered Row below the slides). */ dotsRow: (t: ColorTokens) => ViewStyle; /** One indicator dot; `active` widens/tints it to the brand `primary`. */ dot: (t: ColorTokens, active: boolean) => ViewStyle; /** The default slide-content text type (when a slide is a plain string). */ slideText: (t: ColorTokens) => TextStyle; } export interface CarouselItem { /** Stable identity for the slide. */ key: string; /** The slide body. A string renders in the skin's slide-text type; a * ReactNode renders as-is. */ content: ReactNode; } export interface CarouselProps { /** The slides, left to right. */ items: CarouselItem[]; /** Controlled current slide. Pair with `onIndexChange`. Omit for uncontrolled. */ index?: number; /** Initial current slide for the uncontrolled case (read once; default 0). */ defaultIndex?: number; /** Called with the next current index whenever the slide changes. */ onIndexChange?: (index: number) => void; /** Wrap from the last slide to the first (and first to last) on arrow nav. */ loop?: boolean; /** Show the overlaid prev/next chevron buttons. Default is platform-adaptive: * on for web, off for iOS + Android (swipe idioms); pass `true` to opt in. */ showArrows?: boolean; /** Show the centered dot indicators below the slides. Default is * platform-adaptive: on for web + iOS (UIPageControl), off for Android M3. */ showDots?: 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 a Carousel component from a platform skin. */ export declare function createCarousel(skin: CarouselSkin): (props: CarouselProps) => import("react").JSX.Element; //# sourceMappingURL=carousel.shared.d.ts.map