@momo-kits/native-kits 0.157.5-debug → 0.158.1-beta.1-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.
Files changed (139) hide show
  1. package/.claude/settings.local.json +11 -0
  2. package/.claude/skills/design-system/SKILL.md +88 -0
  3. package/.claude/skills/design-system/references/components/avatar.md +134 -0
  4. package/.claude/skills/design-system/references/components/badge.md +127 -0
  5. package/.claude/skills/design-system/references/components/bottom-tab.md +177 -0
  6. package/.claude/skills/design-system/references/components/bottomsheet.md +170 -0
  7. package/.claude/skills/design-system/references/components/button.md +206 -0
  8. package/.claude/skills/design-system/references/components/carousel.md +117 -0
  9. package/.claude/skills/design-system/references/components/checkbox.md +98 -0
  10. package/.claude/skills/design-system/references/components/chip.md +146 -0
  11. package/.claude/skills/design-system/references/components/collapse.md +120 -0
  12. package/.claude/skills/design-system/references/components/date-picker.md +119 -0
  13. package/.claude/skills/design-system/references/components/divider.md +84 -0
  14. package/.claude/skills/design-system/references/components/icon.md +130 -0
  15. package/.claude/skills/design-system/references/components/image.md +81 -0
  16. package/.claude/skills/design-system/references/components/information.md +107 -0
  17. package/.claude/skills/design-system/references/components/input-dropdown.md +138 -0
  18. package/.claude/skills/design-system/references/components/input-money.md +157 -0
  19. package/.claude/skills/design-system/references/components/input-otp.md +132 -0
  20. package/.claude/skills/design-system/references/components/input-phone-number.md +140 -0
  21. package/.claude/skills/design-system/references/components/input-search.md +124 -0
  22. package/.claude/skills/design-system/references/components/input-text-area.md +133 -0
  23. package/.claude/skills/design-system/references/components/input.md +152 -0
  24. package/.claude/skills/design-system/references/components/loader.md +87 -0
  25. package/.claude/skills/design-system/references/components/pagination.md +105 -0
  26. package/.claude/skills/design-system/references/components/popup-notify.md +128 -0
  27. package/.claude/skills/design-system/references/components/progress-info.md +114 -0
  28. package/.claude/skills/design-system/references/components/radio.md +86 -0
  29. package/.claude/skills/design-system/references/components/rating.md +126 -0
  30. package/.claude/skills/design-system/references/components/skeleton.md +120 -0
  31. package/.claude/skills/design-system/references/components/slider.md +141 -0
  32. package/.claude/skills/design-system/references/components/snackbar.md +97 -0
  33. package/.claude/skills/design-system/references/components/stepper.md +100 -0
  34. package/.claude/skills/design-system/references/components/steps.md +91 -0
  35. package/.claude/skills/design-system/references/components/suggest-action.md +95 -0
  36. package/.claude/skills/design-system/references/components/swipe.md +121 -0
  37. package/.claude/skills/design-system/references/components/switch.md +98 -0
  38. package/.claude/skills/design-system/references/components/tab-view.md +120 -0
  39. package/.claude/skills/design-system/references/components/tag.md +118 -0
  40. package/.claude/skills/design-system/references/components/text.md +151 -0
  41. package/.claude/skills/design-system/references/components/toast.md +99 -0
  42. package/.claude/skills/design-system/references/components/tooltip.md +138 -0
  43. package/.claude/skills/design-system/references/components/top-nav-miniapp.md +94 -0
  44. package/.claude/skills/design-system/references/components/top-nav.md +226 -0
  45. package/.claude/skills/design-system/references/components/uploader.md +115 -0
  46. package/.claude/skills/design-system/references/navigation/bottom-tab.md +131 -0
  47. package/.claude/skills/design-system/references/navigation/bottomsheet.md +161 -0
  48. package/.claude/skills/design-system/references/navigation/modal.md +133 -0
  49. package/.claude/skills/design-system/references/navigation/navigation-options.md +225 -0
  50. package/.claude/skills/design-system/references/navigation/navigator.md +111 -0
  51. package/.claude/skills/design-system/references/navigation/setup.md +134 -0
  52. package/.claude/skills/design-system/references/navigation/stack.md +128 -0
  53. package/.claude/skills/design-system/references/spec-convention.md +80 -0
  54. package/.claude/skills/design-system/references/tokens/colors.md +131 -0
  55. package/.claude/skills/design-system/references/tokens/spacing-radius.md +144 -0
  56. package/.claude/skills/design-system/references/tokens/theme.md +125 -0
  57. package/.claude/skills/design-system/references/tokens/typography.md +135 -0
  58. package/.claude/skills/design-system-kits/SKILL.md +102 -0
  59. package/.claude/skills/design-system-kits/references/code-convention.md +118 -0
  60. package/.claude/skills/design-system-kits/references/components/avatar.md +45 -0
  61. package/.claude/skills/design-system-kits/references/components/badge.md +27 -0
  62. package/.claude/skills/design-system-kits/references/components/button.md +65 -0
  63. package/.claude/skills/design-system-kits/references/components/carousel.md +51 -0
  64. package/.claude/skills/design-system-kits/references/components/checkbox.md +39 -0
  65. package/.claude/skills/design-system-kits/references/components/chip.md +54 -0
  66. package/.claude/skills/design-system-kits/references/components/collapse.md +63 -0
  67. package/.claude/skills/design-system-kits/references/components/date-picker.md +36 -0
  68. package/.claude/skills/design-system-kits/references/components/divider.md +21 -0
  69. package/.claude/skills/design-system-kits/references/components/icon.md +382 -0
  70. package/.claude/skills/design-system-kits/references/components/image.md +62 -0
  71. package/.claude/skills/design-system-kits/references/components/information.md +61 -0
  72. package/.claude/skills/design-system-kits/references/components/input-dropdown.md +92 -0
  73. package/.claude/skills/design-system-kits/references/components/input-money.md +128 -0
  74. package/.claude/skills/design-system-kits/references/components/input-otp.md +85 -0
  75. package/.claude/skills/design-system-kits/references/components/input-phone-number.md +96 -0
  76. package/.claude/skills/design-system-kits/references/components/input-search.md +127 -0
  77. package/.claude/skills/design-system-kits/references/components/input-text-area.md +100 -0
  78. package/.claude/skills/design-system-kits/references/components/input.md +126 -0
  79. package/.claude/skills/design-system-kits/references/components/loader.md +41 -0
  80. package/.claude/skills/design-system-kits/references/components/pagination.md +47 -0
  81. package/.claude/skills/design-system-kits/references/components/popup-notify.md +69 -0
  82. package/.claude/skills/design-system-kits/references/components/popup-promotion.md +35 -0
  83. package/.claude/skills/design-system-kits/references/components/progress-info.md +55 -0
  84. package/.claude/skills/design-system-kits/references/components/radio.md +42 -0
  85. package/.claude/skills/design-system-kits/references/components/rating.md +36 -0
  86. package/.claude/skills/design-system-kits/references/components/skeleton.md +25 -0
  87. package/.claude/skills/design-system-kits/references/components/slider.md +53 -0
  88. package/.claude/skills/design-system-kits/references/components/snackbar.md +52 -0
  89. package/.claude/skills/design-system-kits/references/components/stepper.md +46 -0
  90. package/.claude/skills/design-system-kits/references/components/steps.md +57 -0
  91. package/.claude/skills/design-system-kits/references/components/suggest-action.md +44 -0
  92. package/.claude/skills/design-system-kits/references/components/swipe.md +44 -0
  93. package/.claude/skills/design-system-kits/references/components/switch.md +43 -0
  94. package/.claude/skills/design-system-kits/references/components/tab-view.md +56 -0
  95. package/.claude/skills/design-system-kits/references/components/tag.md +50 -0
  96. package/.claude/skills/design-system-kits/references/components/text.md +56 -0
  97. package/.claude/skills/design-system-kits/references/components/toast.md +51 -0
  98. package/.claude/skills/design-system-kits/references/components/tooltip.md +95 -0
  99. package/.claude/skills/design-system-kits/references/components/uploader.md +48 -0
  100. package/.claude/skills/design-system-kits/references/design-spec-structure.md +356 -0
  101. package/.claude/skills/design-system-kits/references/design-spec-to-code.md +596 -0
  102. package/.claude/skills/design-system-kits/references/navigation/bottom-tab.md +155 -0
  103. package/.claude/skills/design-system-kits/references/navigation/bottomsheet.md +94 -0
  104. package/.claude/skills/design-system-kits/references/navigation/modal.md +125 -0
  105. package/.claude/skills/design-system-kits/references/navigation/navigation-options.md +430 -0
  106. package/.claude/skills/design-system-kits/references/navigation/navigator.md +177 -0
  107. package/.claude/skills/design-system-kits/references/navigation/setup.md +94 -0
  108. package/.claude/skills/design-system-kits/references/navigation/stack.md +152 -0
  109. package/.claude/skills/design-system-kits/references/screen-layout-rule.md +125 -0
  110. package/.claude/skills/design-system-kits/references/tokens/colors.md +183 -0
  111. package/.claude/skills/design-system-kits/references/tokens/spacing-radius.md +45 -0
  112. package/.claude/skills/design-system-kits/references/tokens/theme.md +97 -0
  113. package/.claude/skills/design-system-kits/references/tokens/typography.md +105 -0
  114. package/.claude/skills/vibe-design/SKILL.md +306 -0
  115. package/compose/build.gradle.kts +1 -1
  116. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +7 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +123 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +224 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +2 -2
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +338 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +348 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +256 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +494 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +131 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +215 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +531 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +192 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +3 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +5 -2
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +2 -11
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +5 -1
  135. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +12 -0
  136. package/gradle.properties +1 -1
  137. package/ios/Popup/PopupPromotion.swift +2 -2
  138. package/local.properties +8 -0
  139. package/package.json +1 -1
@@ -0,0 +1,41 @@
1
+ # Loader
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Loader } from '@momo-kits/foundation';
7
+
8
+ <Loader type="spinner" /> // 'dot'|'spinner'
9
+ ```
10
+
11
+ ## Compose
12
+
13
+ ```kotlin
14
+ import vn.momo.kits.components.Loader
15
+ import vn.momo.kits.components.LoaderType
16
+ import vn.momo.kits.components.ProgressBar
17
+
18
+ // Unified entry-point
19
+ Loader(
20
+ type = LoaderType.DOT, // DOT | SPINNER; default: DOT
21
+ tintColor = null,
22
+ modifier = Modifier,
23
+ )
24
+
25
+ // Progress bar (determinate)
26
+ ProgressBar(
27
+ percent = 75f, // 0–100; clamped
28
+ color = null, // default: theme.primary
29
+ modifier = Modifier,
30
+ )
31
+ ```
32
+
33
+ `Loader` (DOT/SPINNER) = indeterminate loading. `ProgressBar` = animated determinate progress bar.
34
+
35
+ ## Key Differences
36
+
37
+ | Feature | React Native | Compose |
38
+ |---------|-------------|---------|
39
+ | Loading types | `type="dot"\|"spinner"` | `LoaderType` enum |
40
+ | Determinate progress | Not available | `ProgressBar` composable |
41
+ | Lottie | Built-in | `LottieAnimation` |
@@ -0,0 +1,47 @@
1
+ # Pagination
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Pagination, PaginationScroll } from '@momo-kits/foundation';
7
+
8
+ <Pagination
9
+ type="default" // 'default'|'black_white'|'number'|'scroll'; default: 'default'
10
+ activeIndex={currentPage}
11
+ dataLength={10}
12
+ style={{}}
13
+ />
14
+
15
+ // PaginationScroll — wraps scrollable content with progress indicator
16
+ <PaginationScroll style={{}}>
17
+ {items.map(item => <Card key={item.id} />)}
18
+ </PaginationScroll>
19
+ ```
20
+
21
+ ### Props
22
+
23
+ | Prop | Type | Default | Description |
24
+ |------|------|---------|-------------|
25
+ | `type` | `'default' \| 'black_white' \| 'number' \| 'scroll'` | `'default'` | Visual style variant |
26
+ | `activeIndex` | `number` | — | Currently active page index (0-based) |
27
+ | `dataLength` | `number` | — | Total number of pages |
28
+ | `style` | `ViewStyle` | — | Custom wrapper style |
29
+
30
+ > **Direct exports:** `PaginationDot`, `PaginationNumber`, `PaginationWhiteDot` are also exported individually for RN use.
31
+ > **PaginationScroll** wraps scrollable content with a progress indicator bar.
32
+
33
+ ## Compose
34
+
35
+ ```kotlin
36
+ import vn.momo.kits.components.PaginationDot
37
+ import vn.momo.kits.components.PaginationNumber
38
+ import vn.momo.kits.components.PaginationScroll
39
+ import vn.momo.kits.components.PaginationWhiteDot
40
+
41
+ PaginationDot(activeIndex = 1, dataLength = 5) // 0-based index
42
+ PaginationNumber(activeIndex = 2, dataLength = 10) // shows "3/10"
43
+ PaginationWhiteDot(activeIndex = 0, dataLength = 3) // with dark background pill
44
+ PaginationScroll(modifier = Modifier.fillMaxWidth()) {
45
+ // scrollable content here
46
+ }
47
+ ```
@@ -0,0 +1,69 @@
1
+ # PopupNotify (Dialog)
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { PopupNotify } from '@momo-kits/foundation';
7
+
8
+ <PopupNotify
9
+ title="Delete Item?" // dialog title (default: 'Title')
10
+ description="This action cannot be undone." // description text or ReactNode
11
+ image={imageSource} // optional image/illustration URL
12
+ error="" // optional error code text
13
+ primary={{
14
+ title: 'Delete',
15
+ onPress: handleDelete,
16
+ }}
17
+ secondary={{
18
+ title: 'Cancel',
19
+ onPress: handleCancel,
20
+ }}
21
+ buttonDirection="row" // 'row'|'column'|'auto' (default: 'row')
22
+ onIconClose={handleClose} // X button pressed callback
23
+ onRequestClose={handleClose} // back button or tap-outside callback
24
+ />
25
+ ```
26
+
27
+ ## Compose
28
+
29
+ ```kotlin
30
+ import vn.momo.kits.components.PopupNotify
31
+ import vn.momo.kits.components.PopupNotifyProps
32
+ import vn.momo.kits.components.PopupAction
33
+ import vn.momo.kits.components.PopupActionDirection
34
+
35
+ // Show via navigator.showModal:
36
+ val navigator = LocalNavigator.current
37
+
38
+ navigator.showModal(content = {
39
+ PopupNotify(
40
+ props = PopupNotifyProps(
41
+ title = "Confirm Action", // dialog title (default: "Title")
42
+ description = "Are you sure you want to proceed?", // description text
43
+ image = "", // optional image URL
44
+ error = "", // optional error code text
45
+ primary = PopupAction(
46
+ title = "Confirm",
47
+ onPress = { handleConfirm() },
48
+ ),
49
+ secondary = PopupAction(
50
+ title = "Cancel",
51
+ onPress = { navigator.pop() },
52
+ ),
53
+ buttonDirection = PopupActionDirection.ROW, // ROW, COLUMN, AUTO (default: ROW)
54
+ onIconClose = { navigator.pop() }, // X button pressed callback (required)
55
+ isShowCloseIcon = true, // show/hide X button (default: true)
56
+ )
57
+ )
58
+ })
59
+ ```
60
+
61
+ ## Key Differences
62
+
63
+ | Feature | React Native | Compose |
64
+ |---------|-------------|---------|
65
+ | Rendering | `<PopupNotify>` as JSX | `navigator.showModal { PopupNotify(...) }` |
66
+ | Props | Direct props | Wrapped in `PopupNotifyProps` |
67
+ | Actions | JS objects `{ title, onPress }` | `PopupAction(title, onPress?)` |
68
+ | Dismiss | `onRequestClose` / `onIconClose` | `navigator.pop()` via `onIconClose` |
69
+ | Close icon visibility | Always shown when `onIconClose` is set | Via `isShowCloseIcon` param |
@@ -0,0 +1,35 @@
1
+ # PopupPromotion
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { PopupPromotion } from '@momo-kits/foundation';
7
+
8
+ <PopupPromotion
9
+ image="https://example.com/promotion.jpg"
10
+ onIconClose={handleClose}
11
+ onRequestClose={handleClose}
12
+ onActionClick={handleAction}
13
+ />
14
+ ```
15
+
16
+ ## Compose
17
+
18
+ ```kotlin
19
+ import vn.momo.kits.components.PopupPromotion
20
+
21
+ PopupPromotion(
22
+ source = "https://example.com/promotion.jpg",
23
+ onClose = { handleClose() },
24
+ onPress = { handleAction() },
25
+ )
26
+ ```
27
+
28
+ ## Key Differences
29
+
30
+ | Feature | React Native | Compose |
31
+ |---------|-------------|---------|
32
+ | Image source | `image` | `source` |
33
+ | Close handler | `onIconClose` | `onClose` |
34
+ | Action click | `onActionClick` | `onPress` |
35
+ | Back button / touch-outside dismiss | `onRequestClose` | Not available |
@@ -0,0 +1,55 @@
1
+ # ProgressInfo
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { ProgressInfo } from '@momo-kits/progress-info';
7
+
8
+ <ProgressInfo
9
+ steps={[
10
+ { title: 'Step 1', description: 'Desc 1' },
11
+ { title: 'Step 2', description: 'Desc 2' },
12
+ ]}
13
+ horizontal={false}
14
+ size="large" // 'small' | 'large'
15
+ useNumber={false}
16
+ showTitle={true}
17
+ showDescription={true}
18
+ align="center"
19
+ />
20
+ ```
21
+
22
+ ## Compose
23
+
24
+ ```kotlin
25
+ import vn.momo.kits.components.ProgressInfo
26
+ import vn.momo.kits.components.ProgressInfoItem
27
+ import vn.momo.kits.components.ProgressInfoSize
28
+ import vn.momo.kits.components.ProgressInfoAlign
29
+
30
+ ProgressInfo(
31
+ steps = listOf(
32
+ ProgressInfoItem(title = "Step 1", description = "Desc 1"),
33
+ ProgressInfoItem(title = "Step 2", description = "Desc 2"),
34
+ ),
35
+ horizontal = false,
36
+ size = ProgressInfoSize.Large, // Small | Large
37
+ useNumber = false,
38
+ showTitle = true,
39
+ showDescription = true,
40
+ align = ProgressInfoAlign.Center, // Left | Right | Center | Stretch
41
+ customIcon = null,
42
+ modifier = Modifier,
43
+ )
44
+ ```
45
+
46
+ > **Note:** Display-only indicator (no active state, no onPress). Use `Steps` for interactive variant.
47
+
48
+ ## Key Differences
49
+
50
+ | Feature | React Native | Compose |
51
+ |---------|-------------|---------|
52
+ | Step data | `steps` array | `List<ProgressInfoItem>` |
53
+ | Size | `string` | `ProgressInfoSize` enum |
54
+ | Align | `string` | `ProgressInfoAlign` enum |
55
+ | Active / onPress | Not available | Display-only |
@@ -0,0 +1,42 @@
1
+ # Radio
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Radio } from '@momo-kits/foundation';
7
+
8
+ <Radio
9
+ value="option1"
10
+ groupValue={selectedValue}
11
+ onChange={() => setSelectedValue("option1")} // caller sets the value
12
+ label="Option 1"
13
+ disabled={false}
14
+ style={{}}
15
+ params={{ field: 'option' }}
16
+ accessibilityState={{ disabled: false }}
17
+ accessibilityLabel="option_1"
18
+ />
19
+ ```
20
+
21
+ ## Compose
22
+
23
+ ```kotlin
24
+ import vn.momo.kits.components.Radio
25
+
26
+ var selectedValue by remember { mutableStateOf("option1") }
27
+
28
+ Radio(
29
+ value = "option1",
30
+ groupValue = selectedValue,
31
+ onChange = { selectedValue = "option1" }, // caller sets the value
32
+ label = "Option A",
33
+ disabled = false,
34
+ modifier = Modifier,
35
+ )
36
+ ```
37
+
38
+ | Feature | React Native | Compose |
39
+ |---------|-------------|---------|
40
+ | Selection model | `value` + `groupValue` | `value` + `groupValue` |
41
+ | Change handler | `onChange()` caller sets value | `onChange()` caller sets value |
42
+ | Label prop | `label` | `label` |
@@ -0,0 +1,36 @@
1
+ # Rating
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Rating } from '@momo-kits/rating';
7
+
8
+ <Rating
9
+ numOfStars={5}
10
+ rating={4.5}
11
+ onRatingChange={(rating) => setRating(rating)}
12
+ size="large" // 'small'|'medium'|'large'
13
+ />
14
+ ```
15
+
16
+ ## Compose
17
+
18
+ ```kotlin
19
+ import vn.momo.kits.components.Rating
20
+ import vn.momo.kits.components.RatingSize
21
+
22
+ Rating(
23
+ numOfStars = 5,
24
+ rating = 4.5f, // supports half stars
25
+ onRatingChange = { newRating -> }, // omit for read-only
26
+ size = RatingSize.LARGE, // SMALL | MEDIUM | LARGE
27
+ )
28
+ ```
29
+
30
+ ## Key Differences
31
+
32
+ | Feature | React Native | Compose |
33
+ |---------|-------------|---------|
34
+ | Half stars | Yes | Yes |
35
+ | Size | `string` | `RatingSize` enum |
36
+ | Interactive | `onRatingChange` required | Optional |
@@ -0,0 +1,25 @@
1
+ # Skeleton
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Skeleton } from '@momo-kits/foundation';
7
+
8
+ <Skeleton style={{ width: 200, height: 20, borderRadius: 4 }} />
9
+ ```
10
+
11
+ ## Compose
12
+
13
+ ```kotlin
14
+ import vn.momo.kits.components.Skeleton
15
+
16
+ Skeleton() // no params — fills maxWidth/maxHeight via BoxWithConstraints
17
+ ```
18
+
19
+ ## Key Differences
20
+
21
+ | Feature | React Native | Compose |
22
+ |---------|-------------|---------|
23
+ | Size | Via `style` prop | Fills parent via `BoxWithConstraints` |
24
+ | Dimensions | `width`, `height`, `borderRadius` in `style` | No params |
25
+
@@ -0,0 +1,53 @@
1
+ # Slider
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Slider } from '@momo-kits/slider';
7
+
8
+ <Slider
9
+ min={0}
10
+ max={100}
11
+ step={1}
12
+ low={25}
13
+ high={75}
14
+ minRange={0}
15
+ disableRange={false}
16
+ floatingLabel={false}
17
+ disabledHigh={false}
18
+ disabledLow={false}
19
+ onValueChanged={(low, high, byUser) => {}}
20
+ onSliderTouchStart={(low, high) => {}}
21
+ onSliderTouchEnd={(low, high) => {}}
22
+ />
23
+ ```
24
+
25
+ ## Compose
26
+
27
+ ```kotlin
28
+ import vn.momo.kits.components.Slider
29
+
30
+ Slider(
31
+ min = 0f,
32
+ max = 100f,
33
+ step = 1f,
34
+ low = 25f,
35
+ high = 75f,
36
+ minRange = 0f,
37
+ disableRange = false, // single-thumb mode
38
+ floatingLabel = false, // show value label above thumb
39
+ disabled = false, // all interaction disabled
40
+ onValueChanged = { low, high, byUser -> },
41
+ onSliderTouchStart = { low, high -> },
42
+ onSliderTouchEnd = { low, high -> },
43
+ )
44
+ ```
45
+
46
+ ## Key Differences
47
+
48
+ | Feature | React Native | Compose |
49
+ |---------|-------------|---------|
50
+ | Per-thumb disable | `disabledHigh` / `disabledLow` | `disabled` (global) |
51
+ | Gesture library | Built-in | `pointerInput` + `BoxWithConstraints` |
52
+ | Animation | Native driver | `animateFloatAsState` + spring |
53
+ | Thumb size | Fixed | Fixed (20dp thumb, 4dp track) |
@@ -0,0 +1,52 @@
1
+ # SnackBar
2
+
3
+ ## Compose
4
+
5
+ ```kotlin
6
+ import vn.momo.kits.navigation.component.SnackBar
7
+ import vn.momo.kits.navigation.LocalNavigator
8
+
9
+ val navigator = LocalNavigator.current
10
+
11
+ navigator.showSnackBar(
12
+ SnackBar.Custom(
13
+ duration = 3000L,
14
+ content = {
15
+ Row(Modifier.fillMaxWidth().padding(Spacing.M)) {
16
+ Text("Operation completed!")
17
+ }
18
+ }
19
+ ),
20
+ onDismiss = { } // called when snackbar is dismissed
21
+ )
22
+
23
+ navigator.hideSnackBar() // programmatically dismiss
24
+ ```
25
+
26
+ ### SnackBar variants
27
+
28
+ ```kotlin
29
+ // Custom content snackbar
30
+ SnackBar.Custom(
31
+ content = { Text("Done!") },
32
+ duration = 3000L,
33
+ )
34
+
35
+ // Toast-only snackbar (no custom content — uses built-in styling)
36
+ SnackBar.Toast(duration = 3000L)
37
+ ```
38
+
39
+ ### Screen-level via ScreenHelper
40
+
41
+ ```kotlin
42
+ import vn.momo.kits.navigation.LocalScreenHelper
43
+
44
+ val screenHelper = LocalScreenHelper.current
45
+ screenHelper.showSnackBar(snackBar, onDismiss)
46
+ screenHelper.hideSnackBar()
47
+ ```
48
+
49
+ ## React Native
50
+
51
+ SnackBar is not available in React Native. Use **Toast** instead.
52
+
@@ -0,0 +1,46 @@
1
+ # Stepper
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Stepper } from '@momo-kits/stepper';
7
+
8
+ <Stepper
9
+ value={quantity}
10
+ defaultValue={1}
11
+ min={1}
12
+ max={99}
13
+ step={1}
14
+ size="large"
15
+ disabled={false}
16
+ editable={false}
17
+ onValueChange={setQuantity}
18
+ />
19
+ ```
20
+
21
+ ## Compose
22
+
23
+ ```kotlin
24
+ import vn.momo.kits.components.Stepper
25
+ import vn.momo.kits.components.StepperSize
26
+
27
+ Stepper(
28
+ defaultValue = 0, // clamped to min..max
29
+ min = 0,
30
+ max = 100,
31
+ step = 1,
32
+ disabled = false, // Boolean | BooleanArray
33
+ size = StepperSize.LARGE, // LARGE | SMALL
34
+ editable = false, // allow direct keyboard input
35
+ onValueChange = { newValue -> },
36
+ )
37
+ ```
38
+
39
+ ## Key Differences
40
+
41
+ | Feature | React Native | Compose |
42
+ |---------|-------------|---------|
43
+ | Per-button disable | Not available | `BooleanArray([minus, plus])` |
44
+ | Auto-disable at bounds | Yes | Yes |
45
+ | Editable number input | `editable` prop | `editable` param |
46
+ | Size | `string` | `StepperSize` enum |
@@ -0,0 +1,57 @@
1
+ # Steps
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Steps } from '@momo-kits/step';
7
+
8
+ <Steps
9
+ steps={[
10
+ { title: 'Info' },
11
+ { title: 'Payment', description: 'Add payment method' },
12
+ { title: 'Done', error: false, time: '10:30' },
13
+ ]}
14
+ activeIndex={1}
15
+ horizontal={false}
16
+ size="large"
17
+ useNumber={false}
18
+ align="center"
19
+ customIcon="notifications_check"
20
+ onPress={(item, index) => {}}
21
+ disabled={false}
22
+ />
23
+ ```
24
+
25
+ ## Compose
26
+
27
+ ```kotlin
28
+ import vn.momo.kits.components.Steps
29
+ import vn.momo.kits.components.StepItem
30
+ import vn.momo.kits.components.StepsSize
31
+ import vn.momo.kits.components.StepsAlign
32
+
33
+ Steps(
34
+ steps = listOf(
35
+ StepItem(title = "Info"),
36
+ StepItem(title = "Payment", description = "Add payment method"),
37
+ StepItem(title = "Done", error = false, time = "10:30"),
38
+ ),
39
+ activeIndex = 1,
40
+ horizontal = false,
41
+ size = StepsSize.LARGE, // SMALL | LARGE
42
+ useNumber = false,
43
+ align = StepsAlign.CENTER, // LEFT | RIGHT | CENTER | STRETCH
44
+ customIcon = null,
45
+ disabled = false,
46
+ onPress = { stepItem, index -> },
47
+ )
48
+ ```
49
+
50
+ ## Key Differences
51
+
52
+ | Feature | React Native | Compose |
53
+ |---------|-------------|---------|
54
+ | Step data | `{ title, description?, error?, time? }` | `StepItem` data class |
55
+ | Size | `string` | `StepsSize` enum |
56
+ | Align | `string` | `StepsAlign` enum |
57
+ | onPress | All steps | Completed steps only |
@@ -0,0 +1,44 @@
1
+ # SuggestAction
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { SuggestAction } from '@momo-kits/suggest-action';
7
+
8
+ <SuggestAction
9
+ message="Don't forget to complete your profile!"
10
+ buttonTitle="Complete"
11
+ boldMessage="complete your profile"
12
+ image="https://..."
13
+ onPressButton={() => {}}
14
+ onClose={() => {}}
15
+ />
16
+ ```
17
+
18
+ ## Compose
19
+
20
+ ```kotlin
21
+ import vn.momo.kits.components.SuggestAction
22
+
23
+ SuggestAction(
24
+ message = "Don't forget to complete your profile!",
25
+ buttonTitle = "Complete",
26
+ boldMessage = "complete your profile", // case-insensitive bold substring
27
+ image = "https://...",
28
+ visible = true,
29
+ onClose = { },
30
+ onPressButton = { },
31
+ modifier = Modifier,
32
+ )
33
+ ```
34
+
35
+ > Wrap in a state: `visible` controls show/hide with `AnimatedVisibility`.
36
+
37
+ ## Key Differences
38
+
39
+ | Feature | React Native | Compose |
40
+ |---------|-------------|---------|
41
+ | Visibility | `ref?.show()` | `visible` state param |
42
+ | Animation | Built-in | `AnimatedVisibility` |
43
+ | Close button | Always shown | Always shown |
44
+ | Image size | Fixed | 32dp |
@@ -0,0 +1,44 @@
1
+ # Swipe
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Swipe } from '@momo-kits/swipe';
7
+
8
+ <Swipe
9
+ rightActions={[
10
+ { label: 'Delete', icon: '24_navigation_close', backgroundColor: Colors.red_03, onPress: onDelete },
11
+ ]}
12
+ >
13
+ <ListItem />
14
+ </Swipe>
15
+ ```
16
+
17
+ ## Compose
18
+
19
+ ```kotlin
20
+ import vn.momo.kits.components.Swipe
21
+ import vn.momo.kits.components.SwipeAction
22
+
23
+ Swipe(
24
+ height = 56.dp,
25
+ itemRadius = 0.dp,
26
+ leftActions = listOf(SwipeAction(label = "Delete", icon = "24_navigation_close", onPress = { })),
27
+ rightActions = listOf(SwipeAction(label = "Archive", icon = "24_navigation_close", onPress = { })),
28
+ onSwipeableOpen = { },
29
+ onSwipeableClose = { },
30
+ onSwipeableLeftOpen = { },
31
+ onSwipeableRightOpen = { },
32
+ ) {
33
+ ListItem()
34
+ }
35
+ ```
36
+
37
+ ## Key Differences
38
+
39
+ | Feature | React Native | Compose |
40
+ |---------|-------------|---------|
41
+ | Row height | `style.height` | `height` param (default 56dp) |
42
+ | Action limit | — | Max 3 per side |
43
+ | Animation | Native driver | `Animatable` + `tween(200)` |
44
+ | Gesture | Built-in swipeable | `detectHorizontalDragGestures` |