@momo-kits/calendar 0.0.74-beta → 0.72.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.
@@ -1,18 +1,24 @@
1
1
  /* eslint-disable no-bitwise */
2
- import React, { Component } from 'react';
2
+ import React, {Component} from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
5
  import {
6
- View,
7
- Dimensions,
8
- ScrollView,
9
- TouchableWithoutFeedback,
10
- StyleSheet
6
+ Dimensions,
7
+ ScrollView,
8
+ StyleSheet,
9
+ TouchableWithoutFeedback,
10
+ View,
11
11
  } from 'react-native';
12
12
  import Moment from 'moment';
13
13
  import {
14
- Text, SwitchLanguage, LocalizedStrings, Colors, Image, IconSource
15
- } from '@momo-kits/core';
14
+ Colors,
15
+ IconSource,
16
+ Image,
17
+ Radius,
18
+ Spacing,
19
+ SwitchLanguage,
20
+ Text,
21
+ } from '@momo-kits/core-v2';
16
22
  import MonthList from './MonthList';
17
23
  import HeaderControl from './HeaderControl';
18
24
  import LunarDateConverter from './LunarDateConverter';
@@ -21,343 +27,410 @@ import Util from './Util';
21
27
  const widthScreen = Dimensions.get('window').width;
22
28
 
23
29
  export default class CalendarPro extends Component {
24
- constructor(props) {
25
- super(props);
26
- this.today = Moment();
27
- this.year = this.today.year();
28
- this.getDateRange();
29
- this.header = this.today.clone();
30
- this.selectedDate = props.selectedDate;
31
- this.state = {
32
- startDate: props.startDate,
33
- endDate: props.endDate,
34
- showLunar: props.isShowLunar,
35
- tabSelected: 0,
36
- holidays: [],
37
- ownUpdate: false,
38
- };
39
- this.converter = new LunarDateConverter();
40
- }
30
+ constructor(props) {
31
+ super(props);
32
+ this.today = Moment();
33
+ this.year = this.today.year();
34
+ this.getDateRange();
35
+ this.header = this.today.clone();
36
+ this.selectedDate = props.selectedDate;
37
+ this.state = {
38
+ startDate: props.startDate,
39
+ endDate: props.endDate,
40
+ showLunar: props.isShowLunar,
41
+ tabSelected: 0,
42
+ holidays: [],
43
+ ownUpdate: false,
44
+ };
45
+ this.converter = new LunarDateConverter();
46
+ }
41
47
 
42
- static getDerivedStateFromProps(nextProps, prevState) {
43
- if (prevState.ownUpdate) {
44
- return {
45
- ownUpdate: false,
46
- };
47
- } if (nextProps.isShowLunar !== prevState.showLunar) {
48
- return { showLunar: nextProps.isShowLunar };
49
- }
50
- return null;
48
+ static getDerivedStateFromProps(nextProps, prevState) {
49
+ if (prevState.ownUpdate) {
50
+ return {
51
+ ownUpdate: false,
52
+ };
51
53
  }
52
-
53
- setDateRange = (dateRange, isScrollToStartDate) => {
54
- if (dateRange && dateRange.startDate && dateRange.endDate) {
55
- this.setState({ startDate: dateRange.startDate, endDate: dateRange.endDate }, () => {
56
- const dateScroll = isScrollToStartDate ? dateRange.startDate : dateRange.endDate;
57
- this.refs.MonthList.scrollToMonth(dateScroll);
58
- });
59
- }
54
+ if (nextProps.isShowLunar !== prevState.showLunar) {
55
+ return {showLunar: nextProps.isShowLunar};
60
56
  }
57
+ return null;
58
+ }
61
59
 
62
- ownSetState(state) {
63
- this.setState({ ...state, ownUpdate: true });
60
+ setDateRange = (dateRange, isScrollToStartDate) => {
61
+ if (dateRange && dateRange.startDate && dateRange.endDate) {
62
+ this.setState(
63
+ {
64
+ startDate: dateRange.startDate,
65
+ endDate: dateRange.endDate,
66
+ },
67
+ () => {
68
+ const dateScroll = isScrollToStartDate
69
+ ? dateRange.startDate
70
+ : dateRange.endDate;
71
+ this.refs.MonthList.scrollToMonth(dateScroll);
72
+ },
73
+ );
64
74
  }
75
+ };
65
76
 
66
- loadLabel = (data, type) => {
67
- const {
68
- i18n,
69
- customI18n
70
- } = this.props;
71
- if (~['w', 'weekday', 'text'].indexOf(type)) {
72
- return (customI18n[type] || {})[data] || Util.I18N_MAP[i18n][type][data];
73
- }
74
- if (type === 'date') {
75
- return data.format(customI18n[type] || Util.I18N_MAP[i18n][type]);
76
- }
77
- };
78
-
79
- getDateRange = () => {
80
- const {
81
- maxDate,
82
- minDate,
83
- format
84
- } = this.props;
85
- let max = Moment(maxDate, format);
86
- let min = Moment(minDate, format);
87
- const maxValid = max.isValid();
88
- const minValid = min.isValid();
89
- if (!maxValid && !minValid) {
90
- max = Moment().add(12, 'months');
91
- min = Moment();
92
- }
93
- if (!maxValid && minValid) {
94
- max = min.add(12, 'months');
95
- }
96
- if (maxValid && !minValid) {
97
- min = max.subtract(12, 'months');
98
- }
99
- if (min.isSameOrAfter(max)) return {};
100
- this.minDate = min;
101
- this.maxDate = max;
102
- };
77
+ ownSetState(state) {
78
+ this.setState({
79
+ ...state,
80
+ ownUpdate: true,
81
+ });
82
+ }
103
83
 
104
- onChoose = (day) => {
105
- const {
106
- startDate, tabSelected
107
- } = this.state;
108
- const { isDoubleDateMode, onDateChange } = this.props;
109
- if (isDoubleDateMode) {
110
- if (tabSelected === 1) {
111
- if (startDate && day >= startDate) {
112
- this.ownSetState({
113
- endDate: day
114
- });
115
- } else if (startDate && day < startDate) {
116
- this.ownSetState({
117
- startDate: day,
118
- endDate: null
119
- });
120
- }
121
- } else {
122
- this.ownSetState({
123
- startDate: day
124
- });
125
- }
126
- } else {
127
- this.ownSetState({
128
- startDate: day,
129
- endDate: null,
130
- });
131
- }
132
- if (onDateChange) {
133
- onDateChange(day);
134
- }
135
- };
84
+ loadLabel = (data, type) => {
85
+ const {i18n, customI18n} = this.props;
86
+ if (~['w', 'weekday', 'text'].indexOf(type)) {
87
+ return (customI18n[type] || {})[data] || Util.I18N_MAP[i18n][type][data];
88
+ }
89
+ if (type === 'date') {
90
+ return data.format(customI18n[type] || Util.I18N_MAP[i18n][type]);
91
+ }
92
+ };
136
93
 
137
- executeProcessAfterScrollCalendar = (date, key) => {
138
- const holidays = Object.values(Util.getHolidaysInMonth(Moment(date)));
139
- const {
140
- showLunar
141
- } = this.state;
142
- if (this.refs && this.refs.HeaderControl) {
143
- this.refs.HeaderControl.onUpdateInfo({ date });
144
- this.header = date.clone().startOf('month');
145
- }
146
- let data = [];
147
- if (!showLunar) {
148
- data = holidays.filter((item) => !item.lunar || item.mixedLabel);
149
- } else {
150
- data = holidays;
151
- }
152
- this.ownSetState({ holidays, temp: data, headerKey: key });
153
- };
94
+ getDateRange = () => {
95
+ const {maxDate, minDate, format} = this.props;
96
+ let max = Moment(maxDate, format);
97
+ let min = Moment(minDate, format);
98
+ const maxValid = max.isValid();
99
+ const minValid = min.isValid();
100
+ if (!maxValid && !minValid) {
101
+ max = Moment().add(12, 'months');
102
+ min = Moment();
103
+ }
104
+ if (!maxValid && minValid) {
105
+ max = min.add(12, 'months');
106
+ }
107
+ if (maxValid && !minValid) {
108
+ min = max.subtract(12, 'months');
109
+ }
110
+ if (min.isSameOrAfter(max)) return {};
111
+ this.minDate = min;
112
+ this.maxDate = max;
113
+ };
154
114
 
155
- onScrollCalendar = (data) => {
156
- const { headerKey } = this.state;
157
- if (data) {
158
- if (data.key !== headerKey) {
159
- this.executeProcessAfterScrollCalendar(data.date, data.key);
160
- }
115
+ onChoose = day => {
116
+ const {startDate, tabSelected} = this.state;
117
+ const {isDoubleDateMode, onDateChange} = this.props;
118
+ if (isDoubleDateMode) {
119
+ if (tabSelected === 1) {
120
+ if (startDate && day >= startDate) {
121
+ this.ownSetState({
122
+ endDate: day,
123
+ });
124
+ } else if (startDate && day < startDate) {
125
+ this.ownSetState({
126
+ startDate: day,
127
+ endDate: null,
128
+ });
161
129
  }
162
- };
163
-
164
- setDoubleDateAndTabIndex = (firstDate, secondDate, tabSelected) => {
130
+ } else {
165
131
  this.ownSetState({
166
- startDate: firstDate ? Moment(firstDate) : null,
167
- endDate: secondDate ? Moment(secondDate) : null,
168
- tabSelected
132
+ startDate: day,
169
133
  });
170
- };
134
+ }
135
+ } else {
136
+ this.ownSetState({
137
+ startDate: day,
138
+ endDate: null,
139
+ });
140
+ }
141
+ if (onDateChange) {
142
+ onDateChange(day);
143
+ }
144
+ };
171
145
 
172
- toggleLunarDate = () => {
173
- const { showLunar, holidays } = this.state;
174
- const { onCallbackCalendar } = this.props;
175
- let data = [];
176
- const nextStateShowLunar = !showLunar;
177
- if (!nextStateShowLunar) {
178
- data = holidays.filter((item) => !item.lunar || item.mixedLabel);
179
- } else {
180
- data = holidays;
181
- }
182
- if (onCallbackCalendar) {
183
- onCallbackCalendar('lunar', nextStateShowLunar);
184
- }
146
+ executeProcessAfterScrollCalendar = (date, key) => {
147
+ const holidays = Object.values(Util.getHolidaysInMonth(Moment(date)));
148
+ const {showLunar} = this.state;
149
+ if (this.refs && this.refs.HeaderControl) {
150
+ this.refs.HeaderControl.onUpdateInfo({date});
151
+ this.header = date.clone().startOf('month');
152
+ }
153
+ let data = [];
154
+ if (!showLunar) {
155
+ data = holidays.filter(item => !item.lunar || item.mixedLabel);
156
+ } else {
157
+ data = holidays;
158
+ }
159
+ this.ownSetState({
160
+ holidays,
161
+ temp: data,
162
+ headerKey: key,
163
+ });
164
+ };
185
165
 
186
- this.ownSetState({ showLunar: !showLunar, temp: data, ownUpdate: true });
187
- };
166
+ onScrollCalendar = data => {
167
+ const {headerKey} = this.state;
168
+ if (data) {
169
+ if (data.key !== headerKey) {
170
+ this.executeProcessAfterScrollCalendar(data.date, data.key);
171
+ }
172
+ }
173
+ };
188
174
 
189
- onPressBackArrow = () => {
190
- const previousDate = Moment(this.header).startOf('month').subtract(1, 'months');
191
- if (this.refs && this.refs.HeaderControl && previousDate.isSameOrAfter(this.minDate, 'month')) {
192
- this.header = previousDate;
193
- this.refs.HeaderControl.onUpdateInfo({ date: previousDate });
194
- this.refs.MonthList.scrollToMonth(previousDate);
195
- }
196
- };
175
+ setDoubleDateAndTabIndex = (firstDate, secondDate, tabSelected) => {
176
+ this.ownSetState({
177
+ startDate: firstDate ? Moment(firstDate) : null,
178
+ endDate: secondDate ? Moment(secondDate) : null,
179
+ tabSelected,
180
+ });
181
+ };
197
182
 
198
- onPressNextArrow = () => {
199
- const nextDate = Moment(this.header).startOf('month').add(1, 'months');
200
- if (this.refs && this.refs.HeaderControl && nextDate.isSameOrBefore(this.maxDate, 'month')) {
201
- this.header = nextDate;
202
- this.refs.HeaderControl.onUpdateInfo({ date: nextDate });
203
- this.refs.MonthList.scrollToMonth(nextDate);
204
- }
205
- };
183
+ toggleLunarDate = () => {
184
+ const {showLunar, holidays} = this.state;
185
+ const {onCallbackCalendar} = this.props;
186
+ let data = [];
187
+ const nextStateShowLunar = !showLunar;
188
+ if (!nextStateShowLunar) {
189
+ data = holidays.filter(item => !item.lunar || item.mixedLabel);
190
+ } else {
191
+ data = holidays;
192
+ }
193
+ if (onCallbackCalendar) {
194
+ onCallbackCalendar('lunar', nextStateShowLunar);
195
+ }
206
196
 
207
- render() {
208
- const {
209
- startDate, endDate, showLunar, tabSelected, holidays, temp
210
- } = this.state;
211
- const {
212
- i18n, isDoubleDateMode, priceList, labelFrom, labelTo, isHideLabel, isHideHoliday, isOffLunar
213
- } = this.props;
214
- let priceListFormat = priceList?.outbound;
215
- if (isDoubleDateMode) {
216
- priceListFormat = tabSelected === 0 ? priceList?.outbound : priceList?.inbound;
217
- }
218
- return (
219
- <View style={styles.container}>
220
- <View style={styles.viewDate}>
221
- <HeaderControl
222
- ref="HeaderControl"
223
- // selectedDate={this.selectedDate}
224
- onPressBackArrow={this.onPressBackArrow}
225
- onPressNextArrow={this.onPressNextArrow}
226
- />
227
- <View style={styles.viewDay}>
228
- {[1, 2, 3, 4, 5, 6, 7].map((item) => (
229
- <Text
230
- style={[styles.textDay, { color: item === 6 || item === 7 ? Colors.red_05 : Colors.black_12 }]}
231
- key={item}
232
- >
233
- {Util.mapWeeKDate(item)}
234
- </Text>
235
- )
236
- )}
237
- </View>
238
- <MonthList
239
- ref="MonthList"
240
- today={this.today}
241
- minDate={this.minDate}
242
- maxDate={this.maxDate}
243
- startDate={startDate}
244
- endDate={endDate}
245
- onChoose={this.onChoose}
246
- i18n={i18n}
247
- onScrollCalendar={this.onScrollCalendar}
248
- isShowLunar={!isOffLunar && showLunar}
249
- isDoubleDateMode={isDoubleDateMode}
250
- tabSelected={tabSelected}
251
- lunarConverter={this.converter}
252
- holidays={holidays}
253
- selectedDate={this.selectedDate}
254
- priceList={priceListFormat}
255
- labelFrom={labelFrom}
256
- labelTo={labelTo}
257
- isHideLabel={isHideLabel}
258
- />
259
- </View>
260
- {
261
- !isOffLunar && (
262
- <View style={styles.viewLunar}>
263
- <TouchableWithoutFeedback onPress={this.toggleLunarDate}>
264
- <Image source={showLunar ? IconSource.ic_checkbox_checked_24 : IconSource.ic_checkbox_unchecked_24} style={styles.iconSelected} />
265
- </TouchableWithoutFeedback>
266
- <Text.SubTitle
267
- style={styles.txtLunar}
268
- onPress={this.toggleLunarDate}
269
- >
270
- {SwitchLanguage.showLunar}
271
- </Text.SubTitle>
272
- </View>
273
- )
274
- }
197
+ this.ownSetState({
198
+ showLunar: !showLunar,
199
+ temp: data,
200
+ ownUpdate: true,
201
+ });
202
+ };
275
203
 
276
- {
277
- !isHideHoliday && (
278
- <ScrollView
279
- contentContainerStyle={styles.contentScroll}
280
- showsVerticalScrollIndicator={false}
281
- enabledNestedScroll
282
- >
283
- {temp && temp.length > 0 && temp.map((item, idx) => {
284
- const labelHoliday = showLunar ? (item.mixedLabel || item.label || '') : (item.label || '');
285
- const labelHighlight = showLunar ? (item.highlight || '') : '';
286
- const labelDate = LocalizedStrings.defaultLanguage === 'en' ? `${Util.mapMonthShorten(item.month)} ${item.day}` : `${item.day} tháng ${item.month}`;
287
- return (
288
- <View style={styles.row} key={idx.toString()}>
289
- <Text.SubTitle style={styles.txtMonthLunar}>
290
- {labelDate}
291
- </Text.SubTitle>
292
- <Text.SubTitle style={styles.subTextLunar}>
293
- {`${labelHoliday} `}
294
- {
295
- labelHighlight ? <Text style={{ color: Colors.red_05 }}>{labelHighlight}</Text> : ''
296
- }
297
- </Text.SubTitle>
298
- </View>
299
- );
300
- })}
301
- </ScrollView>
302
- )
303
- }
204
+ onPressBackArrow = () => {
205
+ const previousDate = Moment(this.header)
206
+ .startOf('month')
207
+ .subtract(1, 'months');
208
+ if (
209
+ this.refs &&
210
+ this.refs.HeaderControl &&
211
+ previousDate.isSameOrAfter(this.minDate, 'month')
212
+ ) {
213
+ this.header = previousDate;
214
+ this.refs.HeaderControl.onUpdateInfo({date: previousDate});
215
+ this.refs.MonthList.scrollToMonth(previousDate);
216
+ }
217
+ };
304
218
 
305
- </View>
306
- );
219
+ onPressNextArrow = () => {
220
+ const nextDate = Moment(this.header).startOf('month').add(1, 'months');
221
+ if (
222
+ this.refs &&
223
+ this.refs.HeaderControl &&
224
+ nextDate.isSameOrBefore(this.maxDate, 'month')
225
+ ) {
226
+ this.header = nextDate;
227
+ this.refs.HeaderControl.onUpdateInfo({date: nextDate});
228
+ this.refs.MonthList.scrollToMonth(nextDate);
307
229
  }
230
+ };
231
+
232
+ render() {
233
+ const {startDate, endDate, showLunar, tabSelected, holidays, temp} =
234
+ this.state;
235
+ const {
236
+ i18n,
237
+ isDoubleDateMode,
238
+ priceList,
239
+ labelFrom,
240
+ labelTo,
241
+ isHideLabel,
242
+ isHideHoliday,
243
+ isOffLunar,
244
+ disabledWeekend,
245
+ isShowLunar,
246
+ } = this.props;
247
+ let priceListFormat = priceList?.outbound;
248
+ if (isDoubleDateMode) {
249
+ priceListFormat =
250
+ tabSelected === 0 ? priceList?.outbound : priceList?.inbound;
251
+ }
252
+ const isDisabledWeekend =
253
+ disabledWeekend && !priceList && !isShowLunar && !isDoubleDateMode;
254
+
255
+ return (
256
+ <View style={styles.container}>
257
+ <View style={styles.viewDate}>
258
+ <HeaderControl
259
+ ref="HeaderControl"
260
+ // selectedDate={this.selectedDate}
261
+ onPressBackArrow={this.onPressBackArrow}
262
+ onPressNextArrow={this.onPressNextArrow}
263
+ />
264
+ <View style={styles.blueSeperator} />
265
+ <View>
266
+ <View style={styles.viewDay}>
267
+ {[1, 2, 3, 4, 5, 6, 7].map(item => (
268
+ <Text.Label2
269
+ weight="medium"
270
+ style={[
271
+ styles.textDay,
272
+ {
273
+ color:
274
+ item === 6 || item === 7
275
+ ? isDisabledWeekend
276
+ ? Colors.red_07
277
+ : Colors.red_03
278
+ : Colors.black_17,
279
+ },
280
+ ]}
281
+ key={item}>
282
+ {Util.mapWeeKDate(item)}
283
+ </Text.Label2>
284
+ ))}
285
+ </View>
286
+ <MonthList
287
+ disabledWeekend={isDisabledWeekend}
288
+ ref="MonthList"
289
+ today={this.today}
290
+ minDate={this.minDate}
291
+ maxDate={this.maxDate}
292
+ startDate={startDate}
293
+ endDate={endDate}
294
+ onChoose={this.onChoose}
295
+ i18n={i18n}
296
+ onScrollCalendar={this.onScrollCalendar}
297
+ isShowLunar={!isOffLunar && showLunar}
298
+ isDoubleDateMode={isDoubleDateMode}
299
+ tabSelected={tabSelected}
300
+ lunarConverter={this.converter}
301
+ holidays={holidays}
302
+ selectedDate={this.selectedDate}
303
+ priceList={priceListFormat}
304
+ labelFrom={labelFrom}
305
+ labelTo={labelTo}
306
+ isHideLabel={isHideLabel}
307
+ />
308
+ </View>
309
+ </View>
310
+ {!isOffLunar && (
311
+ <View style={[styles.viewLunar]}>
312
+ <TouchableWithoutFeedback onPress={this.toggleLunarDate}>
313
+ <Image
314
+ tintColor={showLunar ? Colors.pink_03 : Colors.black_17}
315
+ source={
316
+ showLunar
317
+ ? IconSource.ic_checkbox_checked_24
318
+ : IconSource.ic_checkbox_unchecked_24
319
+ }
320
+ style={styles.iconSelected}
321
+ />
322
+ </TouchableWithoutFeedback>
323
+ <Text.Description1
324
+ style={styles.txtLunar}
325
+ onPress={this.toggleLunarDate}>
326
+ {SwitchLanguage.showLunar}
327
+ </Text.Description1>
328
+ </View>
329
+ )}
330
+
331
+ {!isHideHoliday && (
332
+ <ScrollView
333
+ contentContainerStyle={styles.contentScroll}
334
+ showsVerticalScrollIndicator={false}
335
+ enabledNestedScroll>
336
+ {temp &&
337
+ temp.length > 0 &&
338
+ temp.map((item, idx) => {
339
+ const labelHoliday = showLunar
340
+ ? item.mixedLabel || item.label || ''
341
+ : item.label || '';
342
+ const labelHighlight = showLunar ? item.highlight || '' : '';
343
+ const labelDate = `${
344
+ item.day > 9 ? item.day : `0${item.day}`
345
+ }/${item.month > 9 ? item.month : `0${item.month}`}`;
346
+ return (
347
+ <View style={styles.row} key={idx.toString()}>
348
+ <Text.Description2 style={styles.txtMonthLunar}>
349
+ {labelDate}
350
+ </Text.Description2>
351
+ <Text.Description2 style={styles.subTextLunar}>
352
+ {`${labelHoliday} `}
353
+ </Text.Description2>
354
+ </View>
355
+ );
356
+ })}
357
+ </ScrollView>
358
+ )}
359
+ </View>
360
+ );
361
+ }
308
362
  }
309
363
 
310
364
  CalendarPro.propTypes = {
311
- i18n: PropTypes.string,
312
- format: PropTypes.string,
313
- customI18n: PropTypes.object,
314
- isShowLunar: PropTypes.bool,
315
- onCallbackCalendar: PropTypes.func,
316
- minDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
317
- maxDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)])
365
+ i18n: PropTypes.string,
366
+ format: PropTypes.string,
367
+ customI18n: PropTypes.object,
368
+ isShowLunar: PropTypes.bool,
369
+ onCallbackCalendar: PropTypes.func,
370
+ minDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
371
+ maxDate: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
318
372
  };
319
373
 
320
374
  CalendarPro.defaultProps = {
321
- format: 'YYYY-MM-DD',
322
- i18n: 'vi',
323
- customI18n: {},
324
- isShowLunar: true
375
+ format: 'YYYY-MM-DD',
376
+ i18n: 'vi',
377
+ customI18n: {},
378
+ isShowLunar: true,
325
379
  };
326
380
 
327
381
  const styles = StyleSheet.create({
328
- row: { flexDirection: 'row' },
329
- txtMonthLunar: { color: Colors.red_05, width: 80 },
330
- subTextLunar: {
331
- // fontSize: 12,
332
- color: '#222222',
333
- paddingLeft: 6,
334
- flexShrink: 1
335
- },
336
- contentScroll: { paddingHorizontal: 12, paddingVertical: 10 },
337
- iconSelected: { width: 24, height: 24, resizeMode: 'cover' },
338
- txtLunar: {
339
- paddingLeft: 6,
340
- color: '#222222',
341
- // fontSize: 12,
342
- lineHeight: 14
343
- },
344
- viewLunar: {
345
- flexDirection: 'row', alignItems: 'center', marginHorizontal: 12, paddingVertical: 12, borderBottomWidth: 1, borderStyle: 'solid', borderColor: '#c7c7cd'
346
- },
347
- viewDate: { paddingHorizontal: 12 },
348
- textDay: {
349
- // fontSize: 14,
350
- lineHeight: 16,
351
- width: (widthScreen - 38) / 7,
352
- textAlign: 'center',
353
- fontWeight: 'bold',
354
- },
355
- viewDay: {
356
- flexDirection: 'row',
357
- justifyContent: 'space-between',
358
- paddingHorizontal: 7,
359
- paddingTop: 15,
360
- paddingBottom: 10,
361
- },
362
- container: { flex: 1, backgroundColor: 'white', marginTop: 20, },
382
+ row: {flexDirection: 'row'},
383
+ txtMonthLunar: {
384
+ color: Colors.red_03,
385
+ marginRight: Spacing.S,
386
+ },
387
+ subTextLunar: {
388
+ color: Colors.black_17,
389
+ },
390
+ contentScroll: {
391
+ paddingHorizontal: 12,
392
+ paddingVertical: 10,
393
+ },
394
+ iconSelected: {
395
+ width: 24,
396
+ height: 24,
397
+ resizeMode: 'cover',
398
+ },
399
+ txtLunar: {
400
+ paddingLeft: 6,
401
+ color: '#222222',
402
+ fontSize: 14,
403
+ },
404
+ viewLunar: {
405
+ flexDirection: 'row',
406
+ alignItems: 'center',
407
+ marginHorizontal: Spacing.M,
408
+ borderTopWidth: 1,
409
+ paddingTop: Spacing.M,
410
+ borderStyle: 'solid',
411
+ borderColor: Colors.black_04,
412
+ },
413
+ viewDate: {},
414
+ textDay: {
415
+ width: (widthScreen - 38) / 7,
416
+ textAlign: 'center',
417
+ },
418
+ viewDay: {
419
+ flexDirection: 'row',
420
+ justifyContent: 'space-between',
421
+ paddingHorizontal: Spacing.S,
422
+ paddingTop: 15,
423
+ paddingBottom: 10,
424
+ },
425
+ container: {
426
+ flex: 1,
427
+ backgroundColor: 'white',
428
+ marginTop: Spacing.S,
429
+ borderRadius: Radius.XS,
430
+ },
431
+ blueSeperator: {
432
+ height: 1,
433
+ width: '100%',
434
+ backgroundColor: Colors.blue_05,
435
+ },
363
436
  });