@momo-kits/native-kits 0.160.7-debug → 0.161.1-beta.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 +1 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +14 -8
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +3 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +1 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +1 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +14 -19
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +12 -27
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +28 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +1 -14
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +7 -11
- package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
- package/gradle/libs.versions.toml +1 -1
- package/gradle.properties +1 -1
- package/ios/Application/ApplicationEnvironment.swift +6 -2
- package/ios/Input/Input.swift +21 -50
- package/ios/Input/InputPhoneNumber.swift +17 -17
- package/ios/Typography/Text.swift +14 -19
- package/ios/Typography/Typography.swift +1 -22
- package/local.properties +8 -0
- package/package.json +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -17
|
@@ -2,28 +2,7 @@ import SwiftUI
|
|
|
2
2
|
|
|
3
3
|
public extension Font {
|
|
4
4
|
static func appFont(size: CGFloat) -> Font {
|
|
5
|
-
|
|
6
|
-
let maxFontScale: CGFloat = 1.5
|
|
7
|
-
let maxDeviceScale: CGFloat = 5
|
|
8
|
-
|
|
9
|
-
let deviceWidth = UIScreen.main.bounds.width
|
|
10
|
-
let deviceScale = deviceWidth / defaultScreenSize
|
|
11
|
-
|
|
12
|
-
let defaultFont = UIFont.systemFont(ofSize: UIFont.labelFontSize)
|
|
13
|
-
let scaledFont = UIFontMetrics.default.scaledFont(for: defaultFont)
|
|
14
|
-
let fontScale = scaledFont.pointSize / defaultFont.pointSize
|
|
15
|
-
|
|
16
|
-
var fontSize = size
|
|
17
|
-
|
|
18
|
-
if deviceScale > 1 {
|
|
19
|
-
fontSize = min(fontSize * deviceScale, fontSize + maxDeviceScale)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if fontScale > 1 {
|
|
23
|
-
fontSize = min(fontSize * fontScale, fontSize * maxFontScale)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return Font.system(size: fontSize)
|
|
5
|
+
return Font.system(size: scaleSize(size))
|
|
27
6
|
}
|
|
28
7
|
|
|
29
8
|
// New supported typography styles
|
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
|
+
#Wed Aug 21 14:20:12 ICT 2024
|
|
8
|
+
sdk.dir=/Users/huynhdung/Library/Android/sdk
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
package vn.momo.kits.components
|
|
2
|
-
|
|
3
|
-
import androidx.compose.runtime.Composable
|
|
4
|
-
import androidx.compose.runtime.CompositionLocalProvider
|
|
5
|
-
import vn.momo.kits.application.ScaleSizeMaxRate
|
|
6
|
-
|
|
7
|
-
@Composable
|
|
8
|
-
fun ScaleSizeScope(
|
|
9
|
-
scaleSizeMaxRate: Float? = null,
|
|
10
|
-
content: @Composable () -> Unit
|
|
11
|
-
) {
|
|
12
|
-
CompositionLocalProvider(
|
|
13
|
-
ScaleSizeMaxRate provides scaleSizeMaxRate,
|
|
14
|
-
) {
|
|
15
|
-
content()
|
|
16
|
-
}
|
|
17
|
-
}
|