Skip to content

Commit 12d9637

Browse files
committed
update generate types
1 parent 408dbbc commit 12d9637

File tree

20 files changed

+110
-78
lines changed

20 files changed

+110
-78
lines changed

generatedTypes/components/actionBar/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { ViewStyle } from 'react-native';
3-
import { ButtonPropTypes } from '../button';
3+
import { ButtonProps } from '../button';
44
/**
55
* @description: Quick actions bar, each action support Button component props
66
* @modifiers: margin, padding
@@ -19,7 +19,7 @@ export declare type ActionBarProps = {
1919
/**
2020
* actions for the action bar
2121
*/
22-
actions: ButtonPropTypes[];
22+
actions: ButtonProps[];
2323
/**
2424
* should action be equally centered
2525
*/

generatedTypes/components/avatar/index.d.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export declare enum BadgePosition {
1414
BOTTOM_RIGHT = "BOTTOM_RIGHT",
1515
BOTTOM_LEFT = "BOTTOM_LEFT"
1616
}
17-
export declare type AvatarPropTypes = {
17+
export declare type AvatarProps = {
1818
/**
1919
* Adds fade in animation when Avatar image loads
2020
*/
@@ -108,6 +108,7 @@ export declare type AvatarPropTypes = {
108108
*/
109109
testID?: string;
110110
};
111+
export declare type AvatarPropTypes = AvatarProps;
111112
/**
112113
* @description: Avatar component for displaying user profile images
113114
* @extends: TouchableOpacity
@@ -116,9 +117,9 @@ export declare type AvatarPropTypes = {
116117
* @image: https://user-images.githubusercontent.com/33805983/34480603-197d7f64-efb6-11e7-9feb-db8ba756f055.png
117118
* @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/AvatarsScreen.js
118119
*/
119-
declare class Avatar extends PureComponent<AvatarPropTypes> {
120+
declare class Avatar extends PureComponent<AvatarProps> {
120121
styles: ReturnType<typeof createStyles>;
121-
constructor(props: AvatarPropTypes);
122+
constructor(props: AvatarProps);
122123
static displayName: string;
123124
static modes: typeof StatusModes;
124125
static badgePosition: typeof BadgePosition;
@@ -142,7 +143,7 @@ declare class Avatar extends PureComponent<AvatarPropTypes> {
142143
renderImage(): JSX.Element | undefined;
143144
render(): JSX.Element;
144145
}
145-
declare function createStyles(props: AvatarPropTypes): {
146+
declare function createStyles(props: AvatarProps): {
146147
initialsContainerWithInset: {
147148
top: number;
148149
right: number;
@@ -160,7 +161,7 @@ declare function createStyles(props: AvatarPropTypes): {
160161
};
161162
};
162163
export { Avatar };
163-
declare const _default: React.ComponentClass<AvatarPropTypes & {
164+
declare const _default: React.ComponentClass<AvatarProps & {
164165
useCustomTheme?: boolean | undefined;
165166
}, any> & typeof Avatar;
166167
export default _default;

generatedTypes/components/button/index.d.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
22
import { LayoutChangeEvent, ImageStyle, TextStyle, StyleProp } from 'react-native';
33
import { BaseComponentInjectedProps, ForwardRefInjectedProps, TypographyModifiers, ColorsModifiers, BackgroundColorModifier, MarginModifiers } from '../../commons/new';
44
import { TouchableOpacityProps } from '../touchableOpacity';
5-
import { TextPropTypes } from '../text';
5+
import { TextProps } from '../text';
66
export declare enum ButtonSize {
77
xSmall = "xSmall",
88
small = "small",
@@ -14,7 +14,7 @@ export declare enum AnimationDirection {
1414
left = "left",
1515
right = "right"
1616
}
17-
export declare type ButtonPropTypes = TouchableOpacityProps & TypographyModifiers & ColorsModifiers & BackgroundColorModifier & MarginModifiers & {
17+
export declare type ButtonProps = TouchableOpacityProps & TypographyModifiers & ColorsModifiers & BackgroundColorModifier & MarginModifiers & {
1818
/**
1919
* Text to show inside the button
2020
*/
@@ -90,7 +90,7 @@ export declare type ButtonPropTypes = TouchableOpacityProps & TypographyModifier
9090
/**
9191
* Props that will be passed to the button's Text label.
9292
*/
93-
labelProps?: TextPropTypes;
93+
labelProps?: TextProps;
9494
/**
9595
* should the button act as a coast to coast button (no border radius)
9696
*/
@@ -126,12 +126,13 @@ export declare type ButtonPropTypes = TouchableOpacityProps & TypographyModifier
126126
*/
127127
animateTo?: AnimationDirection;
128128
};
129+
export declare type ButtonPropTypes = ButtonProps;
129130
export declare type ButtonState = {
130131
size?: number;
131132
borderRadius?: number;
132133
isLandscape?: boolean;
133134
};
134-
declare type Props = ButtonPropTypes & BaseComponentInjectedProps & ForwardRefInjectedProps;
135+
declare type Props = ButtonProps & BaseComponentInjectedProps & ForwardRefInjectedProps;
135136
/**
136137
* @description: Basic button component
137138
* @extends: TouchableOpacity
@@ -344,7 +345,9 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
344345
trailing: boolean;
345346
} | undefined;
346347
activeBackgroundColor?: string | undefined;
347-
useNative?: boolean | undefined;
348+
useNative?: boolean | undefined; /**
349+
* Text to show inside the button
350+
*/
348351
customValue?: any;
349352
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
350353
onPress?: ((props: TouchableOpacityProps) => void) | undefined;
@@ -501,7 +504,9 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
501504
trailing: boolean;
502505
} | undefined;
503506
activeBackgroundColor?: string | undefined;
504-
useNative?: boolean | undefined;
507+
useNative?: boolean | undefined; /**
508+
* Text to show inside the button
509+
*/
505510
customValue?: any;
506511
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
507512
onPress?: ((props: TouchableOpacityProps) => void) | undefined;
@@ -658,7 +663,9 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
658663
trailing: boolean;
659664
} | undefined;
660665
activeBackgroundColor?: string | undefined;
661-
useNative?: boolean | undefined;
666+
useNative?: boolean | undefined; /**
667+
* Text to show inside the button
668+
*/
662669
customValue?: any;
663670
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
664671
onPress?: ((props: TouchableOpacityProps) => void) | undefined;
@@ -815,7 +822,9 @@ declare const _default: React.ComponentClass<(Pick<import("react-native").Toucha
815822
trailing: boolean;
816823
} | undefined;
817824
activeBackgroundColor?: string | undefined;
818-
useNative?: boolean | undefined;
825+
useNative?: boolean | undefined; /**
826+
* Text to show inside the button
827+
*/
819828
customValue?: any;
820829
style?: false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined> | import("react-native").Animated.AnimatedProps<import("react-native").ViewStyle> | import("react-native").Animated.AnimatedProps<import("react-native").RegisteredStyle<import("react-native").ViewStyle>> | import("react-native").Animated.AnimatedProps<import("react-native").RecursiveArray<false | import("react-native").ViewStyle | import("react-native").RegisteredStyle<import("react-native").ViewStyle> | null | undefined>> | null | undefined;
821830
onPress?: ((props: TouchableOpacityProps) => void) | undefined;

generatedTypes/components/card/CardSection.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
22
import { ViewStyle, ImageStyle, ImageSourcePropType, StyleProp } from 'react-native';
3-
import { ViewPropTypes } from '../view';
4-
import { TextPropTypes } from '../text';
3+
import { ViewProps } from '../view';
4+
import { TextProps } from '../text';
55
import { ImageProps } from '../image';
6-
declare type ContentType = TextPropTypes & {
6+
declare type ContentType = TextProps & {
77
text?: string;
88
};
9-
export declare type CardSectionProps = ViewPropTypes & {
9+
export declare type CardSectionProps = ViewProps & {
1010
/**
1111
* Text content for the CardSection.
1212
* Example: content={[{text: 'You’re Invited!', text70: true, dark10: true}]}
@@ -42,7 +42,7 @@ export declare type CardSectionProps = ViewPropTypes & {
4242
*/
4343
imageProps?: ImageProps;
4444
};
45-
declare const _default: React.ComponentClass<ViewPropTypes & {
45+
declare const _default: React.ComponentClass<ViewProps & {
4646
/**
4747
* Text content for the CardSection.
4848
* Example: content={[{text: 'You’re Invited!', text70: true, dark10: true}]}

generatedTypes/components/card/index.d.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React from 'react';
22
import { Animated, ViewStyle } from 'react-native';
3-
import { ViewPropTypes } from '../view';
3+
import { ViewProps } from '../view';
44
import { TouchableOpacityProps } from '../touchableOpacity';
55
import CardImage from './CardImage';
66
import CardSection, { CardSectionProps } from './CardSection';
77
export { CardSectionProps };
8-
export declare type CardPropTypes = ViewPropTypes & TouchableOpacityProps & {
8+
export declare type CardProps = ViewProps & TouchableOpacityProps & {
99
/**
1010
* card custom width
1111
*/
@@ -62,7 +62,8 @@ export declare type CardPropTypes = ViewPropTypes & TouchableOpacityProps & {
6262
hideIndicator?: boolean;
6363
};
6464
};
65-
declare const _default: React.ComponentClass<ViewPropTypes & Pick<import("react-native").TouchableOpacityProps, "testID" | "onLayout" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityStates" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "disabled" | "activeOpacity" | "onLongPress" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset"> & Partial<Record<import("../../commons/modifiers").AlignmentLiterals, boolean>> & Partial<Record<import("../../commons/modifiers").PositionLiterals, boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"flex" | "flexG" | "flexS", boolean>> & Partial<Record<"br0" | "br10" | "br20" | "br30" | "br40" | "br50" | "br60" | "br100", boolean>> & Partial<Record<"bg", boolean>> & {
65+
export declare type CardPropTypes = CardProps;
66+
declare const _default: React.ComponentClass<ViewProps & Pick<import("react-native").TouchableOpacityProps, "testID" | "onLayout" | "hitSlop" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityStates" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityComponentType" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityTraits" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "disabled" | "activeOpacity" | "onLongPress" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "pressRetentionOffset"> & Partial<Record<import("../../commons/modifiers").AlignmentLiterals, boolean>> & Partial<Record<import("../../commons/modifiers").PositionLiterals, boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"flex" | "flexG" | "flexS", boolean>> & Partial<Record<"br0" | "br10" | "br20" | "br30" | "br40" | "br50" | "br60" | "br100", boolean>> & Partial<Record<"bg", boolean>> & {
6667
backgroundColor?: string | undefined;
6768
throttleTime?: number | undefined;
6869
throttleOptions?: {
@@ -71,7 +72,9 @@ declare const _default: React.ComponentClass<ViewPropTypes & Pick<import("react-
7172
} | undefined;
7273
activeBackgroundColor?: string | undefined;
7374
useNative?: boolean | undefined;
74-
customValue?: any;
75+
customValue?: any; /**
76+
* card custom height
77+
*/
7578
style?: false | ViewStyle | import("react-native").RegisteredStyle<ViewStyle> | import("react-native").RecursiveArray<false | ViewStyle | import("react-native").RegisteredStyle<ViewStyle> | null | undefined> | Animated.AnimatedProps<ViewStyle> | Animated.AnimatedProps<import("react-native").RegisteredStyle<ViewStyle>> | Animated.AnimatedProps<import("react-native").RecursiveArray<false | ViewStyle | import("react-native").RegisteredStyle<ViewStyle> | null | undefined>> | null | undefined;
7679
onPress?: ((props: TouchableOpacityProps) => void) | undefined;
7780
} & {

generatedTypes/components/checkbox/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { StyleProp, TouchableOpacityProps, ViewStyle, TextStyle } from 'react-native';
3-
export interface CheckboxPropTypes extends TouchableOpacityProps {
3+
export interface CheckboxProps extends TouchableOpacityProps {
44
/**
55
* The value of the Checkbox. If true the switch will be turned on. Default value is false.
66
*/
@@ -50,7 +50,8 @@ export interface CheckboxPropTypes extends TouchableOpacityProps {
5050
*/
5151
containerStyle?: StyleProp<ViewStyle>;
5252
}
53-
declare const _default: React.ComponentClass<CheckboxPropTypes & {
53+
export declare type CheckboxPropTypes = CheckboxProps;
54+
declare const _default: React.ComponentClass<CheckboxProps & {
5455
useCustomTheme?: boolean | undefined;
5556
}, any>;
5657
export default _default;

generatedTypes/components/chip/index.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
22
import { StyleProp, ViewStyle, ViewProps, TouchableOpacityProps, ImageStyle, ImageProps, TextStyle, ImageSourcePropType } from 'react-native';
3-
import { AvatarPropTypes } from '../avatar';
3+
import { AvatarProps } from '../avatar';
44
import { BadgeProps } from '../badge';
5-
export declare type ChipPropTypes = ViewProps & TouchableOpacityProps & {
5+
export declare type ChipProps = ViewProps & TouchableOpacityProps & {
66
/**
77
* Chip's size. Number or a width and height object.
88
*/
@@ -53,7 +53,7 @@ export declare type ChipPropTypes = ViewProps & TouchableOpacityProps & {
5353
/**
5454
* Avatar props object
5555
*/
56-
avatarProps?: AvatarPropTypes;
56+
avatarProps?: AvatarProps;
5757
/**
5858
* Additional icon props
5959
*/
@@ -91,6 +91,7 @@ export declare type ChipPropTypes = ViewProps & TouchableOpacityProps & {
9191
*/
9292
dismissContainerStyle?: StyleProp<ImageStyle>;
9393
};
94+
export declare type ChipPropTypes = ChipProps;
9495
declare const _default: React.ComponentClass<ViewProps & TouchableOpacityProps & {
9596
/**
9697
* Chip's size. Number or a width and height object.
@@ -142,7 +143,7 @@ declare const _default: React.ComponentClass<ViewProps & TouchableOpacityProps &
142143
/**
143144
* Avatar props object
144145
*/
145-
avatarProps?: AvatarPropTypes | undefined;
146+
avatarProps?: AvatarProps | undefined;
146147
/**
147148
* Additional icon props
148149
*/

generatedTypes/components/floatingButton/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { PropsWithChildren } from 'react';
2-
import { ButtonPropTypes } from '../button';
2+
import { ButtonProps } from '../button';
33
export interface FloatingButtonProps {
44
/**
55
* Whether the button is visible
@@ -8,11 +8,11 @@ export interface FloatingButtonProps {
88
/**
99
* Button element (all Button's component's props)
1010
*/
11-
button?: PropsWithChildren<ButtonPropTypes>;
11+
button?: PropsWithChildren<ButtonProps>;
1212
/**
1313
* Secondary button element (all Button's component's props)
1414
*/
15-
secondaryButton?: PropsWithChildren<ButtonPropTypes>;
15+
secondaryButton?: PropsWithChildren<ButtonProps>;
1616
/**
1717
* The bottom margin of the button, or secondary button if passed
1818
*/

generatedTypes/components/modal/TopBar.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { StyleProp, TextStyle, ImageSourcePropType } from 'react-native';
3-
import { ButtonPropTypes } from '../../components/button';
3+
import { ButtonProps } from '../../components/button';
44
export interface ModalTopBarProps {
55
/**
66
* title to display in the center of the top bar
@@ -13,7 +13,7 @@ export interface ModalTopBarProps {
1313
/**
1414
* done action props (Button props)
1515
*/
16-
doneButtonProps?: Omit<ButtonPropTypes, 'onPress'>;
16+
doneButtonProps?: Omit<ButtonProps, 'onPress'>;
1717
/**
1818
* done action label
1919
*/
@@ -29,7 +29,7 @@ export interface ModalTopBarProps {
2929
/**
3030
* cancel action props (Button props)
3131
*/
32-
cancelButtonProps?: Omit<ButtonPropTypes, 'onPress'>;
32+
cancelButtonProps?: Omit<ButtonProps, 'onPress'>;
3333
/**
3434
* cancel action label
3535
*/

generatedTypes/components/panningViews/panDismissibleView.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { StyleProp, ViewStyle } from 'react-native';
33
import { PanningDirections, PanningProviderDirection, PanAmountsProps } from './panningProvider';
4-
export interface DismissibleAnimationPropTypes {
4+
export interface DismissibleAnimationProps {
55
/**
66
* The return animation speed (default is 20)
77
*/
@@ -15,7 +15,8 @@ export interface DismissibleAnimationPropTypes {
1515
*/
1616
duration?: number;
1717
}
18-
export interface PanDismissibleViewPropTypes {
18+
export declare type DismissibleAnimationPropTypes = DismissibleAnimationProps;
19+
export interface PanDismissibleViewProps {
1920
/**
2021
* Additional styling
2122
*/
@@ -35,7 +36,7 @@ export interface PanDismissibleViewPropTypes {
3536
* bounciness - the animation bounciness (default is 6)
3637
* duration - the dismiss animation duration (default is 280)
3738
*/
38-
animationOptions?: DismissibleAnimationPropTypes;
39+
animationOptions?: DismissibleAnimationProps;
3940
/**
4041
* Override the default threshold (height/2 and width/2) with different values.
4142
*/
@@ -46,5 +47,6 @@ export interface PanDismissibleViewPropTypes {
4647
*/
4748
allowDiagonalDismiss?: boolean;
4849
}
49-
declare const _default: React.ComponentClass<PanDismissibleViewPropTypes, any>;
50+
export declare type PanDismissibleViewPropTypes = PanDismissibleViewProps;
51+
declare const _default: React.ComponentClass<PanDismissibleViewProps, any>;
5052
export default _default;

0 commit comments

Comments
 (0)