@ledvance/group-ui-biz-bundle 1.0.75 → 1.0.77

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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/modules/biorhythm/BiorhythmPage.tsx +1 -1
  3. package/src/modules/energyConsumption/EnergyConsumptionChart.tsx +22 -30
  4. package/src/modules/energyConsumption/EnergyConsumptionDetail.tsx +2 -2
  5. package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +1 -1
  6. package/src/modules/energyConsumption/component/Overview.tsx +1 -1
  7. package/src/modules/fixedTimeForPlug/FixedTimeForPlugDetailPage.tsx +67 -86
  8. package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +44 -58
  9. package/src/modules/fixedTimeForPlug/ItemCard.tsx +29 -26
  10. package/src/modules/fixedTimeForPlug/Summary.tsx +62 -58
  11. package/src/modules/lightMode/LightModePage.tsx +2 -2
  12. package/src/modules/mood_new/AddMoodPage.tsx +16 -15
  13. package/src/modules/mood_new/MixDynamicMoodEditor.tsx +108 -104
  14. package/src/modules/mood_new/MoodItem.tsx +59 -54
  15. package/src/modules/mood_new/MoodPage.tsx +42 -40
  16. package/src/modules/mood_new/StaticMoodEditorPage.tsx +39 -46
  17. package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +5 -2
  18. package/src/modules/randomTimeForPlug/ItemCard.tsx +29 -26
  19. package/src/modules/randomTimeForPlug/RandomTimeForPlugDetailPage.tsx +46 -81
  20. package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +58 -67
  21. package/src/modules/randomTimeForPlug/Summary.tsx +62 -58
  22. package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +1 -1
  23. package/src/modules/sleepWakeUp/SleepWakeUpPage.tsx +1 -1
  24. package/src/modules/swithInching/SwithInching.tsx +3 -2
  25. package/src/modules/timeSchedule/Interface.ts +3 -1
  26. package/src/modules/timeSchedule/TimeScheduleDetailPage.tsx +175 -190
  27. package/src/modules/timeSchedule/TimeSchedulePage.tsx +55 -54
  28. package/src/modules/timeSchedule/components/ManuaSettings.tsx +11 -10
  29. package/src/modules/timeSchedule/components/ScheduleCard.tsx +47 -63
  30. package/src/modules/timeSchedule/components/Summary.tsx +63 -59
  31. package/src/modules/timer/TimerAction.ts +15 -2
  32. package/src/modules/timer/TimerPage.tsx +120 -117
  33. package/src/modules/swithInching/pickerView.tsx +0 -91
@@ -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
- <View style={styles.summaryLeft}>
60
- <Image
61
- source={res.summary_icon3}
62
- resizeMode="contain"
63
- style={styles.summaryImg}
64
- />
65
- <View>
66
- <Text style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
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
- const styles = StyleSheet.create({
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))
@@ -60,7 +60,7 @@ const LightModePage = (props: { theme?: any }) => {
60
60
  },
61
61
  modeSelectGroup: {
62
62
  marginHorizontal: cx(24),
63
- backgroundColor: props.theme.card.board,
63
+ backgroundColor: props.theme.container.background,
64
64
  borderRadius: cx(4),
65
65
  },
66
66
  modeTip: {
@@ -76,7 +76,7 @@ const LightModePage = (props: { theme?: any }) => {
76
76
  line: {
77
77
  height: cx(1),
78
78
  marginHorizontal: cx(12),
79
- backgroundColor: '#3C3C435B',
79
+ backgroundColor: props.theme.container.divider,
80
80
  },
81
81
  itemRoot: {
82
82
  flexDirection: 'row',
@@ -19,6 +19,7 @@ import { difference, head, range } from 'lodash';
19
19
  import { RecommendMood, getRecommendMixMoods, getRecommendMoods } from './MoodInfo';
20
20
 
21
21
  const cx = Utils.RatioUtils.convertX;
22
+ const { withTheme } = Utils.ThemeUtils
22
23
 
23
24
  export interface AddMoodPageParams {
24
25
  isStatic: boolean;
@@ -32,7 +33,7 @@ interface AddMoodPageState {
32
33
  data: RecommendMood[];
33
34
  }
34
35
 
35
- const AddMoodPage = () => {
36
+ const AddMoodPage = (props: { theme?: any }) => {
36
37
  const navigation = useNavigation();
37
38
  const routeParams = useRoute().params as AddMoodPageParams;
38
39
  const moduleParams = routeParams.moduleParams;
@@ -77,6 +78,19 @@ const AddMoodPage = () => {
77
78
  [routeParams]
78
79
  );
79
80
 
81
+ const styles = StyleSheet.create({
82
+ root: {
83
+ flex: 1,
84
+ flexDirection: 'column',
85
+ },
86
+ desc: {
87
+ color: props.theme.global.fontColor,
88
+ fontSize: cx(16),
89
+ marginHorizontal: cx(24),
90
+ marginTop: cx(12),
91
+ },
92
+ })
93
+
80
94
  return (
81
95
  <Page
82
96
  backText={Strings.getLang('add_new_static_mood_system_back')}
@@ -120,20 +134,7 @@ const AddMoodPage = () => {
120
134
  );
121
135
  };
122
136
 
123
- const styles = StyleSheet.create({
124
- root: {
125
- flex: 1,
126
- flexDirection: 'column',
127
- },
128
- desc: {
129
- color: '#000',
130
- fontSize: cx(16),
131
- marginHorizontal: cx(24),
132
- marginTop: cx(12),
133
- },
134
- });
135
-
136
- export default AddMoodPage;
137
+ export default withTheme(AddMoodPage)
137
138
 
138
139
  const defStripConfig = {
139
140
  version: 0,
@@ -41,6 +41,7 @@ import { useParams } from '@ledvance/base/src/hooks/Hooks';
41
41
  import { showDialog } from '@ledvance/base/src/utils/common';
42
42
 
43
43
  const cx = Utils.RatioUtils.convertX;
44
+ const { withTheme } = Utils.ThemeUtils
44
45
  interface MixDynamicMoodEditorPageState extends StaticMoodEditorPageState {
45
46
  mainBucketSelected: boolean;
46
47
  secondaryBucketSelected: boolean;
@@ -48,7 +49,7 @@ interface MixDynamicMoodEditorPageState extends StaticMoodEditorPageState {
48
49
  secondaryIdx: number;
49
50
  sceneMode: StripLightMoodMode;
50
51
  }
51
- const MixDynamicMoodEditorPage = () => {
52
+ const MixDynamicMoodEditorPage = (props: { theme?: any }) => {
52
53
  const navigation = useNavigation();
53
54
  const routeParams = useParams<StaticMoodEditorPageParams>();
54
55
  const params = cloneDeep(routeParams);
@@ -143,6 +144,98 @@ const MixDynamicMoodEditorPage = () => {
143
144
  return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
144
145
  }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
145
146
 
147
+ const styles = StyleSheet.create({
148
+ root: {
149
+ flex: 1,
150
+ flexDirection: 'column',
151
+ },
152
+ name: {
153
+ marginHorizontal: cx(24),
154
+ },
155
+ adjustCard: {
156
+ marginVertical: cx(12),
157
+ marginHorizontal: cx(24),
158
+ },
159
+ fanAdjustCard: {
160
+ marginHorizontal: cx(24),
161
+ },
162
+ lightLine: {
163
+ flexDirection: 'row',
164
+ marginHorizontal: cx(16),
165
+ },
166
+ light: {
167
+ color: props.theme.global.fontColor,
168
+ fontSize: cx(18),
169
+ fontFamily: 'helvetica_neue_lt_std_bd',
170
+ },
171
+ transitionMode: {
172
+ marginHorizontal: cx(16),
173
+ },
174
+ preview: {
175
+ width: cx(20),
176
+ height: cx(20),
177
+ marginStart: cx(12),
178
+ borderRadius: cx(4),
179
+ },
180
+ nodesAdjust: {
181
+ flexDirection: 'row',
182
+ alignItems: 'center',
183
+ },
184
+ adjustButtons: {
185
+ width: cx(44),
186
+ marginStart: cx(16),
187
+ },
188
+ adjustButton: {
189
+ width: cx(44),
190
+ height: cx(44),
191
+ },
192
+ nodeList: {
193
+ flex: 1,
194
+ marginHorizontal: cx(16),
195
+ },
196
+ nodeItem: {
197
+ flexDirection: 'row',
198
+ alignItems: 'center',
199
+ },
200
+ nodeBlock: {
201
+ flex: 1,
202
+ height: cx(40),
203
+ borderRadius: cx(8),
204
+ },
205
+ nodeDeleteBtn: {
206
+ width: cx(24),
207
+ height: cx(30),
208
+ justifyContent: 'center',
209
+ alignItems: 'center',
210
+ },
211
+ nodeDeleteIcon: {
212
+ width: cx(16),
213
+ height: cx(16),
214
+ },
215
+ nodeAddBtn: {
216
+ height: cx(40),
217
+ justifyContent: 'center',
218
+ alignItems: 'center',
219
+ marginEnd: cx(26),
220
+ borderRadius: cx(8),
221
+ borderWidth: cx(1),
222
+ borderStyle: 'dashed',
223
+ borderColor: props.theme.addNode.border,
224
+ backgroundColor: props.theme.addNode.background,
225
+ },
226
+ deleteBtn: {
227
+ width: '100%',
228
+ height: cx(50),
229
+ backgroundColor: props.theme.button.delete,
230
+ borderRadius: cx(8),
231
+ },
232
+ deleteBtnText: {
233
+ color: props.theme.button.fontColor,
234
+ fontSize: cx(16),
235
+ fontFamily: 'helvetica_neue_lt_std_bd',
236
+ },
237
+ })
238
+
146
239
  return (
147
240
  <Page
148
241
  backText={I18n.getLang('mesh_device_detail_mode')}
@@ -193,7 +286,7 @@ const MixDynamicMoodEditorPage = () => {
193
286
  }}
194
287
  maxLength={33}
195
288
  showError={state.mood.name.length > 32 || nameRepeat}
196
- tipColor={nameRepeat ? '#f00' : undefined}
289
+ tipColor={nameRepeat ? props.theme.global.error : undefined}
197
290
  tipIcon={nameRepeat ? res.ic_text_field_input_error : undefined}
198
291
  errorText={I18n.getLang(
199
292
  nameRepeat ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text'
@@ -202,7 +295,7 @@ const MixDynamicMoodEditorPage = () => {
202
295
  <Card style={styles.adjustCard}>
203
296
  <LdvSwitch
204
297
  title={I18n.getLang('light_sources_tile_main_lighting_headline')}
205
- color="#fff"
298
+ color={props.theme.card.background}
206
299
  colorAlpha={1}
207
300
  enable={!!state.mood.mainLamp.enable}
208
301
  setEnable={v => {
@@ -272,7 +365,7 @@ const MixDynamicMoodEditorPage = () => {
272
365
  <Image
273
366
  style={[
274
367
  styles.adjustButton,
275
- { tintColor: state.mainBucketSelected ? '#f60' : '#666' },
368
+ { tintColor: state.mainBucketSelected ? props.theme.icon.primary : props.theme.icon.normal },
276
369
  ]}
277
370
  source={res.ic_paint_bucket}
278
371
  />
@@ -285,7 +378,7 @@ const MixDynamicMoodEditorPage = () => {
285
378
  <Image
286
379
  style={[
287
380
  styles.adjustButton,
288
- { tintColor: state.mainBucketSelected ? '#666' : '#f60' },
381
+ { tintColor: state.mainBucketSelected ? props.theme.icon.normal : props.theme.icon.primary },
289
382
  ]}
290
383
  source={res.ic_colorize}
291
384
  />
@@ -321,7 +414,7 @@ const MixDynamicMoodEditorPage = () => {
321
414
  style={[
322
415
  styles.nodeDeleteIcon,
323
416
  {
324
- tintColor: state.mood.mainLamp.nodes.length < 3 ? '#ccc' : '#666',
417
+ tintColor: state.mood.mainLamp.nodes.length < 3 ? props.theme.icon.disable : props.theme.icon.normal,
325
418
  },
326
419
  ]}
327
420
  source={res.ic_mood_del}
@@ -353,7 +446,7 @@ const MixDynamicMoodEditorPage = () => {
353
446
  style={{
354
447
  width: cx(18),
355
448
  height: cx(18),
356
- tintColor: '#000',
449
+ tintColor: props.theme.addNode.fontColor,
357
450
  }}
358
451
  source={{ uri: res.add }}
359
452
  />
@@ -397,7 +490,7 @@ const MixDynamicMoodEditorPage = () => {
397
490
  <Card style={styles.adjustCard}>
398
491
  <LdvSwitch
399
492
  title={I18n.getLang('light_sources_tile_sec_lighting_headline')}
400
- color={'#fff'}
493
+ color={props.theme.card.background}
401
494
  colorAlpha={1}
402
495
  enable={!!state.mood.secondaryLamp.enable}
403
496
  setEnable={v => {
@@ -537,7 +630,7 @@ const MixDynamicMoodEditorPage = () => {
537
630
  <Image
538
631
  style={[
539
632
  styles.adjustButton,
540
- { tintColor: state.secondaryBucketSelected ? '#f60' : '#666' },
633
+ { tintColor: state.secondaryBucketSelected ? props.theme.icon.primary : props.theme.icon.normal },
541
634
  ]}
542
635
  source={res.ic_paint_bucket}
543
636
  />
@@ -550,7 +643,7 @@ const MixDynamicMoodEditorPage = () => {
550
643
  <Image
551
644
  style={[
552
645
  styles.adjustButton,
553
- { tintColor: state.secondaryBucketSelected ? '#666' : '#f60' },
646
+ { tintColor: state.secondaryBucketSelected ? props.theme.icon.normal : props.theme.icon.primary },
554
647
  ]}
555
648
  source={res.ic_colorize}
556
649
  />
@@ -586,7 +679,7 @@ const MixDynamicMoodEditorPage = () => {
586
679
  styles.nodeDeleteIcon,
587
680
  {
588
681
  tintColor:
589
- state.mood.secondaryLamp.nodes.length < 3 ? '#ccc' : '#666',
682
+ state.mood.secondaryLamp.nodes.length < 3 ? props.theme.icon.disable : props.theme.icon.normal,
590
683
  },
591
684
  ]}
592
685
  source={res.ic_mood_del}
@@ -618,7 +711,7 @@ const MixDynamicMoodEditorPage = () => {
618
711
  style={{
619
712
  width: cx(18),
620
713
  height: cx(18),
621
- tintColor: '#000',
714
+ tintColor: props.theme.addNode.fontColor,
622
715
  }}
623
716
  source={{ uri: res.add }}
624
717
  />
@@ -698,98 +791,9 @@ const MixDynamicMoodEditorPage = () => {
698
791
  </Page>
699
792
  );
700
793
  };
701
- const styles = StyleSheet.create({
702
- root: {
703
- flex: 1,
704
- flexDirection: 'column',
705
- },
706
- name: {
707
- marginHorizontal: cx(24),
708
- },
709
- adjustCard: {
710
- marginVertical: cx(12),
711
- marginHorizontal: cx(24),
712
- },
713
- fanAdjustCard: {
714
- marginHorizontal: cx(24),
715
- },
716
- lightLine: {
717
- flexDirection: 'row',
718
- marginHorizontal: cx(16),
719
- },
720
- light: {
721
- color: '#000',
722
- fontSize: cx(18),
723
- fontFamily: 'helvetica_neue_lt_std_bd',
724
- },
725
- transitionMode: {
726
- marginHorizontal: cx(16),
727
- },
728
- preview: {
729
- width: cx(20),
730
- height: cx(20),
731
- marginStart: cx(12),
732
- borderRadius: cx(4),
733
- },
734
- nodesAdjust: {
735
- flexDirection: 'row',
736
- alignItems: 'center',
737
- },
738
- adjustButtons: {
739
- width: cx(44),
740
- marginStart: cx(16),
741
- },
742
- adjustButton: {
743
- width: cx(44),
744
- height: cx(44),
745
- },
746
- nodeList: {
747
- flex: 1,
748
- marginHorizontal: cx(16),
749
- },
750
- nodeItem: {
751
- flexDirection: 'row',
752
- alignItems: 'center',
753
- },
754
- nodeBlock: {
755
- flex: 1,
756
- height: cx(40),
757
- borderRadius: cx(8),
758
- },
759
- nodeDeleteBtn: {
760
- width: cx(24),
761
- height: cx(30),
762
- justifyContent: 'center',
763
- alignItems: 'center',
764
- },
765
- nodeDeleteIcon: {
766
- width: cx(16),
767
- height: cx(16),
768
- },
769
- nodeAddBtn: {
770
- height: cx(40),
771
- justifyContent: 'center',
772
- alignItems: 'center',
773
- marginEnd: cx(26),
774
- borderRadius: cx(8),
775
- borderWidth: cx(1),
776
- borderStyle: 'dashed',
777
- borderColor: '#666',
778
- backgroundColor: '#f6f6f6',
779
- },
780
- deleteBtn: {
781
- width: '100%',
782
- height: cx(50),
783
- backgroundColor: '#666',
784
- borderRadius: cx(8),
785
- },
786
- deleteBtnText: {
787
- color: '#fff',
788
- fontSize: cx(16),
789
- fontFamily: 'helvetica_neue_lt_std_bd',
790
- },
791
- });
792
- export default MixDynamicMoodEditorPage;
794
+
795
+ export default withTheme(MixDynamicMoodEditorPage)
796
+
793
797
  export function getTransitionModeString(transitionMode: MoodNodeTransitionMode): string {
794
798
  if (transitionMode === MoodNodeTransitionMode.Jump) {
795
799
  return I18n.getLang('other_lights_modes_jump_text');
@@ -12,6 +12,7 @@ import I18n from '@ledvance/base/src/i18n';
12
12
  import res from '@ledvance/base/src/res';
13
13
 
14
14
  const cx = Utils.RatioUtils.convertX;
15
+ const { withTheme } = Utils.ThemeUtils
15
16
 
16
17
  interface LightCategory {
17
18
  isMixLight?: boolean
@@ -21,6 +22,7 @@ interface LightCategory {
21
22
  }
22
23
 
23
24
  interface MoodItemProps extends ViewProps {
25
+ theme?: any
24
26
  enable: boolean;
25
27
  isMix: boolean;
26
28
  mood: MoodUIInfo;
@@ -37,8 +39,43 @@ const MoodItem = (props: MoodItemProps) => {
37
39
  }, [mood.mainLamp.nodes, mood.secondaryLamp.nodes]);
38
40
 
39
41
  const gradientMode = useMemo(() => (
40
- deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
42
+ deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
41
43
  ), [MoodJumpGradientMode, deviceTypeOption])
44
+
45
+ const styles = StyleSheet.create({
46
+ card: {
47
+ marginHorizontal: cx(24),
48
+ },
49
+ headline: {
50
+ flexDirection: 'row',
51
+ marginHorizontal: cx(16),
52
+ },
53
+ headText: {
54
+ flex: 1,
55
+ color: props.theme.global.fontColor,
56
+ fontSize: cx(16),
57
+ fontFamily: 'helvetica_neue_lt_std_bd',
58
+ lineHeight: cx(20),
59
+ },
60
+ moodTypeItem: {
61
+ flexDirection: 'row',
62
+ },
63
+ moodTypeLabel: {
64
+ marginStart: cx(16),
65
+ paddingHorizontal: cx(12.5),
66
+ backgroundColor: props.theme.tag.background,
67
+ borderRadius: cx(8),
68
+ },
69
+ moodTypeLabelText: {
70
+ height: cx(16),
71
+ color: props.theme.tag.fontColor,
72
+ fontSize: cx(10),
73
+ textAlignVertical: 'center',
74
+ fontFamily: 'helvetica_neue_lt_std_roman',
75
+ lineHeight: cx(16),
76
+ },
77
+ });
78
+
42
79
  return (
43
80
  <Card style={[styles.card, props.style]} onPress={props.onPress}>
44
81
  <View>
@@ -75,7 +112,7 @@ const MoodItem = (props: MoodItemProps) => {
75
112
  );
76
113
  };
77
114
 
78
- export default MoodItem;
115
+ export default withTheme(MoodItem)
79
116
 
80
117
  export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boolean, type: 'gradient' | 'separate' }) {
81
118
  const { mixSubLight, isMix } = props;
@@ -84,6 +121,26 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
84
121
  ? hsv2Hex(n.h, Math.round(n.s), Math.round(mapFloatToRange(n.v / 100, 50, 100)))
85
122
  : cctToColor(n.colorTemp.toFixed());
86
123
  }) : ['#eee'];
124
+
125
+ const styles = StyleSheet.create({
126
+ gradientItem: {
127
+ flexDirection: 'row',
128
+ },
129
+ gradientItemIconView: {
130
+ width: cx(24),
131
+ height: cx(24),
132
+ justifyContent: 'center',
133
+ alignItems: 'center',
134
+ backgroundColor: '#aaa',
135
+ borderRadius: cx(8),
136
+ },
137
+ gradientItemIcon: {
138
+ width: cx(16),
139
+ height: cx(16),
140
+ tintColor: '#fff',
141
+ },
142
+ })
143
+
87
144
  return (
88
145
  <View style={styles.gradientItem}>
89
146
  <Spacer height={0} width={cx(16)} />
@@ -105,55 +162,3 @@ export function MixMoodColorsLine(props: { mixSubLight: MoodLampInfo; isMix: boo
105
162
  );
106
163
  }
107
164
 
108
- const styles = StyleSheet.create({
109
- card: {
110
- marginHorizontal: cx(24),
111
- },
112
- headline: {
113
- flexDirection: 'row',
114
- marginHorizontal: cx(16),
115
- },
116
- headText: {
117
- flex: 1,
118
- color: '#000',
119
- fontSize: cx(16),
120
- fontFamily: 'helvetica_neue_lt_std_bd',
121
- lineHeight: cx(20),
122
- },
123
- gradientItem: {
124
- flexDirection: 'row',
125
- },
126
- gradientItemIconView: {
127
- width: cx(24),
128
- height: cx(24),
129
- justifyContent: 'center',
130
- alignItems: 'center',
131
- backgroundColor: '#aaa',
132
- borderRadius: cx(8),
133
- },
134
- gradientItemIcon: {
135
- width: cx(16),
136
- height: cx(16),
137
- tintColor: '#fff',
138
- },
139
- gradient: {
140
- borderRadius: cx(8),
141
- },
142
- moodTypeItem: {
143
- flexDirection: 'row',
144
- },
145
- moodTypeLabel: {
146
- marginStart: cx(16),
147
- paddingHorizontal: cx(12.5),
148
- backgroundColor: '#E6E7E8',
149
- borderRadius: cx(8),
150
- },
151
- moodTypeLabelText: {
152
- height: cx(16),
153
- color: '#000000DD',
154
- fontSize: cx(10),
155
- textAlignVertical: 'center',
156
- fontFamily: 'helvetica_neue_lt_std_roman',
157
- lineHeight: cx(16),
158
- },
159
- });