@momo-kits/native-kits 0.156.6-beta.23-debug → 0.156.6-beta.24-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
CHANGED
|
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
15
15
|
import androidx.compose.foundation.layout.height
|
|
16
16
|
import androidx.compose.foundation.layout.padding
|
|
17
17
|
import androidx.compose.foundation.layout.size
|
|
18
|
+
import androidx.compose.foundation.layout.wrapContentHeight
|
|
18
19
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
19
20
|
import androidx.compose.runtime.Composable
|
|
20
21
|
import androidx.compose.runtime.getValue
|
|
@@ -284,7 +285,6 @@ fun Button(
|
|
|
284
285
|
val clickableModifier =
|
|
285
286
|
if (isEnabled && !loading) {
|
|
286
287
|
modifier
|
|
287
|
-
.then(if (isFull) Modifier.fillMaxWidth() else Modifier)
|
|
288
288
|
.clip(RoundedCornerShape(radius))
|
|
289
289
|
.clickable(
|
|
290
290
|
enabled = isEnabled && !loading,
|
|
@@ -295,45 +295,63 @@ fun Button(
|
|
|
295
295
|
.alpha(alpha)
|
|
296
296
|
} else {
|
|
297
297
|
modifier
|
|
298
|
-
.then(if (isFull) Modifier.fillMaxWidth() else Modifier)
|
|
299
298
|
.clip(RoundedCornerShape(radius))
|
|
300
299
|
}
|
|
301
300
|
|
|
302
301
|
val bgColor = getButtonBackgroundColor(loading, type)
|
|
303
302
|
val textColor = getTextColor(loading, type)
|
|
304
303
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
.
|
|
308
|
-
.
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
verticalAlignment = Alignment.CenterVertically,
|
|
304
|
+
val rootModifier = if (isFull) {
|
|
305
|
+
Modifier
|
|
306
|
+
.fillMaxWidth()
|
|
307
|
+
.wrapContentHeight()
|
|
308
|
+
} else {
|
|
309
|
+
Modifier
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
Box(
|
|
313
|
+
modifier = rootModifier.then(clickableModifier),
|
|
314
|
+
contentAlignment = Alignment.Center
|
|
317
315
|
) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
RenderIcon(
|
|
329
|
-
size = size,
|
|
330
|
-
isIconLeft = false,
|
|
331
|
-
useTintColor = useTintColor,
|
|
332
|
-
icon = iconRight,
|
|
333
|
-
forceLoading = loading && !loadingOnLeft,
|
|
334
|
-
bgColor = bgColor,
|
|
335
|
-
textColor = textColor
|
|
316
|
+
// Visual background (shrinks on press)
|
|
317
|
+
Box(
|
|
318
|
+
modifier = Modifier
|
|
319
|
+
.matchParentSize()
|
|
320
|
+
.padding(horizontal = animatedPadding)
|
|
321
|
+
.clip(RoundedCornerShape(radius))
|
|
322
|
+
.then(getTypeStyle(type, size = size, bgColor = bgColor))
|
|
323
|
+
.conditional(IsShowBaseLineDebug) {
|
|
324
|
+
border(1.dp, Colors.blue_03)
|
|
325
|
+
}
|
|
336
326
|
)
|
|
327
|
+
|
|
328
|
+
// Content
|
|
329
|
+
Row(
|
|
330
|
+
modifier = Modifier
|
|
331
|
+
.padding(horizontal = sizeSpecs.padding)
|
|
332
|
+
.height(sizeSpecs.height),
|
|
333
|
+
horizontalArrangement = Arrangement.Center,
|
|
334
|
+
verticalAlignment = Alignment.CenterVertically,
|
|
335
|
+
) {
|
|
336
|
+
RenderIcon(
|
|
337
|
+
size = size,
|
|
338
|
+
isIconLeft = true,
|
|
339
|
+
useTintColor = useTintColor,
|
|
340
|
+
icon = iconLeft,
|
|
341
|
+
forceLoading = loading && loadingOnLeft,
|
|
342
|
+
bgColor = bgColor,
|
|
343
|
+
textColor = textColor
|
|
344
|
+
)
|
|
345
|
+
RenderTitle(size, title, textColor = textColor)
|
|
346
|
+
RenderIcon(
|
|
347
|
+
size = size,
|
|
348
|
+
isIconLeft = false,
|
|
349
|
+
useTintColor = useTintColor,
|
|
350
|
+
icon = iconRight,
|
|
351
|
+
forceLoading = loading && !loadingOnLeft,
|
|
352
|
+
bgColor = bgColor,
|
|
353
|
+
textColor = textColor
|
|
354
|
+
)
|
|
355
|
+
}
|
|
337
356
|
}
|
|
338
357
|
}
|
|
339
|
-
|
|
@@ -260,7 +260,7 @@ fun Tooltip(
|
|
|
260
260
|
buttons = buttons,
|
|
261
261
|
placement = placement,
|
|
262
262
|
align = align,
|
|
263
|
-
onPressClose = onPressClose
|
|
263
|
+
onPressClose = onPressClose,
|
|
264
264
|
)
|
|
265
265
|
}
|
|
266
266
|
}
|
|
@@ -273,7 +273,7 @@ private fun TooltipPopupContent(
|
|
|
273
273
|
buttons: List<TooltipButton>,
|
|
274
274
|
placement: TooltipPlacement,
|
|
275
275
|
align: TooltipAlign,
|
|
276
|
-
onPressClose: () -> Unit,
|
|
276
|
+
onPressClose: (() -> Unit)? = null,
|
|
277
277
|
) {
|
|
278
278
|
val tooltipMaxWidth = 300.dp
|
|
279
279
|
val tooltipShape = remember { RoundedCornerShape(Radius.S) }
|
|
@@ -312,19 +312,21 @@ private fun TooltipPopupContent(
|
|
|
312
312
|
)
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
315
|
+
if (onPressClose != null) {
|
|
316
|
+
Spacer(Modifier.width(Spacing.M))
|
|
317
|
+
Box(
|
|
318
|
+
modifier = Modifier
|
|
319
|
+
.size(20.dp)
|
|
320
|
+
.activeOpacityClickable {
|
|
321
|
+
onPressClose.invoke()
|
|
322
|
+
}
|
|
323
|
+
) {
|
|
324
|
+
Icon(
|
|
325
|
+
source = "navigation_close",
|
|
326
|
+
size = 20.dp,
|
|
327
|
+
color = Colors.black_01,
|
|
328
|
+
)
|
|
329
|
+
}
|
|
328
330
|
}
|
|
329
331
|
}
|
|
330
332
|
if (buttons.isNotEmpty()) {
|
|
@@ -538,11 +540,9 @@ private fun TooltipSecondaryButton(
|
|
|
538
540
|
) {
|
|
539
541
|
Box(
|
|
540
542
|
modifier = Modifier
|
|
541
|
-
.
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
onClick = onPress,
|
|
545
|
-
)
|
|
543
|
+
.activeOpacityClickable {
|
|
544
|
+
onPress()
|
|
545
|
+
}
|
|
546
546
|
.padding(horizontal = Spacing.M, vertical = Spacing.S),
|
|
547
547
|
) {
|
|
548
548
|
Text(
|
package/gradle.properties
CHANGED
package/package.json
CHANGED
package/local.properties
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
#Mon Dec 22 10:07:29 ICT 2025
|
|
8
|
-
sdk.dir=/Users/phuc/Library/Android/sdk
|