@ledvance/base 1.3.80 → 1.3.82
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 +4 -1
- package/package.json +1 -1
- package/src/components/AdvanceCard.tsx +3 -1
- package/src/components/BallDirectionView.tsx +181 -166
- package/src/components/Card.tsx +1 -1
- package/src/components/Cell.tsx +2 -0
- package/src/components/ColorAdjustView.tsx +1 -1
- package/src/components/ColorTempAdjustView.tsx +3 -3
- package/src/components/DeleteButton.tsx +4 -1
- package/src/components/DiySceneNodeView.tsx +6 -0
- package/src/components/DrawToolView.tsx +12 -0
- package/src/components/HybridSwitchView.tsx +3 -0
- package/src/components/MoodStripAdjustView.tsx +4 -0
- package/src/components/OptionGroup.tsx +6 -1
- package/src/components/OsramFanAdjustView.tsx +93 -0
- package/src/components/Page.tsx +5 -1
- package/src/components/Popup.tsx +2 -0
- package/src/components/Segmented.tsx +3 -0
- package/src/components/SocketItem.tsx +9 -1
- package/src/components/Stepper.tsx +6 -0
- package/src/components/StripAdjustView.tsx +2 -0
- package/src/components/Tag.tsx +12 -8
- package/src/components/TextButton.tsx +3 -1
- package/src/components/TextField.tsx +3 -2
- package/src/components/TextFieldStyleButton.tsx +2 -2
- package/src/components/UATabs.tsx +3 -0
- package/src/components/ldvColorBrightness.tsx +4 -1
- package/src/components/ldvColorSlider.tsx +2 -1
- package/src/components/ldvPickerView.tsx +4 -0
- package/src/components/ldvPresetView.tsx +3 -1
- package/src/components/ldvSaturation.tsx +3 -1
- package/src/components/ldvSlider.tsx +8 -3
- package/src/components/ldvSwitch.tsx +2 -2
- package/src/components/ldvTemperatureSlider.tsx +4 -2
- package/src/components/ldvTopBar.tsx +3 -1
- package/src/components/ldvTopName.tsx +1 -0
- package/src/components/rect-color-and-bright-picker/ColourPicker.tsx +2 -0
- package/src/components/rect-color-and-bright-picker/RectPicker.tsx +7 -0
- package/src/components/rect-color-and-bright-picker/Slider.tsx +3 -1
- package/src/components/rect-color-and-bright-picker/WhitePicker.tsx +50 -1
- package/src/components/rect-color-and-bright-picker/utils/storage.ts +97 -0
- package/src/components/segmentControl.tsx +11 -4
- package/src/components/weekSelect.tsx +3 -0
- package/src/i18n/strings.ts +116 -32
- package/src/utils/interface.ts +1 -1
- package/translateKey.txt +4 -1
- package/src/components/ShowSelect.d.ts +0 -1
- package/src/components/ShowSelect.tsx +0 -159
package/localazy.json
CHANGED
|
@@ -1200,7 +1200,10 @@
|
|
|
1200
1200
|
"MATCH:setting_set_passwd",
|
|
1201
1201
|
"MATCH:camera_user",
|
|
1202
1202
|
"MATCH:camera_motiondetection",
|
|
1203
|
-
"MATCH:camera_motiondetectiondescription"
|
|
1203
|
+
"MATCH:camera_motiondetectiondescription",
|
|
1204
|
+
"MATCH:wifi_repeater_title",
|
|
1205
|
+
"MATCH:wifi_repeater_description",
|
|
1206
|
+
"MATCH:wifi_repeater_group_tips"
|
|
1204
1207
|
],
|
|
1205
1208
|
"replacements": {
|
|
1206
1209
|
"REGEX:% %1\\$s.*?\\)%": "{0}",
|
package/package.json
CHANGED
|
@@ -53,6 +53,8 @@ const AdvanceCard = (props: AdvanceCardProps) => {
|
|
|
53
53
|
onPress={props.onPress}>
|
|
54
54
|
{!!statusColor && <View style={styles.dotBg}>
|
|
55
55
|
<View
|
|
56
|
+
accessibilityLabel={"StatusDot"}
|
|
57
|
+
accessibilityHint={statusColor}
|
|
56
58
|
style={[
|
|
57
59
|
styles.dot,
|
|
58
60
|
{backgroundColor: props.data.statusColor},
|
|
@@ -61,7 +63,7 @@ const AdvanceCard = (props: AdvanceCardProps) => {
|
|
|
61
63
|
{
|
|
62
64
|
props.children ?
|
|
63
65
|
props.children :
|
|
64
|
-
<View style={styles.titleBg}>
|
|
66
|
+
<View accessibilityLabel='AdvanceCard' accessibilityHint={props.data.title} style={styles.titleBg}>
|
|
65
67
|
<Text style={{...styles.title, color: props.theme?.global.fontColor}}>{props.data.title}</Text>
|
|
66
68
|
<Spacer height={cx(8)} />
|
|
67
69
|
{
|
|
@@ -1,184 +1,199 @@
|
|
|
1
|
-
import {Utils} from "tuya-panel-kit";
|
|
2
|
-
import React, {useEffect} from "react";
|
|
3
|
-
import {Image, StyleSheet, TouchableOpacity, View} from "react-native";
|
|
1
|
+
import { Utils } from "tuya-panel-kit";
|
|
2
|
+
import React, { useEffect } from "react";
|
|
3
|
+
import { Image, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
4
4
|
import res from "../res";
|
|
5
|
-
import {useReactive} from "ahooks";
|
|
6
|
-
import {hsv2Hex} from "../utils/index";
|
|
7
|
-
import {cctToColor} from "../utils/cctUtils";
|
|
8
|
-
import {AdjustType, HSV} from '../utils/interface'
|
|
5
|
+
import { useReactive } from "ahooks";
|
|
6
|
+
import { hsv2Hex } from "../utils/index";
|
|
7
|
+
import { cctToColor } from "../utils/cctUtils";
|
|
8
|
+
import { AdjustType, HSV } from '../utils/interface'
|
|
9
9
|
|
|
10
|
-
const {withTheme} = Utils.ThemeUtils
|
|
10
|
+
const { withTheme } = Utils.ThemeUtils
|
|
11
11
|
const cx = Utils.RatioUtils.convertX;
|
|
12
12
|
|
|
13
13
|
export enum PaintMode {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Top,
|
|
15
|
+
Bottom,
|
|
16
|
+
ALL
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
interface BallDirectionProps {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
theme?: any,
|
|
21
|
+
adjustType: AdjustType,
|
|
22
|
+
paintMode: PaintMode,
|
|
23
|
+
onPaintModeChanged: (paintMode: PaintMode) => void,
|
|
24
|
+
topColor: HSV,
|
|
25
|
+
bottomColor: HSV,
|
|
26
|
+
colorTemp: number,
|
|
27
|
+
brightness: number,
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const BallDirectionView = (props: BallDirectionProps) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
const { theme, adjustType, paintMode, onPaintModeChanged, topColor, bottomColor, colorTemp, brightness } = props;
|
|
32
|
+
const state = useReactive({
|
|
33
|
+
adjustType: adjustType,
|
|
34
|
+
paintMode: paintMode,
|
|
35
|
+
halfCircleTopColor: '#ff0000',
|
|
36
|
+
halfCircleBottomColor: '#00ff00',
|
|
37
|
+
});
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
state.adjustType = adjustType;
|
|
41
|
+
state.paintMode = paintMode;
|
|
42
|
+
if (state.adjustType === AdjustType.COLOUR) {
|
|
43
|
+
state.halfCircleTopColor = hsv2Hex(topColor.h, Math.max(Math.round(topColor.s / 10), 10), 100);
|
|
44
|
+
state.halfCircleBottomColor = hsv2Hex(bottomColor.h, Math.max(Math.round(bottomColor.s / 10), 10), 100);
|
|
45
|
+
} else if (state.adjustType === AdjustType.WHITE) {
|
|
46
|
+
state.halfCircleTopColor = cctToColor(colorTemp, brightness);
|
|
47
|
+
state.halfCircleBottomColor = cctToColor(colorTemp, brightness);
|
|
48
|
+
} else {
|
|
49
|
+
state.halfCircleTopColor = '#FEAC5B';
|
|
50
|
+
state.halfCircleBottomColor = '#FEAC5B';
|
|
51
|
+
}
|
|
52
|
+
}, [adjustType, paintMode, JSON.stringify(topColor), JSON.stringify(bottomColor), colorTemp, brightness]);
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
root: {
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
width: '100%',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
justifyContent: 'center'
|
|
60
|
+
},
|
|
61
|
+
paintModeRoot: {
|
|
62
|
+
flexDirection: 'column',
|
|
63
|
+
position: 'absolute',
|
|
64
|
+
left: cx(24)
|
|
65
|
+
},
|
|
66
|
+
paintModeAll: {
|
|
67
|
+
resizeMode: 'contain',
|
|
68
|
+
width: '100%',
|
|
69
|
+
height: '100%',
|
|
70
|
+
tintColor: state.paintMode === PaintMode.ALL ? props.theme?.icon.primary : props.theme?.icon.normal
|
|
71
|
+
},
|
|
72
|
+
paintModeHalf: {
|
|
73
|
+
resizeMode: 'contain',
|
|
74
|
+
width: '100%',
|
|
75
|
+
height: '100%',
|
|
76
|
+
tintColor: state.paintMode !== PaintMode.ALL ? props.theme?.icon.primary : props.theme?.icon.normal
|
|
77
|
+
},
|
|
78
|
+
circleLayout: {
|
|
79
|
+
marginVertical: cx(10),
|
|
80
|
+
width: cx(180),
|
|
81
|
+
height: cx(180)
|
|
82
|
+
},
|
|
83
|
+
circleBorder: {
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
width: '84%',
|
|
86
|
+
height: '84%',
|
|
87
|
+
borderColor: theme?.textInput.line,
|
|
88
|
+
borderRadius: 100,
|
|
89
|
+
borderWidth: 2,
|
|
90
|
+
bottom: '8%',
|
|
91
|
+
left: '8%',
|
|
92
|
+
right: '8%',
|
|
93
|
+
top: '8%',
|
|
94
|
+
},
|
|
95
|
+
coloring: {
|
|
96
|
+
width: '100%',
|
|
97
|
+
height: '100%',
|
|
98
|
+
resizeMode: 'contain',
|
|
99
|
+
},
|
|
100
|
+
ringUp: {
|
|
101
|
+
position: 'absolute',
|
|
102
|
+
width: '100%',
|
|
103
|
+
height: '56%',
|
|
104
|
+
resizeMode: 'contain',
|
|
105
|
+
transform: [{ rotate: '180deg' }]
|
|
106
|
+
},
|
|
107
|
+
ringDown: {
|
|
108
|
+
position: 'absolute',
|
|
109
|
+
width: '100%',
|
|
110
|
+
height: '56%',
|
|
111
|
+
resizeMode: 'contain',
|
|
112
|
+
bottom: 0
|
|
113
|
+
},
|
|
114
|
+
halfCircleDown: {
|
|
115
|
+
position: 'absolute',
|
|
116
|
+
width: '60%',
|
|
117
|
+
left: '20%',
|
|
118
|
+
right: '20%',
|
|
119
|
+
bottom: '11%',
|
|
120
|
+
},
|
|
121
|
+
halfCircleUp: {
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
width: '60%',
|
|
124
|
+
left: '20%',
|
|
125
|
+
right: '20%',
|
|
126
|
+
top: '11%',
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return (<View style={styles.root}>
|
|
130
|
+
<View style={styles.paintModeRoot}>
|
|
131
|
+
{state.adjustType === AdjustType.COLOUR &&
|
|
132
|
+
<TouchableOpacity
|
|
133
|
+
accessibilityLabel="HalfCircleButton"
|
|
134
|
+
accessibilityHint="HalfCircle"
|
|
135
|
+
accessibilityState={{ checked: [PaintMode.Top, PaintMode.Bottom].includes(state.paintMode) }}
|
|
136
|
+
style={{ width: cx(40), height: cx(40) }}
|
|
137
|
+
onPress={() => {
|
|
138
|
+
onPaintModeChanged(PaintMode.Top);
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<Image source={{ uri: res.half }} style={styles.paintModeHalf} />
|
|
142
|
+
</TouchableOpacity>}
|
|
143
|
+
<TouchableOpacity
|
|
144
|
+
accessibilityLabel="AllCircleButton"
|
|
145
|
+
accessibilityHint="AllCircle"
|
|
146
|
+
accessibilityState={{ checked: state.paintMode === PaintMode.ALL }}
|
|
147
|
+
style={{ width: cx(40), height: cx(40), marginTop: cx(10), }}
|
|
148
|
+
onPress={() => {
|
|
149
|
+
onPaintModeChanged(PaintMode.ALL);
|
|
150
|
+
}}>
|
|
151
|
+
<Image source={{ uri: res.all }} style={styles.paintModeAll} />
|
|
152
|
+
</TouchableOpacity>
|
|
153
|
+
</View>
|
|
154
|
+
<View style={styles.circleLayout}>
|
|
155
|
+
<View style={styles.circleBorder} />
|
|
156
|
+
{state.paintMode === PaintMode.ALL &&
|
|
157
|
+
<Image source={{ uri: res.coloring }} style={styles.coloring} />}
|
|
158
|
+
{state.paintMode === PaintMode.Top &&
|
|
159
|
+
<Image source={{ uri: res.ringdown }} style={styles.ringUp} />}
|
|
160
|
+
{state.paintMode === PaintMode.Bottom &&
|
|
161
|
+
<Image source={{ uri: res.ringdown }} style={styles.ringDown} />}
|
|
162
|
+
<TouchableOpacity
|
|
163
|
+
accessibilityLabel="HalfCircle"
|
|
164
|
+
accessibilityHint="TopHalfCircle"
|
|
165
|
+
accessibilityState={{ checked: state.paintMode === PaintMode.Top, disabled: state.paintMode === PaintMode.ALL }}
|
|
166
|
+
style={styles.halfCircleUp}
|
|
167
|
+
disabled={state.paintMode === PaintMode.ALL}
|
|
168
|
+
onPress={() => {
|
|
169
|
+
onPaintModeChanged(PaintMode.Top);
|
|
170
|
+
}}>
|
|
171
|
+
<Image source={res.halfcircle} style={{
|
|
172
|
+
width: '100%',
|
|
173
|
+
resizeMode: 'contain',
|
|
174
|
+
tintColor: state.halfCircleTopColor
|
|
175
|
+
}} />
|
|
164
176
|
|
|
165
|
-
|
|
177
|
+
</TouchableOpacity>
|
|
166
178
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
<TouchableOpacity
|
|
180
|
+
accessibilityLabel="HalfCircle"
|
|
181
|
+
accessibilityHint="BottomHalfCircle"
|
|
182
|
+
accessibilityState={{ checked: state.paintMode === PaintMode.Bottom, disabled: state.paintMode === PaintMode.ALL }}
|
|
183
|
+
style={styles.halfCircleDown}
|
|
184
|
+
disabled={state.paintMode === PaintMode.ALL}
|
|
185
|
+
onPress={() => {
|
|
186
|
+
onPaintModeChanged(PaintMode.Bottom);
|
|
187
|
+
}}>
|
|
188
|
+
<Image source={res.halfcircle} style={{
|
|
189
|
+
width: '100%',
|
|
190
|
+
resizeMode: 'contain',
|
|
191
|
+
transform: [{ rotate: '180deg' }],
|
|
192
|
+
tintColor: state.halfCircleBottomColor
|
|
193
|
+
}} />
|
|
194
|
+
</TouchableOpacity>
|
|
195
|
+
</View>
|
|
196
|
+
</View>)
|
|
182
197
|
}
|
|
183
198
|
|
|
184
199
|
export default withTheme(BallDirectionView) as React.ComponentType<BallDirectionProps>
|
package/src/components/Card.tsx
CHANGED
|
@@ -32,7 +32,7 @@ const Card = (props: CardProps) => {
|
|
|
32
32
|
},
|
|
33
33
|
borderRadius: cx(10),
|
|
34
34
|
}, props.style]}>
|
|
35
|
-
<TouchableOpacity disabled={!(!!props.onPress)} onPress={props.onPress} onLongPress={props.onLongPress}>
|
|
35
|
+
<TouchableOpacity accessible={false} disabled={!(!!props.onPress)} onPress={props.onPress} onLongPress={props.onLongPress}>
|
|
36
36
|
<View style={props.containerStyle}>{props.children}</View>
|
|
37
37
|
</TouchableOpacity>
|
|
38
38
|
</View>
|
package/src/components/Cell.tsx
CHANGED
|
@@ -70,7 +70,7 @@ const NewColorPicker = React.memo((props: ColorAdjustViewProps) => {
|
|
|
70
70
|
}}>
|
|
71
71
|
<RectColorAndBrightPicker.ColourPicker
|
|
72
72
|
value={hsv}
|
|
73
|
-
brightOption={{min: scaleUp(minBrightnessValue), minPercent:
|
|
73
|
+
brightOption={{min: scaleUp(minBrightnessValue), minPercent: minBrightnessValue ? minBrightnessValue : 0}}
|
|
74
74
|
onGrant={() => state.moving = true}
|
|
75
75
|
onMove={handleMove}
|
|
76
76
|
onRelease={handleComplete}
|
|
@@ -92,15 +92,15 @@ const NewColorTempPicker = React.memo((props: ColorTempAdjustViewProps) => {
|
|
|
92
92
|
{
|
|
93
93
|
isSupportTemperature ? <RectColorAndBrightPicker.WhitePicker
|
|
94
94
|
value={white}
|
|
95
|
-
brightOption={{min: scaleUp(minBrightnessValue), minPercent:
|
|
95
|
+
brightOption={{min: scaleUp(minBrightnessValue), minPercent: minBrightnessValue ? minBrightnessValue : 0}}
|
|
96
96
|
onGrant={() => state.moving = true}
|
|
97
97
|
onMove={handleMove}
|
|
98
98
|
onRelease={handleComplete}
|
|
99
99
|
onPress={handleComplete}
|
|
100
100
|
/> : <RectColorAndBrightPicker.BrightnessSlider
|
|
101
101
|
value={stateBrightness}
|
|
102
|
-
min={minBrightnessValue}
|
|
103
|
-
minPercent={
|
|
102
|
+
min={scaleUp(minBrightnessValue)}
|
|
103
|
+
minPercent={minBrightnessValue ? minBrightnessValue : 0}
|
|
104
104
|
clickEnabled={true}
|
|
105
105
|
onGrant={() => state.moving = true}
|
|
106
106
|
onMove={handleBrightnessMove}
|
|
@@ -19,8 +19,11 @@ const DeleteButton = (props: DeleteButtonProps) => {
|
|
|
19
19
|
const { text, onPress, style, textStyle, disabled } = props
|
|
20
20
|
return (
|
|
21
21
|
<TouchableOpacity
|
|
22
|
+
accessibilityLabel={"DeleteButton"}
|
|
23
|
+
accessibilityHint={text}
|
|
24
|
+
accessibilityState={{disabled}}
|
|
22
25
|
disabled={disabled}
|
|
23
|
-
onPress={onPress}
|
|
26
|
+
onPress={disabled ? undefined : onPress}
|
|
24
27
|
style={[{
|
|
25
28
|
width: '100%',
|
|
26
29
|
height: cx(50),
|
|
@@ -71,6 +71,9 @@ const DiySceneNodeView = (props: DiySceneNodeProps) => {
|
|
|
71
71
|
return (
|
|
72
72
|
<View style={styles.circleLayout}>
|
|
73
73
|
<TouchableOpacity
|
|
74
|
+
accessibilityLabel="HalfCircleButton"
|
|
75
|
+
accessibilityHint={'Top'}
|
|
76
|
+
accessibilityState={{ checked: isCurrent && position === 'Top' }}
|
|
74
77
|
style={styles.halfCircleUp}
|
|
75
78
|
onPress={() => {
|
|
76
79
|
onChangePosition("Top")
|
|
@@ -84,6 +87,9 @@ const DiySceneNodeView = (props: DiySceneNodeProps) => {
|
|
|
84
87
|
{ (isCurrent && position === 'Top') && <Image source={{uri: res.halfborder}} style={styles.borderTop} />}
|
|
85
88
|
</TouchableOpacity>
|
|
86
89
|
<TouchableOpacity
|
|
90
|
+
accessibilityLabel="HalfCircleButton"
|
|
91
|
+
accessibilityHint={'Bottom'}
|
|
92
|
+
accessibilityState={{ checked: isCurrent && position === 'Bottom' }}
|
|
87
93
|
style={styles.halfCircleDown}
|
|
88
94
|
onPress={() => {
|
|
89
95
|
onChangePosition("Bottom")
|
|
@@ -149,6 +149,9 @@ const DrawToolView = (props: DrawToolViewProps) => {
|
|
|
149
149
|
<View style={styles.container}>
|
|
150
150
|
<View style={styles.adjustButtons}>
|
|
151
151
|
<TouchableOpacity
|
|
152
|
+
accessibilityLabel='AdjustButton'
|
|
153
|
+
accessibilityHint='1'
|
|
154
|
+
accessibilityState={{ checked: props.adjustType === 1 }}
|
|
152
155
|
onPress={() => {
|
|
153
156
|
props.setAdjustType(1)
|
|
154
157
|
}}>
|
|
@@ -157,6 +160,9 @@ const DrawToolView = (props: DrawToolViewProps) => {
|
|
|
157
160
|
source={{ uri: res.ic_paint_bucket}} />
|
|
158
161
|
</TouchableOpacity>
|
|
159
162
|
{!props.hideDisableLight && <TouchableOpacity
|
|
163
|
+
accessibilityLabel='AdjustButton'
|
|
164
|
+
accessibilityHint='3'
|
|
165
|
+
accessibilityState={{ checked: props.adjustType === 3 }}
|
|
160
166
|
onPress={() => {
|
|
161
167
|
props.setAdjustType(3)
|
|
162
168
|
}}>
|
|
@@ -165,6 +171,9 @@ const DrawToolView = (props: DrawToolViewProps) => {
|
|
|
165
171
|
source={{uri: res.ic_disabled_light}} />
|
|
166
172
|
</TouchableOpacity>}
|
|
167
173
|
{!props.hideColorize && <TouchableOpacity
|
|
174
|
+
accessibilityLabel='AdjustButton'
|
|
175
|
+
accessibilityHint='2'
|
|
176
|
+
accessibilityState={{ checked: props.adjustType === 2 }}
|
|
168
177
|
onPress={() => {
|
|
169
178
|
props.setAdjustType(2)
|
|
170
179
|
}}>
|
|
@@ -173,6 +182,8 @@ const DrawToolView = (props: DrawToolViewProps) => {
|
|
|
173
182
|
source={{uri: res.ic_colorize}} />
|
|
174
183
|
</TouchableOpacity>}
|
|
175
184
|
{!props.hideLedNum && <TouchableOpacity
|
|
185
|
+
accessibilityLabel='LedNumInput'
|
|
186
|
+
accessibilityHint={`${props.ledNum || 5}`}
|
|
176
187
|
onPress={() => {
|
|
177
188
|
state.visible = true
|
|
178
189
|
}}
|
|
@@ -250,6 +261,7 @@ const DrawToolView = (props: DrawToolViewProps) => {
|
|
|
250
261
|
text={I18n.getLang('auto_scan_system_wifi_confirm')}
|
|
251
262
|
style={{ width: cx(150), height: cx(40), backgroundColor: ledNumValidator(state.ledNum) ? props.theme?.button.primary : props.theme?.button.disabled }}
|
|
252
263
|
textStyle={{ fontSize: cx(14) }}
|
|
264
|
+
disabled={!ledNumValidator(state.ledNum)}
|
|
253
265
|
onPress={() => {
|
|
254
266
|
if (!ledNumValidator(state.ledNum)) return
|
|
255
267
|
props.setLedNum(state.ledNum)
|
|
@@ -91,6 +91,9 @@ const HybridSwitchView = (props: HybridSwitchViewProps) => {
|
|
|
91
91
|
<View style={styles.container}>
|
|
92
92
|
{props.switchChannels.map((channel, index) => (
|
|
93
93
|
<TouchableOpacity
|
|
94
|
+
accessibilityLabel={"HybridSwitch"}
|
|
95
|
+
accessibilityHint={`${index}`}
|
|
96
|
+
accessibilityState={{checked: channel}}
|
|
94
97
|
key={index}
|
|
95
98
|
activeOpacity={Platform.OS === 'ios' ? 0.5 : 0.9}
|
|
96
99
|
onPress={() => {
|
|
@@ -83,6 +83,8 @@ const MoodStripAdjustView = (props: MoodStripAdjustViewProps) => {
|
|
|
83
83
|
props.favoriteScenes.map((sceneInfo: DiySceneInfo) => {
|
|
84
84
|
return (
|
|
85
85
|
<TouchableOpacity
|
|
86
|
+
accessibilityLabel="SceneItem"
|
|
87
|
+
accessibilityHint={`${sceneInfo.id}`}
|
|
86
88
|
key={sceneInfo.id}
|
|
87
89
|
onPress={() => {
|
|
88
90
|
props.onFavoriteSceneChange(sceneInfo)
|
|
@@ -104,6 +106,8 @@ const MoodStripAdjustView = (props: MoodStripAdjustViewProps) => {
|
|
|
104
106
|
<View style={{justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%'}}>
|
|
105
107
|
{props.favoriteScenes.length > 3 &&
|
|
106
108
|
<TouchableOpacity
|
|
109
|
+
accessibilityLabel="FavoriteSceneDeleteButton"
|
|
110
|
+
accessibilityHint={`${sceneInfo.id}`}
|
|
107
111
|
style={{position: 'absolute', top: cx(5), right: cx(5)}}
|
|
108
112
|
onPress={() => {
|
|
109
113
|
props.onFavoriteSceneRemove && props.onFavoriteSceneRemove(sceneInfo)
|
|
@@ -71,7 +71,12 @@ const OptionGroup = (props: OptionGroupProps) => {
|
|
|
71
71
|
|
|
72
72
|
const OptionItem = (props: OptionItemProps) => {
|
|
73
73
|
return (
|
|
74
|
-
<TouchableOpacity
|
|
74
|
+
<TouchableOpacity
|
|
75
|
+
accessibilityLabel={"OptionItem"}
|
|
76
|
+
accessibilityHint={`${props.value}`}
|
|
77
|
+
accessibilityState={{checked: props.enable}}
|
|
78
|
+
onPress={() => props.onPress && props.onPress(props.value)}
|
|
79
|
+
>
|
|
75
80
|
<View style={styles.itemRoot}>
|
|
76
81
|
<View style={styles.itemTextGroup}>
|
|
77
82
|
<Text style={styles.itemTitle}>{props.title}</Text>
|