@momo-kits/native-kits 0.156.8-debug → 0.156.8-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.
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +1 -1
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -3
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +19 -17
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +42 -51
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +14 -13
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +12 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +6 -7
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +29 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +4 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +2 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -3
- package/example/ios/Example.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
- package/gradle.properties +1 -1
- package/ios/Application/FloatingButton.swift +1 -1
- package/ios/Badge/BadgeRibbon.swift +2 -2
- package/ios/Image/Image.swift +5 -1
- package/ios/Input/Input.swift +2 -2
- package/ios/Input/InputPhoneNumber.swift +7 -3
- package/ios/Popup/PopupDisplay.swift +6 -12
- package/local.properties +8 -0
- package/package.json +1 -1
|
@@ -137,7 +137,7 @@ public struct BadgeRibbon: View {
|
|
|
137
137
|
private var roundContent: some View {
|
|
138
138
|
HStack(spacing: 0) {
|
|
139
139
|
Text(label)
|
|
140
|
-
.font(.system(size: 12, weight: .medium))
|
|
140
|
+
.font(.system(size: scaleSize(12), weight: .medium))
|
|
141
141
|
.foregroundColor(Colors.black01)
|
|
142
142
|
.lineLimit(1)
|
|
143
143
|
.rotationEffect(rotation)
|
|
@@ -158,7 +158,7 @@ public struct BadgeRibbon: View {
|
|
|
158
158
|
private var skewContent: some View {
|
|
159
159
|
HStack(spacing: 0) {
|
|
160
160
|
Text(label)
|
|
161
|
-
.font(.system(size: 12, weight: .medium))
|
|
161
|
+
.font(.system(size: scaleSize(12), weight: .medium))
|
|
162
162
|
.foregroundColor(Colors.black01)
|
|
163
163
|
.lineLimit(1)
|
|
164
164
|
.rotationEffect(rotation)
|
package/ios/Image/Image.swift
CHANGED
|
@@ -31,7 +31,11 @@ public struct ImageView: View {
|
|
|
31
31
|
.placeholder {
|
|
32
32
|
VStack(alignment: .center, content: {
|
|
33
33
|
if error {
|
|
34
|
-
Image(
|
|
34
|
+
Image("media_fail")
|
|
35
|
+
.resizable()
|
|
36
|
+
.renderingMode(.template)
|
|
37
|
+
.foregroundColor(Colors.black08)
|
|
38
|
+
.frame(width: 24, height: 24)
|
|
35
39
|
} else if placeholder != nil {
|
|
36
40
|
placeholder
|
|
37
41
|
}
|
package/ios/Input/Input.swift
CHANGED
|
@@ -174,7 +174,7 @@ public struct Input: View {
|
|
|
174
174
|
onChangeText?("")
|
|
175
175
|
}) {
|
|
176
176
|
Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
|
|
177
|
-
.padding(.leading, Spacing.S)
|
|
177
|
+
.padding(.leading, Spacing.S).accessibility(identifier: "ic_clear")
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -194,7 +194,7 @@ public struct Input: View {
|
|
|
194
194
|
size: 24,
|
|
195
195
|
color: rightIconColor
|
|
196
196
|
)
|
|
197
|
-
.padding(.leading, Spacing.S)
|
|
197
|
+
.padding(.leading, Spacing.S).accessibility(identifier: "ic_show_hide")
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
} else if !rightIcon.isEmpty {
|
|
@@ -21,6 +21,7 @@ public struct InputPhoneNumber: View {
|
|
|
21
21
|
public var onFocus: (() -> Void)?
|
|
22
22
|
public var onBlur: (() -> Void)?
|
|
23
23
|
public var onRightIconPressed: (() -> Void)?
|
|
24
|
+
public var accessibilityLabel: String?
|
|
24
25
|
|
|
25
26
|
@State private var isFocused: Bool = false
|
|
26
27
|
|
|
@@ -38,7 +39,8 @@ public struct InputPhoneNumber: View {
|
|
|
38
39
|
onChangeText: ((String) -> Void)? = nil,
|
|
39
40
|
onFocus: (() -> Void)? = nil,
|
|
40
41
|
onBlur: (() -> Void)? = nil,
|
|
41
|
-
onRightIconPressed: (() -> Void)? = nil
|
|
42
|
+
onRightIconPressed: (() -> Void)? = nil,
|
|
43
|
+
accessibilityLabel: String? = nil
|
|
42
44
|
) {
|
|
43
45
|
self._text = text
|
|
44
46
|
self.placeholder = placeholder
|
|
@@ -53,6 +55,7 @@ public struct InputPhoneNumber: View {
|
|
|
53
55
|
self.onFocus = onFocus
|
|
54
56
|
self.onBlur = onBlur
|
|
55
57
|
self.onRightIconPressed = onRightIconPressed
|
|
58
|
+
self.accessibilityLabel = accessibilityLabel
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
// MARK: - Body
|
|
@@ -86,7 +89,7 @@ public struct InputPhoneNumber: View {
|
|
|
86
89
|
MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: Colors.black12)
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
TextField(
|
|
92
|
+
TextField(placeholder, text: textBinding, onEditingChanged: { focused in
|
|
90
93
|
handleFocusChange(focused)
|
|
91
94
|
})
|
|
92
95
|
.keyboardType(.numberPad)
|
|
@@ -94,6 +97,7 @@ public struct InputPhoneNumber: View {
|
|
|
94
97
|
.foregroundColor(Colors.black17)
|
|
95
98
|
.applyPrimaryCursorColor()
|
|
96
99
|
.lineLimit(1)
|
|
100
|
+
.accessibility(identifier: accessibilityLabel ?? "")
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
// Clear button
|
|
@@ -103,7 +107,7 @@ public struct InputPhoneNumber: View {
|
|
|
103
107
|
onChangeText?("")
|
|
104
108
|
}) {
|
|
105
109
|
Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
|
|
106
|
-
.padding(.leading, Spacing.S)
|
|
110
|
+
.padding(.leading, Spacing.S).accessibility(identifier: "ic_clear")
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
|
|
@@ -128,9 +128,7 @@ public struct PopupDisplay: View {
|
|
|
128
128
|
.clipped()
|
|
129
129
|
}
|
|
130
130
|
VStack(alignment: .leading, spacing: 0) {
|
|
131
|
-
|
|
132
|
-
.foregroundColor(.black)
|
|
133
|
-
.font(.header_default_semibold)
|
|
131
|
+
MomoText(title, typography: .headerDefaultBold)
|
|
134
132
|
.padding(.top, 24)
|
|
135
133
|
.padding(.bottom, 8)
|
|
136
134
|
.lineLimit(2)
|
|
@@ -139,9 +137,7 @@ public struct PopupDisplay: View {
|
|
|
139
137
|
Group {
|
|
140
138
|
if isScrollable {
|
|
141
139
|
ScrollView(showsIndicators: false) {
|
|
142
|
-
|
|
143
|
-
.font(.body_default_regular)
|
|
144
|
-
.foregroundColor(Colors.black17)
|
|
140
|
+
MomoText(description, typography: .bodyDefaultRegular)
|
|
145
141
|
.multilineTextAlignment(.leading)
|
|
146
142
|
.background(GeometryReader { geo in
|
|
147
143
|
Color.clear.onAppear { textHeight = geo.size.height }
|
|
@@ -149,13 +145,12 @@ public struct PopupDisplay: View {
|
|
|
149
145
|
.measureLineHeights(font: .body_default_regular,
|
|
150
146
|
oneLine: $oneLineH,
|
|
151
147
|
twoLines: $twoLineH)
|
|
148
|
+
.accessibility(identifier: "description_popup_permission")
|
|
152
149
|
}
|
|
153
150
|
// Cap the visible height to ~8.5 lines
|
|
154
151
|
.frame(height: min(maxHeight8_5, textHeight))
|
|
155
152
|
} else {
|
|
156
|
-
|
|
157
|
-
.font(.body_default_regular)
|
|
158
|
-
.foregroundColor(Colors.black17)
|
|
153
|
+
MomoText(description, typography: .bodyDefaultRegular)
|
|
159
154
|
.multilineTextAlignment(.leading)
|
|
160
155
|
.background(GeometryReader { geo in
|
|
161
156
|
Color.clear.onAppear {
|
|
@@ -167,14 +162,13 @@ public struct PopupDisplay: View {
|
|
|
167
162
|
.measureLineHeights(font: .body_default_regular,
|
|
168
163
|
oneLine: $oneLineH,
|
|
169
164
|
twoLines: $twoLineH)
|
|
165
|
+
.accessibility(identifier: "description_popup_permission")
|
|
170
166
|
}
|
|
171
167
|
}
|
|
172
168
|
.padding(.bottom, 8)
|
|
173
169
|
|
|
174
170
|
if(!errorCode.isEmpty) {
|
|
175
|
-
|
|
176
|
-
.foregroundColor(Colors.black12)
|
|
177
|
-
.font(.description_xs_regular)
|
|
171
|
+
MomoText((errorCodeLabels[language] ?? "Mã lỗi: ") + errorCode, typography: .descriptionXsRegular, color: Colors.black12)
|
|
178
172
|
.lineLimit(1)
|
|
179
173
|
.padding(.bottom, 8)
|
|
180
174
|
}
|
package/local.properties
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
+
# as it contains information specific to your local configuration.
|
|
3
|
+
#
|
|
4
|
+
# Location of the SDK. This is only used by Gradle.
|
|
5
|
+
# For customization when using a Version Control System, please read the
|
|
6
|
+
# header note.
|
|
7
|
+
#Thu Jan 09 10:43:10 ICT 2025
|
|
8
|
+
sdk.dir=/Users/sophia/Library/Android/sdk
|