@momo-kits/native-kits 0.160.7-debug → 0.161.1-beta.15-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 (33) hide show
  1. package/compose/build.gradle.kts +1 -1
  2. package/compose/compose.podspec +1 -1
  3. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +1 -2
  4. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +14 -8
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +3 -4
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -4
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +1 -5
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +1 -5
  9. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +14 -19
  10. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +12 -27
  11. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +28 -1
  12. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +2 -2
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +1 -14
  14. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +7 -11
  15. package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  16. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  17. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
  18. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
  19. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
  20. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
  21. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
  22. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
  23. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
  24. package/gradle/libs.versions.toml +1 -1
  25. package/gradle.properties +1 -1
  26. package/ios/Application/ApplicationEnvironment.swift +6 -2
  27. package/ios/Input/Input.swift +21 -50
  28. package/ios/Input/InputPhoneNumber.swift +17 -17
  29. package/ios/Typography/Text.swift +14 -19
  30. package/ios/Typography/Typography.swift +1 -22
  31. package/local.properties +8 -0
  32. package/package.json +1 -1
  33. 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
- let defaultScreenSize: CGFloat = 375
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
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.160.7-debug",
3
+ "version": "0.161.1-beta.15-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},
@@ -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
- }