@momo-kits/native-kits 0.162.3-debug → 0.162.3-fontscale.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/.codegraph/.gitignore +5 -0
- package/CLAUDE.md +78 -0
- package/compose/build.gradle.kts +12 -8
- package/compose/build.gradle.kts.backup +11 -7
- package/compose/compose.podspec +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +2 -7
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +3 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +6 -24
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +4 -19
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +1 -10
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +6 -17
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +6 -101
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +5 -19
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +8 -33
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +1 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +27 -29
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +3 -26
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +27 -26
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +3 -13
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +3 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +3 -18
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +11 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +3 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +69 -26
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +1 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +84 -59
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +13 -71
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +10 -51
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +6 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +4 -21
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +16 -75
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +5 -26
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +3 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +16 -40
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +3 -9
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +0 -28
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +2 -13
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +4 -10
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +3 -28
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +8 -47
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +4 -25
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +2 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +1 -17
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +1 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +50 -111
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +1 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +1 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +1 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +4 -96
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +5 -7
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +2 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +9 -21
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +9 -14
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +8 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +3 -18
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +94 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +3 -7
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +5 -15
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +42 -24
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +48 -33
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +58 -57
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +28 -25
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +13 -31
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +6 -24
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +11 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +2 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +9 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +3 -13
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +3 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +1 -40
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +0 -8
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +2 -17
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +3 -3
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +2 -3
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -2
- package/example/ios/Example.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/Example.xcscheme +32 -0
- package/example/ios/Example.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/WorkspaceSettings.xcsettings +16 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/lottie-ios.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +60 -0
- package/gradle/libs.versions.toml +2 -0
- package/gradle.properties +1 -1
- package/ios/Application/Components.swift +1 -0
- package/ios/Application/FloatingButton.swift +1 -0
- package/ios/Badge/Badge.swift +1 -0
- package/ios/Badge/BadgeRibbon.swift +2 -0
- package/ios/Button/Button.swift +1 -1
- package/ios/Checkbox/Checkbox.swift +1 -0
- package/ios/Information/Information.swift +151 -0
- package/ios/Input/Input.swift +1 -0
- package/ios/Input/InputPhoneNumber.swift +1 -0
- package/ios/Input/InputSearch.swift +3 -0
- package/ios/Input/InputTextArea.swift +1 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +1 -1
- package/ios/Popup/PopupDisplay.swift +6 -0
- package/ios/Popup/PopupInput.swift +2 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +2 -0
- package/ios/Typography/Text.swift +1 -0
- package/ios/Typography/Typography.swift +14 -5
- package/local.properties +8 -0
- package/package.json +1 -1
|
@@ -168,6 +168,7 @@ public struct InputSearch: View {
|
|
|
168
168
|
Text(placeholder)
|
|
169
169
|
.foregroundColor(disabled ? Colors.black08 : Colors.black12)
|
|
170
170
|
.font(.system(size: 16, weight: fontWeight))
|
|
171
|
+
.ignoreBoldTextSetting()
|
|
171
172
|
}
|
|
172
173
|
TextField("", text: $text, onEditingChanged: { editing in
|
|
173
174
|
isFocused = editing
|
|
@@ -183,6 +184,7 @@ public struct InputSearch: View {
|
|
|
183
184
|
.disabled(disabled)
|
|
184
185
|
.foregroundColor(disabled ? Colors.black08 : Colors.black17)
|
|
185
186
|
.font(.system(size: 15, weight: fontWeight))
|
|
187
|
+
.ignoreBoldTextSetting()
|
|
186
188
|
.keyboardType(keyboardType)
|
|
187
189
|
}
|
|
188
190
|
|
|
@@ -212,6 +214,7 @@ public struct InputSearch: View {
|
|
|
212
214
|
Text(buttonText)
|
|
213
215
|
.foregroundColor(Colors.black17)
|
|
214
216
|
.font(.system(size: 14, weight: .medium))
|
|
217
|
+
.ignoreBoldTextSetting()
|
|
215
218
|
}
|
|
216
219
|
.padding(.leading, Spacing.L)
|
|
217
220
|
}
|
|
@@ -22,7 +22,7 @@ public struct KeyboardButton: View {
|
|
|
22
22
|
public var body: some View {
|
|
23
23
|
SwiftUI.Button(action: { self.action(key) }) {
|
|
24
24
|
HStack {
|
|
25
|
-
Text(key).font(.system(size: 24, weight: .bold))
|
|
25
|
+
Text(key).font(.system(size: 24, weight: .bold)).ignoreBoldTextSetting()
|
|
26
26
|
}.frame(maxWidth: CGFloat(width), minHeight: height)
|
|
27
27
|
.background(color)
|
|
28
28
|
.foregroundColor(textColor)
|
|
@@ -24,6 +24,7 @@ extension View {
|
|
|
24
24
|
VStack(spacing: 0) {
|
|
25
25
|
Text("A")
|
|
26
26
|
.font(font)
|
|
27
|
+
.ignoreBoldTextSetting()
|
|
27
28
|
.lineLimit(1)
|
|
28
29
|
.fixedSize()
|
|
29
30
|
.background(
|
|
@@ -35,6 +36,7 @@ extension View {
|
|
|
35
36
|
|
|
36
37
|
Text("A\nA")
|
|
37
38
|
.font(font)
|
|
39
|
+
.ignoreBoldTextSetting()
|
|
38
40
|
.lineLimit(2)
|
|
39
41
|
.fixedSize(horizontal: false, vertical: true)
|
|
40
42
|
.background(
|
|
@@ -221,12 +223,14 @@ public struct PopupDisplay: View {
|
|
|
221
223
|
SwiftUI.Button(action: onPressCloseButton) {
|
|
222
224
|
Text(closeButtonTitle)
|
|
223
225
|
.font(.action2)
|
|
226
|
+
.ignoreBoldTextSetting()
|
|
224
227
|
}.foregroundColor(Colors.black09)
|
|
225
228
|
.padding(.trailing, 12)
|
|
226
229
|
|
|
227
230
|
SwiftUI.Button(action: onPressAction) {
|
|
228
231
|
Text(actionButtonTitle)
|
|
229
232
|
.font(.action2)
|
|
233
|
+
.ignoreBoldTextSetting()
|
|
230
234
|
}.foregroundColor(Colors.primary)
|
|
231
235
|
}
|
|
232
236
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
@@ -238,12 +242,14 @@ public struct PopupDisplay: View {
|
|
|
238
242
|
SwiftUI.Button(action: onPressAction) {
|
|
239
243
|
Text(actionButtonTitle)
|
|
240
244
|
.font(.action2)
|
|
245
|
+
.ignoreBoldTextSetting()
|
|
241
246
|
}.foregroundColor(Colors.primary)
|
|
242
247
|
.padding(.bottom, 6)
|
|
243
248
|
|
|
244
249
|
SwiftUI.Button(action: onPressCloseButton) {
|
|
245
250
|
Text(closeButtonTitle)
|
|
246
251
|
.font(.action2)
|
|
252
|
+
.ignoreBoldTextSetting()
|
|
247
253
|
}.foregroundColor(Colors.black09)
|
|
248
254
|
}
|
|
249
255
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
@@ -38,12 +38,14 @@ public struct PopupInput: View {
|
|
|
38
38
|
Text(title)
|
|
39
39
|
.foregroundColor(.black)
|
|
40
40
|
.font(.headerText1)
|
|
41
|
+
.ignoreBoldTextSetting()
|
|
41
42
|
.padding(.top, 12)
|
|
42
43
|
.padding(.bottom, 24)
|
|
43
44
|
|
|
44
45
|
Text(description)
|
|
45
46
|
.foregroundColor(.black)
|
|
46
47
|
.font(.paragraph)
|
|
48
|
+
.ignoreBoldTextSetting()
|
|
47
49
|
.opacity(0.6)
|
|
48
50
|
.multilineTextAlignment(.leading)
|
|
49
51
|
.padding(.bottom, 20)
|
|
@@ -79,6 +79,7 @@ public struct TrustBanner: View {
|
|
|
79
79
|
.foregroundColor(Color(hex: "484848"))
|
|
80
80
|
.lineLimit(2)
|
|
81
81
|
.font(.system(size: 13, weight: Font.Weight.regular))
|
|
82
|
+
.ignoreBoldTextSetting()
|
|
82
83
|
.lineSpacing(3)
|
|
83
84
|
.padding(.bottom, 8)
|
|
84
85
|
HStack {
|
|
@@ -86,6 +87,7 @@ public struct TrustBanner: View {
|
|
|
86
87
|
Text(applicationEnvironment.config?.trustBanner?.subContent[language ?? "vi"] as? String ?? defaultBanner.subContent[language ?? "vi"])
|
|
87
88
|
.foregroundColor(Colors.pink03)
|
|
88
89
|
.font(.system(size: 13, weight: .bold))
|
|
90
|
+
.ignoreBoldTextSetting()
|
|
89
91
|
.padding(.trailing, 4)
|
|
90
92
|
|
|
91
93
|
Icon(source: "arrow_chevron_right_small", color: Colors.pink03)
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
+
public extension View {
|
|
4
|
+
/// Forces SwiftUI to ignore the OS "Bold Text" accessibility setting so the
|
|
5
|
+
/// kit's typography weight stays fixed and matches the Compose implementation
|
|
6
|
+
/// (which does not honor that OS setting). Apply it wherever a `.font(...)` is set.
|
|
7
|
+
func ignoreBoldTextSetting() -> some View {
|
|
8
|
+
environment(\.legibilityWeight, .regular)
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
public extension Font {
|
|
4
13
|
static func appFont(size: CGFloat) -> Font {
|
|
5
14
|
let defaultScreenSize: CGFloat = 375
|
|
6
15
|
let maxFontScale: CGFloat = 1.5
|
|
7
16
|
let maxDeviceScale: CGFloat = 5
|
|
8
|
-
|
|
17
|
+
|
|
9
18
|
let deviceWidth = UIScreen.main.bounds.width
|
|
10
19
|
let deviceScale = deviceWidth / defaultScreenSize
|
|
11
|
-
|
|
20
|
+
|
|
12
21
|
let defaultFont = UIFont.systemFont(ofSize: UIFont.labelFontSize)
|
|
13
22
|
let scaledFont = UIFontMetrics.default.scaledFont(for: defaultFont)
|
|
14
23
|
let fontScale = scaledFont.pointSize / defaultFont.pointSize
|
|
@@ -25,7 +34,7 @@ public extension Font {
|
|
|
25
34
|
|
|
26
35
|
return Font.system(size: fontSize)
|
|
27
36
|
}
|
|
28
|
-
|
|
37
|
+
|
|
29
38
|
// New supported typography styles
|
|
30
39
|
static let headline_default_bold = appFont(size: 24).weight(.bold)
|
|
31
40
|
static let header_m_bold = appFont(size: 18).weight(.bold)
|
|
@@ -43,7 +52,7 @@ public extension Font {
|
|
|
43
52
|
static let action_s_bold = appFont(size: 14).weight(.bold)
|
|
44
53
|
static let action_xs_bold = appFont(size: 12).weight(.bold)
|
|
45
54
|
static let action_xxs_bold = appFont(size: 10).weight(.bold)
|
|
46
|
-
|
|
55
|
+
|
|
47
56
|
// Legacy styles
|
|
48
57
|
static let headline_default = appFont(size: 28).weight(.semibold)
|
|
49
58
|
static let headline_s = appFont(size: 24).weight(.semibold)
|
|
@@ -68,7 +77,7 @@ public extension Font {
|
|
|
68
77
|
static let action_xxs = appFont(size: 10).weight(.bold)
|
|
69
78
|
static let action_xs = appFont(size: 12).weight(.bold)
|
|
70
79
|
static let action_s = appFont(size: 15).weight(.bold)
|
|
71
|
-
|
|
80
|
+
|
|
72
81
|
// deprecated
|
|
73
82
|
static let h1 = appFont(size: 36).weight(.semibold) //headline_xl
|
|
74
83
|
static let h2 = appFont(size: 32).weight(.semibold)
|
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
|
+
#Tue Apr 08 11:13:31 ICT 2025
|
|
8
|
+
sdk.dir=/Users/sonnguyen/Library/Android/sdk
|