react-native-ui-lib 8.5.0-snapshot.7969 → 8.5.1
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/ReactNativeUiLib.podspec +22 -0
- 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 +1 -5
- package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
- package/lib/components/Keyboard/KeyboardAccessoryView/index.js +1 -3
- package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +1 -3
- package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +2 -6
- package/lib/components/Keyboard/KeyboardTrackingView/index.js +4 -5
- package/lib/components/Keyboard/index.d.ts +1 -2
- package/lib/package.json +21 -20
- package/lib/react-native.config.js +1 -1
- package/marquee.d.ts +2 -0
- package/marquee.js +1 -0
- package/package.json +164 -161
- package/src/commons/asBaseComponent.js +1 -2
- package/src/commons/baseComponent.js +8 -0
- package/src/commons/forwardRef.js +4 -1
- package/src/commons/modifiers.d.ts +6 -0
- package/src/commons/modifiers.js +18 -0
- package/src/commons/withScrollEnabler.js +4 -0
- package/src/commons/withScrollReached.js +4 -0
- package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +7 -0
- package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +6 -0
- package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +6 -0
- 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 +0 -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 +37 -0
- 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 +1 -0
- package/src/components/baseInput/index.js +49 -1
- 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 +1 -4
- package/src/components/carousel/types.js +2 -0
- 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/colorPicker/ColorPickerPresenter.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 +7 -5
- 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 +3 -0
- package/src/components/image/index.d.ts +1 -1
- package/src/components/image/index.js +17 -20
- package/src/components/loaderScreen/index.d.ts +1 -1
- package/src/components/loaderScreen/types.d.ts +1 -1
- package/src/{incubator → components}/marquee/index.js +2 -2
- package/src/{incubator → components}/marquee/marquee.api.json +1 -1
- package/src/{incubator → components}/marquee/types.d.ts +2 -2
- package/src/components/maskedInput/index.d.ts +4 -21
- package/src/components/maskedInput/index.js +16 -78
- package/src/components/maskedInput/maskedInput.api.json +1 -0
- package/src/components/maskedInput/new.d.ts +22 -0
- package/src/components/maskedInput/new.js +85 -0
- package/src/components/maskedInput/old.js +95 -0
- 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 +15 -0
- package/src/components/picker/PickerDialog.js +7 -0
- 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/useAnimatedFooterStyle.js +1 -1
- package/src/components/scrollBar/index.d.ts +4 -11
- 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 +6 -0
- 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/textFieldOld/index.d.ts +71 -0
- package/src/components/textFieldOld/index.js +807 -0
- package/src/components/timeline/index.js +1 -1
- package/src/components/toast/index.js +69 -0
- 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/helpers/AvatarHelper.d.ts +1 -1
- package/src/helpers/DocsGenerator.js +61 -0
- package/src/hooks/useCombinedRefs/index.js +2 -1
- 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/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/index.d.ts +0 -1
- package/src/incubator/index.js +1 -2
- 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 +2 -1
- package/src/index.js +18 -4
- package/src/testkit/Component.driver.d.ts +0 -1
- package/src/testkit/drivers/TestingLibraryDriver.d.ts +0 -1
- package/src/typings/module.d.ts +3 -12
- package/textFieldOld.d.ts +2 -0
- package/textFieldOld.js +1 -0
- /package/src/{incubator → components}/marquee/index.d.ts +0 -0
- /package/src/{incubator → components}/marquee/types.js +0 -0
|
@@ -21,7 +21,7 @@ const Timeline = props => {
|
|
|
21
21
|
const [anchorMeasurements, setAnchorMeasurements] = useState();
|
|
22
22
|
const [contentContainerMeasurements, setContentContainerMeasurements] = useState();
|
|
23
23
|
const [pointMeasurements, setPointMeasurements] = useState();
|
|
24
|
-
const contentContainerRef = useRef(
|
|
24
|
+
const contentContainerRef = useRef();
|
|
25
25
|
const onMeasure = (x, y, width, height) => {
|
|
26
26
|
setAnchorMeasurements({
|
|
27
27
|
x,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import {AccessibilityInfo, findNodeHandle, StyleSheet, Animated, Easing, ActivityIndicator} from 'react-native';
|
|
4
5
|
import {PureBaseComponent} from '../../commons';
|
|
@@ -20,6 +21,74 @@ const COLOR = Colors.white;
|
|
|
20
21
|
export default class Toast extends PureBaseComponent {
|
|
21
22
|
static displayName = 'Toast';
|
|
22
23
|
|
|
24
|
+
static propTypes = {
|
|
25
|
+
/**
|
|
26
|
+
* Whether to show or hide the toast
|
|
27
|
+
*/
|
|
28
|
+
visible: PropTypes.bool,
|
|
29
|
+
/**
|
|
30
|
+
* The position of the toast. 'top' or 'bottom'.
|
|
31
|
+
*/
|
|
32
|
+
position: PropTypes.oneOf(['top', 'bottom']),
|
|
33
|
+
/**
|
|
34
|
+
* custom zIndex for toast
|
|
35
|
+
*/
|
|
36
|
+
zIndex: PropTypes.number,
|
|
37
|
+
/**
|
|
38
|
+
* The background color of the toast
|
|
39
|
+
*/
|
|
40
|
+
backgroundColor: PropTypes.string,
|
|
41
|
+
/**
|
|
42
|
+
* the toast content color (message, actions labels)
|
|
43
|
+
*/
|
|
44
|
+
color: PropTypes.string,
|
|
45
|
+
/**
|
|
46
|
+
* the toast message
|
|
47
|
+
*/
|
|
48
|
+
message: PropTypes.string,
|
|
49
|
+
/**
|
|
50
|
+
* should message be centered in the toast
|
|
51
|
+
*/
|
|
52
|
+
centerMessage: PropTypes.bool,
|
|
53
|
+
/**
|
|
54
|
+
* a left icon
|
|
55
|
+
*/
|
|
56
|
+
icon: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
|
57
|
+
/**
|
|
58
|
+
* a single action for the user
|
|
59
|
+
*/
|
|
60
|
+
action: PropTypes.shape(Button.propTypes),
|
|
61
|
+
/**
|
|
62
|
+
* should show a loader (showDismiss must be false)
|
|
63
|
+
*/
|
|
64
|
+
showLoader: PropTypes.bool,
|
|
65
|
+
/**
|
|
66
|
+
* callback for dismiss action
|
|
67
|
+
*/
|
|
68
|
+
onDismiss: PropTypes.func,
|
|
69
|
+
/**
|
|
70
|
+
* number of milliseconds to automatically invoke the onDismiss callback
|
|
71
|
+
*/
|
|
72
|
+
autoDismiss: PropTypes.number,
|
|
73
|
+
/**
|
|
74
|
+
* show dismiss action (right 'X' button)
|
|
75
|
+
*/
|
|
76
|
+
showDismiss: PropTypes.bool,
|
|
77
|
+
/**
|
|
78
|
+
* callback for end of component animation
|
|
79
|
+
*/
|
|
80
|
+
onAnimationEnd: PropTypes.func,
|
|
81
|
+
/**
|
|
82
|
+
* render a custom view that will appear permanently above or below a Toast,
|
|
83
|
+
* depends on the Toast's position, and animate with it when the Toast is made visible or dismissed
|
|
84
|
+
*/
|
|
85
|
+
renderAttachment: PropTypes.elementType,
|
|
86
|
+
/**
|
|
87
|
+
* render a custom loader component instead of the default when passing showLoader
|
|
88
|
+
*/
|
|
89
|
+
customLoader: PropTypes.func
|
|
90
|
+
};
|
|
91
|
+
|
|
23
92
|
static defaultProps = {
|
|
24
93
|
position: 'top',
|
|
25
94
|
zIndex: 100
|
|
@@ -24,7 +24,7 @@ declare class Wizard extends Component<WizardProps, State> {
|
|
|
24
24
|
componentWillUnmount(): void;
|
|
25
25
|
onOrientationChange: () => void;
|
|
26
26
|
getMaxWidth(): number;
|
|
27
|
-
renderChildren(): React.DetailedReactHTMLElement<
|
|
27
|
+
renderChildren(): React.DetailedReactHTMLElement<any, HTMLElement>[] | null | undefined;
|
|
28
28
|
render(): React.JSX.Element;
|
|
29
29
|
}
|
|
30
30
|
declare const _default: React.ForwardRefExoticComponent<WizardProps & React.RefAttributes<any>> & typeof Wizard;
|
|
@@ -2,7 +2,7 @@ export declare function getInitialsTypography(size: number): import("react-nativ
|
|
|
2
2
|
export declare function hashStringToNumber(str?: string): number;
|
|
3
3
|
export declare function getAvatarColors(): string[];
|
|
4
4
|
export declare function getColorById(id: string, avatarColors?: string[]): string;
|
|
5
|
-
export declare function getInitials(name?: string, limit?: number): string
|
|
5
|
+
export declare function getInitials(name?: string, limit?: number): Uppercase<string>;
|
|
6
6
|
export declare function getBackgroundColor(name?: string, avatarColors?: string[], hashFunction?: (name?: string) => number, defaultColor?: string): string | undefined;
|
|
7
7
|
export declare function isGravatarUrl(url: string): boolean;
|
|
8
8
|
export declare function isBlankGravatarUrl(url: string): boolean;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
|
|
4
|
+
const TAB = ' ';
|
|
5
|
+
const LINE_BREAK = '\n';
|
|
6
|
+
|
|
7
|
+
export function extractComponentInfo(instance) {
|
|
8
|
+
const componentName = instance.constructor.displayName;
|
|
9
|
+
const defaultProps = instance.constructor.defaultProps || {};
|
|
10
|
+
const props = instance.props || {};
|
|
11
|
+
return {componentName, defaultProps, props};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function generateSnippet({componentName, defaultProps, props}) {
|
|
15
|
+
let snippet = `<${componentName}`;
|
|
16
|
+
|
|
17
|
+
_.forEach(props, (value, key) => {
|
|
18
|
+
if (key === 'children') {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
let formattedValue = `{${value}}`;
|
|
22
|
+
if (_.isObject(value)) {
|
|
23
|
+
formattedValue = `{${JSON.stringify(value)}}`;
|
|
24
|
+
} else if (_.isString(value)) {
|
|
25
|
+
formattedValue = `"${value}"`;
|
|
26
|
+
} else if (_.isBoolean(value) && value === true) {
|
|
27
|
+
formattedValue = '';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const hasEmptyValue = _.isUndefined(value) || (_.isObject(value) && _.isEmpty(value));
|
|
31
|
+
const hasDefaultValue = value == defaultProps[key]; // eslint-disable-line
|
|
32
|
+
if (!hasEmptyValue && !hasDefaultValue) {
|
|
33
|
+
snippet += `${LINE_BREAK}${TAB}${key}`;
|
|
34
|
+
if (formattedValue) {
|
|
35
|
+
snippet += `=${formattedValue}`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (props.children) {
|
|
41
|
+
const childrenSnippets = React.Children.map(props.children, child => {
|
|
42
|
+
if (_.get(child, 'type.displayName')) {
|
|
43
|
+
const childSnippet =
|
|
44
|
+
TAB +
|
|
45
|
+
generateSnippet({
|
|
46
|
+
componentName: child.type.displayName,
|
|
47
|
+
props: child.props || {},
|
|
48
|
+
defaultProps: child.type.defaultProps || {}
|
|
49
|
+
});
|
|
50
|
+
return childSnippet;
|
|
51
|
+
}
|
|
52
|
+
if (typeof child === 'string') {
|
|
53
|
+
return child;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
snippet += `>${LINE_BREAK}${childrenSnippets.join(LINE_BREAK)}${LINE_BREAK}</${componentName}>`;
|
|
57
|
+
} else {
|
|
58
|
+
snippet += '/>';
|
|
59
|
+
}
|
|
60
|
+
return snippet;
|
|
61
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
const useCombinedRefs = (...refs) => {
|
|
3
|
-
const targetRef = React.useRef(
|
|
3
|
+
const targetRef = React.useRef();
|
|
4
4
|
React.useEffect(() => {
|
|
5
5
|
refs.forEach(ref => {
|
|
6
6
|
if (!ref) {
|
|
@@ -9,6 +9,7 @@ const useCombinedRefs = (...refs) => {
|
|
|
9
9
|
if (typeof ref === 'function') {
|
|
10
10
|
ref(targetRef.current);
|
|
11
11
|
} else {
|
|
12
|
+
// @ts-expect-error
|
|
12
13
|
ref.current = targetRef.current;
|
|
13
14
|
}
|
|
14
15
|
});
|
|
@@ -4,7 +4,7 @@ import { useCallback, useRef } from 'react';
|
|
|
4
4
|
* This hook is used to debounce a function call
|
|
5
5
|
*/
|
|
6
6
|
function useDebounce(func, timeout = 300) {
|
|
7
|
-
const handler = useRef(
|
|
7
|
+
const handler = useRef();
|
|
8
8
|
const debouncedFunction = useCallback(args => {
|
|
9
9
|
if (handler.current) {
|
|
10
10
|
clearTimeout(handler.current);
|
|
@@ -20,8 +20,8 @@ export default function useHiddenLocation() {
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
const [hiddenLocation, setHiddenLocation] = useState(getHiddenLocation({}));
|
|
23
|
-
const ref = useRef(
|
|
24
|
-
const layoutData = useRef(
|
|
23
|
+
const ref = useRef();
|
|
24
|
+
const layoutData = useRef();
|
|
25
25
|
const wasMeasured = useRef(wasMeasuredDefaultValue);
|
|
26
26
|
const measure = useCallback(() => {
|
|
27
27
|
if (ref.current && layoutData.current && layoutData.current.width > 0 && layoutData.current.height > 0) {
|
|
@@ -16,8 +16,8 @@ export default function useHiddenLocation() {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
const [hiddenLocation, setHiddenLocation] = useState(getHiddenLocation({}));
|
|
19
|
-
const ref = useRef(
|
|
20
|
-
const layoutData = useRef(
|
|
19
|
+
const ref = useRef();
|
|
20
|
+
const layoutData = useRef();
|
|
21
21
|
const wasMeasured = useRef(wasMeasuredDefaultValue);
|
|
22
22
|
const measure = useCallback(() => {
|
|
23
23
|
if (ref.current) {
|
|
@@ -9,7 +9,7 @@ interface Measurements {
|
|
|
9
9
|
pageY: number;
|
|
10
10
|
}
|
|
11
11
|
declare const _default: () => {
|
|
12
|
-
ref: import("react").
|
|
12
|
+
ref: import("react").MutableRefObject<RNView | undefined>;
|
|
13
13
|
measurements: Measurements | undefined;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react';
|
|
2
2
|
export default () => {
|
|
3
|
-
const ref = useRef(
|
|
3
|
+
const ref = useRef();
|
|
4
4
|
const [measurements, setMeasurements] = useState();
|
|
5
5
|
const onMeasure = (x, y, width, height, pageX, pageY) => {
|
|
6
6
|
setMeasurements({
|
|
@@ -5,7 +5,7 @@ export type ScrollToProps<T extends ScrollToSupportedViews> = {
|
|
|
5
5
|
/**
|
|
6
6
|
* A reference to the ScrollView (or FlatList) which the items are in
|
|
7
7
|
*/
|
|
8
|
-
scrollViewRef?: RefObject<T
|
|
8
|
+
scrollViewRef?: RefObject<T>;
|
|
9
9
|
/**
|
|
10
10
|
* Is the scroll view horizontal (default is true)
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export type ScrollToResultProps<T extends ScrollToSupportedViews> = {
|
|
|
15
15
|
/**
|
|
16
16
|
* A reference to the ScrollView (or FlatList) which the items are in (from the props or a created one)
|
|
17
17
|
*/
|
|
18
|
-
scrollViewRef: RefObject<T
|
|
18
|
+
scrollViewRef: RefObject<T>;
|
|
19
19
|
/**
|
|
20
20
|
* scrollTo callback.
|
|
21
21
|
* offset - the x or y to scroll to.
|
|
@@ -42,7 +42,7 @@ function Calendar(props) {
|
|
|
42
42
|
}
|
|
43
43
|
return -1;
|
|
44
44
|
}, [monthItems]);
|
|
45
|
-
const flashListRef = useRef(
|
|
45
|
+
const flashListRef = useRef();
|
|
46
46
|
const current = useSharedValue(new Date(initialDate).setHours(0, 0, 0, 0));
|
|
47
47
|
const initialMonthIndex = useRef(getItemIndex(current.value));
|
|
48
48
|
const lastUpdateSource = useSharedValue(UpdateSource.INIT);
|
|
@@ -111,8 +111,8 @@ export interface CalendarProps {
|
|
|
111
111
|
showExtraDays?: boolean;
|
|
112
112
|
}
|
|
113
113
|
export interface AgendaProps {
|
|
114
|
-
renderEvent?: (event: Event) => React.ReactElement
|
|
115
|
-
renderHeader?: (header: DateSectionHeader) => React.ReactElement
|
|
114
|
+
renderEvent?: (event: Event) => React.ReactElement | null;
|
|
115
|
+
renderHeader?: (header: DateSectionHeader) => React.ReactElement | null;
|
|
116
116
|
showLoader?: boolean;
|
|
117
117
|
onEndReached?: (date: number) => void;
|
|
118
118
|
}
|
|
@@ -14,7 +14,7 @@ export type ExpandableOverlayProps = TouchableOpacityProps & PropsWithChildren<{
|
|
|
14
14
|
/**
|
|
15
15
|
* The content to render inside the expandable modal/dialog
|
|
16
16
|
*/
|
|
17
|
-
expandableContent?: React.ReactElement
|
|
17
|
+
expandableContent?: React.ReactElement;
|
|
18
18
|
/**
|
|
19
19
|
* Whether to use a dialog as expandable container (by default the container will be a full screen modal)
|
|
20
20
|
*/
|
|
@@ -38,7 +38,7 @@ export type ExpandableOverlayProps = TouchableOpacityProps & PropsWithChildren<{
|
|
|
38
38
|
/**
|
|
39
39
|
* A custom overlay to render instead of Modal or Dialog components
|
|
40
40
|
*/
|
|
41
|
-
renderCustomOverlay?: (props: RenderCustomOverlayProps) => React.ReactElement
|
|
41
|
+
renderCustomOverlay?: (props: RenderCustomOverlayProps) => React.ReactElement | undefined | null;
|
|
42
42
|
/**
|
|
43
43
|
* Disabled opening expandable overlay
|
|
44
44
|
*/
|
package/src/incubator/index.d.ts
CHANGED
|
@@ -7,4 +7,3 @@ export { default as Slider, SliderRef, SliderProps } from './slider';
|
|
|
7
7
|
export { default as ChipsInput, ChipsInputProps, ChipsInputChangeReason, ChipsInputChipProps } from '../components/chipsInput';
|
|
8
8
|
export { default as WheelPicker, WheelPickerProps, WheelPickerItemProps, WheelPickerAlign, WheelPickerItemValue } from '../components/WheelPicker';
|
|
9
9
|
export { default as Gradient, GradientProps } from './gradient';
|
|
10
|
-
export { default as Marquee, MarqueeDirections, MarqueeProps } from './marquee';
|
package/src/incubator/index.js
CHANGED
|
@@ -8,5 +8,4 @@ export { default as Slider, SliderRef, SliderProps } from "./slider";
|
|
|
8
8
|
// TODO: delete exports after fully removing from private
|
|
9
9
|
export { default as ChipsInput, ChipsInputProps, ChipsInputChangeReason, ChipsInputChipProps } from "../components/chipsInput";
|
|
10
10
|
export { default as WheelPicker, WheelPickerProps, WheelPickerItemProps, WheelPickerAlign, WheelPickerItemValue } from "../components/WheelPicker";
|
|
11
|
-
export { default as Gradient, GradientProps } from "./gradient";
|
|
12
|
-
export { default as Marquee, MarqueeDirections, MarqueeProps } from "./marquee";
|
|
11
|
+
export { default as Gradient, GradientProps } from "./gradient";
|
|
@@ -6,7 +6,7 @@ export interface Props extends ViewProps {
|
|
|
6
6
|
maximumTrackTintColor?: string;
|
|
7
7
|
minimumTrackTintColor?: string;
|
|
8
8
|
trackStyle?: StyleProp<ViewStyle>;
|
|
9
|
-
renderTrack?: () => ReactElement
|
|
9
|
+
renderTrack?: () => ReactElement | ReactElement[];
|
|
10
10
|
onPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
11
11
|
}
|
|
12
12
|
declare const Track: (props: Props) => React.JSX.Element;
|
|
@@ -62,7 +62,7 @@ export interface SliderProps extends AccessibilityProps {
|
|
|
62
62
|
/**
|
|
63
63
|
* Custom render instead of rendering the track
|
|
64
64
|
*/
|
|
65
|
-
renderTrack?: () => ReactElement
|
|
65
|
+
renderTrack?: () => ReactElement | ReactElement[];
|
|
66
66
|
/**
|
|
67
67
|
* The thumb style
|
|
68
68
|
*/
|
|
@@ -43,7 +43,7 @@ const Toast = props => {
|
|
|
43
43
|
testID
|
|
44
44
|
} = props;
|
|
45
45
|
const directions = useRef([props.position === 'bottom' ? PanView.directions.DOWN : PanView.directions.UP, PanView.directions.LEFT, PanView.directions.RIGHT]);
|
|
46
|
-
const viewRef = useRef(
|
|
46
|
+
const viewRef = useRef();
|
|
47
47
|
const [toastHeight, setToastHeight] = useState();
|
|
48
48
|
const {
|
|
49
49
|
clearTimer,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, ReactNode
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { ImageSourcePropType, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
3
|
import { ButtonProps } from '../../components/button';
|
|
4
4
|
import { TextProps } from '../../components/text';
|
|
@@ -52,7 +52,7 @@ export interface ToastProps {
|
|
|
52
52
|
/**
|
|
53
53
|
* should show a loader
|
|
54
54
|
*/
|
|
55
|
-
loaderElement?: ReactElement
|
|
55
|
+
loaderElement?: ReactElement;
|
|
56
56
|
/**
|
|
57
57
|
* callback for dismiss action
|
|
58
58
|
*/
|
package/src/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from 'uilib-native';
|
|
|
6
6
|
export { asBaseComponent, Config, Constants, forwardRef, withScrollEnabler, WithScrollEnablerProps, withScrollReached, WithScrollReachedProps, UIComponent, BaseComponentInjectedProps, ForwardRefInjectedProps, ContainerModifiers, MarginModifiers, PaddingModifiers, TypographyModifiers, ColorsModifiers, BackgroundColorModifier } from './commons/new';
|
|
7
7
|
export { BaseComponent, PureBaseComponent } from './commons';
|
|
8
8
|
import * as Incubator from './incubator';
|
|
9
|
-
export { ExpandableOverlayProps, ExpandableOverlayMethods, ToastProps, ToastPresets
|
|
9
|
+
export { ExpandableOverlayProps, ExpandableOverlayMethods, ToastProps, ToastPresets } from './incubator';
|
|
10
10
|
import * as Hooks from './hooks';
|
|
11
11
|
import * as Modifiers from './commons/modifiers';
|
|
12
12
|
export { default as LogService } from './services/LogService';
|
|
@@ -56,6 +56,7 @@ export { default as KeyboardAwareFlatList } from './components/KeyboardAwareScro
|
|
|
56
56
|
export { default as ListItem, ListItemProps } from './components/listItem';
|
|
57
57
|
export { default as LoaderScreen, LoaderScreenProps } from './components/loaderScreen';
|
|
58
58
|
export { default as MaskedInput, MaskedInputProps } from './components/maskedInput';
|
|
59
|
+
export { default as Marquee, MarqueeDirections, MarqueeProps } from './components/marquee';
|
|
59
60
|
export { default as Modal, ModalProps, ModalTopBarProps } from './components/modal';
|
|
60
61
|
export { default as NumberInput, NumberInputProps, NumberInputData } from './components/numberInput';
|
|
61
62
|
export { default as Overlay, OverlayTypes } from './components/overlay';
|
package/src/index.js
CHANGED
|
@@ -28,8 +28,6 @@ var _exportNames = {
|
|
|
28
28
|
ExpandableOverlayMethods: true,
|
|
29
29
|
ToastProps: true,
|
|
30
30
|
ToastPresets: true,
|
|
31
|
-
MarqueeDirections: true,
|
|
32
|
-
MarqueeProps: true,
|
|
33
31
|
Incubator: true,
|
|
34
32
|
Hooks: true,
|
|
35
33
|
Modifiers: true,
|
|
@@ -141,6 +139,9 @@ var _exportNames = {
|
|
|
141
139
|
LoaderScreenProps: true,
|
|
142
140
|
MaskedInput: true,
|
|
143
141
|
MaskedInputProps: true,
|
|
142
|
+
Marquee: true,
|
|
143
|
+
MarqueeDirections: true,
|
|
144
|
+
MarqueeProps: true,
|
|
144
145
|
Modal: true,
|
|
145
146
|
ModalProps: true,
|
|
146
147
|
ModalTopBarProps: true,
|
|
@@ -910,16 +911,22 @@ Object.defineProperty(exports, "MarginModifiers", {
|
|
|
910
911
|
return _new().MarginModifiers;
|
|
911
912
|
}
|
|
912
913
|
});
|
|
914
|
+
Object.defineProperty(exports, "Marquee", {
|
|
915
|
+
enumerable: true,
|
|
916
|
+
get: function () {
|
|
917
|
+
return _marquee().default;
|
|
918
|
+
}
|
|
919
|
+
});
|
|
913
920
|
Object.defineProperty(exports, "MarqueeDirections", {
|
|
914
921
|
enumerable: true,
|
|
915
922
|
get: function () {
|
|
916
|
-
return
|
|
923
|
+
return _marquee().MarqueeDirections;
|
|
917
924
|
}
|
|
918
925
|
});
|
|
919
926
|
Object.defineProperty(exports, "MarqueeProps", {
|
|
920
927
|
enumerable: true,
|
|
921
928
|
get: function () {
|
|
922
|
-
return
|
|
929
|
+
return _marquee().MarqueeProps;
|
|
923
930
|
}
|
|
924
931
|
});
|
|
925
932
|
Object.defineProperty(exports, "MaskedInput", {
|
|
@@ -2102,6 +2109,13 @@ function _maskedInput() {
|
|
|
2102
2109
|
};
|
|
2103
2110
|
return data;
|
|
2104
2111
|
}
|
|
2112
|
+
function _marquee() {
|
|
2113
|
+
const data = _interopRequireWildcard(require("./components/marquee"));
|
|
2114
|
+
_marquee = function () {
|
|
2115
|
+
return data;
|
|
2116
|
+
};
|
|
2117
|
+
return data;
|
|
2118
|
+
}
|
|
2105
2119
|
function _modal() {
|
|
2106
2120
|
const data = _interopRequireWildcard(require("./components/modal"));
|
|
2107
2121
|
_modal = function () {
|
package/src/typings/module.d.ts
CHANGED
|
@@ -3,20 +3,11 @@ declare namespace globalThis {
|
|
|
3
3
|
var _UILIB_TESTING: boolean;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
declare global {
|
|
7
|
-
// eslint-disable-next-line no-var
|
|
8
|
-
var _UILIB_TESTING: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
// This support importing png files, typing wise
|
|
12
7
|
declare module '*.png';
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
namespace JSX {
|
|
18
|
-
interface IntrinsicAttributes {
|
|
19
|
-
fsTagName?: string;
|
|
20
|
-
}
|
|
9
|
+
declare namespace JSX {
|
|
10
|
+
interface IntrinsicAttributes {
|
|
11
|
+
fsTagName?: string;
|
|
21
12
|
}
|
|
22
13
|
}
|
package/textFieldOld.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./src/components/textFieldOld').default;
|
|
File without changes
|
|
File without changes
|