@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,111 +0,0 @@
1
- # Screen Transitions — Design Guideline
2
-
3
- ## Overview
4
-
5
- Screen transitions define how users move between screens. MoMo KitX supports multiple transition types for different navigation contexts.
6
-
7
- ---
8
-
9
- ## Transition Types
10
-
11
- ### Push (Horizontal Slide)
12
- - **Direction**: New screen slides in from right, current slides left
13
- - **Use for**: Forward navigation, drilling into detail
14
- - **Back**: Reverse animation (right to left), swipe-back gesture
15
- - **Duration**: ~300ms
16
- - **Easing**: Ease-in-out
17
-
18
- ### Pop (Reverse Slide)
19
- - **Direction**: Current screen slides right, previous appears from left
20
- - **Use for**: Going back, closing detail views
21
- - **Gesture**: Swipe from left edge (iOS), back button (Android)
22
- - **Can pop multiple**: Pop 2+ screens at once for deep navigation
23
-
24
- ### Present (Vertical Slide — Full-screen Modal)
25
- - **Direction**: New screen slides up from bottom
26
- - **Use for**: Full-screen modals, compose/create flows, media viewers
27
- - **Back**: Slide down, swipe down gesture
28
- - **Overlay**: No background dimming (full screen replacement)
29
-
30
- ### Replace (No Animation)
31
- - **Behavior**: Replaces current screen without animation
32
- - **Use for**: Authentication flows, state changes (logged out → logged in)
33
- - **Back**: No back navigation to replaced screen
34
-
35
- ### Reset (Stack Clear)
36
- - **Behavior**: Clears entire navigation stack, sets new root
37
- - **Use for**: Logout, deep link landing, flow completion
38
- - **Back**: No back navigation
39
-
40
- ---
41
-
42
- ## Transition Decision Guide
43
-
44
- | User Action | Transition | Example |
45
- |-------------|-----------|---------|
46
- | Tap list item | Push | Product list → Product detail |
47
- | Tap "Back" | Pop | Detail → List |
48
- | Tap "Create" / "Compose" | Present | Home → New post |
49
- | Complete a flow | Pop (multiple) or Reset | Payment success → Home |
50
- | Tab switch | None (instant) | Tab 1 → Tab 2 |
51
- | Logout | Reset | Any → Login screen |
52
-
53
- ---
54
-
55
- ## Navigation Stack Visualization
56
-
57
- ```
58
- Push flow:
59
- [Home] → [List] → [Detail] → [Edit]
60
- ↑ current
61
- Pop: removes current, reveals previous
62
-
63
- Present flow:
64
- [Home] ─── presents ──→ [Create]
65
- ↑ stays in stack ↑ modal layer
66
-
67
- Reset flow:
68
- [Screen A] → [Screen B] → [Screen C]
69
- ↓ reset
70
- [New Home] (stack cleared)
71
- ```
72
-
73
- ---
74
-
75
- ## Modal vs Present vs Push
76
-
77
- | Aspect | Push | Present | Modal Overlay |
78
- |--------|------|---------|---------------|
79
- | Animation | Horizontal slide | Vertical slide | Fade + scale |
80
- | Screen coverage | Full screen | Full screen | Partial (centered) |
81
- | Background | Replaces | Replaces | Dimmed backdrop |
82
- | Back gesture | Swipe from left | Swipe down | Tap outside / X |
83
- | Use for | Navigation flow | Create/compose | Confirmation/alert |
84
-
85
- ---
86
-
87
- ## Gesture Navigation
88
-
89
- ### iOS
90
- - **Swipe from left edge**: Pop (go back)
91
- - **Swipe down**: Dismiss presented screen
92
-
93
- ### Android
94
- - **System back button/gesture**: Pop
95
- - **Swipe from left/right edge**: Pop (gesture navigation)
96
-
97
- ---
98
-
99
- ## Do's & Don'ts
100
-
101
- ### Do's
102
- - Use Push for all forward navigation within a flow
103
- - Use Present for creation/compose flows that feel like a new context
104
- - Use Modal overlay (PopupNotify) for decisions that require immediate response
105
- - Support swipe-back gestures on all pushed screens
106
-
107
- ### Don'ts
108
- - Don't use Push for modals or dialogs
109
- - Don't use Reset unless you truly need to clear the entire stack
110
- - Don't disable swipe-back gesture unless absolutely necessary
111
- - Don't mix Present and Push for the same type of navigation
@@ -1,134 +0,0 @@
1
- # Screen Layout — Design Guideline
2
-
3
- ## Overview
4
-
5
- MoMo KitX uses a hierarchical layout system for structuring screen content. The layout defines how content is organized, spaced, and contained.
6
-
7
- ---
8
-
9
- ## Screen Hierarchy
10
-
11
- ```
12
- Screen (outermost container)
13
- └── Section (responsive container with margins)
14
- └── Card (elevated content container)
15
- └── Item (grid-based content block)
16
- ```
17
-
18
- ### Screen
19
- - **Role**: Outermost container for an entire page/screen
20
- - **Features**: Header, scroll behavior, keyboard avoidance, safe area insets
21
- - **Background**: `theme.colors.background.default` (#F2F2F6 light / #121212 dark)
22
-
23
- ### Section
24
- - **Role**: Responsive container that groups related cards
25
- - **Margin**: 12px horizontal margin on each side (built-in)
26
- - **Options**: `expanded` (full bleed), `backgroundImage` support
27
-
28
- ### Card
29
- - **Role**: Elevated content container within a section
30
- - **Background**: `theme.colors.background.surface` (white / #1E1E1E)
31
- - **Radius**: `Radius.S` (8)
32
- - **Shadow**: Optional elevation shadow
33
- - **Padding**: Content uses internal `Item` grid
34
-
35
- ### Item
36
- - **Role**: Grid-based content block within a card
37
- - **Grid**: 12-column system
38
- - **Span options**: `widthSpan` 1–12 (12 = full width, 6 = half, 4 = third, 3 = quarter)
39
-
40
- ---
41
-
42
- ## 12-Column Grid System
43
-
44
- ```
45
- |--12px--|------- 12 columns (full width - 24px margin) -------|--12px--|
46
-
47
- | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
48
-
49
- widthSpan=12 ──────────────────────────────────────────────────────────
50
- widthSpan=6 ───────────────────────── ─────────────────────────
51
- widthSpan=4 ──────────────── ──────────────── ────────────────
52
- widthSpan=3 ─────────── ─────────── ─────────── ───────────
53
- ```
54
-
55
- ### Grid Spacing
56
- - **Column gutter**: Built into grid context
57
- - **Section margin**: 12px each side
58
- - **Card internal padding**: `Spacing.L` (16)
59
-
60
- ---
61
-
62
- ## Compose Layout System
63
-
64
- Compose uses a container-based approach instead of the grid:
65
-
66
- ### Container Hierarchy
67
- ```
68
- ComposeAppContainer / NavigationContainer (app root)
69
- └── Screen content (via navigator.push)
70
- └── LazyColumn / Column (scrollable content)
71
- └── Composable components
72
- ```
73
-
74
- ### ComposeAppContainer
75
- - **Role**: App root with theme, navigation, and dependency injection
76
- - **Provides**: Theme, Navigator, Navigation, StatusBar, NavigationBar
77
- - **Background**: `theme.colors.background.default`
78
-
79
- ### NavigationContainer
80
- - **Role**: Lightweight fallback when ComposeAppContainer unavailable
81
- - **Provides**: Theme, Navigator, Navigation
82
-
83
- ---
84
-
85
- ## Screen Structure Specs
86
-
87
- ### Safe Areas
88
- - **Top**: Status bar height (dynamic, via `AppStatusBar.current`)
89
- - **Bottom**: Navigation bar height (dynamic, via `AppNavigationBar.current`)
90
- - **Horizontal**: 0 (Section provides margin)
91
-
92
- ### Content Areas
93
- | Area | Description | Spacing |
94
- |------|-------------|---------|
95
- | Header | Title bar with navigation | Height: 44–56 |
96
- | Content | Scrollable body | Padding: Section margin 12 |
97
- | Footer | Fixed bottom actions | Padding: `Spacing.L` horizontal |
98
- | FAB | Floating action button | Position: bottom-right, margin `Spacing.L` |
99
-
100
- ---
101
-
102
- ## Usage Guidelines
103
-
104
- ### When to Use Each Container
105
-
106
- | Scenario | Container |
107
- |----------|-----------|
108
- | Full page with header | Screen + Section + Card |
109
- | Content grouping | Section (groups related cards) |
110
- | Distinct content block | Card (with optional shadow) |
111
- | Grid layout | Card + Item with widthSpan |
112
- | Simple list | Section with no Card (flat content) |
113
-
114
- ### Spacing Between Sections
115
- - Between sections: `Spacing.XL` (24) or built-in section gap
116
- - Between cards within a section: `Spacing.M` (12)
117
- - Card internal content: `Spacing.L` (16) padding
118
-
119
- ---
120
-
121
- ## Do's & Don'ts
122
-
123
- ### Do's
124
- - Use `Screen > Section > Card > Item` hierarchy consistently (RN)
125
- - Use `ComposeAppContainer` as the app root (Compose)
126
- - Keep one container per Fragment/Activity (Compose)
127
- - Use the 12-column grid for responsive layouts
128
-
129
- ### Don'ts
130
- - Don't nest Screen inside Screen
131
- - Don't nest NavigationContainer inside NavigationContainer
132
- - Don't skip Section and put Card directly in Screen
133
- - Don't hardcode screen margins — use Section's built-in 12px margin
134
- - Don't use arbitrary column counts — stick to 12-column grid
@@ -1,128 +0,0 @@
1
- # Screen Header & Scroll — Design Guideline
2
-
3
- ## Overview
4
-
5
- Screen headers provide navigation context, titles, and actions. The header system supports multiple types with configurable behavior.
6
-
7
- ---
8
-
9
- ## Header Types
10
-
11
- ### Default Header
12
- - **Height**: 44–56
13
- - **Background**: `theme.colors.background.surface`
14
- - **Elements**: Back button (left), title (center), action items (right)
15
- - **Title**: `headline_s_bold`, `theme.colors.text.default`
16
- - **Back button**: Chevron left icon, 24px
17
- - **Bottom border**: 1px `theme.colors.border.default`
18
-
19
- ### Extended Header
20
- - **Height**: 88–120 (larger area)
21
- - **Features**: Larger title area, optional search input
22
- - **Search**: Animated input that expands on focus
23
- - **Use for**: Home screens, browse screens with search
24
-
25
- ### Animated Header
26
- - **Behavior**: Collapses on scroll down, expands on scroll up
27
- - **Collapsed height**: 44 (standard)
28
- - **Expanded height**: 88–120
29
- - **Transition**: Smooth fade + height animation
30
- - **Requires**: Connected scroll state (ScrollData + LazyColumn state)
31
-
32
- ### No Header
33
- - **Use for**: Full-screen content, modals, custom headers
34
- - **Safe area**: Content must handle top safe area manually
35
-
36
- ---
37
-
38
- ## Header Anatomy
39
-
40
- ```
41
- ┌──────────────────────────────────────────────┐
42
- │ Status Bar │
43
- ├──────────────────────────────────────────────┤
44
- │ │
45
- │ [←] Screen Title [🔍] [⋯] │
46
- │ │
47
- ├──────────────────────────────────────────────┤
48
- │ Border (1px, border.default) │
49
- └──────────────────────────────────────────────┘
50
-
51
- Left area: Back button or custom
52
- Center area: Title text (headline_s_bold)
53
- Right area: Action icons/buttons (HeaderRight)
54
- ```
55
-
56
- ### Header Right Actions
57
- - **Toolkit**: Standard icon buttons (search, more, etc.)
58
- - **Max items**: 2–3 action icons
59
- - **Icon size**: 24px
60
- - **Spacing between icons**: `Spacing.M` (12)
61
- - **Touch target**: 44x44pt per icon
62
-
63
- ---
64
-
65
- ## Scroll Behavior
66
-
67
- ### Standard Scroll
68
- - Header stays fixed
69
- - Content scrolls underneath
70
- - Use for: Short content, forms
71
-
72
- ### Collapsing Header (Animated)
73
- - Header collapses from extended to default height on scroll
74
- - Title may animate (scale down, reposition)
75
- - Triggers via connected scroll state
76
-
77
- ### Scroll-to-Top
78
- - Tap status bar or header title to scroll to top
79
- - Standard iOS/Android behavior
80
-
81
- ---
82
-
83
- ## Footer Area
84
-
85
- - **Position**: Fixed at bottom of screen, above safe area
86
- - **Background**: `theme.colors.background.surface`
87
- - **Padding**: `Spacing.L` horizontal, `Spacing.M` vertical (container provides)
88
- - **Shadow**: Subtle top shadow for elevation
89
- - **Use for**: Primary action buttons, bottom CTAs
90
-
91
- ### Floating Action Button (FAB)
92
-
93
- - **Position**: Bottom-right corner
94
- - **Margin**: `Spacing.L` from edges
95
- - **Size**: 56x56
96
- - **Shape**: Circle (50% radius)
97
- - **Color**: `theme.colors.primary`
98
- - **Icon**: White, 24px
99
- - **Shadow**: Elevation shadow
100
- - **Animation**: Scale in on mount
101
-
102
- ---
103
-
104
- ## Usage Guidelines
105
-
106
- | Screen Type | Header Type | Scroll | Footer |
107
- |-------------|------------|--------|--------|
108
- | Detail page | Default | Standard | Action button |
109
- | Home/browse | Extended | Animated collapse | None |
110
- | Form/input | Default | Standard | Submit button |
111
- | Full-screen media | None | None | Overlay controls |
112
- | Modal dialog | Default (no back) | Standard | Action buttons |
113
-
114
- ---
115
-
116
- ## Do's & Don'ts
117
-
118
- ### Do's
119
- - Use `Default` header for most screens
120
- - Connect scroll state to `Animated` header for smooth collapse
121
- - Use footer for primary screen actions (not inline buttons)
122
- - Keep header title concise (max ~20 characters)
123
-
124
- ### Don'ts
125
- - Don't put more than 3 action icons in header right
126
- - Don't use `Animated` header for short, non-scrollable content
127
- - Don't add padding to footer content — container handles it
128
- - Don't use custom header heights — stick to standard types
@@ -1,80 +0,0 @@
1
- ---
2
- tags: design, convention, spec, guideline, designer
3
- related: design-system-kits/references/code-convention.md
4
- ---
5
-
6
- # Spec Convention
7
-
8
- Apply this convention to every AI-generated design specification.
9
-
10
- ## Scope and Consistency
11
-
12
- 1. Use this document as the single source of truth for design spec formatting.
13
- 2. Any copied spec-convention reference in other skills must be identical to this file.
14
- 3. Every design spec maps 1:1 to a code reference in design-system-kits.
15
-
16
- ## 0) Spec Structure
17
-
18
- Every component design spec MUST follow this structure in order:
19
-
20
- 1. **Title** — Component name as H1
21
- 2. **Description** — What the component does, package name, platform support
22
- 3. **Anatomy** — ASCII diagram showing structural parts + parts table
23
- 4. **Variants** — Visual style variations (if applicable)
24
- 5. **Sizes** — Dimension options with token references
25
- 6. **States** — All interactive states with color tokens
26
- 7. **Spacing and Dimensions** — Layout tokens used
27
- 8. **Layout** — Positioning and alignment rules
28
- 9. **Accessibility** — WCAG, touch targets, screen reader notes
29
- 10. **Do's and Don'ts** — Usage guidance
30
-
31
- ## 1) Token References
32
-
33
- 1. Always reference design tokens — never raw hex or px values.
34
- 2. Color format: `Colors.{name}` (e.g., `Colors.pink_03`)
35
- 3. Spacing format: `Spacing.{size}` with pixel value (e.g., `Spacing.M` (12))
36
- 4. Radius format: `Radius.{size}` with pixel value (e.g., `Radius.S` (8))
37
- 5. Typography format: `{category}_{size}_{weight}` (e.g., `action_default_bold`)
38
- 6. Theme color format: `theme.colors.{path}` (e.g., `theme.colors.primary`)
39
-
40
- ## 2) Platform Parity
41
-
42
- 1. Indicate platform support: `RN ✅ | Compose ✅` or `RN ✅ | Compose ❌`
43
- 2. Note behavioral differences between platforms when they exist.
44
- 3. Use the same token names across platforms.
45
-
46
- ## 3) State Coverage
47
-
48
- Every interactive component MUST define these states:
49
-
50
- 1. **Default** — Resting state
51
- 2. **Pressed** — Active touch state
52
- 3. **Focused** — Input focus state (for form controls)
53
- 4. **Disabled** — Non-interactive state
54
- 5. **Error** — Validation failure (for form controls)
55
- 6. **Loading** — Async operation in progress (where applicable)
56
-
57
- ## 4) Accessibility Requirements
58
-
59
- 1. Minimum touch target: 44pt
60
- 2. Color contrast: WCAG AA (4.5:1 minimum for text)
61
- 3. Screen reader labels for all interactive elements
62
- 4. Focus management for form flows
63
-
64
- ## 5) Bilingual Labels
65
-
66
- 1. Use English for all spec content
67
- 2. Add Vietnamese (tiếng Việt) labels where relevant for MoMo team context
68
- 3. Format: `English label` / `Vietnamese label`
69
-
70
- ## 6) Enforcement Checklist
71
-
72
- Before finalizing a design spec, verify:
73
-
74
- 1. All color values use token references, not raw hex.
75
- 2. All spacing/dimension values use token references, not raw pixels.
76
- 3. All interactive states are documented.
77
- 4. Accessibility section is included.
78
- 5. Platform support is indicated.
79
- 6. Anatomy diagram is present.
80
- 7. Do's and Don'ts section is included.
@@ -1,131 +0,0 @@
1
- # Colors — Design Guideline
2
-
3
- ## Color System Overview
4
-
5
- MoMo KitX uses a token-based color system shared across React Native and Compose. All colors are referenced by token name (e.g. `Colors.pink_03`), never by raw hex values.
6
-
7
- ---
8
-
9
- ## Grayscale Palette (black_01 – black_20)
10
-
11
- | Token | Hex | Design Role |
12
- |-------|-----|-------------|
13
- | `black_01` | #FFFFFF | White, surface backgrounds |
14
- | `black_02` | #F9F9F9 | Subtle background |
15
- | `black_03` | #F0F0F0 | Border disabled state |
16
- | `black_04` | #E8E8E8 | Border default, dividers |
17
- | `black_05` | #E5E5E5 | Light separator |
18
- | `black_06` | #D8D8D8 | Muted border |
19
- | `black_07` | #CCCCCC | Placeholder icon |
20
- | `black_08` | #C6C6C6 | Text disabled |
21
- | `black_09` | #B9B9B9 | Inactive icon |
22
- | `black_10` | #A0A0A0 | Subtle text |
23
- | `black_11` | #878787 | Muted text |
24
- | `black_12` | #727272 | Text hint / placeholder |
25
- | `black_13` | #646464 | Secondary icon |
26
- | `black_14` | #565656 | Medium emphasis text |
27
- | `black_15` | #484848 | Text secondary |
28
- | `black_16` | #404040 | Strong secondary text |
29
- | `black_17` | #303233 | Text default (primary) |
30
- | `black_18` | #242424 | High emphasis text |
31
- | `black_19` | #18191A | Near-black text |
32
- | `black_20` | #000000 | Pure black |
33
-
34
- ### Text Color Hierarchy
35
- - **Primary text**: `black_17` (#303233) — body content, headings
36
- - **Secondary text**: `black_15` (#484848) — supporting info, subtitles
37
- - **Hint/placeholder text**: `black_12` (#727272) — input hints, captions
38
- - **Disabled text**: `black_08` (#C6C6C6) — non-interactive text
39
-
40
- ### Border Color Usage
41
- - **Default border**: `black_04` (#E8E8E8) — input borders, card outlines
42
- - **Disabled border**: `black_03` (#F0F0F0) — disabled input borders
43
-
44
- ---
45
-
46
- ## Brand Color Families
47
-
48
- Each family has 11 tint levels: **01** (darkest) → **11** (lightest).
49
- - Levels **01–03**: Primary use (text, icons, interactive elements)
50
- - Levels **04–06**: Secondary use (hover states, accents)
51
- - Levels **07–11**: Background/container tints
52
-
53
- ### Primary Colors
54
-
55
- | Family | 01 | 02 | 03 | Design Role |
56
- |--------|----|----|-----|-------------|
57
- | **pink** | #BC2678 | #D42A87 | #EB2F96 | Brand primary, CTA buttons |
58
- | **blue** | #0062CC | #006EE6 | #007AFF | Interactive, links, info |
59
- | **red** | #C41B24 | #DD1F29 | #F5222D | Error, danger, destructive |
60
- | **green** | #2A9F47 | #2FB350 | #34C759 | Success, positive, confirmation |
61
- | **orange** | #C84316 | #E14C19 | #FA541C | Warning, caution |
62
- | **gold** | #C87012 | #E17E14 | #FA8C16 | Rewards, highlights |
63
- | **mint** | — | — | — | Highlight, promotional |
64
- | **violet** | — | — | — | Accents, special features |
65
- | **indigo** | — | — | — | Accents |
66
- | **lime** | — | — | — | Accents |
67
- | **yellow** | — | — | — | Accents |
68
-
69
- Special: `pink_MoMo_Branding` = #A50064 (official MoMo brand color — use only for logo/branding, not UI)
70
-
71
- ---
72
-
73
- ## Color Usage Rules
74
-
75
- ### Semantic Color Mapping
76
-
77
- | Intent | Token | Use for |
78
- |--------|-------|---------|
79
- | Brand / Primary CTA | `Colors.pink_03` | Primary buttons, active tabs, selected states |
80
- | Interactive / Links | `Colors.blue_03` | Links, secondary actions, info states |
81
- | Error / Danger | `Colors.red_03` | Error messages, destructive buttons, validation |
82
- | Success | `Colors.green_03` | Success states, confirmation, positive indicators |
83
- | Warning | `Colors.orange_03` | Warning banners, caution messages |
84
- | Highlight | `Colors.mint_03` | Promotional highlights, feature callouts |
85
-
86
- ### Background Tint Usage
87
-
88
- Use tint levels 07–11 for backgrounds to maintain readability:
89
-
90
- | Context | Background Token | Text Token | Contrast |
91
- |---------|-----------------|------------|----------|
92
- | Error container | `Colors.red_08` | `Colors.red_03` | ✅ AA |
93
- | Success container | `Colors.green_08` | `Colors.green_03` | ✅ AA |
94
- | Warning container | `Colors.orange_08` | `Colors.orange_03` | ✅ AA |
95
- | Info container | `Colors.blue_08` | `Colors.blue_03` | ✅ AA |
96
- | Brand container | `Colors.pink_09` | `Colors.pink_03` | ✅ AA |
97
-
98
- ---
99
-
100
- ## Accessibility
101
-
102
- ### Contrast Requirements (WCAG AA)
103
- - **Normal text** (< 18sp): minimum 4.5:1 contrast ratio
104
- - **Large text** (≥ 18sp bold or ≥ 24sp): minimum 3:1 contrast ratio
105
- - **Interactive elements**: minimum 3:1 against background
106
-
107
- ### Pre-validated Combinations
108
- | Text | Background | Ratio | Pass |
109
- |------|-----------|-------|------|
110
- | `black_17` on `black_01` | Dark on white | 12.6:1 | ✅ AAA |
111
- | `black_15` on `black_01` | Secondary on white | 8.2:1 | ✅ AAA |
112
- | `black_12` on `black_01` | Hint on white | 4.6:1 | ✅ AA |
113
- | `black_01` on `pink_03` | White on brand | 4.5:1 | ✅ AA |
114
- | `black_08` on `black_01` | Disabled on white | 2.2:1 | ❌ Decorative only |
115
-
116
- ---
117
-
118
- ## Do's & Don'ts
119
-
120
- ### Do's
121
- - Use `Colors.pink_03` for primary CTA — it's the brand color
122
- - Use semantic tokens (`theme.colors.error.primary`) so colors adapt in dark mode
123
- - Use tint levels 07–11 for container backgrounds
124
- - Pair `black_17` with `black_01` for maximum readability
125
-
126
- ### Don'ts
127
- - Don't hardcode hex values — always map to a token name
128
- - Don't use `pink_MoMo_Branding` (#A50064) for UI elements — it's for logo/branding only
129
- - Don't use tint levels 01–03 as backgrounds for large areas — too saturated
130
- - Don't place `black_12` (hint) on colored backgrounds — may fail contrast
131
- - Don't mix brand colors in the same visual group (e.g. pink button next to blue button)