@ledvance/group-ui-biz-bundle 1.0.79 → 1.0.81

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.
@@ -43,6 +43,7 @@ import { showDialog } from '@ledvance/base/src/utils/common';
43
43
  import { useParams } from '@ledvance/base/src/hooks/Hooks';
44
44
 
45
45
  const cx = Utils.RatioUtils.convertX;
46
+ const { withTheme } = Utils.ThemeUtils
46
47
  interface DynamicMoodEditorPageState {
47
48
  headline: string;
48
49
  mood: MoodUIInfo;
@@ -50,9 +51,9 @@ interface DynamicMoodEditorPageState {
50
51
  mainBucketSelected: boolean;
51
52
  sceneMode: StripLightMoodMode;
52
53
  loading: boolean;
53
-
54
+
54
55
  }
55
- const DynamicMoodEditorPage = () => {
56
+ const DynamicMoodEditorPage = (props: { theme?: any }) => {
56
57
  const navigation = useNavigation();
57
58
  const routeParams = useParams<StaticMoodEditorPageParams>()
58
59
  const params = cloneDeep(routeParams);
@@ -135,6 +136,98 @@ const DynamicMoodEditorPage = () => {
135
136
  return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
136
137
  }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
137
138
 
139
+ const styles = StyleSheet.create({
140
+ root: {
141
+ flex: 1,
142
+ flexDirection: 'column',
143
+ },
144
+ name: {
145
+ marginHorizontal: cx(24),
146
+ },
147
+ adjustCard: {
148
+ marginVertical: cx(12),
149
+ marginHorizontal: cx(24),
150
+ },
151
+ fanAdjustCard: {
152
+ marginHorizontal: cx(24),
153
+ },
154
+ lightLine: {
155
+ flexDirection: 'row',
156
+ marginHorizontal: cx(16),
157
+ },
158
+ light: {
159
+ color: props.theme.global.fontColor,
160
+ fontSize: cx(18),
161
+ fontFamily: 'helvetica_neue_lt_std_bd',
162
+ },
163
+ transitionMode: {
164
+ marginHorizontal: cx(16),
165
+ },
166
+ preview: {
167
+ width: cx(20),
168
+ height: cx(20),
169
+ marginStart: cx(12),
170
+ borderRadius: cx(4),
171
+ },
172
+ nodesAdjust: {
173
+ flexDirection: 'row',
174
+ alignItems: 'center',
175
+ },
176
+ adjustButtons: {
177
+ width: cx(44),
178
+ marginStart: cx(16),
179
+ },
180
+ adjustButton: {
181
+ width: cx(44),
182
+ height: cx(44),
183
+ },
184
+ nodeList: {
185
+ flex: 1,
186
+ marginHorizontal: cx(16),
187
+ },
188
+ nodeItem: {
189
+ flexDirection: 'row',
190
+ alignItems: 'center',
191
+ },
192
+ nodeBlock: {
193
+ flex: 1,
194
+ height: cx(40),
195
+ borderRadius: cx(8),
196
+ },
197
+ nodeDeleteBtn: {
198
+ width: cx(24),
199
+ height: cx(30),
200
+ justifyContent: 'center',
201
+ alignItems: 'center',
202
+ },
203
+ nodeDeleteIcon: {
204
+ width: cx(16),
205
+ height: cx(16),
206
+ },
207
+ nodeAddBtn: {
208
+ height: cx(40),
209
+ justifyContent: 'center',
210
+ alignItems: 'center',
211
+ marginEnd: cx(26),
212
+ borderRadius: cx(8),
213
+ borderWidth: cx(1),
214
+ borderStyle: 'dashed',
215
+ borderColor: props.theme.addNode.border,
216
+ backgroundColor: props.theme.addNode.background,
217
+ },
218
+ deleteBtn: {
219
+ width: '100%',
220
+ height: cx(50),
221
+ backgroundColor: props.theme.button.delete,
222
+ borderRadius: cx(8),
223
+ },
224
+ deleteBtnText: {
225
+ color: props.theme.button.fontColor,
226
+ fontSize: cx(16),
227
+ fontFamily: 'helvetica_neue_lt_std_bd',
228
+ },
229
+ })
230
+
138
231
  return (
139
232
  <Page
140
233
  backText={I18n.getLang('mesh_device_detail_mode')}
@@ -173,7 +266,7 @@ const DynamicMoodEditorPage = () => {
173
266
  }}
174
267
  maxLength={33}
175
268
  showError={state.mood.name.length > 32 || nameRepeat}
176
- tipColor={nameRepeat ? '#f00' : undefined}
269
+ tipColor={nameRepeat ? props.theme.global.error : undefined}
177
270
  tipIcon={nameRepeat ? res.ic_text_field_input_error : undefined}
178
271
  errorText={I18n.getLang(
179
272
  nameRepeat ? 'string_light_pp_field_sm_add_error1' : 'add_new_dynamic_mood_alert_text'
@@ -290,7 +383,7 @@ const DynamicMoodEditorPage = () => {
290
383
  <Image
291
384
  style={[
292
385
  styles.adjustButton,
293
- { tintColor: state.mainBucketSelected ? '#f60' : '#666' },
386
+ { tintColor: state.mainBucketSelected ? props.theme.icon.primary : props.theme.icon.normal },
294
387
  ]}
295
388
  source={res.ic_paint_bucket}
296
389
  />
@@ -303,7 +396,7 @@ const DynamicMoodEditorPage = () => {
303
396
  <Image
304
397
  style={[
305
398
  styles.adjustButton,
306
- { tintColor: state.mainBucketSelected ? '#666' : '#f60' },
399
+ { tintColor: state.mainBucketSelected ? props.theme.icon.normal : props.theme.icon.primary },
307
400
  ]}
308
401
  source={res.ic_colorize}
309
402
  />
@@ -338,7 +431,7 @@ const DynamicMoodEditorPage = () => {
338
431
  style={[
339
432
  styles.nodeDeleteIcon,
340
433
  {
341
- tintColor: state.mood.mainLamp.nodes.length < 3 ? '#ccc' : '#666',
434
+ tintColor: state.mood.mainLamp.nodes.length < 3 ? props.theme.icon.disable : props.theme.icon.normal,
342
435
  },
343
436
  ]}
344
437
  source={res.ic_mood_del}
@@ -370,7 +463,7 @@ const DynamicMoodEditorPage = () => {
370
463
  style={{
371
464
  width: cx(18),
372
465
  height: cx(18),
373
- tintColor: '#000',
466
+ tintColor: props.theme.global.fontColor,
374
467
  }}
375
468
  source={{ uri: res.add }}
376
469
  />
@@ -551,98 +644,8 @@ const DynamicMoodEditorPage = () => {
551
644
  </Page>
552
645
  );
553
646
  };
554
- const styles = StyleSheet.create({
555
- root: {
556
- flex: 1,
557
- flexDirection: 'column',
558
- },
559
- name: {
560
- marginHorizontal: cx(24),
561
- },
562
- adjustCard: {
563
- marginVertical: cx(12),
564
- marginHorizontal: cx(24),
565
- },
566
- fanAdjustCard: {
567
- marginHorizontal: cx(24),
568
- },
569
- lightLine: {
570
- flexDirection: 'row',
571
- marginHorizontal: cx(16),
572
- },
573
- light: {
574
- color: '#000',
575
- fontSize: cx(18),
576
- fontFamily: 'helvetica_neue_lt_std_bd',
577
- },
578
- transitionMode: {
579
- marginHorizontal: cx(16),
580
- },
581
- preview: {
582
- width: cx(20),
583
- height: cx(20),
584
- marginStart: cx(12),
585
- borderRadius: cx(4),
586
- },
587
- nodesAdjust: {
588
- flexDirection: 'row',
589
- alignItems: 'center',
590
- },
591
- adjustButtons: {
592
- width: cx(44),
593
- marginStart: cx(16),
594
- },
595
- adjustButton: {
596
- width: cx(44),
597
- height: cx(44),
598
- },
599
- nodeList: {
600
- flex: 1,
601
- marginHorizontal: cx(16),
602
- },
603
- nodeItem: {
604
- flexDirection: 'row',
605
- alignItems: 'center',
606
- },
607
- nodeBlock: {
608
- flex: 1,
609
- height: cx(40),
610
- borderRadius: cx(8),
611
- },
612
- nodeDeleteBtn: {
613
- width: cx(24),
614
- height: cx(30),
615
- justifyContent: 'center',
616
- alignItems: 'center',
617
- },
618
- nodeDeleteIcon: {
619
- width: cx(16),
620
- height: cx(16),
621
- },
622
- nodeAddBtn: {
623
- height: cx(40),
624
- justifyContent: 'center',
625
- alignItems: 'center',
626
- marginEnd: cx(26),
627
- borderRadius: cx(8),
628
- borderWidth: cx(1),
629
- borderStyle: 'dashed',
630
- borderColor: '#666',
631
- backgroundColor: '#f6f6f6',
632
- },
633
- deleteBtn: {
634
- width: '100%',
635
- height: cx(50),
636
- backgroundColor: '#666',
637
- borderRadius: cx(8),
638
- },
639
- deleteBtnText: {
640
- color: '#fff',
641
- fontSize: cx(16),
642
- fontFamily: 'helvetica_neue_lt_std_bd',
643
- },
644
- });
645
- export default DynamicMoodEditorPage;
647
+
648
+ export default withTheme(DynamicMoodEditorPage)
646
649
  export function getTransitionModeString(transitionMode: MoodNodeTransitionMode): string {
647
650
  if (transitionMode === MoodNodeTransitionMode.Jump) {
648
651
  return I18n.getLang('other_lights_modes_jump_text');
@@ -8,6 +8,7 @@ import { MoodJumpGradientMode, MoodUIInfo } from './Interface';
8
8
  import { MixMoodColorsLine } from './MoodItem';
9
9
 
10
10
  const cx = Utils.RatioUtils.convertX;
11
+ const { withTheme } = Utils.ThemeUtils
11
12
 
12
13
  interface LightCategory {
13
14
  isMixLight?: boolean
@@ -17,6 +18,7 @@ interface LightCategory {
17
18
  }
18
19
 
19
20
  interface RecommendMixMoodItemProps {
21
+ theme?: any
20
22
  title: string;
21
23
  isMix: boolean;
22
24
  mood: MoodUIInfo;
@@ -29,8 +31,30 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
29
31
 
30
32
  const gradientMode = useMemo(() => (
31
33
  deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
32
- ), [MoodJumpGradientMode, deviceTypeOption])
33
-
34
+ ), [MoodJumpGradientMode, deviceTypeOption])
35
+
36
+
37
+ const styles = StyleSheet.create({
38
+ root: {
39
+ flexDirection: 'row',
40
+ alignItems: 'center',
41
+ marginHorizontal: cx(24),
42
+ },
43
+ content: {
44
+ height: cx(56),
45
+ marginHorizontal: cx(16),
46
+ width: cx(295)
47
+ },
48
+ title: {
49
+ color: props.theme.global.fontColor,
50
+ fontSize: cx(16),
51
+ fontFamily: 'helvetica_neue_lt_std_bd',
52
+ },
53
+ lineStyle: {
54
+ alignItems: 'center',
55
+ },
56
+ })
57
+
34
58
  return (
35
59
  <Card style={styles.root} onPress={props.onPress}>
36
60
  <CellContent
@@ -39,7 +63,7 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
39
63
  style={styles.content}
40
64
  titleStyle={styles.title}
41
65
  iconStyle={{
42
- color: '#000',
66
+ color: props.theme.global.fontColor,
43
67
  size: cx(16),
44
68
  }}
45
69
  />
@@ -57,25 +81,4 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
57
81
  );
58
82
  };
59
83
 
60
- const styles = StyleSheet.create({
61
- root: {
62
- flexDirection: 'row',
63
- alignItems: 'center',
64
- marginHorizontal: cx(24),
65
- },
66
- content: {
67
- height: cx(56),
68
- marginHorizontal: cx(16),
69
- width: cx(295)
70
- },
71
- title: {
72
- color: '#000',
73
- fontSize: cx(16),
74
- fontFamily: 'helvetica_neue_lt_std_bd',
75
- },
76
- lineStyle: {
77
- alignItems: 'center',
78
- },
79
- });
80
-
81
- export default RecommendMixMoodItem;
84
+ export default withTheme(RecommendMixMoodItem)
@@ -27,17 +27,6 @@ const OverchargeSwitchPage = (props: { theme?: any }) => {
27
27
  })
28
28
 
29
29
  const styles = StyleSheet.create({
30
- tipInfoContainer: {
31
- flexDirection: 'row',
32
- marginHorizontal: cx(24),
33
- marginVertical: cx(10)
34
- },
35
- image: {
36
- width: cx(16),
37
- height: cx(16),
38
- marginRight: cx(5),
39
- tintColor: props.theme.global.fontColor
40
- },
41
30
  titleBGView: {
42
31
  flexDirection: 'row',
43
32
  alignItems: 'center',
@@ -45,12 +34,6 @@ const OverchargeSwitchPage = (props: { theme?: any }) => {
45
34
  marginHorizontal: cx(24),
46
35
  marginTop: cx(30)
47
36
  },
48
- colorBlock: {
49
- width: cx(20),
50
- height: cx(20),
51
- marginStart: cx(12),
52
- borderRadius: cx(4),
53
- },
54
37
  title: {
55
38
  color: props.theme.global.fontColor,
56
39
  fontSize: cx(14),
@@ -10,13 +10,49 @@ import {View, Text, StyleSheet} from "react-native";
10
10
  import {showDialog} from "@ledvance/base/src/utils/common";
11
11
 
12
12
  const { convertX: cx } = Utils.RatioUtils
13
+ const { withTheme } = Utils.ThemeUtils
13
14
 
14
- const RemoteSwitchPage = () => {
15
+ const RemoteSwitchPage = (props: { theme?: any }) => {
15
16
  const devInfo = useDeviceInfo()
16
17
  const [remoteSwitch, setRemoteSwitch] = useRemoteSwitch()
17
18
  const state = useReactive({
18
19
  loading: false
19
20
  })
21
+
22
+ const styles = StyleSheet.create({
23
+ titleBGView: {
24
+ flexDirection: 'row',
25
+ alignItems: 'center',
26
+ paddingHorizontal: cx(16),
27
+ marginHorizontal: cx(24),
28
+ marginTop: cx(30),
29
+ },
30
+ colorBlock: {
31
+ width: cx(20),
32
+ height: cx(20),
33
+ marginStart: cx(12),
34
+ borderRadius: cx(4),
35
+ },
36
+ title: {
37
+ color: props.theme.global.fontColor,
38
+ fontSize: cx(14),
39
+ fontFamily: 'helvetica_neue_lt_std_bd',
40
+ paddingVertical: cx(16),
41
+ },
42
+ shadow: {
43
+ shadowColor: props.theme.card.shadow,
44
+ shadowOpacity: 0.2,
45
+ shadowRadius: 8,
46
+ elevation:8,
47
+ shadowOffset: {
48
+ width: 0,
49
+ height: 4,
50
+ },
51
+ backgroundColor: props.theme.card.background,
52
+ borderRadius: 8,
53
+ },
54
+ })
55
+
20
56
  return (<Page
21
57
  backText={devInfo.name}
22
58
  loading={state.loading}>
@@ -50,38 +86,4 @@ const RemoteSwitchPage = () => {
50
86
  </Page>)
51
87
  }
52
88
 
53
- const styles = StyleSheet.create({
54
- titleBGView: {
55
- flexDirection: 'row',
56
- alignItems: 'center',
57
- paddingHorizontal: cx(16),
58
- marginHorizontal: cx(24),
59
- marginTop: cx(30),
60
- },
61
- colorBlock: {
62
- width: cx(20),
63
- height: cx(20),
64
- marginStart: cx(12),
65
- borderRadius: cx(4),
66
- },
67
- title: {
68
- color: '#000',
69
- fontSize: cx(14),
70
- fontFamily: 'helvetica_neue_lt_std_bd',
71
- paddingVertical: cx(16),
72
- },
73
- shadow: {
74
- shadowColor: '#000000',
75
- shadowOpacity: 0.2,
76
- shadowRadius: 8,
77
- elevation:8,
78
- shadowOffset: {
79
- width: 0,
80
- height: 4,
81
- },
82
- backgroundColor: '#fff',
83
- borderRadius: 8,
84
- },
85
- })
86
-
87
- export default RemoteSwitchPage
89
+ export default withTheme(RemoteSwitchPage)
@@ -231,13 +231,14 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
231
231
  flexDirection: 'column',
232
232
  marginLeft: cx(21),
233
233
  borderRadius: cx(16),
234
- backgroundColor: '#cbcbcb',
234
+ backgroundColor: props.theme.tag.background,
235
235
  },
236
236
  rightItem: {
237
237
  paddingHorizontal: cx(12),
238
238
  color: props.theme.global.fontColor,
239
239
  },
240
240
  rightTitle: {
241
+ color: props.theme.tag.fontColor,
241
242
  paddingLeft: cx(12),
242
243
  paddingRight: cx(12),
243
244
  fontSize: cx(10),
@@ -246,7 +247,7 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
246
247
  },
247
248
  filletCorner: {
248
249
  flexDirection: 'row',
249
- backgroundColor: '#cbcbcb',
250
+ backgroundColor: props.theme.tag.background,
250
251
  borderRadius: cx(16),
251
252
  alignSelf: 'flex-start',
252
253
  },
@@ -324,8 +325,9 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
324
325
  />
325
326
  {/* pick */}
326
327
  <TimerPicker
327
- itemTextColor={props.theme.global.fontColor}
328
+ itemTextColor="#aeadb5"
328
329
  style={{ paddingVertical: cx(0), marginVertical: cx(0), backgroundColor: props.theme.global.background }}
330
+ pickerFontColor={props.theme.global.fontColor}
329
331
  is12Hours={!is24HourClock}
330
332
  singlePicker={true}
331
333
  amText={I18n.getLang('manage_user_calendar_label_am')}
@@ -351,7 +353,9 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
351
353
  }}
352
354
  />
353
355
  <Spacer />
354
- <Text style={{ marginHorizontal: cx(24), color: props.theme.global.fontColor }}>{loopText(state.sleepWakeUp.weeks, parseTimer(getEndTime(state.sleepWakeUp) * 60))}</Text>
356
+ <Text style={{ marginHorizontal: cx(24), color: props.theme.global.fontColor }}>
357
+ {loopText(state.sleepWakeUp.weeks, parseTimer(getEndTime(state.sleepWakeUp) * 60))}
358
+ </Text>
355
359
  <Spacer />
356
360
  </View>
357
361
 
@@ -362,7 +366,7 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
362
366
  </Text>
363
367
  <View
364
368
  style={{
365
- backgroundColor: props.theme.card.border,
369
+ backgroundColor: props.theme.container.background,
366
370
  borderRadius: 4,
367
371
  minHeight: cx(50),
368
372
  flex: 1,
@@ -391,7 +391,7 @@ const TimeScheduleDetailPage = (props: { theme?: any }) => {
391
391
  state.unSelectedSkill = state.unSelectedSkill.filter(s => item.dp !== s.dp);
392
392
  }}
393
393
  >
394
- <Text style={{ color: '#000' }}>{item.key}</Text>
394
+ <Text style={{ color: props.theme.global.fontColor }}>{item.key}</Text>
395
395
  <Image
396
396
  style={{ width: cx(16), height: cx(16), tintColor: props.theme.global.fontColor }}
397
397
  source={res.device_panel_timer_add}
@@ -136,6 +136,7 @@ function ManualSettings(props: ManualSettingProps) {
136
136
 
137
137
  {item.enable && item.type === 'fan' && (
138
138
  <FanAdjustViewContent
139
+ theme={props.theme}
139
140
  hideEnable={true}
140
141
  fanEnable={item.enable}
141
142
  maxFanSpeed={props.isUVCFan ? 20 : 3}