@ledvance/base 1.3.77-1 → 1.3.80

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 (36) hide show
  1. package/package.json +1 -1
  2. package/src/components/AdvanceCard.tsx +0 -2
  3. package/src/components/Card.tsx +1 -1
  4. package/src/components/Cell.tsx +0 -2
  5. package/src/components/ColorAdjustView.tsx +3 -2
  6. package/src/components/ColorTempAdjustView.tsx +5 -0
  7. package/src/components/DeleteButton.tsx +0 -3
  8. package/src/components/HybridSwitchView.tsx +0 -3
  9. package/src/components/OptionGroup.tsx +1 -6
  10. package/src/components/Segmented.tsx +0 -3
  11. package/src/components/ShowSelect.d.ts +1 -0
  12. package/src/components/ShowSelect.tsx +159 -0
  13. package/src/components/SocketItem.tsx +1 -9
  14. package/src/components/Stepper.tsx +0 -6
  15. package/src/components/StripAdjustView.tsx +0 -2
  16. package/src/components/Tag.tsx +5 -9
  17. package/src/components/TextButton.tsx +1 -3
  18. package/src/components/TextField.tsx +2 -3
  19. package/src/components/TextFieldStyleButton.tsx +2 -2
  20. package/src/components/UATabs.tsx +0 -3
  21. package/src/components/ldvColorBrightness.tsx +1 -4
  22. package/src/components/ldvColorSlider.tsx +1 -2
  23. package/src/components/ldvPickerView.tsx +0 -4
  24. package/src/components/ldvPresetView.tsx +1 -3
  25. package/src/components/ldvSaturation.tsx +1 -3
  26. package/src/components/ldvSlider.tsx +3 -8
  27. package/src/components/ldvSwitch.tsx +2 -2
  28. package/src/components/ldvTemperatureSlider.tsx +2 -4
  29. package/src/components/ldvTopBar.tsx +1 -3
  30. package/src/components/ldvTopName.tsx +0 -1
  31. package/src/components/rect-color-and-bright-picker/ColourPicker.tsx +0 -2
  32. package/src/components/rect-color-and-bright-picker/RectPicker.tsx +0 -7
  33. package/src/components/rect-color-and-bright-picker/Slider.tsx +1 -3
  34. package/src/components/rect-color-and-bright-picker/WhitePicker.tsx +0 -2
  35. package/src/components/segmentControl.tsx +4 -11
  36. package/src/components/weekSelect.tsx +0 -3
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.3.77-1",
7
+ "version": "1.3.80",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
@@ -53,8 +53,6 @@ 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}
58
56
  style={[
59
57
  styles.dot,
60
58
  {backgroundColor: props.data.statusColor},
@@ -32,7 +32,7 @@ const Card = (props: CardProps) => {
32
32
  },
33
33
  borderRadius: cx(10),
34
34
  }, props.style]}>
35
- <TouchableOpacity accessible={false} disabled={!(!!props.onPress)} onPress={props.onPress} onLongPress={props.onLongPress}>
35
+ <TouchableOpacity disabled={!(!!props.onPress)} onPress={props.onPress} onLongPress={props.onLongPress}>
36
36
  <View style={props.containerStyle}>{props.children}</View>
37
37
  </TouchableOpacity>
38
38
  </View>
@@ -17,8 +17,6 @@ interface CellProps {
17
17
  export default withTheme(function Cell(props: CellProps) {
18
18
  return (
19
19
  <TouchableOpacity
20
- accessibilityLabel={"Cell"}
21
- accessibilityHint={props.value}
22
20
  style={[{
23
21
  height: cx(50),
24
22
  paddingHorizontal: cx(24),
@@ -29,7 +29,7 @@ export interface ColorAdjustViewProps {
29
29
  }
30
30
 
31
31
  const NewColorPicker = React.memo((props: ColorAdjustViewProps) => {
32
- const { h = 0, s = 100, v = 100, minBrightness = 10, onHSVChange, onHSVChangeComplete } = props
32
+ const { h = 0, s = 100, v = 100, minBrightness, onHSVChange, onHSVChangeComplete } = props
33
33
  const state = useReactive({
34
34
  hue: h,
35
35
  saturation: scaleUp(s),
@@ -56,6 +56,7 @@ const NewColorPicker = React.memo((props: ColorAdjustViewProps) => {
56
56
 
57
57
  const { hue, saturation, value } = state;
58
58
  const hsv = { hue, saturation, value };
59
+ const minBrightnessValue = minBrightness ?? 1
59
60
 
60
61
  return (
61
62
  <View style={{justifyContent: 'center', alignItems: 'center'}}>
@@ -69,7 +70,7 @@ const NewColorPicker = React.memo((props: ColorAdjustViewProps) => {
69
70
  }}>
70
71
  <RectColorAndBrightPicker.ColourPicker
71
72
  value={hsv}
72
- brightOption={{min: minBrightness, minPercent: minBrightness ? 1 : 0}}
73
+ brightOption={{min: scaleUp(minBrightnessValue), minPercent: minBrightness ? minBrightness : 0}}
73
74
  onGrant={() => state.moving = true}
74
75
  onMove={handleMove}
75
76
  onRelease={handleComplete}
@@ -33,6 +33,7 @@ const NewColorTempPicker = React.memo((props: ColorTempAdjustViewProps) => {
33
33
  const {
34
34
  colorTemp = 0,
35
35
  brightness = 100,
36
+ minBrightness,
36
37
  isSupportTemperature,
37
38
  onCCTChange,
38
39
  onCCTChangeComplete,
@@ -76,6 +77,7 @@ const NewColorTempPicker = React.memo((props: ColorTempAdjustViewProps) => {
76
77
 
77
78
  const { temperature, brightness: stateBrightness } = state
78
79
  const white = { temperature, brightness: stateBrightness }
80
+ const minBrightnessValue = minBrightness ?? 1
79
81
 
80
82
  return (
81
83
  <View style={{justifyContent: 'center', alignItems: 'center'}}>
@@ -90,12 +92,15 @@ const NewColorTempPicker = React.memo((props: ColorTempAdjustViewProps) => {
90
92
  {
91
93
  isSupportTemperature ? <RectColorAndBrightPicker.WhitePicker
92
94
  value={white}
95
+ brightOption={{min: scaleUp(minBrightnessValue), minPercent: minBrightness ? minBrightness : 0}}
93
96
  onGrant={() => state.moving = true}
94
97
  onMove={handleMove}
95
98
  onRelease={handleComplete}
96
99
  onPress={handleComplete}
97
100
  /> : <RectColorAndBrightPicker.BrightnessSlider
98
101
  value={stateBrightness}
102
+ min={minBrightnessValue}
103
+ minPercent={minBrightness ? minBrightness : 0}
99
104
  clickEnabled={true}
100
105
  onGrant={() => state.moving = true}
101
106
  onMove={handleBrightnessMove}
@@ -19,9 +19,6 @@ 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}}
25
22
  disabled={disabled}
26
23
  onPress={onPress}
27
24
  style={[{
@@ -91,9 +91,6 @@ 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}}
97
94
  key={index}
98
95
  activeOpacity={Platform.OS === 'ios' ? 0.5 : 0.9}
99
96
  onPress={() => {
@@ -71,12 +71,7 @@ const OptionGroup = (props: OptionGroupProps) => {
71
71
 
72
72
  const OptionItem = (props: OptionItemProps) => {
73
73
  return (
74
- <TouchableOpacity
75
- accessibilityLabel={"OptionItem"}
76
- accessibilityHint={props.value}
77
- accessibilityState={{checked: props.enable}}
78
- onPress={() => props.onPress && props.onPress(props.value)}
79
- >
74
+ <TouchableOpacity onPress={() => props.onPress && props.onPress(props.value)}>
80
75
  <View style={styles.itemRoot}>
81
76
  <View style={styles.itemTextGroup}>
82
77
  <Text style={styles.itemTitle}>{props.title}</Text>
@@ -57,9 +57,6 @@ const Segmented = (props: SegmentedProps) => {
57
57
  <View style={[styles.wrap_container, props.style]}>
58
58
  {props.options && props.options.map((item, idx) => (
59
59
  <TouchableOpacity
60
- accessibilityLabel={"Segmented"}
61
- accessibilityHint={item.value}
62
- accessibilityState={{checked: item.value === props.value}}
63
60
  style={[
64
61
  styles.segmented_item,
65
62
  idx === 0 && styles.segmented_item_first,
@@ -0,0 +1 @@
1
+ export declare const ShowSelectView: (title: any, data: any, defaultValue: any, callback: any) => void;
@@ -0,0 +1,159 @@
1
+ import React from 'react'
2
+ import { View, Text, TouchableOpacity, Image } from 'react-native'
3
+ import { Utils, Popup } from 'tuya-panel-kit'
4
+ import res from '@res'
5
+ import Strings from '@i18n'
6
+
7
+ const { convertX, height } = Utils.RatioUtils
8
+
9
+ export const ShowSelectView = (title, data, defaultValue, callback) => {
10
+
11
+ const renderSelectView = () => {
12
+ return (
13
+ <View
14
+ style={{
15
+ height: height - convertX(120),
16
+ backgroundColor: 'rgb(242, 242, 247)',
17
+ flexDirection: 'column',
18
+ }}
19
+ >
20
+ <View style={{ marginHorizontal: convertX(16), marginVertical: convertX(40),shadow: {
21
+ shadowColor: '#000000',
22
+ shadowOpacity: 0.2,
23
+ shadowRadius: 8,
24
+ elevation:8,
25
+ shadowOffset: {
26
+ width: 0,
27
+ height: 4,
28
+ },
29
+ backgroundColor: '#fff',
30
+ borderRadius: 8,
31
+ }, }}>
32
+ {
33
+ data.map((item, index) => {
34
+ if (index === 0) {
35
+ return (
36
+ <View key={item?.id}>
37
+ {renderItemView(item, () => {
38
+ Popup.close()
39
+ callback(item)
40
+ })}
41
+ </View>
42
+ )
43
+ } else {
44
+ return (
45
+ <View key={item?.id}>
46
+ {renderLineView()}
47
+ {renderItemView(item, () => {
48
+ Popup.close()
49
+ callback(item)
50
+ })}
51
+ </View>
52
+ )
53
+ }
54
+ })
55
+ }
56
+ </View>
57
+ </View>
58
+ )
59
+ }
60
+
61
+ const renderItemView = ({ title }, onPress) => {
62
+ return (<TouchableOpacity
63
+ style={{
64
+ alignItems: 'center',
65
+ justifyContent: 'space-between',
66
+ // flex: 1,
67
+ flexDirection: 'row',
68
+ height: convertX(44),
69
+ paddingHorizontal: convertX(12)
70
+ }}
71
+ onPress={() => { if (defaultValue !== title) onPress() }}
72
+ >
73
+ <View>
74
+ <Text
75
+ style={{
76
+ fontSize: convertX(17),
77
+ color: '#000',
78
+ }}
79
+ >
80
+ {title}
81
+ </Text>
82
+ </View>
83
+ {defaultValue === title &&
84
+ <Image
85
+ style={{ width: convertX(16), height: convertX(16) }}
86
+ source={{ uri: res.app_music_check}}
87
+ resizeMode="contain"
88
+ />}
89
+ </TouchableOpacity>)
90
+ }
91
+
92
+ const renderLineView = () => {
93
+ return (<View
94
+ style={{
95
+ height: convertX(1),
96
+ backgroundColor: 'rgba(60, 60, 67, 0.36)',
97
+ marginLeft: convertX(12)
98
+ }}
99
+ ></View>)
100
+ }
101
+
102
+ const titleNode = () => {
103
+ return (
104
+ <View style={{ flexDirection: 'row', position: 'relative', height: convertX(81) }}>
105
+ <TouchableOpacity
106
+ style={{
107
+ position: 'absolute',
108
+ left: convertX(16),
109
+ bottom: convertX(12),
110
+ zIndex: 1
111
+ }}
112
+ onPress={() => Popup.close()}
113
+ >
114
+ <Text
115
+ style={{
116
+ fontSize: convertX(17),
117
+ color: '#FF6600',
118
+ }}
119
+ >
120
+ {Strings.getLang('auto_scan_system_cancel')}
121
+ </Text>
122
+ </TouchableOpacity>
123
+ <View style={{ flexDirection: 'column-reverse', flex: 1, alignItems: 'center' }}>
124
+ <Text style={{
125
+ fontSize: convertX(17),
126
+ fontWeight: 'bold',
127
+ color: '#000000',
128
+ paddingBottom: convertX(12)
129
+ }}>{title}</Text>
130
+ </View>
131
+ </View>
132
+ )
133
+ }
134
+
135
+ Popup.custom({
136
+ content: renderSelectView(),
137
+ title: titleNode(),
138
+ titleTextStyle: {
139
+ color: '#f60',
140
+ fontWeight: 'bold',
141
+ fontFamily: 'helvetica_neue_lt_std_bd',
142
+ height: convertX(91),
143
+ },
144
+ footer: null,
145
+ footerWrapperStyle: {
146
+ display: 'none'
147
+ },
148
+ cancelText: '',
149
+ confirmText: '',
150
+ onMaskPress: ({ close }) => {
151
+ close()
152
+ },
153
+ onConfirm: () => {
154
+ Popup.close()
155
+ },
156
+ })
157
+
158
+
159
+ }
@@ -13,7 +13,6 @@ interface SocketItemProps extends PropsWithChildren<ViewProps>{
13
13
  theme?: ThemeType
14
14
  title: string
15
15
  name: string
16
- placeholder?: string
17
16
  icon?: any
18
17
  disabledEdit?: boolean
19
18
  onNameChange: (value: string) => void
@@ -66,19 +65,12 @@ function SocketItem(props: SocketItemProps) {
66
65
  onValueChange={props.onSwitchChange} />
67
66
  </View>
68
67
  <TouchableOpacity
69
- accessibilityLabel={"Description"}
70
- accessibilityHint={props.name}
71
68
  style={styles.nameLine}
72
69
  onPress={() => {
73
70
  if(props.disabledEdit) return
74
71
  Dialog.prompt({
75
72
  title: I18n.getLang('routines_add_edit_name'),
76
73
  value: props.name,
77
- accessibilityLabel: "DialogInput",
78
- accessibilityHint: props.name,
79
- confirmAccessibilityLabel: "DialogConfirm",
80
- cancelAccessibilityLabel: "DialogCancel",
81
- placeholder: props.placeholder,
82
74
  cancelText: I18n.getLang('auto_scan_system_cancel'),
83
75
  confirmText: I18n.getLang('auto_scan_system_wifi_confirm'),
84
76
  inputWrapperStyle: {backgroundColor: props.theme?.textInput.background, borderRadius: cx(10)},
@@ -91,7 +83,7 @@ function SocketItem(props: SocketItemProps) {
91
83
  },
92
84
  })
93
85
  }}>
94
- <Text style={styles.name}>{props.name || props.placeholder}</Text>
86
+ <Text style={styles.name}>{props.name}</Text>
95
87
  </TouchableOpacity>
96
88
  <Spacer height={cx(16)} />
97
89
  {props.children}
@@ -111,16 +111,12 @@ const Stepper = (props: StepperProps) => {
111
111
  return (
112
112
  <View style={[styles.stepperContainer, props.style]}>
113
113
  <TouchableOpacity
114
- accessibilityLabel={"StepperMinusButton"}
115
- accessibilityHint={`${state.value}`}
116
114
  style={[styles.stepperButton, props.buttonStyle]}
117
115
  onPress={() => handlePress(false)}
118
116
  >
119
117
  <Image style={styles.stepperIcon} source={{uri: res.ic_minus}} />
120
118
  </TouchableOpacity>
121
119
  <TextInput
122
- accessibilityLabel={"StepperInput"}
123
- accessibilityHint={`${state.value}`}
124
120
  style={[styles.stepperInput, props.inputStyle]}
125
121
  value={state.value.toString()}
126
122
  keyboardType="numeric"
@@ -131,8 +127,6 @@ const Stepper = (props: StepperProps) => {
131
127
  editable={props.editable || props.disabled}
132
128
  />
133
129
  <TouchableOpacity
134
- accessibilityLabel={"StepperPlusButton"}
135
- accessibilityHint={`${state.value}`}
136
130
  style={[styles.stepperButton, props.buttonStyle]}
137
131
  onPress={() => handlePress(true)}
138
132
  >
@@ -6,7 +6,6 @@ import Spacer from "./Spacer";
6
6
  import { TabBar, Utils } from "tuya-panel-kit";
7
7
  import { ColorDisk } from "@tuya/tuya-panel-lamp-sdk";
8
8
  import res from "../res";
9
- import ThemeType from "../config/themeType";
10
9
  const { convertX: cx } = Utils.RatioUtils
11
10
  const { withTheme } = Utils.ThemeUtils
12
11
 
@@ -15,7 +14,6 @@ type TabsNode = {
15
14
  title: string
16
15
  }
17
16
  interface StripAdjustViewProps extends ColorAdjustViewProps, ColorTempAdjustViewProps {
18
- theme?: ThemeType
19
17
  lampTabs: TabsNode[]
20
18
  activeKey: number | string
21
19
  onActiveKeyChange: (key: number | string) => void
@@ -50,16 +50,12 @@ const Tag = (props: TagProps) => {
50
50
  props.onCheckedChange(!props.checked)
51
51
  }}>
52
52
  <View style={[styles.root, props.checked ? styles.checked : styles.uncheck, props.style]}>
53
- <Text
54
- accessibilityLabel={"Tag"}
55
- accessibilityHint={props.text}
56
- accessibilityState={{checked: props.checked}}
57
- style={[styles.text, {marginEnd: cx(props.checked ? 4 : 12)}]}
58
- >
59
- {props.text}
60
- </Text>
53
+ <Text style={[styles.text, {marginEnd: cx(props.checked ? 4 : 12)}]}>{props.text}</Text>
61
54
  {
62
- props.checked ? <Image source={{uri: res.ic_arrows_nav_clear}} style={styles.icon}/> : <></>
55
+ props.checked &&
56
+ <Image
57
+ source={{uri: res.ic_arrows_nav_clear}}
58
+ style={styles.icon}/>
63
59
  }
64
60
  </View>
65
61
  </TouchableOpacity>
@@ -14,8 +14,6 @@ interface TextButtonProps {
14
14
  export default function TextButton(props: TextButtonProps) {
15
15
  return (
16
16
  <TouchableOpacity
17
- accessibilityLabel={"TextButton"}
18
- accessibilityHint={props.text}
19
17
  style={[{
20
18
  justifyContent: 'center',
21
19
  alignItems: 'center',
@@ -31,4 +29,4 @@ export default function TextButton(props: TextButtonProps) {
31
29
  }, props.textStyle]}>{props.text}</Text>
32
30
  </TouchableOpacity>
33
31
  )
34
- }
32
+ }
@@ -70,15 +70,14 @@ const TextField = (props: TextFieldProps) => {
70
70
  <View style={props.style}>
71
71
  <Text style={[styles.topTip, { opacity: (!!props.value) ? 1 : 0 }]}>{props.placeholder}</Text>
72
72
  <View style={styles.textInputGroup}>
73
- <TextInput {...props} accessibilityLabel={"TextInput"} accessibilityHint={props.value} style={styles.textInput} />
73
+ <TextInput{...props} style={styles.textInput} />
74
74
  {!!props.value && editable &&
75
75
  <TouchableOpacity
76
- accessibilityLabel={"TextInputClearButton"}
77
76
  style={styles.iconTouchable}
78
77
  onPress={() => {
79
78
  props.onChangeText && props.onChangeText('')
80
79
  }}>
81
- <Image source={{uri: res.ic_cancel}} style={styles.icon}/>
80
+ <Image source={{ uri: res.ic_cancel }} style={styles.icon} />
82
81
  </TouchableOpacity>
83
82
  }
84
83
  <View style={styles.line} />
@@ -67,11 +67,11 @@ const TextFieldStyleButton = (props: TextFieldStyleButtonProps) => {
67
67
  <View style={props.style}>
68
68
  <View style={styles.tipParent}>
69
69
  <Text style={styles.topTip}>{props.placeholder}</Text>
70
- {props.showTipIcon && <TouchableOpacity accessibilityLabel={"TipIcon"} onPress={props.onTipIconPress}>
70
+ {props.showTipIcon && <TouchableOpacity onPress={props.onTipIconPress}>
71
71
  <Image source={{uri: res.ic_info}} style={styles.tipIcon}/>
72
72
  </TouchableOpacity>}
73
73
  </View>
74
- <TouchableOpacity accessibilityLabel={"TextFieldStyleButton"} accessibilityHint={props.text} onPress={props.onPress}>
74
+ <TouchableOpacity onPress={props.onPress}>
75
75
  <View style={styles.textGroup}>
76
76
  <View style={styles.textParent}>
77
77
  <Text style={styles.text}>{props.text}</Text>
@@ -54,9 +54,6 @@ const UATabs = (props: UATabsProps) => {
54
54
  const active = props.active === item.value
55
55
 
56
56
  return <TouchableOpacity
57
- accessibilityLabel={"UATabs"}
58
- accessibilityHint={item.value}
59
- accessibilityState={{checked: active}}
60
57
  key={index}
61
58
  style={{ flex: 1 }}
62
59
  onPress={() => {
@@ -7,9 +7,6 @@ export default function LdvColorBrightness(props) {
7
7
  const renderBrightness = () => {
8
8
  return (
9
9
  <LdvSlider
10
- accessibilityLabel={"Brightness"}
11
- accessibilityHint={`${value}`}
12
- max={100}
13
10
  min={minBrightness}
14
11
  style={props.style}
15
12
  title={I18n.getLang('light_sources_tile_dim_lighting_brightness')}
@@ -19,4 +16,4 @@ export default function LdvColorBrightness(props) {
19
16
  )
20
17
  }
21
18
  return renderBrightness()
22
- }
19
+ }
@@ -96,11 +96,10 @@ const LdvColorSlider = (props: LdvColorSliderProps) => {
96
96
 
97
97
  return (
98
98
  <View style={[styles.container, props.style]}>
99
- <Text accessibilityLabel={"Color"} accessibilityHint={`${value}`} style={styles.title}>
99
+ <Text style={styles.title}>
100
100
  {title}
101
101
  </Text>
102
102
  <Slider.Horizontal
103
- accessibilityLabel={"ColorSliderHorizontal"}
104
103
  style={{...styles.shadeSlider, width}}
105
104
  styles={{track: styles.sliderTrack, thumb: {...styles.shadeThumb, backgroundColor: thumbColor}}}
106
105
  maximumValue={max}
@@ -55,8 +55,6 @@ const LdvPickerView = (props: LdvPickerViewProps) => {
55
55
  <View key={props.theme?.type} style={[styles.pickerContainer, props.style]}>
56
56
  <View style={styles.picContainer}>
57
57
  <Picker
58
- accessibilityLabel={"HourPicker"}
59
- accessibilityHint={hour}
60
58
  itemTextColor='#aeadb5'
61
59
  style={[styles.picker, styles.pickerLeft]}
62
60
  loop={true}
@@ -78,8 +76,6 @@ const LdvPickerView = (props: LdvPickerViewProps) => {
78
76
  </View>
79
77
  <View style={styles.picContainer}>
80
78
  <Picker
81
- accessibilityLabel={"MinutePicker"}
82
- accessibilityHint={minute}
83
79
  itemTextColor='#aeadb5'
84
80
  style={[styles.picker, styles.pickerLeft]}
85
81
  loop={true}
@@ -59,8 +59,6 @@ const LdvPresetView = (props) => {
59
59
  <View style={styles.container}>
60
60
  {dataSource.map((item, index) =>
61
61
  <TouchableOpacity
62
- accessibilityLabel={"PresetNode"}
63
- accessibilityHint={`${item.color}`}
64
62
  key={index}
65
63
  style={[styles.item, {backgroundColor: item.color}]}
66
64
  onPress={() => {
@@ -86,4 +84,4 @@ const styles = StyleSheet.create({
86
84
  },
87
85
  })
88
86
 
89
- export default LdvPresetView
87
+ export default LdvPresetView
@@ -8,8 +8,6 @@ const LdvSaturation = (props) => {
8
8
  const renderBrightness = () => {
9
9
  return (
10
10
  <LdvSlider
11
- accessibilityLabel={"Saturation"}
12
- accessibilityHint={`${value}`}
13
11
  style={props.style}
14
12
  title={I18n.getLang('light_sources_tile_rgb_lighting_saturation')}
15
13
  value={value}
@@ -22,4 +20,4 @@ const LdvSaturation = (props) => {
22
20
  return renderBrightness()
23
21
  }
24
22
 
25
- export default LdvSaturation
23
+ export default LdvSaturation
@@ -1,13 +1,13 @@
1
1
  import {useReactive} from 'ahooks'
2
2
  import React, {useEffect} from 'react'
3
- import {AccessibilityProps, StyleProp, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native'
3
+ import {StyleProp, StyleSheet, Text, TextStyle, View, ViewStyle} from 'react-native'
4
4
  import {Slider, Utils} from 'tuya-panel-kit'
5
5
  import ThemeType from '../config/themeType'
6
6
 
7
7
  const cx = Utils.RatioUtils.convertX
8
8
  const { withTheme } = Utils.ThemeUtils
9
9
 
10
- interface LdvSliderProps extends AccessibilityProps{
10
+ interface LdvSliderProps {
11
11
  theme?: ThemeType
12
12
  title: string,
13
13
  value: number,
@@ -77,11 +77,7 @@ const LdvSlider = (props: LdvSliderProps) => {
77
77
 
78
78
  return (
79
79
  <View style={[styles.container, props.style]}>
80
- <View
81
- accessibilityLabel={props.accessibilityLabel}
82
- accessibilityHint={props.accessibilityHint}
83
- style={styles.titleBg}
84
- >
80
+ <View style={styles.titleBg}>
85
81
  <Text style={[styles.title, titleStyle]}>
86
82
  {props.title}
87
83
  </Text>
@@ -90,7 +86,6 @@ const LdvSlider = (props: LdvSliderProps) => {
90
86
  </Text>
91
87
  </View>
92
88
  <Slider.Horizontal
93
- accessibilityLabel={"SliderHorizontal"}
94
89
  style={[styles.slider, sliderStyle]}
95
90
  styles={{thumb: styles.thumb}}
96
91
  maximumValue={mMax}
@@ -23,7 +23,7 @@ interface Prop {
23
23
  const LdvSwitch = (props: Prop) => {
24
24
  const {title, color, colorAlpha = 0, enable, description, titleStyle, setEnable, leftValue, rightValue, showSwitch = true} = props
25
25
  return (
26
- <View accessibilityLabel={"LdvSwitch"} accessibilityHint={`${color}`} accessibilityState={{checked: enable}} style={styles.titleBGView}>
26
+ <View style={styles.titleBGView}>
27
27
  <View style={{flexDirection: 'column', flex: 1}}>
28
28
  <View style={{flexDirection: 'row', alignItems: 'center'}}>
29
29
  <Text style={[styles.title, {color: props.theme?.global.fontColor}, titleStyle]}>{title}</Text>
@@ -33,7 +33,7 @@ const LdvSwitch = (props: Prop) => {
33
33
  </View>
34
34
  {showSwitch && <>
35
35
  {leftValue && <Text style={{color: props.theme?.global.fontColor, marginRight: cx(5)}}>{leftValue}</Text>}
36
- <SwitchButton accessibilityLabel={"SwitchButton"} value={enable} onValueChange={setEnable}/>
36
+ <SwitchButton value={enable} onValueChange={setEnable}/>
37
37
  {rightValue && <Text style={{color: props.theme?.global.fontColor, marginLeft: cx(5)}}>{rightValue}</Text>}
38
38
  </>
39
39
  }
@@ -24,7 +24,6 @@ interface LdvTemperatureSliderProps {
24
24
  style?: StyleProp<ViewStyle> | undefined
25
25
  titleStyle?: StyleProp<TextProps> | undefined
26
26
  subTitleStr?: string | undefined
27
- accessibilityLabel?: string | undefined
28
27
  }
29
28
 
30
29
  const LdvTemperatureSlider = (props: LdvTemperatureSliderProps) => {
@@ -44,12 +43,11 @@ const LdvTemperatureSlider = (props: LdvTemperatureSliderProps) => {
44
43
  return (
45
44
  <View style={[styles.container, props.style]}>
46
45
  <View style={styles.titleBg}>
47
- <Text accessibilityLabel={"Temperature"} accessibilityHint={`${value}`} style={[styles.title, titleStyle]}>
46
+ <Text style={[styles.title, titleStyle]}>
48
47
  {title}
49
48
  </Text>
50
49
  </View>
51
50
  <Slider.Horizontal
52
- accessibilityLabel={"TemperatureSliderHorizontal"}
53
51
  style={{...styles.shadeSlider, width}}
54
52
  styles={{track: styles.sliderTrack, thumb: {...styles.shadeThumb, backgroundColor: thumbColor}}}
55
53
  maximumValue={max}
@@ -139,4 +137,4 @@ const styles = StyleSheet.create({
139
137
  },
140
138
  })
141
139
 
142
- export default LdvTemperatureSlider
140
+ export default LdvTemperatureSlider
@@ -29,7 +29,7 @@ const LDVTopBar = (props: TopBarProps) => {
29
29
  marginTop: Platform.OS === 'ios' ? Utils.RatioUtils.statusBarHeight : 0,
30
30
  justifyContent: 'space-between',
31
31
  }}>
32
- <TouchableOpacity accessibilityLabel={"GoBack"} onPress={props.onBackPress} style={{flex: 1, maxWidth: cx(290)}} >
32
+ <TouchableOpacity onPress={props.onBackPress} style={{flex: 1, maxWidth: cx(290)}} >
33
33
  <View
34
34
  style={{
35
35
  flexDirection: 'row',
@@ -52,8 +52,6 @@ const LDVTopBar = (props: TopBarProps) => {
52
52
  </TouchableOpacity>
53
53
  {!!props.rightButtonIcon &&
54
54
  <TouchableOpacity
55
- accessibilityLabel={"RightButton"}
56
- accessibilityState={{disabled: props.rightButtonDisabled}}
57
55
  style={{
58
56
  width: cx(44),
59
57
  height: cx(44),
@@ -54,7 +54,6 @@ const LdvTopName = (props: LdvTopNameProps) => {
54
54
  /> || null}
55
55
  </View>}
56
56
  {props.rightIcon && <TouchableOpacity
57
- accessibilityLabel={"RightIcon"}
58
57
  onPress={props.rightIconClick}>
59
58
  <Image
60
59
  style={{ width: cx(24), height: cx(24), tintColor: props.theme?.global.brand }}
@@ -233,8 +233,6 @@ export default class ColourPicker extends Component<ColourProps, IState> {
233
233
  return (
234
234
  <View style={[{ flex: 1 }, style]}>
235
235
  <RectPicker
236
- accessibilityLabel={"RectColorPicker"}
237
- accessibilityHint={`${hue}, ${ Math.round(saturation / 10)}`}
238
236
  coorToValue={this.coorToValue}
239
237
  valueToColor={this.valueToColor}
240
238
  valueToCoor={this.valueToCoor}
@@ -82,8 +82,6 @@ interface IProps extends DefaultProps {
82
82
  valueToCoor: (value: any, originCoor?: Point, validBound?: ValidBound) => Point;
83
83
  valueToColor: (value: any) => string;
84
84
  initData: (validBound?: ValidBound) => void;
85
- accessibilityLabel?: string;
86
- accessibilityHint?: string;
87
85
  }
88
86
 
89
87
  interface IState {
@@ -379,15 +377,10 @@ export default class RectPicker extends Component<IProps, IState> {
379
377
  disabled,
380
378
  thumbSize,
381
379
  thumbImg,
382
- accessibilityLabel,
383
- accessibilityHint
384
380
  } = this.props;
385
381
  const { showPicker, pickerHeight, pickerWidth, thumbPosition } = this;
386
382
  return (
387
383
  <View
388
- accessibilityLabel={accessibilityLabel}
389
- accessibilityHint={accessibilityHint}
390
- accessibilityRole={'adjustable'}
391
384
  style={[{ flex: 1 }, style]}
392
385
  {...this._panResponder.panHandlers}
393
386
  pointerEvents="box-only"
@@ -504,9 +504,7 @@ export default class Slider extends React.Component<IProps, IState> {
504
504
  return (
505
505
  <View
506
506
  style={containerStyle}
507
- accessibilityLabel="ReactColorPickerSlider"
508
- accessibilityHint={`${this.brightWidth}`}
509
- accessibilityRole={'adjustable'}
507
+ accessibilityLabel="ReactColorPicker_Slider"
510
508
  onLayout={this.handleLayout}
511
509
  pointerEvents="box-only"
512
510
  {...this._panResponder.panHandlers}
@@ -325,8 +325,6 @@ export default class WhitePicker extends Component<WhiteProps, IWhite> {
325
325
  ref={(ref: RectPicker) => {
326
326
  this.pickerRef = ref;
327
327
  }}
328
- accessibilityLabel={"ReactWhitePicker"}
329
- accessibilityHint={`${ Math.round(temperature / 10)}`}
330
328
  coorToValue={this.coorToValue}
331
329
  valueToColor={this.valueToColor}
332
330
  valueToCoor={this.valueToCoor}
@@ -17,11 +17,8 @@ const SegmentControl = (props) => {
17
17
  borderRadius: convertX(8.9),
18
18
  flexDirection: 'row',
19
19
  }, style]}>
20
- <TouchableOpacity
21
- accessibilityLabel={"SegmentControl"}
22
- accessibilityHint={title1}
23
- accessibilityState={{checked: isFirst}}
24
- style={[{
20
+ <TouchableOpacity style={
21
+ [{
25
22
  flex: 1,
26
23
  justifyContent: 'center',
27
24
  alignItems: 'center',
@@ -29,9 +26,8 @@ const SegmentControl = (props) => {
29
26
  borderRadius: convertX(6.9),
30
27
  }, isFirst ?
31
28
  {backgroundColor: props.theme?.segment.active, margin: convertX(2), borderRadius: 6.9} :
32
- {backgroundColor: props.theme?.segment.background}, tabStyle]}
33
- onPress={() => setIsFirst(true)}
34
- >
29
+ {backgroundColor: props.theme?.segment.background}, tabStyle]
30
+ } onPress={() => setIsFirst(true)}>
35
31
  <Text
36
32
  style={{
37
33
  color: props.theme?.segment.fontColor,
@@ -43,9 +39,6 @@ const SegmentControl = (props) => {
43
39
  </Text>
44
40
  </TouchableOpacity>
45
41
  <TouchableOpacity
46
- accessibilityLabel={"SegmentControl"}
47
- accessibilityHint={title2}
48
- accessibilityState={{checked: !isFirst}}
49
42
  style={
50
43
  [{
51
44
  flex: 1,
@@ -64,9 +64,6 @@ const WeekSelect = (props) => {
64
64
  {dataSource.map(period => {
65
65
  return (
66
66
  <TouchableOpacity
67
- accessibilityLabel={"WeekSelect"}
68
- accessibilityHint={`${period.index}`}
69
- accessibilityState={{checked: period.enabled}}
70
67
  key={period.index}
71
68
  onPress={() => {
72
69
  onSelect(period.index)