@momo-kits/calendar 0.0.56-alpha.1 → 0.0.56-alpha.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/calendar",
3
- "version": "0.0.56-alpha.1",
3
+ "version": "0.0.56-alpha.3",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -13,7 +13,7 @@
13
13
  "react-native": ">=0.55",
14
14
  "prop-types": "^15.7.2",
15
15
  "@momo-kits/core": ">=0.0.5-beta",
16
- "@momo-kits/v2-core": ">=0.0.5-beta"
16
+ "@momo-kits/v2-core": "^0.0.51-beta.5"
17
17
  },
18
18
  "devDependencies": {},
19
19
  "license": "MoMo"
@@ -327,7 +327,13 @@ export default class CalendarPro extends Component {
327
327
  const labelHighlight = showLunar
328
328
  ? item.highlight || ''
329
329
  : '';
330
- const labelDate = `${item.day}/${item.month}`;
330
+ const labelDate = `${
331
+ item.day > 9 ? item.day : `0${item.day}`
332
+ }/${
333
+ item.month > 9
334
+ ? item.month
335
+ : `0${item.month}`
336
+ }`;
331
337
  return (
332
338
  <View
333
339
  style={styles.row}
package/src/Day/index.js CHANGED
@@ -173,6 +173,7 @@ class Day extends Component {
173
173
  <Text.Label1
174
174
  style={[
175
175
  style.dayText,
176
+ { paddingTop: !!price ? 4 : 0 },
176
177
  this.isWeekEnd && style.weekendDay,
177
178
  this.isSolarHoliday && style.weekendDay,
178
179
  (this.isStart || this.isEnd) &&
@@ -180,10 +181,12 @@ class Day extends Component {
180
181
  ]}>
181
182
  {text}
182
183
  </Text.Label1>
183
- {this.isValid && this.isInScope && !!price ? (
184
+ {!!price ? (
184
185
  <Text.Description3
185
186
  style={[
186
- style.price,
187
+ this.isValid && this.isInScope
188
+ ? style.price
189
+ : style.dayTextDisabled,
187
190
  isBestPrice && {
188
191
  color: Colors.pink_03,
189
192
  },
@@ -194,7 +197,14 @@ class Day extends Component {
194
197
  {price}
195
198
  </Text.Description3>
196
199
  ) : (
197
- <View style={{ height: Spacing.S }} />
200
+ <View
201
+ style={{
202
+ paddingBottom: this.props
203
+ .havePriceList
204
+ ? Spacing.S
205
+ : 0,
206
+ }}
207
+ />
198
208
  )}
199
209
  </>
200
210
  </TouchableHighlight>
@@ -217,16 +227,26 @@ class Day extends Component {
217
227
  style={[style.dayText, style.dayTextDisabled]}>
218
228
  {text}
219
229
  </Text.Label1>
220
- {this.isValid && this.isInScope && (
230
+ {!!price ? (
221
231
  <Text.Description3
222
232
  style={[
223
- style.price,
233
+ this.isValid && this.isInScope
234
+ ? style.price
235
+ : style.dayTextDisabled,
224
236
  isBestPrice && {
225
237
  color: Colors.pink_03,
226
238
  },
227
239
  ]}>
228
- {'1000'}
240
+ {price}
229
241
  </Text.Description3>
242
+ ) : (
243
+ <View
244
+ style={{
245
+ paddingBottom: this.props.havePriceList
246
+ ? Spacing.S
247
+ : 0,
248
+ }}
249
+ />
230
250
  )}
231
251
  </View>
232
252
  )}
package/src/Day/style.js CHANGED
@@ -35,7 +35,7 @@ export default {
35
35
  lunarDayText: {
36
36
  width: dayWidth,
37
37
  textAlign: 'right',
38
- paddingRight: 5,
38
+ paddingRight: Spacing.XS,
39
39
  position: 'absolute',
40
40
  top: Spacing.XXS,
41
41
  },
@@ -46,8 +46,9 @@ export default {
46
46
  color: Colors.red_03,
47
47
  },
48
48
  dayTextDisabled: {
49
- opacity: 0.2,
49
+ opacity: 0.4,
50
50
  },
51
+
51
52
  focused: {
52
53
  backgroundColor: Colors.pink_03,
53
54
  },
@@ -118,6 +119,7 @@ export default {
118
119
  },
119
120
  price: {
120
121
  color: Colors.black_15,
122
+ marginTop: -4,
121
123
  },
122
124
  lineHeightPriceText,
123
125
  };
@@ -53,6 +53,7 @@ export default class Month extends PureComponent {
53
53
  {...this.props}
54
54
  {...this.checkHoliday(item.date)}
55
55
  date={item.date}
56
+ havePriceList={!!this.props.priceListDate}
56
57
  lunarDate={item.lunarDate}
57
58
  empty={item.empty}
58
59
  key={`day${i.toString()}`}
package/src/TabHeader.js CHANGED
@@ -67,7 +67,6 @@ export default class TabHeader extends React.Component {
67
67
  weight={active ? 'bold' : 'regular'}
68
68
  style={{
69
69
  marginTop: 3,
70
- fontSize: 14,
71
70
  }}>
72
71
  <Text.Description1 weight={active ? 'bold' : 'regular'}>
73
72
  {`${