UNPKG

strivui

Version:

Type-safe, composable React UI toolkit with accessible, theme-aware components, design tokens, and tree-shakable architecture for scalable, maintainable applications.

83 lines (82 loc) 3.65 kB
import React, { ReactNode, HTMLAttributes, UIEventHandler, CSSProperties, ImgHTMLAttributes, MouseEventHandler } from "react"; type PressableProps = HTMLAttributes<HTMLDivElement> & { onPress?: MouseEventHandler<HTMLDivElement>; children?: ReactNode; style?: CSSProperties; }; declare const Pressable: ({ children, onPress, style, className, ...props }: PressableProps) => import("react/jsx-runtime").JSX.Element; type ScrollViewProps = HTMLAttributes<HTMLDivElement> & { children?: ReactNode; horizontal?: boolean; onScroll?: UIEventHandler<HTMLDivElement>; style?: CSSProperties; }; declare const ScrollView: ({ children, horizontal, style, onScroll, className, ...props }: ScrollViewProps) => import("react/jsx-runtime").JSX.Element; type ImageProps = ImgHTMLAttributes<HTMLImageElement>; declare const Image: (props: ImageProps) => import("react/jsx-runtime").JSX.Element; declare const ActivityIndicator: () => import("react/jsx-runtime").JSX.Element; type TouchableOpacityProps = HTMLAttributes<HTMLDivElement> & { onPress?: MouseEventHandler<HTMLDivElement>; children?: ReactNode; }; declare const TouchableOpacity: ({ children, onPress, className, ...props }: TouchableOpacityProps) => import("react/jsx-runtime").JSX.Element; type FlatListProps<T> = { data: T[]; renderItem: (item: T, index: number) => React.ReactNode; keyExtractor?: (item: T, index: number) => string; }; declare function FlatList<T>({ data, renderItem, keyExtractor }: FlatListProps<T>): import("react/jsx-runtime").JSX.Element; export default FlatList; type ImageBackgroundProps = HTMLAttributes<HTMLDivElement> & { source: string; resizeMode?: "cover" | "contain" | "stretch" | "center"; children?: ReactNode; style?: CSSProperties; }; declare const ImageBackground: ({ source, resizeMode, children, style, className, ...props }: ImageBackgroundProps) => import("react/jsx-runtime").JSX.Element; type ModalProps = { children: ReactNode; open: boolean; onClose?: () => void; }; declare const Modal: ({ open, onClose, children }: ModalProps) => import("react/jsx-runtime").JSX.Element | null; type DialogProps = { title: string; description: string; confirmText?: string; cancelText?: string; onConfirm: () => void; onCancel: () => void; open: boolean; }; declare const Dialog: ({ open, title, description, confirmText, cancelText, onConfirm, onCancel, }: DialogProps) => import("react/jsx-runtime").JSX.Element | null; type ToastContextType = { showToast: (msg: string) => void; }; declare const useToast: () => ToastContextType; declare const ToastProvider: ({ children }: { children: ReactNode; }) => import("react/jsx-runtime").JSX.Element; type SectionListProps<T> = { sections: { title: string; data: T[]; }[]; renderItem: (params: { item: T; index: number; }) => React.ReactNode; renderSectionHeader?: (params: { title: string; sectionIndex: number; }) => React.ReactNode; keyExtractor?: (item: T, index: number) => string; }; declare function SectionList<T>({ sections, renderItem, renderSectionHeader, keyExtractor }: SectionListProps<T>): import("react/jsx-runtime").JSX.Element | null; type OverlayProps = { visible: boolean; onClick?: () => void; children?: ReactNode; }; declare const Overlay: ({ visible, onClick, children }: OverlayProps) => import("react/jsx-runtime").JSX.Element | null; export { FlatList, TouchableOpacity, Pressable, ScrollView, ActivityIndicator, Image, ImageBackground, Modal, Dialog, SectionList, Overlay, ToastProvider, useToast, };