@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.
- package/localazy.json +13 -1
- package/package.json +1 -1
- package/src/components/AdvanceCard.tsx +4 -3
- package/src/components/AdvanceList.tsx +3 -3
- package/src/components/ApplyForDeviceItem.tsx +23 -8
- package/src/components/ApplyForDeviceList.tsx +4 -3
- package/src/components/ApplyForText.tsx +4 -3
- package/src/components/BatteryStateView.tsx +3 -3
- package/src/components/Card.tsx +4 -3
- package/src/components/ColorTempAdjustView.tsx +2 -1
- package/src/components/CustomListDialog.tsx +4 -3
- package/src/components/DeleteButton.tsx +4 -3
- package/src/components/DrawToolView.tsx +13 -12
- package/src/components/FanAdjustView.tsx +16 -15
- package/src/components/InfoText.tsx +3 -2
- package/src/components/Page.tsx +3 -2
- package/src/components/Popup.tsx +4 -3
- package/src/components/Segmented.tsx +7 -6
- package/src/components/SocketItem.tsx +4 -3
- package/src/components/Stepper.tsx +7 -6
- package/src/components/StripAdjustView.tsx +6 -6
- package/src/components/StripLightView.tsx +3 -2
- package/src/components/Summary.tsx +7 -6
- package/src/components/Tag.tsx +6 -5
- package/src/components/TextField.tsx +7 -6
- package/src/components/TextFieldStyleButton.tsx +7 -6
- package/src/components/UATabTitle.tsx +4 -3
- package/src/components/UATabs.tsx +5 -4
- package/src/components/ldvColorSlider.tsx +3 -2
- package/src/components/ldvPickerView.tsx +5 -4
- package/src/components/ldvSlider.tsx +4 -3
- package/src/components/ldvSwitch.tsx +6 -6
- package/src/components/ldvTopBar.tsx +4 -3
- package/src/components/ldvTopName.tsx +5 -4
- package/src/components/segmentControl.tsx +7 -7
- package/src/components/weekSelect.tsx +3 -3
- package/src/i18n/strings.ts +420 -72
- package/translateKey.txt +12 -0
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import Spacer from '
|
|
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?:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
29
|
-
{backgroundColor: props.theme
|
|
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
|
|
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
|
|
52
|
-
{backgroundColor: props.theme
|
|
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
|
|
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
|
|
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
|
|
81
|
+
borderColor: props.theme?.global.brand,
|
|
82
82
|
}}>
|
|
83
83
|
|
|
84
84
|
<Text
|
|
85
85
|
style={{
|
|
86
|
-
color: props.theme
|
|
86
|
+
color: props.theme?.global.brand,
|
|
87
87
|
textAlign: 'center',
|
|
88
88
|
}}>{period.title}</Text>
|
|
89
89
|
</View>
|