Skip to content

Commit cd4dd66

Browse files
committed
Update generated types
1 parent 7388b92 commit cd4dd66

File tree

12 files changed

+100
-13
lines changed

12 files changed

+100
-13
lines changed

generatedTypes/components/dialog/OverlayFadingBackground.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ interface Props {
44
modalVisibility: boolean;
55
overlayBackgroundColor: string;
66
}
7-
declare const _default: ({ dialogVisibility, modalVisibility, overlayBackgroundColor }: Props) => JSX.Element;
8-
export default _default;
7+
declare const OverlayFadingBackground: {
8+
({ dialogVisibility, modalVisibility, overlayBackgroundColor }: Props): JSX.Element;
9+
displayName: string;
10+
};
11+
export default OverlayFadingBackground;

generatedTypes/components/drawer/Swipeable.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ declare type StateType = {
4343
rowWidth: number | typeof undefined;
4444
};
4545
export default class Swipeable extends Component<PropType, StateType> {
46+
static displayName: string;
4647
static defaultProps: {
4748
friction: number;
4849
overshootFriction: number;

generatedTypes/components/image/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export declare type ImageProps = RNImageProps & MarginModifiers & {
3333
aspectRatio?: number;
3434
/**
3535
* The type of overly to place on top of the image. Note: the image MUST have proper size, see examples in:
36-
* https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/OverlaysScreen.js
36+
* https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/OverlaysScreen.tsx
3737
*/
3838
overlayType?: OverlayTypeType;
3939
/**
@@ -101,7 +101,7 @@ declare const _default: React.ComponentClass<RNImageProps & Partial<Record<"marg
101101
aspectRatio?: number | undefined;
102102
/**
103103
* The type of overly to place on top of the image. Note: the image MUST have proper size, see examples in:
104-
* https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/OverlaysScreen.js
104+
* https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/OverlaysScreen.tsx
105105
*/
106106
overlayType?: string | undefined;
107107
/**

generatedTypes/components/tabBar/index.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ export declare type TabBarProps = BaseComponentInjectedProps & ViewPropTypes & {
2727
* custom style for the selected indicator
2828
*/
2929
indicatorStyle?: ViewStyle;
30+
/**
31+
* The background color
32+
*/
33+
backgroundColor: string;
3034
/**
3135
* Tab Bar height
3236
*/
@@ -65,6 +69,10 @@ declare const _default: React.ComponentClass<BaseComponentInjectedProps & ViewPr
6569
* custom style for the selected indicator
6670
*/
6771
indicatorStyle?: ViewStyle | undefined;
72+
/**
73+
* The background color
74+
*/
75+
backgroundColor: string;
6876
/**
6977
* Tab Bar height
7078
*/
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/// <reference types="react" />
22
import { ButtonPropTypes } from '../../components/button';
3-
declare const _default: (props: ButtonPropTypes) => JSX.Element;
4-
export default _default;
3+
declare const AccessoryButton: {
4+
(props: ButtonPropTypes): JSX.Element;
5+
displayName: string;
6+
};
7+
export default AccessoryButton;
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
/// <reference types="react" />
22
import { TextStyle } from 'react-native';
33
export interface CharCounterProps {
4+
/**
5+
* Should show a character counter (works only with maxLength)
6+
*/
47
showCharCounter?: boolean;
58
maxLength?: number;
9+
/**
10+
* Pass custom style to character counter text
11+
*/
612
charCounterStyle?: TextStyle;
713
}
8-
declare const _default: ({ maxLength, charCounterStyle }: CharCounterProps) => JSX.Element | null;
9-
export default _default;
14+
declare const CharCounter: {
15+
({ maxLength, charCounterStyle }: CharCounterProps): JSX.Element | null;
16+
displayName: string;
17+
};
18+
export default CharCounter;

generatedTypes/incubator/TextField/FloatingPlaceholder.d.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
import { TextStyle } from 'react-native';
33
import { ColorType } from './types';
44
export interface FloatingPlaceholderProps {
5+
/**
6+
* The placeholder for the field
7+
*/
58
placeholder?: string;
9+
/**
10+
* The floating placeholder color
11+
*/
612
floatingPlaceholderColor?: ColorType;
13+
/**
14+
* Custom style to pass to the floating placeholder
15+
*/
716
floatingPlaceholderStyle?: TextStyle;
817
}
9-
declare const _default: ({ placeholder, floatingPlaceholderColor, floatingPlaceholderStyle }: FloatingPlaceholderProps) => JSX.Element;
10-
export default _default;
18+
declare const FloatingPlaceholder: {
19+
({ placeholder, floatingPlaceholderColor, floatingPlaceholderStyle }: FloatingPlaceholderProps): JSX.Element;
20+
displayName: string;
21+
};
22+
export default FloatingPlaceholder;

generatedTypes/incubator/TextField/Input.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import React from 'react';
22
import { TextInput, TextInputProps } from 'react-native';
33
import { ForwardRefInjectedProps } from '../../commons/new';
44
export interface InputProps extends TextInputProps, React.ComponentPropsWithRef<typeof TextInput> {
5+
/**
6+
* A hint text to display when focusing the field
7+
*/
58
hint?: string;
69
}
7-
declare const Input: ({ style, hint, forwardedRef, ...props }: InputProps & ForwardRefInjectedProps) => JSX.Element;
10+
declare const Input: {
11+
({ style, hint, forwardedRef, ...props }: InputProps & ForwardRefInjectedProps): JSX.Element;
12+
displayName: string;
13+
};
814
export default Input;

generatedTypes/incubator/TextField/Label.d.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,26 @@ import { TextStyle } from 'react-native';
33
import { TextPropTypes } from '../../components/text';
44
import { ColorType, ValidationMessagePosition } from './types';
55
export interface LabelProps {
6+
/**
7+
* Field label
8+
*/
69
label?: string;
10+
/**
11+
* Field label color. Either a string or color by state map ({default, focus, error, disabled})
12+
*/
713
labelColor?: ColorType;
14+
/**
15+
* Custom style for the field label
16+
*/
817
labelStyle?: TextStyle;
18+
/**
19+
* Pass extra props to the label Text element
20+
*/
921
labelProps?: TextPropTypes;
1022
validationMessagePosition?: ValidationMessagePosition;
1123
}
12-
declare const _default: ({ label, labelColor, labelStyle, labelProps, validationMessagePosition }: LabelProps) => JSX.Element | null;
13-
export default _default;
24+
declare const Label: {
25+
({ label, labelColor, labelStyle, labelProps, validationMessagePosition }: LabelProps): JSX.Element | null;
26+
displayName: string;
27+
};
28+
export default Label;

generatedTypes/incubator/TextField/ValidationMessage.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/// <reference types="react" />
22
import { TextStyle } from 'react-native';
33
export interface ValidationMessageProps {
4+
/**
5+
* Should support showing validation error message
6+
*/
47
enableErrors?: boolean;
8+
/**
9+
* The validation message to display when field is invalid (depends on validate)
10+
*/
511
validationMessage?: string;
612
validationMessageStyle?: TextStyle;
713
retainSpace?: boolean;

generatedTypes/incubator/TextField/index.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,33 @@ import { FieldStateProps } from './withFieldState';
99
import { FloatingPlaceholderProps } from './FloatingPlaceholder';
1010
import { CharCounterProps } from './CharCounter';
1111
interface TextFieldProps extends InputProps, LabelProps, FloatingPlaceholderProps, FieldStateProps, ValidationMessageProps, Omit<CharCounterProps, 'maxLength'> {
12+
/**
13+
* Pass to render a leading button/icon
14+
*/
1215
leadingButton?: ButtonPropTypes;
16+
/**
17+
* Pass to render a trailing button/icon
18+
*/
1319
trailingButton?: ButtonPropTypes;
20+
/**
21+
* Pass to add floating placeholder support
22+
*/
1423
floatingPlaceholder?: boolean;
24+
/**
25+
* Custom style for the floating placeholder
26+
*/
1527
floatingPlaceholderStyle?: TextStyle;
28+
/**
29+
* The position of the validation message (top/bottom)
30+
*/
1631
validationMessagePosition?: ValidationMessagePosition;
32+
/**
33+
* Internal style for the field container
34+
*/
1735
fieldStyle?: ViewStyle;
36+
/**
37+
* Container style of the whole component
38+
*/
1839
containerStyle?: ViewStyle;
1940
}
2041
interface StaticMembers {

generatedTypes/incubator/TextField/withFieldState.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export interface FieldStateProps extends TextInputProps {
1818
validateOnStart?: boolean;
1919
validateOnChange?: boolean;
2020
validateOnBlur?: boolean;
21+
/**
22+
* A single or multiple validator. Can be a string (required, email) or custom function.
23+
*/
2124
validate?: Validator | Validator[];
2225
}
2326
declare function withFieldState(WrappedComponent: React.ComponentType<FieldStateInjectedProps & TextInputProps>): {

0 commit comments

Comments
 (0)