@momo-kits/native-kits 0.162.1-debug → 0.162.1-sp.1-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.
Files changed (22) hide show
  1. package/.claude/settings.local.json +35 -0
  2. package/compose/build.gradle.kts +1 -1
  3. package/compose/build.gradle.kts.backup +59 -59
  4. package/compose/compose.podspec +1 -1
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +4 -0
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +1 -1
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +46 -10
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +4 -2
  9. package/gradle.properties +1 -1
  10. package/ios/Information/Information.swift +151 -0
  11. package/local.properties +2 -2
  12. package/package.json +1 -1
  13. package/publish.sh +2 -2
  14. package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  15. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  16. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -5
  17. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  18. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  19. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  20. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  21. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  22. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
@@ -0,0 +1,35 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(curl -s -o /dev/null -w \"%{http_code}\" \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.pom\")",
5
+ "Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/maven-metadata.xml\")",
6
+ "Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko/maven-metadata.xml\")",
7
+ "Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko/0.144.6/skiko-0.144.6.module\")",
8
+ "Bash(curl -s -o /dev/null -w '%{http_code}' https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.__TRACKED_VAR__)",
9
+ "Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/\")",
10
+ "Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/\")",
11
+ "Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.148.1/skiko-android-0.148.1.pom\")",
12
+ "Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.5/skiko-android-0.144.5.pom\")",
13
+ "Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" \"https://dl.google.com/dl/android/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.pom\")",
14
+ "Bash(curl -s \"https://search.maven.org/solrsearch/select?q=a:skiko-android&rows=5&wt=json\")",
15
+ "Bash(curl -sL -o /dev/null -w \"%{http_code} %{url_effective}\\\\n\" \"https://repo1.maven.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.pom\")",
16
+ "Bash(curl *)",
17
+ "Bash(./gradlew :sample:androidApp:dependencies --configuration debugRuntimeClasspath)",
18
+ "Bash(./gradlew :sample:shared:compileDebugKotlinAndroid)",
19
+ "Bash(./gradlew :sample:androidApp:compileDebugKotlin)",
20
+ "Bash(ls -d *.xcodeproj)",
21
+ "Bash(grep -c ChipDemo.swift __TRACKED_VAR__/project.pbxproj)",
22
+ "Bash(grep -c PBXFileSystemSynchronizedRootGroup __TRACKED_VAR__/project.pbxproj)",
23
+ "Bash(grep -c InformationDemo.swift __TRACKED_VAR__/project.pbxproj)",
24
+ "Bash(plutil -lint project.pbxproj)",
25
+ "Bash(xcode-select -p)",
26
+ "Bash(/usr/bin/xcrun xcodebuild *)",
27
+ "Bash(echo \"exit: $?\")",
28
+ "Bash(/Applications/Xcode26.app/Contents/Developer/usr/bin/xcodebuild -version)",
29
+ "Bash(./gradlew :compose:tasks --all)",
30
+ "Bash(grep -n \"vanniktech\\\\|mavenPublishing\\\\|^publishing\\\\|version = gitlabVersion\\\\|namespace =\\\\|compileSdk =\\\\|minSdk =\\\\|GitLabPackages\\\\|name = \\\\\"\\\\${gitlabRepo}Packages\\\\\"\")",
31
+ "Bash(git checkout *)",
32
+ "Bash(./gradlew :compose:publishAllPublicationsToGitLabPackagesRepository --dry-run)"
33
+ ]
34
+ }
35
+ }
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.161.0-debug"
43
+ version = "0.162.1-sp.1-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -1,5 +1,5 @@
1
- // import com.vanniktech.maven.publish.JavadocJar
2
- // import com.vanniktech.maven.publish.KotlinMultiplatform
1
+ import com.vanniktech.maven.publish.JavadocJar
2
+ import com.vanniktech.maven.publish.KotlinMultiplatform
3
3
  import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
4
 
5
5
  plugins {
@@ -7,7 +7,7 @@ plugins {
7
7
  alias(libs.plugins.android.library)
8
8
  alias(libs.plugins.compose)
9
9
  alias(libs.plugins.kotlin.compose.compiler)
10
- // alias(libs.plugins.vanniktech.mavenPublish)
10
+ alias(libs.plugins.vanniktech.mavenPublish)
11
11
  id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
12
12
  kotlin("plugin.serialization")
13
13
  }
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.161.0-debug"
43
+ version = gitlabVersion
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -86,14 +86,14 @@ kotlin {
86
86
  }
87
87
 
88
88
  android {
89
- namespace = "vn.momo.kits.kits"
90
- compileSdk = 35
89
+ namespace = "$gitlabGroup.$gitlabArtifactId"
90
+ compileSdk = libs.versions.android.compileSdk.get().toInt()
91
91
  compileOptions {
92
92
  sourceCompatibility = JavaVersion.VERSION_17
93
93
  targetCompatibility = JavaVersion.VERSION_17
94
94
  }
95
95
  defaultConfig {
96
- minSdk = 24
96
+ minSdk = libs.versions.android.minSdk.get().toInt()
97
97
  }
98
98
  }
99
99
 
@@ -132,55 +132,55 @@ compose {
132
132
  }
133
133
  }
134
134
 
135
- // publishing {
136
- // repositories {
137
- // maven {
138
- // name = "${gitlabRepo}Packages"
139
- // credentials {
140
- // username = gitlabUser
141
- // password = gitlabKey
142
- // }
143
- // url = uri("$gitlabUrl")
144
- // }
145
- // }
146
- // }
147
-
148
- // mavenPublishing {
149
- // configure(
150
- // KotlinMultiplatform(
151
- // javadocJar = JavadocJar.Empty(),
152
- // sourcesJar = true,
153
- // androidVariantsToPublish = listOf("release")
154
- // )
155
- // )
156
- //
157
- // repositories {
158
- // maven {
159
- // name = "${gitlabRepo}Packages"
160
- // credentials { username = gitlabUser; password = gitlabKey }
161
- // url = uri("$gitlabUrl")
162
- // }
163
- // }
164
- //
165
- // coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
166
- //
167
- // pom {
168
- // name = "$gitlabName Klib"
169
- // description = "$gitlabName"
170
- // url = "https://gitlab.mservice.com.vn"
171
- // licenses {
172
- // license {
173
- // name = "The Apache License, Version 2.0"
174
- // url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
175
- // distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
176
- // }
177
- // }
178
- // developers {
179
- // developer {
180
- // id = "kotlin-hands-on"
181
- // name = "Kotlin Developer Advocate"
182
- // url = "https://github.com/kotlin-hands-on/"
183
- // }
184
- // }
185
- // }
186
- // }
135
+ publishing {
136
+ repositories {
137
+ maven {
138
+ name = "${gitlabRepo}Packages"
139
+ credentials {
140
+ username = gitlabUser
141
+ password = gitlabKey
142
+ }
143
+ url = uri("$gitlabUrl")
144
+ }
145
+ }
146
+ }
147
+
148
+ mavenPublishing {
149
+ configure(
150
+ KotlinMultiplatform(
151
+ javadocJar = JavadocJar.Empty(),
152
+ sourcesJar = true,
153
+ androidVariantsToPublish = listOf("release")
154
+ )
155
+ )
156
+
157
+ repositories {
158
+ maven {
159
+ name = "${gitlabRepo}Packages"
160
+ credentials { username = gitlabUser; password = gitlabKey }
161
+ url = uri("$gitlabUrl")
162
+ }
163
+ }
164
+
165
+ coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
166
+
167
+ pom {
168
+ name = "$gitlabName Klib"
169
+ description = "$gitlabName"
170
+ url = "https://gitlab.mservice.com.vn"
171
+ licenses {
172
+ license {
173
+ name = "The Apache License, Version 2.0"
174
+ url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
175
+ distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
176
+ }
177
+ }
178
+ developers {
179
+ developer {
180
+ id = "kotlin-hands-on"
181
+ name = "Kotlin Developer Advocate"
182
+ url = "https://github.com/kotlin-hands-on/"
183
+ }
184
+ }
185
+ }
186
+ }
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |spec|
2
2
  spec.name = 'compose'
3
- spec.version = '0.161.2-beta.15'
3
+ spec.version = '0.161.0-debug'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
@@ -13,6 +13,7 @@ import vn.momo.kits.navigation.component.HeaderBackProps
13
13
  import vn.momo.kits.navigation.component.HeaderRight
14
14
  import vn.momo.kits.navigation.component.HeaderTitle
15
15
  import vn.momo.kits.navigation.component.HeaderType
16
+ import vn.momo.kits.navigation.component.TitlePosition
16
17
 
17
18
  class Navigation(
18
19
  val id: Int = -1,
@@ -28,6 +29,7 @@ class Navigation(
28
29
  hiddenBack: Boolean? = null,
29
30
  headerBackProps: HeaderBackProps? = null,
30
31
  headerTitle: HeaderTitle? = null,
32
+ titlePosition: TitlePosition? = null,
31
33
  headerRight: HeaderRight? = null,
32
34
  headerType: HeaderType? = null,
33
35
  scrollData: ScrollData? = null,
@@ -43,6 +45,7 @@ class Navigation(
43
45
  hiddenBack = hiddenBack ?: options.hiddenBack,
44
46
  headerBackProps = headerBackProps ?: options.headerBackProps,
45
47
  headerTitle = headerTitle ?: options.headerTitle,
48
+ titlePosition = titlePosition ?: options.titlePosition,
46
49
  headerRight = headerRight ?: options.headerRight,
47
50
  headerType = headerType ?: options.headerType,
48
51
  scrollData = scrollData ?: options.scrollData,
@@ -77,6 +80,7 @@ data class NavigationOptions(
77
80
  val hiddenBack: Boolean = false,
78
81
  val headerBackProps: HeaderBackProps = HeaderBackProps(),
79
82
  val headerTitle: HeaderTitle = HeaderTitle.Default("Stack"),
83
+ val titlePosition: TitlePosition = TitlePosition.LEFT,
80
84
  val headerRight: HeaderRight = HeaderRight.Toolkit(),
81
85
  val headerType: HeaderType = HeaderType.Default(),
82
86
  val scrollData: ScrollData = ScrollData(),
@@ -376,7 +376,7 @@ fun SearchAnimated(
376
376
  val minTopPadding = AppStatusBar.current
377
377
  val maxTopPadding = AppStatusBar.current + HEADER_HEIGHT.dp
378
378
  val minStartPadding = Spacing.M
379
- val maxStartPadding = if (options.hiddenBack) Spacing.M else 52.dp
379
+ val maxStartPadding = if (options.hiddenBack) Spacing.M else 48.dp // button back: size + left +right = 28 + 12 + 8 = 48
380
380
  val minEndPadding = Spacing.M
381
381
  val maxEndPadding = headerRightWidthDp + if (options.headerRight is HeaderRight.None) Spacing.M else Spacing.M * 2
382
382
 
@@ -6,7 +6,6 @@ import androidx.compose.foundation.border
6
6
  import androidx.compose.foundation.layout.Arrangement
7
7
  import androidx.compose.foundation.layout.Box
8
8
  import androidx.compose.foundation.layout.Row
9
- import androidx.compose.foundation.layout.RowScope
10
9
  import androidx.compose.foundation.layout.Spacer
11
10
  import androidx.compose.foundation.layout.fillMaxWidth
12
11
  import androidx.compose.foundation.layout.height
@@ -23,6 +22,7 @@ import androidx.compose.ui.graphics.Brush
23
22
  import androidx.compose.ui.graphics.Color
24
23
  import androidx.compose.ui.layout.onGloballyPositioned
25
24
  import androidx.compose.ui.platform.LocalDensity
25
+ import androidx.compose.ui.text.style.TextAlign
26
26
  import androidx.compose.ui.unit.Dp
27
27
  import androidx.compose.ui.unit.dp
28
28
  import vn.momo.kits.components.Icon
@@ -44,6 +44,7 @@ import vn.momo.kits.navigation.getInputSearchType
44
44
 
45
45
  const val HEADER_HEIGHT = 52
46
46
  enum class InputSearchType { None, Header, Animated }
47
+ enum class TitlePosition { LEFT, CENTER }
47
48
 
48
49
  @Composable
49
50
  fun Header(onBackHandler: (() -> Unit)? = null) {
@@ -76,6 +77,13 @@ fun Header(onBackHandler: (() -> Unit)? = null) {
76
77
  AppTheme.current.colors.background.surface
77
78
 
78
79
  if (options.headerType == HeaderType.None) return
80
+
81
+ val titlePosition = options.titlePosition
82
+ val titleColor = headerColor.tintIconColor
83
+ .copy(alpha = if (inputSearchType == InputSearchType.Animated) 1f - animatedAlpha else 1f)
84
+ // Centered title needs a full-width overlay to stay screen-centered, not boxed between back button and header right.
85
+ val centerTitle = titlePosition == TitlePosition.CENTER && options.headerTitle is HeaderTitle.Default
86
+
79
87
  Box(
80
88
  Modifier.height(AppStatusBar.current + HEADER_HEIGHT.dp)
81
89
  .fillMaxWidth()
@@ -101,20 +109,40 @@ fun Header(onBackHandler: (() -> Unit)? = null) {
101
109
  onBackHandler?.invoke() ?: navigator.onBackSafe { }
102
110
  }
103
111
  )
104
- Spacer(Modifier.width(Spacing.M))
112
+ Spacer(Modifier.width(Spacing.S))
105
113
  }
106
114
 
107
- HeaderContent(
108
- options.headerTitle,
109
- headerColor.tintIconColor
110
- .copy(alpha = if (inputSearchType == InputSearchType.Animated) 1f - animatedAlpha else 1f)
111
- )
115
+ if (centerTitle) {
116
+ Spacer(Modifier.weight(1f))
117
+ } else {
118
+ HeaderContent(
119
+ headerTitle = options.headerTitle,
120
+ tintIconColor = titleColor,
121
+ titlePosition = titlePosition,
122
+ modifier = Modifier.weight(1f)
123
+ )
124
+ }
112
125
  Box(Modifier.onGloballyPositioned {
113
126
  if(headerRightWidthPx.intValue != it.size.width) headerRightWidthPx.intValue = it.size.width
114
127
  }){
115
128
  HeaderRight(options.headerRight, options.tintColor, headerColor)
116
129
  }
117
130
  }
131
+ if (centerTitle) {
132
+ Box(
133
+ modifier = Modifier.height(HEADER_HEIGHT.dp)
134
+ .fillMaxWidth()
135
+ .padding(horizontal = Spacing.M),
136
+ contentAlignment = Alignment.Center
137
+ ) {
138
+ HeaderContent(
139
+ headerTitle = options.headerTitle,
140
+ tintIconColor = titleColor,
141
+ titlePosition = titlePosition,
142
+ modifier = Modifier.fillMaxWidth()
143
+ )
144
+ }
145
+ }
118
146
  VerticalShadow(opacity)
119
147
  }
120
148
  }
@@ -140,15 +168,23 @@ private fun BackButton(borderColor: Color, backgroundButton: Color, tintIconColo
140
168
  }
141
169
 
142
170
  @Composable
143
- fun RowScope.HeaderContent(headerTitle: HeaderTitle, tintIconColor: Color){
171
+ fun HeaderContent(
172
+ headerTitle: HeaderTitle,
173
+ tintIconColor: Color,
174
+ titlePosition: TitlePosition = TitlePosition.LEFT,
175
+ modifier: Modifier = Modifier,
176
+ ){
144
177
  Box(
145
- Modifier.weight(1f)
178
+ modifier = modifier,
179
+ contentAlignment = if (titlePosition == TitlePosition.CENTER) Alignment.Center else Alignment.CenterStart
146
180
  ) {
147
181
  when (headerTitle){
148
182
  is HeaderTitle.Default -> {
149
183
  HeaderTitle(
150
184
  title = headerTitle.title,
151
- color = tintIconColor
185
+ color = tintIconColor,
186
+ modifier = Modifier.fillMaxWidth(fraction = if (titlePosition == TitlePosition.CENTER) 0.5f else 1f),
187
+ textAlign = if (titlePosition == TitlePosition.CENTER) TextAlign.Center else TextAlign.Start
152
188
  )
153
189
  }
154
190
  is HeaderTitle.Journey -> {}
@@ -16,11 +16,13 @@ import vn.momo.kits.modifier.setAutomationId
16
16
  fun HeaderTitle(
17
17
  title: String = "",
18
18
  color: Color? = null,
19
+ modifier: Modifier = Modifier.fillMaxWidth(),
20
+ textAlign: TextAlign = TextAlign.Start,
19
21
  ) {
20
22
  Text(
21
- modifier = Modifier.fillMaxWidth().zIndex(1f).setAutomationId("title_navigation_header"),
23
+ modifier = modifier.zIndex(1f).setAutomationId("title_navigation_header"),
22
24
  text = title,
23
- textAlign = TextAlign.Start,
25
+ textAlign = textAlign,
24
26
  style = Typography.actionSBold.copy(
25
27
  fontSize = 15.sp,
26
28
  lineHeight = 22.sp,
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.162.1
21
+ version=0.162.1-sp.1
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
@@ -0,0 +1,151 @@
1
+ import SwiftUI
2
+
3
+ public enum InformationState {
4
+ case `default`
5
+ case warning
6
+ case error
7
+ }
8
+
9
+ public struct Information: View {
10
+ private let title: String?
11
+ private let description: String
12
+ private let state: InformationState
13
+ private let image: String?
14
+ private let onPressAction: (() -> Void)?
15
+ private let showIcon: Bool
16
+ private let action: String?
17
+ private let showIconClose: Bool
18
+ private let onPressClose: (() -> Void)?
19
+
20
+ public init(
21
+ title: String? = nil,
22
+ description: String = "Description",
23
+ state: InformationState = .default,
24
+ image: String? = nil,
25
+ onPressAction: (() -> Void)? = nil,
26
+ showIcon: Bool = true,
27
+ action: String? = nil,
28
+ showIconClose: Bool = true,
29
+ onPressClose: (() -> Void)? = nil
30
+ ) {
31
+ self.title = title
32
+ self.description = description
33
+ self.state = state
34
+ self.image = image
35
+ self.onPressAction = onPressAction
36
+ self.showIcon = showIcon
37
+ self.action = action
38
+ self.showIconClose = showIconClose
39
+ self.onPressClose = onPressClose
40
+ }
41
+
42
+ private var borderColor: Color {
43
+ switch state {
44
+ case .default: return Colors.blue07
45
+ case .warning: return Colors.yellow06
46
+ case .error: return Colors.red07
47
+ }
48
+ }
49
+
50
+ private var backgroundColor: Color {
51
+ switch state {
52
+ case .default: return Colors.blue10
53
+ case .warning: return Colors.yellow09
54
+ case .error: return Colors.red10
55
+ }
56
+ }
57
+
58
+ private var accentColor: Color {
59
+ switch state {
60
+ case .default: return Colors.blue03
61
+ case .warning: return Colors.orange03
62
+ case .error: return Colors.red03
63
+ }
64
+ }
65
+
66
+ private var iconSource: String {
67
+ switch state {
68
+ case .default: return "notifications_info"
69
+ case .warning: return "24_notifications_alert_triangle"
70
+ case .error: return "24_notifications_alert_octagon"
71
+ }
72
+ }
73
+
74
+ public var body: some View {
75
+ VStack(alignment: .leading, spacing: 0) {
76
+ HStack(alignment: .top, spacing: 0) {
77
+ if let image {
78
+ ImageView(image)
79
+ .frame(width: 40, height: 40)
80
+ .clipShape(RoundedRectangle(cornerRadius: Radius.S))
81
+ .padding(.trailing, Spacing.S)
82
+ } else if showIcon {
83
+ Icon(source: iconSource, size: 16, color: accentColor)
84
+ .padding(.trailing, Spacing.S)
85
+ }
86
+
87
+ VStack(alignment: .leading, spacing: 0) {
88
+ if let title {
89
+ MomoText(title, typography: .labelDefaultMedium)
90
+ }
91
+ MomoText(description, typography: .descriptionDefaultRegular)
92
+ }
93
+ .frame(maxWidth: .infinity, alignment: .leading)
94
+
95
+ if let onPressClose, showIconClose {
96
+ Icon(source: "navigation_close", size: 16, color: Colors.black17)
97
+ .contentShape(Rectangle())
98
+ .onTapGesture(perform: onPressClose)
99
+ }
100
+ }
101
+
102
+ if let action, let onPressAction {
103
+ MomoText(action, typography: .actionXsBold, color: accentColor)
104
+ .frame(maxWidth: .infinity, alignment: .trailing)
105
+ .contentShape(Rectangle())
106
+ .onTapGesture(perform: onPressAction)
107
+ .padding(.top, Spacing.S)
108
+ }
109
+ }
110
+ .padding(Spacing.M)
111
+ .background(
112
+ RoundedRectangle(cornerRadius: Radius.S)
113
+ .fill(backgroundColor)
114
+ )
115
+ .overlay(
116
+ RoundedRectangle(cornerRadius: Radius.S)
117
+ .stroke(borderColor, lineWidth: 0.5)
118
+ )
119
+ }
120
+ }
121
+
122
+ // MARK: - Preview
123
+ #if DEBUG
124
+ struct Information_Previews: PreviewProvider {
125
+ static var previews: some View {
126
+ VStack(spacing: 16) {
127
+ Information(
128
+ title: "Information",
129
+ description: "This is a default information message."
130
+ )
131
+ Information(
132
+ title: "Warning",
133
+ description: "This is a warning message.",
134
+ state: .warning
135
+ )
136
+ Information(
137
+ title: "Error",
138
+ description: "This is an error message.",
139
+ state: .error,
140
+ onPressAction: {}, action: "Retry"
141
+ )
142
+ Information(
143
+ description: "Dismissible information.",
144
+ onPressClose: {}
145
+ )
146
+ }
147
+ .padding()
148
+ .previewLayout(.sizeThatFits)
149
+ }
150
+ }
151
+ #endif
package/local.properties CHANGED
@@ -4,5 +4,5 @@
4
4
  # Location of the SDK. This is only used by Gradle.
5
5
  # For customization when using a Version Control System, please read the
6
6
  # header note.
7
- #Wed Aug 21 14:20:12 ICT 2024
8
- sdk.dir=/Users/huynhdung/Library/Android/sdk
7
+ #Tue Jun 02 17:05:32 ICT 2026
8
+ sdk.dir=/Users/sophia/Library/Android/sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.162.1-debug",
3
+ "version": "0.162.1-sp.1-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},
package/publish.sh CHANGED
@@ -456,7 +456,7 @@ case "$PHASE" in
456
456
  ;;
457
457
  "maven")
458
458
  echo "Running PHASE 2 only: Publish to Maven"
459
- # phase_publish_maven
459
+ phase_publish_maven
460
460
  ;;
461
461
  "npm")
462
462
  echo "Running PHASE 3 only: Publish to NPM"
@@ -465,7 +465,7 @@ case "$PHASE" in
465
465
  "all")
466
466
  echo "Running ALL PHASES"
467
467
  phase_check_version
468
- # phase_publish_maven
468
+ phase_publish_maven
469
469
  phase_publish_npm
470
470
  echo ""
471
471
  echo "🎉 ALL PHASES COMPLETED SUCCESSFULLY!"
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>Example.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict />
5
- </plist>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "3B6FB503A75BF5BC1FA6F30BC06B9D28"
18
- BuildableName = "MoMoUIKits.framework"
19
- BlueprintName = "MoMoUIKits"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "0AEE99A309977BD12A049FF48AF9BA4B"
18
- BuildableName = "Pods_Example.framework"
19
- BlueprintName = "Pods-Example"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "3847153A6E5EEFB86565BA840768F429"
18
- BuildableName = "SDWebImage.framework"
19
- BlueprintName = "SDWebImage"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "92EBFA3E7005B4C18A9C0B44324EB80F"
18
- BuildableName = "SDWebImageSwiftUI.framework"
19
- BlueprintName = "SDWebImageSwiftUI"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "6510766A9670BFA3B251E2A62446FC5D"
18
- BuildableName = "SkeletonUI.framework"
19
- BlueprintName = "SkeletonUI"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>MoMoUIKits.xcscheme</key>
8
- <dict>
9
- <key>isShown</key>
10
- <false />
11
- <key>orderHint</key>
12
- <integer>0</integer>
13
- </dict>
14
- <key>Pods-Example.xcscheme</key>
15
- <dict>
16
- <key>isShown</key>
17
- <false />
18
- <key>orderHint</key>
19
- <integer>1</integer>
20
- </dict>
21
- <key>SDWebImage.xcscheme</key>
22
- <dict>
23
- <key>isShown</key>
24
- <false />
25
- <key>orderHint</key>
26
- <integer>2</integer>
27
- </dict>
28
- <key>SDWebImageSwiftUI.xcscheme</key>
29
- <dict>
30
- <key>isShown</key>
31
- <false />
32
- <key>orderHint</key>
33
- <integer>3</integer>
34
- </dict>
35
- <key>SkeletonUI.xcscheme</key>
36
- <dict>
37
- <key>isShown</key>
38
- <false />
39
- <key>orderHint</key>
40
- <integer>4</integer>
41
- </dict>
42
- </dict>
43
- <key>SuppressBuildableAutocreation</key>
44
- <dict />
45
- </dict>
46
- </plist>