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.
Files changed (147) hide show
  1. package/lib/android/build.gradle +3 -3
  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 +5 -1
  6. package/lib/components/Keyboard/KeyboardAccessoryView/index.d.ts +2 -2
  7. package/lib/components/Keyboard/KeyboardAccessoryView/index.js +3 -1
  8. package/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.js +3 -1
  9. package/lib/components/Keyboard/KeyboardTrackingView/index.d.ts +6 -2
  10. package/lib/components/Keyboard/KeyboardTrackingView/index.js +5 -4
  11. package/lib/components/Keyboard/index.d.ts +2 -1
  12. package/lib/package.json +20 -21
  13. package/lib/react-native.config.js +1 -1
  14. package/package.json +161 -164
  15. package/screenFooter.d.ts +2 -0
  16. package/screenFooter.js +1 -0
  17. package/scripts/release/prReleaseNotesCommon.js +2 -1
  18. package/src/assets/internal/images/bottomGradient.png +0 -0
  19. package/src/assets/internal/images/bottomGradient@1.5x.png +0 -0
  20. package/src/assets/internal/images/bottomGradient@2x.png +0 -0
  21. package/src/assets/internal/images/bottomGradient@3x.png +0 -0
  22. package/src/assets/internal/images/bottomGradient@4x.png +0 -0
  23. package/src/assets/internal/images/index.js +3 -0
  24. package/src/commons/asBaseComponent.js +2 -1
  25. package/src/commons/baseComponent.js +0 -8
  26. package/src/commons/forwardRef.js +1 -4
  27. package/src/commons/modifiers.d.ts +0 -6
  28. package/src/commons/modifiers.js +0 -18
  29. package/src/commons/withScrollEnabler.js +0 -4
  30. package/src/commons/withScrollReached.js +0 -4
  31. package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +0 -7
  32. package/src/components/KeyboardAwareScrollView/KeyboardAwareFlatList.js +0 -6
  33. package/src/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +0 -6
  34. package/src/components/WheelPicker/WheelPicker.driver.d.ts +2 -2
  35. package/src/components/WheelPicker/index.d.ts +2 -2
  36. package/src/components/WheelPicker/index.js +1 -1
  37. package/src/components/WheelPicker/usePresenter.d.ts +1 -1
  38. package/src/components/actionSheet/index.d.ts +1 -1
  39. package/src/components/animatedImage/index.d.ts +1 -1
  40. package/src/components/animatedScanner/index.js +0 -37
  41. package/src/components/avatar/index.d.ts +1 -1
  42. package/src/components/badge/index.d.ts +4 -4
  43. package/src/components/baseInput/index.d.ts +0 -1
  44. package/src/components/baseInput/index.js +1 -49
  45. package/src/components/button/index.d.ts +4 -4
  46. package/src/components/button/types.d.ts +2 -2
  47. package/src/components/carousel/index.d.ts +8 -8
  48. package/src/components/carousel/types.d.ts +4 -1
  49. package/src/components/carousel/types.js +0 -2
  50. package/src/components/checkbox/index.d.ts +1 -1
  51. package/src/components/chip/index.d.ts +1 -1
  52. package/src/components/colorPalette/index.d.ts +1 -1
  53. package/src/components/dateTimePicker/index.d.ts +2 -2
  54. package/src/components/dateTimePicker/index.js +2 -2
  55. package/src/components/dialog/types.d.ts +4 -4
  56. package/src/components/dialog/useDialogContent.d.ts +1 -1
  57. package/src/components/drawer/index.d.ts +1 -1
  58. package/src/components/expandableSection/index.d.ts +2 -2
  59. package/src/components/fadedScrollView/index.js +1 -1
  60. package/src/components/featureHighlight/index.js +5 -7
  61. package/src/components/gridListItem/index.d.ts +7 -7
  62. package/src/components/gridView/index.d.ts +1 -1
  63. package/src/components/hint/HintBubble.d.ts +1 -1
  64. package/src/components/hint/HintOld.d.ts +10 -10
  65. package/src/components/hint/hooks/useHintLayout.d.ts +1 -1
  66. package/src/components/hint/index.d.ts +2 -2
  67. package/src/components/hint/types.d.ts +2 -2
  68. package/src/components/icon/index.js +0 -3
  69. package/src/components/image/index.d.ts +1 -1
  70. package/src/components/image/index.js +20 -17
  71. package/src/components/loaderScreen/index.d.ts +1 -1
  72. package/src/components/loaderScreen/types.d.ts +1 -1
  73. package/src/components/maskedInput/index.d.ts +21 -4
  74. package/src/components/maskedInput/index.js +78 -16
  75. package/src/components/maskedInput/maskedInput.api.json +0 -1
  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 +0 -15
  80. package/src/components/picker/PickerDialog.js +0 -7
  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/index.d.ts +8 -0
  86. package/src/components/screenFooter/index.js +211 -0
  87. package/src/components/screenFooter/screenFooter.api.json +262 -0
  88. package/src/components/screenFooter/types.d.ts +100 -0
  89. package/src/components/screenFooter/types.js +39 -0
  90. package/src/components/scrollBar/index.d.ts +11 -4
  91. package/src/components/searchInput/index.js +1 -1
  92. package/src/components/searchInput/types.d.ts +2 -2
  93. package/src/components/sectionsWheelPicker/SectionsWheelPicker.driver.d.ts +2 -2
  94. package/src/components/skeletonView/index.d.ts +4 -4
  95. package/src/components/slider/Thumb.d.ts +1 -1
  96. package/src/components/slider/types.d.ts +1 -1
  97. package/src/components/stackAggregator/index.d.ts +1 -1
  98. package/src/components/tabController/TabBarItem.d.ts +2 -2
  99. package/src/components/tabController/TabBarItem.js +1 -1
  100. package/src/components/tabController/TabPage.d.ts +2 -2
  101. package/src/components/tabController/useScrollToItem.d.ts +1 -1
  102. package/src/components/text/Text.driver.d.ts +1 -1
  103. package/src/components/textArea/index.js +0 -6
  104. package/src/components/textField/types.d.ts +4 -4
  105. package/src/components/textField/useImperativeInputHandle.d.ts +1 -1
  106. package/src/components/textField/useImperativeInputHandle.js +1 -1
  107. package/src/components/textField/usePreset.d.ts +36 -36
  108. package/src/components/timeline/index.js +1 -1
  109. package/src/components/toast/index.js +0 -69
  110. package/src/components/view/index.js +9 -6
  111. package/src/components/wizard/index.d.ts +1 -1
  112. package/src/components/wizard/types.d.ts +1 -1
  113. package/src/components/wizard/wizard.api.json +1 -1
  114. package/src/hooks/index.d.ts +1 -0
  115. package/src/hooks/index.js +1 -0
  116. package/src/hooks/useCombinedRefs/index.js +1 -2
  117. package/src/hooks/useDebounce/index.js +1 -1
  118. package/src/hooks/useHiddenLocation/index.js +2 -2
  119. package/src/hooks/useHiddenLocation/index.web.js +2 -2
  120. package/src/hooks/useMeasure/index.d.ts +1 -1
  121. package/src/hooks/useMeasure/index.js +1 -1
  122. package/src/hooks/useScrollTo/index.d.ts +2 -2
  123. package/src/hooks/useScrollToHide/index.d.ts +24 -0
  124. package/src/hooks/useScrollToHide/index.js +48 -0
  125. package/src/incubator/calendar/index.js +1 -1
  126. package/src/incubator/calendar/types.d.ts +2 -2
  127. package/src/incubator/expandableOverlay/index.d.ts +2 -2
  128. package/src/incubator/expandableOverlay/index.js +7 -3
  129. package/src/incubator/slider/Track.d.ts +1 -1
  130. package/src/incubator/slider/index.d.ts +1 -1
  131. package/src/incubator/toast/helpers/useToastTimer.js +1 -1
  132. package/src/incubator/toast/index.js +1 -1
  133. package/src/incubator/toast/types.d.ts +2 -2
  134. package/src/index.d.ts +1 -0
  135. package/src/index.js +70 -0
  136. package/src/testkit/Component.driver.d.ts +1 -1
  137. package/src/testkit/drivers/TestingLibraryDriver.d.ts +1 -1
  138. package/src/typings/module.d.ts +12 -3
  139. package/ReactNativeUiLib.podspec +0 -22
  140. package/src/components/maskedInput/new.d.ts +0 -22
  141. package/src/components/maskedInput/new.js +0 -85
  142. package/src/components/maskedInput/old.js +0 -95
  143. package/src/components/textFieldOld/index.d.ts +0 -71
  144. package/src/components/textFieldOld/index.js +0 -807
  145. package/src/helpers/DocsGenerator.js +0 -61
  146. package/textFieldOld.d.ts +0 -2
  147. package/textFieldOld.js +0 -1
@@ -2,6 +2,7 @@ import { useModifiers, useThemeProps } from "../../hooks";
2
2
  import React, { useEffect, useMemo, useState } from 'react';
3
3
  import { View as RNView, SafeAreaView, Animated } from 'react-native';
4
4
  import { Constants } from "../../commons/new";
5
+ import { SafeAreaContextPackage } from "../../optionalDependencies";
5
6
 
6
7
  /**
7
8
  * Extra props when using reanimated (only non experimental props)
@@ -65,7 +66,12 @@ function View(props, ref) {
65
66
  }
66
67
  }, []);
67
68
  const ViewContainer = useMemo(() => {
68
- const container = useSafeArea && Constants.isIOS ? SafeAreaView : RNView;
69
+ let container = RNView;
70
+ if (useSafeArea && SafeAreaContextPackage?.SafeAreaView) {
71
+ container = SafeAreaContextPackage.SafeAreaView;
72
+ } else if (useSafeArea && Constants.isIOS) {
73
+ container = SafeAreaView;
74
+ }
69
75
  if (reanimated) {
70
76
  const {
71
77
  default: Reanimated
@@ -89,11 +95,8 @@ function View(props, ref) {
89
95
  if (!ready) {
90
96
  return null;
91
97
  }
92
- return (
93
- //@ts-expect-error
94
- <ViewContainer accessibilityElementsHidden={inaccessible} importantForAccessibility={inaccessible ? 'no-hide-descendants' : undefined} fsTagName={recorderTag} {...others} style={_style} ref={ref}>
98
+ return <ViewContainer accessibilityElementsHidden={inaccessible} importantForAccessibility={inaccessible ? 'no-hide-descendants' : undefined} fsTagName={recorderTag} {...others} style={_style} ref={ref}>
95
99
  {children}
96
- </ViewContainer>
97
- );
100
+ </ViewContainer>;
98
101
  }
99
102
  export default React.forwardRef(View);
@@ -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<any, HTMLElement>[] | null | undefined;
27
+ renderChildren(): React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLElement>, 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 (see Wizard.Step.propTypes)
76
+ * The configuration of the active step
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 (see Wizard.Step.propTypes)"
20
+ "description": "The configuration of the active step"
21
21
  },
22
22
  {
23
23
  "name": "onActiveIndexChanged",
@@ -6,6 +6,7 @@ export { default as useModifiers } from './useModifiers';
6
6
  export { default as useOrientation } from './useOrientation';
7
7
  export { default as useScrollEnabler } from './useScrollEnabler';
8
8
  export { default as useScrollReached } from './useScrollReached';
9
+ export { default as useScrollToHide } from './useScrollToHide';
9
10
  export { default as useScrollToItem } from './useScrollToItem';
10
11
  export { default as useScrollTo } from './useScrollTo';
11
12
  export { default as useThemeProps } from './useThemeProps';
@@ -6,6 +6,7 @@ export { default as useModifiers } from "./useModifiers";
6
6
  export { default as useOrientation } from "./useOrientation";
7
7
  export { default as useScrollEnabler } from "./useScrollEnabler";
8
8
  export { default as useScrollReached } from "./useScrollReached";
9
+ export { default as useScrollToHide } from "./useScrollToHide";
9
10
  export { default as useScrollToItem } from "./useScrollToItem";
10
11
  export { default as useScrollTo } from "./useScrollTo";
11
12
  export { default as useThemeProps } from "./useThemeProps";
@@ -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(undefined);
4
4
  React.useEffect(() => {
5
5
  refs.forEach(ref => {
6
6
  if (!ref) {
@@ -9,7 +9,6 @@ const useCombinedRefs = (...refs) => {
9
9
  if (typeof ref === 'function') {
10
10
  ref(targetRef.current);
11
11
  } else {
12
- // @ts-expect-error
13
12
  ref.current = targetRef.current;
14
13
  }
15
14
  });
@@ -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(undefined);
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(undefined);
24
+ const layoutData = useRef(undefined);
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(undefined);
20
+ const layoutData = useRef(undefined);
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").MutableRefObject<RNView | undefined>;
12
+ ref: import("react").RefObject<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(undefined);
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 | null>;
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 | null>;
19
19
  /**
20
20
  * scrollTo callback.
21
21
  * offset - the x or y to scroll to.
@@ -0,0 +1,24 @@
1
+ import { NativeSyntheticEvent, NativeScrollEvent } from 'react-native';
2
+ export type ScrollToHideProps = {
3
+ /**
4
+ * The threshold (in pixels) to ignore small scroll movements before updating visibility.
5
+ * Defaults to 0 (immediate reaction).
6
+ */
7
+ scrollingThreshold?: number;
8
+ };
9
+ export type ScrollToHideResult = {
10
+ /**
11
+ * onScroll callback (should be passed to your ScrollView/FlatList onScroll prop).
12
+ */
13
+ onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
14
+ /**
15
+ * Whether the footer should be visible based on scroll direction.
16
+ */
17
+ visible: boolean;
18
+ };
19
+ /**
20
+ * @description: A hook that tracks scroll direction to toggle visibility (e.g., for hiding a footer on scroll).
21
+ * @example: const {onScroll, visible} = useScrollToHide();
22
+ */
23
+ declare const useScrollToHide: (props?: ScrollToHideProps) => ScrollToHideResult;
24
+ export default useScrollToHide;
@@ -0,0 +1,48 @@
1
+ import { useState, useCallback, useRef } from 'react';
2
+ /**
3
+ * @description: A hook that tracks scroll direction to toggle visibility (e.g., for hiding a footer on scroll).
4
+ * @example: const {onScroll, visible} = useScrollToHide();
5
+ */
6
+ const useScrollToHide = (props = {}) => {
7
+ const {
8
+ scrollingThreshold = 0
9
+ } = props;
10
+ const [visible, setVisible] = useState(true);
11
+ const prevContentOffset = useRef(0);
12
+ const onScroll = useCallback(event => {
13
+ const {
14
+ nativeEvent: {
15
+ contentOffset: {
16
+ y: currentOffset
17
+ },
18
+ contentSize: {
19
+ height: contentHeight
20
+ },
21
+ layoutMeasurement: {
22
+ height: layoutHeight
23
+ }
24
+ }
25
+ } = event;
26
+
27
+ // Ignore bounces (iOS)
28
+ if (currentOffset < 0 || currentOffset > contentHeight - layoutHeight) {
29
+ return;
30
+ }
31
+ const diff = currentOffset - prevContentOffset.current;
32
+ if (Math.abs(diff) > scrollingThreshold) {
33
+ if (diff > 0 && visible) {
34
+ // Scrolling Down -> Hide
35
+ setVisible(false);
36
+ } else if (diff < 0 && !visible) {
37
+ // Scrolling Up -> Show
38
+ setVisible(true);
39
+ }
40
+ prevContentOffset.current = currentOffset;
41
+ }
42
+ }, [visible, scrollingThreshold]);
43
+ return {
44
+ onScroll,
45
+ visible
46
+ };
47
+ };
48
+ export default useScrollToHide;
@@ -42,7 +42,7 @@ function Calendar(props) {
42
42
  }
43
43
  return -1;
44
44
  }, [monthItems]);
45
- const flashListRef = useRef();
45
+ const flashListRef = useRef(undefined);
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 | null;
115
- renderHeader?: (header: DateSectionHeader) => React.ReactElement | null;
114
+ renderEvent?: (event: Event) => React.ReactElement<any> | null;
115
+ renderHeader?: (header: DateSectionHeader) => React.ReactElement<any> | 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<any>;
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 | undefined | null;
41
+ renderCustomOverlay?: (props: RenderCustomOverlayProps) => React.ReactElement<any> | undefined | null;
42
42
  /**
43
43
  * Disabled opening expandable overlay
44
44
  */
@@ -33,11 +33,15 @@ const ExpandableOverlay = (props, ref) => {
33
33
  setExpandableVisible(true);
34
34
  onPress?.(props);
35
35
  }, [onPress, customValue]);
36
- const closeExpandable = useCallback(() => {
36
+ const dismissOverlay = useCallback(() => {
37
37
  setExpandableVisible(false);
38
38
  focusAccessibility();
39
+ }, [focusAccessibility]);
40
+ const closeExpandable = useCallback(() => {
41
+ dismissOverlay();
39
42
  useDialog ? dialogProps?.onDismiss?.() : modalProps?.onDismiss?.();
40
- }, [useDialog, dialogProps?.onDismiss, modalProps?.onDismiss, focusAccessibility]);
43
+ // eslint-disable-next-line react-hooks/exhaustive-deps
44
+ }, [dismissOverlay, dialogProps?.onDismiss, modalProps?.onDismiss]);
41
45
  const toggleExpandable = useCallback(() => visible ? closeExpandable() : openExpandable(), [visible, openExpandable, closeExpandable]);
42
46
  useImperativeHandle(ref, () => ({
43
47
  openExpandable,
@@ -45,7 +49,7 @@ const ExpandableOverlay = (props, ref) => {
45
49
  toggleExpandable
46
50
  }));
47
51
  const renderModal = () => {
48
- return <Modal testID={`${testID}.overlay`} overlayBackgroundColor={Colors.$backgroundDefault} {...modalProps} visible={visible} onDismiss={closeExpandable} onRequestClose={closeExpandable} onBackgroundPress={closeExpandable}>
52
+ return <Modal testID={`${testID}.overlay`} overlayBackgroundColor={Colors.$backgroundDefault} {...modalProps} visible={visible} onDismiss={dismissOverlay} onRequestClose={closeExpandable} onBackgroundPress={closeExpandable}>
49
53
  {showTopBar && <Modal.TopBar onDone={closeExpandable} {...topBarProps} />}
50
54
  {expandableContent}
51
55
  </Modal>;
@@ -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 | ReactElement[];
9
+ renderTrack?: () => ReactElement<any> | ReactElement<any>[];
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 | ReactElement[];
65
+ renderTrack?: () => ReactElement<any> | ReactElement<any>[];
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();
6
+ const timer = useRef(undefined);
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();
46
+ const viewRef = useRef(undefined);
47
47
  const [toastHeight, setToastHeight] = useState();
48
48
  const {
49
49
  clearTimer,
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode, type JSX } 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<any>;
56
56
  /**
57
57
  * callback for dismiss action
58
58
  */
package/src/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export { default as ExpandableSection, ExpandableSectionProps } from './componen
38
38
  export { default as Fader, FaderProps, FaderPosition } from './components/fader';
39
39
  export { default as FeatureHighlight, FeatureHighlightProps } from './components/featureHighlight';
40
40
  export { default as FloatingButton, FloatingButtonProps, FloatingButtonLayouts } from './components/floatingButton';
41
+ export { default as ScreenFooter, ScreenFooterProps, ScreenFooterLayouts, ScreenFooterBackgrounds, FooterAlignment, HorizontalItemsDistribution, ItemsFit, KeyboardBehavior, ScreenFooterShadow } from './components/screenFooter';
41
42
  export { default as Gradient, GradientProps, GradientTypes } from './components/gradient';
42
43
  export { default as Slider } from './components/slider';
43
44
  export { default as GradientSlider } from './components/slider/GradientSlider';
package/src/index.js CHANGED
@@ -99,6 +99,15 @@ var _exportNames = {
99
99
  FloatingButton: true,
100
100
  FloatingButtonProps: true,
101
101
  FloatingButtonLayouts: true,
102
+ ScreenFooter: true,
103
+ ScreenFooterProps: true,
104
+ ScreenFooterLayouts: true,
105
+ ScreenFooterBackgrounds: true,
106
+ FooterAlignment: true,
107
+ HorizontalItemsDistribution: true,
108
+ ItemsFit: true,
109
+ KeyboardBehavior: true,
110
+ ScreenFooterShadow: true,
102
111
  Gradient: true,
103
112
  GradientProps: true,
104
113
  GradientTypes: true,
@@ -699,6 +708,12 @@ Object.defineProperty(exports, "FloatingButtonProps", {
699
708
  return _floatingButton().FloatingButtonProps;
700
709
  }
701
710
  });
711
+ Object.defineProperty(exports, "FooterAlignment", {
712
+ enumerable: true,
713
+ get: function () {
714
+ return _screenFooter().FooterAlignment;
715
+ }
716
+ });
702
717
  Object.defineProperty(exports, "ForwardRefInjectedProps", {
703
718
  enumerable: true,
704
719
  get: function () {
@@ -790,6 +805,12 @@ Object.defineProperty(exports, "HintProps", {
790
805
  }
791
806
  });
792
807
  exports.Hooks = void 0;
808
+ Object.defineProperty(exports, "HorizontalItemsDistribution", {
809
+ enumerable: true,
810
+ get: function () {
811
+ return _screenFooter().HorizontalItemsDistribution;
812
+ }
813
+ });
793
814
  Object.defineProperty(exports, "Icon", {
794
815
  enumerable: true,
795
816
  get: function () {
@@ -815,6 +836,12 @@ Object.defineProperty(exports, "ImageProps", {
815
836
  }
816
837
  });
817
838
  exports.Incubator = void 0;
839
+ Object.defineProperty(exports, "ItemsFit", {
840
+ enumerable: true,
841
+ get: function () {
842
+ return _screenFooter().ItemsFit;
843
+ }
844
+ });
818
845
  Object.defineProperty(exports, "KeyboardAwareFlatList", {
819
846
  enumerable: true,
820
847
  get: function () {
@@ -827,6 +854,12 @@ Object.defineProperty(exports, "KeyboardAwareScrollView", {
827
854
  return _KeyboardAwareScrollView().default;
828
855
  }
829
856
  });
857
+ Object.defineProperty(exports, "KeyboardBehavior", {
858
+ enumerable: true,
859
+ get: function () {
860
+ return _screenFooter().KeyboardBehavior;
861
+ }
862
+ });
830
863
  Object.defineProperty(exports, "ListItem", {
831
864
  enumerable: true,
832
865
  get: function () {
@@ -1146,6 +1179,36 @@ Object.defineProperty(exports, "RenderCustomModalProps", {
1146
1179
  return _picker().RenderCustomModalProps;
1147
1180
  }
1148
1181
  });
1182
+ Object.defineProperty(exports, "ScreenFooter", {
1183
+ enumerable: true,
1184
+ get: function () {
1185
+ return _screenFooter().default;
1186
+ }
1187
+ });
1188
+ Object.defineProperty(exports, "ScreenFooterBackgrounds", {
1189
+ enumerable: true,
1190
+ get: function () {
1191
+ return _screenFooter().ScreenFooterBackgrounds;
1192
+ }
1193
+ });
1194
+ Object.defineProperty(exports, "ScreenFooterLayouts", {
1195
+ enumerable: true,
1196
+ get: function () {
1197
+ return _screenFooter().ScreenFooterLayouts;
1198
+ }
1199
+ });
1200
+ Object.defineProperty(exports, "ScreenFooterProps", {
1201
+ enumerable: true,
1202
+ get: function () {
1203
+ return _screenFooter().ScreenFooterProps;
1204
+ }
1205
+ });
1206
+ Object.defineProperty(exports, "ScreenFooterShadow", {
1207
+ enumerable: true,
1208
+ get: function () {
1209
+ return _screenFooter().ScreenFooterShadow;
1210
+ }
1211
+ });
1149
1212
  Object.defineProperty(exports, "ScrollBar", {
1150
1213
  enumerable: true,
1151
1214
  get: function () {
@@ -1906,6 +1969,13 @@ function _floatingButton() {
1906
1969
  };
1907
1970
  return data;
1908
1971
  }
1972
+ function _screenFooter() {
1973
+ const data = _interopRequireWildcard(require("./components/screenFooter"));
1974
+ _screenFooter = function () {
1975
+ return data;
1976
+ };
1977
+ return data;
1978
+ }
1909
1979
  function _gradient() {
1910
1980
  const data = _interopRequireWildcard(require("./components/gradient"));
1911
1981
  _gradient = function () {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import type { JSX } from 'react';
2
2
  import { DragData, UniDriver, UniDriverClass } from './UniDriver';
3
3
  export type ComponentDriverArgs = {
4
4
  testID: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import type { JSX } from 'react';
2
2
  import { DragData, UniDriver } from '../UniDriver';
3
3
  import { ReactTestInstance } from 'react-test-renderer';
4
4
  export declare class TestingLibraryDriver<Props> implements UniDriver<Props> {
@@ -3,11 +3,20 @@ 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
+
6
11
  // This support importing png files, typing wise
7
12
  declare module '*.png';
8
13
 
9
- declare namespace JSX {
10
- interface IntrinsicAttributes {
11
- fsTagName?: string;
14
+ import 'react';
15
+
16
+ declare module 'react' {
17
+ namespace JSX {
18
+ interface IntrinsicAttributes {
19
+ fsTagName?: string;
20
+ }
12
21
  }
13
22
  }
@@ -1,22 +0,0 @@
1
- require 'json'
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, 'lib/package.json')))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = "ReactNativeUiLib"
7
- s.version = package['version']
8
- s.summary = "React Native UI Library"
9
-
10
- s.authors = "Wix.com"
11
- s.homepage = package['homepage']
12
- s.license = package['license']
13
- s.platforms = { :ios => "9.0", :tvos => "9.2" }
14
-
15
- s.module_name = 'ReactNativeUiLib'
16
-
17
- s.source = { :git => "https://github.com/wix/react-native-ui-lib.git", :tag => "#{s.version}" }
18
- s.source_files = "lib/ios/**/*.{h,m}"
19
-
20
- s.dependency 'React'
21
- s.frameworks = 'UIKit'
22
- end
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { TextInputProps, StyleProp, ViewStyle } from 'react-native';
3
- export interface MaskedInputProps extends Omit<TextInputProps, 'value'> {
4
- /**
5
- * Initial value to pass to masked input
6
- */
7
- initialValue?: string;
8
- /**
9
- * callback for rendering the custom input out of the value returns from the actual input
10
- */
11
- renderMaskedText?: (value?: string) => JSX.Element | undefined;
12
- /**
13
- * Custom formatter for the input value
14
- */
15
- formatter?: (value?: string) => string | undefined;
16
- /**
17
- * container style for the masked input container
18
- */
19
- containerStyle?: StyleProp<ViewStyle>;
20
- }
21
- declare const _default: React.ForwardRefExoticComponent<MaskedInputProps & React.RefAttributes<any>>;
22
- export default _default;