@momo-kits/native-kits 0.157.1-skill.1-debug → 0.157.1-skill.3-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.
- package/.claude/momo-native-kits-skill/SKILL.md +51 -0
- package/.claude/momo-native-kits-skill/evals/evals.json +95 -0
- package/.claude/momo-native-kits-skill/references/badge.md +52 -0
- package/.claude/momo-native-kits-skill/references/button.md +182 -0
- package/.claude/momo-native-kits-skill/references/card.md +48 -0
- package/.claude/momo-native-kits-skill/references/checkbox.md +51 -0
- package/.claude/momo-native-kits-skill/references/chip.md +48 -0
- package/.claude/momo-native-kits-skill/references/constants.md +260 -0
- package/.claude/momo-native-kits-skill/references/divider.md +26 -0
- package/.claude/momo-native-kits-skill/references/input.md +408 -0
- package/.claude/momo-native-kits-skill/references/navigation.md +475 -0
- package/.claude/momo-native-kits-skill/references/popup.md +97 -0
- package/.claude/momo-native-kits-skill/references/radio.md +60 -0
- package/.claude/momo-native-kits-skill/references/skeleton.md +40 -0
- package/.claude/momo-native-kits-skill/references/snackbar.md +54 -0
- package/.claude/momo-native-kits-skill/references/switch.md +62 -0
- package/.claude/momo-native-kits-skill/references/text.md +195 -0
- package/.claude/momo-native-kits-skill/references/tooltip.md +34 -0
- package/.claude/momo-native-kits-skill/references/trustbanner.md +61 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json +20 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.md +13 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/with_skill/outputs/ButtonExample.kt +55 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/without_skill/outputs/ButtonExample.kt +45 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs/InputPhoneExample.kt +40 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs/InputPhoneExample.kt +42 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs/BottomTabExample.kt +236 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs/BottomTabExample.kt +152 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs/CheckBoxExample.kt +49 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs/CheckBoxExample.kt +123 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs/DateTimePickerExample.kt +318 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs/DateTimePickerExample.kt +330 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs/CardExample.kt +124 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/without_skill/outputs/CardExample.kt +71 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/with_skill/outputs/LoginFormExample.kt +134 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/without_skill/outputs/LoginFormExample.kt +199 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +224 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/without_skill/outputs/NavigationContainerExample.kt +225 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs/PopupExample.kt +79 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs/PopupExample.kt +169 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +255 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +212 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs/SkeletonExample.kt +199 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/without_skill/outputs/SkeletonExample.kt +229 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.json +20 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.md +13 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/eval_metadata.json +22 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/outputs/PrimaryButtonExample.kt +38 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/outputs/PrimaryButtonExample.kt +83 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json +22 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +547 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/outputs/MoMoNavigationContainer.kt +519 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json +27 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +429 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +353 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/timing.json +5 -0
- package/.claude/settings.local.json +35 -7
- package/compose/build.gradle.kts +1 -1
- package/gradle.properties +1 -1
- package/ios/Input/Input.swift +112 -50
- package/local.properties +1 -1
- package/package.json +1 -1
- package/.claude/momo-native-kits/SKILL.md +0 -87
- package/.claude/momo-native-kits/references/Badge.md +0 -39
- package/.claude/momo-native-kits/references/BadgeDot.md +0 -37
- package/.claude/momo-native-kits/references/BottomSheet.md +0 -51
- package/.claude/momo-native-kits/references/BottomTab.md +0 -65
- package/.claude/momo-native-kits/references/Button.md +0 -197
- package/.claude/momo-native-kits/references/CheckBox.md +0 -51
- package/.claude/momo-native-kits/references/Chip.md +0 -47
- package/.claude/momo-native-kits/references/Divider.md +0 -29
- package/.claude/momo-native-kits/references/HeaderTitle.md +0 -45
- package/.claude/momo-native-kits/references/HeaderType.md +0 -47
- package/.claude/momo-native-kits/references/Icon.md +0 -32
- package/.claude/momo-native-kits/references/Image.md +0 -38
- package/.claude/momo-native-kits/references/Information.md +0 -36
- package/.claude/momo-native-kits/references/Input.md +0 -334
- package/.claude/momo-native-kits/references/InputDropDown.md +0 -47
- package/.claude/momo-native-kits/references/InputMoney.md +0 -241
- package/.claude/momo-native-kits/references/InputOTP.md +0 -52
- package/.claude/momo-native-kits/references/InputPhoneNumber.md +0 -175
- package/.claude/momo-native-kits/references/InputSearch.md +0 -57
- package/.claude/momo-native-kits/references/InputTextArea.md +0 -46
- package/.claude/momo-native-kits/references/NavigationContainer.md +0 -51
- package/.claude/momo-native-kits/references/Navigator.md +0 -287
- package/.claude/momo-native-kits/references/PaginationDot.md +0 -28
- package/.claude/momo-native-kits/references/PaginationNumber.md +0 -28
- package/.claude/momo-native-kits/references/PopupNotify.md +0 -47
- package/.claude/momo-native-kits/references/Radio.md +0 -44
- package/.claude/momo-native-kits/references/Skeleton.md +0 -32
- package/.claude/momo-native-kits/references/Switch.md +0 -36
- package/.claude/momo-native-kits/references/Tag.md +0 -40
- package/.claude/momo-native-kits/references/Text.md +0 -37
- package/.claude/momo-native-kits/references/Title.md +0 -43
- package/.claude/momo-native-kits/references/Tooltip.md +0 -30
- package/building-skill-for-claude.md +0 -1190
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
package com.example.skeleton
|
|
2
|
+
|
|
3
|
+
import androidx.compose.animation.core.FastOutSlowInEasing
|
|
4
|
+
import androidx.compose.animation.core.RepeatMode
|
|
5
|
+
import androidx.compose.animation.core.animateFloat
|
|
6
|
+
import androidx.compose.animation.core.infiniteRepeatable
|
|
7
|
+
import androidx.compose.animation.core.rememberInfiniteTransition
|
|
8
|
+
import androidx.compose.animation.core.tween
|
|
9
|
+
import androidx.compose.foundation.background
|
|
10
|
+
import androidx.compose.foundation.layout.Arrangement
|
|
11
|
+
import androidx.compose.foundation.layout.Box
|
|
12
|
+
import androidx.compose.foundation.layout.Column
|
|
13
|
+
import androidx.compose.foundation.layout.Row
|
|
14
|
+
import androidx.compose.foundation.layout.Spacer
|
|
15
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
16
|
+
import androidx.compose.foundation.layout.height
|
|
17
|
+
import androidx.compose.foundation.layout.padding
|
|
18
|
+
import androidx.compose.foundation.layout.size
|
|
19
|
+
import androidx.compose.foundation.layout.width
|
|
20
|
+
import androidx.compose.foundation.shape.CircleShape
|
|
21
|
+
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
22
|
+
import androidx.compose.material3.Card
|
|
23
|
+
import androidx.compose.material3.CardDefaults
|
|
24
|
+
import androidx.compose.runtime.Composable
|
|
25
|
+
import androidx.compose.runtime.getValue
|
|
26
|
+
import androidx.compose.ui.Alignment
|
|
27
|
+
import androidx.compose.ui.Modifier
|
|
28
|
+
import androidx.compose.ui.draw.clip
|
|
29
|
+
import androidx.compose.ui.geometry.Offset
|
|
30
|
+
import androidx.compose.ui.graphics.Brush
|
|
31
|
+
import androidx.compose.ui.graphics.Color
|
|
32
|
+
import androidx.compose.ui.unit.dp
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A loading skeleton component that displays a shimmer effect
|
|
36
|
+
* while content is loading.
|
|
37
|
+
*/
|
|
38
|
+
@Composable
|
|
39
|
+
fun ShimmerSkeleton(
|
|
40
|
+
modifier: Modifier = Modifier,
|
|
41
|
+
content: @Composable (Brush) -> Unit
|
|
42
|
+
) {
|
|
43
|
+
val shimmerColors = listOf(
|
|
44
|
+
Color.LightGray.copy(alpha = 0.6f),
|
|
45
|
+
Color.LightGray.copy(alpha = 0.2f),
|
|
46
|
+
Color.LightGray.copy(alpha = 0.6f)
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
val transition = rememberInfiniteTransition(label = "shimmer")
|
|
50
|
+
val translateAnimation by transition.animateFloat(
|
|
51
|
+
initialValue = 0f,
|
|
52
|
+
targetValue = 1000f,
|
|
53
|
+
animationSpec = infiniteRepeatable(
|
|
54
|
+
animation = tween(
|
|
55
|
+
durationMillis = 1200,
|
|
56
|
+
easing = FastOutSlowInEasing
|
|
57
|
+
),
|
|
58
|
+
repeatMode = RepeatMode.Restart
|
|
59
|
+
),
|
|
60
|
+
label = "shimmer_translate"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
val brush = Brush.linearGradient(
|
|
64
|
+
colors = shimmerColors,
|
|
65
|
+
start = Offset(translateAnimation - 500f, translateAnimation - 500f),
|
|
66
|
+
end = Offset(translateAnimation, translateAnimation)
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
content(brush)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A card skeleton that displays a shimmer effect to indicate loading state.
|
|
74
|
+
* This mimics a typical card with an image placeholder, title, subtitle, and action button.
|
|
75
|
+
*/
|
|
76
|
+
@Composable
|
|
77
|
+
fun CardSkeleton(
|
|
78
|
+
modifier: Modifier = Modifier
|
|
79
|
+
) {
|
|
80
|
+
ShimmerSkeleton(modifier = modifier) { brush ->
|
|
81
|
+
Card(
|
|
82
|
+
modifier = modifier
|
|
83
|
+
.fillMaxWidth()
|
|
84
|
+
.padding(16.dp),
|
|
85
|
+
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp),
|
|
86
|
+
shape = RoundedCornerShape(12.dp)
|
|
87
|
+
) {
|
|
88
|
+
Column(
|
|
89
|
+
modifier = Modifier.padding(16.dp)
|
|
90
|
+
) {
|
|
91
|
+
// Image placeholder
|
|
92
|
+
Box(
|
|
93
|
+
modifier = Modifier
|
|
94
|
+
.fillMaxWidth()
|
|
95
|
+
.height(160.dp)
|
|
96
|
+
.clip(RoundedCornerShape(8.dp))
|
|
97
|
+
.background(brush)
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
Spacer(modifier = Modifier.height(16.dp))
|
|
101
|
+
|
|
102
|
+
// Title placeholder (2 lines)
|
|
103
|
+
Box(
|
|
104
|
+
modifier = Modifier
|
|
105
|
+
.fillMaxWidth(0.7f)
|
|
106
|
+
.height(20.dp)
|
|
107
|
+
.clip(RoundedCornerShape(4.dp))
|
|
108
|
+
.background(brush)
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
112
|
+
|
|
113
|
+
Box(
|
|
114
|
+
modifier = Modifier
|
|
115
|
+
.fillMaxWidth(0.5f)
|
|
116
|
+
.height(20.dp)
|
|
117
|
+
.clip(RoundedCornerShape(4.dp))
|
|
118
|
+
.background(brush)
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
Spacer(modifier = Modifier.height(12.dp))
|
|
122
|
+
|
|
123
|
+
// Description placeholder (3 lines)
|
|
124
|
+
repeat(3) { index ->
|
|
125
|
+
Box(
|
|
126
|
+
modifier = Modifier
|
|
127
|
+
.fillMaxWidth(if (index == 2) 0.6f else 1f)
|
|
128
|
+
.height(14.dp)
|
|
129
|
+
.clip(RoundedCornerShape(4.dp))
|
|
130
|
+
.background(brush)
|
|
131
|
+
)
|
|
132
|
+
if (index < 2) {
|
|
133
|
+
Spacer(modifier = Modifier.height(6.dp))
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
Spacer(modifier = Modifier.height(16.dp))
|
|
138
|
+
|
|
139
|
+
// Action button and avatar row
|
|
140
|
+
Row(
|
|
141
|
+
modifier = Modifier.fillMaxWidth(),
|
|
142
|
+
horizontalArrangement = Arrangement.SpaceBetween,
|
|
143
|
+
verticalAlignment = Alignment.CenterVertically
|
|
144
|
+
) {
|
|
145
|
+
// Action button placeholder
|
|
146
|
+
Box(
|
|
147
|
+
modifier = Modifier
|
|
148
|
+
.width(100.dp)
|
|
149
|
+
.height(36.dp)
|
|
150
|
+
.clip(RoundedCornerShape(18.dp))
|
|
151
|
+
.background(brush)
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
// Avatar placeholder
|
|
155
|
+
Box(
|
|
156
|
+
modifier = Modifier
|
|
157
|
+
.size(40.dp)
|
|
158
|
+
.clip(CircleShape)
|
|
159
|
+
.background(brush)
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* A simpler card skeleton with just title and description.
|
|
169
|
+
*/
|
|
170
|
+
@Composable
|
|
171
|
+
fun SimpleCardSkeleton(
|
|
172
|
+
modifier: Modifier = Modifier
|
|
173
|
+
) {
|
|
174
|
+
ShimmerSkeleton(modifier = modifier) { brush ->
|
|
175
|
+
Card(
|
|
176
|
+
modifier = modifier
|
|
177
|
+
.fillMaxWidth()
|
|
178
|
+
.padding(16.dp),
|
|
179
|
+
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
|
|
180
|
+
shape = RoundedCornerShape(8.dp)
|
|
181
|
+
) {
|
|
182
|
+
Column(
|
|
183
|
+
modifier = Modifier.padding(12.dp)
|
|
184
|
+
) {
|
|
185
|
+
// Title
|
|
186
|
+
Box(
|
|
187
|
+
modifier = Modifier
|
|
188
|
+
.fillMaxWidth(0.6f)
|
|
189
|
+
.height(18.dp)
|
|
190
|
+
.clip(RoundedCornerShape(4.dp))
|
|
191
|
+
.background(brush)
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
195
|
+
|
|
196
|
+
// Description
|
|
197
|
+
Box(
|
|
198
|
+
modifier = Modifier
|
|
199
|
+
.fillMaxWidth(0.9f)
|
|
200
|
+
.height(14.dp)
|
|
201
|
+
.clip(RoundedCornerShape(4.dp))
|
|
202
|
+
.background(brush)
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
Spacer(modifier = Modifier.height(4.dp))
|
|
206
|
+
|
|
207
|
+
Box(
|
|
208
|
+
modifier = Modifier
|
|
209
|
+
.fillMaxWidth(0.7f)
|
|
210
|
+
.height(14.dp)
|
|
211
|
+
.clip(RoundedCornerShape(4.dp))
|
|
212
|
+
.background(brush)
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Preview Composable for CardSkeleton
|
|
221
|
+
*/
|
|
222
|
+
@Composable
|
|
223
|
+
fun CardSkeletonPreview() {
|
|
224
|
+
Column {
|
|
225
|
+
CardSkeleton()
|
|
226
|
+
Spacer(modifier = Modifier.height(16.dp))
|
|
227
|
+
SimpleCardSkeleton()
|
|
228
|
+
}
|
|
229
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"skill_name": "momo-native-kits-skills",
|
|
4
|
+
"skill_path": "<path/to/skill>",
|
|
5
|
+
"executor_model": "<model-name>",
|
|
6
|
+
"analyzer_model": "<model-name>",
|
|
7
|
+
"timestamp": "2026-03-16T09:27:06Z",
|
|
8
|
+
"evals_run": [],
|
|
9
|
+
"runs_per_configuration": 3
|
|
10
|
+
},
|
|
11
|
+
"runs": [],
|
|
12
|
+
"run_summary": {
|
|
13
|
+
"delta": {
|
|
14
|
+
"pass_rate": "+0.00",
|
|
15
|
+
"time_seconds": "+0.0",
|
|
16
|
+
"tokens": "+0"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"notes": []
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Skill Benchmark: momo-native-kits-skills
|
|
2
|
+
|
|
3
|
+
**Model**: <model-name>
|
|
4
|
+
**Date**: 2026-03-16T09:27:06Z
|
|
5
|
+
**Evals**: (3 runs each per configuration)
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
|
|
9
|
+
| Metric | Config A | Config B | Delta |
|
|
10
|
+
|--------|------------|---------------|-------|
|
|
11
|
+
| Pass Rate | 0% ± 0% | 0% ± 0% | +0.00 |
|
|
12
|
+
| Time | 0.0s ± 0.0s | 0.0s ± 0.0s | +0.0s |
|
|
13
|
+
| Tokens | 0 ± 0 | 0 ± 0 | +0 |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eval_id": 0,
|
|
3
|
+
"eval_name": "button-primary",
|
|
4
|
+
"prompt": "Show me how to create a primary button with text 'Đăng nhập' in MoMo Native Kits",
|
|
5
|
+
"assertions": [
|
|
6
|
+
{
|
|
7
|
+
"text": "Uses Button from vn.momo.kits.components",
|
|
8
|
+
"passed": true,
|
|
9
|
+
"evidence": "Import vn.momo.kits.components.Button"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"text": "Uses ButtonType.PRIMARY",
|
|
13
|
+
"passed": true,
|
|
14
|
+
"evidence": "type = ButtonType.PRIMARY"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"text": "Title is 'Đăng nhập'",
|
|
18
|
+
"passed": true,
|
|
19
|
+
"evidence": "title = 'Đăng nhập'"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
package com.example
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
4
|
+
import androidx.compose.foundation.layout.padding
|
|
5
|
+
import androidx.compose.runtime.Composable
|
|
6
|
+
import androidx.compose.ui.Modifier
|
|
7
|
+
import androidx.compose.ui.unit.dp
|
|
8
|
+
import vn.momo.kits.components.Button
|
|
9
|
+
import vn.momo.kits.components.ButtonType
|
|
10
|
+
import vn.momo.kits.components.Size
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Primary Button with text 'Đăng nhập'
|
|
14
|
+
*
|
|
15
|
+
* This example demonstrates how to create a primary button in MoMo Native Kits
|
|
16
|
+
* with the Vietnamese text "Đăng nhập" (Login).
|
|
17
|
+
*
|
|
18
|
+
* Key components used:
|
|
19
|
+
* - Button from vn.momo.kits.components
|
|
20
|
+
* - ButtonType.PRIMARY for the primary action style
|
|
21
|
+
* - Size.LARGE for appropriate touch target size
|
|
22
|
+
*/
|
|
23
|
+
@Composable
|
|
24
|
+
fun PrimaryButtonExample() {
|
|
25
|
+
Button(
|
|
26
|
+
onClick = {
|
|
27
|
+
// Handle login action
|
|
28
|
+
// Example: Perform authentication
|
|
29
|
+
},
|
|
30
|
+
title = "Đăng nhập",
|
|
31
|
+
type = ButtonType.PRIMARY,
|
|
32
|
+
size = Size.LARGE,
|
|
33
|
+
isFull = true,
|
|
34
|
+
modifier = Modifier
|
|
35
|
+
.fillMaxWidth()
|
|
36
|
+
.padding(horizontal = 16.dp)
|
|
37
|
+
)
|
|
38
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
package vn.momo.kits.example
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
4
|
+
import androidx.compose.foundation.layout.padding
|
|
5
|
+
import androidx.compose.material3.MaterialTheme
|
|
6
|
+
import androidx.compose.material3.Surface
|
|
7
|
+
import androidx.compose.runtime.Composable
|
|
8
|
+
import androidx.compose.runtime.getValue
|
|
9
|
+
import androidx.compose.runtime.mutableStateOf
|
|
10
|
+
import androidx.compose.runtime.remember
|
|
11
|
+
import androidx.compose.runtime.setValue
|
|
12
|
+
import androidx.compose.ui.Modifier
|
|
13
|
+
import androidx.compose.ui.unit.dp
|
|
14
|
+
import vn.momo.kits.components.Button
|
|
15
|
+
import vn.momo.kits.components.ButtonType
|
|
16
|
+
import vn.momo.kits.components.Size
|
|
17
|
+
import vn.momo.kits.const.AppTheme
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Example demonstrating how to create a primary button with Vietnamese text 'Đăng nhập'
|
|
21
|
+
* (meaning "Login" in Vietnamese) using MoMo Native Kits.
|
|
22
|
+
*
|
|
23
|
+
* The Button component supports:
|
|
24
|
+
* - Multiple button types: PRIMARY, SECONDARY, TONAL, OUTLINE, DANGER, TEXT, DISABLED
|
|
25
|
+
* - Multiple sizes: LARGE, MEDIUM, SMALL
|
|
26
|
+
* - Optional icons on left or right
|
|
27
|
+
* - Loading state
|
|
28
|
+
* - Full-width or auto-width variants
|
|
29
|
+
*/
|
|
30
|
+
@Composable
|
|
31
|
+
fun PrimaryButtonLoginExample() {
|
|
32
|
+
// Track click state for demonstration
|
|
33
|
+
var clickCount by remember { mutableStateOf(0) }
|
|
34
|
+
|
|
35
|
+
// Primary button with Vietnamese text 'Đăng nhập' (Login)
|
|
36
|
+
// Uses default ButtonType.PRIMARY which has the primary color background
|
|
37
|
+
Button(
|
|
38
|
+
onClick = { clickCount++ },
|
|
39
|
+
title = "Đăng nhập", // Vietnamese for "Login"
|
|
40
|
+
type = ButtonType.PRIMARY,
|
|
41
|
+
size = Size.LARGE,
|
|
42
|
+
isFull = true,
|
|
43
|
+
modifier = Modifier
|
|
44
|
+
.fillMaxWidth()
|
|
45
|
+
.padding(horizontal = 16.dp)
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Alternative example showing full usage with all parameters
|
|
51
|
+
*/
|
|
52
|
+
@Composable
|
|
53
|
+
fun PrimaryButtonFullExample() {
|
|
54
|
+
var isLoading by remember { mutableStateOf(false) }
|
|
55
|
+
|
|
56
|
+
Button(
|
|
57
|
+
onClick = { /* Handle login action */ },
|
|
58
|
+
title = "Đăng nhập",
|
|
59
|
+
type = ButtonType.PRIMARY, // Primary button style (colored background)
|
|
60
|
+
size = Size.LARGE, // Large size (48dp height)
|
|
61
|
+
iconLeft = "ic_login", // Optional left icon
|
|
62
|
+
iconRight = "", // No right icon
|
|
63
|
+
loading = isLoading, // Loading state
|
|
64
|
+
useTintColor = true, // Apply text color to icon
|
|
65
|
+
isFull = true, // Full width button
|
|
66
|
+
modifier = Modifier
|
|
67
|
+
.fillMaxWidth()
|
|
68
|
+
.padding(16.dp)
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Minimal example - only required parameters
|
|
74
|
+
*/
|
|
75
|
+
@Composable
|
|
76
|
+
fun PrimaryButtonMinimalExample() {
|
|
77
|
+
// Using only the required parameters
|
|
78
|
+
// type defaults to ButtonType.PRIMARY
|
|
79
|
+
Button(
|
|
80
|
+
onClick = { /* Handle click */ },
|
|
81
|
+
title = "Đăng nhập"
|
|
82
|
+
)
|
|
83
|
+
}
|
package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eval_id": 2,
|
|
3
|
+
"eval_name": "navigation-container",
|
|
4
|
+
"prompt": "How to implement NavigationContainer in MoMo app? Show me the correct pattern",
|
|
5
|
+
"assertions": [
|
|
6
|
+
{
|
|
7
|
+
"text": "Uses NavigationContainer from vn.momo.kits.navigation",
|
|
8
|
+
"passed": true,
|
|
9
|
+
"evidence": "import vn.momo.kits.navigation.NavigationContainer"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"text": "Uses initialScreen parameter",
|
|
13
|
+
"passed": true,
|
|
14
|
+
"evidence": "initialScreen = { ... }"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"text": "Uses NavigationOptions",
|
|
18
|
+
"passed": true,
|
|
19
|
+
"evidence": "options = NavigationOptions(...)"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|