@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,144 +0,0 @@
1
- # Spacing & Radius — Design Guideline
2
-
3
- ## Spacing Scale
4
-
5
- MoMo KitX uses a consistent spacing scale for padding, margins, and gaps.
6
-
7
- | Token | Value | Design Use |
8
- |-------|-------|------------|
9
- | `Spacing.XXS` | 2 | Micro gap (icon-to-text inline) |
10
- | `Spacing.XS` | 4 | Tight gap (badge offset, dense lists) |
11
- | `Spacing.S` | 8 | Small gap (between related elements, icon padding) |
12
- | `Spacing.M` | 12 | Default gap (content padding, list item spacing) |
13
- | `Spacing.L` | 16 | Standard padding (card padding, section margins) |
14
- | `Spacing.XL` | 24 | Large gap (section separation, modal padding) |
15
- | `Spacing.XXL` | 32 | Extra large (page top/bottom padding, major sections) |
16
- | `Spacing.3XL` | 48 | RN only — hero spacing |
17
- | `Spacing.4XL` | 56 | RN only — large hero spacing |
18
- | `Spacing.5XL` | 64 | RN only — extra large spacing |
19
-
20
- ---
21
-
22
- ## Spacing Usage Rules
23
-
24
- ### Component Internal Spacing
25
-
26
- | Component | Padding | Gap |
27
- |-----------|---------|-----|
28
- | Button (large) | `Spacing.L` horizontal, `Spacing.M` vertical | `Spacing.S` icon-to-text |
29
- | Button (medium) | `Spacing.M` horizontal, `Spacing.S` vertical | `Spacing.S` icon-to-text |
30
- | Button (small) | `Spacing.S` horizontal, `Spacing.XS` vertical | `Spacing.XS` icon-to-text |
31
- | Card | `Spacing.L` all sides | — |
32
- | Input | `Spacing.M` horizontal, `Spacing.S` vertical | — |
33
- | List item | `Spacing.L` horizontal, `Spacing.M` vertical | `Spacing.M` between items |
34
- | Badge | `Spacing.XS` horizontal | — |
35
- | Tag | `Spacing.S` horizontal, `Spacing.XXS` vertical | — |
36
-
37
- ### Layout Spacing
38
-
39
- | Context | Token | Value |
40
- |---------|-------|-------|
41
- | Screen horizontal margin | `Spacing.L` | 16 |
42
- | Section margin (Section component) | 12 | 12 (built-in) |
43
- | Between cards in a section | `Spacing.M` | 12 |
44
- | Between sections | `Spacing.XL` | 24 |
45
- | Modal/sheet content padding | `Spacing.XL` | 24 |
46
- | Form field vertical gap | `Spacing.L` | 16 |
47
- | Inline element gap | `Spacing.S` | 8 |
48
-
49
- ### Layout Grid
50
-
51
- React Native uses a **12-column grid** via `Screen > Section > Card > Item`:
52
-
53
- ```
54
- Screen (full width)
55
- └── Section (12px margin each side)
56
- └── Card (container with optional shadow)
57
- ├── Item widthSpan=12 → full width
58
- ├── Item widthSpan=6 → half width
59
- ├── Item widthSpan=4 → one-third width
60
- └── Item widthSpan=3 → one-quarter width
61
- ```
62
-
63
- ---
64
-
65
- ## Radius Scale
66
-
67
- | Token | Value | Design Use |
68
- |-------|-------|------------|
69
- | `Radius.XXS` | 2 | Subtle rounding (tags, small elements) |
70
- | `Radius.XS` | 4 | Small elements (badges, small buttons) |
71
- | `Radius.S` | 8 | Cards, inputs, containers |
72
- | `Radius.M` | 12 | Medium containers, dropdowns |
73
- | `Radius.L` | 16 | Modals, bottom sheets, large cards |
74
- | `Radius.XL` | 24 | Pills, chips, rounded buttons |
75
-
76
- ### Radius Usage Rules
77
-
78
- | Element | Radius Token |
79
- |---------|-------------|
80
- | Card | `Radius.S` (8) |
81
- | Input field | `Radius.S` (8) |
82
- | Button (large) | `Radius.XL` (24) — pill shape |
83
- | Button (small) | `Radius.M` (12) |
84
- | Modal | `Radius.L` (16) top corners |
85
- | Bottom sheet | `Radius.L` (16) top corners |
86
- | Chip / Tag | `Radius.XL` (24) — full pill |
87
- | Avatar | Full circle (50% radius) |
88
- | Tooltip | `Radius.S` (8) |
89
- | Badge | Full circle or `Radius.XS` (4) |
90
-
91
- ---
92
-
93
- ## Spacing Annotation Examples
94
-
95
- ### Card with content
96
- ```
97
- ┌───────────────────────────────────────────┐
98
- │ Spacing.L (16) │
99
- │ ┌─────────────────────────────────────┐ │
100
- │ │ Title (headline_s_bold) │ │
101
- │ │ │ │
102
- │ │ Spacing.S (8) gap │ │
103
- │ │ │ │
104
- │ │ Description (body_default_regular) │ │
105
- │ └─────────────────────────────────────┘ │
106
- │ Spacing.L (16) │
107
- └───────────────────────────────────────────┘
108
- Radius.S (8) corners
109
- ```
110
-
111
- ### Form layout
112
- ```
113
- ┌─ Screen margin: Spacing.L (16) ───────────┐
114
- │ │
115
- │ Label (label_l_regular) │
116
- │ Spacing.XS (4) gap │
117
- │ ┌──────────────────────────────────────┐ │
118
- │ │ Input Radius.S(8) │ │
119
- │ └──────────────────────────────────────┘ │
120
- │ Spacing.L (16) gap │
121
- │ Label │
122
- │ Spacing.XS (4) gap │
123
- │ ┌──────────────────────────────────────┐ │
124
- │ │ Input │ │
125
- │ └──────────────────────────────────────┘ │
126
- │ │
127
- └────────────────────────────────────────────┘
128
- ```
129
-
130
- ---
131
-
132
- ## Do's & Don'ts
133
-
134
- ### Do's
135
- - Use `Spacing.L` (16) as the standard horizontal padding for screen content
136
- - Use `Spacing.M` (12) as the default vertical gap between related elements
137
- - Use `Spacing.XL` (24) to separate distinct sections
138
- - Match radius to component size — larger components get larger radius
139
-
140
- ### Don'ts
141
- - Don't use arbitrary spacing values — always pick from the scale
142
- - Don't mix different radius values on elements at the same level
143
- - Don't use `Spacing.XXS` (2) for content gaps — it's only for micro-adjustments
144
- - Don't apply corner radius to only some corners of a card (except modals/sheets: top only)
@@ -1,125 +0,0 @@
1
- # Theme — Design Guideline
2
-
3
- ## Overview
4
-
5
- MoMo KitX supports light and dark themes through semantic color tokens. Designers should use `theme.colors.*` paths instead of direct `Colors.*` tokens so the UI adapts automatically.
6
-
7
- ---
8
-
9
- ## Semantic Color Structure
10
-
11
- ```
12
- theme.colors
13
- ├── primary → Brand accent
14
- ├── secondary → Brand tint
15
- ├── background
16
- │ ├── default → Page background
17
- │ ├── surface → Card/container surface
18
- │ ├── tonal → Brand-tinted background
19
- │ ├── pressed → Pressed state overlay
20
- │ ├── selected → Selected state background
21
- │ └── disable → Disabled element background
22
- ├── text
23
- │ ├── default → Primary text
24
- │ ├── secondary → Supporting text
25
- │ ├── hint → Placeholder/caption text
26
- │ └── disable → Disabled text
27
- ├── border
28
- │ ├── default → Standard borders
29
- │ └── disable → Disabled borders
30
- ├── success
31
- │ ├── primary → Success text/icon
32
- │ ├── secondary → Success accent
33
- │ └── container → Success background
34
- ├── warning → (same structure as success)
35
- ├── error → (same structure as success)
36
- ├── highlight → (same structure as success)
37
- └── interactive → (same structure as success)
38
- ```
39
-
40
- ---
41
-
42
- ## Light Theme Specs
43
-
44
- | Path | Token | Hex | Design Use |
45
- |------|-------|-----|------------|
46
- | `primary` | `pink_03` | #EB2F96 | Primary buttons, active indicators |
47
- | `secondary` | `pink_07` | — | Secondary brand accent |
48
- | `background.default` | — | #F2F2F6 | Page/screen background |
49
- | `background.surface` | `black_01` | #FFFFFF | Cards, containers, modals |
50
- | `background.tonal` | `pink_09` | — | Brand-tinted sections |
51
- | `background.pressed` | — | #DFDFE6 | Touch feedback overlay |
52
- | `background.selected` | `pink_10` | — | Selected item background |
53
- | `background.disable` | — | #EBEBF2 | Disabled containers |
54
- | `text.default` | `black_17` | #303233 | Body text, headings |
55
- | `text.secondary` | `black_15` | #484848 | Subtitles, supporting text |
56
- | `text.hint` | `black_12` | #727272 | Placeholders, captions |
57
- | `text.disable` | `black_08` | #C6C6C6 | Disabled labels |
58
- | `border.default` | `black_04` | #E8E8E8 | Input borders, dividers |
59
- | `border.disable` | `black_03` | #F0F0F0 | Disabled borders |
60
- | `success.primary` | `green_03` | #34C759 | Success icon/text |
61
- | `success.container` | `green_08` | — | Success banner background |
62
- | `warning.primary` | `orange_03` | #FA541C | Warning icon/text |
63
- | `warning.container` | `orange_08` | — | Warning banner background |
64
- | `error.primary` | `red_03` | #F5222D | Error icon/text |
65
- | `error.container` | `red_08` | — | Error banner background |
66
- | `highlight.primary` | `mint_03` | — | Highlight icon/text |
67
- | `interactive.primary` | `blue_03` | #007AFF | Links, interactive elements |
68
-
69
- ---
70
-
71
- ## Dark Theme Specs
72
-
73
- | Path | Token | Hex | Design Use |
74
- |------|-------|-----|------------|
75
- | `primary` | `pink_04` | — | Primary buttons (slightly lighter for dark bg) |
76
- | `secondary` | `pink_08` | — | Secondary accent |
77
- | `background.default` | — | #121212 | Page background |
78
- | `background.surface` | — | #1E1E1E | Cards, containers |
79
- | `background.pressed` | — | #1A1A1A | Touch feedback |
80
- | `background.selected` | `pink_11` | — | Selected item |
81
- | `background.disable` | — | #303030 | Disabled containers |
82
- | `text.default` | — | #FFFFFF | Primary text |
83
- | `text.secondary` | — | #B0B0B0 | Supporting text |
84
- | `text.hint` | — | #727272 | Placeholder text |
85
- | `text.disable` | — | #505050 | Disabled text |
86
- | `border.default` | — | #2A2A2A | Borders |
87
- | `border.disable` | — | #242424 | Disabled borders |
88
-
89
- Success, warning, error, highlight, interactive tokens remain the same in both themes.
90
-
91
- ---
92
-
93
- ## Usage Guidelines
94
-
95
- ### When to Use Semantic Tokens vs Direct Colors
96
-
97
- | Scenario | Use | Example |
98
- |----------|-----|---------|
99
- | Text that should adapt to theme | `theme.colors.text.default` | Body text |
100
- | Brand-colored CTA | `theme.colors.primary` | Primary button |
101
- | Error state | `theme.colors.error.primary` | Error message |
102
- | Fixed-color element (e.g. logo) | Direct `Colors.*` | `Colors.pink_MoMo_Branding` |
103
-
104
- ### Dark Mode Design Rules
105
-
106
- 1. **Elevation = lighter** — In dark mode, higher elevation surfaces are lighter (not darker)
107
- 2. **Surface hierarchy**: `background.default` (#121212) < `background.surface` (#1E1E1E) < elevated surfaces
108
- 3. **No pure black text on dark surfaces** — Use `text.default` (white) instead
109
- 4. **Maintain contrast** — Test all text/background combinations in both themes
110
-
111
- ---
112
-
113
- ## Do's & Don'ts
114
-
115
- ### Do's
116
- - Use `theme.colors.*` for all colors that should adapt between light/dark
117
- - Test designs in both light and dark themes
118
- - Use `background.surface` for cards/containers (not hardcoded white)
119
- - Use semantic status colors (`error`, `success`, `warning`) for feedback states
120
-
121
- ### Don'ts
122
- - Don't hardcode `#FFFFFF` for surfaces — use `background.surface`
123
- - Don't assume dark mode is just "inverted" — it has its own specific values
124
- - Don't use `background.pressed` as a permanent background — it's for touch feedback only
125
- - Don't use direct `Colors.pink_03` when `theme.colors.primary` would be more appropriate
@@ -1,135 +0,0 @@
1
- # Typography — Design Guideline
2
-
3
- ## Type Scale Overview
4
-
5
- MoMo KitX uses a structured type scale with the naming pattern: `{category}_{size}_{weight}`.
6
-
7
- ---
8
-
9
- ## Full Type Scale
10
-
11
- ### Headline — Page titles, section headers
12
-
13
- | Token | Size | Weight | Line Height | Use for |
14
- |-------|------|--------|-------------|---------|
15
- | `headline_l_bold` | 28sp | Bold | 36 | Page title, hero text |
16
- | `headline_l_semibold` | 28sp | SemiBold | 36 | Page title (lighter) |
17
- | `headline_default_bold` | 24sp | Bold | 32 | Section title |
18
- | `headline_default_semibold` | 24sp | SemiBold | 32 | Section title (lighter) |
19
- | `headline_s_bold` | 20sp | Bold | 28 | Sub-section title |
20
- | `headline_s_semibold` | 20sp | SemiBold | 28 | Sub-section title (lighter) |
21
-
22
- ### Body — Content text, descriptions
23
-
24
- | Token | Size | Weight | Line Height | Use for |
25
- |-------|------|--------|-------------|---------|
26
- | `body_l_semibold` | 16sp | SemiBold | 24 | Emphasized body text |
27
- | `body_l_regular` | 16sp | Regular | 24 | Large body text |
28
- | `body_default_semibold` | 14sp | SemiBold | 20 | Emphasized default text |
29
- | `body_default_medium` | 14sp | Medium | 20 | Medium weight body |
30
- | `body_default_regular` | 14sp | Regular | 20 | Default body text (most common) |
31
- | `body_s_semibold` | 12sp | SemiBold | 16 | Small emphasized text |
32
- | `body_s_regular` | 12sp | Regular | 16 | Small body text |
33
-
34
- ### Action — Buttons, interactive labels
35
-
36
- | Token | Size | Weight | Line Height | Use for |
37
- |-------|------|--------|-------------|---------|
38
- | `action_l_bold` | 18sp | Bold | 24 | Large button label |
39
- | `action_default_bold` | 16sp | Bold | 22 | Default button label |
40
- | `action_s_bold` | 14sp | Bold | 20 | Small button label |
41
-
42
- ### Caption — Supporting text, metadata
43
-
44
- | Token | Size | Weight | Line Height | Use for |
45
- |-------|------|--------|-------------|---------|
46
- | `caption_default_semibold` | 12sp | SemiBold | 16 | Emphasized caption |
47
- | `caption_default_regular` | 12sp | Regular | 16 | Default caption |
48
- | `caption_s_semibold` | 10sp | SemiBold | 14 | Small emphasized caption |
49
- | `caption_s_regular` | 10sp | Regular | 14 | Smallest text |
50
-
51
- ### Label — Form labels, tags
52
-
53
- | Token | Size | Weight | Line Height | Use for |
54
- |-------|------|--------|-------------|---------|
55
- | `label_l_regular` | 16sp | Regular | 22 | Large form label |
56
- | `label_l_bold` | 16sp | Bold | 22 | Emphasized form label |
57
-
58
- ---
59
-
60
- ## Typography Hierarchy Rules
61
-
62
- ### Heading Hierarchy
63
- Use a clear visual hierarchy with no more than 3 heading levels per screen:
64
-
65
- ```
66
- headline_default_bold → Page title (1 per screen)
67
- headline_s_bold → Section title
68
- body_l_semibold → Sub-section title
69
- body_default_regular → Body content
70
- caption_default_regular → Supporting info
71
- ```
72
-
73
- ### Font Families
74
-
75
- | Family | Use for |
76
- |--------|---------|
77
- | `SFProText` | Default system font (all UI text) |
78
- | `AlegreyaSans` | Decorative, special promotions |
79
- | `BarlowCondensed` | Condensed layouts, data-heavy screens |
80
-
81
- ### Font Scaling
82
- - Font sizes automatically scale based on user accessibility settings
83
- - Design at 1x scale, system handles scaling
84
- - Ensure layouts accommodate up to 1.5x text scaling without breaking
85
-
86
- ---
87
-
88
- ## Pairing Rules
89
-
90
- ### Recommended Pairings
91
-
92
- | Context | Title | Body | Caption |
93
- |---------|-------|------|---------|
94
- | Card content | `body_default_semibold` | `body_default_regular` | `caption_default_regular` |
95
- | List item | `body_default_semibold` | `body_s_regular` | `caption_s_regular` |
96
- | Page header | `headline_default_bold` | `body_default_regular` | — |
97
- | Form field | `label_l_regular` | `body_default_regular` | `caption_default_regular` |
98
- | Banner/alert | `body_default_semibold` | `body_s_regular` | — |
99
-
100
- ### Color Pairings with Typography
101
-
102
- | Text Role | Typography | Color Token |
103
- |-----------|-----------|-------------|
104
- | Primary content | `body_default_regular` | `theme.colors.text.default` |
105
- | Secondary info | `body_s_regular` | `theme.colors.text.secondary` |
106
- | Hint/placeholder | `body_default_regular` | `theme.colors.text.hint` |
107
- | Disabled | any | `theme.colors.text.disable` |
108
- | Error message | `caption_default_regular` | `theme.colors.error.primary` |
109
- | Link text | `body_default_semibold` | `theme.colors.interactive.primary` |
110
-
111
- ---
112
-
113
- ## Accessibility
114
-
115
- - **Minimum text size**: `caption_s_regular` (10sp) — use sparingly, only for non-critical metadata
116
- - **Body text minimum**: 14sp (`body_default_regular`) for primary reading content
117
- - **Line height**: Always use the defined line height — do not compress
118
- - **Contrast**: All text must meet WCAG AA (4.5:1 normal, 3:1 large/bold)
119
-
120
- ---
121
-
122
- ## Do's & Don'ts
123
-
124
- ### Do's
125
- - Use `body_default_regular` as the standard body text throughout the app
126
- - Maintain consistent heading hierarchy within each screen
127
- - Use `action_*_bold` tokens for all button labels (maps to button sizes)
128
- - Use SemiBold for emphasis within body text, not color changes
129
-
130
- ### Don'ts
131
- - Don't use more than 3 heading levels per screen
132
- - Don't use `caption_s_*` (10sp) for important information — it's too small
133
- - Don't mix font families on the same screen (except intentional brand moments)
134
- - Don't manually set font sizes — always use typography tokens
135
- - Don't use Bold weight for body text — reserve Bold for action and headline
@@ -1,102 +0,0 @@
1
- ---
2
- name: design-system-kits
3
- description: ALWAYS invoke this skill FIRST for any UI development task in this codebase without exception. This skill MUST be consulted before writing ANY UI code, component, screen, layout, or visual element. Use when building any interface with React
4
- Native, Compose Multiplatform.
5
-
6
- ---
7
-
8
- ## Prereqs
9
- - Read [references/code-convention.md](references/code-convention.md) before generating code
10
- - When generating from a design spec JSON, **always load both**:
11
- 1. [references/design-spec-structure.md](references/design-spec-structure.md) — JSON schema (what each field means)
12
- 2. [references/design-spec-to-code.md](references/design-spec-to-code.md) — spec-to-code mapping (how to translate to RN or Compose)
13
-
14
- ## How to Use
15
-
16
- 1. **Identify platform**: `.tsx`/`.ts` = React Native, `.kt` = Compose
17
- 2. **If input is a design spec JSON** → load `references/design-spec-structure.md` for full schema mapping
18
- 3. **Find component** in catalog tables below
19
- 4. **Load reference file** for exact API
20
- 5. **Generate code** with correct imports and design tokens
21
-
22
- ## References
23
-
24
- ### Design Tokens & Styles
25
- | File | Load when... |
26
- |------|-------------|
27
- | `references/tokens/colors.md` | Color hex values |
28
- | `references/tokens/theme.md` | Light/dark theme |
29
- | `references/tokens/typography.md` | Typography scale |
30
- | `references/tokens/spacing-radius.md` | Spacing/radius values |
31
-
32
- ### Components
33
- | File | Component | RN | Compose |
34
- |------|-----------|:--:|:------:|
35
- | `references/components/button.md` | Button | ✅ | ✅ |
36
- | `references/components/text.md` | Text | ✅ | ✅ |
37
- | `references/components/input.md` | Input | ✅ | ✅ |
38
- | `references/components/input-search.md` | InputSearch | ✅ | ✅ |
39
- | `references/components/input-text-area.md` | InputTextArea | ✅ | ✅ |
40
- | `references/components/input-dropdown.md` | InputDropDown | ✅ | ✅ |
41
- | `references/components/input-phone-number.md` | InputPhoneNumber | ✅ | ✅ |
42
- | `references/components/input-money.md` | InputMoney | ✅ | ✅ |
43
- | `references/components/input-otp.md` | InputOTP | ✅ | ✅ |
44
- | `references/components/checkbox.md` | CheckBox | ✅ | ✅ |
45
- | `references/components/radio.md` | Radio | ✅ | ✅ |
46
- | `references/components/switch.md` | Switch | ✅ | ✅ |
47
- | `references/components/icon.md` | Icon | ✅ | ✅ |
48
- | `references/components/image.md` | Image | ✅ | ✅ |
49
- | `references/components/badge.md` | Badge, BadgeDot | ✅ | ✅ |
50
- | `references/components/tag.md` | Tag | ✅ | ✅ |
51
- | `references/components/chip.md` | Chip | ✅ | ✅ |
52
- | `references/components/popup-notify.md` | PopupNotify | ✅ | ✅ |
53
- | `references/components/popup-promotion.md` | PopupPromotion | ✅ | ✅ |
54
- | `references/components/toast.md` | Toast | ✅ | ✅ |
55
- | `references/components/snackbar.md` | SnackBar | ✅ | ✅ |
56
- | `references/components/skeleton.md` | Skeleton | ✅ | ✅ |
57
- | `references/components/loader.md` | Loader | ✅ | ✅ |
58
- | `references/components/tooltip.md` | Tooltip | ✅ | ✅ |
59
- | `references/components/avatar.md` | Avatar | ✅ | ✅ |
60
- | `references/components/carousel.md` | Carousel | ✅ | ✅ |
61
- | `references/components/tab-view.md` | TabView | ✅ | ✅ |
62
- | `references/components/divider.md` | Divider | ✅ | ✅ |
63
- | `references/components/pagination.md` | Pagination | ✅ | ✅ |
64
- | `references/components/progress-info.md` | ProgressInfo | ✅ | ✅ |
65
- | `references/components/rating.md` | Rating | ✅ | ✅ |
66
- | `references/components/slider.md` | Slider | ✅ | ✅ |
67
- | `references/components/stepper.md` | Stepper | ✅ | ✅ |
68
- | `references/components/steps.md` | Steps | ✅ | ✅ |
69
- | `references/components/collapse.md` | Collapse | ✅ | ✅ |
70
- | `references/components/swipe.md` | Swipe | ✅ | ✅ |
71
- | `references/components/suggest-action.md` | SuggestAction | ✅ | ✅ |
72
- | `references/components/uploader.md` | Uploader | ✅ | ✅ |
73
- | `references/components/date-picker.md` | DatePicker | ✅ | ✅ |
74
- | `references/components/information.md` | Information | ✅ | ✅ |
75
-
76
- ### Design Spec
77
- | File | Load when... |
78
- |------|-------------|
79
- | `references/design-spec-structure.md` | **Understanding the JSON schema** (what each field means) |
80
- | `references/design-spec-to-code.md` | **Mapping spec → code** (how to translate to RN or Compose) |
81
-
82
- ### Screen Layout
83
- | File | Load when... |
84
- |------|-------------|
85
- | `references/screen-layout-rule.md` | Screen layout rules, `useGridLayout`, Section/Card/Item spacing, grid system |
86
-
87
- ### Navigation
88
- | File | Load when... |
89
- |------|------------------------------------------------|
90
- | `references/navigation/setup.md` | App root setup, Container, NavigationContainer |
91
- | `references/navigation/stack.md` | Screen config, header |
92
- | `references/navigation/navigation-options.md` | Header title, background, right buttons, **header spec → code mapping** |
93
- | `references/navigation/navigator.md` | Compose Navigator API |
94
- | `references/navigation/bottom-tab.md` | Bottom tabs |
95
- | `references/navigation/modal.md` | Modal |
96
- | `references/navigation/bottomsheet.md` | Bottom sheet |
97
-
98
- ## Important Rules
99
-
100
- 1. **Always use design tokens** — Never hardcode colors/spacing/fonts
101
- 2. **RN**: Use `Screen > Section|Card > Item` — Section and Card are **siblings** (same level), never nested
102
- 3. **Design spec JSON** — When generating code from a design spec, **always load both** `references/design-spec-structure.md` (schema) and `references/design-spec-to-code.md` (platform mapping). For the `header` field, also load `references/navigation/navigation-options.md`. **Priority: use existing components from the catalog tables above** — only create custom sub-components when no existing component can fulfill the requirement.
@@ -1,118 +0,0 @@
1
- ---
2
- tags: code, convention, formatting, style, lint, developer
3
- related:
4
- ---
5
-
6
- # Code Convention
7
-
8
- Apply this convention to every AI-generated code output.
9
-
10
- ## Scope and Consistency
11
-
12
- 1. Use this document as the single source of truth for code-related skills.
13
- 2. Any copied code-convention reference in other skills must be identical to this file.
14
- 3. Apply header and marker requirements only to newly generated files or newly generated code blocks.
15
- 4. Do not add markers/header to unchanged existing code.
16
-
17
- ## 0) File Size and Line Width
18
-
19
- 1. Keep each source file under about 500 lines.
20
- 2. Enforce max line length (column width) of 120.
21
- 3. If a file would exceed 500 lines, split by feature/module while preserving behavior.
22
-
23
- ## 1) Required File Header
24
-
25
- Add a file header at the top of each newly generated code file with:
26
-
27
- 1. `File`
28
- 2. `Created At` (ISO-like timestamp with timezone)
29
- 3. `Created By` (`AI`)
30
- 4. `AI Agent`
31
- 5. `Model`
32
-
33
- Template:
34
-
35
- ```txt
36
- <COMMENT_OPEN>
37
- File: <relative-or-file-name>
38
- Created At: <YYYY-MM-DD HH:mm:ss Z>
39
- Created By: AI
40
- AI Agent: <agent-name>
41
- Model: <model-id>
42
- <COMMENT_CLOSE>
43
- ```
44
-
45
- Language examples:
46
-
47
- ```js
48
- /*
49
- File: src/example.js
50
- Created At: 2026-03-10 12:30:00 +07:00
51
- Created By: AI
52
- AI Agent: Codex
53
- Model: gpt-5
54
- */
55
- ```
56
-
57
- ```py
58
- # File: src/example.py
59
- # Created At: 2026-03-10 12:30:00 +07:00
60
- # Created By: AI
61
- # AI Agent: Codex
62
- # Model: gpt-5
63
- ```
64
-
65
- ## 2) Required AI Block Markers
66
-
67
- Wrap every newly generated AI code block:
68
-
69
- - Start marker: `AI-GENERATED START`
70
- - End marker: `AI-GENERATED END`
71
- - Include short purpose text.
72
-
73
- JavaScript / TypeScript:
74
-
75
- ```js
76
- // AI-GENERATED START: build payment retry helper
77
- function retryPayment() {
78
- // ...
79
- }
80
- // AI-GENERATED END: build payment retry helper
81
- ```
82
-
83
- Python:
84
-
85
- ```py
86
- # AI-GENERATED START: parse webhook payload
87
- def parse_webhook(payload):
88
- return payload
89
- # AI-GENERATED END: parse webhook payload
90
- ```
91
-
92
- HTML / XML:
93
-
94
- ```html
95
- <!-- AI-GENERATED START: login form -->
96
- <form></form>
97
- <!-- AI-GENERATED END: login form -->
98
- ```
99
-
100
- CSS:
101
-
102
- ```css
103
- /* AI-GENERATED START: card layout */
104
- .card { display: grid; }
105
- /* AI-GENERATED END: card layout */
106
- ```
107
-
108
- ## 3) Enforcement Checklist
109
-
110
- Before returning output, verify:
111
-
112
- 1. File header exists at top of each newly generated file.
113
- 2. Header includes filename, timestamp, AI creator, agent, and model.
114
- 3. Every newly generated code block has start and end markers.
115
- 4. Marker comment style matches target language.
116
- 5. Unchanged existing code was not backfilled with new markers/header.
117
- 6. New or modified files stay within ~500 lines.
118
- 7. New or modified lines do not exceed 120 columns unless unavoidable.
@@ -1,45 +0,0 @@
1
- # Avatar
2
-
3
- ## React Native
4
-
5
- ```tsx
6
- import { Avatar } from '@momo-kits/avatar';
7
-
8
- <Avatar
9
- size={48} // 24|32|40|48|56|72 (default: 32)
10
- image="https://..." // image URL; falls back to initials or icon
11
- name="John Doe" // shows initials when no image
12
- rounded={true} // circular shape; default: true
13
- showIconMomo={false} // shows MoMo logo badge (top-right)
14
- showIconSupport={false} // shows support icon badge (bottom-right)
15
- iconSupport="https://..." // custom support icon URL; defaults to built-in
16
- accessibilityLabel="Avatar of John" // for automated testing
17
- />
18
- ```
19
-
20
- ## Compose
21
-
22
- ```kotlin
23
- import vn.momo.kits.components.Avatar
24
- import vn.momo.kits.components.AvatarSize
25
-
26
- Avatar(
27
- modifier = Modifier,
28
- size = AvatarSize.SIZE_48, // SIZE_24 | SIZE_32 | SIZE_40 | SIZE_48 | SIZE_56 | SIZE_72
29
- rounded = true,
30
- name = "John Doe", // initials fallback
31
- image = "https://...", // image URL fallback
32
- showIconMomo = false,
33
- showIconSupport = false,
34
- accessibilityLabel = "Avatar of John",
35
- )
36
- ```
37
-
38
- **Fallback priority:** `image` → `name` (initials) → default person icon. Badge icons only shown when `rounded=true`.
39
-
40
- ## Key Differences
41
-
42
- | Feature | React Native | Compose |
43
- |---------|-------------|---------|
44
- | Size | `number` (px) | `AvatarSize` enum |
45
- | Badge icons | Always shown | Only when `rounded=true` |