import type { FC, PropsWithChildren } from 'react'; import type React from 'react'; import type { Animated, ImageSourcePropType, StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from 'react-native'; import { Swipeable } from 'react-native-gesture-handler'; import type Icon from './components/Icons/Icon'; import type { defaultTypography } from './core/typography/typography'; export type DefaultProps = { theme?: { [index: string]: string; }; } & { typography?: TypographyType; }; /** * Functional component with children */ export type FCC

= FC>; /** * Functional component with children and theme */ export type FCCWT

= FCC

; /** * * Functional component with children and defaults */ export type FCCWD

= FCC

; export type ThemeType = { dark: { [index: string]: string; }; light: { [index: string]: string; }; }; export type TypographyType = typeof defaultTypography & any; export type AccordionListProps = { data: any[]; left?: (expanded: boolean) => React.ReactNode; right?: (expanded: boolean) => React.ReactNode; onExpand?: () => void; label?: string; labelContainerStyle?: StyleProp; onSelect: (params: any) => void; itemDisplay: (params: any) => any; labelStyle?: StyleProp; rowTextStyle?: StyleProp; rowStyle?: StyleProp; testID?: string; }; export type AvatarGroupProps = { avatarsType: Array<{ source?: ImageSourcePropType; borderStyle?: 'circular' | 'rounded'; avatarIcon?: React.ReactNode; containerStyle?: StyleProp; label?: string; labelStyle?: StyleProp; badgePosition?: 'top' | 'bottom'; badgeStyle?: { containerStyle?: StyleProp; textStyle?: StyleProp; }; badgeContent?: React.ReactNode; }>; avatarLimit?: number; limitContainerStyle?: { style: StyleProp; backgroundColor: string; }; }; export type AvatarProps = { size?: 'small' | 'medium'; source?: ImageSourcePropType; borderStyle?: 'circular' | 'rounded'; avatarIcon?: React.ReactNode; containerStyle?: StyleProp; label?: string; labelStyle?: StyleProp; badgePosition?: 'top' | 'bottom'; badgeStyle?: { containerStyle?: StyleProp; textStyle?: StyleProp; }; badgeContent?: React.ReactNode; }; export type BadgeProps = { visible?: boolean; label?: string | number; size?: 'medium' | 'small'; containerStyle?: StyleProp; textStyles?: StyleProp; borderStyle?: 'circular' | 'rectangular'; icon?: React.ReactNode; }; export type ButtonProps = { size?: 'large' | 'medium' | 'small'; disabled?: boolean; label?: string; children?: any; statusStyle?: { default: { container: { backgroundColor: string; }; text: { color: string; }; }; focused: { container: { backgroundColor: string; }; text: { color: string; }; }; disabled: { container: { backgroundColor: string; }; text: { color: string; }; }; }; iconPosition?: 'left' | 'right'; style?: StyleProp; textStyle?: StyleProp; }; export type CheckBoxProps = { onChange?: (prop: boolean) => void; onPress?: (prop: boolean) => void; style?: StyleProp; value?: boolean | undefined; disabled?: boolean; iconColor?: string; }; export type ChipProps = { label?: string; textStyle?: StyleProp; style?: StyleProp; value?: boolean; icon?: { iconName: string; iconType: IconType; iconPosition: 'left' | 'right'; }; colorStyle?: { backgroundColor: string; selectBackgroundColor: string; selectTitleColor: string; titleColor: string; }; size?: 'large' | 'medium' | 'small'; onChange: (event: boolean) => void; disable?: boolean; }; export type DividerProps = { borderStyle?: 'solid' | 'dotted' | 'dashed'; width?: number; color?: string; style?: StyleProp; }; export type DrowdownProps = { selectall?: boolean; disabled?: boolean | undefined; displayLength?: number; data: Array; buttonStyle?: StyleProp; displayedRowValue: (item: string | object) => any; displayedButtonValue: (item: string | object) => any; containerStyle?: StyleProp; buttonTitle?: string; rowStyle?: StyleProp; onSelect?: (item: Array | Array | object | string) => void; defaultValue?: Array; rowTextStyle?: StyleProp; buttonTextStyle?: StyleProp; listContainerStyle?: StyleProp; left?: (isVisible: boolean) => React.ReactNode; right?: (isVisible: boolean) => React.ReactNode; onComplete?: (item: string | object) => void; buttonBackgrounColor?: { focusBackground: string; defaultBackground: string; }; iconStyle?: { color: string; container: StyleProp; }; autoPosition?: boolean; testID?: string; }; export type DrowdownRouteProps = DrowdownProps & { multiple?: boolean; }; export type IconButtonProps = { iconColor?: string; containerColor?: string; style: ViewStyle; icon: { type: IconType; name: string; size: number; }; focusedColor: string; }; export type IconProps = { name: string; color?: string; size: number; style?: ViewStyle; allowFontScaling?: boolean; }; export type IconComponentProps = TextProps & { name: string; color?: string; size: number; pointerEvents?: ViewProps['pointerEvents']; }; export type IconComponentType = React.ComponentType; export type MenuProps = { items: Array<{ label: string; left?: React.ReactNode; right?: React.ReactNode; onPress?: () => void; }>; containerStyle?: StyleProp; labelStyle?: StyleProp; dividerColor?: string; menuStyle?: ViewStyle; button?: (isOpen: boolean) => React.ReactNode; rowStyle?: StyleProp; closeOnPress?: boolean; }; export type ProgressBarProps = { progress?: number; barColor?: string; progressColor?: string; progressStyle?: StyleProp; testID?: string; }; export type RadioButtonProps = { onChange: (event: boolean) => void; style?: StyleProp; testID: string; }; export type SearchBarProps = { size?: 'small' | 'medium' | 'large'; style?: StyleProp; value?: string; filterPattern: (text: string) => Array; filterOnChange: (event: any) => any; }; export type SliderProps = { showPercentage?: boolean; onChangeEnd: (value: number) => void; value?: number; buttonStyle?: StyleProp; barStyle?: StyleProp; progressStyle?: StyleProp; }; export type ActionProps = { text?: string; style?: StyleProp; icon?: React.ReactNode; textStyle?: StyleProp; onPress?: (ref: React.RefObject) => void; }; export type SwipeProps = { children?: any; variant?: 'radius' | 'no-radius'; rightActions?: Array; leftAction?: ActionProps; }; export type RenderRightActionProps = { item: ActionProps; dragValue: number; progress: Animated.AnimatedInterpolation; index: number; }; export type TextInputProps = { size?: 'large' | 'medium' | 'small'; iconPosition?: 'left' | 'right'; labelColor?: { focus: string; default: string; }; helperText?: string; helperTextStyle?: StyleProp; variant?: 'filled' | 'outlined'; inputContainerStyle?: StyleProp; labelContainerStyle?: StyleProp; count?: boolean; label?: string; labelStyle?: StyleProp; editable?: boolean; inputStyle?: StyleProp; errorMessage?: string; containerStyle?: StyleProp; error?: boolean; left?: React.ReactNode; right?: React.ReactNode; }; export type ToggleButtonProps = { buttons: { label: string; onPress: (event: boolean) => void; id?: number; }[]; size?: 'small' | 'medium'; }; export type SpeedDialProps = { items: Array<{ icon?: React.ReactNode; title?: string; titleColor?: string; backgroundColor?: string; onPress?: () => void; }>; baseItemBackground?: string; variant: 'flat' | 'spread'; onChange?: (event: boolean) => void; baseItemIcon?: React.ReactNode; }; export type ModalProps = { containerStyle?: StyleProp; modalStyle?: StyleProp; visible?: boolean; children?: React.ReactNode; }; export type NotificationProps = { items: [{ status: 'SUCCESS' | 'WARNING' | 'ERROR' | 'INFO'; header?: string; message?: string; keyID?: number; }]; containerStyle?: StyleProp; limit?: number; }; export type PagerViewProps = { children: React.ReactNode; containerStyle?: StyleProp; pageContainerStyle?: StyleProp; injectPagerRef?: boolean; headerTextColor?: { select: string; default: string; }; headerSliderStyle?: StyleProp; headerContainerStyle?: StyleProp; headerTextStyle?: StyleProp; showDivider?: boolean; dividerStyle?: StyleProp; dividerColor?: string; icons?: React.ReactElement[]; }; export type ActivityIndicatorProps = { children?: React.ReactNode; }; export type IconType = 'material' | 'material-community' | 'simple-line-icon' | 'zocial' | 'font-awesome' | 'octicon' | 'ionicon' | 'foundation' | 'feather' | 'ant-design' | 'fontisto' | 'evilicon' | 'entypo' | 'antdesign' | 'font-awesome-5';