@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.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +9 -2
- package/es/index.js +142 -143
- package/eslint.config.js +1 -0
- package/lib/index.js +141 -142
- package/package.json +1 -1
- package/src/components/BottomSheet/StyledBottomSheet.tsx +4 -3
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +153 -170
- package/src/components/BottomSheet/index.tsx +42 -31
- package/src/components/DatePicker/StyledDatePicker.tsx +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +358 -390
- package/src/components/PinInput/PinCell.tsx +6 -1
- package/src/components/PinInput/StyledPinInput.tsx +2 -2
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +30 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +287 -5
- package/src/components/PinInput/__tests__/index.spec.tsx +33 -0
- package/src/components/PinInput/index.tsx +6 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +3552 -3616
- package/src/components/Select/MultiSelect/index.tsx +15 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2469 -2517
- package/src/components/Select/SingleSelect/index.tsx +15 -4
- package/src/components/Select/index.internal.tsx +13 -0
- package/src/components/Select/index.tsx +14 -2
- package/src/components/Select/types.ts +4 -0
- package/src/components/TimePicker/StyledTimePicker.tsx +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +178 -194
- package/src/index.internal.ts +5 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -1
- package/src/theme/components/bottomSheet.ts +0 -1
- package/src/types.internal.ts +8 -0
- package/stats/8.103.1/rn-stats.html +1 -3
- package/stats/8.103.2/rn-stats.html +4844 -0
- package/stats/8.103.3/rn-stats.html +4844 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +1 -1
- package/types/components/Checkbox/index.d.ts +1 -1
- package/types/components/PinInput/StyledPinInput.d.ts +2 -4
- package/types/components/Select/MultiSelect/index.d.ts +5 -1
- package/types/components/Select/SingleSelect/index.d.ts +5 -1
- package/types/components/Select/index.d.ts +5 -3
- package/types/components/Select/index.internal.d.ts +8 -0
- package/types/components/Select/types.d.ts +4 -0
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/index.internal.d.ts +4 -0
- package/types/theme/components/bottomSheet.d.ts +0 -1
- package/types/types.internal.d.ts +3 -0
- package/src/components/BottomSheet/ContentContainer.tsx +0 -34
- 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
|
-
|
|
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
|
-
<
|
|
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
|
-
<
|
|
180
|
+
<TextInputComponent
|
|
170
181
|
editable
|
|
171
182
|
placeholder="Search"
|
|
172
183
|
suffix="search-outlined"
|