react-native-ui-lib 8.3.3 → 8.3.4-snapshot.7783
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.
- package/lib/android/build.gradle +3 -3
- package/lib/components/HighlighterOverlayView/index.d.ts +2 -2
- package/lib/components/HighlighterOverlayView/index.web.d.ts +2 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts +1 -1
- package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.js +5 -1
- package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/index.js +3 -1
- package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +3 -1
- package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +6 -2
- package/lib/components/Keyboard/KeyboardTrackingView/index.js +5 -4
- package/lib/components/Keyboard/index.d.ts +2 -1
- package/lib/package.json +20 -21
- package/lib/react-native.config.js +1 -1
- package/package.json +161 -164
- package/screenFooter.d.ts +2 -0
- package/screenFooter.js +1 -0
- package/scripts/release/prReleaseNotesCommon.js +2 -1
- package/src/assets/internal/images/bottomGradient.png +0 -0
- package/src/assets/internal/images/bottomGradient@1.5x.png +0 -0
- package/src/assets/internal/images/bottomGradient@2x.png +0 -0
- package/src/assets/internal/images/bottomGradient@3x.png +0 -0
- package/src/assets/internal/images/bottomGradient@4x.png +0 -0
- package/src/assets/internal/images/index.js +3 -0
- package/src/commons/asBaseComponent.js +2 -1
- package/src/commons/baseComponent.js +0 -8
- package/src/commons/forwardRef.js +1 -4
- package/src/commons/modifiers.d.ts +0 -6
- package/src/commons/modifiers.js +0 -18
- package/src/commons/withScrollEnabler.js +0 -4
- package/src/commons/withScrollReached.js +0 -4
- package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +0 -7
- package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +0 -6
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +0 -6
- package/src/components/WheelPicker/WheelPicker.driver.d.ts +2 -2
- package/src/components/WheelPicker/index.d.ts +2 -2
- package/src/components/WheelPicker/index.js +1 -1
- package/src/components/WheelPicker/usePresenter.d.ts +1 -1
- package/src/components/actionSheet/index.d.ts +1 -1
- package/src/components/animatedImage/index.d.ts +1 -1
- package/src/components/animatedScanner/index.js +0 -37
- package/src/components/avatar/index.d.ts +1 -1
- package/src/components/badge/index.d.ts +4 -4
- package/src/components/baseInput/index.d.ts +0 -1
- package/src/components/baseInput/index.js +1 -49
- package/src/components/button/index.d.ts +4 -4
- package/src/components/button/types.d.ts +2 -2
- package/src/components/carousel/index.d.ts +8 -8
- package/src/components/carousel/types.d.ts +4 -1
- package/src/components/carousel/types.js +0 -2
- package/src/components/checkbox/index.d.ts +1 -1
- package/src/components/chip/index.d.ts +1 -1
- package/src/components/colorPalette/index.d.ts +1 -1
- package/src/components/dateTimePicker/index.d.ts +2 -2
- package/src/components/dateTimePicker/index.js +2 -2
- package/src/components/dialog/types.d.ts +4 -4
- package/src/components/dialog/useDialogContent.d.ts +1 -1
- package/src/components/drawer/index.d.ts +1 -1
- package/src/components/expandableSection/index.d.ts +2 -2
- package/src/components/fadedScrollView/index.js +1 -1
- package/src/components/featureHighlight/index.js +5 -7
- package/src/components/gridListItem/index.d.ts +7 -7
- package/src/components/gridView/index.d.ts +1 -1
- package/src/components/hint/HintBubble.d.ts +1 -1
- package/src/components/hint/HintOld.d.ts +10 -10
- package/src/components/hint/hooks/useHintLayout.d.ts +1 -1
- package/src/components/hint/index.d.ts +2 -2
- package/src/components/hint/types.d.ts +2 -2
- package/src/components/icon/index.js +0 -3
- package/src/components/image/index.d.ts +1 -1
- package/src/components/image/index.js +20 -17
- package/src/components/loaderScreen/index.d.ts +1 -1
- package/src/components/loaderScreen/types.d.ts +1 -1
- package/src/components/maskedInput/index.d.ts +21 -4
- package/src/components/maskedInput/index.js +78 -16
- package/src/components/maskedInput/maskedInput.api.json +0 -1
- package/src/components/modal/index.d.ts +3 -3
- package/src/components/numberInput/index.js +2 -2
- package/src/components/overlay/index.d.ts +1 -1
- package/src/components/picker/PickerDialog.android.js +0 -15
- package/src/components/picker/PickerDialog.js +0 -7
- package/src/components/picker/helpers/useImperativePickerHandle.d.ts +1 -1
- package/src/components/picker/helpers/useImperativePickerHandle.js +1 -1
- package/src/components/picker/types.d.ts +9 -9
- package/src/components/progressBar/index.d.ts +2 -2
- package/src/components/screenFooter/index.d.ts +8 -0
- package/src/components/screenFooter/index.js +211 -0
- package/src/components/screenFooter/screenFooter.api.json +262 -0
- package/src/components/screenFooter/types.d.ts +100 -0
- package/src/components/screenFooter/types.js +39 -0
- package/src/components/scrollBar/index.d.ts +11 -4
- package/src/components/searchInput/index.js +1 -1
- package/src/components/searchInput/types.d.ts +2 -2
- package/src/components/sectionsWheelPicker/SectionsWheelPicker.driver.d.ts +2 -2
- package/src/components/skeletonView/index.d.ts +4 -4
- package/src/components/slider/Thumb.d.ts +1 -1
- package/src/components/slider/types.d.ts +1 -1
- package/src/components/stackAggregator/index.d.ts +1 -1
- package/src/components/tabController/TabBarItem.d.ts +2 -2
- package/src/components/tabController/TabBarItem.js +1 -1
- package/src/components/tabController/TabPage.d.ts +2 -2
- package/src/components/tabController/useScrollToItem.d.ts +1 -1
- package/src/components/text/Text.driver.d.ts +1 -1
- package/src/components/textArea/index.js +0 -6
- package/src/components/textField/types.d.ts +4 -4
- package/src/components/textField/useImperativeInputHandle.d.ts +1 -1
- package/src/components/textField/useImperativeInputHandle.js +1 -1
- package/src/components/textField/usePreset.d.ts +36 -36
- package/src/components/timeline/index.js +1 -1
- package/src/components/toast/index.js +0 -69
- package/src/components/view/index.js +9 -6
- package/src/components/wizard/index.d.ts +1 -1
- package/src/components/wizard/types.d.ts +1 -1
- package/src/components/wizard/wizard.api.json +1 -1
- package/src/hooks/index.d.ts +1 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/useCombinedRefs/index.js +1 -2
- package/src/hooks/useDebounce/index.js +1 -1
- package/src/hooks/useHiddenLocation/index.js +2 -2
- package/src/hooks/useHiddenLocation/index.web.js +2 -2
- package/src/hooks/useMeasure/index.d.ts +1 -1
- package/src/hooks/useMeasure/index.js +1 -1
- package/src/hooks/useScrollTo/index.d.ts +2 -2
- package/src/hooks/useScrollToHide/index.d.ts +24 -0
- package/src/hooks/useScrollToHide/index.js +48 -0
- package/src/incubator/calendar/index.js +1 -1
- package/src/incubator/calendar/types.d.ts +2 -2
- package/src/incubator/expandableOverlay/index.d.ts +2 -2
- package/src/incubator/expandableOverlay/index.js +7 -3
- package/src/incubator/slider/Track.d.ts +1 -1
- package/src/incubator/slider/index.d.ts +1 -1
- package/src/incubator/toast/helpers/useToastTimer.js +1 -1
- package/src/incubator/toast/index.js +1 -1
- package/src/incubator/toast/types.d.ts +2 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +70 -0
- package/src/testkit/Component.driver.d.ts +1 -1
- package/src/testkit/drivers/TestingLibraryDriver.d.ts +1 -1
- package/src/typings/module.d.ts +12 -3
- package/ReactNativeUiLib.podspec +0 -22
- package/src/components/maskedInput/new.d.ts +0 -22
- package/src/components/maskedInput/new.js +0 -85
- package/src/components/maskedInput/old.js +0 -95
- package/src/components/textFieldOld/index.d.ts +0 -71
- package/src/components/textFieldOld/index.js +0 -807
- package/src/helpers/DocsGenerator.js +0 -61
- package/textFieldOld.d.ts +0 -2
- package/textFieldOld.js +0 -1
|
@@ -32,7 +32,7 @@ function asBaseComponent(WrappedComponent, options = {}) {
|
|
|
32
32
|
return Modifiers.getThemeProps.call(WrappedComponent, props, context);
|
|
33
33
|
};
|
|
34
34
|
static getDerivedStateFromError(error) {
|
|
35
|
-
UIComponent.defaultProps?.onError?.(error
|
|
35
|
+
UIComponent.defaultProps?.onError?.(error);
|
|
36
36
|
return {
|
|
37
37
|
error: true
|
|
38
38
|
};
|
|
@@ -55,6 +55,7 @@ function asBaseComponent(WrappedComponent, options = {}) {
|
|
|
55
55
|
hoistStatics(BaseComponent, WrappedComponent);
|
|
56
56
|
BaseComponent.displayName = WrappedComponent.displayName;
|
|
57
57
|
BaseComponent.propTypes = WrappedComponent.propTypes;
|
|
58
|
+
// @ts-expect-error class component have defaultProps and functions do not and so should not be affected by this
|
|
58
59
|
BaseComponent.defaultProps = WrappedComponent.defaultProps;
|
|
59
60
|
const ThemeContext = ThemeManager.getThemeContext();
|
|
60
61
|
if (ThemeContext) {
|
|
@@ -8,20 +8,12 @@ import _includes from "lodash/includes";
|
|
|
8
8
|
import _pickBy from "lodash/pickBy";
|
|
9
9
|
import _pick from "lodash/pick";
|
|
10
10
|
import React from 'react';
|
|
11
|
-
// import PropTypes from 'prop-types';
|
|
12
11
|
import { StyleSheet } from 'react-native';
|
|
13
12
|
import { Colors } from "../style";
|
|
14
13
|
import * as Modifiers from "./modifiers";
|
|
15
14
|
export default function baseComponent(usePure) {
|
|
16
15
|
const parent = usePure ? React.PureComponent : React.Component;
|
|
17
16
|
class BaseComponent extends parent {
|
|
18
|
-
// static propTypes = {
|
|
19
|
-
// ..._.mapValues(Typography, () => PropTypes.bool),
|
|
20
|
-
// ..._.mapValues(Colors, () => PropTypes.bool),
|
|
21
|
-
// useNativeDriver: PropTypes.bool,
|
|
22
|
-
// };
|
|
23
|
-
|
|
24
|
-
static extractOwnProps = Modifiers.extractOwnProps;
|
|
25
17
|
constructor(props) {
|
|
26
18
|
super(props);
|
|
27
19
|
if (!this.styles) {
|
|
@@ -8,11 +8,8 @@ export default function forwardRef(WrappedComponent) {
|
|
|
8
8
|
// @ts-expect-error
|
|
9
9
|
const ForwardedComponent = React.forwardRef(forwardRef);
|
|
10
10
|
hoistStatics(ForwardedComponent, WrappedComponent);
|
|
11
|
-
//@ts-ignore
|
|
12
11
|
ForwardedComponent.displayName = WrappedComponent.displayName;
|
|
13
|
-
|
|
14
|
-
ForwardedComponent.propTypes = WrappedComponent.propTypes;
|
|
15
|
-
//@ts-ignore
|
|
12
|
+
// @ts-expect-error
|
|
16
13
|
ForwardedComponent.defaultProps = WrappedComponent.defaultProps;
|
|
17
14
|
return ForwardedComponent;
|
|
18
15
|
}
|
|
@@ -105,12 +105,6 @@ export declare function extractAccessibilityProps(props?: any): Partial<any>;
|
|
|
105
105
|
export declare function extractAnimationProps(props?: any): Pick<any, "animation" | "duration" | "delay" | "direction" | "easing" | "iterationCount" | "transition" | "onAnimationBegin" | "onAnimationEnd" | "useNativeDriver">;
|
|
106
106
|
export declare function extractBorderRadiusValue(props: Dictionary<any>): number | undefined;
|
|
107
107
|
export declare function extractModifierProps(props: Dictionary<any>): _.Dictionary<any>;
|
|
108
|
-
/**
|
|
109
|
-
* TODO:
|
|
110
|
-
* @deprecated switch to Modifiers#extractComponentProps
|
|
111
|
-
*/
|
|
112
|
-
export declare function extractOwnProps(props: Dictionary<any>, ignoreProps: string[]): _.Omit<_.Dictionary<any>, string>;
|
|
113
|
-
export declare function extractComponentProps(component: any, props: Dictionary<any>, ignoreProps?: string[]): _.Omit<_.Dictionary<any>, string>;
|
|
114
108
|
export declare function getComponentName(componentDisplayName: string): any;
|
|
115
109
|
export declare function getThemeProps<T extends object>(props?: T, context?: any, componentDisplayName?: string): T;
|
|
116
110
|
export declare function generateModifiersStyle(options: ModifiersOptions | undefined, props: Dictionary<any>): ExtractedStyle;
|
package/src/commons/modifiers.js
CHANGED
|
@@ -2,8 +2,6 @@ import _isEqual from "lodash/isEqual";
|
|
|
2
2
|
import _keys from "lodash/keys";
|
|
3
3
|
import _union from "lodash/union";
|
|
4
4
|
import _isFunction from "lodash/isFunction";
|
|
5
|
-
import _omit from "lodash/omit";
|
|
6
|
-
import _flow from "lodash/flow";
|
|
7
5
|
import _find from "lodash/find";
|
|
8
6
|
import _pick from "lodash/pick";
|
|
9
7
|
import _pickBy from "lodash/pickBy";
|
|
@@ -232,22 +230,6 @@ export function extractModifierProps(props) {
|
|
|
232
230
|
});
|
|
233
231
|
return modifierProps;
|
|
234
232
|
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* TODO:
|
|
238
|
-
* @deprecated switch to Modifiers#extractComponentProps
|
|
239
|
-
*/
|
|
240
|
-
export function extractOwnProps(props, ignoreProps) {
|
|
241
|
-
//@ts-ignore
|
|
242
|
-
const ownPropTypes = this.propTypes;
|
|
243
|
-
const ownProps = _flow(props => _pickBy(props, (_value, key) => _includes(Object.keys(ownPropTypes), key)), props => _omit(props, ignoreProps))(props);
|
|
244
|
-
return ownProps;
|
|
245
|
-
}
|
|
246
|
-
export function extractComponentProps(component, props, ignoreProps = []) {
|
|
247
|
-
const componentPropTypes = component.propTypes;
|
|
248
|
-
const componentProps = _flow(props => _pickBy(props, (_value, key) => _includes(Object.keys(componentPropTypes), key)), props => _omit(props, ignoreProps))(props);
|
|
249
|
-
return componentProps;
|
|
250
|
-
}
|
|
251
233
|
export function getComponentName(componentDisplayName) {
|
|
252
234
|
//@ts-ignore
|
|
253
235
|
return componentDisplayName || this.displayName || this.constructor.displayName || this.constructor.name;
|
|
@@ -44,10 +44,6 @@ function withScrollEnabler(WrappedComponent) {
|
|
|
44
44
|
};
|
|
45
45
|
hoistStatics(ScrollEnabler, WrappedComponent);
|
|
46
46
|
ScrollEnabler.displayName = WrappedComponent.displayName;
|
|
47
|
-
//@ts-ignore
|
|
48
|
-
ScrollEnabler.propTypes = WrappedComponent.propTypes;
|
|
49
|
-
//@ts-ignore
|
|
50
|
-
ScrollEnabler.defaultProps = WrappedComponent.defaultProps;
|
|
51
47
|
return forwardRef(ScrollEnabler);
|
|
52
48
|
}
|
|
53
49
|
export default withScrollEnabler;
|
|
@@ -57,10 +57,6 @@ function withScrollReached(WrappedComponent, options = {}) {
|
|
|
57
57
|
};
|
|
58
58
|
hoistStatics(ScrollReachedDetector, WrappedComponent);
|
|
59
59
|
ScrollReachedDetector.displayName = WrappedComponent.displayName;
|
|
60
|
-
//@ts-ignore
|
|
61
|
-
ScrollReachedDetector.propTypes = WrappedComponent.propTypes;
|
|
62
|
-
//@ts-ignore
|
|
63
|
-
ScrollReachedDetector.defaultProps = WrappedComponent.defaultProps;
|
|
64
60
|
return forwardRef(ScrollReachedDetector);
|
|
65
61
|
}
|
|
66
62
|
export default withScrollReached;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
2
|
import {Component} from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import ReactNative, {DeviceEventEmitter, Keyboard} from 'react-native';
|
|
5
4
|
|
|
6
5
|
export default class KeyboardAwareBase extends Component {
|
|
@@ -22,12 +21,6 @@ export default class KeyboardAwareBase extends Component {
|
|
|
22
21
|
this._addKeyboardEventListeners();
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
static propTypes = {
|
|
26
|
-
startScrolledToBottom: PropTypes.bool,
|
|
27
|
-
scrollToBottomOnKBShow: PropTypes.bool,
|
|
28
|
-
scrollToInputAdditionalOffset: PropTypes.number
|
|
29
|
-
};
|
|
30
|
-
|
|
31
24
|
static defaultProps = {
|
|
32
25
|
startScrolledToBottom: false,
|
|
33
26
|
scrollToBottomOnKBShow: false,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import {FlatList} from 'react-native';
|
|
4
3
|
import KeyboardAwareBase from './KeyboardAwareBase';
|
|
5
4
|
|
|
@@ -10,11 +9,6 @@ import KeyboardAwareBase from './KeyboardAwareBase';
|
|
|
10
9
|
export default class KeyboardAwareFlatList extends KeyboardAwareBase {
|
|
11
10
|
static displayName = 'KeyboardAwareFlatList';
|
|
12
11
|
|
|
13
|
-
static PropTypes = {
|
|
14
|
-
getTextInputRefs: PropTypes.func,
|
|
15
|
-
onScroll: PropTypes.func
|
|
16
|
-
};
|
|
17
|
-
|
|
18
12
|
static defaultProps = {
|
|
19
13
|
...KeyboardAwareBase.defaultProps,
|
|
20
14
|
getTextInputRefs: () => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import {ScrollView} from 'react-native';
|
|
4
3
|
import KeyboardAwareBase from './KeyboardAwareBase';
|
|
5
4
|
|
|
@@ -10,11 +9,6 @@ import KeyboardAwareBase from './KeyboardAwareBase';
|
|
|
10
9
|
export default class KeyboardAwareScrollView extends KeyboardAwareBase {
|
|
11
10
|
static displayName = 'KeyboardAwareScrollView';
|
|
12
11
|
|
|
13
|
-
static PropTypes = {
|
|
14
|
-
getTextInputRefs: PropTypes.func,
|
|
15
|
-
onScroll: PropTypes.func
|
|
16
|
-
};
|
|
17
|
-
|
|
18
12
|
static defaultProps = {
|
|
19
13
|
...KeyboardAwareBase.defaultProps,
|
|
20
14
|
getTextInputRefs: () => {
|
|
@@ -4,11 +4,11 @@ export declare const WheelPickerDriver: (props: ComponentProps) => {
|
|
|
4
4
|
moveToItem: (index: number, itemHeight?: number, numberOfRows?: number) => void;
|
|
5
5
|
getLabel: () => string | (string | import("react-test-renderer").ReactTestInstance)[];
|
|
6
6
|
scroll: (contentOffset: Partial<import("react-native/types").NativeScrollPoint>, options?: {
|
|
7
|
-
contentInset: import("react-native/types").NativeScrollRectangle;
|
|
8
|
-
zoomScale: number;
|
|
9
7
|
layoutMeasurement: import("react-native/types").NativeScrollSize;
|
|
10
8
|
contentSize: import("react-native/types").NativeScrollSize;
|
|
11
9
|
velocity?: import("react-native/types").NativeScrollVelocity | undefined;
|
|
10
|
+
contentInset: import("react-native/types").NativeScrollRectangle;
|
|
11
|
+
zoomScale: number;
|
|
12
12
|
targetContentOffset?: import("react-native/types").NativeScrollPoint | undefined;
|
|
13
13
|
} | undefined) => void;
|
|
14
14
|
triggerEvent: (eventName?: string | undefined, event?: Partial<import("react-native/types").NativeScrollEvent> | undefined) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
2
|
import { TextStyle, ViewStyle, FlatListProps } from 'react-native';
|
|
3
3
|
import { TextProps } from '../text';
|
|
4
4
|
import { FaderProps } from '../fader';
|
|
@@ -81,7 +81,7 @@ export type WheelPickerProps<T = WheelPickerItemValue> = {
|
|
|
81
81
|
flatListProps?: Partial<FlatListProps<WheelPickerItemProps<T>>>;
|
|
82
82
|
};
|
|
83
83
|
declare const WheelPicker: {
|
|
84
|
-
<T extends WheelPickerItemValue>(props: WheelPickerProps<T>):
|
|
84
|
+
<T extends WheelPickerItemValue>(props: WheelPickerProps<T>): JSX.Element;
|
|
85
85
|
alignments: typeof WheelPickerAlign;
|
|
86
86
|
};
|
|
87
87
|
export default WheelPicker;
|
|
@@ -39,7 +39,7 @@ const WheelPicker = props => {
|
|
|
39
39
|
faderProps,
|
|
40
40
|
flatListProps
|
|
41
41
|
} = themeProps;
|
|
42
|
-
const scrollView = useRef();
|
|
42
|
+
const scrollView = useRef(undefined);
|
|
43
43
|
const offset = useSharedValue(0);
|
|
44
44
|
const scrollHandler = useAnimatedScrollHandler(e => {
|
|
45
45
|
offset.value = e.contentOffset.y;
|
|
@@ -13,7 +13,7 @@ export interface AnimatedImageProps extends ImageProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* A component to render while the image is loading
|
|
15
15
|
*/
|
|
16
|
-
loader?: React.ReactElement
|
|
16
|
+
loader?: React.ReactElement<any>;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* @description: Image component that fades-in the image with animation once it's loaded
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import {StyleSheet, Animated} from 'react-native';
|
|
5
|
-
import {ViewPropTypes} from 'deprecated-react-native-prop-types';
|
|
6
4
|
import {Colors} from '../../style';
|
|
7
5
|
import {BaseComponent} from '../../commons';
|
|
8
6
|
import View from '../../components/view';
|
|
@@ -16,41 +14,6 @@ import View from '../../components/view';
|
|
|
16
14
|
*/
|
|
17
15
|
export default class AnimatedScanner extends BaseComponent {
|
|
18
16
|
static displayName = 'AnimatedScanner';
|
|
19
|
-
static propTypes = {
|
|
20
|
-
/**
|
|
21
|
-
* animated value between 0 and 100
|
|
22
|
-
*/
|
|
23
|
-
// progress: PropTypes.object,
|
|
24
|
-
progress: PropTypes.number,
|
|
25
|
-
/**
|
|
26
|
-
* Duration of current break (can be change between breaks)
|
|
27
|
-
*/
|
|
28
|
-
duration: PropTypes.number,
|
|
29
|
-
/**
|
|
30
|
-
* scanner opacity
|
|
31
|
-
*/
|
|
32
|
-
opacity: PropTypes.number,
|
|
33
|
-
/**
|
|
34
|
-
* scanner background color
|
|
35
|
-
*/
|
|
36
|
-
backgroundColor: PropTypes.string,
|
|
37
|
-
/**
|
|
38
|
-
* breakpoint callback - ({progress, isDone}) => {}
|
|
39
|
-
*/
|
|
40
|
-
onBreakpoint: PropTypes.func,
|
|
41
|
-
/**
|
|
42
|
-
* should hide the scanner line
|
|
43
|
-
*/
|
|
44
|
-
hideScannerLine: PropTypes.bool,
|
|
45
|
-
/**
|
|
46
|
-
* the container style
|
|
47
|
-
*/
|
|
48
|
-
containerStyle: ViewPropTypes.style,
|
|
49
|
-
/**
|
|
50
|
-
* Used as a testing identifier
|
|
51
|
-
*/
|
|
52
|
-
testID: PropTypes.string
|
|
53
|
-
};
|
|
54
17
|
|
|
55
18
|
static defaultProps = {
|
|
56
19
|
progress: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
1
|
+
import React, { PropsWithChildren, type JSX } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle, ImagePropsBase, ImageStyle, TextStyle, TextProps, AccessibilityProps } from 'react-native';
|
|
3
3
|
import { BadgeProps } from '../badge';
|
|
4
4
|
import { ImageProps } from '../image';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react';
|
|
1
|
+
import React, { PureComponent, type JSX } from 'react';
|
|
2
2
|
import { ImageSourcePropType, ImageStyle, StyleProp, TextStyle, TouchableOpacityProps, ViewStyle, ViewProps } from 'react-native';
|
|
3
3
|
declare const LABEL_FORMATTER_VALUES: readonly [1, 2, 3, 4];
|
|
4
4
|
type LabelFormatterValues = typeof LABEL_FORMATTER_VALUES[number];
|
|
@@ -89,10 +89,10 @@ declare class Badge extends PureComponent<BadgeProps> {
|
|
|
89
89
|
getBadgeSizeStyle(): any;
|
|
90
90
|
getFormattedLabel(): any;
|
|
91
91
|
getBorderStyling(): ViewStyle;
|
|
92
|
-
renderLabel():
|
|
92
|
+
renderLabel(): JSX.Element | undefined;
|
|
93
93
|
renderCustomElement(): JSX.Element | undefined;
|
|
94
|
-
renderIcon(): 0 |
|
|
95
|
-
render():
|
|
94
|
+
renderIcon(): 0 | JSX.Element | undefined;
|
|
95
|
+
render(): JSX.Element;
|
|
96
96
|
}
|
|
97
97
|
declare function createStyles(props: BadgeProps): {
|
|
98
98
|
badge: {
|
|
@@ -3,11 +3,8 @@ import _isString from "lodash/isString";
|
|
|
3
3
|
import _isFunction from "lodash/isFunction";
|
|
4
4
|
import _isArray from "lodash/isArray";
|
|
5
5
|
import _get from "lodash/get";
|
|
6
|
-
import _invoke from "lodash/invoke";
|
|
7
|
-
import _values from "lodash/values"; // @ts-nocheck
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
6
|
+
import _invoke from "lodash/invoke"; // @ts-nocheck
|
|
9
7
|
import 'react';
|
|
10
|
-
import { ViewPropTypes, TextInputPropTypes } from 'deprecated-react-native-prop-types';
|
|
11
8
|
import { Colors, Typography } from "../../style";
|
|
12
9
|
import { BaseComponent } from "../../commons";
|
|
13
10
|
import Validators from "./Validators";
|
|
@@ -20,51 +17,6 @@ const VALIDATORS = {
|
|
|
20
17
|
};
|
|
21
18
|
export default class BaseInput extends BaseComponent {
|
|
22
19
|
static displayName = 'BaseInput';
|
|
23
|
-
static propTypes = {
|
|
24
|
-
...TextInputPropTypes,
|
|
25
|
-
// ...BaseComponent.propTypes,
|
|
26
|
-
/**
|
|
27
|
-
* text color
|
|
28
|
-
*/
|
|
29
|
-
color: PropTypes.string,
|
|
30
|
-
/**
|
|
31
|
-
* text input container style
|
|
32
|
-
*/
|
|
33
|
-
containerStyle: ViewPropTypes.style,
|
|
34
|
-
/**
|
|
35
|
-
* validator type or custom validator function
|
|
36
|
-
*/
|
|
37
|
-
validate: PropTypes.oneOfType([PropTypes.oneOf(_values(VALIDATORS)),
|
|
38
|
-
// enum
|
|
39
|
-
PropTypes.func,
|
|
40
|
-
// custom
|
|
41
|
-
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(_values(VALIDATORS)), PropTypes.func])) // array of validators
|
|
42
|
-
]),
|
|
43
|
-
/**
|
|
44
|
-
* Whether to mark required field with an asterisk
|
|
45
|
-
*/
|
|
46
|
-
markRequired: PropTypes.bool,
|
|
47
|
-
/**
|
|
48
|
-
* the message to be displayed when the validation fails
|
|
49
|
-
*/
|
|
50
|
-
errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
51
|
-
/**
|
|
52
|
-
* whether to run the validation on mount
|
|
53
|
-
*/
|
|
54
|
-
validateOnStart: PropTypes.bool,
|
|
55
|
-
/**
|
|
56
|
-
* whether to run the validation on text changed
|
|
57
|
-
*/
|
|
58
|
-
validateOnChange: PropTypes.bool,
|
|
59
|
-
/**
|
|
60
|
-
* whether to run the validation on blur
|
|
61
|
-
*/
|
|
62
|
-
validateOnBlur: PropTypes.bool,
|
|
63
|
-
/**
|
|
64
|
-
* callback for validity change
|
|
65
|
-
*/
|
|
66
|
-
onChangeValidity: PropTypes.func
|
|
67
|
-
};
|
|
68
20
|
static defaultProps = {
|
|
69
21
|
validateOnBlur: true
|
|
70
22
|
};
|
|
@@ -448,7 +448,7 @@ export { Button };
|
|
|
448
448
|
declare const _default: React.ForwardRefExoticComponent<((import("../touchableOpacity").TouchableOpacityProps & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & Partial<Record<"transparent" | "black" | "white" | "dark" | "$backgroundDefault" | "$backgroundElevated" | "$backgroundElevatedLight" | "$backgroundNeutralHeavy" | "$backgroundNeutralIdle" | "$backgroundNeutralMedium" | "$backgroundNeutral" | "$backgroundNeutralLight" | "$backgroundPrimaryHeavy" | "$backgroundPrimaryMedium" | "$backgroundPrimaryLight" | "$backgroundGeneralHeavy" | "$backgroundGeneralMedium" | "$backgroundGeneralLight" | "$backgroundSuccessHeavy" | "$backgroundSuccessLight" | "$backgroundWarningHeavy" | "$backgroundWarningLight" | "$backgroundMajorLight" | "$backgroundMajorHeavy" | "$backgroundDangerHeavy" | "$backgroundDangerLight" | "$backgroundDisabled" | "$backgroundDark" | "$backgroundDarkElevated" | "$backgroundDarkActive" | "$backgroundInverted" | "$textDisabled" | "$textDefault" | "$textNeutralHeavy" | "$textNeutral" | "$textNeutralLight" | "$textDefaultLight" | "$textPrimary" | "$textGeneral" | "$textSuccess" | "$textSuccessLight" | "$textMajor" | "$textDanger" | "$textDangerLight" | "$iconDefault" | "$iconNeutral" | "$iconDefaultLight" | "$iconPrimary" | "$iconPrimaryLight" | "$iconGeneral" | "$iconGeneralLight" | "$iconSuccess" | "$iconSuccessLight" | "$iconMajor" | "$iconDanger" | "$iconDangerLight" | "$iconDisabled" | "$outlineDefault" | "$outlineDisabled" | "$outlineDisabledHeavy" | "$outlineNeutral" | "$outlineNeutralHeavy" | "$outlinePrimary" | "$outlinePrimaryMedium" | "$outlineGeneral" | "$outlineWarning" | "$outlineDanger" | "$outlineInverted" | "$black" | "$white" | "grey1" | "grey5" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue1" | "blue5" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green1" | "green5" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow1" | "yellow5" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange1" | "orange5" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red1" | "red5" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple1" | "purple5" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet1" | "violet5" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & Partial<Record<"bg-transparent" | "bg-black" | "bg-white" | "bg-dark" | "bg-$backgroundDefault" | "bg-$backgroundElevated" | "bg-$backgroundElevatedLight" | "bg-$backgroundNeutralHeavy" | "bg-$backgroundNeutralIdle" | "bg-$backgroundNeutralMedium" | "bg-$backgroundNeutral" | "bg-$backgroundNeutralLight" | "bg-$backgroundPrimaryHeavy" | "bg-$backgroundPrimaryMedium" | "bg-$backgroundPrimaryLight" | "bg-$backgroundGeneralHeavy" | "bg-$backgroundGeneralMedium" | "bg-$backgroundGeneralLight" | "bg-$backgroundSuccessHeavy" | "bg-$backgroundSuccessLight" | "bg-$backgroundWarningHeavy" | "bg-$backgroundWarningLight" | "bg-$backgroundMajorLight" | "bg-$backgroundMajorHeavy" | "bg-$backgroundDangerHeavy" | "bg-$backgroundDangerLight" | "bg-$backgroundDisabled" | "bg-$backgroundDark" | "bg-$backgroundDarkElevated" | "bg-$backgroundDarkActive" | "bg-$backgroundInverted" | "bg-$textDisabled" | "bg-$textDefault" | "bg-$textNeutralHeavy" | "bg-$textNeutral" | "bg-$textNeutralLight" | "bg-$textDefaultLight" | "bg-$textPrimary" | "bg-$textGeneral" | "bg-$textSuccess" | "bg-$textSuccessLight" | "bg-$textMajor" | "bg-$textDanger" | "bg-$textDangerLight" | "bg-$iconDefault" | "bg-$iconNeutral" | "bg-$iconDefaultLight" | "bg-$iconPrimary" | "bg-$iconPrimaryLight" | "bg-$iconGeneral" | "bg-$iconGeneralLight" | "bg-$iconSuccess" | "bg-$iconSuccessLight" | "bg-$iconMajor" | "bg-$iconDanger" | "bg-$iconDangerLight" | "bg-$iconDisabled" | "bg-$outlineDefault" | "bg-$outlineDisabled" | "bg-$outlineDisabledHeavy" | "bg-$outlineNeutral" | "bg-$outlineNeutralHeavy" | "bg-$outlinePrimary" | "bg-$outlinePrimaryMedium" | "bg-$outlineGeneral" | "bg-$outlineWarning" | "bg-$outlineDanger" | "bg-$outlineInverted" | "bg-$black" | "bg-$white" | "bg-grey1" | "bg-grey5" | "bg-grey10" | "bg-grey20" | "bg-grey30" | "bg-grey40" | "bg-grey50" | "bg-grey60" | "bg-grey70" | "bg-grey80" | "bg-blue1" | "bg-blue5" | "bg-blue10" | "bg-blue20" | "bg-blue30" | "bg-blue40" | "bg-blue50" | "bg-blue60" | "bg-blue70" | "bg-blue80" | "bg-cyan10" | "bg-cyan20" | "bg-cyan30" | "bg-cyan40" | "bg-cyan50" | "bg-cyan60" | "bg-cyan70" | "bg-cyan80" | "bg-green1" | "bg-green5" | "bg-green10" | "bg-green20" | "bg-green30" | "bg-green40" | "bg-green50" | "bg-green60" | "bg-green70" | "bg-green80" | "bg-yellow1" | "bg-yellow5" | "bg-yellow10" | "bg-yellow20" | "bg-yellow30" | "bg-yellow40" | "bg-yellow50" | "bg-yellow60" | "bg-yellow70" | "bg-yellow80" | "bg-orange1" | "bg-orange5" | "bg-orange10" | "bg-orange20" | "bg-orange30" | "bg-orange40" | "bg-orange50" | "bg-orange60" | "bg-orange70" | "bg-orange80" | "bg-red1" | "bg-red5" | "bg-red10" | "bg-red20" | "bg-red30" | "bg-red40" | "bg-red50" | "bg-red60" | "bg-red70" | "bg-red80" | "bg-purple1" | "bg-purple5" | "bg-purple10" | "bg-purple20" | "bg-purple30" | "bg-purple40" | "bg-purple50" | "bg-purple60" | "bg-purple70" | "bg-purple80" | "bg-violet1" | "bg-violet5" | "bg-violet10" | "bg-violet20" | "bg-violet30" | "bg-violet40" | "bg-violet50" | "bg-violet60" | "bg-violet70" | "bg-violet80", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
|
|
449
449
|
label?: string | undefined;
|
|
450
450
|
color?: string | undefined;
|
|
451
|
-
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
|
|
451
|
+
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => React.JSX.Element) | null;
|
|
452
452
|
iconStyle?: StyleProp<ImageStyle>;
|
|
453
453
|
iconProps?: Partial<import("../icon").IconProps> | undefined;
|
|
454
454
|
iconOnRight?: boolean | undefined;
|
|
@@ -479,7 +479,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
|
|
|
479
479
|
}) | Omit<import("../touchableOpacity").TouchableOpacityProps & import("../../commons/modifiers").CustomModifier & Partial<Record<"bg-transparent" | "bg-black" | "bg-white" | "bg-dark" | "bg-$backgroundDefault" | "bg-$backgroundElevated" | "bg-$backgroundElevatedLight" | "bg-$backgroundNeutralHeavy" | "bg-$backgroundNeutralIdle" | "bg-$backgroundNeutralMedium" | "bg-$backgroundNeutral" | "bg-$backgroundNeutralLight" | "bg-$backgroundPrimaryHeavy" | "bg-$backgroundPrimaryMedium" | "bg-$backgroundPrimaryLight" | "bg-$backgroundGeneralHeavy" | "bg-$backgroundGeneralMedium" | "bg-$backgroundGeneralLight" | "bg-$backgroundSuccessHeavy" | "bg-$backgroundSuccessLight" | "bg-$backgroundWarningHeavy" | "bg-$backgroundWarningLight" | "bg-$backgroundMajorLight" | "bg-$backgroundMajorHeavy" | "bg-$backgroundDangerHeavy" | "bg-$backgroundDangerLight" | "bg-$backgroundDisabled" | "bg-$backgroundDark" | "bg-$backgroundDarkElevated" | "bg-$backgroundDarkActive" | "bg-$backgroundInverted" | "bg-$textDisabled" | "bg-$textDefault" | "bg-$textNeutralHeavy" | "bg-$textNeutral" | "bg-$textNeutralLight" | "bg-$textDefaultLight" | "bg-$textPrimary" | "bg-$textGeneral" | "bg-$textSuccess" | "bg-$textSuccessLight" | "bg-$textMajor" | "bg-$textDanger" | "bg-$textDangerLight" | "bg-$iconDefault" | "bg-$iconNeutral" | "bg-$iconDefaultLight" | "bg-$iconPrimary" | "bg-$iconPrimaryLight" | "bg-$iconGeneral" | "bg-$iconGeneralLight" | "bg-$iconSuccess" | "bg-$iconSuccessLight" | "bg-$iconMajor" | "bg-$iconDanger" | "bg-$iconDangerLight" | "bg-$iconDisabled" | "bg-$outlineDefault" | "bg-$outlineDisabled" | "bg-$outlineDisabledHeavy" | "bg-$outlineNeutral" | "bg-$outlineNeutralHeavy" | "bg-$outlinePrimary" | "bg-$outlinePrimaryMedium" | "bg-$outlineGeneral" | "bg-$outlineWarning" | "bg-$outlineDanger" | "bg-$outlineInverted" | "bg-$black" | "bg-$white" | "bg-grey1" | "bg-grey5" | "bg-grey10" | "bg-grey20" | "bg-grey30" | "bg-grey40" | "bg-grey50" | "bg-grey60" | "bg-grey70" | "bg-grey80" | "bg-blue1" | "bg-blue5" | "bg-blue10" | "bg-blue20" | "bg-blue30" | "bg-blue40" | "bg-blue50" | "bg-blue60" | "bg-blue70" | "bg-blue80" | "bg-cyan10" | "bg-cyan20" | "bg-cyan30" | "bg-cyan40" | "bg-cyan50" | "bg-cyan60" | "bg-cyan70" | "bg-cyan80" | "bg-green1" | "bg-green5" | "bg-green10" | "bg-green20" | "bg-green30" | "bg-green40" | "bg-green50" | "bg-green60" | "bg-green70" | "bg-green80" | "bg-yellow1" | "bg-yellow5" | "bg-yellow10" | "bg-yellow20" | "bg-yellow30" | "bg-yellow40" | "bg-yellow50" | "bg-yellow60" | "bg-yellow70" | "bg-yellow80" | "bg-orange1" | "bg-orange5" | "bg-orange10" | "bg-orange20" | "bg-orange30" | "bg-orange40" | "bg-orange50" | "bg-orange60" | "bg-orange70" | "bg-orange80" | "bg-red1" | "bg-red5" | "bg-red10" | "bg-red20" | "bg-red30" | "bg-red40" | "bg-red50" | "bg-red60" | "bg-red70" | "bg-red80" | "bg-purple1" | "bg-purple5" | "bg-purple10" | "bg-purple20" | "bg-purple30" | "bg-purple40" | "bg-purple50" | "bg-purple60" | "bg-purple70" | "bg-purple80" | "bg-violet1" | "bg-violet5" | "bg-violet10" | "bg-violet20" | "bg-violet30" | "bg-violet40" | "bg-violet50" | "bg-violet60" | "bg-violet70" | "bg-violet80", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
|
|
480
480
|
label?: string | undefined;
|
|
481
481
|
color?: string | undefined;
|
|
482
|
-
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
|
|
482
|
+
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => React.JSX.Element) | null;
|
|
483
483
|
iconStyle?: StyleProp<ImageStyle>;
|
|
484
484
|
iconProps?: Partial<import("../icon").IconProps> | undefined;
|
|
485
485
|
iconOnRight?: boolean | undefined;
|
|
@@ -510,7 +510,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
|
|
|
510
510
|
}, "ref"> | Omit<import("../touchableOpacity").TouchableOpacityProps & import("../../commons/modifiers").CustomModifier & Partial<Record<"transparent" | "black" | "white" | "dark" | "$backgroundDefault" | "$backgroundElevated" | "$backgroundElevatedLight" | "$backgroundNeutralHeavy" | "$backgroundNeutralIdle" | "$backgroundNeutralMedium" | "$backgroundNeutral" | "$backgroundNeutralLight" | "$backgroundPrimaryHeavy" | "$backgroundPrimaryMedium" | "$backgroundPrimaryLight" | "$backgroundGeneralHeavy" | "$backgroundGeneralMedium" | "$backgroundGeneralLight" | "$backgroundSuccessHeavy" | "$backgroundSuccessLight" | "$backgroundWarningHeavy" | "$backgroundWarningLight" | "$backgroundMajorLight" | "$backgroundMajorHeavy" | "$backgroundDangerHeavy" | "$backgroundDangerLight" | "$backgroundDisabled" | "$backgroundDark" | "$backgroundDarkElevated" | "$backgroundDarkActive" | "$backgroundInverted" | "$textDisabled" | "$textDefault" | "$textNeutralHeavy" | "$textNeutral" | "$textNeutralLight" | "$textDefaultLight" | "$textPrimary" | "$textGeneral" | "$textSuccess" | "$textSuccessLight" | "$textMajor" | "$textDanger" | "$textDangerLight" | "$iconDefault" | "$iconNeutral" | "$iconDefaultLight" | "$iconPrimary" | "$iconPrimaryLight" | "$iconGeneral" | "$iconGeneralLight" | "$iconSuccess" | "$iconSuccessLight" | "$iconMajor" | "$iconDanger" | "$iconDangerLight" | "$iconDisabled" | "$outlineDefault" | "$outlineDisabled" | "$outlineDisabledHeavy" | "$outlineNeutral" | "$outlineNeutralHeavy" | "$outlinePrimary" | "$outlinePrimaryMedium" | "$outlineGeneral" | "$outlineWarning" | "$outlineDanger" | "$outlineInverted" | "$black" | "$white" | "grey1" | "grey5" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue1" | "blue5" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green1" | "green5" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow1" | "yellow5" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange1" | "orange5" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red1" | "red5" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple1" | "purple5" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet1" | "violet5" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & Partial<Record<"bg-transparent" | "bg-black" | "bg-white" | "bg-dark" | "bg-$backgroundDefault" | "bg-$backgroundElevated" | "bg-$backgroundElevatedLight" | "bg-$backgroundNeutralHeavy" | "bg-$backgroundNeutralIdle" | "bg-$backgroundNeutralMedium" | "bg-$backgroundNeutral" | "bg-$backgroundNeutralLight" | "bg-$backgroundPrimaryHeavy" | "bg-$backgroundPrimaryMedium" | "bg-$backgroundPrimaryLight" | "bg-$backgroundGeneralHeavy" | "bg-$backgroundGeneralMedium" | "bg-$backgroundGeneralLight" | "bg-$backgroundSuccessHeavy" | "bg-$backgroundSuccessLight" | "bg-$backgroundWarningHeavy" | "bg-$backgroundWarningLight" | "bg-$backgroundMajorLight" | "bg-$backgroundMajorHeavy" | "bg-$backgroundDangerHeavy" | "bg-$backgroundDangerLight" | "bg-$backgroundDisabled" | "bg-$backgroundDark" | "bg-$backgroundDarkElevated" | "bg-$backgroundDarkActive" | "bg-$backgroundInverted" | "bg-$textDisabled" | "bg-$textDefault" | "bg-$textNeutralHeavy" | "bg-$textNeutral" | "bg-$textNeutralLight" | "bg-$textDefaultLight" | "bg-$textPrimary" | "bg-$textGeneral" | "bg-$textSuccess" | "bg-$textSuccessLight" | "bg-$textMajor" | "bg-$textDanger" | "bg-$textDangerLight" | "bg-$iconDefault" | "bg-$iconNeutral" | "bg-$iconDefaultLight" | "bg-$iconPrimary" | "bg-$iconPrimaryLight" | "bg-$iconGeneral" | "bg-$iconGeneralLight" | "bg-$iconSuccess" | "bg-$iconSuccessLight" | "bg-$iconMajor" | "bg-$iconDanger" | "bg-$iconDangerLight" | "bg-$iconDisabled" | "bg-$outlineDefault" | "bg-$outlineDisabled" | "bg-$outlineDisabledHeavy" | "bg-$outlineNeutral" | "bg-$outlineNeutralHeavy" | "bg-$outlinePrimary" | "bg-$outlinePrimaryMedium" | "bg-$outlineGeneral" | "bg-$outlineWarning" | "bg-$outlineDanger" | "bg-$outlineInverted" | "bg-$black" | "bg-$white" | "bg-grey1" | "bg-grey5" | "bg-grey10" | "bg-grey20" | "bg-grey30" | "bg-grey40" | "bg-grey50" | "bg-grey60" | "bg-grey70" | "bg-grey80" | "bg-blue1" | "bg-blue5" | "bg-blue10" | "bg-blue20" | "bg-blue30" | "bg-blue40" | "bg-blue50" | "bg-blue60" | "bg-blue70" | "bg-blue80" | "bg-cyan10" | "bg-cyan20" | "bg-cyan30" | "bg-cyan40" | "bg-cyan50" | "bg-cyan60" | "bg-cyan70" | "bg-cyan80" | "bg-green1" | "bg-green5" | "bg-green10" | "bg-green20" | "bg-green30" | "bg-green40" | "bg-green50" | "bg-green60" | "bg-green70" | "bg-green80" | "bg-yellow1" | "bg-yellow5" | "bg-yellow10" | "bg-yellow20" | "bg-yellow30" | "bg-yellow40" | "bg-yellow50" | "bg-yellow60" | "bg-yellow70" | "bg-yellow80" | "bg-orange1" | "bg-orange5" | "bg-orange10" | "bg-orange20" | "bg-orange30" | "bg-orange40" | "bg-orange50" | "bg-orange60" | "bg-orange70" | "bg-orange80" | "bg-red1" | "bg-red5" | "bg-red10" | "bg-red20" | "bg-red30" | "bg-red40" | "bg-red50" | "bg-red60" | "bg-red70" | "bg-red80" | "bg-purple1" | "bg-purple5" | "bg-purple10" | "bg-purple20" | "bg-purple30" | "bg-purple40" | "bg-purple50" | "bg-purple60" | "bg-purple70" | "bg-purple80" | "bg-violet1" | "bg-violet5" | "bg-violet10" | "bg-violet20" | "bg-violet30" | "bg-violet40" | "bg-violet50" | "bg-violet60" | "bg-violet70" | "bg-violet80", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
|
|
511
511
|
label?: string | undefined;
|
|
512
512
|
color?: string | undefined;
|
|
513
|
-
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
|
|
513
|
+
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => React.JSX.Element) | null;
|
|
514
514
|
iconStyle?: StyleProp<ImageStyle>;
|
|
515
515
|
iconProps?: Partial<import("../icon").IconProps> | undefined;
|
|
516
516
|
iconOnRight?: boolean | undefined;
|
|
@@ -541,7 +541,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
|
|
|
541
541
|
}, "ref"> | Omit<import("../touchableOpacity").TouchableOpacityProps & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & import("../../commons/modifiers").CustomModifier & Partial<Record<"bg-transparent" | "bg-black" | "bg-white" | "bg-dark" | "bg-$backgroundDefault" | "bg-$backgroundElevated" | "bg-$backgroundElevatedLight" | "bg-$backgroundNeutralHeavy" | "bg-$backgroundNeutralIdle" | "bg-$backgroundNeutralMedium" | "bg-$backgroundNeutral" | "bg-$backgroundNeutralLight" | "bg-$backgroundPrimaryHeavy" | "bg-$backgroundPrimaryMedium" | "bg-$backgroundPrimaryLight" | "bg-$backgroundGeneralHeavy" | "bg-$backgroundGeneralMedium" | "bg-$backgroundGeneralLight" | "bg-$backgroundSuccessHeavy" | "bg-$backgroundSuccessLight" | "bg-$backgroundWarningHeavy" | "bg-$backgroundWarningLight" | "bg-$backgroundMajorLight" | "bg-$backgroundMajorHeavy" | "bg-$backgroundDangerHeavy" | "bg-$backgroundDangerLight" | "bg-$backgroundDisabled" | "bg-$backgroundDark" | "bg-$backgroundDarkElevated" | "bg-$backgroundDarkActive" | "bg-$backgroundInverted" | "bg-$textDisabled" | "bg-$textDefault" | "bg-$textNeutralHeavy" | "bg-$textNeutral" | "bg-$textNeutralLight" | "bg-$textDefaultLight" | "bg-$textPrimary" | "bg-$textGeneral" | "bg-$textSuccess" | "bg-$textSuccessLight" | "bg-$textMajor" | "bg-$textDanger" | "bg-$textDangerLight" | "bg-$iconDefault" | "bg-$iconNeutral" | "bg-$iconDefaultLight" | "bg-$iconPrimary" | "bg-$iconPrimaryLight" | "bg-$iconGeneral" | "bg-$iconGeneralLight" | "bg-$iconSuccess" | "bg-$iconSuccessLight" | "bg-$iconMajor" | "bg-$iconDanger" | "bg-$iconDangerLight" | "bg-$iconDisabled" | "bg-$outlineDefault" | "bg-$outlineDisabled" | "bg-$outlineDisabledHeavy" | "bg-$outlineNeutral" | "bg-$outlineNeutralHeavy" | "bg-$outlinePrimary" | "bg-$outlinePrimaryMedium" | "bg-$outlineGeneral" | "bg-$outlineWarning" | "bg-$outlineDanger" | "bg-$outlineInverted" | "bg-$black" | "bg-$white" | "bg-grey1" | "bg-grey5" | "bg-grey10" | "bg-grey20" | "bg-grey30" | "bg-grey40" | "bg-grey50" | "bg-grey60" | "bg-grey70" | "bg-grey80" | "bg-blue1" | "bg-blue5" | "bg-blue10" | "bg-blue20" | "bg-blue30" | "bg-blue40" | "bg-blue50" | "bg-blue60" | "bg-blue70" | "bg-blue80" | "bg-cyan10" | "bg-cyan20" | "bg-cyan30" | "bg-cyan40" | "bg-cyan50" | "bg-cyan60" | "bg-cyan70" | "bg-cyan80" | "bg-green1" | "bg-green5" | "bg-green10" | "bg-green20" | "bg-green30" | "bg-green40" | "bg-green50" | "bg-green60" | "bg-green70" | "bg-green80" | "bg-yellow1" | "bg-yellow5" | "bg-yellow10" | "bg-yellow20" | "bg-yellow30" | "bg-yellow40" | "bg-yellow50" | "bg-yellow60" | "bg-yellow70" | "bg-yellow80" | "bg-orange1" | "bg-orange5" | "bg-orange10" | "bg-orange20" | "bg-orange30" | "bg-orange40" | "bg-orange50" | "bg-orange60" | "bg-orange70" | "bg-orange80" | "bg-red1" | "bg-red5" | "bg-red10" | "bg-red20" | "bg-red30" | "bg-red40" | "bg-red50" | "bg-red60" | "bg-red70" | "bg-red80" | "bg-purple1" | "bg-purple5" | "bg-purple10" | "bg-purple20" | "bg-purple30" | "bg-purple40" | "bg-purple50" | "bg-purple60" | "bg-purple70" | "bg-purple80" | "bg-violet1" | "bg-violet5" | "bg-violet10" | "bg-violet20" | "bg-violet30" | "bg-violet40" | "bg-violet50" | "bg-violet60" | "bg-violet70" | "bg-violet80", boolean>> & Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & {
|
|
542
542
|
label?: string | undefined;
|
|
543
543
|
color?: string | undefined;
|
|
544
|
-
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
|
|
544
|
+
iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => React.JSX.Element) | null;
|
|
545
545
|
iconStyle?: StyleProp<ImageStyle>;
|
|
546
546
|
iconProps?: Partial<import("../icon").IconProps> | undefined;
|
|
547
547
|
iconOnRight?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ImageStyle, TextStyle, StyleProp } from 'react-native';
|
|
3
2
|
import { BaseComponentInjectedProps, ForwardRefInjectedProps, TypographyModifiers, ColorsModifiers, BackgroundColorModifier, MarginModifiers } from '../../commons/new';
|
|
4
3
|
import { TouchableOpacityProps } from '../touchableOpacity';
|
|
4
|
+
import type { JSX } from 'react';
|
|
5
5
|
import { TextProps } from '../text';
|
|
6
6
|
import { ImageProps } from '../image';
|
|
7
7
|
import type { IconProps } from '../icon';
|
|
@@ -140,7 +140,7 @@ export type ButtonProps = TouchableOpacityProps & TypographyModifiers & ColorsMo
|
|
|
140
140
|
/**
|
|
141
141
|
* Custom element to render as button background (takes precedence over backgroundColor)
|
|
142
142
|
*/
|
|
143
|
-
customBackground?: React.ReactElement
|
|
143
|
+
customBackground?: React.ReactElement<any>;
|
|
144
144
|
};
|
|
145
145
|
export type ButtonState = {
|
|
146
146
|
size?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Component, RefObject, ReactNode, Key } from 'react';
|
|
1
|
+
import React, { Component, RefObject, ReactNode, Key, type JSX } from 'react';
|
|
2
2
|
import { ScrollView, LayoutChangeEvent, NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
|
|
3
3
|
import { CarouselProps, CarouselState, PageControlPosition } from './types';
|
|
4
4
|
export { CarouselProps, PageControlPosition };
|
|
@@ -15,7 +15,7 @@ declare class Carousel extends Component<CarouselProps, CarouselState> {
|
|
|
15
15
|
static displayName: string;
|
|
16
16
|
static defaultProps: DefaultProps;
|
|
17
17
|
static pageControlPositions: typeof PageControlPosition;
|
|
18
|
-
carousel: RefObject<ScrollView>;
|
|
18
|
+
carousel: RefObject<ScrollView | null>;
|
|
19
19
|
autoplayTimer?: ReturnType<typeof setTimeout>;
|
|
20
20
|
orientationChange?: boolean;
|
|
21
21
|
skippedInitialScroll?: boolean;
|
|
@@ -49,7 +49,7 @@ declare class Carousel extends Component<CarouselProps, CarouselState> {
|
|
|
49
49
|
goToNextPage(): void;
|
|
50
50
|
getCalcIndex(index: number): number;
|
|
51
51
|
getSnapToOffsets: () => number[] | undefined;
|
|
52
|
-
getInitialContentOffset: (snapToOffsets: number[] | undefined) => PointPropType;
|
|
52
|
+
getInitialContentOffset: (snapToOffsets: number[] | undefined) => import("./types").PointPropType;
|
|
53
53
|
shouldUsePageWidth(): number | false | undefined;
|
|
54
54
|
shouldEnablePagination(): boolean | undefined;
|
|
55
55
|
shouldAllowAccessibilityLayout(): boolean | undefined;
|
|
@@ -60,11 +60,11 @@ declare class Carousel extends Component<CarouselProps, CarouselState> {
|
|
|
60
60
|
onScrollEvent: (...args: any[]) => void;
|
|
61
61
|
renderChild: (child: ReactNode, key: Key) => JSX.Element | undefined;
|
|
62
62
|
renderChildren(): JSX.Element[] | null | undefined;
|
|
63
|
-
renderPageControl():
|
|
64
|
-
renderCounter():
|
|
65
|
-
renderAccessibleLayout():
|
|
66
|
-
renderCarousel():
|
|
67
|
-
render():
|
|
63
|
+
renderPageControl(): JSX.Element | undefined;
|
|
64
|
+
renderCounter(): JSX.Element | undefined;
|
|
65
|
+
renderAccessibleLayout(): JSX.Element;
|
|
66
|
+
renderCarousel(): JSX.Element;
|
|
67
|
+
render(): JSX.Element;
|
|
68
68
|
}
|
|
69
69
|
export { Carousel };
|
|
70
70
|
declare const _default: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<any>> & Carousel & {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ScrollViewProps, StyleProp, ViewStyle, NativeSyntheticEvent, NativeScrollEvent, Animated } from 'react-native';
|
|
2
|
-
import { PointPropType } from 'deprecated-react-native-prop-types';
|
|
3
2
|
import { PageControlProps } from '../pageControl';
|
|
4
3
|
export declare enum PageControlPosition {
|
|
5
4
|
OVER = "over",
|
|
6
5
|
UNDER = "under"
|
|
7
6
|
}
|
|
7
|
+
export type PointPropType = {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
8
11
|
export interface CarouselProps extends ScrollViewProps {
|
|
9
12
|
/**
|
|
10
13
|
* the first page to start with
|
|
@@ -73,7 +73,7 @@ declare class ColorPalette extends PureComponent<Props, State> {
|
|
|
73
73
|
backgroundColor: string;
|
|
74
74
|
};
|
|
75
75
|
constructor(props: Props);
|
|
76
|
-
carousel: React.RefObject<typeof Carousel>;
|
|
76
|
+
carousel: React.RefObject<typeof Carousel | null>;
|
|
77
77
|
scrollBar: React.RefObject<any>;
|
|
78
78
|
itemsRefs?: any;
|
|
79
79
|
selectedColorIndex?: number;
|
|
@@ -66,7 +66,7 @@ export type DateTimePickerProps = OldApiProps & Omit<TextFieldProps, 'value' | '
|
|
|
66
66
|
*/
|
|
67
67
|
renderInput?: (props: Omit<DateTimePickerProps, 'value'> & {
|
|
68
68
|
value?: string;
|
|
69
|
-
}) => React.ReactElement
|
|
69
|
+
}) => React.ReactElement<any>;
|
|
70
70
|
/**
|
|
71
71
|
* Override system theme variant (dark or light mode) used by the date picker.
|
|
72
72
|
*/
|
|
@@ -164,7 +164,7 @@ declare const DateTimePicker: React.ForwardRefExoticComponent<OldApiProps & Omit
|
|
|
164
164
|
*/
|
|
165
165
|
renderInput?: ((props: Omit<DateTimePickerProps, 'value'> & {
|
|
166
166
|
value?: string;
|
|
167
|
-
}) => React.ReactElement) | undefined;
|
|
167
|
+
}) => React.ReactElement<any>) | undefined;
|
|
168
168
|
/**
|
|
169
169
|
* Override system theme variant (dark or light mode) used by the date picker.
|
|
170
170
|
*/
|