@hero-design/rn 8.103.2-alpha.0 → 8.103.3

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 (47) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +9 -2
  3. package/es/index.js +142 -143
  4. package/eslint.config.js +1 -0
  5. package/lib/index.js +141 -142
  6. package/package.json +1 -1
  7. package/src/components/BottomSheet/StyledBottomSheet.tsx +4 -3
  8. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +153 -170
  9. package/src/components/BottomSheet/index.tsx +42 -31
  10. package/src/components/DatePicker/StyledDatePicker.tsx +1 -0
  11. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +358 -390
  12. package/src/components/PinInput/PinCell.tsx +6 -1
  13. package/src/components/PinInput/StyledPinInput.tsx +2 -2
  14. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +30 -0
  15. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +287 -5
  16. package/src/components/PinInput/__tests__/index.spec.tsx +33 -0
  17. package/src/components/PinInput/index.tsx +6 -2
  18. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +3552 -3616
  19. package/src/components/Select/MultiSelect/index.tsx +15 -4
  20. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2469 -2517
  21. package/src/components/Select/SingleSelect/index.tsx +15 -4
  22. package/src/components/Select/index.internal.tsx +13 -0
  23. package/src/components/Select/index.tsx +14 -2
  24. package/src/components/Select/types.ts +4 -0
  25. package/src/components/TimePicker/StyledTimePicker.tsx +1 -0
  26. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +178 -194
  27. package/src/index.internal.ts +5 -0
  28. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -1
  29. package/src/theme/components/bottomSheet.ts +0 -1
  30. package/src/types.internal.ts +8 -0
  31. package/stats/8.103.1/rn-stats.html +1 -3
  32. package/stats/8.103.2/rn-stats.html +4844 -0
  33. package/stats/8.103.3/rn-stats.html +4844 -0
  34. package/types/components/BottomSheet/StyledBottomSheet.d.ts +1 -1
  35. package/types/components/Checkbox/index.d.ts +1 -1
  36. package/types/components/PinInput/StyledPinInput.d.ts +2 -4
  37. package/types/components/Select/MultiSelect/index.d.ts +5 -1
  38. package/types/components/Select/SingleSelect/index.d.ts +5 -1
  39. package/types/components/Select/index.d.ts +5 -3
  40. package/types/components/Select/index.internal.d.ts +8 -0
  41. package/types/components/Select/types.d.ts +4 -0
  42. package/types/components/TextInput/index.d.ts +1 -1
  43. package/types/index.internal.d.ts +4 -0
  44. package/types/theme/components/bottomSheet.d.ts +0 -1
  45. package/types/types.internal.d.ts +3 -0
  46. package/src/components/BottomSheet/ContentContainer.tsx +0 -34
  47. package/types/components/BottomSheet/ContentContainer.d.ts +0 -10
@@ -6,7 +6,7 @@ import type {
6
6
  import { TouchableOpacity, View } from 'react-native';
7
7
  import BottomSheet from '../../BottomSheet';
8
8
  import Box from '../../Box';
9
- import TextInput from '../../TextInput';
9
+ import TextInput, { TextInputProps } from '../../TextInput';
10
10
  import Footer from '../Footer';
11
11
  import { getScrollParams, toFlatOptions, toSections } from '../helpers';
12
12
  import { StyledSearchBar } from '../StyledSelect';
@@ -52,6 +52,14 @@ export interface MultiSelectProps<
52
52
  supportedOrientations?: ('portrait' | 'landscape')[];
53
53
  }
54
54
 
55
+ // Add an internal prop type for TextInputComponent, not exported
56
+ export interface InternalMultiSelectProps<
57
+ V,
58
+ T extends SelectOptionType<V> = SelectOptionType<V>
59
+ > extends MultiSelectProps<V, T> {
60
+ TextInputComponent?: React.ComponentType<TextInputProps>;
61
+ }
62
+
55
63
  function MultiSelect<V, T extends SelectOptionType<V>>({
56
64
  footerLabel,
57
65
  label,
@@ -74,7 +82,8 @@ function MultiSelect<V, T extends SelectOptionType<V>>({
74
82
  value,
75
83
  supportedOrientations = ['portrait'],
76
84
  bottomSheetConfig = {},
77
- }: MultiSelectProps<V, T>) {
85
+ ...rest
86
+ }: InternalMultiSelectProps<V, T>) {
78
87
  const { isKeyboardVisible, keyboardHeight } = useKeyboard();
79
88
  const [open, setOpen] = useState(false);
80
89
  const [selectingValue, setSelectingValue] = useState(value);
@@ -89,6 +98,8 @@ function MultiSelect<V, T extends SelectOptionType<V>>({
89
98
  const { variant: bottomSheetVariant, header: bottomSheetHeader } =
90
99
  bottomSheetConfig;
91
100
 
101
+ const TextInputComponent = rest.TextInputComponent || TextInput;
102
+
92
103
  useEffect(() => {
93
104
  setSelectingValue(value);
94
105
  }, [open, value]);
@@ -105,7 +116,7 @@ function MultiSelect<V, T extends SelectOptionType<V>>({
105
116
  // prevent users from focusing TextInput
106
117
  }
107
118
  <View pointerEvents="none">
108
- <TextInput
119
+ <TextInputComponent
109
120
  {...inputProps}
110
121
  label={label}
111
122
  value={renderSelectedValue ? rawValue : displayedValue}
@@ -166,7 +177,7 @@ function MultiSelect<V, T extends SelectOptionType<V>>({
166
177
  >
167
178
  {onQueryChange && (
168
179
  <StyledSearchBar>
169
- <TextInput
180
+ <TextInputComponent
170
181
  editable
171
182
  placeholder="Search"
172
183
  suffix="search-outlined"