@momo-kits/native-kits 0.158.1-beta.1-debug → 0.158.1-beta.2-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/compose/build.gradle.kts +1 -1
  2. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +15 -1
  3. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +15 -1
  4. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +1 -0
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +4 -1
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +11 -9
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +56 -1
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +167 -0
  9. package/example/ios/Example.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/Example.xcscheme +32 -0
  10. package/example/ios/Example.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  11. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  12. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/WorkspaceSettings.xcsettings +16 -0
  13. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
  14. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
  15. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
  16. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
  17. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
  18. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
  19. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
  20. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +58 -0
  21. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/lottie-ios.xcscheme +58 -0
  22. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +60 -0
  23. package/gradle.properties +1 -1
  24. package/local.properties +2 -2
  25. package/package.json +1 -1
  26. package/.claude/settings.local.json +0 -11
  27. package/.claude/skills/design-system/SKILL.md +0 -88
  28. package/.claude/skills/design-system/references/components/avatar.md +0 -134
  29. package/.claude/skills/design-system/references/components/badge.md +0 -127
  30. package/.claude/skills/design-system/references/components/bottom-tab.md +0 -177
  31. package/.claude/skills/design-system/references/components/bottomsheet.md +0 -170
  32. package/.claude/skills/design-system/references/components/button.md +0 -206
  33. package/.claude/skills/design-system/references/components/carousel.md +0 -117
  34. package/.claude/skills/design-system/references/components/checkbox.md +0 -98
  35. package/.claude/skills/design-system/references/components/chip.md +0 -146
  36. package/.claude/skills/design-system/references/components/collapse.md +0 -120
  37. package/.claude/skills/design-system/references/components/date-picker.md +0 -119
  38. package/.claude/skills/design-system/references/components/divider.md +0 -84
  39. package/.claude/skills/design-system/references/components/icon.md +0 -130
  40. package/.claude/skills/design-system/references/components/image.md +0 -81
  41. package/.claude/skills/design-system/references/components/information.md +0 -107
  42. package/.claude/skills/design-system/references/components/input-dropdown.md +0 -138
  43. package/.claude/skills/design-system/references/components/input-money.md +0 -157
  44. package/.claude/skills/design-system/references/components/input-otp.md +0 -132
  45. package/.claude/skills/design-system/references/components/input-phone-number.md +0 -140
  46. package/.claude/skills/design-system/references/components/input-search.md +0 -124
  47. package/.claude/skills/design-system/references/components/input-text-area.md +0 -133
  48. package/.claude/skills/design-system/references/components/input.md +0 -152
  49. package/.claude/skills/design-system/references/components/loader.md +0 -87
  50. package/.claude/skills/design-system/references/components/pagination.md +0 -105
  51. package/.claude/skills/design-system/references/components/popup-notify.md +0 -128
  52. package/.claude/skills/design-system/references/components/progress-info.md +0 -114
  53. package/.claude/skills/design-system/references/components/radio.md +0 -86
  54. package/.claude/skills/design-system/references/components/rating.md +0 -126
  55. package/.claude/skills/design-system/references/components/skeleton.md +0 -120
  56. package/.claude/skills/design-system/references/components/slider.md +0 -141
  57. package/.claude/skills/design-system/references/components/snackbar.md +0 -97
  58. package/.claude/skills/design-system/references/components/stepper.md +0 -100
  59. package/.claude/skills/design-system/references/components/steps.md +0 -91
  60. package/.claude/skills/design-system/references/components/suggest-action.md +0 -95
  61. package/.claude/skills/design-system/references/components/swipe.md +0 -121
  62. package/.claude/skills/design-system/references/components/switch.md +0 -98
  63. package/.claude/skills/design-system/references/components/tab-view.md +0 -120
  64. package/.claude/skills/design-system/references/components/tag.md +0 -118
  65. package/.claude/skills/design-system/references/components/text.md +0 -151
  66. package/.claude/skills/design-system/references/components/toast.md +0 -99
  67. package/.claude/skills/design-system/references/components/tooltip.md +0 -138
  68. package/.claude/skills/design-system/references/components/top-nav-miniapp.md +0 -94
  69. package/.claude/skills/design-system/references/components/top-nav.md +0 -226
  70. package/.claude/skills/design-system/references/components/uploader.md +0 -115
  71. package/.claude/skills/design-system/references/navigation/bottom-tab.md +0 -131
  72. package/.claude/skills/design-system/references/navigation/bottomsheet.md +0 -161
  73. package/.claude/skills/design-system/references/navigation/modal.md +0 -133
  74. package/.claude/skills/design-system/references/navigation/navigation-options.md +0 -225
  75. package/.claude/skills/design-system/references/navigation/navigator.md +0 -111
  76. package/.claude/skills/design-system/references/navigation/setup.md +0 -134
  77. package/.claude/skills/design-system/references/navigation/stack.md +0 -128
  78. package/.claude/skills/design-system/references/spec-convention.md +0 -80
  79. package/.claude/skills/design-system/references/tokens/colors.md +0 -131
  80. package/.claude/skills/design-system/references/tokens/spacing-radius.md +0 -144
  81. package/.claude/skills/design-system/references/tokens/theme.md +0 -125
  82. package/.claude/skills/design-system/references/tokens/typography.md +0 -135
  83. package/.claude/skills/design-system-kits/SKILL.md +0 -102
  84. package/.claude/skills/design-system-kits/references/code-convention.md +0 -118
  85. package/.claude/skills/design-system-kits/references/components/avatar.md +0 -45
  86. package/.claude/skills/design-system-kits/references/components/badge.md +0 -27
  87. package/.claude/skills/design-system-kits/references/components/button.md +0 -65
  88. package/.claude/skills/design-system-kits/references/components/carousel.md +0 -51
  89. package/.claude/skills/design-system-kits/references/components/checkbox.md +0 -39
  90. package/.claude/skills/design-system-kits/references/components/chip.md +0 -54
  91. package/.claude/skills/design-system-kits/references/components/collapse.md +0 -63
  92. package/.claude/skills/design-system-kits/references/components/date-picker.md +0 -36
  93. package/.claude/skills/design-system-kits/references/components/divider.md +0 -21
  94. package/.claude/skills/design-system-kits/references/components/icon.md +0 -382
  95. package/.claude/skills/design-system-kits/references/components/image.md +0 -62
  96. package/.claude/skills/design-system-kits/references/components/information.md +0 -61
  97. package/.claude/skills/design-system-kits/references/components/input-dropdown.md +0 -92
  98. package/.claude/skills/design-system-kits/references/components/input-money.md +0 -128
  99. package/.claude/skills/design-system-kits/references/components/input-otp.md +0 -85
  100. package/.claude/skills/design-system-kits/references/components/input-phone-number.md +0 -96
  101. package/.claude/skills/design-system-kits/references/components/input-search.md +0 -127
  102. package/.claude/skills/design-system-kits/references/components/input-text-area.md +0 -100
  103. package/.claude/skills/design-system-kits/references/components/input.md +0 -126
  104. package/.claude/skills/design-system-kits/references/components/loader.md +0 -41
  105. package/.claude/skills/design-system-kits/references/components/pagination.md +0 -47
  106. package/.claude/skills/design-system-kits/references/components/popup-notify.md +0 -69
  107. package/.claude/skills/design-system-kits/references/components/popup-promotion.md +0 -35
  108. package/.claude/skills/design-system-kits/references/components/progress-info.md +0 -55
  109. package/.claude/skills/design-system-kits/references/components/radio.md +0 -42
  110. package/.claude/skills/design-system-kits/references/components/rating.md +0 -36
  111. package/.claude/skills/design-system-kits/references/components/skeleton.md +0 -25
  112. package/.claude/skills/design-system-kits/references/components/slider.md +0 -53
  113. package/.claude/skills/design-system-kits/references/components/snackbar.md +0 -52
  114. package/.claude/skills/design-system-kits/references/components/stepper.md +0 -46
  115. package/.claude/skills/design-system-kits/references/components/steps.md +0 -57
  116. package/.claude/skills/design-system-kits/references/components/suggest-action.md +0 -44
  117. package/.claude/skills/design-system-kits/references/components/swipe.md +0 -44
  118. package/.claude/skills/design-system-kits/references/components/switch.md +0 -43
  119. package/.claude/skills/design-system-kits/references/components/tab-view.md +0 -56
  120. package/.claude/skills/design-system-kits/references/components/tag.md +0 -50
  121. package/.claude/skills/design-system-kits/references/components/text.md +0 -56
  122. package/.claude/skills/design-system-kits/references/components/toast.md +0 -51
  123. package/.claude/skills/design-system-kits/references/components/tooltip.md +0 -95
  124. package/.claude/skills/design-system-kits/references/components/uploader.md +0 -48
  125. package/.claude/skills/design-system-kits/references/design-spec-structure.md +0 -356
  126. package/.claude/skills/design-system-kits/references/design-spec-to-code.md +0 -596
  127. package/.claude/skills/design-system-kits/references/navigation/bottom-tab.md +0 -155
  128. package/.claude/skills/design-system-kits/references/navigation/bottomsheet.md +0 -94
  129. package/.claude/skills/design-system-kits/references/navigation/modal.md +0 -125
  130. package/.claude/skills/design-system-kits/references/navigation/navigation-options.md +0 -430
  131. package/.claude/skills/design-system-kits/references/navigation/navigator.md +0 -177
  132. package/.claude/skills/design-system-kits/references/navigation/setup.md +0 -94
  133. package/.claude/skills/design-system-kits/references/navigation/stack.md +0 -152
  134. package/.claude/skills/design-system-kits/references/screen-layout-rule.md +0 -125
  135. package/.claude/skills/design-system-kits/references/tokens/colors.md +0 -183
  136. package/.claude/skills/design-system-kits/references/tokens/spacing-radius.md +0 -45
  137. package/.claude/skills/design-system-kits/references/tokens/theme.md +0 -97
  138. package/.claude/skills/design-system-kits/references/tokens/typography.md +0 -105
  139. package/.claude/skills/vibe-design/SKILL.md +0 -306
@@ -1,41 +0,0 @@
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` |
@@ -1,47 +0,0 @@
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
- ```
@@ -1,69 +0,0 @@
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 |
@@ -1,35 +0,0 @@
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 |
@@ -1,55 +0,0 @@
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 |
@@ -1,42 +0,0 @@
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` |
@@ -1,36 +0,0 @@
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 |
@@ -1,25 +0,0 @@
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
-
@@ -1,53 +0,0 @@
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) |
@@ -1,52 +0,0 @@
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
-
@@ -1,46 +0,0 @@
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 |
@@ -1,57 +0,0 @@
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 |
@@ -1,44 +0,0 @@
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 |
@@ -1,44 +0,0 @@
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` |