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.
Files changed (138) hide show
  1. package/ReactNativeUiLib.podspec +22 -0
  2. package/lib/components/HighlighterOverlayView/index.d.ts +2 -2
  3. package/lib/components/HighlighterOverlayView/index.web.d.ts +2 -2
  4. package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.d.ts +1 -1
  5. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.js +1 -5
  6. package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
  7. package/lib/components/Keyboard/KeyboardAccessoryView/index.js +1 -3
  8. package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +1 -3
  9. package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +2 -6
  10. package/lib/components/Keyboard/KeyboardTrackingView/index.js +4 -5
  11. package/lib/components/Keyboard/index.d.ts +1 -2
  12. package/lib/package.json +21 -20
  13. package/lib/react-native.config.js +1 -1
  14. package/marquee.d.ts +2 -0
  15. package/marquee.js +1 -0
  16. package/package.json +164 -161
  17. package/src/commons/asBaseComponent.js +1 -2
  18. package/src/commons/baseComponent.js +8 -0
  19. package/src/commons/forwardRef.js +4 -1
  20. package/src/commons/modifiers.d.ts +6 -0
  21. package/src/commons/modifiers.js +18 -0
  22. package/src/commons/withScrollEnabler.js +4 -0
  23. package/src/commons/withScrollReached.js +4 -0
  24. package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +7 -0
  25. package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +6 -0
  26. package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +6 -0
  27. package/src/components/WheelPicker/WheelPicker.driver.d.ts +2 -2
  28. package/src/components/WheelPicker/index.d.ts +2 -2
  29. package/src/components/WheelPicker/index.js +1 -1
  30. package/src/components/WheelPicker/usePresenter.d.ts +0 -1
  31. package/src/components/actionSheet/index.d.ts +1 -1
  32. package/src/components/animatedImage/index.d.ts +1 -1
  33. package/src/components/animatedScanner/index.js +37 -0
  34. package/src/components/avatar/index.d.ts +1 -1
  35. package/src/components/badge/index.d.ts +4 -4
  36. package/src/components/baseInput/index.d.ts +1 -0
  37. package/src/components/baseInput/index.js +49 -1
  38. package/src/components/button/index.d.ts +4 -4
  39. package/src/components/button/types.d.ts +2 -2
  40. package/src/components/carousel/index.d.ts +8 -8
  41. package/src/components/carousel/types.d.ts +1 -4
  42. package/src/components/carousel/types.js +2 -0
  43. package/src/components/checkbox/index.d.ts +1 -1
  44. package/src/components/chip/index.d.ts +1 -1
  45. package/src/components/colorPalette/index.d.ts +1 -1
  46. package/src/components/colorPicker/ColorPickerPresenter.d.ts +1 -1
  47. package/src/components/dateTimePicker/index.d.ts +2 -2
  48. package/src/components/dateTimePicker/index.js +2 -2
  49. package/src/components/dialog/types.d.ts +4 -4
  50. package/src/components/dialog/useDialogContent.d.ts +1 -1
  51. package/src/components/drawer/index.d.ts +1 -1
  52. package/src/components/expandableSection/index.d.ts +2 -2
  53. package/src/components/fadedScrollView/index.js +1 -1
  54. package/src/components/featureHighlight/index.js +7 -5
  55. package/src/components/gridListItem/index.d.ts +7 -7
  56. package/src/components/gridView/index.d.ts +1 -1
  57. package/src/components/hint/HintBubble.d.ts +1 -1
  58. package/src/components/hint/HintOld.d.ts +10 -10
  59. package/src/components/hint/hooks/useHintLayout.d.ts +1 -1
  60. package/src/components/hint/index.d.ts +2 -2
  61. package/src/components/hint/types.d.ts +2 -2
  62. package/src/components/icon/index.js +3 -0
  63. package/src/components/image/index.d.ts +1 -1
  64. package/src/components/image/index.js +17 -20
  65. package/src/components/loaderScreen/index.d.ts +1 -1
  66. package/src/components/loaderScreen/types.d.ts +1 -1
  67. package/src/{incubator → components}/marquee/index.js +2 -2
  68. package/src/{incubator → components}/marquee/marquee.api.json +1 -1
  69. package/src/{incubator → components}/marquee/types.d.ts +2 -2
  70. package/src/components/maskedInput/index.d.ts +4 -21
  71. package/src/components/maskedInput/index.js +16 -78
  72. package/src/components/maskedInput/maskedInput.api.json +1 -0
  73. package/src/components/maskedInput/new.d.ts +22 -0
  74. package/src/components/maskedInput/new.js +85 -0
  75. package/src/components/maskedInput/old.js +95 -0
  76. package/src/components/modal/index.d.ts +3 -3
  77. package/src/components/numberInput/index.js +2 -2
  78. package/src/components/overlay/index.d.ts +1 -1
  79. package/src/components/picker/PickerDialog.android.js +15 -0
  80. package/src/components/picker/PickerDialog.js +7 -0
  81. package/src/components/picker/helpers/useImperativePickerHandle.d.ts +1 -1
  82. package/src/components/picker/helpers/useImperativePickerHandle.js +1 -1
  83. package/src/components/picker/types.d.ts +9 -9
  84. package/src/components/progressBar/index.d.ts +2 -2
  85. package/src/components/screenFooter/useAnimatedFooterStyle.js +1 -1
  86. package/src/components/scrollBar/index.d.ts +4 -11
  87. package/src/components/searchInput/index.js +1 -1
  88. package/src/components/searchInput/types.d.ts +2 -2
  89. package/src/components/sectionsWheelPicker/SectionsWheelPicker.driver.d.ts +2 -2
  90. package/src/components/skeletonView/index.d.ts +4 -4
  91. package/src/components/slider/Thumb.d.ts +1 -1
  92. package/src/components/slider/types.d.ts +1 -1
  93. package/src/components/stackAggregator/index.d.ts +1 -1
  94. package/src/components/tabController/TabBarItem.d.ts +2 -2
  95. package/src/components/tabController/TabBarItem.js +1 -1
  96. package/src/components/tabController/TabPage.d.ts +2 -2
  97. package/src/components/tabController/useScrollToItem.d.ts +1 -1
  98. package/src/components/text/Text.driver.d.ts +1 -1
  99. package/src/components/textArea/index.js +6 -0
  100. package/src/components/textField/types.d.ts +4 -4
  101. package/src/components/textField/useImperativeInputHandle.d.ts +1 -1
  102. package/src/components/textField/useImperativeInputHandle.js +1 -1
  103. package/src/components/textField/usePreset.d.ts +36 -36
  104. package/src/components/textFieldOld/index.d.ts +71 -0
  105. package/src/components/textFieldOld/index.js +807 -0
  106. package/src/components/timeline/index.js +1 -1
  107. package/src/components/toast/index.js +69 -0
  108. package/src/components/wizard/index.d.ts +1 -1
  109. package/src/components/wizard/types.d.ts +1 -1
  110. package/src/components/wizard/wizard.api.json +1 -1
  111. package/src/helpers/AvatarHelper.d.ts +1 -1
  112. package/src/helpers/DocsGenerator.js +61 -0
  113. package/src/hooks/useCombinedRefs/index.js +2 -1
  114. package/src/hooks/useDebounce/index.js +1 -1
  115. package/src/hooks/useHiddenLocation/index.js +2 -2
  116. package/src/hooks/useHiddenLocation/index.web.js +2 -2
  117. package/src/hooks/useMeasure/index.d.ts +1 -1
  118. package/src/hooks/useMeasure/index.js +1 -1
  119. package/src/hooks/useScrollTo/index.d.ts +2 -2
  120. package/src/incubator/calendar/index.js +1 -1
  121. package/src/incubator/calendar/types.d.ts +2 -2
  122. package/src/incubator/expandableOverlay/index.d.ts +2 -2
  123. package/src/incubator/index.d.ts +0 -1
  124. package/src/incubator/index.js +1 -2
  125. package/src/incubator/slider/Track.d.ts +1 -1
  126. package/src/incubator/slider/index.d.ts +1 -1
  127. package/src/incubator/toast/helpers/useToastTimer.js +1 -1
  128. package/src/incubator/toast/index.js +1 -1
  129. package/src/incubator/toast/types.d.ts +2 -2
  130. package/src/index.d.ts +2 -1
  131. package/src/index.js +18 -4
  132. package/src/testkit/Component.driver.d.ts +0 -1
  133. package/src/testkit/drivers/TestingLibraryDriver.d.ts +0 -1
  134. package/src/typings/module.d.ts +3 -12
  135. package/textFieldOld.d.ts +2 -0
  136. package/textFieldOld.js +1 -0
  137. /package/src/{incubator → components}/marquee/index.d.ts +0 -0
  138. /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(undefined);
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<React.HTMLAttributes<HTMLElement>, HTMLElement>[] | null | undefined;
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;
@@ -73,7 +73,7 @@ export interface WizardProps {
73
73
  */
74
74
  activeIndex: number;
75
75
  /**
76
- * The configuration of the active step
76
+ * The configuration of the active step (see Wizard.Step.propTypes)
77
77
  */
78
78
  activeConfig?: WizardStepProps;
79
79
  /**
@@ -17,7 +17,7 @@
17
17
  {
18
18
  "name": "activeConfig",
19
19
  "type": "WizardStepProps",
20
- "description": "The configuration of the active step"
20
+ "description": "The configuration of the active step (see Wizard.Step.propTypes)"
21
21
  },
22
22
  {
23
23
  "name": "onActiveIndexChanged",
@@ -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(undefined);
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(undefined);
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(undefined);
24
- const layoutData = useRef(undefined);
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(undefined);
20
- const layoutData = useRef(undefined);
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").RefObject<RNView | undefined>;
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(undefined);
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 | null>;
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 | null>;
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(undefined);
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<any> | null;
115
- renderHeader?: (header: DateSectionHeader) => React.ReactElement<any> | null;
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<any>;
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<any> | undefined | null;
41
+ renderCustomOverlay?: (props: RenderCustomOverlayProps) => React.ReactElement | undefined | null;
42
42
  /**
43
43
  * Disabled opening expandable overlay
44
44
  */
@@ -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';
@@ -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<any> | ReactElement<any>[];
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<any> | ReactElement<any>[];
65
+ renderTrack?: () => ReactElement | ReactElement[];
66
66
  /**
67
67
  * The thumb style
68
68
  */
@@ -3,7 +3,7 @@ export default ({
3
3
  autoDismiss,
4
4
  onDismiss
5
5
  }) => {
6
- const timer = useRef(undefined);
6
+ const timer = useRef();
7
7
  const clearTimer = useCallback(() => {
8
8
  if (timer.current) {
9
9
  clearTimeout(timer.current);
@@ -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(undefined);
46
+ const viewRef = useRef();
47
47
  const [toastHeight, setToastHeight] = useState();
48
48
  const {
49
49
  clearTimer,
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode, type JSX } from 'react';
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<any>;
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, MarqueeDirections, MarqueeProps } from './incubator';
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 Incubator().MarqueeDirections;
923
+ return _marquee().MarqueeDirections;
917
924
  }
918
925
  });
919
926
  Object.defineProperty(exports, "MarqueeProps", {
920
927
  enumerable: true,
921
928
  get: function () {
922
- return Incubator().MarqueeProps;
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 () {
@@ -1,4 +1,3 @@
1
- import type { JSX } from 'react';
2
1
  import { DragData, UniDriver, UniDriverClass } from './UniDriver';
3
2
  export type ComponentDriverArgs = {
4
3
  testID: string;
@@ -1,4 +1,3 @@
1
- import type { JSX } from 'react';
2
1
  import { DragData, UniDriver } from '../UniDriver';
3
2
  import { ReactTestInstance } from 'react-test-renderer';
4
3
  export declare class TestingLibraryDriver<Props> implements UniDriver<Props> {
@@ -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
- import 'react';
15
-
16
- declare module 'react' {
17
- namespace JSX {
18
- interface IntrinsicAttributes {
19
- fsTagName?: string;
20
- }
9
+ declare namespace JSX {
10
+ interface IntrinsicAttributes {
11
+ fsTagName?: string;
21
12
  }
22
13
  }
@@ -0,0 +1,2 @@
1
+ import {TextFieldOld} from './src';
2
+ export default TextFieldOld;
@@ -0,0 +1 @@
1
+ module.exports = require('./src/components/textFieldOld').default;
File without changes