styled-components 6.0.0-beta.4 → 6.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,10 +13,10 @@ declare type OptionalIntersection<A, B> = {
13
13
  * with the passed attr type to capture any intended overrides.
14
14
  */
15
15
  declare type MarkPropsSatisfiedByAttrs<T extends Attrs, Props extends object> = T extends (...args: any) => infer P ? Omit<Props, keyof P> & OptionalIntersection<Props, P> : Omit<Props, keyof T> & Partial<T>;
16
- export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.HTMLAttributes<Target> & React.ComponentPropsWithRef<Target> : object, OuterStatics extends object = object> {
16
+ export interface Styled<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? R extends 'web' ? React.HTMLAttributes<Target> : object & React.ComponentPropsWithRef<Target> : object, OuterStatics extends object = object> {
17
17
  <Props extends object = object, Statics extends object = object>(initialStyles: Styles<OuterProps & Props>, ...interpolations: Interpolation<OuterProps & Props>[]): IStyledComponent<R, Target, OuterProps & Props> & OuterStatics & Statics;
18
18
  attrs: <T extends Attrs>(attrs: AttrsArg<T extends (...args: any) => infer P ? OuterProps & P : OuterProps & T>) => Styled<R, Target, MarkPropsSatisfiedByAttrs<T, OuterProps>, OuterStatics>;
19
19
  withConfig: (config: StyledOptions<R, OuterProps>) => Styled<R, Target, OuterProps, OuterStatics>;
20
20
  }
21
- export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? React.HTMLAttributes<Target> & React.ComponentPropsWithRef<Target> : object, OuterStatics extends object = object>(componentConstructor: IStyledComponentFactory<R, Target, OuterProps, OuterStatics>, tag: Target, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
21
+ export default function constructWithOptions<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object = Target extends KnownTarget ? R extends 'web' ? React.HTMLAttributes<Target> : object & React.ComponentPropsWithRef<Target> : object, OuterStatics extends object = object>(componentConstructor: IStyledComponentFactory<R, Target, OuterProps, OuterStatics>, tag: Target, options?: StyledOptions<R, OuterProps>): Styled<R, Target, OuterProps, OuterStatics>;
22
22
  export {};
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { WebTarget } from '../types';
3
3
  import { Styled } from './constructWithOptions';
4
- declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").HTMLAttributes<Target> & import("react").ComponentPropsWithRef<Target> : object, object>) & {
4
+ declare const styled: (<Target extends WebTarget>(tag: Target) => Styled<"web", Target, Target_1 extends import("../types").KnownTarget ? R extends "web" ? import("react").HTMLAttributes<Target_1> : object & import("react").ComponentPropsWithRef<Target_1> : object, object>) & {
5
5
  a: Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, object>;
6
6
  abbr: Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, object>;
7
7
  address: Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, object>;
@@ -6,31 +6,31 @@ import useTheme from '../hooks/useTheme';
6
6
  import ThemeProvider, { ThemeConsumer, ThemeContext } from '../models/ThemeProvider';
7
7
  import { NativeTarget } from '../types';
8
8
  import isStyledComponent from '../utils/isStyledComponent';
9
- declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.HTMLAttributes<Target> & React.ComponentPropsWithRef<Target> : object, object>) & {
10
- ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, React.HTMLAttributes<typeof import("react-native").ActivityIndicator> & import("react-native").ActivityIndicatorProps & React.RefAttributes<import("react-native").ActivityIndicator>, object>;
11
- Button: Styled<"native", typeof import("react-native").Button, React.HTMLAttributes<typeof import("react-native").Button> & import("react-native").ButtonProps & React.RefAttributes<import("react-native").Button>, object>;
12
- DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, React.HTMLAttributes<typeof import("react-native").DatePickerIOS> & import("react-native").DatePickerIOSProps & React.RefAttributes<import("react-native").DatePickerIOS>, object>;
13
- DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, React.HTMLAttributes<typeof import("react-native").DrawerLayoutAndroid> & import("react-native").DrawerLayoutAndroidProps & React.RefAttributes<import("react-native").DrawerLayoutAndroid>, object>;
14
- FlatList: Styled<"native", typeof import("react-native").FlatList, React.HTMLAttributes<typeof import("react-native").FlatList> & import("react-native").FlatListProps<unknown> & React.RefAttributes<import("react-native").FlatList<unknown>>, object>;
15
- Image: Styled<"native", typeof import("react-native").Image, React.HTMLAttributes<typeof import("react-native").Image> & import("react-native").ImageProps & React.RefAttributes<import("react-native").Image>, object>;
16
- ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, React.HTMLAttributes<typeof import("react-native").ImageBackground> & import("react-native").ImageBackgroundProps & React.RefAttributes<import("react-native").ImageBackground>, object>;
17
- KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, React.HTMLAttributes<typeof import("react-native").KeyboardAvoidingView> & import("react-native").KeyboardAvoidingViewProps & React.RefAttributes<import("react-native").KeyboardAvoidingView>, object>;
18
- Modal: Styled<"native", typeof import("react-native").Modal, React.HTMLAttributes<typeof import("react-native").Modal> & import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps & React.RefAttributes<import("react-native").Modal>, object>;
19
- Pressable: Styled<"native", import("react").ForwardRefExoticComponent<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>>, React.HTMLAttributes<import("react").ForwardRefExoticComponent<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>>> & import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>, object>;
20
- ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, React.HTMLAttributes<typeof import("react-native").ProgressBarAndroid> & import("react-native").ProgressBarAndroidProps & React.RefAttributes<import("react-native").ProgressBarAndroid>, object>;
21
- ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, React.HTMLAttributes<typeof import("react-native").ProgressViewIOS> & import("react-native").ProgressViewIOSProps & React.RefAttributes<import("react-native").ProgressViewIOS>, object>;
22
- RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, React.HTMLAttributes<typeof import("react-native").RefreshControl> & import("react-native").RefreshControlProps & React.RefAttributes<import("react-native").RefreshControl>, object>;
23
- SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, React.HTMLAttributes<typeof import("react-native").SafeAreaView> & import("react-native").ViewProps & React.RefAttributes<import("react-native").SafeAreaView>, object>;
24
- ScrollView: Styled<"native", typeof import("react-native").ScrollView, React.HTMLAttributes<typeof import("react-native").ScrollView> & import("react-native").ScrollViewProps & React.RefAttributes<import("react-native").ScrollView>, object>;
25
- SectionList: Styled<"native", typeof import("react-native").SectionList, React.HTMLAttributes<typeof import("react-native").SectionList> & import("react-native").SectionListProps<unknown, unknown> & React.RefAttributes<import("react-native").SectionList<unknown, unknown>>, object>;
26
- Slider: Styled<"native", typeof import("react-native").Slider, React.HTMLAttributes<typeof import("react-native").Slider> & import("react-native").SliderProps & React.RefAttributes<import("react-native").Slider>, object>;
27
- Switch: Styled<"native", typeof import("react-native").Switch, React.HTMLAttributes<typeof import("react-native").Switch> & import("react-native").SwitchProps & React.RefAttributes<import("react-native").Switch>, object>;
28
- Text: Styled<"native", typeof import("react-native").Text, React.HTMLAttributes<typeof import("react-native").Text> & import("react-native").TextProps & React.RefAttributes<import("react-native").Text>, object>;
29
- TextInput: Styled<"native", typeof import("react-native").TextInput, React.HTMLAttributes<typeof import("react-native").TextInput> & import("react-native").TextInputProps & React.RefAttributes<import("react-native").TextInput>, object>;
30
- TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, React.HTMLAttributes<typeof import("react-native").TouchableHighlight> & import("react-native").TouchableHighlightProps & React.RefAttributes<import("react-native").TouchableHighlight>, object>;
31
- TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, React.HTMLAttributes<typeof import("react-native").TouchableOpacity> & import("react-native").TouchableOpacityProps & React.RefAttributes<import("react-native").TouchableOpacity>, object>;
32
- View: Styled<"native", typeof import("react-native").View, React.HTMLAttributes<typeof import("react-native").View> & import("react-native").ViewProps & React.RefAttributes<import("react-native").View>, object>;
33
- VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, React.HTMLAttributes<typeof import("react-native").VirtualizedList> & import("react-native").VirtualizedListProps<unknown> & React.RefAttributes<import("react-native").VirtualizedList<unknown>>, object>;
9
+ declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? object & React.ComponentPropsWithRef<Target> : object, object>) & {
10
+ ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, object & import("react-native").ActivityIndicatorProps & React.RefAttributes<import("react-native").ActivityIndicator>, object>;
11
+ Button: Styled<"native", typeof import("react-native").Button, object & import("react-native").ButtonProps & React.RefAttributes<import("react-native").Button>, object>;
12
+ DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, object & import("react-native").DatePickerIOSProps & React.RefAttributes<import("react-native").DatePickerIOS>, object>;
13
+ DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, object & import("react-native").DrawerLayoutAndroidProps & React.RefAttributes<import("react-native").DrawerLayoutAndroid>, object>;
14
+ FlatList: Styled<"native", typeof import("react-native").FlatList, object & import("react-native").FlatListProps<unknown> & React.RefAttributes<import("react-native").FlatList<unknown>>, object>;
15
+ Image: Styled<"native", typeof import("react-native").Image, object & import("react-native").ImageProps & React.RefAttributes<import("react-native").Image>, object>;
16
+ ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, object & import("react-native").ImageBackgroundProps & React.RefAttributes<import("react-native").ImageBackground>, object>;
17
+ KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, object & import("react-native").KeyboardAvoidingViewProps & React.RefAttributes<import("react-native").KeyboardAvoidingView>, object>;
18
+ Modal: Styled<"native", typeof import("react-native").Modal, object & import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps & React.RefAttributes<import("react-native").Modal>, object>;
19
+ Pressable: Styled<"native", import("react").ForwardRefExoticComponent<import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>>, object & import("react-native").PressableProps & import("react").RefAttributes<import("react-native").View>, object>;
20
+ ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, object & import("react-native").ProgressBarAndroidProps & React.RefAttributes<import("react-native").ProgressBarAndroid>, object>;
21
+ ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, object & import("react-native").ProgressViewIOSProps & React.RefAttributes<import("react-native").ProgressViewIOS>, object>;
22
+ RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, object & import("react-native").RefreshControlProps & React.RefAttributes<import("react-native").RefreshControl>, object>;
23
+ SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, object & import("react-native").ViewProps & React.RefAttributes<import("react-native").SafeAreaView>, object>;
24
+ ScrollView: Styled<"native", typeof import("react-native").ScrollView, object & import("react-native").ScrollViewProps & React.RefAttributes<import("react-native").ScrollView>, object>;
25
+ SectionList: Styled<"native", typeof import("react-native").SectionList, object & import("react-native").SectionListProps<unknown, unknown> & React.RefAttributes<import("react-native").SectionList<unknown, unknown>>, object>;
26
+ Slider: Styled<"native", typeof import("react-native").Slider, object & import("react-native").SliderProps & React.RefAttributes<import("react-native").Slider>, object>;
27
+ Switch: Styled<"native", typeof import("react-native").Switch, object & import("react-native").SwitchProps & React.RefAttributes<import("react-native").Switch>, object>;
28
+ Text: Styled<"native", typeof import("react-native").Text, object & import("react-native").TextProps & React.RefAttributes<import("react-native").Text>, object>;
29
+ TextInput: Styled<"native", typeof import("react-native").TextInput, object & import("react-native").TextInputProps & React.RefAttributes<import("react-native").TextInput>, object>;
30
+ TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, object & import("react-native").TouchableHighlightProps & React.RefAttributes<import("react-native").TouchableHighlight>, object>;
31
+ TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, object & import("react-native").TouchableOpacityProps & React.RefAttributes<import("react-native").TouchableOpacity>, object>;
32
+ View: Styled<"native", typeof import("react-native").View, object & import("react-native").ViewProps & React.RefAttributes<import("react-native").View>, object>;
33
+ VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, object & import("react-native").VirtualizedListProps<unknown> & React.RefAttributes<import("react-native").VirtualizedList<unknown>>, object>;
34
34
  };
35
35
  export { IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, StyledOptions, } from '../types';
36
36
  export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme };
@@ -18,7 +18,7 @@ var SC_ATTR = (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR
18
18
  'data-styled';
19
19
  var SC_ATTR_ACTIVE = 'active';
20
20
  var SC_ATTR_VERSION = 'data-styled-version';
21
- var SC_VERSION = "6.0.0-beta.4";
21
+ var SC_VERSION = "6.0.0-beta.5";
22
22
  var SPLITTER = '/*!sc*/\n';
23
23
  var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
24
24
  var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean'