@momo-kits/native-kits 0.156.6-beta.13-debug → 0.156.6-beta.15-debug
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/compose/build.gradle.kts +1 -1
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -3
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +4 -10
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -3
- package/gradle.properties +1 -1
- package/package.json +1 -1
package/compose/build.gradle.kts
CHANGED
|
@@ -10,11 +10,8 @@ import androidx.compose.foundation.layout.Box
|
|
|
10
10
|
import androidx.compose.runtime.Composable
|
|
11
11
|
import androidx.compose.runtime.getValue
|
|
12
12
|
import androidx.compose.ui.Modifier
|
|
13
|
-
import androidx.compose.ui.draw.drawBehind
|
|
14
13
|
import androidx.compose.ui.graphics.Color
|
|
15
14
|
import androidx.compose.ui.graphics.NativePaint
|
|
16
|
-
import androidx.compose.ui.graphics.Paint
|
|
17
|
-
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
|
|
18
15
|
import androidx.compose.ui.graphics.toArgb
|
|
19
16
|
import androidx.compose.ui.platform.LocalConfiguration
|
|
20
17
|
import androidx.compose.ui.unit.Dp
|
|
@@ -31,16 +31,14 @@ import androidx.compose.ui.text.TextStyle
|
|
|
31
31
|
import androidx.compose.ui.text.input.KeyboardType
|
|
32
32
|
import androidx.compose.ui.unit.Dp
|
|
33
33
|
import androidx.compose.ui.unit.dp
|
|
34
|
+
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
34
35
|
import vn.momo.kits.const.AppTheme
|
|
35
36
|
import vn.momo.kits.const.Colors
|
|
36
37
|
import vn.momo.kits.const.Radius
|
|
37
38
|
import vn.momo.kits.const.Spacing
|
|
38
|
-
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
39
39
|
import vn.momo.kits.const.Typography
|
|
40
40
|
import vn.momo.kits.const.scaleSize
|
|
41
41
|
import vn.momo.kits.modifier.conditional
|
|
42
|
-
import vn.momo.kits.modifier.setAutomationId
|
|
43
|
-
import vn.momo.kits.utils.getComponentId
|
|
44
42
|
|
|
45
43
|
data class InputPhoneNumberSizeDetail(
|
|
46
44
|
val borderWidth: Dp,
|
|
@@ -99,7 +97,7 @@ fun InputPhoneNumber(
|
|
|
99
97
|
onBlur: () -> Unit = {},
|
|
100
98
|
loading: Boolean = false,
|
|
101
99
|
modifier: Modifier = Modifier,
|
|
102
|
-
|
|
100
|
+
inputModifier: Modifier = Modifier,
|
|
103
101
|
) {
|
|
104
102
|
// Consolidated state management
|
|
105
103
|
var inputState by remember { mutableStateOf(InputState()) }
|
|
@@ -118,9 +116,6 @@ fun InputPhoneNumber(
|
|
|
118
116
|
val textStyle = scaleSize(size.values.textStyle.copy(color = textColor))
|
|
119
117
|
|
|
120
118
|
|
|
121
|
-
val componentName = "InputPhoneNumber"
|
|
122
|
-
val componentId = getComponentId(componentName, accessibilityLabel)
|
|
123
|
-
|
|
124
119
|
Column(modifier = modifier
|
|
125
120
|
.conditional(IsShowBaseLineDebug) {
|
|
126
121
|
border(1.dp, Colors.blue_03)
|
|
@@ -131,7 +126,7 @@ fun InputPhoneNumber(
|
|
|
131
126
|
textStyle = textStyle,
|
|
132
127
|
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Number),
|
|
133
128
|
cursorBrush = SolidColor(AppTheme.current.colors.primary),
|
|
134
|
-
modifier =
|
|
129
|
+
modifier = inputModifier
|
|
135
130
|
.height(scaleSize(size.values.height.value, 1.1f).dp)
|
|
136
131
|
.onFocusChanged { focusState ->
|
|
137
132
|
val wasFocused = inputState.isFocused
|
|
@@ -145,8 +140,7 @@ fun InputPhoneNumber(
|
|
|
145
140
|
} else if (inputState.hasBeenBlurred) {
|
|
146
141
|
onBlur()
|
|
147
142
|
}
|
|
148
|
-
}
|
|
149
|
-
.setAutomationId(componentId),
|
|
143
|
+
},
|
|
150
144
|
onValueChange = onChangeText,
|
|
151
145
|
decorationBox = { innerTextField ->
|
|
152
146
|
// Input container
|
|
@@ -12,11 +12,8 @@ import androidx.compose.runtime.mutableStateOf
|
|
|
12
12
|
import androidx.compose.runtime.remember
|
|
13
13
|
import androidx.compose.runtime.setValue
|
|
14
14
|
import androidx.compose.ui.Modifier
|
|
15
|
-
import androidx.compose.ui.draw.drawBehind
|
|
16
15
|
import androidx.compose.ui.graphics.Color
|
|
17
16
|
import androidx.compose.ui.graphics.NativePaint
|
|
18
|
-
import androidx.compose.ui.graphics.Paint
|
|
19
|
-
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
|
|
20
17
|
import androidx.compose.ui.graphics.toArgb
|
|
21
18
|
import androidx.compose.ui.interop.UIKitView
|
|
22
19
|
import androidx.compose.ui.unit.Dp
|
package/gradle.properties
CHANGED