@xhsreds/reds-rn-next 0.11.1-beta202601151410 → 0.11.1-beta202601191704
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-0.json +1 -1
- package/coverage/.tmp/coverage-1.json +1 -1
- 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-17.json +1 -1
- package/coverage/.tmp/coverage-18.json +1 -1
- package/coverage/.tmp/coverage-19.json +1 -1
- package/coverage/.tmp/coverage-2.json +1 -1
- package/coverage/.tmp/coverage-20.json +1 -1
- package/coverage/.tmp/coverage-21.json +1 -1
- package/coverage/.tmp/coverage-29.json +1 -1
- package/coverage/.tmp/coverage-30.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/{B6BxX_sn.js → D9vEt_Qk.js} +3 -2
- package/lib/cjs/_chunks/D9vEt_Qk.js.map +1 -0
- package/lib/cjs/components/Alert/Alert.js +7 -7
- package/lib/cjs/components/Alert/Alert.js.map +1 -1
- package/lib/cjs/components/Alert/hooks/alert.js +1 -1
- package/lib/cjs/components/Alert/index.js +1 -1
- package/lib/cjs/components/Alert/interface/index.js +1 -1
- package/lib/cjs/components/Alert/styles.js +13 -55
- package/lib/cjs/components/Alert/styles.js.map +1 -1
- package/lib/cjs/components/Image/queryCacheBatcher.js +1 -2
- package/lib/cjs/components/Image/queryCacheBatcher.js.map +1 -1
- package/lib/cjs/components/Radio/Radio.js +1 -1
- package/lib/cjs/components/Radio/index.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/esm/_chunks/{BP2FxtYY.js → CNx6YBDL.js} +3 -2
- package/lib/esm/_chunks/CNx6YBDL.js.map +1 -0
- package/lib/esm/components/Alert/Alert.js +7 -7
- package/lib/esm/components/Alert/Alert.js.map +1 -1
- package/lib/esm/components/Alert/hooks/alert.js +1 -1
- package/lib/esm/components/Alert/index.js +1 -1
- package/lib/esm/components/Alert/interface/index.js +1 -1
- package/lib/esm/components/Alert/styles.js +13 -55
- package/lib/esm/components/Alert/styles.js.map +1 -1
- package/lib/esm/components/Image/queryCacheBatcher.js +1 -2
- package/lib/esm/components/Image/queryCacheBatcher.js.map +1 -1
- package/lib/esm/components/Radio/Radio.js +1 -1
- package/lib/esm/components/Radio/index.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/src/components/Alert/interface/index.d.ts +2 -0
- package/lib/src/components/Alert/styles.d.ts +11 -43
- package/lib/types/components/Alert/interface/index.d.ts +2 -0
- package/lib/types/components/Alert/styles.d.ts +11 -43
- package/package.json +2 -2
- package/src/components/Alert/Alert.tsx +7 -78
- package/src/components/Alert/doc/index.mdx +1 -0
- package/src/components/Alert/interface/index.ts +2 -0
- package/src/components/Alert/styles.ts +12 -49
- package/src/components/Image/queryCacheBatcher.ts +1 -1
- package/src/i18n/@types/resources.d.ts +18 -18
- package/src/i18n/index.json +31 -31
- package/lib/cjs/_chunks/B6BxX_sn.js.map +0 -1
- package/lib/esm/_chunks/BP2FxtYY.js.map +0 -1
|
@@ -67,7 +67,7 @@ import '../Picker/Picker.js';
|
|
|
67
67
|
import '../../_chunks/3fnqPSWW.js';
|
|
68
68
|
import '../Picker/api.js';
|
|
69
69
|
import '../Alert/Alert.js';
|
|
70
|
-
import '../../_chunks/
|
|
70
|
+
import '../../_chunks/CNx6YBDL.js';
|
|
71
71
|
import '../Alert/hooks/alert.js';
|
|
72
72
|
import '../FAB/FAB.js';
|
|
73
73
|
import '../../_chunks/D22mAc_y.js';
|
|
@@ -129,7 +129,7 @@ import '../Sheets/api.js';
|
|
|
129
129
|
import '../../_chunks/DcCfwG0m.js';
|
|
130
130
|
import '../Picker/api.js';
|
|
131
131
|
import '../Alert/Alert.js';
|
|
132
|
-
import '../../_chunks/
|
|
132
|
+
import '../../_chunks/CNx6YBDL.js';
|
|
133
133
|
import '../Alert/styles.js';
|
|
134
134
|
import '../Alert/hooks/alert.js';
|
|
135
135
|
import '../FAB/FAB.js';
|
package/lib/esm/index.js
CHANGED
|
@@ -61,7 +61,7 @@ export { default as Picker } from './components/Picker/Picker.js';
|
|
|
61
61
|
export { i as PickerType } from './_chunks/3fnqPSWW.js';
|
|
62
62
|
export { usePicker } from './components/Picker/api.js';
|
|
63
63
|
export { default as Alert } from './components/Alert/Alert.js';
|
|
64
|
-
export { i as AlertType } from './_chunks/
|
|
64
|
+
export { i as AlertType } from './_chunks/CNx6YBDL.js';
|
|
65
65
|
export { default as alert } from './components/Alert/hooks/alert.js';
|
|
66
66
|
export { default as FAB } from './components/FAB/FAB.js';
|
|
67
67
|
export { i as FABType } from './_chunks/D22mAc_y.js';
|
|
@@ -34,6 +34,7 @@ export interface RedsAlert {
|
|
|
34
34
|
cancelBtnTextStyle?: TextStyle;
|
|
35
35
|
confirmBtnProps?: any;
|
|
36
36
|
cancelBtnProps?: any;
|
|
37
|
+
style?: any;
|
|
37
38
|
}
|
|
38
39
|
export interface RedsAlertEvent {
|
|
39
40
|
}
|
|
@@ -58,5 +59,6 @@ export declare const AlertDefaultProps: {
|
|
|
58
59
|
cancelBtnTextStyle: {};
|
|
59
60
|
confirmBtnProps: {};
|
|
60
61
|
cancelBtnProps: {};
|
|
62
|
+
style: {};
|
|
61
63
|
};
|
|
62
64
|
export {};
|
|
@@ -60,66 +60,34 @@ export declare const style: (props: RedsAlert) => {
|
|
|
60
60
|
justifyContent: "space-between";
|
|
61
61
|
paddingTop: number;
|
|
62
62
|
};
|
|
63
|
-
footerText: {
|
|
64
|
-
borderTopWidth: number;
|
|
65
|
-
borderTopColor: string;
|
|
66
|
-
paddingBottom: number;
|
|
67
|
-
paddingTop: number;
|
|
68
|
-
paddingHorizontal: number;
|
|
69
|
-
};
|
|
70
63
|
footerHorizontal: {
|
|
71
64
|
flexDirection: "row";
|
|
65
|
+
paddingBottom: number;
|
|
72
66
|
paddingHorizontal: number;
|
|
73
|
-
|
|
67
|
+
gap: number;
|
|
74
68
|
};
|
|
75
69
|
footerVertical: {
|
|
76
70
|
flexDirection: "column-reverse";
|
|
77
71
|
alignItems: "center";
|
|
78
72
|
paddingHorizontal: number;
|
|
79
|
-
|
|
80
|
-
cancelButton: {
|
|
81
|
-
flex: number;
|
|
82
|
-
width: number;
|
|
83
|
-
margin: number;
|
|
84
|
-
paddingHorizontal: number;
|
|
85
|
-
};
|
|
86
|
-
button: {
|
|
87
|
-
flex: number;
|
|
88
|
-
width: number;
|
|
89
|
-
margin: number;
|
|
90
|
-
paddingHorizontal: number;
|
|
73
|
+
height: number;
|
|
91
74
|
};
|
|
92
75
|
dividerBox: {
|
|
93
76
|
marginTop: number;
|
|
94
77
|
};
|
|
95
|
-
|
|
78
|
+
cancelButton: {
|
|
96
79
|
flex: number;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
paddingHorizontal: number;
|
|
101
|
-
};
|
|
102
|
-
confirmButtonText: {
|
|
103
|
-
fontSize: any;
|
|
80
|
+
height: number;
|
|
81
|
+
alignItems: "center" | "flex-start";
|
|
82
|
+
paddingTop: number;
|
|
104
83
|
};
|
|
105
|
-
|
|
84
|
+
confirmButton: {
|
|
106
85
|
flex: number;
|
|
107
86
|
width: "100%";
|
|
108
|
-
|
|
109
|
-
marginLeft: number;
|
|
110
|
-
marginTop: number;
|
|
111
|
-
marginBottom: number;
|
|
112
|
-
paddingHorizontal: number;
|
|
87
|
+
height: number;
|
|
113
88
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
height?: number;
|
|
117
|
-
marginTop: number;
|
|
118
|
-
marginBottom: number;
|
|
119
|
-
flex: number;
|
|
120
|
-
width: "100%";
|
|
121
|
-
margin: number;
|
|
122
|
-
marginLeft: number;
|
|
89
|
+
confirmButtonText: {
|
|
90
|
+
fontSize: any;
|
|
123
91
|
};
|
|
124
92
|
cancelText: {
|
|
125
93
|
color: string;
|
|
@@ -34,6 +34,7 @@ export interface RedsAlert {
|
|
|
34
34
|
cancelBtnTextStyle?: TextStyle;
|
|
35
35
|
confirmBtnProps?: any;
|
|
36
36
|
cancelBtnProps?: any;
|
|
37
|
+
style?: any;
|
|
37
38
|
}
|
|
38
39
|
export interface RedsAlertEvent {
|
|
39
40
|
}
|
|
@@ -58,5 +59,6 @@ export declare const AlertDefaultProps: {
|
|
|
58
59
|
cancelBtnTextStyle: {};
|
|
59
60
|
confirmBtnProps: {};
|
|
60
61
|
cancelBtnProps: {};
|
|
62
|
+
style: {};
|
|
61
63
|
};
|
|
62
64
|
export {};
|
|
@@ -60,66 +60,34 @@ export declare const style: (props: RedsAlert) => {
|
|
|
60
60
|
justifyContent: "space-between";
|
|
61
61
|
paddingTop: number;
|
|
62
62
|
};
|
|
63
|
-
footerText: {
|
|
64
|
-
borderTopWidth: number;
|
|
65
|
-
borderTopColor: string;
|
|
66
|
-
paddingBottom: number;
|
|
67
|
-
paddingTop: number;
|
|
68
|
-
paddingHorizontal: number;
|
|
69
|
-
};
|
|
70
63
|
footerHorizontal: {
|
|
71
64
|
flexDirection: "row";
|
|
65
|
+
paddingBottom: number;
|
|
72
66
|
paddingHorizontal: number;
|
|
73
|
-
|
|
67
|
+
gap: number;
|
|
74
68
|
};
|
|
75
69
|
footerVertical: {
|
|
76
70
|
flexDirection: "column-reverse";
|
|
77
71
|
alignItems: "center";
|
|
78
72
|
paddingHorizontal: number;
|
|
79
|
-
|
|
80
|
-
cancelButton: {
|
|
81
|
-
flex: number;
|
|
82
|
-
width: number;
|
|
83
|
-
margin: number;
|
|
84
|
-
paddingHorizontal: number;
|
|
85
|
-
};
|
|
86
|
-
button: {
|
|
87
|
-
flex: number;
|
|
88
|
-
width: number;
|
|
89
|
-
margin: number;
|
|
90
|
-
paddingHorizontal: number;
|
|
73
|
+
height: number;
|
|
91
74
|
};
|
|
92
75
|
dividerBox: {
|
|
93
76
|
marginTop: number;
|
|
94
77
|
};
|
|
95
|
-
|
|
78
|
+
cancelButton: {
|
|
96
79
|
flex: number;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
paddingHorizontal: number;
|
|
101
|
-
};
|
|
102
|
-
confirmButtonText: {
|
|
103
|
-
fontSize: any;
|
|
80
|
+
height: number;
|
|
81
|
+
alignItems: "center" | "flex-start";
|
|
82
|
+
paddingTop: number;
|
|
104
83
|
};
|
|
105
|
-
|
|
84
|
+
confirmButton: {
|
|
106
85
|
flex: number;
|
|
107
86
|
width: "100%";
|
|
108
|
-
|
|
109
|
-
marginLeft: number;
|
|
110
|
-
marginTop: number;
|
|
111
|
-
marginBottom: number;
|
|
112
|
-
paddingHorizontal: number;
|
|
87
|
+
height: number;
|
|
113
88
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
height?: number | undefined;
|
|
117
|
-
marginTop: number;
|
|
118
|
-
marginBottom: number;
|
|
119
|
-
flex: number;
|
|
120
|
-
width: "100%";
|
|
121
|
-
margin: number;
|
|
122
|
-
marginLeft: number;
|
|
89
|
+
confirmButtonText: {
|
|
90
|
+
fontSize: any;
|
|
123
91
|
};
|
|
124
92
|
cancelText: {
|
|
125
93
|
color: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xhsreds/reds-rn-next",
|
|
3
|
-
"version": "0.11.1-
|
|
3
|
+
"version": "0.11.1-beta202601191704",
|
|
4
4
|
"author": "贾斌(呀哈) <jiabin@xiaohongshu.com>",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"dependencies": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-native-svg": "13.14.0",
|
|
28
28
|
"@xhs/react-native-harmony": "*",
|
|
29
29
|
"@xhs/reds-components": "*",
|
|
30
|
-
"@xhsreds/reds-token-next": "0.11.1-
|
|
30
|
+
"@xhsreds/reds-token-next": "0.11.1-beta202601191704"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
"ozone-schema-web": {
|
|
@@ -19,77 +19,6 @@ import { Portal } from "../Portal";
|
|
|
19
19
|
import { style } from "./styles";
|
|
20
20
|
import useMounted from "../../pvCount/useUnmountedProcess";
|
|
21
21
|
import { useLanguage } from "../LanguageProvider";
|
|
22
|
-
// const AlertView: React.FC<RedsAlert> = (props) => {
|
|
23
|
-
// const finalProps = { ...AlertDefaultProps, ...props };
|
|
24
|
-
// const {
|
|
25
|
-
// show,
|
|
26
|
-
// title,
|
|
27
|
-
// message,
|
|
28
|
-
// confirmText,
|
|
29
|
-
// cancelText,
|
|
30
|
-
// onConfirm,
|
|
31
|
-
// onCancel,
|
|
32
|
-
// onOpen,
|
|
33
|
-
// onClose,
|
|
34
|
-
// align,
|
|
35
|
-
// // showScrollOverlay,
|
|
36
|
-
// footerLayout,
|
|
37
|
-
// showConfirmButton,
|
|
38
|
-
// showCancelButton,
|
|
39
|
-
// mask,
|
|
40
|
-
// footerType,
|
|
41
|
-
// header,
|
|
42
|
-
// footer,
|
|
43
|
-
// children,
|
|
44
|
-
// onMask,
|
|
45
|
-
// confirmBtnStyle,
|
|
46
|
-
// } = finalProps;
|
|
47
|
-
// const themeColor = useThemeColor("Alert");
|
|
48
|
-
// const cancelKey = useLanguage("componentKey", "cancelKey");
|
|
49
|
-
// const confirmKey = useLanguage("componentKey", "confirmKey");
|
|
50
|
-
// const styles = style(props);
|
|
51
|
-
// // const [hasScrollToBottom, setHasScrollToBottom] = useState(true);
|
|
52
|
-
// const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
53
|
-
|
|
54
|
-
// useEffect(() => {
|
|
55
|
-
// if (show && onOpen) onOpen();
|
|
56
|
-
// if (!show && onClose) onClose();
|
|
57
|
-
// }, [show]);
|
|
58
|
-
|
|
59
|
-
// const handleConfirm = (e: GestureResponderEvent) => {
|
|
60
|
-
// if (onConfirm) onConfirm(e);
|
|
61
|
-
// };
|
|
62
|
-
|
|
63
|
-
// const handleCancel = (e: GestureResponderEvent) => {
|
|
64
|
-
// if (onCancel) onCancel(e);
|
|
65
|
-
// };
|
|
66
|
-
// return show ? (
|
|
67
|
-
// <>
|
|
68
|
-
// <Animated.View
|
|
69
|
-
// style={[
|
|
70
|
-
// styles.centeredView,
|
|
71
|
-
// {
|
|
72
|
-
// transform: [
|
|
73
|
-
// {
|
|
74
|
-
// scale: fadeAnim.interpolate({
|
|
75
|
-
// inputRange: [0, 1],
|
|
76
|
-
// outputRange: [1, 1],
|
|
77
|
-
// }),
|
|
78
|
-
// },
|
|
79
|
-
// ],
|
|
80
|
-
// },
|
|
81
|
-
// ]}
|
|
82
|
-
// >
|
|
83
|
-
// {mask && (
|
|
84
|
-
// <TouchableOpacity onPress={() => { console.log('onMask xxxx')}} activeOpacity={1}>
|
|
85
|
-
// <View style={styles.modalOverlay} />
|
|
86
|
-
// </TouchableOpacity>
|
|
87
|
-
// )}
|
|
88
|
-
|
|
89
|
-
// </Animated.View>
|
|
90
|
-
// </>
|
|
91
|
-
// ) : null;
|
|
92
|
-
// };
|
|
93
22
|
|
|
94
23
|
const Alert: React.FC<RedsAlert> = (props) => {
|
|
95
24
|
const finalProps = { ...AlertDefaultProps, ...props };
|
|
@@ -143,6 +72,7 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
143
72
|
if (onCancel) onCancel(e);
|
|
144
73
|
};
|
|
145
74
|
useMounted("Alert");
|
|
75
|
+
|
|
146
76
|
return show ? (
|
|
147
77
|
<Portal hostName={hostName}>
|
|
148
78
|
<View style={styles.centeredView}>
|
|
@@ -165,7 +95,7 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
165
95
|
},
|
|
166
96
|
]}
|
|
167
97
|
>
|
|
168
|
-
<View style={[styles.alertContainer, { top: props.offset?.y || 0, left: props.offset?.x || 0 }]}>
|
|
98
|
+
<View style={[styles.alertContainer, props.style, { top: props.offset?.y || 0, left: props.offset?.x || 0 }]}>
|
|
169
99
|
{header}
|
|
170
100
|
<View style={[styles.alertContent, props.contentStyle]}>
|
|
171
101
|
<Text style={styles.title}>{title}</Text>
|
|
@@ -189,7 +119,7 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
189
119
|
style={[
|
|
190
120
|
styles.footer,
|
|
191
121
|
footerLayout === "vertical" ? styles.footerVertical : styles.footerHorizontal,
|
|
192
|
-
footerType === "text" && styles.footerText,
|
|
122
|
+
// footerType === "text" && styles.footerText,
|
|
193
123
|
props.footerStyle,
|
|
194
124
|
]}
|
|
195
125
|
>
|
|
@@ -198,7 +128,7 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
198
128
|
variant={footerType === "text" ? "text" : "outline"}
|
|
199
129
|
onClick={handleCancel}
|
|
200
130
|
style={{
|
|
201
|
-
...
|
|
131
|
+
...styles.cancelButton,
|
|
202
132
|
...cancelBtnStyle,
|
|
203
133
|
}}
|
|
204
134
|
size={footerType === "text" ? (footerLayout === "vertical" ? "medium" : "large") : "medium"}
|
|
@@ -212,10 +142,10 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
212
142
|
showCancelButton &&
|
|
213
143
|
(footerLayout === "vertical" ? (
|
|
214
144
|
// @ts-ignore
|
|
215
|
-
<View
|
|
145
|
+
<View style={styles.horizontalLine} />
|
|
216
146
|
) : (
|
|
217
147
|
// @ts-ignore
|
|
218
|
-
<View
|
|
148
|
+
<View style={styles.verticalLine} />
|
|
219
149
|
))}
|
|
220
150
|
{showConfirmButton && (
|
|
221
151
|
<Button
|
|
@@ -223,8 +153,7 @@ const Alert: React.FC<RedsAlert> = (props) => {
|
|
|
223
153
|
variant={footerType === "text" ? "text" : "fill"}
|
|
224
154
|
onClick={handleConfirm}
|
|
225
155
|
style={{
|
|
226
|
-
...
|
|
227
|
-
...(footerLayout === "vertical" ? styles.verButton : styles.confirmButton),
|
|
156
|
+
...styles.confirmButton,
|
|
228
157
|
...confirmBtnStyle,
|
|
229
158
|
}}
|
|
230
159
|
textStyle={[styles.confirmButtonText, confirmBtnTextStyle]}
|
|
@@ -36,6 +36,7 @@ import BaseDemo from "!!raw-loader!../demo/index.tsx";
|
|
|
36
36
|
| cancelBtnTextStyle | cancelBtnTextStyle | TextStyle | `{}` |
|
|
37
37
|
| confirmBtnProps | confirmBtnProps | any | `{}` |
|
|
38
38
|
| cancelBtnProps | cancelBtnProps | any | `{}` |
|
|
39
|
+
| style | style | any | `{}` |
|
|
39
40
|
|
|
40
41
|
### Events
|
|
41
42
|
|
|
@@ -35,6 +35,7 @@ export interface RedsAlert {
|
|
|
35
35
|
cancelBtnTextStyle?: TextStyle;
|
|
36
36
|
confirmBtnProps?: any;
|
|
37
37
|
cancelBtnProps?: any;
|
|
38
|
+
style?: any;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export interface RedsAlertEvent {}
|
|
@@ -56,4 +57,5 @@ export const AlertDefaultProps = {
|
|
|
56
57
|
cancelBtnTextStyle: {},
|
|
57
58
|
confirmBtnProps: {},
|
|
58
59
|
cancelBtnProps: {},
|
|
60
|
+
style: {},
|
|
59
61
|
};
|
|
@@ -64,77 +64,40 @@ export const style = (props: RedsAlert) => {
|
|
|
64
64
|
},
|
|
65
65
|
footer: {
|
|
66
66
|
width: "100%",
|
|
67
|
-
// height: 48,
|
|
68
67
|
flexDirection: "row",
|
|
69
68
|
justifyContent: "space-between",
|
|
70
69
|
paddingTop: 0,
|
|
71
70
|
},
|
|
72
|
-
footerText: {
|
|
73
|
-
borderTopWidth: 0.5,
|
|
74
|
-
borderTopColor: themeColor.Fill2,
|
|
75
|
-
paddingBottom: props.footerLayout === "vertical" ? 0 : 6,
|
|
76
|
-
paddingTop: props.footerLayout === "vertical" ? 0 : 6,
|
|
77
|
-
paddingHorizontal: props.footerLayout === "vertical" ? 0 : 12,
|
|
78
|
-
},
|
|
79
71
|
footerHorizontal: {
|
|
80
72
|
flexDirection: "row",
|
|
73
|
+
paddingBottom: props.footerType === "text" ? 0 : 20,
|
|
81
74
|
paddingHorizontal: 20,
|
|
82
|
-
|
|
75
|
+
gap: 12,
|
|
83
76
|
},
|
|
84
77
|
footerVertical: {
|
|
85
78
|
flexDirection: "column-reverse",
|
|
86
79
|
alignItems: "center",
|
|
87
|
-
// height: 100,
|
|
88
80
|
paddingHorizontal: 20,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
flex: 1,
|
|
92
|
-
width: 109,
|
|
93
|
-
margin: 0,
|
|
94
|
-
paddingHorizontal: 0,
|
|
95
|
-
// height: 36,
|
|
96
|
-
},
|
|
97
|
-
button: {
|
|
98
|
-
flex: 1,
|
|
99
|
-
width: 109,
|
|
100
|
-
margin: 0,
|
|
101
|
-
paddingHorizontal: 0,
|
|
102
|
-
// height: 36,
|
|
81
|
+
height:
|
|
82
|
+
props.showCancelButton && props.showConfirmButton ? (props.cancelBtnProps.variant === "text" ? 82 : 100) : 56,
|
|
103
83
|
},
|
|
104
84
|
dividerBox: {
|
|
105
85
|
marginTop: 5,
|
|
106
86
|
},
|
|
87
|
+
cancelButton: {
|
|
88
|
+
flex: 1,
|
|
89
|
+
height: props.cancelBtnProps.variant === "text" ? 34 : props.footerType === "text" ? 52 : 36,
|
|
90
|
+
alignItems: props.cancelBtnProps.variant === "text" ? "flex-start" : "center",
|
|
91
|
+
paddingTop: props.cancelBtnProps.variant === "text" ? 12 : 0,
|
|
92
|
+
},
|
|
107
93
|
confirmButton: {
|
|
108
94
|
flex: 1,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
width: 109,
|
|
112
|
-
// height: 36,
|
|
113
|
-
paddingHorizontal: 20,
|
|
95
|
+
width: "100%",
|
|
96
|
+
height: props.footerType === "text" ? 52 : 36,
|
|
114
97
|
},
|
|
115
98
|
confirmButtonText: {
|
|
116
99
|
fontSize: props.footerType === "text" ? typography.T2FontSize : typography.T3FontSize,
|
|
117
100
|
},
|
|
118
|
-
verButton: {
|
|
119
|
-
flex: 0,
|
|
120
|
-
width: "100%",
|
|
121
|
-
margin: 0,
|
|
122
|
-
marginLeft: props.footerLayout === "vertical" ? 0 : 10,
|
|
123
|
-
marginTop: props.footerType === "text" ? 7 : props.footerLayout === "vertical" ? 7 : 10,
|
|
124
|
-
marginBottom: props.footerLayout === "vertical" ? 7 : 0,
|
|
125
|
-
// height: 36,
|
|
126
|
-
paddingHorizontal: 20,
|
|
127
|
-
},
|
|
128
|
-
verCancelButton: {
|
|
129
|
-
flex: 0,
|
|
130
|
-
width: "100%",
|
|
131
|
-
margin: 0,
|
|
132
|
-
marginLeft: props.footerLayout === "vertical" ? 0 : 10,
|
|
133
|
-
marginTop: props.footerType === "text" ? 7 : props.footerLayout === "vertical" ? 7 : 10,
|
|
134
|
-
marginBottom: props.footerLayout === "vertical" ? 7 : 0,
|
|
135
|
-
...(props.cancelBtnProps.variant === "text" ? { height: 20, marginTop: 0, marginBottom: 14 } : {}),
|
|
136
|
-
paddingHorizontal: 20,
|
|
137
|
-
},
|
|
138
101
|
cancelText: {
|
|
139
102
|
color: themeColor.Description,
|
|
140
103
|
fontSize:
|
|
@@ -5,7 +5,7 @@ declare const global: any;
|
|
|
5
5
|
type Resolver = (value: boolean) => void;
|
|
6
6
|
|
|
7
7
|
// Runtime switch: set global.REDS_IMAGE_QUERYCACHE_BATCHING_ENABLED = false to disable batching
|
|
8
|
-
let enabled: boolean =
|
|
8
|
+
let enabled: boolean = false;
|
|
9
9
|
let FLUSH_MS = 50;
|
|
10
10
|
|
|
11
11
|
const pending = new Map<string, Resolver[]>();
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
interface Resources {
|
|
2
2
|
componentKey: {
|
|
3
|
-
sureKey: "
|
|
4
|
-
satisfyKey: "
|
|
5
|
-
confirmKey: "
|
|
6
|
-
uploadingKey: "
|
|
3
|
+
sureKey: "确定";
|
|
4
|
+
satisfyKey: "满意";
|
|
5
|
+
confirmKey: "确认";
|
|
6
|
+
uploadingKey: "上传中";
|
|
7
7
|
resetKey: "重置";
|
|
8
|
-
NoDataKey: "
|
|
8
|
+
NoDataKey: "暂无数据";
|
|
9
9
|
liveStreamingKey: "直播";
|
|
10
10
|
generallyKey: "一般";
|
|
11
|
-
uploadFailedKey: "
|
|
11
|
+
uploadFailedKey: "上传失败";
|
|
12
12
|
submitKey: "提交";
|
|
13
|
-
requestSuccessfulKey: "
|
|
13
|
+
requestSuccessfulKey: "请求成功";
|
|
14
14
|
cancelKey: "取消";
|
|
15
|
-
PullDownToRefreshKey: "
|
|
16
|
-
selectAllKey: "
|
|
17
|
-
requestDataKey: "
|
|
15
|
+
PullDownToRefreshKey: "下拉刷新";
|
|
16
|
+
selectAllKey: "全选";
|
|
17
|
+
requestDataKey: "请求数据中";
|
|
18
18
|
closeKey: "收起";
|
|
19
|
-
veryBadKey: "
|
|
20
|
-
searchKey: "
|
|
21
|
-
expandKey: "
|
|
22
|
-
IDCardPhotoKey: "
|
|
19
|
+
veryBadKey: "极差";
|
|
20
|
+
searchKey: "搜索";
|
|
21
|
+
expandKey: "展开";
|
|
22
|
+
IDCardPhotoKey: "身份证人像面";
|
|
23
23
|
finishKey: "完成";
|
|
24
|
-
surpriseKey: "
|
|
25
|
-
releaseRefreshKey: "
|
|
24
|
+
surpriseKey: "惊喜";
|
|
25
|
+
releaseRefreshKey: "松开刷新";
|
|
26
26
|
nationalEmblemSideOfIDCardKey: "身份证国徽面";
|
|
27
|
-
buttonKey: "
|
|
28
|
-
jumpKey: "
|
|
27
|
+
buttonKey: "按钮";
|
|
28
|
+
jumpKey: "跳转";
|
|
29
29
|
disappointmentKey: "失望";
|
|
30
30
|
};
|
|
31
31
|
}
|
package/src/i18n/index.json
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
+
"zh_cn": {
|
|
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
|
+
},
|
|
2
33
|
"zh_tw": {
|
|
3
34
|
"componentKey": {
|
|
4
35
|
"sureKey": "確定",
|
|
@@ -60,36 +91,5 @@
|
|
|
60
91
|
"jumpKey": "Jump",
|
|
61
92
|
"disappointmentKey": "Disappointment"
|
|
62
93
|
}
|
|
63
|
-
},
|
|
64
|
-
"zh_cn": {
|
|
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
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"B6BxX_sn.js","sources":["../../../src/components/Alert/interface/index.ts"],"sourcesContent":["import { GestureResponderEvent, ViewStyle, TextStyle } from \"react-native\";\nimport { lightColor } from \"@xhsreds/reds-token-next\";\n\ninterface AlertOffset {\n x: number;\n y: number;\n}\nexport interface RedsAlert {\n show?: boolean;\n title?: string;\n message?: string;\n align?: \"left\" | \"center\" | string;\n footerLayout?: \"horizontal\" | \"vertical\" | string;\n showConfirmButton?: boolean;\n showCancelButton?: boolean;\n confirmText?: string;\n cancelText?: string;\n mask?: boolean;\n footerType?: \"text\" | \"button\" | string;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n header?: React.ReactNode;\n onConfirm?: (value: GestureResponderEvent) => void;\n onCancel?: (value: GestureResponderEvent) => void;\n onOpen?: () => void;\n onClose?: () => void;\n onMask?: (value: GestureResponderEvent) => void;\n contentStyle?: ViewStyle;\n cancelBtnStyle?: ViewStyle;\n confirmBtnStyle?: ViewStyle;\n footerStyle?: ViewStyle;\n offset?: AlertOffset;\n hostName?: string;\n confirmBtnTextStyle?: TextStyle;\n cancelBtnTextStyle?: TextStyle;\n confirmBtnProps?: any;\n cancelBtnProps?: any;\n}\n\nexport interface RedsAlertEvent {}\nexport const AlertDefaultProps = {\n show: false,\n align: \"center\",\n footerLayout: \"horizontal\",\n showConfirmButton: true,\n showCancelButton: true,\n mask: true,\n footerType: \"button\",\n contentStyle: {},\n cancelBtnStyle: {},\n confirmBtnStyle: {},\n footerStyle: {},\n offset: { x: 0, y: 0 },\n hostName: \"root\",\n confirmBtnTextStyle: {},\n cancelBtnTextStyle: {},\n confirmBtnProps: {},\n cancelBtnProps: {},\n};\n"],"names":["AlertDefaultProps","show","align","footerLayout","showConfirmButton","showCancelButton","mask","footerType","contentStyle","cancelBtnStyle","confirmBtnStyle","footerStyle","offset","x","y","hostName","confirmBtnTextStyle","cancelBtnTextStyle","confirmBtnProps","cancelBtnProps"],"mappings":";;AAwCO,IAAMA,iBAAoB,GAAA;AAC/BC,EAAAA,IAAM,EAAA,KAAA;AACNC,EAAAA,KAAO,EAAA,QAAA;AACPC,EAAAA,YAAc,EAAA,YAAA;AACdC,EAAAA,iBAAmB,EAAA,IAAA;AACnBC,EAAAA,gBAAkB,EAAA,IAAA;AAClBC,EAAAA,IAAM,EAAA,IAAA;AACNC,EAAAA,UAAY,EAAA,QAAA;EACZC,cAAc,EAAC;EACfC,gBAAgB,EAAC;EACjBC,iBAAiB,EAAC;EAClBC,aAAa,EAAC;AACdC,EAAAA,MAAQ,EAAA;AAAEC,IAAAA,CAAG,EAAA,CAAA;AAAGC,IAAAA,GAAG,CAAA;GAAE;AACrBC,EAAAA,QAAU,EAAA,MAAA;EACVC,qBAAqB,EAAC;EACtBC,oBAAoB,EAAC;EACrBC,iBAAiB,EAAC;AAClBC,EAAAA,gBAAgB,EAAC;AACnB;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BP2FxtYY.js","sources":["../../../src/components/Alert/interface/index.ts"],"sourcesContent":["import { GestureResponderEvent, ViewStyle, TextStyle } from \"react-native\";\nimport { lightColor } from \"@xhsreds/reds-token-next\";\n\ninterface AlertOffset {\n x: number;\n y: number;\n}\nexport interface RedsAlert {\n show?: boolean;\n title?: string;\n message?: string;\n align?: \"left\" | \"center\" | string;\n footerLayout?: \"horizontal\" | \"vertical\" | string;\n showConfirmButton?: boolean;\n showCancelButton?: boolean;\n confirmText?: string;\n cancelText?: string;\n mask?: boolean;\n footerType?: \"text\" | \"button\" | string;\n children?: React.ReactNode;\n footer?: React.ReactNode;\n header?: React.ReactNode;\n onConfirm?: (value: GestureResponderEvent) => void;\n onCancel?: (value: GestureResponderEvent) => void;\n onOpen?: () => void;\n onClose?: () => void;\n onMask?: (value: GestureResponderEvent) => void;\n contentStyle?: ViewStyle;\n cancelBtnStyle?: ViewStyle;\n confirmBtnStyle?: ViewStyle;\n footerStyle?: ViewStyle;\n offset?: AlertOffset;\n hostName?: string;\n confirmBtnTextStyle?: TextStyle;\n cancelBtnTextStyle?: TextStyle;\n confirmBtnProps?: any;\n cancelBtnProps?: any;\n}\n\nexport interface RedsAlertEvent {}\nexport const AlertDefaultProps = {\n show: false,\n align: \"center\",\n footerLayout: \"horizontal\",\n showConfirmButton: true,\n showCancelButton: true,\n mask: true,\n footerType: \"button\",\n contentStyle: {},\n cancelBtnStyle: {},\n confirmBtnStyle: {},\n footerStyle: {},\n offset: { x: 0, y: 0 },\n hostName: \"root\",\n confirmBtnTextStyle: {},\n cancelBtnTextStyle: {},\n confirmBtnProps: {},\n cancelBtnProps: {},\n};\n"],"names":["AlertDefaultProps","show","align","footerLayout","showConfirmButton","showCancelButton","mask","footerType","contentStyle","cancelBtnStyle","confirmBtnStyle","footerStyle","offset","x","y","hostName","confirmBtnTextStyle","cancelBtnTextStyle","confirmBtnProps","cancelBtnProps"],"mappings":"AAwCO,IAAMA,iBAAoB,GAAA;AAC/BC,EAAAA,IAAM,EAAA,KAAA;AACNC,EAAAA,KAAO,EAAA,QAAA;AACPC,EAAAA,YAAc,EAAA,YAAA;AACdC,EAAAA,iBAAmB,EAAA,IAAA;AACnBC,EAAAA,gBAAkB,EAAA,IAAA;AAClBC,EAAAA,IAAM,EAAA,IAAA;AACNC,EAAAA,UAAY,EAAA,QAAA;EACZC,cAAc,EAAC;EACfC,gBAAgB,EAAC;EACjBC,iBAAiB,EAAC;EAClBC,aAAa,EAAC;AACdC,EAAAA,MAAQ,EAAA;AAAEC,IAAAA,CAAG,EAAA,CAAA;AAAGC,IAAAA,GAAG,CAAA;GAAE;AACrBC,EAAAA,QAAU,EAAA,MAAA;EACVC,qBAAqB,EAAC;EACtBC,oBAAoB,EAAC;EACrBC,iBAAiB,EAAC;AAClBC,EAAAA,gBAAgB,EAAC;AACnB;;;;;;;;;"}
|