@momo-kits/native-kits 0.157.1-beta.5-debug → 0.157.1-beta.7-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.157.1-beta.5-debug"
43
+ version = "0.157.1-beta.7-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.157.1-beta.3'
3
+ spec.version = '0.156.6-beta.16'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
@@ -8,11 +8,8 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
8
8
  import androidx.compose.foundation.layout.Arrangement
9
9
  import androidx.compose.foundation.layout.Box
10
10
  import androidx.compose.foundation.layout.Column
11
- import androidx.compose.foundation.layout.IntrinsicSize
12
11
  import androidx.compose.foundation.layout.Row
13
12
  import androidx.compose.foundation.layout.Spacer
14
- import androidx.compose.foundation.layout.fillMaxWidth
15
- import androidx.compose.foundation.layout.height
16
13
  import androidx.compose.foundation.layout.offset
17
14
  import androidx.compose.foundation.layout.padding
18
15
  import androidx.compose.foundation.layout.size
@@ -224,7 +221,7 @@ private class TooltipPositionProvider(
224
221
  fun Tooltip(
225
222
  state: TooltipState,
226
223
  title: String? = null,
227
- description: String,
224
+ description: String? = null,
228
225
  buttons: List<TooltipButton> = emptyList(),
229
226
  placement: TooltipPlacement = TooltipPlacement.TOP,
230
227
  align: TooltipAlign = TooltipAlign.CENTER,
@@ -285,7 +282,6 @@ private fun TooltipPopupContent(
285
282
  Column(
286
283
  modifier = Modifier
287
284
  .widthIn(max = tooltipMaxWidth)
288
- .width(IntrinsicSize.Max)
289
285
  .background(Colors.black_17, tooltipShape)
290
286
  .clip(tooltipShape)
291
287
  .conditional(IsShowBaseLineDebug) {
@@ -293,8 +289,8 @@ private fun TooltipPopupContent(
293
289
  }
294
290
  .padding(Spacing.M)
295
291
  ) {
296
- Row(Modifier.fillMaxWidth()) {
297
- Column(modifier = Modifier.weight(1f)) {
292
+ Row {
293
+ Column(modifier = Modifier.weight(1f, fill = false)) {
298
294
  if (!title.isNullOrEmpty()) {
299
295
  Text(
300
296
  text = title,
@@ -311,6 +307,7 @@ private fun TooltipPopupContent(
311
307
  style = Typography.descriptionDefaultRegular,
312
308
  color = Colors.black_01,
313
309
  maxLines = 2,
310
+ modifier = Modifier.padding(bottom = Spacing.M),
314
311
  overflow = TextOverflow.Ellipsis,
315
312
  )
316
313
  }
@@ -333,7 +330,6 @@ private fun TooltipPopupContent(
333
330
  }
334
331
  }
335
332
  if (buttons.isNotEmpty()) {
336
- Spacer(Modifier.height(Spacing.M))
337
333
  TooltipButtons(
338
334
  buttons = buttons,
339
335
  modifier = Modifier.align(Alignment.End),
@@ -492,7 +488,6 @@ private fun TooltipButtons(buttons: List<TooltipButton>, modifier: Modifier = Mo
492
488
  TooltipSecondaryButton(
493
489
  title = secondary.title ?: "",
494
490
  onPress = secondary.onPress ?: {},
495
- modifier = Modifier.weight(1f, fill = false),
496
491
  )
497
492
  Spacer(modifier = Modifier.width(Spacing.S))
498
493
  TooltipPrimaryButton(
@@ -525,12 +520,6 @@ private fun TooltipSingleButton(btn: TooltipButton) {
525
520
  )
526
521
  }
527
522
  }
528
-
529
- private const val MAX_BUTTON_LENGTH = 16
530
-
531
- private fun String.limitWithEllipsis(max: Int = 16): String {
532
- return if (length > max) take(max) + "…" else this
533
- }
534
523
  @Composable
535
524
  private fun TooltipPrimaryButton(
536
525
  title: String,
@@ -538,7 +527,7 @@ private fun TooltipPrimaryButton(
538
527
  ) {
539
528
  Button(
540
529
  onClick = onPress,
541
- title = title.limitWithEllipsis(),
530
+ title = title,
542
531
  type = ButtonType.SECONDARY,
543
532
  size = Size.MEDIUM,
544
533
  isFull = false,
@@ -548,21 +537,18 @@ private fun TooltipPrimaryButton(
548
537
  private fun TooltipSecondaryButton(
549
538
  title: String,
550
539
  onPress: () -> Unit,
551
- modifier: Modifier = Modifier,
552
540
  ) {
553
541
  Box(
554
- modifier = modifier
542
+ modifier = Modifier
555
543
  .activeOpacityClickable {
556
544
  onPress()
557
545
  }
558
546
  .padding(horizontal = Spacing.M, vertical = Spacing.S),
559
547
  ) {
560
548
  Text(
561
- text = title.limitWithEllipsis(),
549
+ text = title,
562
550
  color = Colors.black_01,
563
551
  style = Typography.actionSBold,
564
- maxLines = 1,
565
- overflow = TextOverflow.Ellipsis,
566
552
  )
567
553
  }
568
554
  }
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.157.1-beta.3
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
@@ -89,7 +89,7 @@ public struct InputPhoneNumber: View {
89
89
  MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: Colors.black12)
90
90
  }
91
91
 
92
- TextField(placeholder, text: textBinding, onEditingChanged: { focused in
92
+ TextField("", text: textBinding, onEditingChanged: { focused in
93
93
  handleFocusChange(focused)
94
94
  })
95
95
  .keyboardType(.numberPad)
@@ -98,6 +98,7 @@ public struct InputPhoneNumber: View {
98
98
  .applyPrimaryCursorColor()
99
99
  .lineLimit(1)
100
100
  .accessibility(identifier: accessibilityLabel ?? "")
101
+ .accessibilityValue(textBinding.wrappedValue.isEmpty ? placeholder : textBinding.wrappedValue)
101
102
  }
102
103
 
103
104
  // Clear button
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.157.1-beta.5-debug",
3
+ "version": "0.157.1-beta.7-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},