@ledvance/base 1.3.8 → 1.3.10

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 (38) hide show
  1. package/localazy.json +13 -1
  2. package/package.json +1 -1
  3. package/src/components/AdvanceCard.tsx +4 -3
  4. package/src/components/AdvanceList.tsx +3 -3
  5. package/src/components/ApplyForDeviceItem.tsx +23 -8
  6. package/src/components/ApplyForDeviceList.tsx +4 -3
  7. package/src/components/ApplyForText.tsx +4 -3
  8. package/src/components/BatteryStateView.tsx +3 -3
  9. package/src/components/Card.tsx +4 -3
  10. package/src/components/ColorTempAdjustView.tsx +2 -1
  11. package/src/components/CustomListDialog.tsx +4 -3
  12. package/src/components/DeleteButton.tsx +4 -3
  13. package/src/components/DrawToolView.tsx +13 -12
  14. package/src/components/FanAdjustView.tsx +16 -15
  15. package/src/components/InfoText.tsx +3 -2
  16. package/src/components/Page.tsx +3 -2
  17. package/src/components/Popup.tsx +4 -3
  18. package/src/components/Segmented.tsx +7 -6
  19. package/src/components/SocketItem.tsx +4 -3
  20. package/src/components/Stepper.tsx +7 -6
  21. package/src/components/StripAdjustView.tsx +6 -6
  22. package/src/components/StripLightView.tsx +3 -2
  23. package/src/components/Summary.tsx +7 -6
  24. package/src/components/Tag.tsx +6 -5
  25. package/src/components/TextField.tsx +7 -6
  26. package/src/components/TextFieldStyleButton.tsx +7 -6
  27. package/src/components/UATabTitle.tsx +4 -3
  28. package/src/components/UATabs.tsx +5 -4
  29. package/src/components/ldvColorSlider.tsx +3 -2
  30. package/src/components/ldvPickerView.tsx +5 -4
  31. package/src/components/ldvSlider.tsx +4 -3
  32. package/src/components/ldvSwitch.tsx +6 -6
  33. package/src/components/ldvTopBar.tsx +4 -3
  34. package/src/components/ldvTopName.tsx +5 -4
  35. package/src/components/segmentControl.tsx +7 -7
  36. package/src/components/weekSelect.tsx +3 -3
  37. package/src/i18n/strings.ts +420 -72
  38. package/translateKey.txt +12 -0
@@ -1,13 +1,14 @@
1
- import Spacer from '@ledvance/base/src/components/Spacer'
1
+ import Spacer from './Spacer'
2
2
  import React from 'react'
3
3
  import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
4
4
  import { Utils } from 'tuya-panel-kit'
5
+ import ThemeType from '../config/themeType'
5
6
 
6
7
  const cx = Utils.RatioUtils.convertX
7
8
  const { withTheme } = Utils.ThemeUtils
8
9
 
9
10
  interface LdvTopNameProps {
10
- theme?: any
11
+ theme?: ThemeType
11
12
  title?: string,
12
13
  rightIcon?: string | undefined | number,
13
14
  rightIconClick?: () => void
@@ -28,7 +29,7 @@ const LdvTopName = (props: LdvTopNameProps) => {
28
29
  marginBottom: cx(12),
29
30
  },
30
31
  title: {
31
- color: props.theme.global.brand,
32
+ color: props.theme?.global.brand,
32
33
  fontSize: cx(24),
33
34
  },
34
35
  })
@@ -55,7 +56,7 @@ const LdvTopName = (props: LdvTopNameProps) => {
55
56
  {props.rightIcon && <TouchableOpacity
56
57
  onPress={props.rightIconClick}>
57
58
  <Image
58
- style={{ width: cx(24), height: cx(24), tintColor: props.theme.global.brand }}
59
+ style={{ width: cx(24), height: cx(24), tintColor: props.theme?.global.brand }}
59
60
  source={rightIcon} />
60
61
  </TouchableOpacity>}
61
62
  {props.headlineIconContent && props.headlineIconContent}
@@ -11,7 +11,7 @@ const SegmentControl = (props) => {
11
11
 
12
12
  return (<View style={{}}>
13
13
  <View style={[{
14
- backgroundColor: props.theme.segment.background,
14
+ backgroundColor: props.theme?.segment.background,
15
15
  marginHorizontal: convertX(24),
16
16
  marginVertical: convertX(0),
17
17
  borderRadius: convertX(8.9),
@@ -25,12 +25,12 @@ const SegmentControl = (props) => {
25
25
  margin: convertX(2),
26
26
  borderRadius: convertX(6.9),
27
27
  }, isFirst ?
28
- {backgroundColor: props.theme.segment.active, margin: convertX(2), borderRadius: 6.9} :
29
- {backgroundColor: props.theme.segment.background}, tabStyle]
28
+ {backgroundColor: props.theme?.segment.active, margin: convertX(2), borderRadius: 6.9} :
29
+ {backgroundColor: props.theme?.segment.background}, tabStyle]
30
30
  } onPress={() => setIsFirst(true)}>
31
31
  <Text
32
32
  style={{
33
- color: props.theme.segment.fontColor,
33
+ color: props.theme?.segment.fontColor,
34
34
  fontSize: convertX(12),
35
35
  fontFamily: isFirst ? 'helvetica_neue_lt_std_bd' : 'helvetica_neue_lt_std_roman',
36
36
  marginVertical: convertX(10),
@@ -48,13 +48,13 @@ const SegmentControl = (props) => {
48
48
  borderRadius: convertX(6.9),
49
49
  },
50
50
  !isFirst ?
51
- {backgroundColor: props.theme.segment.active} :
52
- {backgroundColor: props.theme.segment.background}, tabStyle]
51
+ {backgroundColor: props.theme?.segment.active} :
52
+ {backgroundColor: props.theme?.segment.background}, tabStyle]
53
53
  }
54
54
  onPress={() => setIsFirst(false)}>
55
55
  <Text
56
56
  style={{
57
- color: props.theme.segment.fontColor,
57
+ color: props.theme?.segment.fontColor,
58
58
  fontSize: convertX(12),
59
59
  fontFamily: isFirst ? 'helvetica_neue_lt_std_roman' : 'helvetica_neue_lt_std_bd',
60
60
  marginVertical: convertX(10),
@@ -75,15 +75,15 @@ const WeekSelect = (props) => {
75
75
  justifyContent: 'center',
76
76
  alignItems: 'center',
77
77
  borderRadius: cx(20),
78
- backgroundColor: period.enabled ? props.theme.global.thirdBrand : props.theme.global.background,
78
+ backgroundColor: period.enabled ? props.theme?.global.thirdBrand : props.theme?.global.background,
79
79
  borderWidth: cx(1),
80
80
  // borderColor: period.enabled ? "#fff" : 'rgba(120, 120, 128, 0.2)'
81
- borderColor: props.theme.global.brand,
81
+ borderColor: props.theme?.global.brand,
82
82
  }}>
83
83
 
84
84
  <Text
85
85
  style={{
86
- color: props.theme.global.brand,
86
+ color: props.theme?.global.brand,
87
87
  textAlign: 'center',
88
88
  }}>{period.title}</Text>
89
89
  </View>