@ledvance/group-ui-biz-bundle 1.0.77 → 1.0.78
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 +1 -1
- package/src/modules/flags/FlagEditPage.tsx +183 -180
- package/src/modules/flags/FlagItem.tsx +29 -42
- package/src/modules/flags/FlagPage.tsx +20 -19
- package/src/modules/music/MusicPage.tsx +79 -77
- package/src/modules/randomTimingForLight/ItemCard.tsx +29 -26
- package/src/modules/randomTimingForLight/RandomTimingForLightDetailPage.tsx +46 -81
- package/src/modules/randomTimingForLight/RandomTimingForLightPage.tsx +58 -63
- package/src/modules/randomTimingForLight/Summary.tsx +62 -58
- package/src/modules/select/SelectPage.tsx +65 -62
- package/src/modules/switchGradient/SwitchGradientPage.tsx +24 -22
|
@@ -6,8 +6,10 @@ import { Utils } from "tuya-panel-kit";
|
|
|
6
6
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
7
7
|
|
|
8
8
|
const { convertX: cx } = Utils.RatioUtils;
|
|
9
|
+
const { withTheme } = Utils.ThemeUtils
|
|
9
10
|
|
|
10
11
|
interface SummaryProps {
|
|
12
|
+
theme?: any
|
|
11
13
|
style?: ViewStyle
|
|
12
14
|
frequency?: string | ReactElement
|
|
13
15
|
time?: string | ReactElement
|
|
@@ -16,6 +18,53 @@ interface SummaryProps {
|
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
const Summary = (props: SummaryProps) => {
|
|
21
|
+
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
cardContainer: {
|
|
24
|
+
marginHorizontal: cx(24),
|
|
25
|
+
},
|
|
26
|
+
itemTitle: {
|
|
27
|
+
color: props.theme.global.fontColor,
|
|
28
|
+
fontSize: cx(16),
|
|
29
|
+
fontWeight: 'bold',
|
|
30
|
+
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
31
|
+
},
|
|
32
|
+
summaryContainer: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
marginBottom: cx(10),
|
|
36
|
+
},
|
|
37
|
+
summaryLeft: {
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
minWidth: cx(100)
|
|
41
|
+
},
|
|
42
|
+
summaryImg: {
|
|
43
|
+
tintColor: props.theme.global.fontColor,
|
|
44
|
+
width: cx(12),
|
|
45
|
+
height: cx(12),
|
|
46
|
+
marginRight: cx(6)
|
|
47
|
+
},
|
|
48
|
+
leftTitle: {
|
|
49
|
+
fontSize: cx(14),
|
|
50
|
+
color: props.theme.global.fontColor,
|
|
51
|
+
},
|
|
52
|
+
summaryRight: {
|
|
53
|
+
flex: 1,
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
marginLeft: cx(15),
|
|
56
|
+
},
|
|
57
|
+
rightWrap: {
|
|
58
|
+
borderRadius: cx(16),
|
|
59
|
+
paddingHorizontal: cx(12),
|
|
60
|
+
alignSelf: 'flex-start',
|
|
61
|
+
backgroundColor: props.theme.tag.background,
|
|
62
|
+
},
|
|
63
|
+
rightItem: {
|
|
64
|
+
color: props.theme.tag.fontColor,
|
|
65
|
+
},
|
|
66
|
+
})
|
|
67
|
+
|
|
19
68
|
return (
|
|
20
69
|
<View style={styles.cardContainer}>
|
|
21
70
|
<Text style={styles.itemTitle}>{I18n.getLang('add_randomtimecycle_subheadline_text')}</Text>
|
|
@@ -56,68 +105,23 @@ const Summary = (props: SummaryProps) => {
|
|
|
56
105
|
</View>
|
|
57
106
|
</View>
|
|
58
107
|
{!props.hideActions && <View style={[styles.summaryContainer, { alignItems: 'flex-start' }]}>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
108
|
+
<View style={styles.summaryLeft}>
|
|
109
|
+
<Image
|
|
110
|
+
source={res.summary_icon3}
|
|
111
|
+
resizeMode="contain"
|
|
112
|
+
style={styles.summaryImg}
|
|
113
|
+
/>
|
|
114
|
+
<View>
|
|
115
|
+
<Text style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
|
|
116
|
+
</View>
|
|
117
|
+
</View>
|
|
118
|
+
<View style={styles.summaryRight}>
|
|
119
|
+
{props.actions}
|
|
67
120
|
</View>
|
|
68
|
-
</View>
|
|
69
|
-
<View style={styles.summaryRight}>
|
|
70
|
-
{props.actions}
|
|
71
|
-
</View>
|
|
72
121
|
</View>}
|
|
73
122
|
</View>
|
|
74
123
|
</View>
|
|
75
124
|
)
|
|
76
125
|
}
|
|
77
126
|
|
|
78
|
-
|
|
79
|
-
cardContainer: {
|
|
80
|
-
marginHorizontal: cx(24),
|
|
81
|
-
},
|
|
82
|
-
itemTitle: {
|
|
83
|
-
color: '#000',
|
|
84
|
-
fontSize: cx(16),
|
|
85
|
-
fontWeight: 'bold',
|
|
86
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
87
|
-
},
|
|
88
|
-
summaryContainer: {
|
|
89
|
-
flex: 1,
|
|
90
|
-
flexDirection: 'row',
|
|
91
|
-
marginBottom: cx(10),
|
|
92
|
-
},
|
|
93
|
-
summaryLeft: {
|
|
94
|
-
flexDirection: 'row',
|
|
95
|
-
alignItems: 'center',
|
|
96
|
-
minWidth: cx(100)
|
|
97
|
-
},
|
|
98
|
-
summaryImg: {
|
|
99
|
-
width: cx(12),
|
|
100
|
-
height: cx(12),
|
|
101
|
-
marginRight: cx(6)
|
|
102
|
-
},
|
|
103
|
-
leftTitle: {
|
|
104
|
-
fontSize: cx(14),
|
|
105
|
-
color: '#000'
|
|
106
|
-
},
|
|
107
|
-
summaryRight: {
|
|
108
|
-
flex: 1,
|
|
109
|
-
flexDirection: 'column',
|
|
110
|
-
marginLeft: cx(15),
|
|
111
|
-
},
|
|
112
|
-
rightWrap: {
|
|
113
|
-
borderRadius: cx(16),
|
|
114
|
-
paddingHorizontal: cx(12),
|
|
115
|
-
alignSelf: 'flex-start',
|
|
116
|
-
backgroundColor: '#cbcbcb',
|
|
117
|
-
},
|
|
118
|
-
rightItem: {
|
|
119
|
-
color: '#000',
|
|
120
|
-
},
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
export default memo(Summary)
|
|
127
|
+
export default memo(withTheme(Summary))
|
|
@@ -8,6 +8,7 @@ import Card from '@ledvance/base/src/components/Card'
|
|
|
8
8
|
import res from '@ledvance/base/src/res'
|
|
9
9
|
|
|
10
10
|
const cx = Utils.RatioUtils.convertX
|
|
11
|
+
const { withTheme } = Utils.ThemeUtils
|
|
11
12
|
|
|
12
13
|
export interface SelectPageData<T> {
|
|
13
14
|
text: string
|
|
@@ -21,9 +22,71 @@ export interface SelectPageParams<T> {
|
|
|
21
22
|
onSelect: (selectPageData: SelectPageData<T>) => void
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
const SelectPage = () => {
|
|
25
|
+
const SelectPage = (props: { theme?: any }) => {
|
|
25
26
|
const params = useRoute().params as SelectPageParams<any>
|
|
26
27
|
const navigation = useNavigation()
|
|
28
|
+
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
root: {
|
|
31
|
+
flex: 1,
|
|
32
|
+
},
|
|
33
|
+
topBar: {
|
|
34
|
+
height: cx(91),
|
|
35
|
+
backgroundColor: props.theme.card.head,
|
|
36
|
+
},
|
|
37
|
+
line: {
|
|
38
|
+
height: cx(1),
|
|
39
|
+
backgroundColor: props.theme.container.divider,
|
|
40
|
+
},
|
|
41
|
+
topContent: {
|
|
42
|
+
height: cx(45),
|
|
43
|
+
flexDirection: 'row',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
},
|
|
46
|
+
cancel: {
|
|
47
|
+
marginStart: cx(16),
|
|
48
|
+
color: props.theme.button.cancel,
|
|
49
|
+
fontSize: cx(17),
|
|
50
|
+
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
51
|
+
},
|
|
52
|
+
title: {
|
|
53
|
+
width: '100%',
|
|
54
|
+
position: 'absolute',
|
|
55
|
+
start: 0,
|
|
56
|
+
textAlign: 'center',
|
|
57
|
+
color: props.theme.global.fontColor,
|
|
58
|
+
fontSize: cx(17),
|
|
59
|
+
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
60
|
+
},
|
|
61
|
+
card: {
|
|
62
|
+
backgroundColor: props.theme.card.background,
|
|
63
|
+
marginHorizontal: cx(16),
|
|
64
|
+
},
|
|
65
|
+
item: {
|
|
66
|
+
height: cx(44),
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
},
|
|
70
|
+
itemText: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
marginStart: cx(13),
|
|
73
|
+
color: props.theme.global.fontColor,
|
|
74
|
+
fontSize: cx(17),
|
|
75
|
+
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
76
|
+
},
|
|
77
|
+
itemLine: {
|
|
78
|
+
height: cx(1),
|
|
79
|
+
marginStart: cx(13),
|
|
80
|
+
backgroundColor: props.theme.container.divider,
|
|
81
|
+
},
|
|
82
|
+
itemIcon: {
|
|
83
|
+
width: cx(30),
|
|
84
|
+
height: cx(30),
|
|
85
|
+
marginEnd: cx(13),
|
|
86
|
+
tintColor: props.theme.icon.primary,
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
|
|
27
90
|
return (
|
|
28
91
|
<View style={styles.root}>
|
|
29
92
|
<View style={styles.topBar}>
|
|
@@ -76,64 +139,4 @@ const SelectPage = () => {
|
|
|
76
139
|
)
|
|
77
140
|
}
|
|
78
141
|
|
|
79
|
-
|
|
80
|
-
root: {
|
|
81
|
-
flex: 1,
|
|
82
|
-
},
|
|
83
|
-
topBar: {
|
|
84
|
-
height: cx(91),
|
|
85
|
-
backgroundColor: '#eaeaea',
|
|
86
|
-
},
|
|
87
|
-
line: {
|
|
88
|
-
height: cx(1),
|
|
89
|
-
backgroundColor: '#d9d9d9',
|
|
90
|
-
},
|
|
91
|
-
topContent: {
|
|
92
|
-
height: cx(45),
|
|
93
|
-
flexDirection: 'row',
|
|
94
|
-
alignItems: 'center',
|
|
95
|
-
},
|
|
96
|
-
cancel: {
|
|
97
|
-
marginStart: cx(16),
|
|
98
|
-
color: '#f60',
|
|
99
|
-
fontSize: cx(17),
|
|
100
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
101
|
-
},
|
|
102
|
-
title: {
|
|
103
|
-
width: '100%',
|
|
104
|
-
position: 'absolute',
|
|
105
|
-
start: 0,
|
|
106
|
-
textAlign: 'center',
|
|
107
|
-
color: '#000',
|
|
108
|
-
fontSize: cx(17),
|
|
109
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
110
|
-
},
|
|
111
|
-
card: {
|
|
112
|
-
marginHorizontal: cx(16),
|
|
113
|
-
},
|
|
114
|
-
item: {
|
|
115
|
-
height: cx(44),
|
|
116
|
-
flexDirection: 'row',
|
|
117
|
-
alignItems: 'center',
|
|
118
|
-
},
|
|
119
|
-
itemText: {
|
|
120
|
-
flex: 1,
|
|
121
|
-
marginStart: cx(13),
|
|
122
|
-
color: '#000',
|
|
123
|
-
fontSize: cx(17),
|
|
124
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
125
|
-
},
|
|
126
|
-
itemLine: {
|
|
127
|
-
height: cx(1),
|
|
128
|
-
marginStart: cx(13),
|
|
129
|
-
backgroundColor: '#ccc',
|
|
130
|
-
},
|
|
131
|
-
itemIcon: {
|
|
132
|
-
width: cx(30),
|
|
133
|
-
height: cx(30),
|
|
134
|
-
marginEnd: cx(13),
|
|
135
|
-
tintColor: '#f60',
|
|
136
|
-
},
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
export default SelectPage
|
|
142
|
+
export default withTheme(SelectPage)
|
|
@@ -13,8 +13,9 @@ import Spacer from "@ledvance/base/src/components/Spacer";
|
|
|
13
13
|
import Stepper from '@ledvance/base/src/components/Stepper'
|
|
14
14
|
|
|
15
15
|
const {convertX: cx} = Utils.RatioUtils
|
|
16
|
+
const { withTheme } = Utils.ThemeUtils
|
|
16
17
|
|
|
17
|
-
const SwitchGradientPage = () => {
|
|
18
|
+
const SwitchGradientPage = (props: { theme?: any }) => {
|
|
18
19
|
const devInfo = useDeviceInfo()
|
|
19
20
|
const navigation = useNavigation()
|
|
20
21
|
const [
|
|
@@ -34,6 +35,27 @@ const SwitchGradientPage = () => {
|
|
|
34
35
|
state.switchOffDuration = switchOffDuration
|
|
35
36
|
}, [switchOnDuration, switchOffDuration])
|
|
36
37
|
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
stepCard: {
|
|
41
|
+
marginHorizontal: cx(24),
|
|
42
|
+
paddingHorizontal: cx(16),
|
|
43
|
+
},
|
|
44
|
+
stepTitle: {
|
|
45
|
+
color: props.theme.global.fontColor,
|
|
46
|
+
fontSize: cx(14),
|
|
47
|
+
},
|
|
48
|
+
stepGroup: {
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
},
|
|
52
|
+
stepText: {
|
|
53
|
+
flex: 1,
|
|
54
|
+
color: props.theme.global.fontColor,
|
|
55
|
+
fontSize: cx(16),
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
|
|
37
59
|
return (
|
|
38
60
|
<Page
|
|
39
61
|
backText={devInfo.name}
|
|
@@ -92,24 +114,4 @@ const SwitchGradientPage = () => {
|
|
|
92
114
|
)
|
|
93
115
|
}
|
|
94
116
|
|
|
95
|
-
|
|
96
|
-
stepCard: {
|
|
97
|
-
marginHorizontal: cx(24),
|
|
98
|
-
paddingHorizontal: cx(16),
|
|
99
|
-
},
|
|
100
|
-
stepTitle: {
|
|
101
|
-
color: '#000',
|
|
102
|
-
fontSize: cx(14),
|
|
103
|
-
},
|
|
104
|
-
stepGroup: {
|
|
105
|
-
flexDirection: 'row',
|
|
106
|
-
alignItems: 'center',
|
|
107
|
-
},
|
|
108
|
-
stepText: {
|
|
109
|
-
flex: 1,
|
|
110
|
-
color: '#000',
|
|
111
|
-
fontSize: cx(16),
|
|
112
|
-
},
|
|
113
|
-
})
|
|
114
|
-
|
|
115
|
-
export default SwitchGradientPage
|
|
117
|
+
export default withTheme(SwitchGradientPage)
|