@momo-kits/native-kits 0.169.12-beta.2-debug → 0.169.12-beta.3-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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.169.12-beta.2-debug"
43
+ version = "0.169.12-beta.3-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |spec|
2
2
  spec.name = 'compose'
3
- spec.version = '0.169.12-beta.2-debug'
3
+ spec.version = '0.169.12-beta.3-debug'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
@@ -14,6 +14,8 @@ val HEADER_ICON_SIZE = 20.dp
14
14
  val HEADER_PILL_WIDTH = 72.dp
15
15
  val HEADER_SEARCH_HEIGHT = 32.dp
16
16
  val HEADER_FRAME_MAX_WIDTH = 600.dp
17
+ // Stretch frame on hold until design confirms it: Stretch lays out like Grid.
18
+ private const val IS_STRETCH_FRAME_ENABLED = false
17
19
  // Banner image width on every device: wide windows keep the phone size, centered.
18
20
  val HEADER_BANNER_WIDTH = DEFAULT_SCREEN_SIZE.dp
19
21
  internal val HEADER_TITLE_GAP = Spacing.S
@@ -26,6 +28,7 @@ enum class ContentLayout {
26
28
  // 12 column grid: the header keeps the 12pt side padding.
27
29
  Grid,
28
30
  // One column of at most HEADER_FRAME_MAX_WIDTH, centered: the header row sits in the same frame.
31
+ // On hold: same as Grid for now.
29
32
  Stretch,
30
33
  }
31
34
 
@@ -53,7 +56,8 @@ fun headerLayoutOf(layout: ScreenLayout, contentLayout: ContentLayout): HeaderLa
53
56
  val isDuo = layout.isIPhoneDuo || layout.isIPhoneDuoDevice
54
57
  val isLargeWindow = minOf(layout.width, layout.height) >= FOLDABLE_MIN_WIDTH
55
58
  val isWide = !isDuo && isLargeWindow
56
- val frameInset = if (isWide && contentLayout == ContentLayout.Stretch) {
59
+ val isStretch = IS_STRETCH_FRAME_ENABLED && contentLayout == ContentLayout.Stretch
60
+ val frameInset = if (isWide && isStretch) {
57
61
  maxOf(HEADER_SIDE_PADDING, (layout.contentWidth - HEADER_FRAME_MAX_WIDTH) / 2)
58
62
  } else {
59
63
  HEADER_SIDE_PADDING
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.169.12-beta.2
21
+ version=0.169.12-beta.3
22
22
 
23
23
  repo=GitLab
24
24
  url=https://artifacts.mservice.com.vn/repository/maven-momo-app/
@@ -3,6 +3,9 @@
3
3
 
4
4
  import SwiftUI
5
5
 
6
+ /// Stretch frame on hold until design confirms it: `.stretch` lays out like `.grid`.
7
+ private let isStretchFrameEnabled = false
8
+
6
9
  /// Header spec values, in points. Public so custom header rights and extensions can match them.
7
10
  public enum HeaderLayoutMetrics {
8
11
  public static let buttonSize: CGFloat = 32
@@ -23,6 +26,7 @@ public enum ContentLayout: Equatable {
23
26
  /// 12 column grid: the header keeps the 12pt side padding.
24
27
  case grid
25
28
  /// One column of at most `HeaderLayoutMetrics.frameMaxWidth`, centered: the header row sits in the same frame.
29
+ /// On hold: same as `.grid` for now.
26
30
  case stretch
27
31
  }
28
32
 
@@ -43,7 +47,8 @@ public extension ScreenLayout {
43
47
  let isLargeWindow = min(width, height) >= ModalMetrics.foldableMinWidth
44
48
  let isWide = !isIPhoneDuo && !isDuoDevice && isLargeWindow
45
49
  let safeWidth = width - insets.leading - insets.trailing
46
- let frameInset = isWide && contentLayout == .stretch
50
+ let isStretch = isStretchFrameEnabled && contentLayout == .stretch
51
+ let frameInset = isWide && isStretch
47
52
  ? max(HeaderLayoutMetrics.sidePadding, (safeWidth - HeaderLayoutMetrics.frameMaxWidth) / 2)
48
53
  : HeaderLayoutMetrics.sidePadding
49
54
  return HeaderLayout(
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'MoMoUIKits'
3
- s.version = '0.169.12-beta.2'
3
+ s.version = '0.169.12-beta.3'
4
4
  s.summary = 'MoMoUIKits for iOS'
5
5
  s.homepage = 'https://momo.vn'
6
6
  s.license = { :type => 'MIT' }
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'MoMoUIKitsDemo'
3
- s.version = '0.169.12-beta.2'
3
+ s.version = '0.169.12-beta.3'
4
4
  s.summary = 'Demo browser for MoMoUIKits SwiftUI components'
5
5
  s.homepage = 'https://momo.vn'
6
6
  s.license = { :type => 'MIT' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.169.12-beta.2-debug",
3
+ "version": "0.169.12-beta.3-debug",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "publish:local": "bash publish.sh local"