@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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.156.6-beta.23-debug"
43
+ version = "0.156.6-beta.24-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -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
- Row(
306
- modifier = clickableModifier
307
- .padding(horizontal = animatedPadding)
308
- .clip(RoundedCornerShape(radius))
309
- .then(getTypeStyle(type, size = size, bgColor = bgColor))
310
- .conditional(IsShowBaseLineDebug) {
311
- border(1.dp, Colors.blue_03)
312
- }
313
- .padding(horizontal = sizeSpecs.padding)
314
- .height(sizeSpecs.height),
315
- horizontalArrangement = Arrangement.Center,
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
- RenderIcon(
319
- size = size,
320
- isIconLeft = true,
321
- useTintColor = useTintColor,
322
- icon = iconLeft,
323
- forceLoading = loading && loadingOnLeft,
324
- bgColor = bgColor,
325
- textColor = textColor
326
- )
327
- RenderTitle(size, title, textColor = textColor)
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 ?: { state.hide() },
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
- Spacer(Modifier.width(Spacing.M))
316
- Box(
317
- modifier = Modifier
318
- .size(20.dp)
319
- .activeOpacityClickable {
320
- onPressClose.invoke()
321
- }
322
- ) {
323
- Icon(
324
- source = "navigation_close",
325
- size = 20.dp,
326
- color = Colors.black_01,
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
- .clickable(
542
- interactionSource = remember { MutableInteractionSource() },
543
- indication = null,
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
@@ -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.156.6-beta.23
21
+ version=0.156.6-beta.16
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.156.6-beta.23-debug",
3
+ "version": "0.156.6-beta.24-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},
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