@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
|
@@ -1,159 +0,0 @@
|
|
|
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
|
-
}
|