@hero-design/rn 8.117.0 → 8.118.0

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 (33) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/es/index.js +7393 -147
  3. package/jest.config.js +1 -1
  4. package/lib/index.js +7393 -147
  5. package/package.json +22 -22
  6. package/src/components/AppCue/index.tsx +1 -4
  7. package/src/components/Button/Button.tsx +2 -2
  8. package/src/components/Button/UtilityButton/index.tsx +2 -2
  9. package/src/components/Chip/index.tsx +0 -4
  10. package/src/components/FloatingIsland/index.tsx +2 -2
  11. package/src/components/Search/SearchOneLine.tsx +1 -1
  12. package/src/components/Select/BaseOptionList.tsx +2 -2
  13. package/src/components/Select/SingleSelect/OptionList.tsx +1 -1
  14. package/src/components/StatusScreens/Error/index.tsx +2 -3
  15. package/src/components/Tabs/ScrollableTabs.tsx +2 -1
  16. package/src/components/Tabs/index.tsx +2 -2
  17. package/src/components/TextInput/index.tsx +9 -7
  18. package/src/components/Toolbar/ToolbarMessage.tsx +1 -1
  19. package/src/utils/hooks.ts +1 -1
  20. package/testUtils/setup.tsx +6 -0
  21. package/types/components/AppCue/index.d.ts +1 -4
  22. package/types/components/Button/Button.d.ts +2 -2
  23. package/types/components/Button/UtilityButton/index.d.ts +2 -2
  24. package/types/components/Chip/index.d.ts +1 -1
  25. package/types/components/FloatingIsland/index.d.ts +2 -2
  26. package/types/components/Select/BaseOptionList.d.ts +1 -1
  27. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  28. package/types/components/StatusScreens/Error/index.d.ts +1 -1
  29. package/types/components/Swipeable/index.d.ts +1 -1
  30. package/types/components/Tabs/ScrollableTabs.d.ts +2 -1
  31. package/types/components/Tabs/index.d.ts +2 -2
  32. package/types/components/Tabs/useHandlePageScroll.d.ts +1 -1
  33. package/types/components/TextInput/index.d.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.117.0",
3
+ "version": "8.118.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -28,16 +28,16 @@
28
28
  "nanoid": "^5.0.9"
29
29
  },
30
30
  "peerDependencies": {
31
- "@hero-design/react-native-month-year-picker": "^8.44.0",
31
+ "@hero-design/react-native-month-year-picker": "^8.45.0",
32
32
  "@ptomasroos/react-native-multi-slider": "^2.2.2",
33
- "@react-native-community/datetimepicker": "^8.4.4",
34
- "@react-native-community/slider": "^5.0.1",
35
- "react": "19.1.0",
36
- "react-native": "0.81.5",
37
- "react-native-gesture-handler": "~2.28.0",
33
+ "@react-native-community/datetimepicker": "^3.5.2 || ^7.6.1",
34
+ "@react-native-community/slider": "^4.5.1",
35
+ "react": "18.3.1",
36
+ "react-native": "0.77.3 || 0.76.9",
37
+ "react-native-gesture-handler": "~2.20.2",
38
38
  "react-native-linear-gradient": "^2.8.3",
39
39
  "react-native-pager-view": "^6.7.0",
40
- "react-native-safe-area-context": "~5.6.0",
40
+ "react-native-safe-area-context": "^4.7.0",
41
41
  "react-native-svg": "^15.11.2",
42
42
  "react-native-vector-icons": "^9.1.0",
43
43
  "react-native-webview": "^13.10.2"
@@ -56,11 +56,11 @@
56
56
  "@eslint/eslintrc": "^3.1.0",
57
57
  "@eslint/js": "^9.8.0",
58
58
  "@hero-design/eslint-plugin": "9.2.1",
59
- "@hero-design/react-native-month-year-picker": "^8.44.0",
59
+ "@hero-design/react-native-month-year-picker": "^8.45.0",
60
60
  "@ptomasroos/react-native-multi-slider": "^2.2.2",
61
- "@react-native-community/datetimepicker": "8.4.4",
62
- "@react-native-community/slider": "^5.0.1",
63
- "@react-native/babel-preset": "0.81.5",
61
+ "@react-native-community/datetimepicker": "8.2.0",
62
+ "@react-native-community/slider": "^4.5.1",
63
+ "@react-native/babel-preset": "0.77.3",
64
64
  "@rollup/plugin-babel": "^6.0.4",
65
65
  "@rollup/plugin-commonjs": "^28.0.1",
66
66
  "@rollup/plugin-json": "^6.1.0",
@@ -73,7 +73,7 @@
73
73
  "@types/d3": "^7.4.3",
74
74
  "@types/events": "^3.0.3",
75
75
  "@types/jest": "^29.5.3",
76
- "@types/react": "^19.0.0",
76
+ "@types/react": "^18.2.0",
77
77
  "@types/react-native-vector-icons": "^6.4.10",
78
78
  "@typescript-eslint/eslint-plugin": "^5.12.1",
79
79
  "babel-plugin-inline-import": "^3.0.0",
@@ -84,17 +84,17 @@
84
84
  "jest-environment-jsdom": "^29.2.1",
85
85
  "jest-junit": "^16.0.0",
86
86
  "prettier-config-hd": "8.42.4",
87
- "react": "19.1.0",
88
- "react-dom": "19.1.0",
89
- "react-native": "0.81.5",
90
- "react-native-gesture-handler": "~2.28.0",
87
+ "react": "18.3.1",
88
+ "react-dom": "^18.2.0",
89
+ "react-native": "0.77.3",
90
+ "react-native-gesture-handler": "~2.20.2",
91
91
  "react-native-linear-gradient": "2.8.3",
92
- "react-native-pager-view": "6.9.1",
93
- "react-native-safe-area-context": "~5.6.0",
94
- "react-native-svg": "15.12.1",
92
+ "react-native-pager-view": "6.5.1",
93
+ "react-native-safe-area-context": "4.12.0",
94
+ "react-native-svg": "15.8.0",
95
95
  "react-native-vector-icons": "^9.1.0",
96
- "react-native-webview": "13.15.0",
97
- "react-test-renderer": "19.1.0",
96
+ "react-native-webview": "13.10.3",
97
+ "react-test-renderer": "18.3.1",
98
98
  "rollup": "^4.24.3",
99
99
  "rollup-plugin-copy": "^3.5.0",
100
100
  "rollup-plugin-flow": "^1.1.1",
@@ -26,10 +26,7 @@ interface AppCueProps {
26
26
  /*
27
27
  * The target where the App Cue is relatively placed to.
28
28
  */
29
- target: React.ReactElement<{
30
- onPress?: () => void;
31
- children?: React.ReactNode;
32
- }>;
29
+ target: React.ReactElement;
33
30
 
34
31
  /**
35
32
  * The Position of the App Cue.
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from 'react';
1
+ import type { ReactChild, ReactElement, ReactNode } from 'react';
2
2
  import React, { useCallback, useMemo, useState } from 'react';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
4
  import type { Theme } from '../../theme';
@@ -69,7 +69,7 @@ export interface ButtonProps {
69
69
  /**
70
70
  * Button label.
71
71
  */
72
- text?: ReactNode;
72
+ text?: ReactChild;
73
73
  /**
74
74
  * Button type.
75
75
  */
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
1
  import React from 'react';
2
+ import type { ReactChild } from 'react';
3
3
  import type { ViewProps } from 'react-native';
4
4
  import Icon from '../../Icon';
5
5
  import {
@@ -21,7 +21,7 @@ interface UtilityButtonProps extends ViewProps {
21
21
  /**
22
22
  * Button label.
23
23
  */
24
- text: ReactNode;
24
+ text: ReactChild;
25
25
  /**
26
26
  * Visual intent color to apply to button.
27
27
  */
@@ -77,8 +77,6 @@ const Chip = ({
77
77
  onPress,
78
78
  showSelectedIcon = true,
79
79
  accessible,
80
- onBlur,
81
- onFocus,
82
80
  ...otherProps
83
81
  }: ChipProps) => {
84
82
  useDeprecation(
@@ -100,8 +98,6 @@ const Chip = ({
100
98
  themeVariant={renamedVariant}
101
99
  themeSelected={selected}
102
100
  accessible={accessible}
103
- onBlur={onBlur || undefined}
104
- onFocus={onFocus || undefined}
105
101
  {...otherProps}
106
102
  >
107
103
  {icon && (
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import React from 'react';
3
- import type { LayoutChangeEvent, TouchableOpacityProps } from 'react-native';
3
+ import type { LayoutChangeEvent, ViewProps } from 'react-native';
4
4
  import {
5
5
  StyledWrapper,
6
6
  StyledPrefixWrapper,
@@ -9,7 +9,7 @@ import {
9
9
  } from './StyledFloatingIsland';
10
10
  import type { IconName } from '../Icon';
11
11
 
12
- interface FloatingIslandProps extends TouchableOpacityProps {
12
+ interface FloatingIslandProps extends ViewProps {
13
13
  /**
14
14
  * Callback that is called when the floating island is pressed.
15
15
  */
@@ -149,7 +149,7 @@ const SearchOneLine = forwardRef<SearchOneLineHandles, SearchOneLineProps>(
149
149
  isEmptyValue,
150
150
  });
151
151
 
152
- const innerTextInput = React.useRef<RNTextInput | undefined | null>(null);
152
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>();
153
153
 
154
154
  React.useImperativeHandle(
155
155
  ref,
@@ -11,7 +11,7 @@ export type BaseOptionListProps<V, T extends SelectOptionType<V>> = Pick<
11
11
  SelectProps<V, T>,
12
12
  'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange'
13
13
  > & {
14
- sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
14
+ sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
15
15
  } & SectionListProps<T, SectionType>;
16
16
 
17
17
  const BaseOptionList = <V, T extends SelectOptionType<V>>({
@@ -51,7 +51,7 @@ const BaseOptionList = <V, T extends SelectOptionType<V>>({
51
51
  height: theme.space.xxxxlarge,
52
52
  }}
53
53
  >
54
- <Spinner testID="select-loading-spinner" />
54
+ <Spinner />
55
55
  </View>
56
56
  ) : null
57
57
  }
@@ -18,7 +18,7 @@ type OptionListProps<V, T extends SelectOptionType<V>> = Pick<
18
18
  | 'renderOption'
19
19
  > & {
20
20
  onPress: (value: V | null) => void;
21
- sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
21
+ sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
22
22
  } & BaseOptionListProps<V, T>;
23
23
 
24
24
  const OptionList = <V, T extends SelectOptionType<V>>({
@@ -189,7 +189,7 @@ const ErrorPage = ({
189
189
  * @return {*} {ReactElement}
190
190
  */
191
191
  const ErrorComponent = ({
192
- visible: _visible,
192
+ visible = true,
193
193
  variant = 'in-page',
194
194
  title,
195
195
  description,
@@ -203,9 +203,8 @@ const ErrorComponent = ({
203
203
  }: ErrorProps): ReactElement => {
204
204
  useDeprecation(
205
205
  `Visible prop is deprecated. Use conditional rendering instead`,
206
- _visible !== undefined
206
+ visible
207
207
  );
208
- const visible = _visible === undefined ? true : _visible;
209
208
 
210
209
  const [isVisible, setIsVisible] = useState(visible);
211
210
  const [ctaPressed, setCtaPressed] = useState<onCloseCallbackType>(null);
@@ -1,3 +1,4 @@
1
+ import type { FunctionComponent } from 'react';
1
2
  import React, { useEffect, useMemo, useRef } from 'react';
2
3
  import PagerView from 'react-native-pager-view';
3
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -11,7 +12,7 @@ import { ScreenContext, TabContext } from './useIsFocused';
11
12
 
12
13
  export interface ScrollableTabProps extends Omit<TabsProps, 'header'> {
13
14
  variant?: 'underlined' | 'highlighted';
14
- header?: (props: ScrollableTabHeaderProps) => React.ReactElement | null;
15
+ header?: FunctionComponent<ScrollableTabHeaderProps>;
15
16
  }
16
17
 
17
18
  const ScrollableTab = ({
@@ -1,5 +1,5 @@
1
1
  import { useTheme } from '@emotion/react';
2
- import type { ReactElement, ReactNode } from 'react';
2
+ import type { FunctionComponent, ReactElement, ReactNode } from 'react';
3
3
  import React, { useEffect, useMemo, useRef, useState } from 'react';
4
4
  import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
5
5
  import { Animated, TouchableWithoutFeedback, View } from 'react-native';
@@ -92,7 +92,7 @@ export interface TabsProps extends ViewProps {
92
92
  /**
93
93
  * Custom header component.
94
94
  */
95
- header?: (props: TabsHeaderProps) => ReactElement;
95
+ header?: FunctionComponent<TabsHeaderProps>;
96
96
  }
97
97
 
98
98
  const AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
@@ -12,9 +12,9 @@ import type {
12
12
  ViewStyle,
13
13
  TextStyle,
14
14
  LayoutChangeEvent,
15
+ NativeSyntheticEvent,
16
+ TextInputFocusEventData,
15
17
  TextInput as RNTextInput,
16
- BlurEvent,
17
- FocusEvent,
18
18
  } from 'react-native';
19
19
  import {
20
20
  StyledTextInputContainer,
@@ -48,8 +48,12 @@ export type TextInputHandles = Pick<
48
48
  type TextInputVariant = 'text' | 'textarea';
49
49
 
50
50
  type NativeTextInputProps = Omit<RNTextInputProps, 'onFocus' | 'onBlur'> & {
51
- onFocus?: (event?: FocusEvent) => void | undefined;
52
- onBlur?: (event?: BlurEvent) => void | undefined;
51
+ onFocus?: (
52
+ event?: NativeSyntheticEvent<TextInputFocusEventData>
53
+ ) => void | undefined;
54
+ onBlur?: (
55
+ event?: NativeSyntheticEvent<TextInputFocusEventData>
56
+ ) => void | undefined;
53
57
  };
54
58
 
55
59
  interface TextInputRef {
@@ -234,8 +238,6 @@ export const renderInput = ({
234
238
  numberOfLines={numberOfLines}
235
239
  ref={ref}
236
240
  placeholderTextColor={theme.__hd__.textInput.colors.placeholder[state]}
237
- onBlur={nativeInputProps?.onBlur}
238
- onFocus={nativeInputProps?.onFocus}
239
241
  />
240
242
  );
241
243
  };
@@ -371,7 +373,7 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
371
373
  setInputSize((prev) => ({ ...prev, height, width }));
372
374
  }, []);
373
375
 
374
- const innerTextInput = React.useRef<RNTextInput | undefined | null>(null);
376
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>();
375
377
  React.useImperativeHandle(
376
378
  ref,
377
379
  () => ({
@@ -108,7 +108,7 @@ const ToolbarMessage = forwardRef<ToolbarMessageHandles, ToolbarMessageProps>(
108
108
  } = props;
109
109
  const theme = useTheme();
110
110
 
111
- const innerTextInput = React.useRef<RNTextInput | undefined | null>(null);
111
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>();
112
112
 
113
113
  const displayText = (value !== undefined ? value : defaultValue) ?? '';
114
114
  const isEmptyValue = displayText.length === 0;
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
2
2
 
3
3
  // Get previous state value
4
4
  export const usePrevious = <T>(value: T) => {
5
- const ref = React.useRef<T>(undefined);
5
+ const ref = React.useRef<T>();
6
6
  React.useEffect(() => {
7
7
  ref.current = value;
8
8
  }, [value]);
@@ -153,4 +153,10 @@ jest.mock('@hero-design/react-native-month-year-picker', () => {
153
153
  };
154
154
  });
155
155
 
156
+ jest.mock('react-native/Libraries/Utilities/BackHandler', () => {
157
+ return jest.requireActual(
158
+ 'react-native/Libraries/Utilities/__mocks__/BackHandler.js'
159
+ );
160
+ });
161
+
156
162
  export {};
@@ -3,10 +3,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { Placement } from './StyledAppCue';
4
4
  interface AppCueProps {
5
5
  content: string | React.ReactElement;
6
- target: React.ReactElement<{
7
- onPress?: () => void;
8
- children?: React.ReactNode;
9
- }>;
6
+ target: React.ReactElement;
10
7
  /**
11
8
  * The Position of the App Cue.
12
9
  */
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from 'react';
1
+ import type { ReactChild, ReactElement, ReactNode } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { IconName } from '../Icon';
4
4
  import type { Intent, ThemeVariant } from './StyledButton';
@@ -53,7 +53,7 @@ export interface ButtonProps {
53
53
  /**
54
54
  * Button label.
55
55
  */
56
- text?: ReactNode;
56
+ text?: ReactChild;
57
57
  /**
58
58
  * Button type.
59
59
  */
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
1
  import React from 'react';
2
+ import type { ReactChild } from 'react';
3
3
  import type { ViewProps } from 'react-native';
4
4
  import type { IconName } from '../../Icon';
5
5
  interface UtilityButtonProps extends ViewProps {
@@ -14,7 +14,7 @@ interface UtilityButtonProps extends ViewProps {
14
14
  /**
15
15
  * Button label.
16
16
  */
17
- text: ReactNode;
17
+ text: ReactChild;
18
18
  /**
19
19
  * Visual intent color to apply to button.
20
20
  */
@@ -39,5 +39,5 @@ interface ChipProps extends ViewProps {
39
39
  */
40
40
  accessible?: boolean;
41
41
  }
42
- declare const Chip: ({ label, variant, selected, icon, onPress, showSelectedIcon, accessible, onBlur, onFocus, ...otherProps }: ChipProps) => React.JSX.Element;
42
+ declare const Chip: ({ label, variant, selected, icon, onPress, showSelectedIcon, accessible, ...otherProps }: ChipProps) => React.JSX.Element;
43
43
  export default Chip;
@@ -1,8 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import React from 'react';
3
- import type { TouchableOpacityProps } from 'react-native';
3
+ import type { ViewProps } from 'react-native';
4
4
  import type { IconName } from '../Icon';
5
- interface FloatingIslandProps extends TouchableOpacityProps {
5
+ interface FloatingIslandProps extends ViewProps {
6
6
  /**
7
7
  * Callback that is called when the floating island is pressed.
8
8
  */
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { SectionList, SectionListProps } from 'react-native';
3
3
  import type { SelectOptionType, SelectProps, SectionType } from './types';
4
4
  export type BaseOptionListProps<V, T extends SelectOptionType<V>> = Pick<SelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange'> & {
5
- sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
5
+ sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
6
6
  } & SectionListProps<T, SectionType>;
7
7
  declare const BaseOptionList: <V, T extends SelectOptionType<V>>({ keyExtractor, loading, onEndReached, onQueryChange, sections, renderItem, sectionListRef, ...rest }: BaseOptionListProps<V, T>) => React.JSX.Element;
8
8
  export default BaseOptionList;
@@ -5,7 +5,7 @@ import type { BaseOptionListProps } from '../BaseOptionList';
5
5
  import type { SelectOptionType, SectionType } from '../types';
6
6
  type OptionListProps<V, T extends SelectOptionType<V>> = Pick<SingleSelectProps<V, T>, 'keyExtractor' | 'loading' | 'onEndReached' | 'onQueryChange' | 'value' | 'renderOption'> & {
7
7
  onPress: (value: V | null) => void;
8
- sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
8
+ sectionListRef?: React.RefObject<SectionList<T, SectionType>>;
9
9
  } & BaseOptionListProps<V, T>;
10
10
  declare const OptionList: <V, T extends SelectOptionType<V>>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, sections, renderOption, value, sectionListRef, ...rest }: OptionListProps<V, T>) => React.JSX.Element;
11
11
  export default OptionList;
@@ -58,5 +58,5 @@ interface ErrorProps extends ViewProps {
58
58
  * @param {ErrorProps}
59
59
  * @return {*} {ReactElement}
60
60
  */
61
- declare const ErrorComponent: ({ visible: _visible, variant, title, description, image, testID, ctaText, onCtaPress, secondaryCtaText, onSecondaryCtaPress, ...nativeProps }: ErrorProps) => ReactElement;
61
+ declare const ErrorComponent: ({ visible, variant, title, description, image, testID, ctaText, onCtaPress, secondaryCtaText, onSecondaryCtaPress, ...nativeProps }: ErrorProps) => ReactElement;
62
62
  export default ErrorComponent;
@@ -45,6 +45,6 @@ export interface SwipeableProps extends Pick<RnghSwipeableProps, 'enableTrackpad
45
45
  }
46
46
  declare const _default: (({ children, state, onStateChange, leftActions, leftActionsWidth, rightActions, rightActionsWidth, variant, ...swipeableProps }: SwipeableProps) => React.JSX.Element) & {
47
47
  Action: ({ intent, onPress, style, children, testID, }: import("./SwipeableAction").SwipeableActionProps) => React.JSX.Element;
48
- Content: React.ForwardRefExoticComponent<Omit<import("react-native-gesture-handler").RectButtonProps, "innerRef"> & React.RefAttributes<React.ComponentType<{}>>>;
48
+ Content: React.ForwardRefExoticComponent<Omit<import("react-native-gesture-handler").RectButtonProps, "innerRef"> & React.RefAttributes<any>>;
49
49
  };
50
50
  export default _default;
@@ -1,9 +1,10 @@
1
+ import type { FunctionComponent } from 'react';
1
2
  import React from 'react';
2
3
  import type { TabsProps } from '.';
3
4
  import type { ScrollableTabHeaderProps } from './ScrollableTabsHeader/ScrollableTabsHeader';
4
5
  export interface ScrollableTabProps extends Omit<TabsProps, 'header'> {
5
6
  variant?: 'underlined' | 'highlighted';
6
- header?: (props: ScrollableTabHeaderProps) => React.ReactElement | null;
7
+ header?: FunctionComponent<ScrollableTabHeaderProps>;
7
8
  }
8
9
  declare const ScrollableTab: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, swipeEnabled, testID: componentTestID, variant, header, }: ScrollableTabProps) => React.JSX.Element;
9
10
  export default ScrollableTab;
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from 'react';
1
+ import type { FunctionComponent, ReactElement, ReactNode } from 'react';
2
2
  import React from 'react';
3
3
  import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
4
4
  import { Animated } from 'react-native';
@@ -75,7 +75,7 @@ export interface TabsProps extends ViewProps {
75
75
  /**
76
76
  * Custom header component.
77
77
  */
78
- header?: (props: TabsHeaderProps) => ReactElement;
78
+ header?: FunctionComponent<TabsHeaderProps>;
79
79
  }
80
80
  declare const _default: (({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, swipeEnabled, testID: componentTestID, header, }: TabsProps) => ReactElement) & {
81
81
  Header: ({ tabs, selectedTabKey, onTabPress, barStyle, insets, componentTestID, tabsWidth, setTabsWidth, positionAnimatedValue, scrollOffsetAnimatedValue, }: TabsHeaderProps) => React.JSX.Element;
@@ -3,6 +3,6 @@ declare const useHandlePageScroll: () => {
3
3
  onPageScrollStateChanged: (e: NativeSyntheticEvent<Readonly<{
4
4
  pageScrollState: "idle" | "dragging" | "settling";
5
5
  }>>) => void;
6
- hasScrolled: import("react").RefObject<boolean>;
6
+ hasScrolled: import("react").MutableRefObject<boolean>;
7
7
  };
8
8
  export default useHandlePageScroll;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import type { TextInputProps as RNTextInputProps, StyleProp, ViewStyle, TextStyle, TextInput as RNTextInput, BlurEvent, FocusEvent } from 'react-native';
2
+ import type { TextInputProps as RNTextInputProps, StyleProp, ViewStyle, TextStyle, NativeSyntheticEvent, TextInputFocusEventData, TextInput as RNTextInput } from 'react-native';
3
3
  import type { Theme } from '../../theme';
4
4
  import type { State } from './StyledTextInput';
5
5
  import type { IconName } from '../Icon';
6
6
  export type TextInputHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
7
7
  type TextInputVariant = 'text' | 'textarea';
8
8
  type NativeTextInputProps = Omit<RNTextInputProps, 'onFocus' | 'onBlur'> & {
9
- onFocus?: (event?: FocusEvent) => void | undefined;
10
- onBlur?: (event?: BlurEvent) => void | undefined;
9
+ onFocus?: (event?: NativeSyntheticEvent<TextInputFocusEventData>) => void | undefined;
10
+ onBlur?: (event?: NativeSyntheticEvent<TextInputFocusEventData>) => void | undefined;
11
11
  };
12
12
  interface TextInputRef {
13
13
  focus: () => void;
@@ -116,7 +116,7 @@ export declare const renderInput: ({ variant, nativeInputProps, renderInputValue
116
116
  ref?: React.Ref<RNTextInput>;
117
117
  theme: Theme;
118
118
  state: State;
119
- }) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
119
+ }) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
120
120
  export declare const renderSuffix: ({ state, loading, suffix, }: {
121
121
  state: State;
122
122
  loading: boolean;