@ledvance/base 1.3.47 → 1.3.49

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
@@ -1058,7 +1058,32 @@
1058
1058
  "MATCH:socket5_active_timer_field_small_off_text",
1059
1059
  "MATCH:socket5_active_timer_field_small_on_text",
1060
1060
  "MATCH:socketusb_active_timer_field_small_off_text",
1061
- "MATCH:socketusb_active_timer_field_small_on_text"
1061
+ "MATCH:socketusb_active_timer_field_small_on_text",
1062
+ "MATCH:time_format",
1063
+ "MATCH:switchmodule_switchtitle",
1064
+ "MATCH:switchmodule_switch1title",
1065
+ "MATCH:switchmodule_switch2title",
1066
+ "MATCH:switchmodule_switchdescription",
1067
+ "MATCH:switchmodule_switch1description",
1068
+ "MATCH:switchmodule_switch2description",
1069
+ "MATCH:switchmodule_typesetting",
1070
+ "MATCH:switchmodule_typesettingdescription",
1071
+ "MATCH:switchmodule_typesetting1",
1072
+ "MATCH:switchmodule_typesetting2",
1073
+ "MATCH:switchmodule_typesetting3",
1074
+ "MATCH:switch_interlock",
1075
+ "MATCH:switch_interlockingdescription",
1076
+ "MATCH:switch_interlock_addbtn_text",
1077
+ "MATCH:switch_interlock_addtitle",
1078
+ "MATCH:switch_interlock_edittitle",
1079
+ "MATCH:switch_interlock_editbtn_text",
1080
+ "MATCH:switch_interlock_delete_popup_topic",
1081
+ "MATCH:timer_switch_active_timer_field_description_on_text",
1082
+ "MATCH:timer_switch1_active_timer_field_description_on_text",
1083
+ "MATCH:timer_switch2_active_timer_field_description_on_text",
1084
+ "MATCH:timer_switch_active_timer_field_description_off_text",
1085
+ "MATCH:timer_switch1_active_timer_field_description_off_text",
1086
+ "MATCH:timer_switch2_active_timer_field_description_off_text"
1062
1087
  ],
1063
1088
  "replacements": {
1064
1089
  "REGEX:% %1\\$s.*?\\)%": "{0}",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.3.47",
7
+ "version": "1.3.49",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
@@ -35,7 +35,7 @@ function SocketItem(props: SocketItemProps) {
35
35
  fontWeight: 'bold',
36
36
  },
37
37
  icon: {
38
- width: cx(80),
38
+ width: cx(60),
39
39
  height: cx(20),
40
40
  },
41
41
  nameLine: {
@@ -54,10 +54,12 @@ function SocketItem(props: SocketItemProps) {
54
54
  <View>
55
55
  <Spacer />
56
56
  <View style={styles.switchLine}>
57
- <Text style={styles.title}>{props.title}</Text>
57
+ <View style={{ flex: 1, flexDirection: 'row', alignItems: 'center' }}>
58
+ <Text style={[styles.title, { flex: 1 }]} numberOfLines={2}>{props.title}</Text>
59
+ <Spacer height={0} width={cx(12)} />
60
+ {props.icon && <Image style={styles.icon} source={props.icon} />}
61
+ </View>
58
62
  <Spacer height={0} width={cx(12)} />
59
- <Image style={styles.icon} source={props.icon} />
60
- <Spacer style={{ flex: 1 }} />
61
63
  <SwitchButton
62
64
  value={props.enabled}
63
65
  onValueChange={props.onSwitchChange} />
@@ -15,11 +15,13 @@ interface Prop {
15
15
  setEnable: (enable: boolean) => void
16
16
  showSwitch?:boolean
17
17
  description?: string
18
+ leftValue?: string
19
+ rightValue?: string
18
20
  titleStyle?: StyleProp<TextStyle>
19
21
  }
20
22
 
21
23
  const LdvSwitch = (props: Prop) => {
22
- const {title, color, colorAlpha, enable, description, titleStyle, setEnable, showSwitch = true} = props
24
+ const {title, color, colorAlpha, enable, description, titleStyle, setEnable, leftValue, rightValue, showSwitch = true} = props
23
25
  return (
24
26
  <View style={styles.titleBGView}>
25
27
  <View style={{flexDirection: 'column', flex: 1}}>
@@ -29,7 +31,12 @@ const LdvSwitch = (props: Prop) => {
29
31
  </View>
30
32
  {description && <Text style={{color: props.theme?.global.fontColor}}>{description}</Text>}
31
33
  </View>
32
- {showSwitch && <SwitchButton value={enable} onValueChange={setEnable}/>}
34
+ {showSwitch && <>
35
+ {leftValue && <Text style={{color: props.theme?.global.fontColor, marginRight: cx(5)}}>{leftValue}</Text>}
36
+ <SwitchButton value={enable} onValueChange={setEnable}/>
37
+ {rightValue && <Text style={{color: props.theme?.global.fontColor, marginLeft: cx(5)}}>{rightValue}</Text>}
38
+ </>
39
+ }
33
40
  </View>
34
41
  )
35
42
  }