@momo-kits/native-kits 0.89.20 → 0.89.21
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 +0 -8
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Components.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +0 -7
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +2 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +0 -2
- package/gradle.properties +1 -1
- package/package.json +1 -1
- package/settings.gradle.kts +1 -1
package/compose/build.gradle.kts
CHANGED
|
@@ -3,7 +3,6 @@ plugins {
|
|
|
3
3
|
id("com.android.library")
|
|
4
4
|
id("org.jetbrains.compose")
|
|
5
5
|
id("maven-publish")
|
|
6
|
-
alias(libs.plugins.kotlinx.serialization)
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
val libGroup = "vn.momo.kits"
|
|
@@ -28,7 +27,6 @@ kotlin {
|
|
|
28
27
|
sourceSets {
|
|
29
28
|
val commonMain by getting {
|
|
30
29
|
dependencies {
|
|
31
|
-
val voyagerVersion = "1.1.0-alpha03"
|
|
32
30
|
implementation(compose.runtime)
|
|
33
31
|
implementation(compose.foundation)
|
|
34
32
|
implementation(compose.material)
|
|
@@ -102,9 +100,3 @@ android {
|
|
|
102
100
|
jvmToolchain(17)
|
|
103
101
|
}
|
|
104
102
|
}
|
|
105
|
-
|
|
106
|
-
dependencies {
|
|
107
|
-
implementation(libs.androidx.animation.android)
|
|
108
|
-
implementation(libs.androidx.navigation.compose)
|
|
109
|
-
implementation(libs.androidx.activity.ktx)
|
|
110
|
-
}
|
|
@@ -224,8 +224,6 @@ fun getTypeStyle(
|
|
|
224
224
|
* @param enabled controls the enabled state of this button. When `false`,
|
|
225
225
|
* this component will not respond to user input, and it will appear
|
|
226
226
|
* visually disabled and disabled to accessibility services.
|
|
227
|
-
* @param isRipple [Boolean] controls the ripple animation of button. When
|
|
228
|
-
* `false`, the button won't have ripple animation.
|
|
229
227
|
* @param useTintColor [Boolean] controls color of the icon.
|
|
230
228
|
*/
|
|
231
229
|
@Composable
|
|
@@ -238,7 +236,6 @@ fun Button(
|
|
|
238
236
|
title: String = "Button",
|
|
239
237
|
loading: Boolean = false,
|
|
240
238
|
enabled: Boolean = true,
|
|
241
|
-
isRipple: Boolean = true,
|
|
242
239
|
useTintColor: Boolean = true,
|
|
243
240
|
isFull: Boolean = true,
|
|
244
241
|
modifier: Modifier = Modifier,
|
|
@@ -247,8 +244,6 @@ fun Button(
|
|
|
247
244
|
modifier
|
|
248
245
|
.fillMaxWidth()
|
|
249
246
|
.clip(RoundedCornerShape(size.value.radius)).clickable(
|
|
250
|
-
interactionSource = remember { MutableInteractionSource() },
|
|
251
|
-
indication = if (isRipple) rememberRipple() else null,
|
|
252
247
|
enabled = enabled,
|
|
253
248
|
onClick = onClick
|
|
254
249
|
)
|
|
@@ -256,8 +251,6 @@ fun Button(
|
|
|
256
251
|
} else {
|
|
257
252
|
modifier
|
|
258
253
|
.clip(RoundedCornerShape(size.value.radius)).clickable(
|
|
259
|
-
interactionSource = remember { MutableInteractionSource() },
|
|
260
|
-
indication = if (isRipple) rememberRipple() else null,
|
|
261
254
|
enabled = enabled,
|
|
262
255
|
onClick = onClick
|
|
263
256
|
)
|
|
@@ -110,8 +110,6 @@ fun IconButton(
|
|
|
110
110
|
.then(getIconStyle(type))
|
|
111
111
|
.clip(RoundedCornerShape(size.value.radius))
|
|
112
112
|
.clickable(
|
|
113
|
-
interactionSource = remember { MutableInteractionSource() },
|
|
114
|
-
indication = rememberRipple(),
|
|
115
113
|
enabled = type == ButtonType.DISABLED,
|
|
116
114
|
onClick = onClick
|
|
117
115
|
),
|
|
@@ -15,6 +15,7 @@ import androidx.compose.ui.layout.ContentScale
|
|
|
15
15
|
import androidx.compose.ui.semantics.contentDescription
|
|
16
16
|
import androidx.compose.ui.semantics.semantics
|
|
17
17
|
import androidx.compose.ui.semantics.testTag
|
|
18
|
+
import androidx.compose.ui.unit.dp
|
|
18
19
|
import coil3.compose.AsyncImage
|
|
19
20
|
import vn.momo.kits.const.AppTheme
|
|
20
21
|
|
|
@@ -63,7 +64,7 @@ fun Image(
|
|
|
63
64
|
onError = { imageState = ImageState.Error },
|
|
64
65
|
)
|
|
65
66
|
when (imageState) {
|
|
66
|
-
ImageState.Loading -> Skeleton()
|
|
67
|
+
ImageState.Loading -> if (loading) Skeleton()
|
|
67
68
|
ImageState.Error -> Icon(
|
|
68
69
|
source = "media_fail",
|
|
69
70
|
color = AppTheme.current.colors.text.disable,
|
|
@@ -41,8 +41,6 @@ fun Switch(
|
|
|
41
41
|
RoundedCornerShape(20.dp)
|
|
42
42
|
).background(backgroundColor, RoundedCornerShape(20.dp)).clip(RoundedCornerShape(20.dp))
|
|
43
43
|
.clickable(
|
|
44
|
-
interactionSource = remember { MutableInteractionSource() },
|
|
45
|
-
indication = rememberRipple(),
|
|
46
44
|
enabled = !disabled,
|
|
47
45
|
onClick = { onChange(!value) }
|
|
48
46
|
)
|
package/gradle.properties
CHANGED
package/package.json
CHANGED
package/settings.gradle.kts
CHANGED
|
@@ -13,6 +13,7 @@ pluginManagement {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
plugins {
|
|
16
|
+
|
|
16
17
|
val kotlinVersion = extra["kotlin.version"] as String
|
|
17
18
|
val agpVersion = extra["agp.version"] as String
|
|
18
19
|
val composeVersion = extra["compose.version"] as String
|
|
@@ -37,6 +38,5 @@ dependencyResolutionManagement {
|
|
|
37
38
|
mavenCentral()
|
|
38
39
|
google()
|
|
39
40
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
|
40
|
-
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
|
|
41
41
|
}
|
|
42
42
|
}
|