@momo-kits/date-picker 0.0.61-beta.9 → 0.0.62-alpha.13
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/datePicker/DatePicker.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
SwitchLanguage,
|
|
12
12
|
Spacing,
|
|
13
13
|
Colors,
|
|
14
|
-
} from '@momo-kits/core';
|
|
14
|
+
} from '@momo-kits/core-v2';
|
|
15
15
|
import WheelPicker from './WheelPicker';
|
|
16
16
|
import DatePickerHelper from './helper/DatePickerHelper';
|
|
17
17
|
|
|
@@ -594,9 +594,10 @@ class DatePicker extends Component {
|
|
|
594
594
|
const { description, descriptionStyle, renderDescription } = this.props;
|
|
595
595
|
if (renderDescription) return renderDescription;
|
|
596
596
|
return description ? (
|
|
597
|
-
<Text.
|
|
597
|
+
<Text.Paragraph
|
|
598
|
+
style={[{ marginBottom: Spacing.S }, descriptionStyle]}>
|
|
598
599
|
{description}
|
|
599
|
-
</Text.
|
|
600
|
+
</Text.Paragraph>
|
|
600
601
|
) : null;
|
|
601
602
|
};
|
|
602
603
|
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
Colors,
|
|
10
10
|
ValueUtil,
|
|
11
11
|
Image,
|
|
12
|
-
|
|
12
|
+
Radius,
|
|
13
|
+
} from '@momo-kits/core-v2';
|
|
13
14
|
import DatePicker from './DatePicker';
|
|
14
15
|
|
|
15
16
|
const DatePickerInput = ({
|
|
@@ -64,14 +65,14 @@ const DatePickerInput = ({
|
|
|
64
65
|
ValueUtil.extractStyle(style),
|
|
65
66
|
otherStyle,
|
|
66
67
|
]}>
|
|
67
|
-
<Text.
|
|
68
|
+
<Text.Paragraph
|
|
68
69
|
style={[
|
|
69
70
|
styles.defaultText,
|
|
70
71
|
ValueUtil.extractStyle(textStyle),
|
|
71
72
|
isEmpty(selected) ? { color: Colors.black_09 } : {},
|
|
72
73
|
]}>
|
|
73
74
|
{isEmpty(selected) ? format : selected}
|
|
74
|
-
</Text.
|
|
75
|
+
</Text.Paragraph>
|
|
75
76
|
{showRightIcon ? (
|
|
76
77
|
<Image
|
|
77
78
|
source={icon || IconSource.ic_calendar}
|
|
@@ -118,7 +119,7 @@ const styles = StyleSheet.create({
|
|
|
118
119
|
container: {
|
|
119
120
|
flexDirection: 'row',
|
|
120
121
|
height: 42,
|
|
121
|
-
borderRadius:
|
|
122
|
+
borderRadius: Radius.S,
|
|
122
123
|
borderColor: Colors.black_06,
|
|
123
124
|
borderWidth: 1,
|
|
124
125
|
alignItems: 'center',
|
|
@@ -127,7 +128,7 @@ const styles = StyleSheet.create({
|
|
|
127
128
|
backgroundColor: Colors.black_01,
|
|
128
129
|
},
|
|
129
130
|
error: {
|
|
130
|
-
borderColor: Colors.
|
|
131
|
+
borderColor: Colors.red_03,
|
|
131
132
|
},
|
|
132
133
|
defaultText: {
|
|
133
134
|
// fontSize: 14
|
package/datePicker/ListPicker.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Image,
|
|
10
10
|
DeviceUtils,
|
|
11
11
|
SwitchLanguage,
|
|
12
|
-
} from '@momo-kits/core';
|
|
12
|
+
} from '@momo-kits/core-v2';
|
|
13
13
|
import WheelPicker from './WheelPicker';
|
|
14
14
|
|
|
15
15
|
const { isIphoneX } = DeviceUtils;
|
|
@@ -63,9 +63,10 @@ export default class ListPicker extends Component {
|
|
|
63
63
|
|
|
64
64
|
renderRight = () => (
|
|
65
65
|
<TouchableOpacity onPress={this.onPressChoose}>
|
|
66
|
-
<Text.
|
|
66
|
+
<Text.Paragraph
|
|
67
|
+
style={{ fontWeight: 'bold', color: Colors.pink_05 }}>
|
|
67
68
|
{SwitchLanguage.save}
|
|
68
|
-
</Text.
|
|
69
|
+
</Text.Paragraph>
|
|
69
70
|
</TouchableOpacity>
|
|
70
71
|
);
|
|
71
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { Dimensions, View } from 'react-native';
|
|
3
|
-
import { LinearGradient, Text, Colors, ScaleSize } from '@momo-kits/core';
|
|
3
|
+
import { LinearGradient, Text, Colors, ScaleSize } from '@momo-kits/core-v2';
|
|
4
4
|
import ScrollCustom from './custom/ScrollCustom';
|
|
5
5
|
import DatePickerHelper from './helper/DatePickerHelper';
|
|
6
6
|
|
|
@@ -187,20 +187,19 @@ export default class WheelPicker extends Component {
|
|
|
187
187
|
const { preFix, bottomOffset } = this.props;
|
|
188
188
|
return (
|
|
189
189
|
<View style={{ flex: 1, height: heightContain + 40 }}>
|
|
190
|
-
<Text.
|
|
191
|
-
weight="
|
|
190
|
+
<Text.Description2
|
|
191
|
+
weight="semibold"
|
|
192
192
|
style={{
|
|
193
193
|
color: Colors.black_17,
|
|
194
194
|
marginLeft: 6,
|
|
195
195
|
marginBottom: 3,
|
|
196
196
|
}}>
|
|
197
197
|
{DatePickerHelper.capitalizeFirstLetter(preFix || '')}
|
|
198
|
-
</Text.
|
|
198
|
+
</Text.Description2>
|
|
199
199
|
<View
|
|
200
200
|
style={{
|
|
201
201
|
flex: 1,
|
|
202
202
|
height: heightContain,
|
|
203
|
-
//backgroundColor: 'blue',
|
|
204
203
|
marginHorizontal: 6,
|
|
205
204
|
paddingBottom: 20,
|
|
206
205
|
borderWidth: 1,
|
|
@@ -275,22 +274,21 @@ export default class WheelPicker extends Component {
|
|
|
275
274
|
justifyContent: 'center',
|
|
276
275
|
alignItems: 'center',
|
|
277
276
|
}}>
|
|
278
|
-
<Text
|
|
277
|
+
<Text.Action2
|
|
278
|
+
weight={
|
|
279
|
+
value === index ? 'bold' : 'semibold'
|
|
280
|
+
}
|
|
279
281
|
style={{
|
|
280
282
|
color:
|
|
281
283
|
value === index
|
|
282
284
|
? Colors.black_17
|
|
283
|
-
:
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
fontSize:
|
|
287
|
-
value === index
|
|
288
|
-
? ScaleSize(20)
|
|
289
|
-
: ScaleSize(16),
|
|
285
|
+
: Colors.black_12,
|
|
286
|
+
|
|
287
|
+
fontSize: 15,
|
|
290
288
|
}}>
|
|
291
289
|
{valueItem}
|
|
292
290
|
{/* {reversePreFix ? `${valueItem} ${preFix}` : `${preFix} ${valueItem}`} */}
|
|
293
|
-
</Text>
|
|
291
|
+
</Text.Action2>
|
|
294
292
|
</View>
|
|
295
293
|
))}
|
|
296
294
|
{this.renderHiddenItem(
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/date-picker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.62-alpha.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@momo-kits/core": ">=0.0.5-beta",
|
|
8
|
+
"@momo-kits/core-v2": ">=0.0.5-beta",
|
|
9
9
|
"lodash": "^4.17.15",
|
|
10
10
|
"prop-types": "^15.7.2",
|
|
11
11
|
"react": "16.9.0",
|