@momo-kits/native-kits 0.162.24-debug → 0.162.25-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
CHANGED
|
@@ -29,6 +29,7 @@ import androidx.compose.ui.Alignment
|
|
|
29
29
|
import androidx.compose.ui.Modifier
|
|
30
30
|
import androidx.compose.ui.focus.onFocusChanged
|
|
31
31
|
import androidx.compose.ui.graphics.Color
|
|
32
|
+
import androidx.compose.ui.graphics.takeOrElse
|
|
32
33
|
import androidx.compose.ui.text.TextStyle
|
|
33
34
|
import androidx.compose.ui.text.input.KeyboardType
|
|
34
35
|
import androidx.compose.ui.text.style.TextOverflow
|
|
@@ -49,7 +50,7 @@ import vn.momo.kits.utils.ifTrue
|
|
|
49
50
|
internal fun RenderRightIconSearch(
|
|
50
51
|
loading: Boolean,
|
|
51
52
|
icon: String,
|
|
52
|
-
color: Color
|
|
53
|
+
color: Color?,
|
|
53
54
|
onClick: () -> Unit,
|
|
54
55
|
iconModifier: Modifier = Modifier
|
|
55
56
|
) {
|
|
@@ -57,7 +58,7 @@ internal fun RenderRightIconSearch(
|
|
|
57
58
|
Box(Modifier.padding(horizontal = Spacing.S)) {
|
|
58
59
|
CircularProgressIndicator(
|
|
59
60
|
modifier = Modifier.size(16.dp),
|
|
60
|
-
color = color,
|
|
61
|
+
color = color ?: AppTheme.current.colors.text.default,
|
|
61
62
|
trackColor = Color.Transparent,
|
|
62
63
|
strokeWidth = 2.dp
|
|
63
64
|
)
|
|
@@ -90,7 +91,7 @@ data class InputSearchProps(
|
|
|
90
91
|
val onPressButtonText: () -> Unit = {},
|
|
91
92
|
val disabled: Boolean = false,
|
|
92
93
|
val icon: String = "",
|
|
93
|
-
val iconColor: Color = Color
|
|
94
|
+
val iconColor: Color? = Color.Unspecified,
|
|
94
95
|
val onRightIconPressed: () -> Unit = {},
|
|
95
96
|
val onFocus: () -> Unit = {},
|
|
96
97
|
val onBlur: () -> Unit = {},
|
|
@@ -113,7 +114,6 @@ data class InputSearchProps(
|
|
|
113
114
|
fun InputSearch(
|
|
114
115
|
inputSearchProps: InputSearchProps = InputSearchProps(
|
|
115
116
|
text = remember { mutableStateOf("") },
|
|
116
|
-
iconColor = AppTheme.current.colors.text.default
|
|
117
117
|
),
|
|
118
118
|
) {
|
|
119
119
|
var isFocused by remember { mutableStateOf(false) }
|
|
@@ -121,7 +121,7 @@ fun InputSearch(
|
|
|
121
121
|
val disabledColor = AppTheme.current.colors.text.disable
|
|
122
122
|
var textColor = AppTheme.current.colors.text.default
|
|
123
123
|
var placeholderColor = AppTheme.current.colors.text.hint
|
|
124
|
-
var iconTintColor = inputSearchProps.iconColor
|
|
124
|
+
var iconTintColor = inputSearchProps.iconColor?.takeOrElse { AppTheme.current.colors.text.default }
|
|
125
125
|
|
|
126
126
|
if (inputSearchProps.disabled) {
|
|
127
127
|
textColor = disabledColor
|
package/gradle.properties
CHANGED