@momo-kits/native-kits 0.162.2-test.26-debug → 0.162.2-test.27-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/const/Colors.kt +19 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +1 -17
- package/gradle.properties +1 -1
- package/package.json +1 -1
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
|
@@ -147,6 +147,17 @@ object Colors {
|
|
|
147
147
|
val red_10 = Color(0xFFFEF4F4)
|
|
148
148
|
val red_11 = Color(0xFFFEF8F8)
|
|
149
149
|
|
|
150
|
+
// Translucent overlays, ported from the React kit's Consts (the reference
|
|
151
|
+
// palette). React spells them `#RRGGBBAA`; Compose's Color takes `0xAARRGGBB`.
|
|
152
|
+
val opacity_black_20 = Color(0x33000000)
|
|
153
|
+
val opacity_black_40 = Color(0x66000000)
|
|
154
|
+
val opacity_black_60 = Color(0x99000000)
|
|
155
|
+
val opacity_black_80 = Color(0xCC000000)
|
|
156
|
+
val opacity_white_20 = Color(0x33FFFFFF)
|
|
157
|
+
val opacity_white_40 = Color(0x66FFFFFF)
|
|
158
|
+
val opacity_white_60 = Color(0x99FFFFFF)
|
|
159
|
+
val opacity_white_80 = Color(0xCCFFFFFF)
|
|
160
|
+
|
|
150
161
|
val colorList: Map<String, Color> = mapOf(
|
|
151
162
|
"black_01" to black_01,
|
|
152
163
|
"black_02" to black_02,
|
|
@@ -302,5 +313,13 @@ object Colors {
|
|
|
302
313
|
"red_09" to red_09,
|
|
303
314
|
"red_10" to red_10,
|
|
304
315
|
"red_11" to red_11,
|
|
316
|
+
"opacity_black_20" to opacity_black_20,
|
|
317
|
+
"opacity_black_40" to opacity_black_40,
|
|
318
|
+
"opacity_black_60" to opacity_black_60,
|
|
319
|
+
"opacity_black_80" to opacity_black_80,
|
|
320
|
+
"opacity_white_20" to opacity_white_20,
|
|
321
|
+
"opacity_white_40" to opacity_white_40,
|
|
322
|
+
"opacity_white_60" to opacity_white_60,
|
|
323
|
+
"opacity_white_80" to opacity_white_80,
|
|
305
324
|
)
|
|
306
325
|
}
|
|
@@ -161,7 +161,7 @@ internal fun BottomSheet(
|
|
|
161
161
|
.noFeedbackClickable { },
|
|
162
162
|
contentAlignment = Alignment.BottomCenter
|
|
163
163
|
) {
|
|
164
|
-
Column {
|
|
164
|
+
Column(Modifier.padding(bottom = AppNavigationBar.current)) {
|
|
165
165
|
Box(
|
|
166
166
|
modifier = Modifier
|
|
167
167
|
.height(72.dp)
|
|
@@ -190,7 +190,7 @@ internal fun BottomSheet(
|
|
|
190
190
|
Column(
|
|
191
191
|
modifier = Modifier
|
|
192
192
|
.fillMaxSize()
|
|
193
|
-
.padding(horizontal =
|
|
193
|
+
.padding(horizontal = Spacing.M),
|
|
194
194
|
horizontalAlignment = Alignment.CenterHorizontally
|
|
195
195
|
) {
|
|
196
196
|
Spacer(Modifier.height(8.dp))
|
|
@@ -6,7 +6,6 @@ import androidx.compose.foundation.ScrollState
|
|
|
6
6
|
import androidx.compose.foundation.background
|
|
7
7
|
import androidx.compose.foundation.border
|
|
8
8
|
import androidx.compose.foundation.gestures.ScrollableState
|
|
9
|
-
import androidx.compose.foundation.layout.Arrangement
|
|
10
9
|
import androidx.compose.foundation.layout.Box
|
|
11
10
|
import androidx.compose.foundation.layout.Column
|
|
12
11
|
import androidx.compose.foundation.layout.ColumnScope
|
|
@@ -284,22 +283,7 @@ internal fun ColumnScope.MainContent(content: @Composable () -> Unit, isBottomTa
|
|
|
284
283
|
!options.scrollData.scrollable -> 0.dp
|
|
285
284
|
else -> navigationBar
|
|
286
285
|
}
|
|
287
|
-
)
|
|
288
|
-
// The React kit's Screen puts the gap BETWEEN a screen's blocks, not the
|
|
289
|
-
// blocks themselves: with `useGridLayout` (default on) it wraps every
|
|
290
|
-
// direct child in `<View style={{marginTop: Spacing.M}}>`
|
|
291
|
-
// (foundation/Layout/Screen.tsx renderContent). Compose cannot walk the
|
|
292
|
-
// content lambda's children to do that per-child, so space them here —
|
|
293
|
-
// this is the closest faithful equivalent and covers the normal screen.
|
|
294
|
-
//
|
|
295
|
-
// Two React behaviours it deliberately does NOT reproduce, because
|
|
296
|
-
// Compose gives no way to: the 12dp React also puts ABOVE the first
|
|
297
|
-
// child, and the per-child `useMargin = false` opt-out (React reads the
|
|
298
|
-
// child's props; a @Composable lambda exposes nothing). Generated code
|
|
299
|
-
// therefore still emits its own per-block wrapper, which does honour
|
|
300
|
-
// `useMargin: false` — and does not double up here, since a generated
|
|
301
|
-
// screen enters as a single child.
|
|
302
|
-
verticalArrangement = Arrangement.spacedBy(Spacing.M),
|
|
286
|
+
)
|
|
303
287
|
) {
|
|
304
288
|
ScreenContent(content = content)
|
|
305
289
|
}
|
package/gradle.properties
CHANGED