@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,87 +0,0 @@
1
- # Loader
2
-
3
- > Loading spinner/dot animation — full-screen loading states và initial data fetches.
4
-
5
- **Package:** `@momo-kits/foundation`
6
- **Platform:** RN ✅ | Compose ❌ (dùng `CircularProgressIndicator` hoặc Skeleton)
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
- | `type` | string | `"spinner"` \| `"dot"` | `"spinner"` | Loader variant [VERIFY] |
17
- | `color` | string | `Colors.*` token | `"Colors.pink_03"` | Loader color [VERIFY] |
18
-
19
- ---
20
-
21
- ## Variants
22
-
23
- | Variant | Animation | Usage |
24
- |---------|----------|-------|
25
- | **spinner** | Continuous circular rotation | General-purpose loading |
26
- | **dot** | Sequential pulsing/scaling dots | Lighter, playful contexts |
27
-
28
- ---
29
-
30
- ## States
31
-
32
- | State | Color | Animation | Description |
33
- |-------|-------|----------|-------------|
34
- | **Loading** | `Colors.pink_03` | Active | Continuous animation |
35
-
36
- ---
37
-
38
- ## Variant-to-Context Map
39
-
40
- | Variant | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
41
- |---------|-------------|-----------|-------------------|
42
- | **spinner** | Full-screen loading, screen transitions | Inline content loading → dùng Skeleton | App initialization, screen data fetch |
43
- | **dot** | Lighter loading contexts | Formal/serious screens | Chat typing indicator, playful loading |
44
-
45
- ---
46
-
47
- ## SSR Pattern
48
-
49
- ### Full-screen Loading
50
- ```json
51
- {
52
- "id": "loading_screen",
53
- "type": "center",
54
- "children": [
55
- {
56
- "component": "Loader",
57
- "props": {
58
- "type": "spinner"
59
- }
60
- }
61
- ]
62
- }
63
- ```
64
-
65
- ---
66
-
67
- ## Accessibility
68
-
69
- - Loader announce "Đang tải" cho screen readers.
70
- - Khi loading complete → loaded content nhận focus.
71
- - Loader không focusable hoặc interactive.
72
-
73
- ---
74
-
75
- ## Usage Guidelines
76
-
77
- ### Do
78
- - Dùng cho full-screen loading states.
79
- - Dùng cho initial data fetches khi no layout structure known.
80
- - Center loader trong available space.
81
- - Spinner cho general-purpose, dot cho lighter contexts.
82
-
83
- ### Don't
84
- - Không dùng cho inline content loading → dùng **Skeleton**.
85
- - Không dùng trong button → dùng **Button** loading prop.
86
- - Không show Loader cho near-instant operations.
87
- - Không dùng trên Compose → dùng native `CircularProgressIndicator`.
@@ -1,105 +0,0 @@
1
- # Pagination
2
-
3
- > Page/position indicators — dots, numbers, hoặc scroll bar cho carousels và paged content.
4
-
5
- **Package:** `@momo-kits/carousel` (PaginationDot, PaginationScroll) / `@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
- | `type` | string | `"dot"` \| `"whiteDot"` \| `"number"` \| `"scroll"` | `"dot"` | Pagination variant [VERIFY] |
17
- | `total` | number | — | required | Total number of pages |
18
- | `current` | number | 0-based index | `0` | Current active page |
19
- | `onChange` | function | — | — | Callback khi page change (for number variant) [VERIFY] |
20
-
21
- ---
22
-
23
- ## Variants
24
-
25
- | Variant | Active Color | Inactive Color | Content | Usage |
26
- |---------|-------------|---------------|---------|-------|
27
- | **dot** | `Colors.pink_03` | `Colors.black_08` | Circles | Standard carousels, image galleries |
28
- | **whiteDot** | `Colors.white` | `Colors.white` (50% opacity) | Circles | Dark/image backgrounds |
29
- | **number** | `Colors.pink_03` | `Colors.black_12` | Page numbers | When exact page count matters |
30
- | **scroll** | `Colors.pink_03` (indicator) | `Colors.black_08` (track) | Scroll bar | Large page counts |
31
-
32
- ---
33
-
34
- ## States
35
-
36
- | State | Appearance |
37
- |-------|-----------|
38
- | **Active page** | Highlighted indicator (pink/white, larger dot) |
39
- | **Inactive pages** | Subdued indicator (grey/translucent, smaller) |
40
- | **Transitioning** | Animated interpolation between two page states |
41
-
42
- ---
43
-
44
- ## Variant-to-Context Map
45
-
46
- | Variant | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
47
- |---------|-------------|-----------|-------------------|
48
- | **dot** | Standard carousel, ≤7 pages | >7 pages → dùng scroll | Banner carousel trên Home |
49
- | **whiteDot** | Pagination trên dark/image background | Light background → dùng dot | Image gallery, hero banners |
50
- | **number** | Exact page count matters to user | Decorative paging | Onboarding steps |
51
- | **scroll** | Many pages, continuous scroll | ≤5 discrete pages → dùng dot | Feed với lazy loading |
52
-
53
- ---
54
-
55
- ## SSR Pattern
56
-
57
- ### Carousel with Dot Pagination
58
- ```json
59
- {
60
- "id": "banner_carousel",
61
- "type": "section",
62
- "children": [
63
- {
64
- "component": "Carousel",
65
- "props": {
66
- "items": "{{data.banners}}",
67
- "autoPlay": true
68
- }
69
- },
70
- {
71
- "component": "Pagination",
72
- "props": {
73
- "type": "dot",
74
- "total": "{{data.banners.length}}",
75
- "current": "{{state.currentBanner}}"
76
- }
77
- }
78
- ]
79
- }
80
- ```
81
-
82
- ---
83
-
84
- ## Accessibility
85
-
86
- - Announce current page position: "Trang 2 trong 5".
87
- - Dot indicators là decorative khi paired with swipe navigation.
88
- - Number pagination nếu tappable → meet 44dp touch target.
89
-
90
- ---
91
-
92
- ## Usage Guidelines
93
-
94
- ### Do
95
- - PaginationDot cho carousels / image galleries.
96
- - PaginationWhiteDot cho dark backgrounds.
97
- - PaginationNumber khi exact page count matters.
98
- - PaginationScroll cho many pages.
99
- - Center-align below associated content.
100
-
101
- ### Don't
102
- - Không dùng cho step-by-step progress → dùng **Steps**.
103
- - Không dùng dot cho >7-8 pages → switch to scroll/number.
104
- - Không đặt pagination xa content.
105
- - Không mix variants trong cùng carousel.
@@ -1,128 +0,0 @@
1
- # PopupNotify
2
-
3
- > Modal dialog — confirmation, alert, decision point. Requires user interaction before proceeding.
4
-
5
- **Package:** `@momo-kits/foundation`
6
- **Platform:** RN ✅ | Compose ✅ (via `navigator.showModal`)
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 message or question |
17
- | `description` | string | — | — | Supporting detail text |
18
- | `image` | object | `{ uri: string }` | — | Optional illustration/image above title [VERIFY] |
19
- | `primaryButton` | object | `{ label, onPress }` | required | Main action button (filled style) |
20
- | `secondaryButton` | object | `{ label, onPress }` | — | Alternative/cancel button (outlined/text style) |
21
- | `showClose` | boolean | `true` \| `false` | `false` | Show close (X) icon at top-right [VERIFY] |
22
- | `barrierDismissible` | boolean | `true` \| `false` | `false` | Tap overlay to dismiss. Default false — prevents accidental dismissal [VERIFY] |
23
- | `onDismiss` | function | — | — | Callback khi dismissed. `"onDismiss": "action://closePopup"` |
24
-
25
- ### Button Object
26
-
27
- | Field | Type | Required | Description |
28
- |-------|------|----------|-------------|
29
- | `label` | string | yes | Button text — use strong verbs ("Xóa", "Xác nhận"), not generic "Yes"/"No" |
30
- | `onPress` | function | yes | Callback. `"onPress": "action://confirm"` |
31
-
32
- ---
33
-
34
- ## Variants
35
-
36
- | Layout | Khi nào | Description |
37
- |--------|---------|-------------|
38
- | **Row (side-by-side)** | Both labels short, fit in single row | Secondary left, Primary right |
39
- | **Column (stacked)** | Labels long, would truncate in row | Primary top, Secondary below |
40
-
41
- Layout auto-detected based on combined button text length. Column is safer default.
42
-
43
- ---
44
-
45
- ## States
46
-
47
- | State | Appearance |
48
- |-------|-----------|
49
- | **Appearing** | Fade in overlay + scale up container from center |
50
- | **Visible** | Static — user must interact to proceed |
51
- | **Dismissing** | Fade out overlay + container |
52
-
53
- ---
54
-
55
- ## Variant-to-Context Map
56
-
57
- | Context | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
58
- |---------|-------------|-----------|-------------------|
59
- | **Destructive confirmation** | Confirm delete/cancel actions | Non-destructive feedback → dùng Toast | "Xóa giao dịch này?" |
60
- | **Important alert** | Alert requiring acknowledgment | Non-critical info → dùng Information | "Phiên đăng nhập hết hạn" |
61
- | **Binary decision** | Two-choice decision point | >2 choices → dùng BottomSheet | "Lưu thay đổi?" Lưu / Hủy |
62
-
63
- ---
64
-
65
- ## SSR Pattern
66
-
67
- ### Destructive Confirmation
68
- ```json
69
- {
70
- "component": "PopupNotify",
71
- "props": {
72
- "title": "Xóa giao dịch?",
73
- "description": "Hành động này không thể hoàn tác",
74
- "primaryButton": {
75
- "label": "Xóa",
76
- "onPress": "action://deleteTransaction"
77
- },
78
- "secondaryButton": {
79
- "label": "Hủy",
80
- "onPress": "action://closePopup"
81
- }
82
- }
83
- }
84
- ```
85
-
86
- ### Alert with Image
87
- ```json
88
- {
89
- "component": "PopupNotify",
90
- "props": {
91
- "title": "Cập nhật thành công!",
92
- "description": "Thông tin của bạn đã được cập nhật",
93
- "image": { "uri": "{{assets.successIllustration}}" },
94
- "primaryButton": {
95
- "label": "Đóng",
96
- "onPress": "action://closePopup"
97
- }
98
- }
99
- }
100
- ```
101
-
102
- ---
103
-
104
- ## Accessibility
105
-
106
- - Focus trap: keyboard/screen reader focus trapped within dialog khi open.
107
- - Title announced by screen reader on open.
108
- - ESC / hardware back dismisses dialog.
109
- - Button labels must be clear, descriptive.
110
- - Role: `alertdialog`.
111
-
112
- ---
113
-
114
- ## Usage Guidelines
115
-
116
- ### Do
117
- - Dùng cho destructive action confirmations ("Xóa mục này?").
118
- - Dùng cho important alerts requiring acknowledgment.
119
- - Dùng cho binary decision points ("Lưu / Hủy").
120
- - Strong verb labels on buttons — "Xóa", "Xác nhận", not "Yes"/"No".
121
- - Keep title clear, description concise.
122
-
123
- ### Don't
124
- - Không dùng cho simple feedback → dùng **Toast** / **SnackBar**.
125
- - Không dùng cho form input → navigate to dedicated screen.
126
- - Không stack multiple PopupNotify dialogs.
127
- - Không >2 action buttons.
128
- - Không dùng cho informational messages without decision → dùng **Information**.
@@ -1,114 +0,0 @@
1
- # Progress Info
2
-
3
- > Linear progress bar with optional label, used to display completion status, upload progress, or goal tracking.
4
-
5
- **Package:** `@momo-kits/progress-info`
6
- **Platform support:** RN ✅ | Compose ❌ (use LinearProgressIndicator)
7
-
8
- ---
9
-
10
- ## Anatomy
11
-
12
- ```
13
- Title Label (optional)
14
- ┌──────────────────────────────────────┐
15
- │████████████░░░░░░░░░░░░░░░░░░░░░░░░░│ ← Track with fill
16
- └──────────────────────────────────────┘
17
- ```
18
-
19
- | Part | Description | Required |
20
- |-------------|-----------------------------------------------------|----------|
21
- | Track | Full-width background bar | Yes |
22
- | Fill | Colored portion representing progress | Yes |
23
- | Title | Text label above the bar describing what is tracked | No |
24
-
25
- ---
26
-
27
- ## Visual Specs
28
-
29
- ### Track
30
-
31
- | Property | Token / Value |
32
- |---------------|------------------------------|
33
- | Background | `Colors.black_04` |
34
- | Height | 4-8 dp |
35
- | Corner radius | `Radius.XS` |
36
- | Width | Full width of parent |
37
-
38
- ### Fill
39
-
40
- | Property | Token / Value |
41
- |---------------|--------------------------------------------|
42
- | Color | `Colors.pink_03` (default, themeable) |
43
- | Height | Same as track height |
44
- | Corner radius | `Radius.XS` |
45
- | Min width | 0 dp (at 0% progress) |
46
- | Max width | Full track width (at 100% progress) |
47
-
48
- ### Title
49
-
50
- | Property | Token / Value |
51
- |---------------|------------------------------|
52
- | Typography | `body_default_regular` |
53
- | Color | Default text color |
54
- | Position | Above the progress bar |
55
- | Spacing below | `Spacing.XS` (4) to track |
56
-
57
- ---
58
-
59
- ## Progress Value
60
-
61
- | Property | Value |
62
- |--------------|------------------------------------------|
63
- | Range | 0.0 (empty) to 1.0 (full) |
64
- | Direction | Left-to-right fill |
65
-
66
- ---
67
-
68
- ## Animation
69
-
70
- | Property | Value |
71
- |----------------|-----------------------------------------------|
72
- | Fill animation | Smooth animated transition when value changes |
73
- | Direction | Left-to-right |
74
-
75
- - When the progress value updates, the fill bar should animate smoothly to its new width.
76
- - The animation should feel responsive but not jarring.
77
-
78
- ---
79
-
80
- ## States
81
-
82
- | State | Appearance |
83
- |------------------|--------------------------------------------------|
84
- | **Empty (0.0)** | Track only, no fill visible |
85
- | **In progress** | Partial fill proportional to value |
86
- | **Complete (1.0)**| Fill covers entire track |
87
-
88
- ---
89
-
90
- ## Accessibility
91
-
92
- - Announce the progress value as a percentage to screen readers (e.g., "Progress: 65%").
93
- - If a title label is present, associate it with the progress bar for context (e.g., "Upload progress: 65%").
94
- - Progress updates should be announced when they change significantly (not on every frame).
95
-
96
- ---
97
-
98
- ## Usage Guidelines
99
-
100
- ### Do's
101
-
102
- - Use for upload or download progress indicators.
103
- - Use for goal completion tracking (e.g., savings goals, profile completeness).
104
- - Use for step completion within a process.
105
- - Provide a title label for context when the progress meaning is not obvious from surrounding content.
106
- - Use animated transitions when the progress value changes.
107
-
108
- ### Don'ts
109
-
110
- - Don't use for indeterminate loading states — use a Loader or Skeleton component instead.
111
- - Don't use values outside the 0.0-1.0 range.
112
- - Don't use a progress bar for tiny increments that won't be visually perceptible — consider a numeric display instead.
113
- - Don't use multiple fill colors within a single progress bar — keep it simple.
114
- - Don't place progress bars where they might be confused with dividers — include a title or surrounding context.
@@ -1,86 +0,0 @@
1
- # Radio
2
-
3
- > Selection control — chọn exactly 1 option từ mutually exclusive set. Value + groupValue pattern.
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
- | `value` | string | — | required | Unique identifier cho radio option này |
17
- | `groupValue` | string | — | — | Currently selected value trong group. Radio selected khi `value == groupValue` |
18
- | `label` | string | — | — | Text label bên phải radio circle |
19
- | `disabled` | boolean | `true` \| `false` | `false` | Non-interactive state |
20
- | `onChange` | function | — | — | Callback khi selected. `"onChange": "setState://selectedOption"` |
21
-
22
- ---
23
-
24
- ## States
25
-
26
- | State | Circle Border | Inner Dot | Label Color | Interactive |
27
- |-------|-------------|----------|------------|-------------|
28
- | **Unselected** | `Colors.black_04` | none | `Colors.black_17` | true |
29
- | **Selected** | `Colors.pink_03` | `Colors.pink_03` fill | `Colors.black_17` | true |
30
- | **Disabled Unselected** | `Colors.black_08` | none | `Colors.black_08` | false |
31
- | **Disabled Selected** | `Colors.black_08` | `Colors.black_08` fill | `Colors.black_08` | 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
- | **Single selection** | Chọn 1 từ 2-5 mutually exclusive options | >5 options → dùng InputDropDown | Chọn phương thức thanh toán, chọn lý do hủy |
40
- | **Default pre-selected** | Recommend 1 option | Không muốn bias user | Chọn gói cước với recommended option |
41
-
42
- ---
43
-
44
- ## SSR Pattern
45
-
46
- ### Radio Group
47
- ```json
48
- {
49
- "id": "payment_method",
50
- "type": "section",
51
- "forEach": "{{data.paymentMethods}}",
52
- "render": {
53
- "component": "Radio",
54
- "props": {
55
- "value": "{{item.id}}",
56
- "groupValue": "{{state.selectedMethod}}",
57
- "label": "{{item.name}}"
58
- },
59
- "onChange": "setState://selectedMethod={{item.id}}"
60
- }
61
- }
62
- ```
63
-
64
- ---
65
-
66
- ## Accessibility
67
-
68
- - Screen readers announce: label, state (selected/unselected), role (radio button), position ("1 of 3").
69
- - Entire row (circle + label) tappable.
70
- - Radio groups PHẢI có group label.
71
-
72
- ---
73
-
74
- ## Usage Guidelines
75
-
76
- ### Do
77
- - Dùng cho single selection từ 2-5 mutually exclusive options.
78
- - Luôn display trong group — single radio alone vô nghĩa.
79
- - Pre-select default option khi có recommendation.
80
- - Vertical list layout cho clarity.
81
-
82
- ### Don't
83
- - Không dùng cho multiple selection → dùng **CheckBox**.
84
- - Không dùng cho >5 options → dùng **InputDropDown**.
85
- - Không dùng cho on/off toggle → dùng **Switch**.
86
- - Radio selections không toggle off — once selected, phải chọn option khác.
@@ -1,126 +0,0 @@
1
- # Rating
2
-
3
- > Star-based rating display và input — product reviews, service feedback, quality indicators.
4
-
5
- **Package:** `@momo-kits/rating`
6
- **Platform:** RN ✅ | Compose ❌ (build with Row of Icons)
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 | `0` - `5` | `0` | Current rating value. Supports 0.5 increments for display mode |
17
- | `size` | string | `"small"` \| `"medium"` \| `"large"` | `"medium"` | Star size [VERIFY] |
18
- | `interactive` | boolean | `true` \| `false` | `true` | Interactive (input) vs display-only (read-only) [VERIFY] |
19
- | `disabled` | boolean | `true` \| `false` | `false` | Non-interactive, reduced opacity |
20
- | `onChange` | function | — | — | Callback khi tap star. `"onChange": "setState://rating"` |
21
-
22
- ---
23
-
24
- ## Variants
25
-
26
- | Mode | Granularity | Half-star | Tappable |
27
- |------|-----------|----------|---------|
28
- | **Interactive** | Whole stars only (1-5) | No | Yes |
29
- | **Display-only** | 0.5 increments (0.0-5.0) | Yes | No |
30
-
31
- ### Star Colors
32
-
33
- | Part | Color |
34
- |------|-------|
35
- | Active (filled) | `Colors.gold_03` |
36
- | Inactive (outline) | `Colors.black_08` |
37
- | Half-star left | `Colors.gold_03` filled |
38
- | Half-star right | `Colors.black_08` outline |
39
-
40
- ---
41
-
42
- ## States
43
-
44
- | State | Appearance | Interactive |
45
- |-------|-----------|-------------|
46
- | **Empty (0)** | All 5 stars outlined | per mode |
47
- | **Partial (1-4)** | N filled + remaining outlined | per mode |
48
- | **Full (5)** | All 5 stars filled | per mode |
49
- | **Disabled** | All stars reduced opacity (0.4) | false |
50
-
51
- ---
52
-
53
- ## Variant-to-Context Map
54
-
55
- | Mode | Khi nào dùng | Tránh khi | Ví dụ trong MoMo |
56
- |------|-------------|-----------|-------------------|
57
- | **Interactive** | User submit feedback/review | Read-only display | Đánh giá merchant sau giao dịch, feedback dịch vụ |
58
- | **Display-only** | Show aggregate/existing rating | User cần input | Rating trung bình merchant, review score |
59
-
60
- ---
61
-
62
- ## SSR Pattern
63
-
64
- ### Interactive Rating in Feedback Form
65
- ```json
66
- {
67
- "component": "Rating",
68
- "props": {
69
- "value": "{{state.rating}}",
70
- "size": "large",
71
- "interactive": true
72
- },
73
- "onChange": "setState://rating"
74
- }
75
- ```
76
-
77
- ### Display Rating with Number
78
- ```json
79
- {
80
- "id": "rating_display",
81
- "type": "row",
82
- "children": [
83
- {
84
- "component": "Rating",
85
- "props": {
86
- "value": "{{data.averageRating}}",
87
- "size": "small",
88
- "interactive": false
89
- }
90
- },
91
- {
92
- "component": "Text",
93
- "props": {
94
- "content": "{{data.averageRating}} / 5",
95
- "typography": "body_s_regular",
96
- "color": "Colors.black_12"
97
- }
98
- }
99
- ]
100
- }
101
- ```
102
-
103
- ---
104
-
105
- ## Accessibility
106
-
107
- - Announce current rating: "Rating: 4 out of 5 stars".
108
- - Interactive mode: each star individually selectable.
109
- - Display-only: announce as informational text.
110
-
111
- ---
112
-
113
- ## Usage Guidelines
114
-
115
- ### Do
116
- - Dùng cho product/service reviews.
117
- - Display-only cho aggregate ratings. Pair với numeric label khi precision matters.
118
- - Half-star display cho averaged ratings (4.3 → 4.5 stars).
119
- - Consistent sizing within same context.
120
-
121
- ### Don't
122
- - Không dùng cho binary like/dislike → dùng **Button** / **Switch**.
123
- - Không dùng cho non-quality metrics — stars imply quality.
124
- - Không allow half-star input — interactive chỉ whole stars.
125
- - Không dùng >5 hoặc <5 stars.
126
- - Không change star color from gold.