@xhsreds/reds-rn-next 0.11.1-premode-test.0 → 0.11.1-web202512221520
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/coverage/.tmp/coverage-10.json +1 -1
- package/coverage/.tmp/coverage-11.json +1 -1
- package/coverage/.tmp/coverage-12.json +1 -1
- package/coverage/.tmp/coverage-13.json +1 -1
- package/coverage/.tmp/coverage-14.json +1 -1
- package/coverage/.tmp/coverage-15.json +1 -1
- package/coverage/.tmp/coverage-16.json +1 -1
- package/coverage/.tmp/coverage-21.json +1 -1
- package/coverage/.tmp/coverage-22.json +1 -1
- package/coverage/.tmp/coverage-23.json +1 -1
- package/coverage/.tmp/coverage-3.json +1 -1
- package/coverage/.tmp/coverage-30.json +1 -1
- package/coverage/.tmp/coverage-31.json +1 -1
- package/coverage/.tmp/coverage-32.json +1 -1
- package/coverage/.tmp/coverage-33.json +1 -1
- package/coverage/.tmp/coverage-34.json +1 -1
- package/coverage/.tmp/coverage-35.json +1 -1
- package/coverage/.tmp/coverage-36.json +1 -1
- package/coverage/.tmp/coverage-37.json +1 -1
- package/coverage/.tmp/coverage-38.json +1 -1
- package/coverage/.tmp/coverage-39.json +1 -1
- package/coverage/.tmp/coverage-4.json +1 -1
- package/coverage/.tmp/coverage-40.json +1 -1
- package/coverage/.tmp/coverage-41.json +1 -1
- package/coverage/.tmp/coverage-5.json +1 -1
- package/coverage/.tmp/coverage-6.json +1 -1
- package/coverage/.tmp/coverage-7.json +1 -1
- package/coverage/.tmp/coverage-8.json +1 -1
- package/coverage/.tmp/coverage-9.json +1 -1
- package/lib/cjs/_chunks/BiKD1VTc.js.map +1 -1
- package/lib/cjs/components/ActionSheets/ActionSheets.js.map +1 -1
- package/lib/cjs/components/ActionablePopover/ActionablePopover.js +3 -0
- package/lib/cjs/components/ActionablePopover/ActionablePopover.js.map +1 -1
- package/lib/cjs/components/Alert/Alert.js +12 -9
- package/lib/cjs/components/Alert/Alert.js.map +1 -1
- package/lib/cjs/components/Alert/hooks/alert.js +1 -0
- package/lib/cjs/components/Alert/hooks/alert.js.map +1 -1
- package/lib/cjs/components/Alert/index.js +1 -0
- package/lib/cjs/components/Alert/index.js.map +1 -1
- package/lib/cjs/components/Button/Viewable.web.js +47 -0
- package/lib/cjs/components/Button/Viewable.web.js.map +1 -0
- package/lib/cjs/components/Collapse/Item/Item.web.js +164 -0
- package/lib/cjs/components/Collapse/Item/Item.web.js.map +1 -0
- package/lib/cjs/components/Image/index.js +1 -1
- package/lib/cjs/components/Image/index.js.map +1 -1
- package/lib/cjs/components/NoticeBar/NoticeBar.js +12 -6
- package/lib/cjs/components/NoticeBar/NoticeBar.js.map +1 -1
- package/lib/cjs/components/PickerView/PickerView.js +2 -1
- package/lib/cjs/components/PickerView/PickerView.js.map +1 -1
- package/lib/cjs/components/PickerView/Wheel.js +22 -2
- package/lib/cjs/components/PickerView/Wheel.js.map +1 -1
- package/lib/cjs/components/Popover/Popover.js +24 -28
- package/lib/cjs/components/Popover/Popover.js.map +1 -1
- package/lib/cjs/components/ProgressIndicator/ProgressIndicator.js +3 -3
- package/lib/cjs/components/ProgressIndicator/ProgressIndicator.js.map +1 -1
- package/lib/cjs/components/Radio/Radio.js +1 -0
- package/lib/cjs/components/Radio/Radio.js.map +1 -1
- package/lib/cjs/components/Radio/index.js +1 -0
- package/lib/cjs/components/Radio/index.js.map +1 -1
- package/lib/cjs/components/Sheets/AnimatedSheets.js +13 -2
- package/lib/cjs/components/Sheets/AnimatedSheets.js.map +1 -1
- package/lib/cjs/components/SlimAlert/Alert.js +12 -8
- package/lib/cjs/components/SlimAlert/Alert.js.map +1 -1
- package/lib/cjs/components/SlimAlert/PortalHost.js +28 -0
- package/lib/cjs/components/SlimAlert/PortalHost.js.map +1 -0
- package/lib/cjs/components/SlimAlert/PortalHost.web.js +12171 -0
- package/lib/cjs/components/SlimAlert/PortalHost.web.js.map +1 -0
- package/lib/cjs/components/SlimAlert/index.js +1 -0
- package/lib/cjs/components/SlimAlert/index.js.map +1 -1
- package/lib/cjs/components/Tag/Tag.js +10 -3
- package/lib/cjs/components/Tag/Tag.js.map +1 -1
- package/lib/cjs/components/TextField/TextField.js +22 -12
- package/lib/cjs/components/TextField/TextField.js.map +1 -1
- package/lib/cjs/components/TextView/TextView.js +4 -2
- package/lib/cjs/components/TextView/TextView.js.map +1 -1
- package/lib/cjs/components/Toast/Toast.js +1 -1
- package/lib/cjs/components/Toast/Toast.js.map +1 -1
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/pvCount/pvData.js +11 -6
- package/lib/cjs/pvCount/pvData.js.map +1 -1
- package/lib/esm/_chunks/Dr5vetot.js.map +1 -1
- package/lib/esm/components/ActionSheets/ActionSheets.js.map +1 -1
- package/lib/esm/components/ActionablePopover/ActionablePopover.js +3 -0
- package/lib/esm/components/ActionablePopover/ActionablePopover.js.map +1 -1
- package/lib/esm/components/Alert/Alert.js +12 -9
- package/lib/esm/components/Alert/Alert.js.map +1 -1
- package/lib/esm/components/Alert/hooks/alert.js +1 -0
- package/lib/esm/components/Alert/hooks/alert.js.map +1 -1
- package/lib/esm/components/Alert/index.js +1 -0
- package/lib/esm/components/Alert/index.js.map +1 -1
- package/lib/esm/components/Button/Viewable.web.js +43 -0
- package/lib/esm/components/Button/Viewable.web.js.map +1 -0
- package/lib/esm/components/Collapse/Item/Item.web.js +160 -0
- package/lib/esm/components/Collapse/Item/Item.web.js.map +1 -0
- package/lib/esm/components/Image/index.js +1 -1
- package/lib/esm/components/Image/index.js.map +1 -1
- package/lib/esm/components/NoticeBar/NoticeBar.js +13 -7
- package/lib/esm/components/NoticeBar/NoticeBar.js.map +1 -1
- package/lib/esm/components/PickerView/PickerView.js +2 -1
- package/lib/esm/components/PickerView/PickerView.js.map +1 -1
- package/lib/esm/components/PickerView/Wheel.js +23 -3
- package/lib/esm/components/PickerView/Wheel.js.map +1 -1
- package/lib/esm/components/Popover/Popover.js +24 -28
- package/lib/esm/components/Popover/Popover.js.map +1 -1
- package/lib/esm/components/ProgressIndicator/ProgressIndicator.js +4 -4
- package/lib/esm/components/ProgressIndicator/ProgressIndicator.js.map +1 -1
- package/lib/esm/components/Radio/Radio.js +1 -0
- package/lib/esm/components/Radio/Radio.js.map +1 -1
- package/lib/esm/components/Radio/index.js +1 -0
- package/lib/esm/components/Radio/index.js.map +1 -1
- package/lib/esm/components/Sheets/AnimatedSheets.js +13 -2
- package/lib/esm/components/Sheets/AnimatedSheets.js.map +1 -1
- package/lib/esm/components/SlimAlert/Alert.js +12 -8
- package/lib/esm/components/SlimAlert/Alert.js.map +1 -1
- package/lib/esm/components/SlimAlert/PortalHost.js +24 -0
- package/lib/esm/components/SlimAlert/PortalHost.js.map +1 -0
- package/lib/esm/components/SlimAlert/PortalHost.web.js +12167 -0
- package/lib/esm/components/SlimAlert/PortalHost.web.js.map +1 -0
- package/lib/esm/components/SlimAlert/index.js +1 -0
- package/lib/esm/components/SlimAlert/index.js.map +1 -1
- package/lib/esm/components/Tag/Tag.js +12 -5
- package/lib/esm/components/Tag/Tag.js.map +1 -1
- package/lib/esm/components/TextField/TextField.js +22 -12
- package/lib/esm/components/TextField/TextField.js.map +1 -1
- package/lib/esm/components/TextView/TextView.js +4 -2
- package/lib/esm/components/TextView/TextView.js.map +1 -1
- package/lib/esm/components/Toast/Toast.js +2 -2
- package/lib/esm/components/Toast/Toast.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/pvCount/pvData.js +11 -6
- package/lib/esm/pvCount/pvData.js.map +1 -1
- package/lib/src/components/Button/Viewable.web.d.ts +3 -0
- package/lib/src/components/Collapse/Item/Item.web.d.ts +7 -0
- package/lib/src/components/Form/interface/index.d.ts +0 -1
- package/lib/src/components/Image/interface/index.d.ts +0 -2
- package/lib/src/components/Search/interface/index.d.ts +0 -2
- package/lib/src/components/Slider/interface/index.d.ts +0 -2
- package/lib/src/components/SlimAlert/Alert.d.ts +1 -1
- package/lib/src/components/SlimAlert/PortalHost.d.ts +6 -0
- package/lib/src/components/SlimAlert/PortalHost.web.d.ts +6 -0
- package/lib/src/components/Video/interface/index.d.ts +0 -2
- package/lib/types/components/Button/Viewable.web.d.ts +3 -0
- package/lib/types/components/Collapse/Item/Item.web.d.ts +7 -0
- package/lib/types/components/SlimAlert/Alert.d.ts +1 -1
- package/lib/types/components/SlimAlert/PortalHost.d.ts +6 -0
- package/lib/types/components/SlimAlert/PortalHost.web.d.ts +6 -0
- package/package.json +9 -5
- package/src/components/ActionSheets/ActionSheets.tsx +0 -1
- package/src/components/ActionablePopover/ActionablePopover.tsx +3 -0
- package/src/components/Alert/Alert.tsx +5 -5
- package/src/components/Button/Viewable.web.tsx +44 -0
- package/src/components/Collapse/Item/Item.web.tsx +150 -0
- package/src/components/DatePicker/interface/index.ts +1 -0
- package/src/components/Image/index.ts +1 -1
- package/src/components/NoticeBar/NoticeBar.tsx +29 -5
- package/src/components/PickerView/PickerView.tsx +1 -1
- package/src/components/PickerView/Wheel.tsx +32 -3
- package/src/components/Popover/Popover.tsx +24 -26
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +4 -12
- package/src/components/Sheets/AnimatedSheets.tsx +7 -3
- package/src/components/SlimAlert/Alert.tsx +9 -7
- package/src/components/SlimAlert/PortalHost.tsx +7 -0
- package/src/components/SlimAlert/PortalHost.web.tsx +11 -0
- package/src/components/Tag/Tag.tsx +7 -3
- package/src/components/TextField/TextField.tsx +19 -8
- package/src/components/TextView/TextView.tsx +15 -3
- package/src/components/Toast/Toast.tsx +2 -2
- package/src/i18n/@types/resources.d.ts +27 -27
- package/src/i18n/index.json +31 -31
- package/tsconfig.dts.json +1 -1
|
@@ -200,6 +200,10 @@ const AnimatedSheets = forwardRef((props: RedsSheets, ref) => {
|
|
|
200
200
|
// 适配底部bottom
|
|
201
201
|
const isIos = Platform.OS === "ios";
|
|
202
202
|
const SAFE_BOTTOM = getSafeAreaInsets().bottom;
|
|
203
|
+
let finalSafeBottom = SAFE_BOTTOM || isIos ? 34 : 20;
|
|
204
|
+
if (Platform.OS === "web") {
|
|
205
|
+
finalSafeBottom = 0;
|
|
206
|
+
}
|
|
203
207
|
// 适配底部bottom
|
|
204
208
|
let calculateHeight = 0;
|
|
205
209
|
if (props.animatedSheetsSize === "fixed") {
|
|
@@ -232,9 +236,7 @@ const AnimatedSheets = forwardRef((props: RedsSheets, ref) => {
|
|
|
232
236
|
childHeightRef.current = calculateHeight;
|
|
233
237
|
}
|
|
234
238
|
setSheetsHeight(
|
|
235
|
-
props.sheetsStyle?.backgroundColor === "transparent"
|
|
236
|
-
? calculateHeight
|
|
237
|
-
: calculateHeight + (SAFE_BOTTOM || (isIos ? 34 : 20)),
|
|
239
|
+
props.sheetsStyle?.backgroundColor === "transparent" ? calculateHeight : calculateHeight + finalSafeBottom,
|
|
238
240
|
);
|
|
239
241
|
}, [actionHeight, labelHeight, childHeight, props.animatedSheetsSize, props.autoSize, size, screenHeight]);
|
|
240
242
|
|
|
@@ -416,6 +418,8 @@ const AnimatedSheets = forwardRef((props: RedsSheets, ref) => {
|
|
|
416
418
|
},
|
|
417
419
|
{ zIndex: props.zIndex },
|
|
418
420
|
props.sheetsStyle,
|
|
421
|
+
// @ts-expect-error
|
|
422
|
+
Platform.OS === "web" ? { position: "fixed", bottom: 0, left: 0, right: 0 } : {},
|
|
419
423
|
]}
|
|
420
424
|
>
|
|
421
425
|
{props.header ? <View onLayout={handleLabelLayout}>{props.header}</View> : <></>}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useMemo } from "react";
|
|
2
|
-
import { View, TouchableWithoutFeedback, Animated } from "react-native";
|
|
2
|
+
import { View, TouchableWithoutFeedback, Animated, ViewStyle } from "react-native";
|
|
3
3
|
import { RedsAlert, AlertDefaultProps } from "./interface";
|
|
4
|
-
import
|
|
4
|
+
import PortalHost from "./PortalHost";
|
|
5
5
|
import { style } from "./styles";
|
|
6
6
|
import useMounted from "../../pvCount/useUnmountedProcess";
|
|
7
7
|
|
|
8
|
-
const Alert
|
|
8
|
+
const Alert = (props: RedsAlert) => {
|
|
9
9
|
const finalProps = { ...AlertDefaultProps, ...props };
|
|
10
|
-
const { show, onOpen, onClose, mask
|
|
10
|
+
const { show, onOpen, onClose, mask } = finalProps;
|
|
11
11
|
|
|
12
12
|
const styles = style(props);
|
|
13
13
|
|
|
@@ -40,16 +40,18 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
40
40
|
});
|
|
41
41
|
}, [props.children]);
|
|
42
42
|
useMounted("Alert");
|
|
43
|
+
|
|
43
44
|
return show ? (
|
|
44
|
-
<
|
|
45
|
+
<PortalHost hostName={props.hostName}>
|
|
45
46
|
{mask && (
|
|
46
47
|
<TouchableWithoutFeedback>
|
|
47
|
-
<View style={styles.modalOverlay} />
|
|
48
|
+
<View style={[styles.modalOverlay, { position: props.hostName ? "absolute" : "fixed" } as ViewStyle]} />
|
|
48
49
|
</TouchableWithoutFeedback>
|
|
49
50
|
)}
|
|
50
51
|
<Animated.View
|
|
51
52
|
style={[
|
|
52
53
|
styles.centeredView,
|
|
54
|
+
{ position: props.hostName ? "absolute" : "fixed" } as ViewStyle,
|
|
53
55
|
{
|
|
54
56
|
transform: [
|
|
55
57
|
{
|
|
@@ -67,7 +69,7 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
67
69
|
{footer}
|
|
68
70
|
</View>
|
|
69
71
|
</Animated.View>
|
|
70
|
-
</
|
|
72
|
+
</PortalHost>
|
|
71
73
|
) : null;
|
|
72
74
|
};
|
|
73
75
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Portal } from "../Portal";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
|
|
4
|
+
const PortalHost = ({ children, hostName }: { children: React.ReactNode; hostName: string }) => {
|
|
5
|
+
if (hostName) {
|
|
6
|
+
return <Portal hostName={hostName}>{children}</Portal>;
|
|
7
|
+
}
|
|
8
|
+
return createPortal(children, document.body);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default PortalHost;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useMemo, useImperativeHandle, forwardRef, memo, FunctionComponent } from "react";
|
|
2
|
-
import { View, Text, StyleSheet, GestureResponderEvent, TouchableNativeFeedback } from "react-native";
|
|
2
|
+
import { View, Text, StyleSheet, GestureResponderEvent, TouchableNativeFeedback, Platform } from "react-native";
|
|
3
3
|
import { RedsTag, TagDefaultProps } from "./interface";
|
|
4
4
|
import { lightColor, typography, alwaysColor } from "@xhs/reds-token-next";
|
|
5
5
|
import { useThemeColor } from "../ConfigProvider";
|
|
@@ -81,6 +81,8 @@ const getSizeStyles = (icon: any, afterIcon: any, size: string) => {
|
|
|
81
81
|
return sizeStyles[size || "medium"];
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
+
const TouchableStyles = Platform.OS === "web" ? { border: "none" } : {};
|
|
85
|
+
|
|
84
86
|
const getTextSizeStyles = (icon: any, afterIcon: any, size: string) => {
|
|
85
87
|
const sizeStyles = {
|
|
86
88
|
mini: {
|
|
@@ -197,7 +199,8 @@ const Tag: FunctionComponent<RedsTag> = memo(
|
|
|
197
199
|
|
|
198
200
|
return (
|
|
199
201
|
<View style={[styles.tag, tagStyle, props.style]}>
|
|
200
|
-
|
|
202
|
+
{/* @ts-expect-error */}
|
|
203
|
+
<TouchableNativeFeedback disabled={disabled} onPress={onClick} style={TouchableStyles}>
|
|
201
204
|
<View style={{ flexDirection: "row", alignItems: "center" }}>
|
|
202
205
|
{icon && (
|
|
203
206
|
<View style={{ marginRight: 3, flexDirection: "row", alignItems: "center", height: "100%" }}>{icon}</View>
|
|
@@ -217,7 +220,8 @@ const Tag: FunctionComponent<RedsTag> = memo(
|
|
|
217
220
|
</View>
|
|
218
221
|
</TouchableNativeFeedback>
|
|
219
222
|
{closeabled && (
|
|
220
|
-
|
|
223
|
+
// @ts-expect-error
|
|
224
|
+
<TouchableNativeFeedback onPress={handleClose} style={{ marginLeft: 3 }} style={TouchableStyles}>
|
|
221
225
|
{closeIcon}
|
|
222
226
|
</TouchableNativeFeedback>
|
|
223
227
|
)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useMemo, useEffect, useCallback, forwardRef, useImperativeHandle } from "react";
|
|
2
|
-
import { View, TextInput, Text, ColorValue } from "react-native";
|
|
2
|
+
import { View, TextInput, Text, ColorValue, TextStyle } from "react-native";
|
|
3
3
|
import { RedsTextField, TextFieldDefaultProps } from "./interface";
|
|
4
4
|
import createStyles from "./styles";
|
|
5
5
|
import runes from "runes";
|
|
@@ -122,7 +122,10 @@ const TextField = forwardRef(
|
|
|
122
122
|
}, [modelValue, isControl]);
|
|
123
123
|
|
|
124
124
|
useEffect(() => {
|
|
125
|
-
|
|
125
|
+
const newShowClear = clearable && focused && value.length > 0;
|
|
126
|
+
if (newShowClear !== showClear) {
|
|
127
|
+
setShowClear(newShowClear);
|
|
128
|
+
}
|
|
126
129
|
}, [clearable, focused, value]);
|
|
127
130
|
|
|
128
131
|
const CloseClear = useMemo(() => {
|
|
@@ -137,6 +140,18 @@ const TextField = forwardRef(
|
|
|
137
140
|
textInputRef: inputRef,
|
|
138
141
|
}));
|
|
139
142
|
|
|
143
|
+
const ClearIcon = useMemo(() => {
|
|
144
|
+
return (
|
|
145
|
+
<View
|
|
146
|
+
style={[styles.rightItem, { display: showClear ? "flex" : "none" }]}
|
|
147
|
+
testID="clear-icon"
|
|
148
|
+
{...clearAccessibility}
|
|
149
|
+
>
|
|
150
|
+
<Icon icon={CloseClear} onClick={handleClear} size={20} type={IconType.iconType?.image} />
|
|
151
|
+
</View>
|
|
152
|
+
);
|
|
153
|
+
}, [showClear, handleClear, clearAccessibility]);
|
|
154
|
+
|
|
140
155
|
return (
|
|
141
156
|
<View style={[isFormItem ? {} : styles.wrapper, style]}>
|
|
142
157
|
<View style={[styles.container, styles.centerItem]}>
|
|
@@ -145,7 +160,7 @@ const TextField = forwardRef(
|
|
|
145
160
|
<TextInput
|
|
146
161
|
testID="text-input"
|
|
147
162
|
ref={inputRef}
|
|
148
|
-
style={[styles.input, inputStyle]}
|
|
163
|
+
style={[styles.input, inputStyle, { outline: "none" } as TextStyle]}
|
|
149
164
|
value={value}
|
|
150
165
|
autoFocus={autofocus}
|
|
151
166
|
onChangeText={updateValue}
|
|
@@ -176,11 +191,7 @@ const TextField = forwardRef(
|
|
|
176
191
|
</Text>
|
|
177
192
|
)}
|
|
178
193
|
</View>
|
|
179
|
-
{
|
|
180
|
-
<View style={styles.rightItem} testID="clear-icon" {...clearAccessibility}>
|
|
181
|
-
<Icon icon={CloseClear} onClick={handleClear} size={20} type={IconType.iconType?.image} />
|
|
182
|
-
</View>
|
|
183
|
-
)}
|
|
194
|
+
{ClearIcon}
|
|
184
195
|
{showCount && maxLength && (
|
|
185
196
|
<View style={styles.rightItem}>
|
|
186
197
|
<Text style={[styles.count, maxLengthStyle]}>{`${runes(value).length}/${maxLength}`}</Text>
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useCallback, useMemo, forwardRef, useImperativeHandle } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
TextInput,
|
|
4
|
+
View,
|
|
5
|
+
Text,
|
|
6
|
+
TouchableWithoutFeedback,
|
|
7
|
+
ColorValue,
|
|
8
|
+
Keyboard,
|
|
9
|
+
Platform,
|
|
10
|
+
TextStyle,
|
|
11
|
+
} from "react-native";
|
|
3
12
|
import { TextViewDefaultProps, RedsTextView } from "./interface";
|
|
4
13
|
import createStyles from "./styles";
|
|
5
14
|
import runes from "runes";
|
|
@@ -147,7 +156,7 @@ const TextField = forwardRef((props: RedsTextView, ref) => {
|
|
|
147
156
|
<TextInput
|
|
148
157
|
testID="text-input"
|
|
149
158
|
ref={inputRef}
|
|
150
|
-
style={[styles.input, { minHeight: rows * 24, height: "auto" }, style]}
|
|
159
|
+
style={[styles.input, { minHeight: rows * 24, height: "auto", outline: "none" } as TextStyle, style]}
|
|
151
160
|
value={value}
|
|
152
161
|
onChangeText={handleChangeText}
|
|
153
162
|
onFocus={handleFocus}
|
|
@@ -173,7 +182,10 @@ const TextField = forwardRef((props: RedsTextView, ref) => {
|
|
|
173
182
|
)}
|
|
174
183
|
{showClear && modelValueStringLength && focused && (
|
|
175
184
|
<View style={styles.rightItem}>
|
|
176
|
-
<TouchableWithoutFeedback
|
|
185
|
+
<TouchableWithoutFeedback
|
|
186
|
+
onPress={handleClear}
|
|
187
|
+
onPressOut={Platform.OS === "web" ? handleClear : undefined}
|
|
188
|
+
>
|
|
177
189
|
<View style={styles.clearIconContainer}>
|
|
178
190
|
<Text style={styles.clearIcon}>清空</Text>
|
|
179
191
|
</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo } from "react";
|
|
2
|
-
import { Animated, View, Text } from "react-native";
|
|
2
|
+
import { Animated, View, Text, Platform } from "react-native";
|
|
3
3
|
import { Icon, IconType } from "../Icon/index";
|
|
4
4
|
import Button from "../Button/index";
|
|
5
5
|
import ProgressIndicator from "../ProgressIndicator/index";
|
|
@@ -85,7 +85,7 @@ const ToastContainer = (p: RedsToast) => {
|
|
|
85
85
|
return (
|
|
86
86
|
<Animated.View
|
|
87
87
|
style={[styles.ToastContainer, { opacity: fadeAnim.current }]}
|
|
88
|
-
pointerEvents={mask ? undefined : "none"}
|
|
88
|
+
pointerEvents={mask || Platform.OS === "web" ? undefined : "none"}
|
|
89
89
|
>
|
|
90
90
|
{/** @ts-ignore */}
|
|
91
91
|
<View style={[getContainerStyle(props), { backgroundColor: themeColor.Fill5 }]}>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
interface Resources {
|
|
2
2
|
componentKey: {
|
|
3
|
-
sureKey: "
|
|
4
|
-
satisfyKey: "
|
|
5
|
-
confirmKey: "
|
|
6
|
-
uploadingKey: "
|
|
7
|
-
resetKey: "
|
|
8
|
-
NoDataKey: "
|
|
9
|
-
liveStreamingKey: "
|
|
10
|
-
generallyKey: "
|
|
11
|
-
uploadFailedKey: "
|
|
12
|
-
submitKey: "
|
|
13
|
-
requestSuccessfulKey: "
|
|
14
|
-
cancelKey: "
|
|
15
|
-
PullDownToRefreshKey: "
|
|
16
|
-
selectAllKey: "
|
|
17
|
-
requestDataKey: "
|
|
18
|
-
closeKey: "
|
|
19
|
-
veryBadKey: "
|
|
20
|
-
searchKey: "
|
|
21
|
-
expandKey: "
|
|
22
|
-
IDCardPhotoKey: "
|
|
23
|
-
finishKey: "
|
|
24
|
-
surpriseKey: "
|
|
25
|
-
releaseRefreshKey: "
|
|
26
|
-
nationalEmblemSideOfIDCardKey: "
|
|
27
|
-
buttonKey: "
|
|
28
|
-
jumpKey: "
|
|
29
|
-
disappointmentKey: "
|
|
3
|
+
sureKey: "Confirm";
|
|
4
|
+
satisfyKey: "Satisfy";
|
|
5
|
+
confirmKey: "Confirm";
|
|
6
|
+
uploadingKey: "Uploading";
|
|
7
|
+
resetKey: "Reset";
|
|
8
|
+
NoDataKey: "No data available at the moment";
|
|
9
|
+
liveStreamingKey: "live";
|
|
10
|
+
generallyKey: "Generally";
|
|
11
|
+
uploadFailedKey: "Upload failed";
|
|
12
|
+
submitKey: "Submit";
|
|
13
|
+
requestSuccessfulKey: "Request successful";
|
|
14
|
+
cancelKey: "Cancel";
|
|
15
|
+
PullDownToRefreshKey: "Pull down to refresh";
|
|
16
|
+
selectAllKey: "SelectAll";
|
|
17
|
+
requestDataKey: "Request data";
|
|
18
|
+
closeKey: "Close";
|
|
19
|
+
veryBadKey: "Very bad";
|
|
20
|
+
searchKey: "Search";
|
|
21
|
+
expandKey: "Expand";
|
|
22
|
+
IDCardPhotoKey: "ID card photo";
|
|
23
|
+
finishKey: "Finish";
|
|
24
|
+
surpriseKey: "Surprise";
|
|
25
|
+
releaseRefreshKey: "Release refresh";
|
|
26
|
+
nationalEmblemSideOfIDCardKey: "National emblem side of ID card";
|
|
27
|
+
buttonKey: "Button";
|
|
28
|
+
jumpKey: "Jump";
|
|
29
|
+
disappointmentKey: "Disappointment";
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export default Resources;
|
package/src/i18n/index.json
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"zh_tw": {
|
|
3
|
-
"componentKey": {
|
|
4
|
-
"sureKey": "確定",
|
|
5
|
-
"satisfyKey": "滿意",
|
|
6
|
-
"confirmKey": "確認",
|
|
7
|
-
"uploadingKey": "上傳中",
|
|
8
|
-
"resetKey": "重置",
|
|
9
|
-
"NoDataKey": "暫無數據",
|
|
10
|
-
"liveStreamingKey": "直播",
|
|
11
|
-
"generallyKey": "一般",
|
|
12
|
-
"uploadFailedKey": "上傳失敗",
|
|
13
|
-
"submitKey": "提交",
|
|
14
|
-
"requestSuccessfulKey": "請求成功",
|
|
15
|
-
"cancelKey": "取消",
|
|
16
|
-
"PullDownToRefreshKey": "下拉重繪",
|
|
17
|
-
"selectAllKey": "全選",
|
|
18
|
-
"requestDataKey": "請求數據中",
|
|
19
|
-
"closeKey": "收起",
|
|
20
|
-
"veryBadKey": "極差",
|
|
21
|
-
"searchKey": "蒐索",
|
|
22
|
-
"expandKey": "展開",
|
|
23
|
-
"IDCardPhotoKey": "身份證人像面",
|
|
24
|
-
"finishKey": "完成",
|
|
25
|
-
"surpriseKey": "驚喜",
|
|
26
|
-
"releaseRefreshKey": "鬆開重繪",
|
|
27
|
-
"nationalEmblemSideOfIDCardKey": "身份证国徽面",
|
|
28
|
-
"buttonKey": "按鈕",
|
|
29
|
-
"jumpKey": "跳轉",
|
|
30
|
-
"disappointmentKey": "失望"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
2
|
"en_us": {
|
|
34
3
|
"componentKey": {
|
|
35
4
|
"sureKey": "Confirm",
|
|
@@ -91,5 +60,36 @@
|
|
|
91
60
|
"jumpKey": "跳转",
|
|
92
61
|
"disappointmentKey": "失望"
|
|
93
62
|
}
|
|
63
|
+
},
|
|
64
|
+
"zh_tw": {
|
|
65
|
+
"componentKey": {
|
|
66
|
+
"sureKey": "確定",
|
|
67
|
+
"satisfyKey": "滿意",
|
|
68
|
+
"confirmKey": "確認",
|
|
69
|
+
"uploadingKey": "上傳中",
|
|
70
|
+
"resetKey": "重置",
|
|
71
|
+
"NoDataKey": "暫無數據",
|
|
72
|
+
"liveStreamingKey": "直播",
|
|
73
|
+
"generallyKey": "一般",
|
|
74
|
+
"uploadFailedKey": "上傳失敗",
|
|
75
|
+
"submitKey": "提交",
|
|
76
|
+
"requestSuccessfulKey": "請求成功",
|
|
77
|
+
"cancelKey": "取消",
|
|
78
|
+
"PullDownToRefreshKey": "下拉重繪",
|
|
79
|
+
"selectAllKey": "全選",
|
|
80
|
+
"requestDataKey": "請求數據中",
|
|
81
|
+
"closeKey": "收起",
|
|
82
|
+
"veryBadKey": "極差",
|
|
83
|
+
"searchKey": "蒐索",
|
|
84
|
+
"expandKey": "展開",
|
|
85
|
+
"IDCardPhotoKey": "身份證人像面",
|
|
86
|
+
"finishKey": "完成",
|
|
87
|
+
"surpriseKey": "驚喜",
|
|
88
|
+
"releaseRefreshKey": "鬆開重繪",
|
|
89
|
+
"nationalEmblemSideOfIDCardKey": "身份证国徽面",
|
|
90
|
+
"buttonKey": "按鈕",
|
|
91
|
+
"jumpKey": "跳轉",
|
|
92
|
+
"disappointmentKey": "失望"
|
|
93
|
+
}
|
|
94
94
|
}
|
|
95
95
|
}
|