@momo-kits/foundation 0.81.43-tracking.9 → 0.81.48
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/Application/BottomTab.tsx +0 -1
- package/Application/Components.tsx +12 -18
- package/Application/ModalScreen.tsx +4 -16
- package/Application/NavigationContainer.tsx +9 -28
- package/Application/Navigator.ts +12 -0
- package/Application/StackScreen.tsx +2 -13
- package/Application/types.ts +11 -5
- package/Application/utils.tsx +2 -3
- package/Assets/icon.json +83 -5
- package/Assets/icon_bank.json +506 -0
- package/Button/index.tsx +14 -35
- package/CheckBox/index.tsx +0 -1
- package/Icon/index.tsx +7 -2
- package/Icon/types.ts +1 -1
- package/IconButton/index.tsx +7 -28
- package/Input/Input.tsx +29 -27
- package/Input/InputDropDown.tsx +1 -6
- package/Input/InputMoney.tsx +4 -25
- package/Input/InputOTP.tsx +7 -27
- package/Input/InputSearch.tsx +26 -49
- package/Input/InputTextArea.tsx +1 -5
- package/Input/index.tsx +1 -12
- package/Input/styles.ts +1 -3
- package/Layout/Card.tsx +0 -1
- package/Layout/Item.tsx +0 -1
- package/Layout/Screen.tsx +1 -3
- package/Layout/Section.tsx +0 -1
- package/Pagination/PaginationScroll.tsx +0 -1
- package/Popup/PopupNotify.tsx +0 -1
- package/Popup/PopupPromotion.tsx +1 -1
- package/Radio/index.tsx +0 -1
- package/Skeleton/index.tsx +1 -1
- package/Switch/index.tsx +0 -1
- package/Tag/index.tsx +1 -3
- package/Text/index.tsx +0 -1
- package/package.json +2 -2
- package/publish.sh +1 -1
- package/verify.js +0 -36
package/IconButton/index.tsx
CHANGED
|
@@ -10,10 +10,6 @@ import {Colors} from '../Consts';
|
|
|
10
10
|
import {Icon} from '../Icon';
|
|
11
11
|
import styles from './styles';
|
|
12
12
|
|
|
13
|
-
const {
|
|
14
|
-
ScreenContext,
|
|
15
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
16
|
-
|
|
17
13
|
export interface IconButtonProps extends TouchableOpacityProps {
|
|
18
14
|
/**
|
|
19
15
|
* Represents the name or key of the icon to be displayed on the IconButton.
|
|
@@ -30,10 +26,6 @@ export interface IconButtonProps extends TouchableOpacityProps {
|
|
|
30
26
|
* Optional. Defines the size of the IconButton.
|
|
31
27
|
*/
|
|
32
28
|
size?: 'large' | 'small';
|
|
33
|
-
|
|
34
|
-
params?: any;
|
|
35
|
-
|
|
36
|
-
componentId?: string;
|
|
37
29
|
}
|
|
38
30
|
|
|
39
31
|
const IconButton: React.FC<IconButtonProps> = ({
|
|
@@ -41,12 +33,9 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|
|
41
33
|
icon,
|
|
42
34
|
size,
|
|
43
35
|
onPress,
|
|
44
|
-
params,
|
|
45
|
-
componentId,
|
|
46
36
|
...rest
|
|
47
37
|
}) => {
|
|
48
38
|
const {theme} = useContext(ApplicationContext);
|
|
49
|
-
const screenInfo = useContext<any>(ScreenContext);
|
|
50
39
|
|
|
51
40
|
/**
|
|
52
41
|
* get size icon button
|
|
@@ -132,23 +121,13 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|
|
132
121
|
const iconSize = size === 'small' ? 16 : 24;
|
|
133
122
|
|
|
134
123
|
return (
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
action: 'click',
|
|
143
|
-
}}>
|
|
144
|
-
<TouchableOpacity
|
|
145
|
-
{...rest}
|
|
146
|
-
activeOpacity={activeOpacity}
|
|
147
|
-
onPress={onPressButton}
|
|
148
|
-
style={buttonStyle}>
|
|
149
|
-
<Icon size={iconSize} source={icon} color={getIconColor()} />
|
|
150
|
-
</TouchableOpacity>
|
|
151
|
-
</ScreenContext.Provider>
|
|
124
|
+
<TouchableOpacity
|
|
125
|
+
{...rest}
|
|
126
|
+
activeOpacity={activeOpacity}
|
|
127
|
+
onPress={onPressButton}
|
|
128
|
+
style={buttonStyle}>
|
|
129
|
+
<Icon size={iconSize} source={icon} color={getIconColor()} />
|
|
130
|
+
</TouchableOpacity>
|
|
152
131
|
);
|
|
153
132
|
};
|
|
154
133
|
|
package/Input/Input.tsx
CHANGED
|
@@ -14,10 +14,6 @@ import {Icon} from '../Icon';
|
|
|
14
14
|
import {checkTyping} from './utils';
|
|
15
15
|
import {Loader} from '../Loader';
|
|
16
16
|
|
|
17
|
-
const {
|
|
18
|
-
ScreenContext,
|
|
19
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
20
|
-
|
|
21
17
|
const Input = forwardRef(
|
|
22
18
|
(
|
|
23
19
|
{
|
|
@@ -41,9 +37,8 @@ const Input = forwardRef(
|
|
|
41
37
|
leadingIconColor,
|
|
42
38
|
fontWeight = 'Regular',
|
|
43
39
|
onPressIcon,
|
|
40
|
+
secureTextEntry,
|
|
44
41
|
style,
|
|
45
|
-
params,
|
|
46
|
-
componentId,
|
|
47
42
|
...props
|
|
48
43
|
}: InputProps,
|
|
49
44
|
ref,
|
|
@@ -51,9 +46,8 @@ const Input = forwardRef(
|
|
|
51
46
|
const {theme} = useContext(ApplicationContext);
|
|
52
47
|
const [focused, setFocused] = useState(false);
|
|
53
48
|
const [haveValue, setHaveValue] = useState(!!value || !!props.defaultValue);
|
|
49
|
+
const [secureTextInput, setSecureTextInput] = useState(secureTextEntry);
|
|
54
50
|
const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
|
|
55
|
-
const accessibilityLabel = `Input/${floatingValue ?? placeholder}`;
|
|
56
|
-
const screenInfo = useContext<any>(ScreenContext);
|
|
57
51
|
|
|
58
52
|
const onClearText = () => {
|
|
59
53
|
inputRef?.current?.clear();
|
|
@@ -77,11 +71,29 @@ const Input = forwardRef(
|
|
|
77
71
|
|
|
78
72
|
const renderIcon = (color: string | undefined) => {
|
|
79
73
|
if (loading) {
|
|
80
|
-
return <Loader type={'spinner'} color={color} />;
|
|
74
|
+
return <Loader type={'spinner'} color={color} style={styles.icon} />;
|
|
75
|
+
}
|
|
76
|
+
if (secureTextEntry) {
|
|
77
|
+
return (
|
|
78
|
+
<TouchableOpacity
|
|
79
|
+
onPress={() => setSecureTextInput(!secureTextInput)}
|
|
80
|
+
style={styles.icon}>
|
|
81
|
+
<Icon
|
|
82
|
+
color={color}
|
|
83
|
+
size={24}
|
|
84
|
+
source={
|
|
85
|
+
secureTextInput ? '24_security_eye_off' : '24_security_eye_open'
|
|
86
|
+
}
|
|
87
|
+
/>
|
|
88
|
+
</TouchableOpacity>
|
|
89
|
+
);
|
|
81
90
|
}
|
|
82
91
|
if (icon) {
|
|
83
92
|
return (
|
|
84
|
-
<TouchableOpacity
|
|
93
|
+
<TouchableOpacity
|
|
94
|
+
onPress={onPressIcon}
|
|
95
|
+
disabled={!onPressIcon}
|
|
96
|
+
style={styles.icon}>
|
|
85
97
|
<Icon color={color} source={icon} size={24} />
|
|
86
98
|
</TouchableOpacity>
|
|
87
99
|
);
|
|
@@ -90,6 +102,7 @@ const Input = forwardRef(
|
|
|
90
102
|
|
|
91
103
|
const renderInputView = () => {
|
|
92
104
|
const disabledColor = theme.colors.text.disable;
|
|
105
|
+
const secure = secureTextInput && secureTextEntry;
|
|
93
106
|
let textColor = theme.colors.text.default;
|
|
94
107
|
let placeholderColor = theme.colors.text.hint;
|
|
95
108
|
let iconTintColor = iconColor;
|
|
@@ -127,8 +140,8 @@ const Input = forwardRef(
|
|
|
127
140
|
)}
|
|
128
141
|
<TextInput
|
|
129
142
|
{...props}
|
|
130
|
-
accessibilityLabel={accessibilityLabel}
|
|
131
143
|
editable={!disabled}
|
|
144
|
+
secureTextEntry={secure}
|
|
132
145
|
textAlignVertical="center"
|
|
133
146
|
ref={inputRef}
|
|
134
147
|
style={[
|
|
@@ -137,6 +150,7 @@ const Input = forwardRef(
|
|
|
137
150
|
color: textColor,
|
|
138
151
|
fontFamily: `${theme.font}-${fontWeight}`,
|
|
139
152
|
},
|
|
153
|
+
secure && haveValue && {fontSize: size === 'small' ? 18 : 22},
|
|
140
154
|
]}
|
|
141
155
|
textBreakStrategy="highQuality"
|
|
142
156
|
value={value}
|
|
@@ -167,22 +181,10 @@ const Input = forwardRef(
|
|
|
167
181
|
};
|
|
168
182
|
|
|
169
183
|
return (
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
params,
|
|
175
|
-
state: disabled ? 'disabled' : 'enabled',
|
|
176
|
-
componentId,
|
|
177
|
-
action: 'focus',
|
|
178
|
-
}}>
|
|
179
|
-
<View
|
|
180
|
-
style={[style, styles.wrapper]}
|
|
181
|
-
accessibilityLabel={accessibilityLabel}>
|
|
182
|
-
{renderInputView()}
|
|
183
|
-
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
184
|
-
</View>
|
|
185
|
-
</ScreenContext.Provider>
|
|
184
|
+
<View style={[style, styles.wrapper]}>
|
|
185
|
+
{renderInputView()}
|
|
186
|
+
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
187
|
+
</View>
|
|
186
188
|
);
|
|
187
189
|
},
|
|
188
190
|
);
|
package/Input/InputDropDown.tsx
CHANGED
|
@@ -30,7 +30,6 @@ const InputDropDown = ({
|
|
|
30
30
|
}: InputDropDownProps) => {
|
|
31
31
|
const {theme} = useContext(ApplicationContext);
|
|
32
32
|
const full = !!value || !!placeholder;
|
|
33
|
-
const accessibilityLabel = `InputDropDown/${floatingValue ?? placeholder}`;
|
|
34
33
|
|
|
35
34
|
const renderIcon = (color: string | undefined) => {
|
|
36
35
|
if (loading) {
|
|
@@ -82,7 +81,6 @@ const InputDropDown = ({
|
|
|
82
81
|
<TextInput
|
|
83
82
|
{...props}
|
|
84
83
|
onPressIn={onPress}
|
|
85
|
-
accessibilityLabel={accessibilityLabel}
|
|
86
84
|
editable={false}
|
|
87
85
|
textAlignVertical="top"
|
|
88
86
|
style={[
|
|
@@ -106,10 +104,7 @@ const InputDropDown = ({
|
|
|
106
104
|
};
|
|
107
105
|
|
|
108
106
|
return (
|
|
109
|
-
<TouchableOpacity
|
|
110
|
-
onPress={onPress}
|
|
111
|
-
style={[style, full && styles.wrapper]}
|
|
112
|
-
accessibilityLabel={accessibilityLabel}>
|
|
107
|
+
<TouchableOpacity onPress={onPress} style={[style, full && styles.wrapper]}>
|
|
113
108
|
{renderInputView()}
|
|
114
109
|
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
115
110
|
</TouchableOpacity>
|
package/Input/InputMoney.tsx
CHANGED
|
@@ -19,10 +19,6 @@ import {InputMoneyProps} from './index';
|
|
|
19
19
|
import {Icon} from '../Icon';
|
|
20
20
|
import {formatMoneyToNumber, formatNumberToMoney} from './utils';
|
|
21
21
|
|
|
22
|
-
const {
|
|
23
|
-
ScreenContext,
|
|
24
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
25
|
-
|
|
26
22
|
const InputMoney = forwardRef(
|
|
27
23
|
(
|
|
28
24
|
{
|
|
@@ -40,9 +36,7 @@ const InputMoney = forwardRef(
|
|
|
40
36
|
required = false,
|
|
41
37
|
errorSpacing,
|
|
42
38
|
style,
|
|
43
|
-
params,
|
|
44
39
|
defaultValue = '',
|
|
45
|
-
componentId,
|
|
46
40
|
...props
|
|
47
41
|
}: InputMoneyProps,
|
|
48
42
|
ref,
|
|
@@ -50,8 +44,6 @@ const InputMoney = forwardRef(
|
|
|
50
44
|
const {theme} = useContext(ApplicationContext);
|
|
51
45
|
const [focused, setFocused] = useState(false);
|
|
52
46
|
const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
|
|
53
|
-
const accessibilityLabel = `InputMoney/${floatingValue}`;
|
|
54
|
-
const screenInfo = useContext<any>(ScreenContext);
|
|
55
47
|
|
|
56
48
|
const validateText = (text: string) => {
|
|
57
49
|
const valueFormat = formatMoneyToNumber(text, 'đ');
|
|
@@ -122,7 +114,6 @@ const InputMoney = forwardRef(
|
|
|
122
114
|
<View style={styles.inputView}>
|
|
123
115
|
<TextInput
|
|
124
116
|
{...props}
|
|
125
|
-
accessibilityLabel={accessibilityLabel}
|
|
126
117
|
editable={!disabled}
|
|
127
118
|
textAlignVertical="top"
|
|
128
119
|
ref={inputRef}
|
|
@@ -161,22 +152,10 @@ const InputMoney = forwardRef(
|
|
|
161
152
|
};
|
|
162
153
|
|
|
163
154
|
return (
|
|
164
|
-
<
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
params,
|
|
169
|
-
state: 'enable',
|
|
170
|
-
componentId,
|
|
171
|
-
action: 'focus',
|
|
172
|
-
}}>
|
|
173
|
-
<View
|
|
174
|
-
style={[style, styles.wrapper]}
|
|
175
|
-
accessibilityLabel={accessibilityLabel}>
|
|
176
|
-
{renderInputView()}
|
|
177
|
-
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
178
|
-
</View>
|
|
179
|
-
</ScreenContext.Provider>
|
|
155
|
+
<View style={[style, styles.wrapper]}>
|
|
156
|
+
{renderInputView()}
|
|
157
|
+
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
158
|
+
</View>
|
|
180
159
|
);
|
|
181
160
|
},
|
|
182
161
|
);
|
package/Input/InputOTP.tsx
CHANGED
|
@@ -22,10 +22,6 @@ import {ErrorView, getBorderColor} from './common';
|
|
|
22
22
|
import {ApplicationContext} from '../Application';
|
|
23
23
|
import {Spacing} from '../Consts';
|
|
24
24
|
|
|
25
|
-
const {
|
|
26
|
-
ScreenContext,
|
|
27
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
28
|
-
|
|
29
25
|
const OTPCaret: FC<CaretProps> = ({index, length}) => {
|
|
30
26
|
const DURATION = 300;
|
|
31
27
|
const {theme} = useContext(ApplicationContext);
|
|
@@ -82,9 +78,7 @@ const InputOTP = forwardRef(
|
|
|
82
78
|
onFocus,
|
|
83
79
|
onBlur,
|
|
84
80
|
dataType = 'number',
|
|
85
|
-
params,
|
|
86
81
|
style,
|
|
87
|
-
componentId,
|
|
88
82
|
...props
|
|
89
83
|
}: InputOTPProps,
|
|
90
84
|
ref,
|
|
@@ -94,8 +88,6 @@ const InputOTP = forwardRef(
|
|
|
94
88
|
const [focused, setFocused] = useState(false);
|
|
95
89
|
const inputRef = useRef<TextInput>(null);
|
|
96
90
|
const {theme} = useContext(ApplicationContext);
|
|
97
|
-
const accessibilityLabel = `InputOTP/${floatingValue ?? placeholder}`;
|
|
98
|
-
const screenInfo = useContext<any>(ScreenContext);
|
|
99
91
|
|
|
100
92
|
useImperativeHandle(ref, () => ({
|
|
101
93
|
onChangeText: (text: string) => {
|
|
@@ -213,7 +205,6 @@ const InputOTP = forwardRef(
|
|
|
213
205
|
<View style={styles.inputView}>
|
|
214
206
|
<TextInput
|
|
215
207
|
{...props}
|
|
216
|
-
accessibilityLabel={accessibilityLabel}
|
|
217
208
|
ref={inputRef}
|
|
218
209
|
value={value}
|
|
219
210
|
onChangeText={_onChangeText}
|
|
@@ -230,24 +221,13 @@ const InputOTP = forwardRef(
|
|
|
230
221
|
};
|
|
231
222
|
|
|
232
223
|
return (
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
action: 'focus',
|
|
241
|
-
}}>
|
|
242
|
-
<TouchableOpacity
|
|
243
|
-
activeOpacity={1}
|
|
244
|
-
onPress={onFocusInput}
|
|
245
|
-
style={[style, styles.otpWrapper]}
|
|
246
|
-
accessibilityLabel={accessibilityLabel}>
|
|
247
|
-
{renderInputView()}
|
|
248
|
-
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
249
|
-
</TouchableOpacity>
|
|
250
|
-
</ScreenContext.Provider>
|
|
224
|
+
<TouchableOpacity
|
|
225
|
+
activeOpacity={1}
|
|
226
|
+
onPress={onFocusInput}
|
|
227
|
+
style={[style, styles.otpWrapper]}>
|
|
228
|
+
{renderInputView()}
|
|
229
|
+
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
230
|
+
</TouchableOpacity>
|
|
251
231
|
);
|
|
252
232
|
},
|
|
253
233
|
);
|
package/Input/InputSearch.tsx
CHANGED
|
@@ -13,10 +13,6 @@ import {Icon} from '../Icon';
|
|
|
13
13
|
import {Text} from '../Text';
|
|
14
14
|
import {checkTyping} from './utils';
|
|
15
15
|
|
|
16
|
-
const {
|
|
17
|
-
ScreenContext,
|
|
18
|
-
} = require('react-native/Libraries/Components/ScreenContext');
|
|
19
|
-
|
|
20
16
|
const InputSearch = forwardRef(
|
|
21
17
|
(
|
|
22
18
|
{
|
|
@@ -29,12 +25,10 @@ const InputSearch = forwardRef(
|
|
|
29
25
|
icon,
|
|
30
26
|
buttonText = 'Hủy',
|
|
31
27
|
showButtonText = true,
|
|
32
|
-
showBorder = true,
|
|
33
28
|
style,
|
|
34
29
|
defaultValue,
|
|
35
30
|
onPressButtonText,
|
|
36
|
-
|
|
37
|
-
componentId,
|
|
31
|
+
hasColorBG = true,
|
|
38
32
|
...props
|
|
39
33
|
}: InputSearchProps,
|
|
40
34
|
ref,
|
|
@@ -43,8 +37,6 @@ const InputSearch = forwardRef(
|
|
|
43
37
|
const [focused, setFocused] = useState(false);
|
|
44
38
|
const [haveValue, setHaveValue] = useState(!!value || !!defaultValue);
|
|
45
39
|
const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
|
|
46
|
-
const accessibilityLabel = `InputMoney/${placeholder}`;
|
|
47
|
-
const screenInfo = useContext<any>(ScreenContext);
|
|
48
40
|
|
|
49
41
|
const _onFocus = (e: NativeSyntheticEvent<TextInputFocusEventData>) => {
|
|
50
42
|
setFocused(true);
|
|
@@ -70,7 +62,6 @@ const InputSearch = forwardRef(
|
|
|
70
62
|
return (
|
|
71
63
|
<TextInput
|
|
72
64
|
{...props}
|
|
73
|
-
accessibilityLabel={accessibilityLabel}
|
|
74
65
|
textAlignVertical="center"
|
|
75
66
|
ref={inputRef}
|
|
76
67
|
style={[
|
|
@@ -125,48 +116,34 @@ const InputSearch = forwardRef(
|
|
|
125
116
|
</View>
|
|
126
117
|
);
|
|
127
118
|
};
|
|
119
|
+
|
|
120
|
+
const backgroundColor = hasColorBG ? theme.colors.background.default : theme.colors.background.surface
|
|
121
|
+
|
|
128
122
|
return (
|
|
129
|
-
<
|
|
130
|
-
value={{
|
|
131
|
-
...screenInfo,
|
|
132
|
-
componentName: 'InputSearch',
|
|
133
|
-
params,
|
|
134
|
-
state: 'enabled',
|
|
135
|
-
componentId,
|
|
136
|
-
action: 'focus',
|
|
137
|
-
}}>
|
|
123
|
+
<View style={[style, styles.searchInputContainer]}>
|
|
138
124
|
<View
|
|
139
|
-
style={[
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
source={'navigation_search'}
|
|
153
|
-
size={24}
|
|
154
|
-
color={theme.colors.text.hint}
|
|
155
|
-
/>
|
|
156
|
-
{renderInputView()}
|
|
157
|
-
{renderIconView()}
|
|
158
|
-
</View>
|
|
159
|
-
{showButtonText && (
|
|
160
|
-
<TouchableOpacity onPress={onPressButtonText}>
|
|
161
|
-
<Text
|
|
162
|
-
typography={'action_default_bold'}
|
|
163
|
-
style={styles.textButton}>
|
|
164
|
-
{buttonText}
|
|
165
|
-
</Text>
|
|
166
|
-
</TouchableOpacity>
|
|
167
|
-
)}
|
|
125
|
+
style={[
|
|
126
|
+
styles.searchInputWrapper,
|
|
127
|
+
{
|
|
128
|
+
backgroundColor,
|
|
129
|
+
}
|
|
130
|
+
]}>
|
|
131
|
+
<Icon
|
|
132
|
+
source={'navigation_search'}
|
|
133
|
+
size={24}
|
|
134
|
+
color={theme.colors.text.hint}
|
|
135
|
+
/>
|
|
136
|
+
{renderInputView()}
|
|
137
|
+
{renderIconView()}
|
|
168
138
|
</View>
|
|
169
|
-
|
|
139
|
+
{showButtonText && (
|
|
140
|
+
<TouchableOpacity onPress={onPressButtonText}>
|
|
141
|
+
<Text typography={'action_default_bold'} style={styles.textButton}>
|
|
142
|
+
{buttonText}
|
|
143
|
+
</Text>
|
|
144
|
+
</TouchableOpacity>
|
|
145
|
+
)}
|
|
146
|
+
</View>
|
|
170
147
|
);
|
|
171
148
|
},
|
|
172
149
|
);
|
package/Input/InputTextArea.tsx
CHANGED
|
@@ -46,7 +46,6 @@ const InputTextArea = forwardRef(
|
|
|
46
46
|
const [focused, setFocused] = useState(false);
|
|
47
47
|
const [inputValue, setInputValue] = useState(defaultValue ?? '');
|
|
48
48
|
const inputRef = (ref as React.RefObject<TextInput>) ?? useRef<TextInput>();
|
|
49
|
-
const accessibilityLabel = `InputTextArea/${floatingValue ?? placeholder}`;
|
|
50
49
|
|
|
51
50
|
const onClearText = () => {
|
|
52
51
|
inputRef?.current?.clear();
|
|
@@ -110,7 +109,6 @@ const InputTextArea = forwardRef(
|
|
|
110
109
|
<View style={styles.textAreaView}>
|
|
111
110
|
<TextInput
|
|
112
111
|
{...props}
|
|
113
|
-
accessibilityLabel={accessibilityLabel}
|
|
114
112
|
ref={inputRef}
|
|
115
113
|
editable={!disabled}
|
|
116
114
|
textAlignVertical="top"
|
|
@@ -150,9 +148,7 @@ const InputTextArea = forwardRef(
|
|
|
150
148
|
};
|
|
151
149
|
|
|
152
150
|
return (
|
|
153
|
-
<View
|
|
154
|
-
style={[style, styles.wrapper]}
|
|
155
|
-
accessibilityLabel={accessibilityLabel}>
|
|
151
|
+
<View style={[style, styles.wrapper]}>
|
|
156
152
|
{renderInputView()}
|
|
157
153
|
<ErrorView errorMessage={errorMessage} errorSpacing={errorSpacing} />
|
|
158
154
|
</View>
|
package/Input/index.tsx
CHANGED
|
@@ -80,9 +80,6 @@ export interface InputProps extends TextInputProps {
|
|
|
80
80
|
fontWeight?: 'Regular' | 'Bold';
|
|
81
81
|
|
|
82
82
|
onPressIcon?: () => void;
|
|
83
|
-
|
|
84
|
-
params?: any;
|
|
85
|
-
componentId?: string;
|
|
86
83
|
}
|
|
87
84
|
|
|
88
85
|
type InputPropsWithoutSizeAndIcon = Omit<
|
|
@@ -112,12 +109,6 @@ export interface InputSearchProps extends TextInputProps {
|
|
|
112
109
|
*/
|
|
113
110
|
showButtonText?: boolean;
|
|
114
111
|
|
|
115
|
-
/**
|
|
116
|
-
* Optional. If `true`, a border will be displayed around the InputSearch component.
|
|
117
|
-
* Defaults to `true` if not provided.
|
|
118
|
-
*/
|
|
119
|
-
showBorder?: boolean;
|
|
120
|
-
|
|
121
112
|
onPressButtonText?: () => void;
|
|
122
113
|
|
|
123
114
|
/**
|
|
@@ -130,9 +121,7 @@ export interface InputSearchProps extends TextInputProps {
|
|
|
130
121
|
*/
|
|
131
122
|
icon?: string;
|
|
132
123
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
componentId?: string;
|
|
124
|
+
hasColorBG?: boolean
|
|
136
125
|
}
|
|
137
126
|
|
|
138
127
|
export interface InputMoneyProps extends InputPropsWithoutPlaceholder {}
|
package/Input/styles.ts
CHANGED
|
@@ -53,8 +53,7 @@ export default StyleSheet.create({
|
|
|
53
53
|
marginRight: Spacing.M,
|
|
54
54
|
},
|
|
55
55
|
icon: {
|
|
56
|
-
|
|
57
|
-
height: 24,
|
|
56
|
+
marginLeft: Spacing.S
|
|
58
57
|
},
|
|
59
58
|
iconWrapper: {
|
|
60
59
|
width: 24,
|
|
@@ -101,7 +100,6 @@ export default StyleSheet.create({
|
|
|
101
100
|
searchInputWrapper: {
|
|
102
101
|
flexDirection: 'row',
|
|
103
102
|
borderRadius: Radius.XL,
|
|
104
|
-
borderWidth: 1,
|
|
105
103
|
paddingHorizontal: Spacing.S,
|
|
106
104
|
alignItems: 'center',
|
|
107
105
|
flex: 1,
|
package/Layout/Card.tsx
CHANGED
package/Layout/Item.tsx
CHANGED
package/Layout/Screen.tsx
CHANGED
|
@@ -301,9 +301,7 @@ const Screen = forwardRef(
|
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
return (
|
|
304
|
-
<View
|
|
305
|
-
style={[Styles.flex, {backgroundColor}]}
|
|
306
|
-
accessibilityLabel={`ScreenContainer`}>
|
|
304
|
+
<View style={[Styles.flex, {backgroundColor}]}>
|
|
307
305
|
{!!headerBackground && (
|
|
308
306
|
<>
|
|
309
307
|
<Image
|
package/Layout/Section.tsx
CHANGED
package/Popup/PopupNotify.tsx
CHANGED
package/Popup/PopupPromotion.tsx
CHANGED
package/Radio/index.tsx
CHANGED
package/Skeleton/index.tsx
CHANGED
|
@@ -41,7 +41,7 @@ const Skeleton: React.FC<SkeletonTypes> = ({style}) => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
return (
|
|
44
|
-
<View style={[styles.container, style]}
|
|
44
|
+
<View style={[styles.container, style]}>
|
|
45
45
|
<View
|
|
46
46
|
onLayout={e => onLayout(e.nativeEvent.layout.width)}
|
|
47
47
|
style={[Styles.flex, {backgroundColor: PRIMARY_COLOR}]}>
|
package/Switch/index.tsx
CHANGED
package/Tag/index.tsx
CHANGED
|
@@ -60,9 +60,7 @@ const Tag: FC<TagProps> = ({
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
|
-
<View
|
|
64
|
-
style={[style, sizeStyle, {backgroundColor: tagColor}]}
|
|
65
|
-
accessibilityLabel={`Tag/${label}`}>
|
|
63
|
+
<View style={[style, sizeStyle, {backgroundColor: tagColor}]}>
|
|
66
64
|
{!!icon && (
|
|
67
65
|
<Icon
|
|
68
66
|
style={styles.icon}
|
package/Text/index.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/foundation",
|
|
3
|
-
"version": "0.81.
|
|
3
|
+
"version": "0.81.48",
|
|
4
4
|
"description": "React Native Component Kits",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
},
|
|
44
44
|
"author": "@momo-kits/foundation",
|
|
45
45
|
"license": "ISC"
|
|
46
|
-
}
|
|
46
|
+
}
|
package/publish.sh
CHANGED
|
@@ -13,7 +13,7 @@ echo VERSION: $VERSION
|
|
|
13
13
|
rsync -r --verbose --exclude '*.mdx' --exclude '*Demo.js' --exclude 'props-type.js' --exclude 'prop-types.js' ./* dist
|
|
14
14
|
|
|
15
15
|
cd dist
|
|
16
|
-
npm publish --tag
|
|
16
|
+
npm publish --tag beta --access=public
|
|
17
17
|
|
|
18
18
|
#clear dist and package json
|
|
19
19
|
cd ..
|