@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.
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +5 -1
- package/gradle.properties +1 -1
- package/ios/Layout/ModalLayout.swift +2 -2
- package/ios/Popup/PopupDisplay.swift +3 -3
- package/ios/Popup/PopupInput.swift +1 -1
- package/ios/Popup/PopupLayout.swift +3 -3
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/package.json +1 -1
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
|
@@ -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.
|
|
115
|
-
sheet = SheetGeometry(width = null, maxHeight = null, minHeight = 0.dp, margin = 0.dp, radius = Radius.
|
|
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 =
|
|
215
|
+
shape = sheetShape
|
|
212
216
|
)
|
|
213
217
|
.conditional(IsShowBaseLineDebug) {
|
|
214
218
|
border(1.dp, Colors.blue_03)
|
package/gradle.properties
CHANGED
|
@@ -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.
|
|
83
|
-
sheet: SheetGeometry(width: nil, maxHeight: nil, minHeight: 0, margin: 0, radius: Radius.
|
|
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
|
-
|
|
120
|
-
.
|
|
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
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/// Popup corner radius on every device (`modalLayout`, Compose `popupRadius`).
|
|
23
|
+
var popupRadius: CGFloat {
|
|
24
|
+
modalLayout.popup.radius
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
package/ios/native-kits.podspec
CHANGED