@momo-kits/native-kits 0.114.2-beta.3 → 0.114.2-beta.4

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.
@@ -161,7 +161,6 @@ fun Header(
161
161
  },
162
162
  contentAlignment = if (titlePosition == TitlePosition.LEFT) Alignment.TopStart else Alignment.Center
163
163
  ) {
164
-
165
164
  HeaderTitle(
166
165
  title = title,
167
166
  color = tintIconColor,
@@ -33,7 +33,7 @@ import vn.momo.kits.const.Typography
33
33
 
34
34
  @Composable
35
35
  fun InputDropDown(
36
- value: MutableState<String> = remember { mutableStateOf("") },
36
+ text: String = "",
37
37
  floatingValue: String = "",
38
38
  floatingValueColor: Color = AppTheme.current.colors.text.hint,
39
39
  floatingIcon: String = "",
@@ -94,13 +94,13 @@ fun InputDropDown(
94
94
  ) {
95
95
  Text(
96
96
  floatingValue,
97
- style = Typography.labelS,
97
+ style = Typography.labelSMedium,
98
98
  color = floatingTitleColor
99
99
  )
100
100
  if (required) {
101
101
  Text(
102
102
  "*",
103
- style = Typography.labelS,
103
+ style = Typography.labelSMedium,
104
104
  color = AppTheme.current.colors.error.primary,
105
105
  )
106
106
  }
@@ -140,12 +140,12 @@ fun InputDropDown(
140
140
  }
141
141
  Box(Modifier.weight(1f)) {
142
142
  Text(
143
- text = value.value.ifEmpty { placeholder },
143
+ text = text.ifEmpty { placeholder },
144
144
  style = TextStyle(
145
145
  fontSize = 16.sp,
146
146
  lineHeight = 24.sp
147
147
  ),
148
- color = if (value.value.isEmpty()) placeholderColor else textColor
148
+ color = if (text.isEmpty()) placeholderColor else textColor
149
149
  )
150
150
  }
151
151
  RenderRightIcon(
@@ -63,7 +63,7 @@ class CustomConverter : VisualTransformation {
63
63
 
64
64
  @Composable
65
65
  fun InputMoney(
66
- text: MutableState<String> = remember { mutableStateOf("0") },
66
+ text: String = "0",
67
67
  floatingValue: String = "",
68
68
  floatingValueColor: Color = AppTheme.current.colors.text.hint,
69
69
  floatingIcon: String = "",
@@ -115,7 +115,7 @@ fun InputMoney(
115
115
  BasicTextField(
116
116
  enabled = !disabled,
117
117
  singleLine = true,
118
- value = text.value,
118
+ value = text,
119
119
  textStyle = TextStyle(
120
120
  color = textColor,
121
121
  fontSize = 20.sp,
@@ -150,13 +150,13 @@ fun InputMoney(
150
150
  ) {
151
151
  Text(
152
152
  floatingValue,
153
- style = Typography.labelS,
153
+ style = Typography.labelSMedium,
154
154
  color = floatingTitleColor
155
155
  )
156
156
  if (required) {
157
157
  Text(
158
158
  "*",
159
- style = Typography.labelS,
159
+ style = Typography.labelSMedium,
160
160
  color = AppTheme.current.colors.error.primary,
161
161
  )
162
162
  }
@@ -195,7 +195,7 @@ fun InputMoney(
195
195
  )
196
196
  }
197
197
  Box(Modifier.weight(9f).padding(start = 0.dp)) {
198
- if (text.value.isEmpty()) {
198
+ if (text.isEmpty()) {
199
199
  Text(
200
200
  text = placeholder,
201
201
  style = TextStyle(
@@ -209,7 +209,7 @@ fun InputMoney(
209
209
  innerTextField()
210
210
  }
211
211
  }
212
- if (isFocused && text.value.isNotEmpty()) {
212
+ if (isFocused && text.isNotEmpty()) {
213
213
  Row {
214
214
  Spacer(Modifier.width(Spacing.XS))
215
215
  Icon(
@@ -217,7 +217,7 @@ fun InputMoney(
217
217
  size = 16.dp,
218
218
  color = AppTheme.current.colors.text.hint,
219
219
  modifier = Modifier.clickable(
220
- onClick = { text.value = "" },
220
+ onClick = { onChangeText("") },
221
221
  interactionSource = remember { MutableInteractionSource() },
222
222
  indication = null
223
223
  )
@@ -68,7 +68,7 @@ fun OTPCaret() {
68
68
  Text(
69
69
  text = "-",
70
70
  color = AppTheme.current.colors.text.hint,
71
- style = Typography.descriptionDefault
71
+ style = Typography.descriptionDefaultRegular
72
72
  )
73
73
  }
74
74
  }
@@ -78,7 +78,7 @@ fun RenderRightIconSearch(
78
78
  }
79
79
 
80
80
  data class InputSearchProps(
81
- val text: MutableState<String>,
81
+ val text: String = "",
82
82
  val buttonText: String = "",
83
83
  val showButtonText: Boolean = false,
84
84
  val placeholder: String = "",
@@ -106,7 +106,7 @@ data class InputSearchProps(
106
106
  @Composable
107
107
  fun InputSearch(
108
108
  inputSearchProps: InputSearchProps = InputSearchProps(
109
- text = remember { mutableStateOf("") },
109
+ text = "",
110
110
  iconColor = AppTheme.current.colors.text.default
111
111
  ),
112
112
  ) {
@@ -127,7 +127,7 @@ fun InputSearch(
127
127
  BasicTextField(
128
128
  enabled = !inputSearchProps.disabled,
129
129
  singleLine = true,
130
- value = inputSearchProps.text.value,
130
+ value = inputSearchProps.text,
131
131
  textStyle = TextStyle(
132
132
  color = textColor,
133
133
  fontSize = 14.sp,
@@ -175,7 +175,7 @@ fun InputSearch(
175
175
  color = AppTheme.current.colors.text.hint
176
176
  )
177
177
  Box(Modifier.weight(1f)) {
178
- if (inputSearchProps.text.value.isEmpty()) {
178
+ if (inputSearchProps.text.isEmpty()) {
179
179
  Text(
180
180
  text = inputSearchProps.placeholder,
181
181
  style = TextStyle(
@@ -190,7 +190,7 @@ fun InputSearch(
190
190
  }
191
191
  innerTextField()
192
192
  }
193
- if (inputSearchProps.clearCondition?.invoke() == true || (isFocused && inputSearchProps.text.value.isNotEmpty())) {
193
+ if (inputSearchProps.clearCondition?.invoke() == true || (isFocused && inputSearchProps.text.isNotEmpty())) {
194
194
  Row {
195
195
  Spacer(Modifier.width(Spacing.XS))
196
196
  Icon(
@@ -199,7 +199,7 @@ fun InputSearch(
199
199
  color = AppTheme.current.colors.text.hint,
200
200
  modifier = Modifier.clickable(
201
201
  onClick = {
202
- inputSearchProps.text.value = ""
202
+ inputSearchProps.onChangeText("")
203
203
  inputSearchProps.onClearPress.invoke()
204
204
  },
205
205
  interactionSource = remember { MutableInteractionSource() },
@@ -42,7 +42,7 @@ val DEFAULT_HEIGHT = 104.dp
42
42
 
43
43
  @Composable
44
44
  fun InputTextArea(
45
- text: MutableState<String> = remember { mutableStateOf("") },
45
+ text: String = "",
46
46
  maxLength: Int = MAX_LENGTH,
47
47
  height: Dp = DEFAULT_HEIGHT,
48
48
  floatingValue: String = "",
@@ -92,7 +92,7 @@ fun InputTextArea(
92
92
  BasicTextField(
93
93
  enabled = !disabled,
94
94
  singleLine = false,
95
- value = text.value,
95
+ value = text,
96
96
  textStyle = TextStyle(
97
97
  color = textColor,
98
98
  fontSize = 16.sp,
@@ -173,7 +173,7 @@ fun InputTextArea(
173
173
  verticalAlignment = Alignment.Top
174
174
  ) {
175
175
  Box(Modifier.weight(1f)) {
176
- if (text.value.isEmpty()) {
176
+ if (text.isEmpty()) {
177
177
  Text(
178
178
  text = placeholder,
179
179
  style = TextStyle(
@@ -186,7 +186,7 @@ fun InputTextArea(
186
186
  }
187
187
  innerTextField()
188
188
  }
189
- if (isFocused && text.value.isNotEmpty()) {
189
+ if (isFocused && text.isNotEmpty()) {
190
190
  Row {
191
191
  Spacer(Modifier.width(Spacing.XS))
192
192
  Icon(
@@ -194,7 +194,7 @@ fun InputTextArea(
194
194
  size = 16.dp,
195
195
  color = AppTheme.current.colors.text.hint,
196
196
  modifier = Modifier.clickable(
197
- onClick = { text.value = "" },
197
+ onClick = { onChangeText("") },
198
198
  interactionSource = remember { MutableInteractionSource() },
199
199
  indication = null
200
200
  )
@@ -212,7 +212,7 @@ fun InputTextArea(
212
212
  contentAlignment = Alignment.CenterEnd
213
213
  ) {
214
214
  Text(
215
- "${text.value.length}/$maxLength",
215
+ "${text.length}/$maxLength",
216
216
  style = Typography.descriptionXsRegular,
217
217
  color = AppTheme.current.colors.text.hint
218
218
  )
@@ -79,7 +79,7 @@ fun Tag(
79
79
  Text(
80
80
  text = label,
81
81
  color = labelColor,
82
- style = Typography.labelS
82
+ style = Typography.labelSMedium
83
83
  )
84
84
  }
85
85
  }
@@ -140,7 +140,7 @@ fun DateTimePicker(
140
140
  if (hasLabel) {
141
141
  Text(
142
142
  text = arrayLabelTime[index],
143
- style = Typography.actionS,
143
+ style = Typography.actionSBold,
144
144
  modifier = Modifier.padding(bottom = Spacing.S)
145
145
  )
146
146
  }
@@ -194,7 +194,7 @@ fun WheelPickerItem(
194
194
  ) {
195
195
  Text(
196
196
  text = text,
197
- style = Typography.actionS,
197
+ style = Typography.actionSBold,
198
198
  modifier = Modifier.scale(scale)
199
199
  )
200
200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.114.2-beta.3",
3
+ "version": "0.114.2-beta.4",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},