@hero-design/rn 8.3.1 → 8.3.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 +9 -9
- package/es/index.js +28 -19
- package/lib/index.js +25 -16
- package/package.json +5 -5
- package/src/components/Tabs/ScrollableTabs.tsx +14 -3
- package/src/components/TextInput/index.tsx +199 -197
- package/types/components/TextInput/index.d.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
1
|
+
[35m@hero-design/rn:build[0m: cache hit, replaying output [2ma707437faede395b[0m
|
|
2
|
+
[35m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[35m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[35m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[35m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[35m@hero-design/rn:build: [0m[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
|
+
[35m@hero-design/rn:build: [0m[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
8
|
+
[35m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m24.4s[22m[39m
|
|
9
|
+
[35m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
|
-
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, ScrollView, Modal, useWindowDimensions, FlatList, TextInput as TextInput$
|
|
2
|
+
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, ScrollView, Modal, useWindowDimensions, FlatList, TextInput as TextInput$1, PanResponder, TouchableHighlight, InteractionManager, Keyboard, SectionList, LayoutAnimation, RefreshControl as RefreshControl$1 } from 'react-native';
|
|
3
3
|
import React, { useContext, createContext, createElement, useMemo, forwardRef, useEffect, useCallback, useRef, useState, useLayoutEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import { createIconSet } from 'react-native-vector-icons';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
@@ -10958,7 +10958,7 @@ var StyledHelperText = index$a(Typography.Text)(function (_ref10) {
|
|
|
10958
10958
|
fontSize: theme.__hd__.textInput.fontSizes.error
|
|
10959
10959
|
};
|
|
10960
10960
|
});
|
|
10961
|
-
var StyledTextInput = index$a(TextInput$
|
|
10961
|
+
var StyledTextInput = index$a(TextInput$1)(function (_ref11) {
|
|
10962
10962
|
var theme = _ref11.theme;
|
|
10963
10963
|
return {
|
|
10964
10964
|
textAlignVertical: 'center',
|
|
@@ -11035,7 +11035,7 @@ var getVariant$1 = function getVariant(_ref) {
|
|
|
11035
11035
|
// Fix issue: Placeholder is not shown on iOS when multiline is true
|
|
11036
11036
|
// https://github.com/callstack/react-native-paper/pull/3331
|
|
11037
11037
|
var EMPTY_PLACEHOLDER_VALUE = ' ';
|
|
11038
|
-
var TextInput = function
|
|
11038
|
+
var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
11039
11039
|
var _ref3;
|
|
11040
11040
|
var label = _ref2.label,
|
|
11041
11041
|
prefix = _ref2.prefix,
|
|
@@ -11204,8 +11204,7 @@ var TextInput = function TextInput(_ref2, ref) {
|
|
|
11204
11204
|
themeVariant: variant,
|
|
11205
11205
|
fontSize: "small"
|
|
11206
11206
|
}, displayText.length, "/", maxLength)), !!helpText && /*#__PURE__*/React.createElement(StyledHelperText, null, helpText)));
|
|
11207
|
-
};
|
|
11208
|
-
var TextInput$1 = /*#__PURE__*/React.forwardRef(TextInput);
|
|
11207
|
+
});
|
|
11209
11208
|
|
|
11210
11209
|
var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
11211
11210
|
var value = _ref.value,
|
|
@@ -11237,7 +11236,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
11237
11236
|
}, /*#__PURE__*/React.createElement(View, {
|
|
11238
11237
|
pointerEvents: "none",
|
|
11239
11238
|
testID: "datePickerInputAndroid"
|
|
11240
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
11239
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
11241
11240
|
label: label,
|
|
11242
11241
|
value: displayValue,
|
|
11243
11242
|
suffix: "calendar-dates-outlined",
|
|
@@ -11305,7 +11304,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
11305
11304
|
}, /*#__PURE__*/React.createElement(View, {
|
|
11306
11305
|
pointerEvents: "none",
|
|
11307
11306
|
testID: "datePickerInputIOS"
|
|
11308
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
11307
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
11309
11308
|
label: label,
|
|
11310
11309
|
value: displayValue,
|
|
11311
11310
|
suffix: "calendar-dates-outlined",
|
|
@@ -12238,7 +12237,7 @@ var StyledFilledMask = index$a(View)(function (_ref5) {
|
|
|
12238
12237
|
backgroundColor: theme.__hd__.pinInput.colors[themeState]
|
|
12239
12238
|
};
|
|
12240
12239
|
});
|
|
12241
|
-
var StyledHiddenInput = index$a(TextInput$
|
|
12240
|
+
var StyledHiddenInput = index$a(TextInput$1)(function (_ref6) {
|
|
12242
12241
|
var themePinLength = _ref6.themePinLength,
|
|
12243
12242
|
theme = _ref6.theme;
|
|
12244
12243
|
var cellWidth = theme.__hd__.pinInput.sizes.cellWidth;
|
|
@@ -13350,7 +13349,7 @@ function MultiSelect(_ref) {
|
|
|
13350
13349
|
}
|
|
13351
13350
|
}, /*#__PURE__*/React.createElement(View, {
|
|
13352
13351
|
pointerEvents: "none"
|
|
13353
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
13352
|
+
}, /*#__PURE__*/React.createElement(TextInput, _extends$1({}, inputProps, {
|
|
13354
13353
|
label: label,
|
|
13355
13354
|
value: displayedValue,
|
|
13356
13355
|
suffix: "arrow-down",
|
|
@@ -13398,7 +13397,7 @@ function MultiSelect(_ref) {
|
|
|
13398
13397
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
13399
13398
|
}
|
|
13400
13399
|
}
|
|
13401
|
-
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput
|
|
13400
|
+
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput, {
|
|
13402
13401
|
editable: true,
|
|
13403
13402
|
placeholder: "Search",
|
|
13404
13403
|
suffix: "search-outlined",
|
|
@@ -13526,7 +13525,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13526
13525
|
}
|
|
13527
13526
|
}, /*#__PURE__*/React.createElement(View, {
|
|
13528
13527
|
pointerEvents: "none"
|
|
13529
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
13528
|
+
}, /*#__PURE__*/React.createElement(TextInput, _extends$1({}, inputProps, {
|
|
13530
13529
|
label: label,
|
|
13531
13530
|
value: displayedValue,
|
|
13532
13531
|
suffix: "arrow-down",
|
|
@@ -13558,7 +13557,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13558
13557
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
13559
13558
|
}
|
|
13560
13559
|
}
|
|
13561
|
-
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput
|
|
13560
|
+
}, onQueryChange && /*#__PURE__*/React.createElement(StyledSearchBar, null, /*#__PURE__*/React.createElement(TextInput, {
|
|
13562
13561
|
editable: true,
|
|
13563
13562
|
placeholder: "Search",
|
|
13564
13563
|
suffix: "search-outlined",
|
|
@@ -13955,13 +13954,20 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
13955
13954
|
return i === selectedTabIndex ? 1 : 0;
|
|
13956
13955
|
}));
|
|
13957
13956
|
React.useEffect(function () {
|
|
13957
|
+
var timeoutHandle = null;
|
|
13958
13958
|
if (selectedTabIndex !== -1) {
|
|
13959
|
-
var _flatListRef$current
|
|
13959
|
+
var _flatListRef$current;
|
|
13960
13960
|
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 ? void 0 : _flatListRef$current.scrollToIndex({
|
|
13961
13961
|
index: selectedTabIndex,
|
|
13962
13962
|
viewPosition: 0.5
|
|
13963
13963
|
});
|
|
13964
|
-
|
|
13964
|
+
// If the selected tab is changed too quickly, the setPage is crashed and not work anymore
|
|
13965
|
+
// We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
|
|
13966
|
+
timeoutHandle = setTimeout(function () {
|
|
13967
|
+
var _pagerViewRef$current;
|
|
13968
|
+
// use no animation to prevent unexpected behavior if users select tab too quickly
|
|
13969
|
+
(_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPageWithoutAnimation(selectedTabIndex);
|
|
13970
|
+
}, 200);
|
|
13965
13971
|
}
|
|
13966
13972
|
var animation = Animated.parallel(_toConsumableArray(tabs.map(function (_, i) {
|
|
13967
13973
|
return Animated.timing(tabsAnims[i], {
|
|
@@ -13972,9 +13978,12 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
13972
13978
|
})));
|
|
13973
13979
|
animation.start();
|
|
13974
13980
|
return function () {
|
|
13975
|
-
|
|
13981
|
+
animation.stop();
|
|
13982
|
+
if (timeoutHandle) {
|
|
13983
|
+
clearTimeout(timeoutHandle);
|
|
13984
|
+
}
|
|
13976
13985
|
};
|
|
13977
|
-
}, [selectedTabIndex]);
|
|
13986
|
+
}, [selectedTabIndex, pagerViewRef]);
|
|
13978
13987
|
return /*#__PURE__*/React.createElement(TabContainer, {
|
|
13979
13988
|
style: containerStyle,
|
|
13980
13989
|
testID: componentTestID
|
|
@@ -14299,7 +14308,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
14299
14308
|
}, /*#__PURE__*/React.createElement(View, {
|
|
14300
14309
|
pointerEvents: "none",
|
|
14301
14310
|
testID: "timePickerInputAndroid"
|
|
14302
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
14311
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
14303
14312
|
label: label,
|
|
14304
14313
|
value: displayValue,
|
|
14305
14314
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -14367,7 +14376,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
14367
14376
|
}, /*#__PURE__*/React.createElement(View, {
|
|
14368
14377
|
pointerEvents: "none",
|
|
14369
14378
|
testID: "timePickerInputIOS"
|
|
14370
|
-
}, /*#__PURE__*/React.createElement(TextInput
|
|
14379
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
14371
14380
|
label: label,
|
|
14372
14381
|
value: displayValue,
|
|
14373
14382
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -31210,4 +31219,4 @@ var index = Object.assign(RichTextEditor$1, {
|
|
|
31210
31219
|
Toolbar: EditorToolbar
|
|
31211
31220
|
});
|
|
31212
31221
|
|
|
31213
|
-
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, index$8 as Card, Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, index$6 as FAB, Icon, Image, List, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput
|
|
31222
|
+
export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, index$8 as Card, Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, index$6 as FAB, Icon, Image, List, PinInput, Progress, CompoundRadio as Radio, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Slider, Spinner, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, workSystemPalette };
|
package/lib/index.js
CHANGED
|
@@ -11064,7 +11064,7 @@ var getVariant$1 = function getVariant(_ref) {
|
|
|
11064
11064
|
// Fix issue: Placeholder is not shown on iOS when multiline is true
|
|
11065
11065
|
// https://github.com/callstack/react-native-paper/pull/3331
|
|
11066
11066
|
var EMPTY_PLACEHOLDER_VALUE = ' ';
|
|
11067
|
-
var TextInput = function
|
|
11067
|
+
var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
11068
11068
|
var _ref3;
|
|
11069
11069
|
var label = _ref2.label,
|
|
11070
11070
|
prefix = _ref2.prefix,
|
|
@@ -11233,8 +11233,7 @@ var TextInput = function TextInput(_ref2, ref) {
|
|
|
11233
11233
|
themeVariant: variant,
|
|
11234
11234
|
fontSize: "small"
|
|
11235
11235
|
}, displayText.length, "/", maxLength)), !!helpText && /*#__PURE__*/React__default["default"].createElement(StyledHelperText, null, helpText)));
|
|
11236
|
-
};
|
|
11237
|
-
var TextInput$1 = /*#__PURE__*/React__default["default"].forwardRef(TextInput);
|
|
11236
|
+
});
|
|
11238
11237
|
|
|
11239
11238
|
var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
11240
11239
|
var value = _ref.value,
|
|
@@ -11266,7 +11265,7 @@ var DatePickerAndroid = function DatePickerAndroid(_ref) {
|
|
|
11266
11265
|
}, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
|
|
11267
11266
|
pointerEvents: "none",
|
|
11268
11267
|
testID: "datePickerInputAndroid"
|
|
11269
|
-
}, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
11268
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
11270
11269
|
label: label,
|
|
11271
11270
|
value: displayValue,
|
|
11272
11271
|
suffix: "calendar-dates-outlined",
|
|
@@ -11334,7 +11333,7 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
|
|
|
11334
11333
|
}, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
|
|
11335
11334
|
pointerEvents: "none",
|
|
11336
11335
|
testID: "datePickerInputIOS"
|
|
11337
|
-
}, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
11336
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
11338
11337
|
label: label,
|
|
11339
11338
|
value: displayValue,
|
|
11340
11339
|
suffix: "calendar-dates-outlined",
|
|
@@ -13379,7 +13378,7 @@ function MultiSelect(_ref) {
|
|
|
13379
13378
|
}
|
|
13380
13379
|
}, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
|
|
13381
13380
|
pointerEvents: "none"
|
|
13382
|
-
}, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
13381
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextInput, _extends$1({}, inputProps, {
|
|
13383
13382
|
label: label,
|
|
13384
13383
|
value: displayedValue,
|
|
13385
13384
|
suffix: "arrow-down",
|
|
@@ -13427,7 +13426,7 @@ function MultiSelect(_ref) {
|
|
|
13427
13426
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
13428
13427
|
}
|
|
13429
13428
|
}
|
|
13430
|
-
}, onQueryChange && /*#__PURE__*/React__default["default"].createElement(StyledSearchBar, null, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
13429
|
+
}, onQueryChange && /*#__PURE__*/React__default["default"].createElement(StyledSearchBar, null, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
13431
13430
|
editable: true,
|
|
13432
13431
|
placeholder: "Search",
|
|
13433
13432
|
suffix: "search-outlined",
|
|
@@ -13555,7 +13554,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13555
13554
|
}
|
|
13556
13555
|
}, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
|
|
13557
13556
|
pointerEvents: "none"
|
|
13558
|
-
}, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
13557
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextInput, _extends$1({}, inputProps, {
|
|
13559
13558
|
label: label,
|
|
13560
13559
|
value: displayedValue,
|
|
13561
13560
|
suffix: "arrow-down",
|
|
@@ -13587,7 +13586,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13587
13586
|
(_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 ? void 0 : _sectionListRef$curre.scrollToLocation(scrollParams);
|
|
13588
13587
|
}
|
|
13589
13588
|
}
|
|
13590
|
-
}, onQueryChange && /*#__PURE__*/React__default["default"].createElement(StyledSearchBar, null, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
13589
|
+
}, onQueryChange && /*#__PURE__*/React__default["default"].createElement(StyledSearchBar, null, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
13591
13590
|
editable: true,
|
|
13592
13591
|
placeholder: "Search",
|
|
13593
13592
|
suffix: "search-outlined",
|
|
@@ -13984,13 +13983,20 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
13984
13983
|
return i === selectedTabIndex ? 1 : 0;
|
|
13985
13984
|
}));
|
|
13986
13985
|
React__default["default"].useEffect(function () {
|
|
13986
|
+
var timeoutHandle = null;
|
|
13987
13987
|
if (selectedTabIndex !== -1) {
|
|
13988
|
-
var _flatListRef$current
|
|
13988
|
+
var _flatListRef$current;
|
|
13989
13989
|
(_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 ? void 0 : _flatListRef$current.scrollToIndex({
|
|
13990
13990
|
index: selectedTabIndex,
|
|
13991
13991
|
viewPosition: 0.5
|
|
13992
13992
|
});
|
|
13993
|
-
|
|
13993
|
+
// If the selected tab is changed too quickly, the setPage is crashed and not work anymore
|
|
13994
|
+
// We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
|
|
13995
|
+
timeoutHandle = setTimeout(function () {
|
|
13996
|
+
var _pagerViewRef$current;
|
|
13997
|
+
// use no animation to prevent unexpected behavior if users select tab too quickly
|
|
13998
|
+
(_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPageWithoutAnimation(selectedTabIndex);
|
|
13999
|
+
}, 200);
|
|
13994
14000
|
}
|
|
13995
14001
|
var animation = reactNative.Animated.parallel(_toConsumableArray(tabs.map(function (_, i) {
|
|
13996
14002
|
return reactNative.Animated.timing(tabsAnims[i], {
|
|
@@ -14001,9 +14007,12 @@ var ScrollableTab = function ScrollableTab(_ref2) {
|
|
|
14001
14007
|
})));
|
|
14002
14008
|
animation.start();
|
|
14003
14009
|
return function () {
|
|
14004
|
-
|
|
14010
|
+
animation.stop();
|
|
14011
|
+
if (timeoutHandle) {
|
|
14012
|
+
clearTimeout(timeoutHandle);
|
|
14013
|
+
}
|
|
14005
14014
|
};
|
|
14006
|
-
}, [selectedTabIndex]);
|
|
14015
|
+
}, [selectedTabIndex, pagerViewRef]);
|
|
14007
14016
|
return /*#__PURE__*/React__default["default"].createElement(TabContainer, {
|
|
14008
14017
|
style: containerStyle,
|
|
14009
14018
|
testID: componentTestID
|
|
@@ -14328,7 +14337,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
14328
14337
|
}, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
|
|
14329
14338
|
pointerEvents: "none",
|
|
14330
14339
|
testID: "timePickerInputAndroid"
|
|
14331
|
-
}, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
14340
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
14332
14341
|
label: label,
|
|
14333
14342
|
value: displayValue,
|
|
14334
14343
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -14396,7 +14405,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
14396
14405
|
}, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
|
|
14397
14406
|
pointerEvents: "none",
|
|
14398
14407
|
testID: "timePickerInputIOS"
|
|
14399
|
-
}, /*#__PURE__*/React__default["default"].createElement(TextInput
|
|
14408
|
+
}, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
14400
14409
|
label: label,
|
|
14401
14410
|
value: displayValue,
|
|
14402
14411
|
suffix: showSuffix ? 'clock-3' : undefined,
|
|
@@ -31275,7 +31284,7 @@ exports.Swipeable = index$5;
|
|
|
31275
31284
|
exports.Switch = index$3;
|
|
31276
31285
|
exports.Tabs = index$2;
|
|
31277
31286
|
exports.Tag = Tag;
|
|
31278
|
-
exports.TextInput = TextInput
|
|
31287
|
+
exports.TextInput = TextInput;
|
|
31279
31288
|
exports.ThemeProvider = ThemeProvider;
|
|
31280
31289
|
exports.ThemeSwitcher = ThemeSwitcher;
|
|
31281
31290
|
exports.TimePicker = TimePicker;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/native": "^11.9.3",
|
|
23
23
|
"@emotion/react": "^11.9.3",
|
|
24
|
-
"@hero-design/colors": "8.3.
|
|
24
|
+
"@hero-design/colors": "8.3.3",
|
|
25
25
|
"date-fns": "^2.16.1",
|
|
26
26
|
"events": "^3.2.0",
|
|
27
27
|
"hero-editor": "^1.9.21"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/preset-typescript": "^7.17.12",
|
|
45
45
|
"@babel/runtime": "^7.18.9",
|
|
46
46
|
"@emotion/jest": "^11.9.3",
|
|
47
|
-
"@hero-design/eslint-plugin": "8.3.
|
|
47
|
+
"@hero-design/eslint-plugin": "8.3.3",
|
|
48
48
|
"@react-native-community/datetimepicker": "^3.5.2",
|
|
49
49
|
"@react-native-community/slider": "4.1.12",
|
|
50
50
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@types/react-native": "^0.67.7",
|
|
61
61
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
62
62
|
"babel-plugin-inline-import": "^3.0.0",
|
|
63
|
-
"eslint-config-hd": "8.3.
|
|
63
|
+
"eslint-config-hd": "8.3.3",
|
|
64
64
|
"jest": "^27.3.1",
|
|
65
|
-
"prettier-config-hd": "8.3.
|
|
65
|
+
"prettier-config-hd": "8.3.3",
|
|
66
66
|
"react": "18.0.0",
|
|
67
67
|
"react-native": "0.69.7",
|
|
68
68
|
"react-native-gesture-handler": "~2.1.0",
|
|
@@ -78,12 +78,18 @@ const ScrollableTab = ({
|
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
React.useEffect(() => {
|
|
81
|
+
let timeoutHandle: number | null = null;
|
|
81
82
|
if (selectedTabIndex !== -1) {
|
|
82
83
|
flatListRef.current?.scrollToIndex({
|
|
83
84
|
index: selectedTabIndex,
|
|
84
85
|
viewPosition: 0.5,
|
|
85
86
|
});
|
|
86
|
-
|
|
87
|
+
// If the selected tab is changed too quickly, the setPage is crashed and not work anymore
|
|
88
|
+
// We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
|
|
89
|
+
timeoutHandle = setTimeout(() => {
|
|
90
|
+
// use no animation to prevent unexpected behavior if users select tab too quickly
|
|
91
|
+
pagerViewRef.current?.setPageWithoutAnimation(selectedTabIndex);
|
|
92
|
+
}, 200);
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
const animation = Animated.parallel([
|
|
@@ -97,8 +103,13 @@ const ScrollableTab = ({
|
|
|
97
103
|
]);
|
|
98
104
|
animation.start();
|
|
99
105
|
|
|
100
|
-
return () =>
|
|
101
|
-
|
|
106
|
+
return () => {
|
|
107
|
+
animation.stop();
|
|
108
|
+
if (timeoutHandle) {
|
|
109
|
+
clearTimeout(timeoutHandle);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}, [selectedTabIndex, pagerViewRef]);
|
|
102
113
|
|
|
103
114
|
return (
|
|
104
115
|
<TabContainer style={containerStyle} testID={componentTestID}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { useMemo, forwardRef } from 'react';
|
|
2
2
|
import { StyleSheet, TextInput as RNTextInput } from 'react-native';
|
|
3
3
|
import type {
|
|
4
4
|
TextInputProps as NativeTextInputProps,
|
|
@@ -141,225 +141,227 @@ export const getVariant = ({
|
|
|
141
141
|
// https://github.com/callstack/react-native-paper/pull/3331
|
|
142
142
|
const EMPTY_PLACEHOLDER_VALUE = ' ';
|
|
143
143
|
|
|
144
|
-
const TextInput = (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
144
|
+
const TextInput = forwardRef<TextInputHandles, TextInputProps>(
|
|
145
|
+
(
|
|
146
|
+
{
|
|
147
|
+
label,
|
|
148
|
+
prefix,
|
|
149
|
+
suffix,
|
|
150
|
+
style,
|
|
151
|
+
textStyle,
|
|
152
|
+
testID,
|
|
153
|
+
accessibilityLabelledBy,
|
|
154
|
+
error,
|
|
155
|
+
required,
|
|
156
|
+
editable = true,
|
|
157
|
+
disabled = false,
|
|
158
|
+
loading = false,
|
|
159
|
+
maxLength,
|
|
160
|
+
helpText,
|
|
161
|
+
value,
|
|
162
|
+
defaultValue,
|
|
163
|
+
renderInputValue,
|
|
164
|
+
...nativeProps
|
|
165
|
+
}: TextInputProps,
|
|
166
|
+
ref?: React.Ref<TextInputHandles>
|
|
167
|
+
) => {
|
|
168
|
+
const displayText = (value !== undefined ? value : defaultValue) ?? '';
|
|
169
|
+
const isEmptyValue = displayText.length === 0;
|
|
170
|
+
const actualSuffix = loading ? 'loading' : suffix;
|
|
170
171
|
|
|
171
|
-
|
|
172
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
172
173
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
const variant = getVariant({
|
|
175
|
+
disabled,
|
|
176
|
+
error,
|
|
177
|
+
editable,
|
|
178
|
+
loading,
|
|
179
|
+
isFocused,
|
|
180
|
+
isEmptyValue,
|
|
181
|
+
});
|
|
181
182
|
|
|
182
|
-
|
|
183
|
+
const shouldShowMaxLength = maxLength !== undefined;
|
|
183
184
|
|
|
184
|
-
|
|
185
|
+
const theme = useTheme();
|
|
185
186
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
187
|
+
const innerTextInput = React.useRef<RNTextInput | undefined | null>();
|
|
188
|
+
React.useImperativeHandle(
|
|
189
|
+
ref,
|
|
190
|
+
() => ({
|
|
191
|
+
// we don't expose this method, it's for testing https://medium.com/developer-rants/how-to-test-useref-without-mocking-useref-699165f4994e
|
|
192
|
+
getNativeTextInputRef: () => innerTextInput.current,
|
|
193
|
+
focus: () => {
|
|
194
|
+
innerTextInput.current?.focus();
|
|
195
|
+
},
|
|
196
|
+
clear: () => innerTextInput.current?.clear(),
|
|
197
|
+
setNativeProps: (args: NativeTextInputProps) =>
|
|
198
|
+
innerTextInput.current?.setNativeProps(args),
|
|
199
|
+
isFocused: () => innerTextInput.current?.isFocused() || false,
|
|
200
|
+
blur: () => innerTextInput.current?.blur(),
|
|
201
|
+
}),
|
|
202
|
+
[innerTextInput]
|
|
203
|
+
);
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
const { borderStyle, textStyleWithoutBorderStyle } = useMemo(() => {
|
|
206
|
+
if (!textStyle) {
|
|
207
|
+
return {};
|
|
208
|
+
}
|
|
208
209
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
210
|
+
const flattenTextStyle = StyleSheet.flatten(textStyle);
|
|
211
|
+
const borderKeys = Object.keys(flattenTextStyle).filter((key) => {
|
|
212
|
+
return key.startsWith('border');
|
|
213
|
+
}) as Array<keyof TextStyle>;
|
|
214
|
+
return {
|
|
215
|
+
borderStyle: pick(borderKeys, flattenTextStyle),
|
|
216
|
+
textStyleWithoutBorderStyle: omit(borderKeys, flattenTextStyle),
|
|
217
|
+
};
|
|
218
|
+
}, [textStyle]);
|
|
218
219
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
220
|
+
const nativeInputProps: NativeTextInputProps = {
|
|
221
|
+
style: StyleSheet.flatten([
|
|
222
|
+
{ color: theme.__hd__.textInput.colors.text },
|
|
223
|
+
textStyleWithoutBorderStyle,
|
|
224
|
+
]),
|
|
225
|
+
testID: 'text-input',
|
|
226
|
+
accessibilityState: {
|
|
227
|
+
disabled: variant === 'disabled' || variant === 'readonly',
|
|
228
|
+
},
|
|
229
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
230
|
+
// @ts-ignore
|
|
231
|
+
accessibilityLabelledBy,
|
|
232
|
+
...nativeProps,
|
|
233
|
+
onFocus: (event) => {
|
|
234
|
+
setIsFocused(true);
|
|
235
|
+
nativeProps.onFocus?.(event);
|
|
236
|
+
},
|
|
237
|
+
onBlur: (event) => {
|
|
238
|
+
setIsFocused(false);
|
|
239
|
+
nativeProps.onBlur?.(event);
|
|
240
|
+
},
|
|
241
|
+
editable,
|
|
242
|
+
maxLength,
|
|
243
|
+
value,
|
|
244
|
+
onChangeText: (text) => {
|
|
245
|
+
nativeProps.onChangeText?.(text);
|
|
246
|
+
},
|
|
247
|
+
defaultValue,
|
|
248
|
+
placeholder:
|
|
249
|
+
isFocused || label === undefined
|
|
250
|
+
? nativeProps.placeholder
|
|
251
|
+
: EMPTY_PLACEHOLDER_VALUE,
|
|
252
|
+
};
|
|
252
253
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/>
|
|
267
|
-
{(isFocused || (label && !isEmptyValue)) && (
|
|
268
|
-
<StyledLabelContainer pointerEvents="none">
|
|
269
|
-
{required && (
|
|
270
|
-
<StyledAsteriskLabel themeVariant={variant} fontSize="small">
|
|
271
|
-
*
|
|
272
|
-
</StyledAsteriskLabel>
|
|
273
|
-
)}
|
|
274
|
-
{!!label && (
|
|
275
|
-
<StyledLabel
|
|
276
|
-
nativeID={accessibilityLabelledBy}
|
|
277
|
-
testID="input-label"
|
|
278
|
-
fontSize="small"
|
|
279
|
-
themeVariant={variant}
|
|
280
|
-
>
|
|
281
|
-
{label}
|
|
282
|
-
</StyledLabel>
|
|
283
|
-
)}
|
|
284
|
-
</StyledLabelContainer>
|
|
285
|
-
)}
|
|
286
|
-
{typeof prefix === 'string' ? (
|
|
287
|
-
<Icon
|
|
288
|
-
intent={variant === 'disabled' ? 'disabled-text' : 'text'}
|
|
289
|
-
testID="input-prefix"
|
|
290
|
-
icon={prefix}
|
|
291
|
-
size="xsmall"
|
|
254
|
+
return (
|
|
255
|
+
<StyledContainer
|
|
256
|
+
style={style}
|
|
257
|
+
pointerEvents={
|
|
258
|
+
variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto'
|
|
259
|
+
}
|
|
260
|
+
testID={testID}
|
|
261
|
+
>
|
|
262
|
+
<StyledTextInputContainer>
|
|
263
|
+
<StyledBorderBackDrop
|
|
264
|
+
themeFocused={isFocused}
|
|
265
|
+
themeVariant={variant}
|
|
266
|
+
style={borderStyle}
|
|
292
267
|
/>
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
)}
|
|
296
|
-
<StyledTextInputAndLabelContainer>
|
|
297
|
-
{!isFocused && isEmptyValue && (
|
|
298
|
-
<StyledLabelContainerInsideTextInput pointerEvents="none">
|
|
268
|
+
{(isFocused || (label && !isEmptyValue)) && (
|
|
269
|
+
<StyledLabelContainer pointerEvents="none">
|
|
299
270
|
{required && (
|
|
300
|
-
<
|
|
271
|
+
<StyledAsteriskLabel themeVariant={variant} fontSize="small">
|
|
301
272
|
*
|
|
302
|
-
</
|
|
273
|
+
</StyledAsteriskLabel>
|
|
303
274
|
)}
|
|
304
275
|
{!!label && (
|
|
305
|
-
<
|
|
276
|
+
<StyledLabel
|
|
306
277
|
nativeID={accessibilityLabelledBy}
|
|
307
278
|
testID="input-label"
|
|
308
|
-
fontSize="
|
|
279
|
+
fontSize="small"
|
|
309
280
|
themeVariant={variant}
|
|
310
281
|
>
|
|
311
282
|
{label}
|
|
312
|
-
</
|
|
283
|
+
</StyledLabel>
|
|
313
284
|
)}
|
|
314
|
-
</
|
|
285
|
+
</StyledLabelContainer>
|
|
315
286
|
)}
|
|
316
|
-
{
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
|
|
322
|
-
innerTextInput.current = reference;
|
|
323
|
-
}}
|
|
287
|
+
{typeof prefix === 'string' ? (
|
|
288
|
+
<Icon
|
|
289
|
+
intent={variant === 'disabled' ? 'disabled-text' : 'text'}
|
|
290
|
+
testID="input-prefix"
|
|
291
|
+
icon={prefix}
|
|
292
|
+
size="xsmall"
|
|
324
293
|
/>
|
|
294
|
+
) : (
|
|
295
|
+
prefix
|
|
325
296
|
)}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
297
|
+
<StyledTextInputAndLabelContainer>
|
|
298
|
+
{!isFocused && isEmptyValue && (
|
|
299
|
+
<StyledLabelContainerInsideTextInput pointerEvents="none">
|
|
300
|
+
{required && (
|
|
301
|
+
<StyledAsteriskLabelInsideTextInput themeVariant={variant}>
|
|
302
|
+
*
|
|
303
|
+
</StyledAsteriskLabelInsideTextInput>
|
|
304
|
+
)}
|
|
305
|
+
{!!label && (
|
|
306
|
+
<StyledLabelInsideTextInput
|
|
307
|
+
nativeID={accessibilityLabelledBy}
|
|
308
|
+
testID="input-label"
|
|
309
|
+
fontSize="medium"
|
|
310
|
+
themeVariant={variant}
|
|
311
|
+
>
|
|
312
|
+
{label}
|
|
313
|
+
</StyledLabelInsideTextInput>
|
|
314
|
+
)}
|
|
315
|
+
</StyledLabelContainerInsideTextInput>
|
|
316
|
+
)}
|
|
317
|
+
{renderInputValue ? (
|
|
318
|
+
renderInputValue(nativeInputProps)
|
|
319
|
+
) : (
|
|
320
|
+
<StyledTextInput
|
|
321
|
+
{...nativeInputProps}
|
|
322
|
+
ref={(reference) => {
|
|
323
|
+
innerTextInput.current = reference;
|
|
324
|
+
}}
|
|
348
325
|
/>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
{
|
|
356
|
-
|
|
326
|
+
)}
|
|
327
|
+
</StyledTextInputAndLabelContainer>
|
|
328
|
+
{typeof actualSuffix === 'string' ? (
|
|
329
|
+
<Icon
|
|
330
|
+
intent={variant === 'disabled' ? 'disabled-text' : 'text'}
|
|
331
|
+
testID="input-suffix"
|
|
332
|
+
icon={actualSuffix}
|
|
333
|
+
spin={actualSuffix === 'loading'}
|
|
334
|
+
size="xsmall"
|
|
335
|
+
/>
|
|
336
|
+
) : (
|
|
337
|
+
suffix
|
|
357
338
|
)}
|
|
358
|
-
</
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
339
|
+
</StyledTextInputContainer>
|
|
340
|
+
<StyledErrorAndHelpTextContainer>
|
|
341
|
+
<StyledErrorAndMaxLengthContainer>
|
|
342
|
+
{!!error && (
|
|
343
|
+
<StyledErrorContainer>
|
|
344
|
+
<Icon
|
|
345
|
+
testID="input-error-icon"
|
|
346
|
+
icon="circle-info"
|
|
347
|
+
size="xsmall"
|
|
348
|
+
intent="danger"
|
|
349
|
+
/>
|
|
350
|
+
|
|
351
|
+
<StyledError testID="input-error-message">{error}</StyledError>
|
|
352
|
+
</StyledErrorContainer>
|
|
353
|
+
)}
|
|
354
|
+
{shouldShowMaxLength && (
|
|
355
|
+
<StyledMaxLengthMessage themeVariant={variant} fontSize="small">
|
|
356
|
+
{displayText.length}/{maxLength}
|
|
357
|
+
</StyledMaxLengthMessage>
|
|
358
|
+
)}
|
|
359
|
+
</StyledErrorAndMaxLengthContainer>
|
|
360
|
+
{!!helpText && <StyledHelperText>{helpText}</StyledHelperText>}
|
|
361
|
+
</StyledErrorAndHelpTextContainer>
|
|
362
|
+
</StyledContainer>
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
);
|
|
364
366
|
|
|
365
|
-
export default
|
|
367
|
+
export default TextInput;
|
|
@@ -83,5 +83,5 @@ export declare const getVariant: ({ disabled, error, editable, loading, isEmptyV
|
|
|
83
83
|
isFocused?: boolean | undefined;
|
|
84
84
|
isEmptyValue?: boolean | undefined;
|
|
85
85
|
}) => Variant;
|
|
86
|
-
declare const
|
|
87
|
-
export default
|
|
86
|
+
declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "children" | "label" | "style" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "disabled" | "value" | "onBlur" | "onFocus" | "onPressIn" | "onPressOut" | "allowFontScaling" | "numberOfLines" | "maxFontSizeMultiplier" | "selectionColor" | "textBreakStrategy" | "loading" | "textAlign" | "error" | "textAlignVertical" | "onContentSizeChange" | "onScroll" | "scrollEnabled" | "onChange" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onChangeText" | "onEndEditing" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "inputAccessoryViewID" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "autoComplete" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "returnKeyLabel" | "underlineColorAndroid" | "showSoftInputOnFocus" | "prefix" | "suffix" | "textStyle" | "accessibilityLabelledBy" | "required" | "helpText" | "renderInputValue"> & React.RefAttributes<TextInputHandles>>;
|
|
87
|
+
export default TextInput;
|