@ledvance/base 1.3.76 → 1.3.78
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/package.json
CHANGED
|
@@ -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
|
|
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:
|
|
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}
|