@hero-design/rn 8.118.3 → 8.119.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 (36) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/es/index.js +656 -7911
  4. package/jest.config.js +1 -1
  5. package/lib/index.js +616 -7871
  6. package/locales/index.mjs +4 -4
  7. package/package.json +26 -25
  8. package/rollup.config.mjs +1 -1
  9. package/src/components/AppCue/index.tsx +4 -1
  10. package/src/components/Button/Button.tsx +2 -2
  11. package/src/components/Button/UtilityButton/index.tsx +2 -2
  12. package/src/components/Chip/index.tsx +4 -0
  13. package/src/components/FloatingIsland/index.tsx +2 -2
  14. package/src/components/Search/SearchOneLine.tsx +1 -1
  15. package/src/components/Select/BaseOptionList.tsx +2 -2
  16. package/src/components/Select/SingleSelect/OptionList.tsx +1 -1
  17. package/src/components/StatusScreens/Error/index.tsx +3 -2
  18. package/src/components/Tabs/ScrollableTabs.tsx +1 -2
  19. package/src/components/Tabs/index.tsx +2 -2
  20. package/src/components/TextInput/index.tsx +7 -9
  21. package/src/components/Toolbar/ToolbarMessage.tsx +1 -1
  22. package/src/utils/hooks.ts +1 -1
  23. package/testUtils/setup.tsx +0 -6
  24. package/types/components/AppCue/index.d.ts +4 -1
  25. package/types/components/Button/Button.d.ts +2 -2
  26. package/types/components/Button/UtilityButton/index.d.ts +2 -2
  27. package/types/components/Chip/index.d.ts +1 -1
  28. package/types/components/FloatingIsland/index.d.ts +2 -2
  29. package/types/components/Select/BaseOptionList.d.ts +1 -1
  30. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  31. package/types/components/StatusScreens/Error/index.d.ts +1 -1
  32. package/types/components/Swipeable/index.d.ts +1 -1
  33. package/types/components/Tabs/ScrollableTabs.d.ts +1 -2
  34. package/types/components/Tabs/index.d.ts +2 -2
  35. package/types/components/Tabs/useHandlePageScroll.d.ts +1 -1
  36. package/types/components/TextInput/index.d.ts +4 -4
package/locales/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import locale from './en_AU.mjs';
2
- import locale$1 from './en_CA.mjs';
1
+ import locale$1 from './en_AU.mjs';
2
+ import locale from './en_CA.mjs';
3
3
 
4
4
  var index = {
5
- 'en-AU': locale,
6
- 'en-CA': locale$1,
5
+ 'en-AU': locale$1,
6
+ 'en-CA': locale,
7
7
  };
8
8
 
9
9
  export { index as default };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.118.3",
3
+ "version": "8.119.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
7
+ "react-native": "src/index.ts",
7
8
  "types": "types/index.d.ts",
8
9
  "scripts": {
9
10
  "lint": "eslint src --quiet",
@@ -21,23 +22,23 @@
21
22
  "dependencies": {
22
23
  "@emotion/native": "^11.9.3",
23
24
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.47.1",
25
+ "@hero-design/colors": "8.47.2",
25
26
  "d3": "^7.8.5",
26
27
  "date-fns": "^2.30.0",
27
28
  "hero-editor": "^1.17.0",
28
29
  "nanoid": "^5.0.9"
29
30
  },
30
31
  "peerDependencies": {
31
- "@hero-design/react-native-month-year-picker": "^8.45.0",
32
+ "@hero-design/react-native-month-year-picker": "^8.45.1",
32
33
  "@ptomasroos/react-native-multi-slider": "^2.2.2",
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",
34
+ "@react-native-community/datetimepicker": "^8.4.4",
35
+ "@react-native-community/slider": "^5.0.1",
36
+ "react": "19.1.0",
37
+ "react-native": "0.81.5",
38
+ "react-native-gesture-handler": "~2.28.0",
38
39
  "react-native-linear-gradient": "^2.8.3",
39
40
  "react-native-pager-view": "^6.7.0",
40
- "react-native-safe-area-context": "^4.7.0",
41
+ "react-native-safe-area-context": "~5.6.0",
41
42
  "react-native-svg": "^15.11.2",
42
43
  "react-native-vector-icons": "^9.1.0",
43
44
  "react-native-webview": "^13.10.2"
@@ -55,12 +56,12 @@
55
56
  "@eslint/compat": "^1.1.1",
56
57
  "@eslint/eslintrc": "^3.1.0",
57
58
  "@eslint/js": "^9.8.0",
58
- "@hero-design/eslint-plugin": "9.2.1",
59
- "@hero-design/react-native-month-year-picker": "^8.45.0",
59
+ "@hero-design/eslint-plugin": "9.2.2",
60
+ "@hero-design/react-native-month-year-picker": "^8.45.1",
60
61
  "@ptomasroos/react-native-multi-slider": "^2.2.2",
61
- "@react-native-community/datetimepicker": "8.2.0",
62
- "@react-native-community/slider": "^4.5.1",
63
- "@react-native/babel-preset": "0.77.3",
62
+ "@react-native-community/datetimepicker": "8.4.4",
63
+ "@react-native-community/slider": "^5.0.1",
64
+ "@react-native/babel-preset": "0.81.5",
64
65
  "@rollup/plugin-babel": "^6.0.4",
65
66
  "@rollup/plugin-commonjs": "^28.0.1",
66
67
  "@rollup/plugin-json": "^6.1.0",
@@ -73,7 +74,7 @@
73
74
  "@types/d3": "^7.4.3",
74
75
  "@types/events": "^3.0.3",
75
76
  "@types/jest": "^29.5.3",
76
- "@types/react": "^18.2.0",
77
+ "@types/react": "^19.0.0",
77
78
  "@types/react-native-vector-icons": "^6.4.10",
78
79
  "@typescript-eslint/eslint-plugin": "^5.12.1",
79
80
  "babel-plugin-inline-import": "^3.0.0",
@@ -84,18 +85,18 @@
84
85
  "jest-environment-jsdom": "^29.2.1",
85
86
  "jest-junit": "^16.0.0",
86
87
  "prettier-config-hd": "8.42.4",
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",
88
+ "react": "19.1.0",
89
+ "react-dom": "19.1.0",
90
+ "react-native": "0.81.5",
91
+ "react-native-gesture-handler": "~2.28.0",
91
92
  "react-native-linear-gradient": "2.8.3",
92
- "react-native-pager-view": "6.5.1",
93
- "react-native-safe-area-context": "4.12.0",
94
- "react-native-svg": "15.8.0",
93
+ "react-native-pager-view": "6.9.1",
94
+ "react-native-safe-area-context": "~5.6.0",
95
+ "react-native-svg": "15.12.1",
95
96
  "react-native-vector-icons": "^9.1.0",
96
- "react-native-webview": "13.10.3",
97
- "react-test-renderer": "18.3.1",
98
- "rollup": "^4.24.3",
97
+ "react-native-webview": "13.15.0",
98
+ "react-test-renderer": "19.1.0",
99
+ "rollup": "^4.57.1",
99
100
  "rollup-plugin-copy": "^3.5.0",
100
101
  "rollup-plugin-flow": "^1.1.1",
101
102
  "rollup-plugin-visualizer": "^5.12.0",
package/rollup.config.mjs CHANGED
@@ -9,7 +9,7 @@ import flow from 'rollup-plugin-flow';
9
9
  import { visualizer } from 'rollup-plugin-visualizer';
10
10
  import glob from 'glob';
11
11
  import { fileURLToPath } from 'node:url';
12
- import pkg from './package.json' assert { type: 'json' };
12
+ import pkg from './package.json' with { type: 'json' };
13
13
 
14
14
  const extensions = ['.js', '.jsx', '.ts', '.tsx'];
15
15
 
@@ -26,7 +26,10 @@ interface AppCueProps {
26
26
  /*
27
27
  * The target where the App Cue is relatively placed to.
28
28
  */
29
- target: React.ReactElement;
29
+ target: React.ReactElement<{
30
+ onPress?: () => void;
31
+ children?: React.ReactNode;
32
+ }>;
30
33
 
31
34
  /**
32
35
  * The Position of the App Cue.
@@ -1,4 +1,4 @@
1
- import type { ReactChild, ReactElement, ReactNode } from 'react';
1
+ import type { 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?: ReactChild;
72
+ text?: ReactNode;
73
73
  /**
74
74
  * Button type.
75
75
  */
@@ -1,5 +1,5 @@
1
+ import type { ReactNode } from 'react';
1
2
  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: ReactChild;
24
+ text: ReactNode;
25
25
  /**
26
26
  * Visual intent color to apply to button.
27
27
  */
@@ -77,6 +77,8 @@ const Chip = ({
77
77
  onPress,
78
78
  showSelectedIcon = true,
79
79
  accessible,
80
+ onBlur,
81
+ onFocus,
80
82
  ...otherProps
81
83
  }: ChipProps) => {
82
84
  useDeprecation(
@@ -98,6 +100,8 @@ const Chip = ({
98
100
  themeVariant={renamedVariant}
99
101
  themeSelected={selected}
100
102
  accessible={accessible}
103
+ onBlur={onBlur || undefined}
104
+ onFocus={onFocus || undefined}
101
105
  {...otherProps}
102
106
  >
103
107
  {icon && (
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import React from 'react';
3
- import type { LayoutChangeEvent, ViewProps } from 'react-native';
3
+ import type { LayoutChangeEvent, TouchableOpacityProps } 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 ViewProps {
12
+ interface FloatingIslandProps extends TouchableOpacityProps {
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>();
152
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>(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>>;
14
+ sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
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 />
54
+ <Spinner testID="select-loading-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>>;
21
+ sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
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 = true,
192
+ visible: _visible,
193
193
  variant = 'in-page',
194
194
  title,
195
195
  description,
@@ -203,8 +203,9 @@ const ErrorComponent = ({
203
203
  }: ErrorProps): ReactElement => {
204
204
  useDeprecation(
205
205
  `Visible prop is deprecated. Use conditional rendering instead`,
206
- visible
206
+ _visible !== undefined
207
207
  );
208
+ const visible = _visible === undefined ? true : _visible;
208
209
 
209
210
  const [isVisible, setIsVisible] = useState(visible);
210
211
  const [ctaPressed, setCtaPressed] = useState<onCloseCallbackType>(null);
@@ -1,4 +1,3 @@
1
- import type { FunctionComponent } from 'react';
2
1
  import React, { useEffect, useMemo, useRef } from 'react';
3
2
  import PagerView from 'react-native-pager-view';
4
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -12,7 +11,7 @@ import { ScreenContext, TabContext } from './useIsFocused';
12
11
 
13
12
  export interface ScrollableTabProps extends Omit<TabsProps, 'header'> {
14
13
  variant?: 'underlined' | 'highlighted';
15
- header?: FunctionComponent<ScrollableTabHeaderProps>;
14
+ header?: (props: ScrollableTabHeaderProps) => React.ReactElement | null;
16
15
  }
17
16
 
18
17
  const ScrollableTab = ({
@@ -1,5 +1,5 @@
1
1
  import { useTheme } from '@emotion/react';
2
- import type { FunctionComponent, ReactElement, ReactNode } from 'react';
2
+ import type { 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?: FunctionComponent<TabsHeaderProps>;
95
+ header?: (props: TabsHeaderProps) => ReactElement;
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,
17
15
  TextInput as RNTextInput,
16
+ BlurEvent,
17
+ FocusEvent,
18
18
  } from 'react-native';
19
19
  import {
20
20
  StyledTextInputContainer,
@@ -48,12 +48,8 @@ export type TextInputHandles = Pick<
48
48
  type TextInputVariant = 'text' | 'textarea';
49
49
 
50
50
  type NativeTextInputProps = Omit<RNTextInputProps, 'onFocus' | 'onBlur'> & {
51
- onFocus?: (
52
- event?: NativeSyntheticEvent<TextInputFocusEventData>
53
- ) => void | undefined;
54
- onBlur?: (
55
- event?: NativeSyntheticEvent<TextInputFocusEventData>
56
- ) => void | undefined;
51
+ onFocus?: (event?: FocusEvent) => void | undefined;
52
+ onBlur?: (event?: BlurEvent) => void | undefined;
57
53
  };
58
54
 
59
55
  interface TextInputRef {
@@ -238,6 +234,8 @@ export const renderInput = ({
238
234
  numberOfLines={numberOfLines}
239
235
  ref={ref}
240
236
  placeholderTextColor={theme.__hd__.textInput.colors.placeholder[state]}
237
+ onBlur={nativeInputProps?.onBlur}
238
+ onFocus={nativeInputProps?.onFocus}
241
239
  />
242
240
  );
243
241
  };
@@ -373,7 +371,7 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
373
371
  setInputSize((prev) => ({ ...prev, height, width }));
374
372
  }, []);
375
373
 
376
- const innerTextInput = React.useRef<RNTextInput | undefined | null>();
374
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>(null);
377
375
  React.useImperativeHandle(
378
376
  ref,
379
377
  () => ({
@@ -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>();
111
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>(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>();
5
+ const ref = React.useRef<T>(undefined);
6
6
  React.useEffect(() => {
7
7
  ref.current = value;
8
8
  }, [value]);
@@ -154,10 +154,4 @@ jest.mock('@hero-design/react-native-month-year-picker', () => {
154
154
  };
155
155
  });
156
156
 
157
- jest.mock('react-native/Libraries/Utilities/BackHandler', () => {
158
- return jest.requireActual(
159
- 'react-native/Libraries/Utilities/__mocks__/BackHandler.js'
160
- );
161
- });
162
-
163
157
  export {};
@@ -3,7 +3,10 @@ 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;
6
+ target: React.ReactElement<{
7
+ onPress?: () => void;
8
+ children?: React.ReactNode;
9
+ }>;
7
10
  /**
8
11
  * The Position of the App Cue.
9
12
  */
@@ -1,4 +1,4 @@
1
- import type { ReactChild, ReactElement, ReactNode } from 'react';
1
+ import type { 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?: ReactChild;
56
+ text?: ReactNode;
57
57
  /**
58
58
  * Button type.
59
59
  */
@@ -1,5 +1,5 @@
1
+ import type { ReactNode } from 'react';
1
2
  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: ReactChild;
17
+ text: ReactNode;
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, ...otherProps }: ChipProps) => React.JSX.Element;
42
+ declare const Chip: ({ label, variant, selected, icon, onPress, showSelectedIcon, accessible, onBlur, onFocus, ...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 { ViewProps } from 'react-native';
3
+ import type { TouchableOpacityProps } from 'react-native';
4
4
  import type { IconName } from '../Icon';
5
- interface FloatingIslandProps extends ViewProps {
5
+ interface FloatingIslandProps extends TouchableOpacityProps {
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>>;
5
+ sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
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>>;
8
+ sectionListRef?: React.RefObject<SectionList<T, SectionType> | null>;
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, variant, title, description, image, testID, ctaText, onCtaPress, secondaryCtaText, onSecondaryCtaPress, ...nativeProps }: ErrorProps) => ReactElement;
61
+ declare const ErrorComponent: ({ visible: _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<any>>;
48
+ Content: React.ForwardRefExoticComponent<Omit<import("react-native-gesture-handler").RectButtonProps, "innerRef"> & React.RefAttributes<React.ComponentType<{}>>>;
49
49
  };
50
50
  export default _default;
@@ -1,10 +1,9 @@
1
- import type { FunctionComponent } from 'react';
2
1
  import React from 'react';
3
2
  import type { TabsProps } from '.';
4
3
  import type { ScrollableTabHeaderProps } from './ScrollableTabsHeader/ScrollableTabsHeader';
5
4
  export interface ScrollableTabProps extends Omit<TabsProps, 'header'> {
6
5
  variant?: 'underlined' | 'highlighted';
7
- header?: FunctionComponent<ScrollableTabHeaderProps>;
6
+ header?: (props: ScrollableTabHeaderProps) => React.ReactElement | null;
8
7
  }
9
8
  declare const ScrollableTab: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, swipeEnabled, testID: componentTestID, variant, header, }: ScrollableTabProps) => React.JSX.Element;
10
9
  export default ScrollableTab;
@@ -1,4 +1,4 @@
1
- import type { FunctionComponent, ReactElement, ReactNode } from 'react';
1
+ import type { 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?: FunctionComponent<TabsHeaderProps>;
78
+ header?: (props: TabsHeaderProps) => ReactElement;
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").MutableRefObject<boolean>;
6
+ hasScrolled: import("react").RefObject<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, NativeSyntheticEvent, TextInputFocusEventData, TextInput as RNTextInput } from 'react-native';
2
+ import type { TextInputProps as RNTextInputProps, StyleProp, ViewStyle, TextStyle, TextInput as RNTextInput, BlurEvent, FocusEvent } 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?: NativeSyntheticEvent<TextInputFocusEventData>) => void | undefined;
10
- onBlur?: (event?: NativeSyntheticEvent<TextInputFocusEventData>) => void | undefined;
9
+ onFocus?: (event?: FocusEvent) => void | undefined;
10
+ onBlur?: (event?: BlurEvent) => 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 | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
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;
120
120
  export declare const renderSuffix: ({ state, loading, suffix, }: {
121
121
  state: State;
122
122
  loading: boolean;