@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,120 +0,0 @@
1
- # Skeleton
2
-
3
- > Loading placeholder mimics content shape — shimmer animation khi data đang fetch.
4
-
5
- **Package:** `@momo-kits/foundation`
6
- **Platform:** RN ✅ | Compose ✅
7
- **Completeness:** need_update — thiếu Figma
8
- **Figma node:** [VERIFY]
9
-
10
- ---
11
-
12
- ## Props
13
-
14
- | Prop | Type | Values | Default | Description |
15
- |------|------|--------|---------|-------------|
16
- | `width` | number/string | dp \| `"100%"` | `"100%"` | Skeleton width [VERIFY] |
17
- | `height` | number | dp | required | Skeleton height [VERIFY] |
18
- | `borderRadius` | number/string | dp \| `"circle"` | `0` | Corner radius. `"circle"` cho avatar shape [VERIFY] |
19
- | `animated` | boolean | `true` \| `false` | `true` | Enable shimmer animation [VERIFY] |
20
-
21
- > **Compose:** Skeletons dùng `BoxWithConstraints` — auto-adapt to parent size.
22
-
23
- ---
24
-
25
- ## Variants
26
-
27
- Skeleton không có visual variants — shape phụ thuộc content nó replace.
28
-
29
- | Content Type | Shape | borderRadius |
30
- |-------------|-------|-------------|
31
- | Text line | Rectangle narrow | small |
32
- | Avatar | Circle | `"circle"` |
33
- | Thumbnail/Image | Rectangle matching aspect ratio | medium |
34
- | Card | Rounded rectangle | card radius |
35
- | Button | Rounded rectangle matching button | pill |
36
-
37
- ---
38
-
39
- ## States
40
-
41
- | State | Base Color | Highlight Color | Animation |
42
- |-------|-----------|----------------|-----------|
43
- | **Loading** | `Colors.black_03` | `Colors.black_04` | Pulsing shimmer, continuous loop |
44
-
45
- ---
46
-
47
- ## Variant-to-Context Map
48
-
49
- | Context | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
50
- |---------|-------------|-----------|-------------------|
51
- | **Content loading** | Data đang fetch, layout structure known | Content loads instantly → không cần | Transaction list loading, feed loading |
52
- | **Lazy section** | Section lazy-loaded within screen | Full-screen initial load → dùng Loader | Card section loading trên Home |
53
- | **Image placeholder** | Image đang download | — | Avatar loading, banner loading |
54
-
55
- ---
56
-
57
- ## SSR Pattern
58
-
59
- ### User Card Skeleton
60
- ```json
61
- {
62
- "id": "user_skeleton",
63
- "type": "row",
64
- "children": [
65
- {
66
- "component": "Skeleton",
67
- "props": {
68
- "width": 48,
69
- "height": 48,
70
- "borderRadius": "circle"
71
- }
72
- },
73
- {
74
- "id": "text_skeleton",
75
- "type": "section",
76
- "children": [
77
- {
78
- "component": "Skeleton",
79
- "props": {
80
- "width": "60%",
81
- "height": 16,
82
- "borderRadius": 4
83
- }
84
- },
85
- {
86
- "component": "Skeleton",
87
- "props": {
88
- "width": "40%",
89
- "height": 12,
90
- "borderRadius": 4
91
- }
92
- }
93
- ]
94
- }
95
- ]
96
- }
97
- ```
98
-
99
- ---
100
-
101
- ## Accessibility
102
-
103
- - Skeleton areas announce "Đang tải" cho screen readers.
104
- - Khi content loaded → loaded content nhận focus và announce.
105
- - Skeleton không focusable hoặc interactive.
106
-
107
- ---
108
-
109
- ## Usage Guidelines
110
-
111
- ### Do
112
- - Dùng cho content loading states khi layout structure known.
113
- - Match skeleton shapes to actual content layout.
114
- - Group multiple skeletons cho full content block (avatar circle + text rectangles).
115
-
116
- ### Don't
117
- - Không dùng cho action loading (button submit) → dùng **Button** loading state.
118
- - Không dùng cho full-screen initial load → dùng **Loader**.
119
- - Không để skeleton visible indefinitely — show error/empty state nếu loading fails.
120
- - Không dùng cho content loads instantly — unnecessary visual noise.
@@ -1,141 +0,0 @@
1
- # Slider
2
-
3
- > Range selection control — drag thumb along track to select value or range within min-max bounds.
4
-
5
- **Package:** `@momo-kits/slider`
6
- **Platform:** RN ✅ | Compose ❌ (use native Slider)
7
- **Completeness:** need_update — thiếu Figma
8
- **Figma node:** [VERIFY]
9
-
10
- ---
11
-
12
- ## Variant Axes
13
-
14
- | Axis | Options | Default |
15
- |------|---------|---------|
16
- | **Mode** | `single` · `range` | `single` |
17
-
18
- ---
19
-
20
- ## Props
21
-
22
- | Prop | Type | Values | Default | Description |
23
- |------|------|--------|---------|-------------|
24
- | `mode` | string | `"single"` \| `"range"` | `"single"` | Single thumb or dual-thumb range selection |
25
- | `value` | number \| array | number (single) or `[min, max]` (range) | `0` | Current value. Single: number. Range: `[lowValue, highValue]` |
26
- | `min` | number | — | `0` | Minimum bound |
27
- | `max` | number | — | `100` | Maximum bound |
28
- | `step` | number | — | `1` | Value increment. `0` for continuous [VERIFY] |
29
- | `disabled` | boolean | `true` \| `false` | `false` | Non-interactive state |
30
- | `showLabel` | boolean | `true` \| `false` | `false` | Show value label above thumb [VERIFY] |
31
- | `onChange` | function | — | — | Callback khi value changes. `"onChange": "setState://sliderValue"` |
32
-
33
- ---
34
-
35
- ## Variants
36
-
37
- | Mode | Thumbs | Track Fill | Usage |
38
- |------|--------|-----------|-------|
39
- | **single** | 1 thumb | Fill from min to thumb | Select single value (volume, brightness) |
40
- | **range** | 2 thumbs | Fill between two thumbs | Select value range (price filter, age range) |
41
-
42
- ### Track Colors
43
-
44
- | Part | Color |
45
- |------|-------|
46
- | Active fill | `Colors.pink_03` |
47
- | Inactive track | `Colors.black_04` |
48
- | Thumb | `Colors.white` with shadow [VERIFY] |
49
-
50
- ---
51
-
52
- ## States
53
-
54
- | State | Appearance | Interactive |
55
- |-------|-----------|-------------|
56
- | **Default** | Pink fill + grey track, white thumb | true |
57
- | **Dragging** | Thumb enlarged, optional value label shown | true |
58
- | **Disabled** | All elements reduced opacity (0.4) | false |
59
-
60
- ---
61
-
62
- ## Variant-to-Context Map
63
-
64
- | Mode | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
65
- |------|-------------|-----------|-------------------|
66
- | **single** | Adjust single value in continuous range | Discrete options (3-5 choices) → dùng Radio | Volume, brightness, loan amount |
67
- | **range** | Filter by range (min-max) | Single value selection | Lọc giá sản phẩm, khoảng tuổi |
68
-
69
- ---
70
-
71
- ## SSR Pattern
72
-
73
- ### Price Range Filter
74
- ```json
75
- {
76
- "id": "price_filter",
77
- "type": "section",
78
- "children": [
79
- {
80
- "component": "Text",
81
- "props": {
82
- "content": "Khoảng giá",
83
- "typography": "body_default_bold"
84
- }
85
- },
86
- {
87
- "component": "Slider",
88
- "props": {
89
- "mode": "range",
90
- "value": [0, 1000000],
91
- "min": 0,
92
- "max": 5000000,
93
- "step": 100000,
94
- "showLabel": true
95
- },
96
- "onChange": "setState://priceRange"
97
- }
98
- ]
99
- }
100
- ```
101
-
102
- ### Single Value Slider
103
- ```json
104
- {
105
- "component": "Slider",
106
- "props": {
107
- "mode": "single",
108
- "value": "{{state.amount}}",
109
- "min": 100000,
110
- "max": 50000000,
111
- "step": 100000
112
- },
113
- "onChange": "setState://amount"
114
- }
115
- ```
116
-
117
- ---
118
-
119
- ## Accessibility
120
-
121
- - Announce current value: "Slider: 500,000".
122
- - Range mode: announce both values: "Range: 100,000 to 1,000,000".
123
- - Thumb adjustable via accessibility actions (increment/decrement by step).
124
- - Disabled state announced.
125
-
126
- ---
127
-
128
- ## Usage Guidelines
129
-
130
- ### Do
131
- - Dùng cho continuous value selection in a range.
132
- - Range mode cho price/quantity filters.
133
- - Show min/max labels at track ends.
134
- - `showLabel` khi exact value matters to user.
135
- - Reasonable step size — không quá fine-grained.
136
-
137
- ### Don't
138
- - Không dùng cho small discrete options (1-5) → dùng **Stepper** hoặc **Radio**.
139
- - Không dùng cho exact numeric input → dùng **Input** with numeric keyboard.
140
- - Không set step=0 unless truly continuous control needed.
141
- - Không hide value display khi precision matters — show label or pair with Text.
@@ -1,97 +0,0 @@
1
- # SnackBar
2
-
3
- > Transient notification with optional action — bottom-of-screen feedback. Compose equivalent of Toast.
4
-
5
- **Package:** built-in Compose (`SnackbarHost`)
6
- **Platform:** RN ❌ (use Toast) | Compose ✅
7
- **Completeness:** need_update — thiếu Figma
8
- **Figma node:** [VERIFY]
9
-
10
- ---
11
-
12
- ## Props
13
-
14
- | Prop | Type | Values | Default | Description |
15
- |------|------|--------|---------|-------------|
16
- | `message` | string | — | required | Snackbar text content |
17
- | `duration` | number | milliseconds | `3000` | Auto-dismiss duration [VERIFY] |
18
- | `actionLabel` | string | — | — | Optional action button text (e.g., "Hoàn tác"). Omit for no action [VERIFY] |
19
- | `onAction` | function | — | — | Callback khi tap action button. `"onAction": "action://undoDelete"` |
20
- | `type` | string | `"default"` \| `"error"` | `"default"` | Snackbar style variant [VERIFY] |
21
-
22
- ---
23
-
24
- ## Variants
25
-
26
- | Type | Background | Text Color | Action Color |
27
- |------|-----------|-----------|-------------|
28
- | **default** | `Colors.black_17` (dark) | `Colors.white` | `Colors.pink_03` [VERIFY] |
29
- | **error** | `Colors.red_03` | `Colors.white` | `Colors.white` [VERIFY] |
30
-
31
- ---
32
-
33
- ## States
34
-
35
- | State | Appearance |
36
- |-------|-----------|
37
- | **Entering** | Slide up from bottom with animation |
38
- | **Visible** | Full opacity at bottom, countdown active |
39
- | **Exiting** | Slide down with fade animation |
40
- | **Dismissed** | Removed from view |
41
-
42
- ---
43
-
44
- ## Variant-to-Context Map
45
-
46
- | Context | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
47
- |---------|-------------|-----------|-------------------|
48
- | **Action feedback** | Confirm action + offer undo | No undo possible | "Đã xóa. Hoàn tác?" |
49
- | **Brief notification** | Non-critical info (no action needed) | Critical errors → dùng Information | "Đã lưu thay đổi" |
50
- | **Error feedback** | Brief error on Compose | Error needs detail → dùng Information | "Lỗi kết nối" |
51
-
52
- ---
53
-
54
- ## SSR Pattern
55
-
56
- ### SnackBar with Undo Action
57
- ```json
58
- {
59
- "id": "delete_feedback",
60
- "type": "action",
61
- "trigger": "onSuccess",
62
- "snackbar": {
63
- "component": "SnackBar",
64
- "props": {
65
- "message": "Đã xóa mục đã chọn",
66
- "actionLabel": "Hoàn tác",
67
- "duration": 5000
68
- },
69
- "onAction": "action://undoDelete"
70
- }
71
- }
72
- ```
73
-
74
- ---
75
-
76
- ## Accessibility
77
-
78
- - Announce snackbar content as live region.
79
- - Action button must meet 44dp touch target.
80
- - Duration sufficient for screen reader announcement + action interaction (~5s when action present).
81
-
82
- ---
83
-
84
- ## Usage Guidelines
85
-
86
- ### Do
87
- - Dùng cho Compose platform transient notifications.
88
- - Include action button khi undo/retry is possible.
89
- - Position at bottom of screen (standard Material placement).
90
- - Extend duration khi có action button (5000ms vs 3000ms).
91
-
92
- ### Don't
93
- - Không dùng trên RN → dùng **Toast**.
94
- - Không dùng cho persistent messages → dùng **Information**.
95
- - Không dùng cho blocking alerts → dùng **PopupNotify**.
96
- - Không include more than 1 action.
97
- - Không stack multiple snackbars.
@@ -1,100 +0,0 @@
1
- # Stepper
2
-
3
- > Numeric increment/decrement control — minus/plus buttons để adjust value theo discrete steps.
4
-
5
- **Package:** `@momo-kits/stepper`
6
- **Platform:** RN ✅ | Compose ❌ (build with Row + Button)
7
- **Completeness:** need_update — thiếu Figma
8
- **Figma node:** [VERIFY]
9
-
10
- ---
11
-
12
- ## Props
13
-
14
- | Prop | Type | Values | Default | Description |
15
- |------|------|--------|---------|-------------|
16
- | `value` | number | — | `1` | Current numeric value |
17
- | `min` | number | — | `0` | Minimum value. Minus button disabled khi reached |
18
- | `max` | number | — | — | Maximum value. Plus button disabled khi reached |
19
- | `step` | number | — | `1` | Increment/decrement amount per tap [VERIFY] |
20
- | `disabled` | boolean | `true` \| `false` | `false` | Both buttons disabled |
21
- | `onChange` | function | — | — | Callback khi value change. `"onChange": "setState://quantity"` |
22
-
23
- ---
24
-
25
- ## States
26
-
27
- | State | Minus Button | Plus Button | Value Color | Interactive |
28
- |-------|-------------|-----------|------------|-------------|
29
- | **Default** | `Colors.black_17` icon | `Colors.black_17` icon | `Colors.black_17` | true |
30
- | **At minimum** | `Colors.black_08` (disabled) | `Colors.black_17` | `Colors.black_17` | partial |
31
- | **At maximum** | `Colors.black_17` | `Colors.black_08` (disabled) | `Colors.black_17` | partial |
32
- | **Pressed** | opacity 0.8 | opacity 0.8 | `Colors.black_17` | true |
33
- | **Disabled** | `Colors.black_08` | `Colors.black_08` | `Colors.black_08` | false |
34
-
35
- Value updates immediately on tap.
36
-
37
- ---
38
-
39
- ## Variant-to-Context Map
40
-
41
- | Context | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
42
- |---------|-------------|-----------|-------------------|
43
- | **Quantity picker** | Adjust số lượng items (1-10) | Range lớn (0-1000) → dùng Slider | Số lượng vé, số suất ăn |
44
- | **Count adjustment** | Small numeric adjustments | Freeform numeric input → dùng Input | Số người trong nhóm, số tháng |
45
-
46
- ---
47
-
48
- ## SSR Pattern
49
-
50
- ### Quantity Picker
51
- ```json
52
- {
53
- "id": "quantity_row",
54
- "type": "row",
55
- "children": [
56
- {
57
- "component": "Text",
58
- "props": {
59
- "content": "Số lượng",
60
- "typography": "body_default_regular"
61
- }
62
- },
63
- {
64
- "component": "Stepper",
65
- "props": {
66
- "value": "{{state.quantity}}",
67
- "min": 1,
68
- "max": 10,
69
- "step": 1
70
- },
71
- "onChange": "setState://quantity"
72
- }
73
- ]
74
- }
75
- ```
76
-
77
- ---
78
-
79
- ## Accessibility
80
-
81
- - Minus button: accessible label "Giảm".
82
- - Plus button: accessible label "Tăng".
83
- - Current value announce as live region — changes spoken aloud.
84
- - Disabled buttons at boundaries announce disabled.
85
-
86
- ---
87
-
88
- ## Usage Guidelines
89
-
90
- ### Do
91
- - Dùng cho small numeric adjustments (1-10 range).
92
- - Show current value rõ ràng between buttons.
93
- - Disable button khi value reach min/max.
94
- - Reasonable default value — user không cần tap nhiều.
95
-
96
- ### Don't
97
- - Không dùng cho large ranges → dùng **Slider**.
98
- - Không dùng cho freeform numeric → dùng **Input** numeric keyboard.
99
- - Không hide value display.
100
- - Không dùng cho non-numeric → dùng **Chip** / **Radio**.
@@ -1,91 +0,0 @@
1
- # Steps
2
-
3
- > Step progress indicator — numbered circles + connecting lines for multi-step flows. Shows current position.
4
-
5
- **Package:** `@momo-kits/step`
6
- **Platform:** RN ✅ | Compose ❌ (build with Row)
7
- **Completeness:** need_update — thiếu Figma
8
- **Figma node:** [VERIFY]
9
-
10
- ---
11
-
12
- ## Props
13
-
14
- | Prop | Type | Values | Default | Description |
15
- |------|------|--------|---------|-------------|
16
- | `steps` | array | `[{ label }]` | required | List of step definitions |
17
- | `current` | number | 0-based index | `0` | Current active step index |
18
- | `showLabels` | boolean | `true` \| `false` | `true` | Show text labels below circles [VERIFY] |
19
-
20
- ### Step Object
21
-
22
- | Field | Type | Required | Description |
23
- |-------|------|----------|-------------|
24
- | `label` | string | yes | Step description text (e.g., "Chi tiết", "Thanh toán", "Xác nhận") |
25
-
26
- ---
27
-
28
- ## States (per step)
29
-
30
- | State | Circle Background | Circle Content | Label Color | Connecting Line |
31
- |-------|------------------|---------------|------------|----------------|
32
- | **Completed** | `Colors.pink_03` | White check icon (✓) | `Colors.black_17` | `Colors.pink_03` (to next completed/current) |
33
- | **Current** | `Colors.pink_03` | White step number | `Colors.black_17` | `Colors.black_04` (to next upcoming) |
34
- | **Upcoming** | `Colors.black_04` | `Colors.black_17` step number | `Colors.black_08` | `Colors.black_04` |
35
-
36
- Steps evenly distributed across full width. Labels centered below circles.
37
-
38
- ---
39
-
40
- ## Variant-to-Context Map
41
-
42
- | Context | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
43
- |---------|-------------|-----------|-------------------|
44
- | **Checkout flow** | Multi-step purchase/payment | Single page form | Thanh toán: Chi tiết → Xác nhận → Hoàn thành |
45
- | **Registration** | Step-by-step onboarding | Simple 1-page signup | eKYC: Thông tin → CMND → Selfie → Hoàn thành |
46
- | **Wizard** | Complex form broken into sections | ≤2 steps → just use buttons | Đăng ký dịch vụ mới |
47
-
48
- ---
49
-
50
- ## SSR Pattern
51
-
52
- ### Checkout Steps
53
- ```json
54
- {
55
- "component": "Steps",
56
- "props": {
57
- "steps": [
58
- { "label": "Chi tiết" },
59
- { "label": "Thanh toán" },
60
- { "label": "Xác nhận" }
61
- ],
62
- "current": "{{state.currentStep}}"
63
- }
64
- }
65
- ```
66
-
67
- ---
68
-
69
- ## Accessibility
70
-
71
- - Each step announces: label + number + state ("Bước 1, Chi tiết, hoàn thành").
72
- - Current step clearly identified: "Bước 2, Thanh toán, bước hiện tại".
73
- - Overall progress context: "Bước 2 trong 4".
74
- - Not rely solely on color — check icon (completed) + number (current/upcoming) provide distinction.
75
-
76
- ---
77
-
78
- ## Usage Guidelines
79
-
80
- ### Do
81
- - Dùng cho linear multi-step flows (checkout, registration, onboarding).
82
- - Keep labels short — 1-2 words.
83
- - Limit 3-5 steps for readability.
84
- - Show completed check icon → user confidence.
85
-
86
- ### Don't
87
- - Không dùng cho tab navigation → dùng **TabView**.
88
- - Không dùng cho percentage progress → dùng **ProgressInfo**.
89
- - Không allow tap upcoming steps to skip ahead (unless flow supports non-linear).
90
- - Không >5 steps — break flow into sections or simplify.
91
- - Không dùng cho page indicators → dùng **Pagination**.
@@ -1,95 +0,0 @@
1
- # SuggestAction
2
-
3
- > Tappable suggestion row — title + optional description + chevron. Quick-action entry point.
4
-
5
- **Package:** `@momo-kits/suggest-action`
6
- **Platform:** RN ✅ | Compose ❌
7
- **Completeness:** need_update — thiếu Figma
8
- **Figma node:** [VERIFY]
9
-
10
- ---
11
-
12
- ## Props
13
-
14
- | Prop | Type | Values | Default | Description |
15
- |------|------|--------|---------|-------------|
16
- | `title` | string | — | required | Primary text — action label |
17
- | `description` | string | — | — | Secondary text below title. Optional [VERIFY] |
18
- | `icon` | string | icon name | — | Leading icon [VERIFY] |
19
- | `showChevron` | boolean | `true` \| `false` | `true` | Show trailing chevron (→) indicator [VERIFY] |
20
- | `disabled` | boolean | `true` \| `false` | `false` | Non-interactive state |
21
- | `onPress` | function | — | — | Callback khi tap. `"onPress": "navigate://Screen"` hoặc `"onPress": "action://doSomething"` |
22
-
23
- ---
24
-
25
- ## States
26
-
27
- | State | Appearance | Interactive |
28
- |-------|-----------|-------------|
29
- | **Default** | Full opacity, chevron visible | true |
30
- | **Pressed** | Opacity 0.8 (entire row) | true |
31
- | **Disabled** | Reduced opacity (0.4), no press feedback | false |
32
-
33
- ---
34
-
35
- ## Variant-to-Context Map
36
-
37
- | Context | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
38
- |---------|-------------|-----------|-------------------|
39
- | **Quick action** | Suggest next action after completing flow | Primary CTA needed → dùng Button | "Xem lịch sử giao dịch" sau khi chuyển tiền |
40
- | **Navigation shortcut** | Link to related screen/feature | Standalone navigation → dùng list item | "Mời bạn bè" suggestion |
41
- | **Contextual suggestion** | AI/system-suggested action based on context | Static menu items | "Thanh toán điện nước" khi đến hạn |
42
-
43
- ---
44
-
45
- ## SSR Pattern
46
-
47
- ### Post-Transaction Suggestions
48
- ```json
49
- {
50
- "id": "suggest_actions",
51
- "type": "section",
52
- "children": [
53
- {
54
- "component": "SuggestAction",
55
- "props": {
56
- "title": "Xem lịch sử giao dịch",
57
- "icon": "history"
58
- },
59
- "onPress": "navigate://TransactionHistory"
60
- },
61
- {
62
- "component": "SuggestAction",
63
- "props": {
64
- "title": "Chuyển tiền cho người khác",
65
- "description": "Gửi tiền nhanh đến số điện thoại"
66
- },
67
- "onPress": "navigate://Transfer"
68
- }
69
- ]
70
- }
71
- ```
72
-
73
- ---
74
-
75
- ## Accessibility
76
-
77
- - Announce as button: "[title], [description]".
78
- - Chevron is decorative — not announced separately.
79
- - Full row is single tap target.
80
-
81
- ---
82
-
83
- ## Usage Guidelines
84
-
85
- ### Do
86
- - Dùng cho contextual next-step suggestions.
87
- - Keep title actionable — verb-first ("Xem...", "Mời...", "Thanh toán...").
88
- - Description chỉ khi cần clarify action.
89
- - Group 2-3 suggestions together maximum.
90
-
91
- ### Don't
92
- - Không dùng cho primary actions → dùng **Button**.
93
- - Không dùng cho navigation menus → dùng list với proper list items.
94
- - Không show >3 suggestions — overwhelming.
95
- - Không omit onPress — mỗi SuggestAction phải navigate/action.