@momo-kits/slider 0.73.3-beta.5 → 0.74.2-react-native.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.
- package/Label.tsx +33 -0
- package/helpers.ts +35 -0
- package/hooks.tsx +218 -0
- package/index.tsx +438 -0
- package/package.json +11 -10
- package/publish.sh +1 -1
- package/styles.ts +36 -0
- package/DefaultLabel.js +0 -83
- package/DefaultLabel.web.js +0 -83
- package/DefaultMarker.js +0 -67
- package/DefaultMarker.web.js +0 -75
- package/Slider.js +0 -781
- package/Slider.web.js +0 -761
- package/converters.js +0 -80
- package/index.js +0 -3
package/DefaultMarker.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {Platform, StyleSheet, View} from 'react-native';
|
|
3
|
-
import {Colors, Shadow, TouchableOpacity} from '@momo-kits/core-v2';
|
|
4
|
-
|
|
5
|
-
// import {Radius} from '../../core';
|
|
6
|
-
|
|
7
|
-
class DefaultMarker extends React.Component {
|
|
8
|
-
render() {
|
|
9
|
-
const {
|
|
10
|
-
enabled,
|
|
11
|
-
markerStyle,
|
|
12
|
-
pressed,
|
|
13
|
-
pressedMarkerStyle,
|
|
14
|
-
disabledMarkerStyle,
|
|
15
|
-
activeColor,
|
|
16
|
-
} = this.props;
|
|
17
|
-
return (
|
|
18
|
-
<TouchableOpacity>
|
|
19
|
-
<View
|
|
20
|
-
style={
|
|
21
|
-
enabled
|
|
22
|
-
? [
|
|
23
|
-
styles.markerStyle,
|
|
24
|
-
Shadow.Dark,
|
|
25
|
-
markerStyle,
|
|
26
|
-
pressed && styles.pressedMarkerStyle,
|
|
27
|
-
pressed && pressedMarkerStyle,
|
|
28
|
-
{backgroundColor: activeColor},
|
|
29
|
-
]
|
|
30
|
-
: [
|
|
31
|
-
Shadow.Dark,
|
|
32
|
-
styles.markerStyle,
|
|
33
|
-
styles.disabled,
|
|
34
|
-
disabledMarkerStyle,
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
/>
|
|
38
|
-
</TouchableOpacity>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const styles = StyleSheet.create({
|
|
44
|
-
markerStyle: {
|
|
45
|
-
height: 20,
|
|
46
|
-
width: 20,
|
|
47
|
-
borderRadius: 10,
|
|
48
|
-
borderWidth: 4,
|
|
49
|
-
borderColor: Colors.white,
|
|
50
|
-
},
|
|
51
|
-
pressedMarkerStyle: {
|
|
52
|
-
...Platform.select({
|
|
53
|
-
web: {},
|
|
54
|
-
ios: {},
|
|
55
|
-
android: {
|
|
56
|
-
height: 20,
|
|
57
|
-
width: 20,
|
|
58
|
-
borderRadius: 20,
|
|
59
|
-
},
|
|
60
|
-
}),
|
|
61
|
-
},
|
|
62
|
-
disabled: {
|
|
63
|
-
backgroundColor: Colors.black_09,
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
export default DefaultMarker;
|
package/DefaultMarker.web.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {View, StyleSheet, Platform, TouchableOpacity} from 'react-native';
|
|
3
|
-
import Colors from '../../core-v2/colors';
|
|
4
|
-
import Shadow from '../../core-v2/shadow';
|
|
5
|
-
|
|
6
|
-
class DefaultMarker extends React.Component {
|
|
7
|
-
render() {
|
|
8
|
-
const {
|
|
9
|
-
enabled,
|
|
10
|
-
markerStyle,
|
|
11
|
-
pressed,
|
|
12
|
-
pressedMarkerStyle,
|
|
13
|
-
disabledMarkerStyle,
|
|
14
|
-
activeColor,
|
|
15
|
-
} = this.props;
|
|
16
|
-
return (
|
|
17
|
-
<TouchableOpacity>
|
|
18
|
-
<View
|
|
19
|
-
style={
|
|
20
|
-
enabled
|
|
21
|
-
? [
|
|
22
|
-
styles.markerStyle,
|
|
23
|
-
|
|
24
|
-
markerStyle,
|
|
25
|
-
pressed && styles.pressedMarkerStyle,
|
|
26
|
-
pressed && pressedMarkerStyle,
|
|
27
|
-
{
|
|
28
|
-
backgroundColor: activeColor,
|
|
29
|
-
shadowColor: Colors.black_17,
|
|
30
|
-
shadowOffset: {
|
|
31
|
-
width: 2,
|
|
32
|
-
height: 2,
|
|
33
|
-
},
|
|
34
|
-
shadowOpacity: 0.25,
|
|
35
|
-
shadowRadius: 10,
|
|
36
|
-
},
|
|
37
|
-
]
|
|
38
|
-
: [
|
|
39
|
-
Shadow.Dark,
|
|
40
|
-
styles.markerStyle,
|
|
41
|
-
styles.disabled,
|
|
42
|
-
disabledMarkerStyle,
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
/>
|
|
46
|
-
</TouchableOpacity>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const styles = StyleSheet.create({
|
|
52
|
-
markerStyle: {
|
|
53
|
-
height: 20,
|
|
54
|
-
width: 20,
|
|
55
|
-
borderRadius: 10,
|
|
56
|
-
borderWidth: 4,
|
|
57
|
-
borderColor: Colors.white,
|
|
58
|
-
},
|
|
59
|
-
pressedMarkerStyle: {
|
|
60
|
-
...Platform.select({
|
|
61
|
-
web: {},
|
|
62
|
-
ios: {},
|
|
63
|
-
android: {
|
|
64
|
-
height: 20,
|
|
65
|
-
width: 20,
|
|
66
|
-
borderRadius: 20,
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
},
|
|
70
|
-
disabled: {
|
|
71
|
-
backgroundColor: Colors.black_09,
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export default DefaultMarker;
|