@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 +2 -2
- package/src/CalendarPro.js +7 -1
- package/src/Day/index.js +26 -6
- package/src/Day/style.js +4 -2
- package/src/Month/index.js +1 -0
- package/src/TabHeader.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/calendar",
|
|
3
|
-
"version": "0.0.56-alpha.
|
|
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": "
|
|
16
|
+
"@momo-kits/v2-core": "^0.0.51-beta.5"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
19
19
|
"license": "MoMo"
|
package/src/CalendarPro.js
CHANGED
|
@@ -327,7 +327,13 @@ export default class CalendarPro extends Component {
|
|
|
327
327
|
const labelHighlight = showLunar
|
|
328
328
|
? item.highlight || ''
|
|
329
329
|
: '';
|
|
330
|
-
const labelDate = `${
|
|
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
|
-
{
|
|
184
|
+
{!!price ? (
|
|
184
185
|
<Text.Description3
|
|
185
186
|
style={[
|
|
186
|
-
|
|
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
|
|
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
|
-
{
|
|
230
|
+
{!!price ? (
|
|
221
231
|
<Text.Description3
|
|
222
232
|
style={[
|
|
223
|
-
|
|
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
|
-
{
|
|
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:
|
|
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.
|
|
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
|
};
|
package/src/Month/index.js
CHANGED