@momo-kits/native-kits 0.89.15 → 0.89.16
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/android/build.gradle +1 -1
- package/compose/build.gradle.kts +1 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +2 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +3 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +3 -2
- package/gradle.properties +3 -3
- package/package.json +1 -1
package/android/build.gradle
CHANGED
package/compose/build.gradle.kts
CHANGED
|
@@ -6,7 +6,7 @@ plugins {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
val libGroup = "vn.momo.kits"
|
|
9
|
-
val libVersion = "0.0.
|
|
9
|
+
val libVersion = "0.0.2"
|
|
10
10
|
|
|
11
11
|
kotlin {
|
|
12
12
|
androidTarget {
|
|
@@ -37,7 +37,6 @@ kotlin {
|
|
|
37
37
|
implementation(libs.ktor.client.core)
|
|
38
38
|
implementation("com.github.skydoves:landscapist-coil3:2.3.2")
|
|
39
39
|
implementation(compose.components.resources)
|
|
40
|
-
implementation("org.jetbrains.androidx.navigation:navigation-compose:2.7.0-alpha07")
|
|
41
40
|
|
|
42
41
|
implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion")
|
|
43
42
|
implementation("cafe.adriel.voyager:voyager-screenmodel:$voyagerVersion")
|
|
@@ -22,6 +22,7 @@ import androidx.compose.ui.Modifier
|
|
|
22
22
|
import androidx.compose.ui.draw.clip
|
|
23
23
|
import androidx.compose.ui.graphics.Color
|
|
24
24
|
import androidx.compose.ui.text.TextStyle
|
|
25
|
+
import androidx.compose.ui.text.style.TextOverflow
|
|
25
26
|
import androidx.compose.ui.unit.Dp
|
|
26
27
|
import androidx.compose.ui.unit.dp
|
|
27
28
|
import vn.momo.kits.const.AppTheme
|
|
@@ -116,7 +117,7 @@ fun getTextColor(type: ButtonType): Color {
|
|
|
116
117
|
fun RenderTitle(size: Size, title: String = "", type: ButtonType) {
|
|
117
118
|
val style = getStyle(size)
|
|
118
119
|
val color = getTextColor(type)
|
|
119
|
-
Text(style = style, text = title, color = color)
|
|
120
|
+
Text(style = style, text = title, color = color, overflow = TextOverflow.Ellipsis)
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
@Composable
|
|
@@ -7,6 +7,7 @@ import androidx.compose.ui.text.font.FontFamily
|
|
|
7
7
|
import androidx.compose.ui.text.font.FontStyle
|
|
8
8
|
import androidx.compose.ui.text.font.FontWeight
|
|
9
9
|
import androidx.compose.ui.unit.sp
|
|
10
|
+
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
|
10
11
|
import org.jetbrains.compose.resources.Font
|
|
11
12
|
import org.jetbrains.compose.resources.FontResource
|
|
12
13
|
import org.jetbrains.compose.resources.InternalResourceApi
|
|
@@ -25,12 +26,12 @@ fun scaleSize(size: Float): Float {
|
|
|
25
26
|
return size
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
@OptIn(InternalResourceApi::class)
|
|
29
|
+
@OptIn(InternalResourceApi::class, ExperimentalResourceApi::class)
|
|
29
30
|
@Composable
|
|
30
31
|
fun getFont(font: String): FontFamily {
|
|
31
32
|
val fontResource = FontResource(
|
|
32
33
|
"font:${font}",
|
|
33
|
-
setOf(ResourceItem(setOf(), "font/${font}.ttf"
|
|
34
|
+
setOf(ResourceItem(setOf(), "font/${font}.ttf"))
|
|
34
35
|
)
|
|
35
36
|
return FontFamily(Font(fontResource))
|
|
36
37
|
}
|
|
@@ -2,14 +2,15 @@ package vn.momo.kits.utils
|
|
|
2
2
|
|
|
3
3
|
import androidx.compose.runtime.Composable
|
|
4
4
|
import org.jetbrains.compose.resources.DrawableResource
|
|
5
|
+
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
|
5
6
|
import org.jetbrains.compose.resources.InternalResourceApi
|
|
6
7
|
import org.jetbrains.compose.resources.ResourceItem
|
|
7
8
|
|
|
8
|
-
@OptIn(InternalResourceApi::class)
|
|
9
|
+
@OptIn(InternalResourceApi::class, ExperimentalResourceApi::class)
|
|
9
10
|
@Composable
|
|
10
11
|
fun getResource(name: String): DrawableResource {
|
|
11
12
|
return DrawableResource(
|
|
12
13
|
"drawable:$name",
|
|
13
|
-
setOf(ResourceItem(setOf(), "drawable/$name"
|
|
14
|
+
setOf(ResourceItem(setOf(), "drawable/$name"))
|
|
14
15
|
)
|
|
15
16
|
}
|
package/gradle.properties
CHANGED
|
@@ -12,8 +12,8 @@ android.compileSdk=34
|
|
|
12
12
|
android.targetSdk=34
|
|
13
13
|
android.minSdk=24
|
|
14
14
|
#Versions
|
|
15
|
-
kotlin.version=1.9.
|
|
15
|
+
kotlin.version=1.9.23
|
|
16
16
|
agp.version=8.1.1
|
|
17
|
-
compose.version=1.6.
|
|
18
|
-
composeCompilerVersion = 1.5.
|
|
17
|
+
compose.version=1.6.2
|
|
18
|
+
composeCompilerVersion = 1.5.11
|
|
19
19
|
maven-publish.version=0.25.3
|