@ledvance/base 1.3.86 → 1.3.88

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 CHANGED
@@ -1202,8 +1202,7 @@
1202
1202
  "MATCH:camera_motiondetection",
1203
1203
  "MATCH:camera_motiondetectiondescription",
1204
1204
  "MATCH:wifi_repeater_title",
1205
- "MATCH:wifi_repeater_description",
1206
- "MATCH:wifi_repeater_group_tips",
1205
+ "MATCH:wifirepeater_info",
1207
1206
  "MATCH:repeater_ssid",
1208
1207
  "MATCH:repeater_ssid_required",
1209
1208
  "MATCH:login_textfield_headline_pw",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.3.86",
7
+ "version": "1.3.88",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
@@ -56,14 +56,20 @@ const NewColorTempPicker = React.memo((props: ColorTempAdjustViewProps) => {
56
56
  }
57
57
  }, [colorTemp, brightness])
58
58
 
59
- const handleMove = useCallback((v) => {
60
- onCCTChange?.(scaleDown(v.temperature))
61
- onBrightnessChange?.(scaleDown(v.brightness))
59
+ const handleMove = useCallback((v, options) => {
60
+ if (options?.isChangeBright) {
61
+ onBrightnessChange?.(scaleDown(v.brightness))
62
+ } else {
63
+ onCCTChange?.(scaleDown(v.temperature))
64
+ }
62
65
  }, [onCCTChange, onBrightnessChange])
63
66
 
64
- const handleComplete = useCallback((v) => {
65
- onCCTChangeComplete?.(scaleDown(v.temperature))
66
- onBrightnessChangeComplete?.(scaleDown(v.brightness))
67
+ const handleComplete = useCallback((v, options) => {
68
+ if (options?.isChangeBright) {
69
+ onBrightnessChangeComplete?.(scaleDown(v.brightness))
70
+ } else {
71
+ onCCTChangeComplete?.(scaleDown(v.temperature))
72
+ }
67
73
  state.moving = false
68
74
  }, [onCCTChangeComplete, onBrightnessChangeComplete])
69
75
 
@@ -494,7 +494,8 @@ export default class Slider extends React.Component<IProps, IState> {
494
494
  }
495
495
 
496
496
  const clampedX = Math.max(0, Math.min(this.sliderWidth, x));
497
- return Math.round((clampedX / this.sliderWidth) * (max - min) + min);
497
+ const value = Math.round((clampedX / this.sliderWidth) * (max - min) + min);
498
+ return Math.round(value / 10) * 10
498
499
  }
499
500
 
500
501
  render() {
@@ -269,7 +269,8 @@ export default class WhitePicker extends Component<WhiteProps, IWhite> {
269
269
  const total = Math.sqrt(normalVector.x ** 2 + normalVector.y ** 2);
270
270
  const diff = (vector1.x * normalVector.x + vector1.y * normalVector.y) / total;
271
271
  const temperature = Math.round((diff / total) * 1000);
272
- return { temperature, brightness };
272
+ const newTemperature = Math.round(temperature / 10) * 10
273
+ return { temperature: newTemperature, brightness };
273
274
  };
274
275
 
275
276
  handleTemperaturePosition(temperature: number, bound: ValidBound) {