@ledvance/base 1.1.66 → 1.1.67

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
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.1.66",
7
+ "version": "1.1.67",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@reduxjs/toolkit": "^1.8.6",
@@ -11,6 +11,7 @@ export interface ColorAdjustViewProps {
11
11
  h: number
12
12
  s: number
13
13
  v: number
14
+ minBrightness?: number // 最小亮度
14
15
  reserveSV?: boolean // 保留 s v
15
16
  onHSVChange?: (h: number, s: number, v: number) => void
16
17
  onHSVChangeComplete: (h: number, s: number, v: number) => void
@@ -47,6 +48,7 @@ const ColorAdjustView = (props: ColorAdjustViewProps) => {
47
48
  props.onHSVChangeComplete(props.h, s, props.v)
48
49
  }}/>
49
50
  <LdvColorBrightness
51
+ minBrightness={props.minBrightness}
50
52
  value={props.v}
51
53
  onValueChange={v => {
52
54
  props.onHSVChange && props.onHSVChange(props.h, props.s, v)
@@ -43,6 +43,7 @@ const LampAdjustView = (props: LampConfigViewProps) => {
43
43
  h={props.h}
44
44
  s={props.s}
45
45
  v={props.v}
46
+ minBrightness={props.minBrightness}
46
47
  reserveSV={props.reserveSV}
47
48
  onHSVChange={props.onHSVChange}
48
49
  onHSVChangeComplete={props.onHSVChangeComplete}/>
@@ -53,6 +54,7 @@ const LampAdjustView = (props: LampConfigViewProps) => {
53
54
  <>
54
55
  {state.hasSegmentControl && <Spacer height={cx(10)}/>}
55
56
  <ColorTempAdjustView
57
+ minBrightness={props.minBrightness}
56
58
  isSupportTemperature={props.isSupportTemperature}
57
59
  isSupportBrightness={props.isSupportBrightness}
58
60
  colorTemp={props.colorTemp}
@@ -42,6 +42,10 @@ const Page = (props: PageProps) => {
42
42
  close()
43
43
  navigation.goBack()
44
44
  },
45
+ motionConfig:{
46
+ hideDuration: 0,
47
+ showDuration: 100
48
+ }
45
49
  })
46
50
  return true
47
51
  },
@@ -3,10 +3,11 @@ import LdvSlider from 'components/ldvSlider'
3
3
  import I18n from '../i18n/index'
4
4
 
5
5
  export default function LdvColorBrightness(props) {
6
- const {value, onSlidingComplete} = props
6
+ const {value, onSlidingComplete, minBrightness} = props
7
7
  const renderBrightness = () => {
8
8
  return (
9
9
  <LdvSlider
10
+ min={minBrightness}
10
11
  style={props.style}
11
12
  title={I18n.getLang('light_sources_tile_dim_lighting_brightness')}
12
13
  value={value}
@@ -53,6 +53,7 @@ export function getArray(arr, size) { // size=5,要分割的长度
53
53
  export function getWeek(weekString) {
54
54
  const s = parseInt(weekString, 16).toString(2).padStart(8, '0')
55
55
  const array = s.split('').map(item => parseInt(item)).reverse()
56
+ array.pop()
56
57
  return array
57
58
  }
58
59
 
@@ -247,6 +248,10 @@ export function showDialog(props: DialogProps) {
247
248
  confirmText: showConfirmText && (confirmText || I18n.getLang('conflict_dialog_save_item_fixedtimecycle_answer_yes_text')) || '',
248
249
  subTitle,
249
250
  onConfirm,
251
+ motionConfig:{
252
+ hideDuration: 0,
253
+ showDuration: 100
254
+ }
250
255
  })
251
256
  :
252
257
  Dialog.alert({
@@ -254,6 +259,10 @@ export function showDialog(props: DialogProps) {
254
259
  confirmText: showConfirmText && (confirmText || I18n.getLang('conflict_dialog_save_item_fixedtimecycle_answer_yes_text')) || '',
255
260
  subTitle,
256
261
  onConfirm,
262
+ motionConfig:{
263
+ hideDuration: 0,
264
+ showDuration: 100
265
+ }
257
266
  })
258
267
  )
259
268
  }