@momo-kits/foundation 0.79.4 → 0.79.6-beta.1

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.
@@ -0,0 +1,200 @@
1
+ {
2
+ "vi": {
3
+ "seeMore": "Xem thêm",
4
+ "cancel": "Huỷ",
5
+ "done": "Xong",
6
+ "confirm": "Xác nhận",
7
+ "month": "tháng",
8
+ "day": "ngày",
9
+ "choose": "Chọn",
10
+ "sent": "Đã gửi",
11
+ "received": "Đã tiếp nhận",
12
+ "processing": "Đang xử lý",
13
+ "processed": "Đã xử lý",
14
+ "addImg": "Thêm hình",
15
+ "chooseBtn": "Chọn button",
16
+ "imgEg": "Hình ảnh tham khảo",
17
+ "filter": "Sắp xếp",
18
+ "shipping": "Đang giao hàng",
19
+ "men": "Nam",
20
+ "women": "Nữ",
21
+ "more": "Khác",
22
+ "expDate": "Ngày hết hạn",
23
+ "exp": "HSD",
24
+ "inActive": "Chưa kích hoạt",
25
+ "voucherRemindHour": "Hết hạn sau {hours} giờ",
26
+ "voucherRemindMinute": "Hết hạn sau {minutes} phút",
27
+ "voucherRemindSecond": "Hết hạn sau {seconds} giây",
28
+ "voucherRemindDay": "Hết hạn sau {days} ngày",
29
+ "chooseRoundtrip": "Chọn vé khứ hồi",
30
+ "depart": "Ngày đi",
31
+ "return": "Ngày về",
32
+ "departing": "Đi",
33
+ "returning": "Về",
34
+ "jan": "Tháng 1",
35
+ "feb": "Tháng 2",
36
+ "mar": "Tháng 3",
37
+ "apr": "Tháng 4",
38
+ "may": "Tháng 5",
39
+ "jun": "Tháng 6",
40
+ "jul": "Tháng 7",
41
+ "aug": "Tháng 8",
42
+ "sep": "Tháng 9",
43
+ "oct": "Tháng 10",
44
+ "nov": "Tháng 11",
45
+ "dec": "Tháng 12",
46
+ "mon": "T2",
47
+ "tue": "T3",
48
+ "wed": "T4",
49
+ "thu": "T5",
50
+ "fri": "T6",
51
+ "sat": "T7",
52
+ "sun": "CN",
53
+ "showLunar": "Hiển thị lịch âm",
54
+ "newYear": "Tết Dương lịch",
55
+ "valentine": "Ngày Lễ Tình nhân",
56
+ "womenDay": "Ngày Quốc tế Phụ nữ",
57
+ "liberationDay": "Ngày giải phóng Miền Nam thống nhất đất nước",
58
+ "laborDay": "Ngày Quốc tế Lao động",
59
+ "childrenDay": "Ngày Quốc tế Thiếu nhi",
60
+ "nationalDay": "Quốc khánh nước CHXHCN Việt Nam",
61
+ "womenDayVN": "Ngày Phụ nữ Việt Nam",
62
+ "teacherDay": "Ngày Nhà giáo Việt Nam",
63
+ "christmasEve": "Ngày Lễ Giáng Sinh",
64
+ "christmas": "Ngày Lễ Giáng Sinh",
65
+ "lunarNewYear": "Tết Nguyên Đán",
66
+ "hungKingDay": "Giỗ Tổ Hùng Vương",
67
+ "balance": "Số dư trong ví",
68
+ "chooseDate": "Chọn ngày tháng năm",
69
+ "year": "năm",
70
+ "hour": "giờ",
71
+ "minute": "phút",
72
+ "from": "Từ",
73
+ "to": "Đến",
74
+ "connected": "Đã kết nối",
75
+ "disconnected": "Mất kết nối",
76
+ "hide": "Ẩn",
77
+ "viewAllTitle": "Xem tất cả",
78
+ "headerTitle": "Lịch sử thanh toán",
79
+ "SHORTEN": "THU GỌN",
80
+ "viewMoreBank": "XEM THÊM (${otherItemCount} ngân hàng)",
81
+ "transaction_success": "Thành công",
82
+ "transaction_fail": "Thất bại",
83
+ "transaction_processing": "Đang xử lý",
84
+ "viewMore": "Xem thêm",
85
+ "shorten": "Thu gọn",
86
+ "Payment": "Thanh toán ${serviceName}",
87
+ "currencyUnit": "đ",
88
+ "Month": "Tháng",
89
+ "save": "Lưu",
90
+ "favoriteIn": "Thêm dịch vụ yêu thích",
91
+ "favoriteOut": "Xóa dịch vụ yêu thích",
92
+ "deviceIn": "Thêm vào thiết bị",
93
+ "setting": "Cài đặt",
94
+ "transaction": "Lịch sử giao dịch",
95
+ "share": "Chia sẽ dịch vụ",
96
+ "information": "Thông tin chung",
97
+ "tutorial": "Hướng dẫn sử dụng",
98
+ "question": "Câu hỏi thường gặp",
99
+ "support": "Trung tâm hỗ trợ"
100
+ },
101
+ "en": {
102
+ "seeMore": "See more",
103
+ "cancel": "Cancel",
104
+ "done": "Done",
105
+ "confirm": "Confirm",
106
+ "month": "month",
107
+ "day": "day",
108
+ "choose": "Choose",
109
+ "sent": "Sent",
110
+ "received": "Received",
111
+ "processing": "Processing",
112
+ "processed": "Done",
113
+ "addImg": "Add image",
114
+ "chooseBtn": "Choose button",
115
+ "imgEg": "Example images",
116
+ "filter": "Filter",
117
+ "shipping": "Shipping",
118
+ "men": "Men",
119
+ "women": "Women",
120
+ "more": "More",
121
+ "expDate": "Expiration date",
122
+ "exp": "EXP",
123
+ "inActive": "Not Activated",
124
+ "voucherRemindHour": "Revoke after {hours} hours",
125
+ "voucherRemindMinute": "Revoke after {minutes} minutes",
126
+ "voucherRemindSecond": "Revoke after {seconds} seconds",
127
+ "voucherRemindDay": "Revoke after {days} days",
128
+ "chooseRoundtrip": "Choose roundtrip ticket",
129
+ "depart": "Departing",
130
+ "return": "Returning",
131
+ "departing": "De",
132
+ "returning": "Re",
133
+ "jan": "January",
134
+ "feb": "February",
135
+ "mar": "March",
136
+ "apr": "April",
137
+ "may": "May",
138
+ "jun": "June",
139
+ "jul": "July",
140
+ "aug": "August",
141
+ "sep": "September",
142
+ "oct": "October",
143
+ "nov": "November",
144
+ "dec": "December",
145
+ "mon": "Mon",
146
+ "tue": "Tue",
147
+ "wed": "Wed",
148
+ "thu": "Thu",
149
+ "fri": "Fri",
150
+ "sat": "Sat",
151
+ "sun": "Sun",
152
+ "showLunar": "Show Lunar Calendar",
153
+ "newYear": "New Year's Day",
154
+ "valentine": "Valentine's Day",
155
+ "womenDay": "International Women's Day",
156
+ "liberationDay": "Liberation Day",
157
+ "laborDay": "Internation Labor's Day",
158
+ "childrenDay": "International Labor's Day",
159
+ "nationalDay": "National Day",
160
+ "womenDayVN": "Vietnamese Women's Day",
161
+ "teacherDay": "Teacher's Day",
162
+ "christmasEve": "Christmas Eve",
163
+ "christmas": "Christmas Day",
164
+ "lunarNewYear": "Lunar New Year",
165
+ "hungKingDay": "Hung Kings' Festival",
166
+ "balance": "Wallet Balance",
167
+ "chooseDate": "Choose date",
168
+ "year": "year",
169
+ "hour": "hour",
170
+ "minute": "minute",
171
+ "from": "From",
172
+ "to": "To",
173
+ "connected": "Connected",
174
+ "disconnected": "Disconnected",
175
+ "hide": "Hide",
176
+ "viewAllTitle": "View all",
177
+ "headerTitle": "Transaction history",
178
+ "SHORTEN": "SHORTEN",
179
+ "viewMoreBank": "VIEW MORE (${otherItemCount} banks)",
180
+ "transaction_success": "Success",
181
+ "transaction_fail": "Fail",
182
+ "transaction_processing": "Processing",
183
+ "viewMore": "View more",
184
+ "shorten": "Shorten",
185
+ "Payment": "${serviceName} payment",
186
+ "currencyUnit": "VND",
187
+ "Month": "Month",
188
+ "save": "Save",
189
+ "favoriteIn": "Add to favorite services",
190
+ "favoriteOut": "Remove to favorite services",
191
+ "deviceIn": "Add to device",
192
+ "setting": "Settings",
193
+ "transaction": "Transaction History",
194
+ "share": "Share",
195
+ "information": "Information",
196
+ "tutorial": "Instruction",
197
+ "question": "FAQ",
198
+ "support": "Support center"
199
+ }
200
+ }
package/Button/index.tsx CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  import {ApplicationContext} from '../Application';
9
9
  import {Text} from '../Text';
10
10
  import {Typography} from '../Text/types';
11
- import {Colors} from '../Consts';
11
+ import {Colors, Spacing} from '../Consts';
12
12
  import styles from './styles';
13
13
  import {Icon} from '../Icon';
14
14
  import {Loader} from '../Loader';
@@ -207,11 +207,27 @@ const Button: FC<ButtonProps> = ({
207
207
  * render leading
208
208
  */
209
209
  const renderLeading = () => {
210
- if (iconLeft) {
211
- const iconSize = getIconSize();
212
- const marginRight = getIconSpace();
213
- const color = useTintColor ? getTextColor() : undefined;
210
+ const iconSize = getIconSize();
211
+ const marginRight = getIconSpace();
212
+ const color = useTintColor ? getTextColor() : undefined;
214
213
 
214
+ if (loading) {
215
+ return (
216
+ <View
217
+ style={[
218
+ styles.trailing,
219
+ {
220
+ width: iconSize,
221
+ height: iconSize,
222
+ marginRight,
223
+ borderRadius: Spacing.M,
224
+ },
225
+ ]}>
226
+ <Loader type="spinner" color={color} />
227
+ </View>
228
+ );
229
+ }
230
+ if (iconLeft) {
215
231
  return (
216
232
  <View
217
233
  style={[
@@ -228,21 +244,9 @@ const Button: FC<ButtonProps> = ({
228
244
  * render trailing
229
245
  */
230
246
  const renderTrailing = () => {
231
- const marginLeft = getIconSpace();
232
247
  const color = useTintColor ? getTextColor() : undefined;
233
- if (loading) {
234
- const iconSize = getIconSize();
235
- const color = getTextColor();
236
- return (
237
- <View
238
- style={[
239
- styles.trailing,
240
- {width: iconSize, height: iconSize, marginLeft},
241
- ]}>
242
- <Loader type="spinner" color={color} />
243
- </View>
244
- );
245
- }
248
+ const marginLeft = getIconSpace();
249
+
246
250
  if (iconRight) {
247
251
  const iconSize = getIconSize();
248
252
  return (
package/Input/Input.tsx CHANGED
@@ -13,6 +13,7 @@ import {InputProps} from './index';
13
13
  import {Icon} from '../Icon';
14
14
  import {checkTyping} from './utils';
15
15
  import {Loader} from '../Loader';
16
+ import {Image} from '../Image';
16
17
 
17
18
  const Input = forwardRef(
18
19
  (
@@ -33,6 +34,7 @@ const Input = forwardRef(
33
34
  required,
34
35
  errorSpacing,
35
36
  loading,
37
+ image,
36
38
  ...props
37
39
  }: InputProps,
38
40
  ref,
@@ -76,6 +78,7 @@ const Input = forwardRef(
76
78
  let textColor = theme.colors.text.default;
77
79
  let placeholderColor = theme.colors.text.hint;
78
80
  let iconTintColor = iconColor;
81
+ const imageStyle = size === 'small' ? styles.imageSmall : styles.image;
79
82
 
80
83
  if (disabled) {
81
84
  textColor = disabledColor;
@@ -99,6 +102,7 @@ const Input = forwardRef(
99
102
  floatingIcon={floatingIcon}
100
103
  />
101
104
  <View style={styles.inputView}>
105
+ {!!image && <Image style={imageStyle} source={{uri: image}} />}
102
106
  <TextInput
103
107
  {...props}
104
108
  accessibilityLabel={`TextInput`}
package/Input/index.tsx CHANGED
@@ -64,6 +64,8 @@ export interface InputProps extends TextInputProps {
64
64
  * If true, the icon of input will use be show indicator loading.
65
65
  */
66
66
  loading?: boolean;
67
+
68
+ image?: string;
67
69
  }
68
70
 
69
71
  type InputPropsWithoutSizeAndIcon = Omit<
package/Input/styles.ts CHANGED
@@ -5,7 +5,7 @@ import {scaleSize} from '../Text';
5
5
  export default StyleSheet.create({
6
6
  //input style
7
7
  input: {
8
- width: '100%',
8
+ flex: 1,
9
9
  paddingLeft: Spacing.M,
10
10
  height: '100%',
11
11
  fontSize: scaleSize(15),
@@ -38,8 +38,21 @@ export default StyleSheet.create({
38
38
  marginTop: Spacing.XS,
39
39
  },
40
40
  inputView: {
41
- justifyContent: 'space-between',
42
41
  flex: 1,
42
+ flexDirection: 'row',
43
+ alignItems: 'center',
44
+ },
45
+ image: {
46
+ width: 32,
47
+ height: 32,
48
+ marginLeft: Spacing.M,
49
+ borderRadius: Radius.XS,
50
+ },
51
+ imageSmall: {
52
+ width: 24,
53
+ height: 24,
54
+ marginLeft: Spacing.M,
55
+ borderRadius: Radius.XS,
43
56
  },
44
57
  iconView: {
45
58
  flexDirection: 'row',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.79.4",
3
+ "version": "0.79.6-beta.1",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {