@momo-kits/native-kits 0.169.5-beta.1-debug → 0.169.5-beta.2-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.5-beta.1-debug"
43
+ version = "0.169.5-beta.2-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.5-beta.1-debug'
3
+ spec.version = '0.169.5-beta.2-debug'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
@@ -206,7 +206,7 @@ fun PopupNotify(
206
206
  .verticalScroll(descriptionScrollState)
207
207
  ) {
208
208
  Text(
209
- text = props.description,
209
+ text = description,
210
210
  onTextLayout = { layoutResult.value = it },
211
211
  style = Typography.bodyDefaultRegular
212
212
  )
@@ -111,8 +111,8 @@ fun modalLayoutOf(
111
111
  return ModalLayout(
112
112
  isFoldable = false,
113
113
  placement = placement,
114
- popup = popupGeometry(placement.width, null, Spacing.XL, Radius.L),
115
- sheet = SheetGeometry(width = null, maxHeight = null, minHeight = 0.dp, margin = 0.dp, radius = Radius.M),
114
+ popup = popupGeometry(placement.width, null, Spacing.XL, Radius.XL),
115
+ sheet = SheetGeometry(width = null, maxHeight = null, minHeight = 0.dp, margin = 0.dp, radius = Radius.XL),
116
116
  scrimOpacity = PHONE_SCRIM_OPACITY,
117
117
  )
118
118
  }
@@ -33,6 +33,7 @@ import androidx.compose.runtime.setValue
33
33
  import androidx.compose.runtime.rememberCoroutineScope
34
34
  import androidx.compose.ui.Alignment
35
35
  import androidx.compose.ui.Modifier
36
+ import androidx.compose.ui.draw.clip
36
37
  import androidx.compose.ui.graphics.Brush
37
38
  import androidx.compose.ui.graphics.Color
38
39
  import androidx.compose.ui.input.pointer.pointerInput
@@ -91,6 +92,7 @@ internal fun BottomSheet(
91
92
  val modal = rememberModalLayout()
92
93
  val isFoldable = modal.isFoldable
93
94
  val sheet = modal.sheet
95
+ val sheetShape = RoundedCornerShape(topStart = sheet.radius, topEnd = sheet.radius)
94
96
  val title = header as? BottomHeader.Title
95
97
  // the screen is the outer display on iPhone Duo, even when unfolded
96
98
  val screenHeightDp = if (isFoldable) layout.height else getScreenHeight()
@@ -206,9 +208,11 @@ internal fun BottomSheet(
206
208
  .offset { IntOffset(x = 0, y = sheetOffset.value.toInt()) }
207
209
  .then(if (sheet.width != null) Modifier.width(sheet.width) else Modifier.fillMaxWidth())
208
210
  .heightIn(max = maxHeight)
211
+ // clip too, so content (images, scrims) follows the corners like iOS clipShape
212
+ .clip(sheetShape)
209
213
  .background(
210
214
  color = if (isSurface) AppTheme.current.colors.background.surface else AppTheme.current.colors.background.default,
211
- shape = RoundedCornerShape(topStart = sheet.radius, topEnd = sheet.radius)
215
+ shape = sheetShape
212
216
  )
213
217
  .conditional(IsShowBaseLineDebug) {
214
218
  border(1.dp, Colors.blue_03)
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.5-beta.1
21
+ version=0.169.5-beta.2
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
@@ -79,8 +79,8 @@ public extension ModalLayout {
79
79
  return ModalLayout(
80
80
  isFoldable: false,
81
81
  placement: placement,
82
- popup: popupGeometry(placementWidth: width, maxHeight: nil, margin: Spacing.XL, radius: Radius.L),
83
- sheet: SheetGeometry(width: nil, maxHeight: nil, minHeight: 0, margin: 0, radius: Radius.M),
82
+ popup: popupGeometry(placementWidth: width, maxHeight: nil, margin: Spacing.XL, radius: Radius.XL),
83
+ sheet: SheetGeometry(width: nil, maxHeight: nil, minHeight: 0, margin: 0, radius: Radius.XL),
84
84
  scrimOpacity: ModalMetrics.phoneScrimOpacity
85
85
  )
86
86
  }
@@ -108,7 +108,7 @@ public struct PopupDisplay: View {
108
108
  }
109
109
  .fixedSize(horizontal: false, vertical: true)
110
110
  .background(theme.colors.background.surface)
111
- .clipShape(RoundedRectangle(cornerRadius: layout.popupRadius()))
111
+ .clipShape(RoundedRectangle(cornerRadius: layout.popupRadius))
112
112
 
113
113
  if isShowCloseIcon {
114
114
  ModalIconButton(icon: "navigation_close", accessibilityId: "ic_popup_close", action: onClose)
@@ -116,8 +116,8 @@ public struct PopupDisplay: View {
116
116
  .padding(.trailing, Spacing.M)
117
117
  }
118
118
  }
119
- .frame(maxWidth: layout.popupMaxWidth)
120
- .padding(.horizontal, layout.popupHorizontalPadding(12))
119
+ // window minus 24 a side on phones too, host padding included (PopupNotify parity)
120
+ .frame(maxWidth: layout.modalLayout.popup.maxWidth)
121
121
  .accessibilityElement(children: .contain)
122
122
  .accessibilityIdentifier("popup_notify")
123
123
  }
@@ -61,7 +61,7 @@ public struct PopupInput: View {
61
61
  .padding(.trailing, Spacing.M)
62
62
  }
63
63
  }
64
- .background(theme.colors.background.surface.cornerRadius(layout.popupRadius(8)))
64
+ .background(theme.colors.background.surface.cornerRadius(layout.popupRadius))
65
65
  .shadow(color: .black.opacity(0.08), radius: 2, x: 0, y: 0)
66
66
  .shadow(color: .black.opacity(0.16), radius: 24, x: 0, y: 0)
67
67
  .frame(maxWidth: layout.popupMaxWidth)
@@ -19,9 +19,9 @@ extension ScreenLayout {
19
19
  modalLayout.popup.maxHeight
20
20
  }
21
21
 
22
- func popupRadius(_ regular: CGFloat = Radius.L) -> CGFloat {
23
- let modal = modalLayout
24
- return modal.isFoldable ? modal.popup.radius : regular
22
+ /// Popup corner radius on every device (`modalLayout`, Compose `popupRadius`).
23
+ var popupRadius: CGFloat {
24
+ modalLayout.popup.radius
25
25
  }
26
26
  }
27
27
 
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'MoMoUIKits'
3
- s.version = '0.169.5-beta.1'
3
+ s.version = '0.169.5-beta.2'
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.5-beta.1'
3
+ s.version = '0.169.5-beta.2'
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.5-beta.1-debug",
3
+ "version": "0.169.5-beta.2-debug",
4
4
  "private": false,
5
5
  "dependeNavigationncies": {},
6
6
  "devDependencies": {},