import * as RN from "react-native"; import { ImageProps, ImageSourcePropType, TextStyle } from "react-native"; import * as React$1 from "react"; import { ReactElement } from "react"; //#region ../../node_modules/@emotion/react/dist/declarations/src/types.d.ts /** * @desc Utility type for getting props type of React component. * It takes `defaultProps` into an account - making props with defaults optional. */ type PropsOf> = ReactJSX.LibraryManagedAttributes>; type DistributiveOmit = T extends any ? Pick> : never; //#endregion //#region ../../node_modules/@emotion/react/dist/declarations/src/theming.d.ts export interface Theme extends StorybookTheme {} interface ThemeProviderProps { theme: Partial | ((outerTheme: Theme) => Theme); children: React$1.ReactNode; } interface ThemeProvider { (props: ThemeProviderProps): React$1.ReactElement; } declare const useTheme: () => Theme; interface ThemeProviderProps { theme: Partial | ((outerTheme: Theme) => Theme); children: React$1.ReactNode; } declare const ThemeProvider: (props: ThemeProviderProps) => React$1.JSX.Element; declare function withTheme>>(Component: C): React$1.ForwardRefExoticComponent, 'theme'> & { theme?: Theme; }>; //#endregion //#region ../../node_modules/@emotion/react/dist/declarations/src/jsx-namespace.d.ts type IsPreReact19 = 2 extends Parameters>['length'] ? true : false; /** @ts-ignore */ type ReactJSXElement = true extends IsPreReact19 ? JSX.Element : React.JSX.Element; /** @ts-ignore */ type ReactJSXElementClass = true extends IsPreReact19 ? JSX.ElementClass : React.JSX.ElementClass; /** @ts-ignore */ type ReactJSXElementAttributesProperty = true extends IsPreReact19 ? JSX.ElementAttributesProperty : React.JSX.ElementAttributesProperty; /** @ts-ignore */ type ReactJSXElementChildrenAttribute = true extends IsPreReact19 ? JSX.ElementChildrenAttribute : React.JSX.ElementChildrenAttribute; /** @ts-ignore */ type ReactJSXLibraryManagedAttributes = true extends IsPreReact19 ? JSX.LibraryManagedAttributes : React.JSX.LibraryManagedAttributes; /** @ts-ignore */ type ReactJSXIntrinsicAttributes = true extends IsPreReact19 ? JSX.IntrinsicAttributes : React.JSX.IntrinsicAttributes; /** @ts-ignore */ type ReactJSXIntrinsicClassAttributes = true extends IsPreReact19 ? JSX.IntrinsicClassAttributes : React.JSX.IntrinsicClassAttributes; /** @ts-ignore */ type ReactJSXIntrinsicElements = true extends IsPreReact19 ? JSX.IntrinsicElements : React.JSX.IntrinsicElements; /** @ts-ignore */ type ReactJSXElementType = true extends IsPreReact19 ? string | React.JSXElementConstructor : React.JSX.ElementType; declare namespace ReactJSX { type ElementType = ReactJSXElementType; interface Element extends ReactJSXElement {} interface ElementClass extends ReactJSXElementClass {} interface ElementAttributesProperty extends ReactJSXElementAttributesProperty {} interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} type LibraryManagedAttributes = ReactJSXLibraryManagedAttributes; interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} interface IntrinsicClassAttributes extends ReactJSXIntrinsicClassAttributes {} type IntrinsicElements = ReactJSXIntrinsicElements; } //#endregion //#region ../../node_modules/@emotion/native/dist/declarations/types/base.d.ts type ReactNativeStyle = RN.ViewStyle | RN.TextStyle | RN.ImageStyle; type ReactNativeStyleType = Props extends { style?: RN.StyleProp; } ? StyleType extends ReactNativeStyle ? StyleType : ReactNativeStyle : ReactNativeStyle; type InterpolationPrimitive = null | undefined | boolean | number | string | ObjectInterpolation; type ObjectInterpolation = StyleType; interface ArrayInterpolation extends Array> {} interface FunctionInterpolation { (mergedProps: MergedProps): Interpolation; } type Interpolation = InterpolationPrimitive | ArrayInterpolation | FunctionInterpolation; /** Same as StyledOptions but shouldForwardProp must be a type guard */ interface FilteringStyledOptions, ForwardedProps extends keyof Props & string = keyof Props & string> { shouldForwardProp?: (propName: string) => propName is ForwardedProps; } interface StyledOptions> { shouldForwardProp?: (propName: string) => boolean; } /** * @typeparam ComponentProps Props which will be included when withComponent is called * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called */ interface StyledComponent extends React.FC { withComponent>>(component: C): StyledComponent, {}, { ref?: React.Ref>; }>; withComponent>>(component: C): StyledComponent>; } /** * @typeparam ComponentProps Props which will be included when withComponent is called * @typeparam SpecificComponentProps Props which will *not* be included when withComponent is called */ interface CreateStyledComponent { /** * @typeparam AdditionalProps Additional props to add to your styled component */ (...styles: ArrayInterpolation): StyledComponent; /** * @typeparam AdditionalProps Additional props to add to your styled component */ (template: TemplateStringsArray, ...styles: ArrayInterpolation): StyledComponent; } /** * @desc * This function accepts a React component. * * @example styled(MyComponent)({ width: 100 }) * @example styled(MyComponent)(myComponentProps => ({ width: myComponentProps.width }) * @example styled(View)({ width: 100 }) * @example styled(View)(props => ({ width: props.width }) */ interface CreateStyled$1 { >, ForwardedProps extends keyof React.ComponentProps & string = keyof React.ComponentProps & string>(component: C, options: FilteringStyledOptions, ForwardedProps>): CreateStyledComponent, ForwardedProps> & { theme?: Theme; as?: React.ElementType; }, {}, { ref?: React.Ref>; }, ReactNativeStyleType>>; >>(component: C, options?: StyledOptions>): CreateStyledComponent & { theme?: Theme; as?: React.ElementType; }, {}, { ref?: React.Ref>; }, ReactNativeStyleType>>; >, ForwardedProps extends keyof React.ComponentProps & string = keyof React.ComponentProps & string>(component: C, options: FilteringStyledOptions, ForwardedProps>): CreateStyledComponent, ForwardedProps> & { theme?: Theme; as?: React.ElementType; }, {}, {}, ReactNativeStyleType>>; >>(component: C, options?: StyledOptions>): CreateStyledComponent & { theme?: Theme; as?: React.ElementType; }, {}, {}, ReactNativeStyleType>>; } //#endregion //#region ../../node_modules/@emotion/native/dist/declarations/types/index.d.ts type ReactNative = typeof RN; // those 2 are just copies of the `BaseCreateStyled` with supplied `C` type argument type HostClassComponent> = CreateStyledComponent & { theme?: Theme; as?: React.ElementType; }, {}, { ref?: React.Ref>; }, ReactNativeStyleType>>; type HostFunctionComponent> = CreateStyledComponent & { theme?: Theme; as?: React.ElementType; }, {}, {}, ReactNativeStyleType>>; interface StyledComponents { ActivityIndicator: HostClassComponent; Button: HostClassComponent; DatePickerIOS: HostClassComponent; DrawerLayoutAndroid: HostClassComponent; FlatList: HostClassComponent; Image: HostClassComponent; ImageBackground: HostClassComponent; KeyboardAvoidingView: HostClassComponent; ListView: HostClassComponent; Modal: HostClassComponent; NavigatorIOS: HostClassComponent; Picker: HostClassComponent; PickerIOS: HostClassComponent; Pressable: HostFunctionComponent; ProgressBarAndroid: HostClassComponent; ProgressViewIOS: HostClassComponent; RecyclerViewBackedScrollView: HostClassComponent; RefreshControl: HostClassComponent; SafeAreaView: HostClassComponent; ScrollView: HostClassComponent; SectionList: HostClassComponent; SegmentedControlIOS: HostClassComponent; Slider: HostClassComponent; SnapshotViewIOS: HostClassComponent; StatusBar: HostClassComponent; SwipeableListView: HostClassComponent; Switch: HostClassComponent; SwitchIOS: HostClassComponent; TabBarIOS: HostClassComponent; Text: HostClassComponent; TextInput: HostClassComponent; ToolbarAndroid: HostClassComponent; TouchableHighlight: HostClassComponent; TouchableNativeFeedback: HostClassComponent; TouchableOpacity: HostClassComponent; TouchableWithoutFeedback: HostClassComponent; View: HostClassComponent; ViewPagerAndroid: HostClassComponent; } interface CreateStyled extends CreateStyled$1, StyledComponents {} declare const styled: CreateStyled; //#endregion //#region src/web-theme.d.ts declare const color: { primary: string; secondary: string; secondaryLighter: string; tertiary: string; ancillary: string; orange: string; gold: string; green: string; seafoam: string; purple: string; ultraviolet: string; lightest: string; lighter: string; light: string; mediumlight: string; medium: string; mediumdark: string; dark: string; darker: string; darkest: string; border: string; positive: string; negative: string; warning: string; critical: string; defaultText: string; inverseText: string; positiveText: string; negativeText: string; warningText: string; }; declare const background: { app: string; bar: string; content: string; preview: string; gridCellSize: number; hoverable: string; positive: string; negative: string; warning: string; critical: string; }; declare const typography: { weight: { regular: TextStyle["fontWeight"]; bold: TextStyle["fontWeight"]; }; size: { s1: number; s2: number; s3: number; m1: number; m2: number; m3: number; l1: number; l2: number; l3: number; code: number; }; }; type Color = typeof color; type Background = typeof background; type Typography = typeof typography; interface Brand { title?: string | undefined; url?: string | null | undefined; image?: ImageSourcePropType | ReactElement | null | undefined; resizeMode?: ImageProps['resizeMode'] | null | undefined; target?: string | null | undefined; } interface StorybookThemeWeb { base: 'light' | 'dark'; color: Color; background: Background; typography: Typography; textMutedColor: string; input: { border: string; background: string; color: string; borderRadius: number; paddingHorizontal: number; paddingVertical: number; }; button: { background: string; border: string; }; boolean: { background: string; selectedBackground: string; }; layoutMargin: number; appBorderColor: string; appBorderRadius: number; barTextColor: string; barHoverColor: string; barSelectedColor: string; barBg: string; brand?: Brand; } //#endregion //#region src/theme.d.ts type StorybookTheme = StorybookThemeWeb; declare const theme: StorybookThemeWeb; declare const darkTheme: StorybookThemeWeb; //#endregion export { type StorybookTheme, type StyledComponent, ThemeProvider, darkTheme, styled, theme, useTheme, withTheme };