@ledvance/base 1.1.96 → 1.1.98
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
|
@@ -12,6 +12,7 @@ export interface ColorAdjustViewProps {
|
|
|
12
12
|
s: number
|
|
13
13
|
v: number
|
|
14
14
|
minBrightness?: number // 最小亮度
|
|
15
|
+
minSaturation?: number // 最小Saturation
|
|
15
16
|
reserveSV?: boolean // 保留 s v
|
|
16
17
|
onHSVChange?: (h: number, s: number, v: number) => void
|
|
17
18
|
onHSVChangeComplete: (h: number, s: number, v: number) => void
|
|
@@ -41,6 +42,7 @@ const ColorAdjustView = (props: ColorAdjustViewProps) => {
|
|
|
41
42
|
}}/>
|
|
42
43
|
<LdvSaturation
|
|
43
44
|
value={props.s}
|
|
45
|
+
minSaturation={props.minSaturation}
|
|
44
46
|
onValueChange={s => {
|
|
45
47
|
props.onHSVChange && props.onHSVChange(props.h, s, props.v)
|
|
46
48
|
}}
|
|
@@ -169,6 +169,7 @@ const DrawToolView = (props: DrawToolViewProps) => {
|
|
|
169
169
|
isSupportBrightness={!!props.isSupportBrightness}
|
|
170
170
|
isColorMode={!!props.isColorMode}
|
|
171
171
|
reserveSV={true}
|
|
172
|
+
minSaturation={1}
|
|
172
173
|
setIsColorMode={props.setIsColorMode}
|
|
173
174
|
h={props.h} s={props.s} v={props.v}
|
|
174
175
|
onHSVChange={props.onHSVChange}
|
|
@@ -40,6 +40,7 @@ const LampAdjustView = (props: LampConfigViewProps) => {
|
|
|
40
40
|
s={props.s}
|
|
41
41
|
v={props.v}
|
|
42
42
|
minBrightness={props.minBrightness}
|
|
43
|
+
minSaturation={props.minSaturation}
|
|
43
44
|
reserveSV={props.reserveSV}
|
|
44
45
|
onHSVChange={props.onHSVChange}
|
|
45
46
|
onHSVChangeComplete={props.onHSVChangeComplete}/>
|
|
@@ -3,7 +3,7 @@ import LdvSlider from 'components/ldvSlider'
|
|
|
3
3
|
import I18n from '../i18n/index'
|
|
4
4
|
|
|
5
5
|
const LdvSaturation = (props) => {
|
|
6
|
-
const {value, onSlidingComplete} = props
|
|
6
|
+
const {value, onSlidingComplete, minSaturation} = props
|
|
7
7
|
|
|
8
8
|
const renderBrightness = () => {
|
|
9
9
|
return (
|
|
@@ -12,7 +12,7 @@ const LdvSaturation = (props) => {
|
|
|
12
12
|
title={I18n.getLang('light_sources_tile_rgb_lighting_saturation')}
|
|
13
13
|
value={value}
|
|
14
14
|
max={100}
|
|
15
|
-
min={0}
|
|
15
|
+
min={minSaturation ? minSaturation : 0}
|
|
16
16
|
onSlidingComplete={onSlidingComplete}
|
|
17
17
|
onValueChange={props.onValueChange}/>
|
|
18
18
|
)
|