@momo-kits/native-kits 0.157.5-debug → 0.158.1-beta.1-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/.claude/settings.local.json +11 -0
  2. package/.claude/skills/design-system/SKILL.md +88 -0
  3. package/.claude/skills/design-system/references/components/avatar.md +134 -0
  4. package/.claude/skills/design-system/references/components/badge.md +127 -0
  5. package/.claude/skills/design-system/references/components/bottom-tab.md +177 -0
  6. package/.claude/skills/design-system/references/components/bottomsheet.md +170 -0
  7. package/.claude/skills/design-system/references/components/button.md +206 -0
  8. package/.claude/skills/design-system/references/components/carousel.md +117 -0
  9. package/.claude/skills/design-system/references/components/checkbox.md +98 -0
  10. package/.claude/skills/design-system/references/components/chip.md +146 -0
  11. package/.claude/skills/design-system/references/components/collapse.md +120 -0
  12. package/.claude/skills/design-system/references/components/date-picker.md +119 -0
  13. package/.claude/skills/design-system/references/components/divider.md +84 -0
  14. package/.claude/skills/design-system/references/components/icon.md +130 -0
  15. package/.claude/skills/design-system/references/components/image.md +81 -0
  16. package/.claude/skills/design-system/references/components/information.md +107 -0
  17. package/.claude/skills/design-system/references/components/input-dropdown.md +138 -0
  18. package/.claude/skills/design-system/references/components/input-money.md +157 -0
  19. package/.claude/skills/design-system/references/components/input-otp.md +132 -0
  20. package/.claude/skills/design-system/references/components/input-phone-number.md +140 -0
  21. package/.claude/skills/design-system/references/components/input-search.md +124 -0
  22. package/.claude/skills/design-system/references/components/input-text-area.md +133 -0
  23. package/.claude/skills/design-system/references/components/input.md +152 -0
  24. package/.claude/skills/design-system/references/components/loader.md +87 -0
  25. package/.claude/skills/design-system/references/components/pagination.md +105 -0
  26. package/.claude/skills/design-system/references/components/popup-notify.md +128 -0
  27. package/.claude/skills/design-system/references/components/progress-info.md +114 -0
  28. package/.claude/skills/design-system/references/components/radio.md +86 -0
  29. package/.claude/skills/design-system/references/components/rating.md +126 -0
  30. package/.claude/skills/design-system/references/components/skeleton.md +120 -0
  31. package/.claude/skills/design-system/references/components/slider.md +141 -0
  32. package/.claude/skills/design-system/references/components/snackbar.md +97 -0
  33. package/.claude/skills/design-system/references/components/stepper.md +100 -0
  34. package/.claude/skills/design-system/references/components/steps.md +91 -0
  35. package/.claude/skills/design-system/references/components/suggest-action.md +95 -0
  36. package/.claude/skills/design-system/references/components/swipe.md +121 -0
  37. package/.claude/skills/design-system/references/components/switch.md +98 -0
  38. package/.claude/skills/design-system/references/components/tab-view.md +120 -0
  39. package/.claude/skills/design-system/references/components/tag.md +118 -0
  40. package/.claude/skills/design-system/references/components/text.md +151 -0
  41. package/.claude/skills/design-system/references/components/toast.md +99 -0
  42. package/.claude/skills/design-system/references/components/tooltip.md +138 -0
  43. package/.claude/skills/design-system/references/components/top-nav-miniapp.md +94 -0
  44. package/.claude/skills/design-system/references/components/top-nav.md +226 -0
  45. package/.claude/skills/design-system/references/components/uploader.md +115 -0
  46. package/.claude/skills/design-system/references/navigation/bottom-tab.md +131 -0
  47. package/.claude/skills/design-system/references/navigation/bottomsheet.md +161 -0
  48. package/.claude/skills/design-system/references/navigation/modal.md +133 -0
  49. package/.claude/skills/design-system/references/navigation/navigation-options.md +225 -0
  50. package/.claude/skills/design-system/references/navigation/navigator.md +111 -0
  51. package/.claude/skills/design-system/references/navigation/setup.md +134 -0
  52. package/.claude/skills/design-system/references/navigation/stack.md +128 -0
  53. package/.claude/skills/design-system/references/spec-convention.md +80 -0
  54. package/.claude/skills/design-system/references/tokens/colors.md +131 -0
  55. package/.claude/skills/design-system/references/tokens/spacing-radius.md +144 -0
  56. package/.claude/skills/design-system/references/tokens/theme.md +125 -0
  57. package/.claude/skills/design-system/references/tokens/typography.md +135 -0
  58. package/.claude/skills/design-system-kits/SKILL.md +102 -0
  59. package/.claude/skills/design-system-kits/references/code-convention.md +118 -0
  60. package/.claude/skills/design-system-kits/references/components/avatar.md +45 -0
  61. package/.claude/skills/design-system-kits/references/components/badge.md +27 -0
  62. package/.claude/skills/design-system-kits/references/components/button.md +65 -0
  63. package/.claude/skills/design-system-kits/references/components/carousel.md +51 -0
  64. package/.claude/skills/design-system-kits/references/components/checkbox.md +39 -0
  65. package/.claude/skills/design-system-kits/references/components/chip.md +54 -0
  66. package/.claude/skills/design-system-kits/references/components/collapse.md +63 -0
  67. package/.claude/skills/design-system-kits/references/components/date-picker.md +36 -0
  68. package/.claude/skills/design-system-kits/references/components/divider.md +21 -0
  69. package/.claude/skills/design-system-kits/references/components/icon.md +382 -0
  70. package/.claude/skills/design-system-kits/references/components/image.md +62 -0
  71. package/.claude/skills/design-system-kits/references/components/information.md +61 -0
  72. package/.claude/skills/design-system-kits/references/components/input-dropdown.md +92 -0
  73. package/.claude/skills/design-system-kits/references/components/input-money.md +128 -0
  74. package/.claude/skills/design-system-kits/references/components/input-otp.md +85 -0
  75. package/.claude/skills/design-system-kits/references/components/input-phone-number.md +96 -0
  76. package/.claude/skills/design-system-kits/references/components/input-search.md +127 -0
  77. package/.claude/skills/design-system-kits/references/components/input-text-area.md +100 -0
  78. package/.claude/skills/design-system-kits/references/components/input.md +126 -0
  79. package/.claude/skills/design-system-kits/references/components/loader.md +41 -0
  80. package/.claude/skills/design-system-kits/references/components/pagination.md +47 -0
  81. package/.claude/skills/design-system-kits/references/components/popup-notify.md +69 -0
  82. package/.claude/skills/design-system-kits/references/components/popup-promotion.md +35 -0
  83. package/.claude/skills/design-system-kits/references/components/progress-info.md +55 -0
  84. package/.claude/skills/design-system-kits/references/components/radio.md +42 -0
  85. package/.claude/skills/design-system-kits/references/components/rating.md +36 -0
  86. package/.claude/skills/design-system-kits/references/components/skeleton.md +25 -0
  87. package/.claude/skills/design-system-kits/references/components/slider.md +53 -0
  88. package/.claude/skills/design-system-kits/references/components/snackbar.md +52 -0
  89. package/.claude/skills/design-system-kits/references/components/stepper.md +46 -0
  90. package/.claude/skills/design-system-kits/references/components/steps.md +57 -0
  91. package/.claude/skills/design-system-kits/references/components/suggest-action.md +44 -0
  92. package/.claude/skills/design-system-kits/references/components/swipe.md +44 -0
  93. package/.claude/skills/design-system-kits/references/components/switch.md +43 -0
  94. package/.claude/skills/design-system-kits/references/components/tab-view.md +56 -0
  95. package/.claude/skills/design-system-kits/references/components/tag.md +50 -0
  96. package/.claude/skills/design-system-kits/references/components/text.md +56 -0
  97. package/.claude/skills/design-system-kits/references/components/toast.md +51 -0
  98. package/.claude/skills/design-system-kits/references/components/tooltip.md +95 -0
  99. package/.claude/skills/design-system-kits/references/components/uploader.md +48 -0
  100. package/.claude/skills/design-system-kits/references/design-spec-structure.md +356 -0
  101. package/.claude/skills/design-system-kits/references/design-spec-to-code.md +596 -0
  102. package/.claude/skills/design-system-kits/references/navigation/bottom-tab.md +155 -0
  103. package/.claude/skills/design-system-kits/references/navigation/bottomsheet.md +94 -0
  104. package/.claude/skills/design-system-kits/references/navigation/modal.md +125 -0
  105. package/.claude/skills/design-system-kits/references/navigation/navigation-options.md +430 -0
  106. package/.claude/skills/design-system-kits/references/navigation/navigator.md +177 -0
  107. package/.claude/skills/design-system-kits/references/navigation/setup.md +94 -0
  108. package/.claude/skills/design-system-kits/references/navigation/stack.md +152 -0
  109. package/.claude/skills/design-system-kits/references/screen-layout-rule.md +125 -0
  110. package/.claude/skills/design-system-kits/references/tokens/colors.md +183 -0
  111. package/.claude/skills/design-system-kits/references/tokens/spacing-radius.md +45 -0
  112. package/.claude/skills/design-system-kits/references/tokens/theme.md +97 -0
  113. package/.claude/skills/design-system-kits/references/tokens/typography.md +105 -0
  114. package/.claude/skills/vibe-design/SKILL.md +306 -0
  115. package/compose/build.gradle.kts +1 -1
  116. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +7 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +123 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +224 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +2 -2
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +338 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +348 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +256 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +494 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +131 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +215 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +531 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +192 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +3 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +5 -2
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +2 -11
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +5 -1
  135. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +12 -0
  136. package/gradle.properties +1 -1
  137. package/ios/Popup/PopupPromotion.swift +2 -2
  138. package/local.properties +8 -0
  139. package/package.json +1 -1
@@ -0,0 +1,105 @@
1
+ # Typography Reference
2
+
3
+ ## React Native
4
+
5
+ ```tsx
6
+ import { Text } from '@momo-kits/foundation';
7
+
8
+ <Text typography="body_default_regular">Hello</Text>
9
+ ```
10
+
11
+ Pattern: `{category}_{size}_{weight}`
12
+
13
+ ### Full Scale (verified against source)
14
+
15
+ | Style | Size | Weight |
16
+ |-------|------|--------|
17
+ | `headline_l_bold` | 28px / 40px | 700 |
18
+ | `headline_default_bold` | 24px / 34px | 700 |
19
+ | `header_m_bold` | 18px / 26px | 700 |
20
+ | `header_default_bold` | 16px / 22px | 700 |
21
+ | `header_s_semibold` | 14px / 20px | 600 |
22
+ | `header_xs_semibold` | 12px / 18px | 600 |
23
+ | `body_default_regular` | 14px / 20px | 400 |
24
+ | `body_default_regularstrikethrought` | 14px / 20px | 400 + line-through |
25
+ | `description_default_regular` | 12px / 18px | 400 |
26
+ | `description_default_regularstrikethrought` | 12px / 18px | 400 + line-through |
27
+ | `description_xs_regular` | 10px / 14px | 400 |
28
+ | `description_xs_regularstrikethrought` | 10px / 14px | 400 + line-through |
29
+ | `label_default_medium` | 14px / 20px | 500 |
30
+ | `label_s_medium` | 12px / 18px | 500 |
31
+ | `label_xs_medium` | 10px / 14px | 500 |
32
+ | `action_default_bold` | 16px / 22px | 700 |
33
+ | `action_s_bold` | 14px / 20px | 700 |
34
+ | `action_xs_bold` | 12px / 18px | 700 |
35
+ | `action_xxs_bold` | 10px / 14px | 700 |
36
+
37
+ > **Note:** Do NOT use non-existent styles like `headline_l_semibold`, `body_l_regular`, `caption_*`, `label_l_*`, `body_default_regularStrikethrough` (wrong casing) — they are not defined.
38
+
39
+ ### Text Props
40
+
41
+ ```tsx
42
+ <Text
43
+ typography="body_default_regular" // REQUIRED
44
+ color={Colors.black_17} // text color
45
+ fontFamily="SFProText" // 'SFProText' | 'AlegreyaSans' | 'BarlowCondensed' | 'MoMoSignature' | 'MoMoTrustDisplay'
46
+ numberOfLines={2} // line clamp
47
+ style={textStyle} // standard RN text style
48
+ />
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Compose
54
+
55
+ ```kotlin
56
+ import vn.momo.kits.components.Text
57
+ import vn.momo.kits.const.Typography
58
+
59
+ Text(text = "Hello", style = Typography.bodyDefaultRegular)
60
+ ```
61
+
62
+ ### Full Scale
63
+
64
+ | Style | Size | Weight |
65
+ |-------|------|--------|
66
+ | `headlineDefaultBold` | 24sp | Bold |
67
+ | `headerMBold` | 18sp | Bold |
68
+ | `headerDefaultBold` | 16sp | Bold |
69
+ | `headerSSemibold` | 14sp | SemiBold |
70
+ | `headerXsSemibold` | 12sp | SemiBold |
71
+ | `bodyDefaultRegular` | 14sp | Normal |
72
+ | `bodyDefaultRegularStrikethrough` | 14sp | Normal + line-through |
73
+ | `descriptionDefaultRegular` | 12sp | Normal |
74
+ | `descriptionDefaultRegularStrikethrough` | 12sp | Normal + line-through |
75
+ | `descriptionXsRegular` | 10sp | Normal |
76
+ | `descriptionXsRegularStrikethrough` | 10sp | Normal + line-through |
77
+ | `labelDefaultMedium` | 14sp | Medium |
78
+ | `labelSMedium` | 12sp | Medium |
79
+ | `labelXsMedium` | 10sp | Medium |
80
+ | `actionDefaultBold` | 16sp | Bold |
81
+ | `actionSBold` | 14sp | Bold |
82
+ | `actionXsBold` | 12sp | Bold |
83
+ | `actionXxsBold` | 10sp | Bold |
84
+
85
+ ### Text Props
86
+
87
+ ```kotlin
88
+ Text(
89
+ text = "Hello", // String or AnnotatedString
90
+ style = Typography.bodyDefaultRegular, // TextStyle (default)
91
+ color = theme.colors.text.default, // Color? (null = theme default)
92
+ textAlign = TextAlign.Start,
93
+ maxLines = Int.MAX_VALUE,
94
+ overflow = TextOverflow.Clip,
95
+ textDecoration = null, // TextDecoration?
96
+ fontFamily = null, // "SFProText" | "MoMoSignature" | "MoMoTrustDisplay"
97
+ modifier = Modifier,
98
+ minLines = 1,
99
+ letterSpacing = TextUnit.Unspecified,
100
+ softWrap = true,
101
+ accessibilityId = null, // String? for automation
102
+ )
103
+ ```
104
+
105
+ Font scaling is automatic via `scaleSize()`.
@@ -0,0 +1,306 @@
1
+ ---
2
+ name: vibe-design
3
+ description: >
4
+ Product workflow orchestrator that manages the full development pipeline from idea to delivery.
5
+ Takes a Product Owner's prompt and runs it through 4 sequential phases — PO (product brief),
6
+ Design (design specs via design-system skill), Development (code via design-system-kits skill),
7
+ and QC (quality assurance) — with mandatory quality gates between each phase.
8
+ ALWAYS use this skill when: the user wants to build a new feature end-to-end, describes a product
9
+ idea or user story, asks to "design and build" something, wants to go from concept to code,
10
+ mentions workflow or pipeline for product development, or asks to create a feature with
11
+ design-to-code handoff. This is the starting point for any product work — it coordinates
12
+ the design-system and design-system-kits skills automatically so the user doesn't have to
13
+ invoke them manually.
14
+ ---
15
+
16
+ # Vibe Design — Product Workflow Orchestrator
17
+
18
+ You are orchestrating a product development pipeline. Your job is to guide work through 4 phases, each with a quality gate that requires user approval before moving forward. This ensures nothing slips through handoffs — catching issues early when they're cheap to fix.
19
+
20
+ ## The Pipeline
21
+
22
+ ```
23
+ [Phase 1: PO] --> Gate 1 --> [Phase 2: Design] --> Gate 2 --> [Phase 3: Dev] --> Gate 3 --> [Phase 4: QC]
24
+ Product Brief Confirm Design Specs Confirm Implementation Confirm Test & Verify
25
+ ```
26
+
27
+ ## Sub-Skill Integration
28
+
29
+ This orchestrator delegates to two sub-skills at the right moment. Do NOT load them upfront — load on demand when entering the relevant phase:
30
+
31
+ | Phase | Sub-Skill | Path | When to load |
32
+ |-------|-----------|------|-------------|
33
+ | Phase 2: Design | **design-system** | `.claude/skills/design-system/SKILL.md` | After Gate 1 is approved |
34
+ | Phase 3: Dev | **design-system-kits** | `.claude/skills/design-system-kits/SKILL.md` | After Gate 2 is approved |
35
+
36
+ **How to load a sub-skill:** Read the sub-skill's `SKILL.md` file, then follow its instructions (including reading its prereqs and reference files as needed). The sub-skill tells you which reference files to load for tokens, components, and navigation — follow its on-demand loading tables.
37
+
38
+ ---
39
+
40
+ ## How to Start
41
+
42
+ When the user gives you a product idea, feature request, or prompt:
43
+
44
+ 1. Announce that you're starting the **vibe-design** workflow
45
+ 2. Create a workflow tracker at `vibe-design-workflow.md` in the working directory
46
+ 3. Begin Phase 1 (PO)
47
+
48
+ ---
49
+
50
+ ## Phase 1: Product Owner — Product Brief
51
+
52
+ Take the user's idea and structure it into a clear product brief.
53
+
54
+ ### Output: `docs/product-brief.md`
55
+
56
+ ```markdown
57
+ # Product Brief: [Feature Name]
58
+
59
+ ## Overview
60
+ What is this feature and why does it matter?
61
+
62
+ ## Problem Statement
63
+ What user pain point or business need does this solve?
64
+
65
+ ## Target Users
66
+ Who will use this? Be specific about user segments.
67
+
68
+ ## User Stories
69
+ - As a [user type], I want to [action] so that [benefit]
70
+ - (3-5 stories covering core scenarios)
71
+
72
+ ## Acceptance Criteria
73
+ Measurable, testable conditions that define "done":
74
+ - [ ] Criterion 1 (specific & measurable — not "loads fast" but "loads within 2s")
75
+ - [ ] Criterion 2
76
+
77
+ ## Scope
78
+ ### In Scope
79
+ - Feature A
80
+ - Feature B
81
+
82
+ ### Out of Scope
83
+ - Things explicitly NOT included
84
+
85
+ ## Platform
86
+ - [ ] React Native
87
+ - [ ] Compose Multiplatform
88
+ - [ ] Both
89
+
90
+ ## Priority
91
+ Must-have / Should-have / Nice-to-have for each feature
92
+ ```
93
+
94
+ ### Quality Gate 1: Brief Review
95
+
96
+ Present the brief and ask the user to review:
97
+
98
+ ```
99
+ == QUALITY GATE 1: Product Brief Review ==
100
+
101
+ Please review the product brief above:
102
+ 1. Is the problem statement clear?
103
+ 2. Do user stories cover the key scenarios?
104
+ 3. Are acceptance criteria specific and measurable?
105
+ 4. Is the scope well-defined?
106
+ 5. Is the platform choice correct?
107
+
108
+ Reply "approved" to move to Design phase, or give feedback to revise.
109
+ ```
110
+
111
+ **Do NOT proceed until the user explicitly says "approved" (or equivalent).** If they give feedback, revise and present the gate again.
112
+
113
+ ---
114
+
115
+ ## Phase 2: Design — Design Specifications
116
+
117
+ **On entering this phase:** Read `.claude/skills/design-system/SKILL.md` and follow its instructions. This sub-skill tells you how to:
118
+ - Load the spec convention (`references/spec-convention.md`)
119
+ - Look up KitX components from its reference tables
120
+ - Load the right token files (colors, typography, spacing, theme)
121
+ - Generate proper design specs
122
+
123
+ ### Process
124
+
125
+ 1. Read the approved product brief
126
+ 2. Read and follow the **design-system** skill
127
+ 3. For each screen/component from the user stories:
128
+ - Select KitX components (use the design-system component reference table)
129
+ - Load the relevant component reference files for visual specs
130
+ - Load token files as needed for colors, typography, spacing
131
+ - Document all states (default, pressed, disabled, error, loading, focus)
132
+ - Include accessibility specs (WCAG AA contrast, 44pt touch targets, screen reader)
133
+ - Note platform differences if targeting both RN and Compose
134
+
135
+ ### Output: `docs/design-specs/[screen-name].md`
136
+
137
+ For each screen or component, create a spec file following the design-system skill's conventions.
138
+
139
+ ### Quality Gate 2: Design Review
140
+
141
+ ```
142
+ == QUALITY GATE 2: Design Spec Review ==
143
+
144
+ Please review the design specifications:
145
+ 1. Do designs address all user stories from the brief?
146
+ 2. Are the right KitX components selected?
147
+ 3. Are all interaction states documented?
148
+ 4. Are accessibility specs included?
149
+ 5. Are design tokens used correctly (no hardcoded values)?
150
+ 6. Are platform differences noted (if multi-platform)?
151
+
152
+ Reply "approved" to move to Development phase, or give feedback to revise.
153
+ ```
154
+
155
+ **Do NOT proceed until the user explicitly approves.**
156
+
157
+ ---
158
+
159
+ ## Phase 3: Development — Code Implementation
160
+
161
+ **On entering this phase:** Read `.claude/skills/design-system-kits/SKILL.md` and follow its instructions. This sub-skill tells you how to:
162
+ - Load the code convention (`references/code-convention.md`)
163
+ - Look up KitX component APIs from its reference tables
164
+ - Load token files for correct imports
165
+ - Generate code with proper structure (Screen > Section > Card > Item for RN, NavigationContainer for Compose)
166
+
167
+ ### Process
168
+
169
+ 1. Read the approved design specs
170
+ 2. Read the product brief for acceptance criteria
171
+ 3. Read and follow the **design-system-kits** skill
172
+ 4. For each screen/component:
173
+ - Load the relevant component reference files for exact API and imports
174
+ - Match the design spec exactly — same components, same tokens, same states
175
+ - Follow code conventions (file header, AI-GENERATED markers, max 500 lines)
176
+ - Use theme access via `ApplicationContext` (RN) or `AppTheme.current` (Compose)
177
+
178
+ ### Output
179
+
180
+ Generate code files (`.tsx`/`.ts` for React Native, `.kt` for Compose) in the project structure.
181
+
182
+ ### Quality Gate 3: Code Review
183
+
184
+ ```
185
+ == QUALITY GATE 3: Code Review ==
186
+
187
+ Please review the implementation:
188
+ 1. Does the code match the approved design specs?
189
+ 2. Are all KitX components used correctly?
190
+ 3. Are design tokens applied (no hardcoded colors/spacing/fonts)?
191
+ 4. Are all interaction states handled?
192
+ 5. Does the code follow conventions?
193
+ 6. Are accessibility attributes included?
194
+
195
+ Reply "approved" to move to QC phase, or give feedback to revise.
196
+ ```
197
+
198
+ **Do NOT proceed until the user explicitly approves.**
199
+
200
+ ---
201
+
202
+ ## Phase 4: QC — Quality Assurance
203
+
204
+ Cross-reference the brief, design specs, and code to produce a verification report.
205
+
206
+ ### Output: `docs/qc-report.md`
207
+
208
+ ```markdown
209
+ # QC Report: [Feature Name]
210
+
211
+ ## Acceptance Criteria Verification
212
+ | # | Criterion | Status | Evidence |
213
+ |---|----------|--------|----------|
214
+ | 1 | [from brief] | Pass/Fail | How it's met in code |
215
+
216
+ ## Design Compliance
217
+ | Screen/Component | Matches Design? | Issues |
218
+ |-----------------|----------------|--------|
219
+ | [name] | Yes/No | [details] |
220
+
221
+ ## Test Cases
222
+ ### Functional Tests
223
+ - [ ] Test case 1: description — Steps / Expected result
224
+ - [ ] Test case 2: ...
225
+
226
+ ### State Tests
227
+ - [ ] Default state renders correctly
228
+ - [ ] Pressed state shows feedback
229
+ - [ ] Disabled state prevents interaction
230
+ - [ ] Error state displays message
231
+ - [ ] Loading state shows indicator
232
+
233
+ ### Accessibility Tests
234
+ - [ ] Contrast ratios meet WCAG AA (4.5:1)
235
+ - [ ] Touch targets minimum 44x44pt
236
+ - [ ] Screen reader labels are meaningful
237
+
238
+ ### Platform Tests (if multi-platform)
239
+ - [ ] React Native renders correctly
240
+ - [ ] Compose renders correctly
241
+ - [ ] Visual parity between platforms
242
+
243
+ ## Summary
244
+ Overall assessment and any blockers.
245
+ ```
246
+
247
+ ### Final Gate: QC Sign-off
248
+
249
+ ```
250
+ == QUALITY GATE 4: QC Sign-off ==
251
+
252
+ Please review the QC report:
253
+ 1. Are all acceptance criteria verified?
254
+ 2. Does implementation match the design?
255
+ 3. Are test cases comprehensive?
256
+ 4. Any blockers?
257
+
258
+ Reply "approved" to complete the workflow, or specify what needs fixing.
259
+ ```
260
+
261
+ If the user finds issues, determine which phase needs rework and loop back to that phase — going through its gate again.
262
+
263
+ ---
264
+
265
+ ## Workflow Tracker
266
+
267
+ Maintain `vibe-design-workflow.md` throughout the process:
268
+
269
+ ```markdown
270
+ # Vibe Design Workflow: [Feature Name]
271
+ ## Current Status: [Phase 1 / Gate 1 / Phase 2 / Gate 2 / Phase 3 / Gate 3 / Phase 4 / Complete]
272
+
273
+ | Phase | Status | Approved |
274
+ |-------|--------|----------|
275
+ | 1. PO Brief | -- | -- |
276
+ | 2. Design | -- | -- |
277
+ | 3. Development | -- | -- |
278
+ | 4. QC | -- | -- |
279
+
280
+ ## Artifacts
281
+ - Product Brief: `docs/product-brief.md`
282
+ - Design Specs: `docs/design-specs/`
283
+ - Code: [file paths]
284
+ - QC Report: `docs/qc-report.md`
285
+ ```
286
+
287
+ Update this file as each phase completes and each gate is passed.
288
+
289
+ ---
290
+
291
+ ## Handling Rework
292
+
293
+ When the user rejects at a quality gate or QC finds issues:
294
+
295
+ 1. Identify which phase needs the fix (a code issue might trace back to a design gap)
296
+ 2. Update the workflow tracker
297
+ 3. Make the fix in the appropriate phase
298
+ 4. Re-run the quality gate for that phase
299
+ 5. Continue forward — never skip gates even on rework
300
+
301
+ ## Tips
302
+
303
+ - **Be the glue between phases.** When moving from design to dev, explicitly map how each design decision becomes code.
304
+ - **Catch contradictions early.** If the brief says "simple one-tap action" but design has a 5-step flow, flag it at the design gate.
305
+ - **Keep scope tight.** If the user adds features mid-flow, note what's in scope vs. what should be a separate workflow.
306
+ - **Show progress.** After each gate approval, recap what's done and what's next.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.157.5-debug"
43
+ version = "0.158.1-beta.1-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -14,6 +14,8 @@ import androidx.compose.ui.graphics.Color
14
14
  import androidx.compose.ui.graphics.NativePaint
15
15
  import androidx.compose.ui.graphics.toArgb
16
16
  import androidx.compose.ui.platform.LocalConfiguration
17
+ import androidx.compose.ui.semantics.contentDescription
18
+ import androidx.compose.ui.semantics.semantics
17
19
  import androidx.compose.ui.unit.Dp
18
20
  import androidx.compose.ui.unit.dp
19
21
  import com.airbnb.lottie.LottieProperty
@@ -108,3 +110,8 @@ actual fun NativePaint.setColor(color: Color){
108
110
  this.color = color.toArgb()
109
111
  }
110
112
 
113
+ actual fun Modifier.semantics(accessibilityId: String): Modifier {
114
+ return semantics {
115
+ contentDescription = accessibilityId
116
+ }
117
+ }
@@ -0,0 +1,157 @@
1
+ package vn.momo.kits.components
2
+
3
+ import androidx.compose.foundation.background
4
+ import androidx.compose.foundation.border
5
+ import androidx.compose.foundation.layout.Box
6
+ import androidx.compose.foundation.layout.fillMaxSize
7
+ import androidx.compose.foundation.layout.offset
8
+ import androidx.compose.foundation.layout.size
9
+ import androidx.compose.foundation.shape.RoundedCornerShape
10
+ import androidx.compose.runtime.Composable
11
+ import androidx.compose.runtime.remember
12
+ import androidx.compose.ui.Alignment
13
+ import androidx.compose.ui.Modifier
14
+ import androidx.compose.ui.draw.clip
15
+ import androidx.compose.ui.semantics.contentDescription
16
+ import androidx.compose.ui.semantics.semantics
17
+ import androidx.compose.ui.unit.dp
18
+ import androidx.compose.ui.zIndex
19
+ import vn.momo.kits.application.IsShowBaseLineDebug
20
+ import vn.momo.kits.const.AppTheme
21
+ import vn.momo.kits.const.Colors
22
+ import vn.momo.kits.const.Spacing
23
+ import vn.momo.kits.const.Typography
24
+ import vn.momo.kits.modifier.conditional
25
+ import vn.momo.kits.modifier.setAutomationId
26
+
27
+ private const val LOGO_MOMO_URL =
28
+ "https://static.momocdn.net/app/img/kits/logo_momo_circle.png"
29
+ private const val ICON_SUPPORT_DEFAULT_URL =
30
+ "https://static.momocdn.net/app/img/kits/_indicator.png"
31
+
32
+ enum class AvatarSize(val sizeDp: Int, val iconSizeDp: Int) {
33
+ SIZE_24(24, 16),
34
+ SIZE_32(32, 16),
35
+ SIZE_40(40, 24),
36
+ SIZE_48(48, 32),
37
+ SIZE_56(56, 32),
38
+ SIZE_72(72, 40),
39
+ }
40
+
41
+ @Composable
42
+ fun Avatar(
43
+ modifier: Modifier = Modifier,
44
+ size: AvatarSize = AvatarSize.SIZE_32,
45
+ rounded: Boolean = true,
46
+ name: String? = null,
47
+ image: String? = null,
48
+ showIconMomo: Boolean = false,
49
+ showIconSupport: Boolean = false,
50
+ iconSupport: String = ICON_SUPPORT_DEFAULT_URL,
51
+ accessibilityLabel: String? = null,
52
+ ) {
53
+ val theme = AppTheme.current
54
+
55
+ val cornerRadius = remember(rounded, size) {
56
+ if (rounded) (size.sizeDp / 2).dp else Spacing.XS
57
+ }
58
+ val shape = remember(cornerRadius) { RoundedCornerShape(cornerRadius) }
59
+
60
+ val badgeSizeDp = remember(size) { (size.iconSizeDp / 2).dp }
61
+ val badgeShape = remember(size) {
62
+ RoundedCornerShape((size.iconSizeDp / 4).dp)
63
+ }
64
+
65
+ val shouldShowIconTop = showIconMomo && rounded
66
+ val shouldShowIconBottom = showIconSupport && rounded
67
+
68
+ val initials = remember(name) {
69
+ name?.let { avatarInitials(it) }
70
+ }
71
+
72
+ val automationId = remember(accessibilityLabel, name) {
73
+ accessibilityLabel ?: "Avatar${if (name != null) "/$name" else ""}"
74
+ }
75
+
76
+ Box(
77
+ modifier = modifier
78
+ .size(size.sizeDp.dp)
79
+ .conditional(IsShowBaseLineDebug) { border(1.dp, Colors.blue_03) }
80
+ .setAutomationId(automationId)
81
+ .semantics { contentDescription = automationId },
82
+ ) {
83
+ // Inner box with clip — holds avatar content
84
+ Box(
85
+ modifier = Modifier
86
+ .fillMaxSize()
87
+ .clip(shape)
88
+ .background(color = Colors.pink_09)
89
+ .border(width = 1.dp, color = theme.colors.border.default, shape = shape),
90
+ contentAlignment = Alignment.Center,
91
+ ) {
92
+ when {
93
+ image != null -> {
94
+ Image(
95
+ source = image,
96
+ modifier = Modifier
97
+ .fillMaxSize()
98
+ .clip(shape)
99
+ .semantics { contentDescription = "$automationId|img" },
100
+ )
101
+ }
102
+
103
+ name != null -> {
104
+ Text(
105
+ text = initials ?: "",
106
+ style = Typography.descriptionXsRegular,
107
+ color = Colors.pink_03,
108
+ modifier = Modifier
109
+ .semantics { contentDescription = "$automationId|text" },
110
+ )
111
+ }
112
+
113
+ else -> {
114
+ Icon(
115
+ source = "basic_person",
116
+ size = size.iconSizeDp.dp,
117
+ color = Colors.pink_03,
118
+ modifier = Modifier
119
+ .semantics { contentDescription = "$automationId|icon" },
120
+ )
121
+ }
122
+ }
123
+ }
124
+
125
+ // Badge icons — outside clip so they are not cut by border
126
+ if (shouldShowIconTop) {
127
+ Image(
128
+ source = LOGO_MOMO_URL,
129
+ modifier = Modifier
130
+ .zIndex(1f)
131
+ .align(Alignment.TopEnd)
132
+ .offset(x = 1.dp, y = (-1).dp)
133
+ .size(badgeSizeDp)
134
+ .clip(badgeShape)
135
+ .semantics { contentDescription = "$automationId|top-icon" },
136
+ )
137
+ }
138
+
139
+ if (shouldShowIconBottom) {
140
+ Image(
141
+ source = iconSupport,
142
+ modifier = Modifier
143
+ .zIndex(1f)
144
+ .align(Alignment.BottomEnd)
145
+ .offset(x = 1.dp, y = 1.dp)
146
+ .size(badgeSizeDp)
147
+ .clip(badgeShape)
148
+ .semantics { contentDescription = "$automationId|bottom-icon" },
149
+ )
150
+ }
151
+ }
152
+ }
153
+
154
+ private fun avatarInitials(name: String): String {
155
+ val words = name.trim().split(" ").filter { it.isNotEmpty() }
156
+ return words.takeLast(2).joinToString("") { it.first().uppercaseChar().toString() }
157
+ }