@momo-kits/native-kits 0.157.1-debug → 0.157.1-skill.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 (43) hide show
  1. package/.claude/momo-native-kits/SKILL.md +87 -0
  2. package/.claude/momo-native-kits/references/Badge.md +39 -0
  3. package/.claude/momo-native-kits/references/BadgeDot.md +37 -0
  4. package/.claude/momo-native-kits/references/BottomSheet.md +51 -0
  5. package/.claude/momo-native-kits/references/BottomTab.md +65 -0
  6. package/.claude/momo-native-kits/references/Button.md +197 -0
  7. package/.claude/momo-native-kits/references/CheckBox.md +51 -0
  8. package/.claude/momo-native-kits/references/Chip.md +47 -0
  9. package/.claude/momo-native-kits/references/Divider.md +29 -0
  10. package/.claude/momo-native-kits/references/HeaderTitle.md +45 -0
  11. package/.claude/momo-native-kits/references/HeaderType.md +47 -0
  12. package/.claude/momo-native-kits/references/Icon.md +32 -0
  13. package/.claude/momo-native-kits/references/Image.md +38 -0
  14. package/.claude/momo-native-kits/references/Information.md +36 -0
  15. package/.claude/momo-native-kits/references/Input.md +334 -0
  16. package/.claude/momo-native-kits/references/InputDropDown.md +47 -0
  17. package/.claude/momo-native-kits/references/InputMoney.md +241 -0
  18. package/.claude/momo-native-kits/references/InputOTP.md +52 -0
  19. package/.claude/momo-native-kits/references/InputPhoneNumber.md +175 -0
  20. package/.claude/momo-native-kits/references/InputSearch.md +57 -0
  21. package/.claude/momo-native-kits/references/InputTextArea.md +46 -0
  22. package/.claude/momo-native-kits/references/NavigationContainer.md +51 -0
  23. package/.claude/momo-native-kits/references/Navigator.md +287 -0
  24. package/.claude/momo-native-kits/references/PaginationDot.md +28 -0
  25. package/.claude/momo-native-kits/references/PaginationNumber.md +28 -0
  26. package/.claude/momo-native-kits/references/PopupNotify.md +47 -0
  27. package/.claude/momo-native-kits/references/Radio.md +44 -0
  28. package/.claude/momo-native-kits/references/Skeleton.md +32 -0
  29. package/.claude/momo-native-kits/references/Switch.md +36 -0
  30. package/.claude/momo-native-kits/references/Tag.md +40 -0
  31. package/.claude/momo-native-kits/references/Text.md +37 -0
  32. package/.claude/momo-native-kits/references/Title.md +43 -0
  33. package/.claude/momo-native-kits/references/Tooltip.md +30 -0
  34. package/.claude/settings.local.json +13 -0
  35. package/building-skill-for-claude.md +1190 -0
  36. package/compose/build.gradle.kts +1 -1
  37. package/compose/compose.podspec +1 -1
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +51 -33
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +41 -27
  40. package/gradle.properties +1 -1
  41. package/ios/Input/InputPhoneNumber.swift +2 -1
  42. package/local.properties +8 -0
  43. package/package.json +1 -1
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: input-money
3
+ description: Money input with automatic formatting. Use when collecting monetary amounts with VND currency formatting.
4
+ ---
5
+
6
+ # InputMoney
7
+
8
+ Money input field with automatic VND currency formatting and bold font weight.
9
+
10
+ ## API
11
+
12
+ ```kotlin
13
+ @Composable
14
+ fun InputMoney(
15
+ text: MutableState<String> = remember { mutableStateOf("0") },
16
+ floatingValue: String = "",
17
+ floatingValueColor: Color = AppTheme.current.colors.text.hint,
18
+ floatingIcon: String = "",
19
+ floatingIconColor: Color = AppTheme.current.colors.text.default,
20
+ placeholder: String = "0đ",
21
+ size: InputSize = InputSize.SMALL,
22
+ onChangeText: (String) -> Unit = {},
23
+ error: String = "",
24
+ errorSpacing: Boolean = false,
25
+ disabled: Boolean = false,
26
+ icon: String = "",
27
+ iconColor: Color = AppTheme.current.colors.text.default,
28
+ onPressIcon: () -> Unit = {},
29
+ leadingIcon: String = "",
30
+ leadingIconColor: Color = AppTheme.current.colors.text.hint,
31
+ onFocus: () -> Unit = {},
32
+ onBlur: () -> Unit = {},
33
+ loading: Boolean = false,
34
+ required: Boolean = false,
35
+ fontWeight: InputFontWeight = InputFontWeight.BOLD,
36
+ keyboardType: KeyboardType = KeyboardType.Number,
37
+ )
38
+ ```
39
+
40
+ ## Props
41
+
42
+ | Prop | Type | Default | Description |
43
+ |------|------|---------|-------------|
44
+ | `text` | `MutableState<String>` | `"0"` | Current text value (required) |
45
+ | `floatingValue` | `String` | `""` | Floating label text |
46
+ | `floatingValueColor` | `Color` | hint color | Floating label color |
47
+ | `floatingIcon` | `String` | `""` | Icon next to floating label |
48
+ | `floatingIconColor` | `Color` | default color | Floating icon color |
49
+ | `placeholder` | `String` | `"0đ"` | Placeholder text |
50
+ | `size` | `InputSize` | `SMALL` | Input height |
51
+ | `onChangeText` | `(String) -> Unit` | `{}` | Text change callback |
52
+ | `error` | `String` | `""` | Error message |
53
+ | `errorSpacing` | `Boolean` | `false` | Show spacing for error |
54
+ | `disabled` | `Boolean` | `false` | Disabled state |
55
+ | `icon` | `String` | `""` | Right icon name |
56
+ | `iconColor` | `Color` | default color | Right icon color |
57
+ | `onPressIcon` | `() -> Unit` | `{}` | Right icon click |
58
+ | `leadingIcon` | `String` | `""` | Left icon name |
59
+ | `leadingIconColor` | `Color` | hint color | Left icon color |
60
+ | `onFocus` | `() -> Unit` | `{}` | Focus callback |
61
+ | `onBlur` | `() -> Unit` | `{}` | Blur callback |
62
+ | `loading` | `Boolean` | `false` | Loading spinner |
63
+ | `required` | `Boolean` | `false` | Show required asterisk |
64
+ | `fontWeight` | `InputFontWeight` | `BOLD` | Text font weight |
65
+ | `keyboardType` | `KeyboardType` | `Number` | Keyboard type |
66
+
67
+ ## InputSize
68
+
69
+ | Size | Height | Border Radius |
70
+ |------|--------|---------------|
71
+ | `SMALL` | 48dp | Radius.S |
72
+ | `LARGE` | 56dp | Radius.S |
73
+
74
+ ## InputFontWeight
75
+
76
+ | Value | Description |
77
+ |-------|-------------|
78
+ | `REGULAR` | FontWeight 400 |
79
+ | `BOLD` | FontWeight 700 (default) |
80
+
81
+ ## Features
82
+
83
+ - **Auto-formatting**: Automatically formats to "1.000.000đ" (VND format)
84
+ - **Number-only**: Filters non-digit characters
85
+ - **Bold font**: Default bold font weight (20sp)
86
+ - **Auto-clear**: Shows clear button when focused with text
87
+
88
+ ## Examples
89
+
90
+ ### Basic Usage
91
+
92
+ ```kotlin
93
+ val amount = remember { mutableStateOf("0") }
94
+
95
+ InputMoney(
96
+ text = amount,
97
+ onChangeText = { amount.value = it }
98
+ )
99
+
100
+ // With floating label
101
+ InputMoney(
102
+ text = amount,
103
+ floatingValue = "Amount",
104
+ onChangeText = { amount.value = it }
105
+ )
106
+ ```
107
+
108
+ ### With Error
109
+
110
+ ```kotlin
111
+ val amount = remember { mutableStateOf("0") }
112
+
113
+ InputMoney(
114
+ text = amount,
115
+ floatingValue = "Amount",
116
+ error = "Minimum amount is 1,000đ",
117
+ errorSpacing = true,
118
+ onChangeText = { amount.value = it }
119
+ )
120
+ ```
121
+
122
+ ### Disabled State
123
+
124
+ ```kotlin
125
+ InputMoney(
126
+ text = amount,
127
+ floatingValue = "Amount",
128
+ disabled = true,
129
+ onChangeText = { }
130
+ )
131
+ ```
132
+
133
+ ### With Icons
134
+
135
+ ```kotlin
136
+ // Leading icon
137
+ InputMoney(
138
+ text = amount,
139
+ floatingValue = "Transfer Amount",
140
+ leadingIcon = "wallet",
141
+ leadingIconColor = AppTheme.current.colors.primary,
142
+ onChangeText = { amount.value = it }
143
+ )
144
+
145
+ // Trailing icon
146
+ InputMoney(
147
+ text = amount,
148
+ floatingValue = "Amount",
149
+ icon = "close",
150
+ onPressIcon = { amount.value = "0" },
151
+ onChangeText = { amount.value = it }
152
+ )
153
+ ```
154
+
155
+ ### With Floating Label Icon
156
+
157
+ ```kotlin
158
+ InputMoney(
159
+ text = amount,
160
+ floatingValue = "Price",
161
+ floatingIcon = "tag",
162
+ floatingIconColor = AppTheme.current.colors.primary,
163
+ onChangeText = { amount.value = it }
164
+ )
165
+ ```
166
+
167
+ ### Required Field
168
+
169
+ ```kotlin
170
+ InputMoney(
171
+ text = amount,
172
+ floatingValue = "Amount",
173
+ required = true,
174
+ onChangeText = { amount.value = it }
175
+ )
176
+ ```
177
+
178
+ ### Sizes
179
+
180
+ ```kotlin
181
+ // Small (default - 48dp)
182
+ InputMoney(
183
+ text = amount,
184
+ size = InputSize.SMALL,
185
+ onChangeText = { amount.value = it }
186
+ )
187
+
188
+ // Large (56dp)
189
+ InputMoney(
190
+ text = amount,
191
+ size = InputSize.LARGE,
192
+ onChangeText = { amount.value = it }
193
+ )
194
+ ```
195
+
196
+ ### Focus Callbacks
197
+
198
+ ```kotlin
199
+ InputMoney(
200
+ text = amount,
201
+ floatingValue = "Amount",
202
+ onFocus = { /* show keyboard */ },
203
+ onBlur = { /* validate amount */ },
204
+ onChangeText = { amount.value = it }
205
+ )
206
+ ```
207
+
208
+ ### Loading State
209
+
210
+ ```kotlin
211
+ InputMoney(
212
+ text = amount,
213
+ floatingValue = "Amount",
214
+ loading = true,
215
+ onChangeText = { amount.value = it }
216
+ )
217
+ ```
218
+
219
+ ### Regular Font Weight
220
+
221
+ ```kotlin
222
+ InputMoney(
223
+ text = amount,
224
+ floatingValue = "Amount",
225
+ fontWeight = InputFontWeight.REGULAR,
226
+ onChangeText = { amount.value = it }
227
+ )
228
+ ```
229
+
230
+ ## How It Works
231
+
232
+ 1. User types digits (e.g., "1000000")
233
+ 2. Component automatically formats with thousand separators and "đ" suffix
234
+ 3. Display shows: "1.000.000đ"
235
+ 4. `onChangeText` returns raw numeric string (e.g., "1000000")
236
+
237
+ ## Auto-Clear Behavior
238
+
239
+ When focused with text:
240
+ - Clear icon appears on the right
241
+ - Clicking clears the text to "0" and triggers `onChangeText("")`
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: input-otp
3
+ description: OTP (One-Time Password) input field. Use when user needs to enter verification code.
4
+ ---
5
+
6
+ # InputOTP
7
+
8
+ OTP (One-Time Password) input field.
9
+
10
+ ## Keywords
11
+
12
+ OTP, mã xác nhận, verification code, mã otp
13
+
14
+ ## API
15
+
16
+ ```kotlin
17
+ @Composable
18
+ fun InputOTP(
19
+ value: String,
20
+ length: Int? = null,
21
+ floatingValue: String = "Label",
22
+ onChangeText: (String) -> Unit,
23
+ errorMessage: String = "",
24
+ )
25
+ ```
26
+
27
+ ## Features
28
+
29
+ - Fixed length: specify `length` (e.g., 6)
30
+ - Flexible length: leave `length` as null
31
+ - Auto caret animation
32
+
33
+ ## Examples
34
+
35
+ ```kotlin
36
+ val otp = remember { mutableStateOf("") }
37
+
38
+ // Fixed 6-digit OTP
39
+ InputOTP(
40
+ value = otp.value,
41
+ length = 6,
42
+ floatingValue = "OTP Code",
43
+ onChangeText = { otp.value = it }
44
+ )
45
+
46
+ // Flexible length
47
+ InputOTP(
48
+ value = otp.value,
49
+ floatingValue = "Confirmation Code",
50
+ onChangeText = { otp.value = it }
51
+ )
52
+ ```
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: input-phone-number
3
+ description: Phone number input with automatic +84 prefix. Use when collecting Vietnamese phone numbers.
4
+ ---
5
+
6
+ # InputPhoneNumber
7
+
8
+ Phone number input field with automatic +84 country code prefix and Vietnam flag icon.
9
+
10
+ ## API
11
+
12
+ ```kotlin
13
+ @Composable
14
+ fun InputPhoneNumber(
15
+ text: MutableState<String> = remember { mutableStateOf("") },
16
+ placeholder: String = "0123456789",
17
+ size: InputPhoneNumberSize = InputPhoneNumberSize.SMALL,
18
+ onChangeText: (String) -> Unit = {},
19
+ hintText: String = "",
20
+ error: String = "",
21
+ errorSpacing: Boolean = false,
22
+ icon: String = "",
23
+ iconColor: Color = AppTheme.current.colors.text.default,
24
+ onRightIconPressed: () -> Unit = {},
25
+ onFocus: () -> Unit = {},
26
+ onBlur: () -> Unit = {},
27
+ loading: Boolean = false,
28
+ modifier: Modifier = Modifier,
29
+ inputModifier: Modifier = Modifier,
30
+ )
31
+ ```
32
+
33
+ ## Props
34
+
35
+ | Prop | Type | Default | Description |
36
+ |------|------|---------|-------------|
37
+ | `text` | `MutableState<String>` | `""` | Current text value (required) |
38
+ | `placeholder` | `String` | `"0123456789"` | Placeholder text |
39
+ | `size` | `InputPhoneNumberSize` | `SMALL` | Input height |
40
+ | `onChangeText` | `(String) -> Unit` | `{}` | Text change callback |
41
+ | `hintText` | `String` | `""` | Hint text below input |
42
+ | `error` | `String` | `""` | Error message |
43
+ | `errorSpacing` | `Boolean` | `false` | Show spacing for error |
44
+ | `icon` | `String` | `""` | Right icon name |
45
+ | `iconColor` | `Color` | default color | Right icon color |
46
+ | `onRightIconPressed` | `() -> Unit` | `{}` | Right icon click |
47
+ | `onFocus` | `() -> Unit` | `{}` | Focus callback |
48
+ | `onBlur` | `() -> Unit` | `{}` | Blur callback |
49
+ | `loading` | `Boolean` | `false` | Loading spinner |
50
+ | `modifier` | `Modifier` | `Modifier` | Outer modifier |
51
+ | `inputModifier` | `Modifier` | `Modifier` | Input field modifier |
52
+
53
+ ## InputPhoneNumberSize
54
+
55
+ | Size | Height | Text Style | Divider Height |
56
+ |------|--------|------------|----------------|
57
+ | `SMALL` | 48dp | headerSSemibold | 24dp |
58
+ | `LARGE` | 56dp | headerMBold | 32dp |
59
+
60
+ ## Features
61
+
62
+ - **Auto +84 prefix**: Automatically adds "+84" country code prefix
63
+ - **Vietnam flag**: Shows Vietnam flag icon next to country code
64
+ - **Number-only keyboard**: Automatically uses numeric keyboard
65
+ - **Auto-clear**: Shows clear button when focused with text
66
+
67
+ ## Examples
68
+
69
+ ### Basic Usage
70
+
71
+ ```kotlin
72
+ val phone = remember { mutableStateOf("") }
73
+
74
+ InputPhoneNumber(
75
+ text = phone,
76
+ onChangeText = { phone.value = it }
77
+ )
78
+ ```
79
+
80
+ ### With Placeholder
81
+
82
+ ```kotlin
83
+ val phone = remember { mutableStateOf("") }
84
+
85
+ InputPhoneNumber(
86
+ text = phone,
87
+ placeholder = "Enter phone number",
88
+ onChangeText = { phone.value = it }
89
+ )
90
+ ```
91
+
92
+ ### With Error
93
+
94
+ ```kotlin
95
+ val phone = remember { mutableStateOf("") }
96
+
97
+ InputPhoneNumber(
98
+ text = phone,
99
+ error = "Invalid phone number",
100
+ errorSpacing = true,
101
+ onChangeText = { phone.value = it }
102
+ )
103
+ ```
104
+
105
+ ### Sizes
106
+
107
+ ```kotlin
108
+ // Small (default - 48dp)
109
+ InputPhoneNumber(
110
+ text = phone,
111
+ size = InputPhoneNumberSize.SMALL,
112
+ onChangeText = { phone.value = it }
113
+ )
114
+
115
+ // Large (56dp)
116
+ InputPhoneNumber(
117
+ text = phone,
118
+ size = InputPhoneNumberSize.LARGE,
119
+ onChangeText = { phone.value = it }
120
+ )
121
+ ```
122
+
123
+ ### With Right Icon
124
+
125
+ ```kotlin
126
+ InputPhoneNumber(
127
+ text = phone,
128
+ icon = "close",
129
+ onRightIconPressed = { phone.value = "" },
130
+ onChangeText = { phone.value = it }
131
+ )
132
+ ```
133
+
134
+ ### Focus Callbacks
135
+
136
+ ```kotlin
137
+ InputPhoneNumber(
138
+ text = phone,
139
+ onFocus = { /* show keyboard */ },
140
+ onBlur = { /* validate phone */ },
141
+ onChangeText = { phone.value = it }
142
+ )
143
+ ```
144
+
145
+ ### Loading State
146
+
147
+ ```kotlin
148
+ InputPhoneNumber(
149
+ text = phone,
150
+ loading = true,
151
+ onChangeText = { phone.value = it }
152
+ )
153
+ ```
154
+
155
+ ### Hint Text
156
+
157
+ ```kotlin
158
+ InputPhoneNumber(
159
+ text = phone,
160
+ hintText = "Enter 10-digit phone number",
161
+ onChangeText = { phone.value = it }
162
+ )
163
+ ```
164
+
165
+ ## How It Works
166
+
167
+ 1. User types 9 digits (e.g., "912345678")
168
+ 2. Component automatically prepends "+84" (e.g., "+84912345678")
169
+ 3. Display shows: "+84 912 345 678" (formatted)
170
+
171
+ ## Auto-Clear Behavior
172
+
173
+ When focused with text:
174
+ - Clear icon appears on the right
175
+ - Clicking clears the text and triggers `onChangeText("")`
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: input-search
3
+ description: Search input with built-in search icon and clear button. Use when implementing search functionality.
4
+ ---
5
+
6
+ # InputSearch
7
+
8
+ Search input with built-in search icon and clear button.
9
+
10
+ ## Keywords
11
+
12
+ search, tìm kiếm, ô tìm kiếm
13
+
14
+ ## API
15
+
16
+ ```kotlin
17
+ @Composable
18
+ fun InputSearch(
19
+ inputSearchProps: InputSearchProps = InputSearchProps(
20
+ text = remember { mutableStateOf("") }
21
+ ),
22
+ )
23
+
24
+ data class InputSearchProps(
25
+ val text: MutableState<String>,
26
+ val placeholder: String = "",
27
+ val onChangeText: (String) -> Unit = {},
28
+ val onClearPress: () -> Unit = {},
29
+ val loading: Boolean = false,
30
+ val disabled: Boolean = false,
31
+ val buttonText: String = "",
32
+ val showButtonText: Boolean = false,
33
+ // ... more options
34
+ )
35
+ ```
36
+
37
+ ## Features
38
+
39
+ - Built-in search icon
40
+ - Auto clear button when focused with text
41
+ - Loading state support
42
+ - Custom right icon support
43
+
44
+ ## Examples
45
+
46
+ ```kotlin
47
+ val searchText = remember { mutableStateOf("") }
48
+
49
+ InputSearch(
50
+ inputSearchProps = InputSearchProps(
51
+ text = searchText,
52
+ placeholder = "Search...",
53
+ onChangeText = { searchText.value = it },
54
+ onClearPress = { searchText.value = "" }
55
+ )
56
+ )
57
+ ```
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: input-text-area
3
+ description: Multi-line text area input. Use when user needs to enter longer text descriptions.
4
+ ---
5
+
6
+ # InputTextArea
7
+
8
+ Multi-line text area input.
9
+
10
+ ## Keywords
11
+
12
+ textarea, text area, mô tả, description, nhập mô tả
13
+
14
+ ## API
15
+
16
+ ```kotlin
17
+ @Composable
18
+ fun InputTextArea(
19
+ text: MutableState<String>,
20
+ floatingValue: String = "",
21
+ placeholder: String = "",
22
+ maxLength: Int = 300,
23
+ onChangeText: (String) -> Unit = {},
24
+ error: String = "",
25
+ )
26
+ ```
27
+
28
+ ## Features
29
+
30
+ - Multi-line input
31
+ - Character count display (e.g., "50/300")
32
+ - Max length enforcement
33
+
34
+ ## Examples
35
+
36
+ ```kotlin
37
+ val description = remember { mutableStateOf("") }
38
+
39
+ InputTextArea(
40
+ text = description,
41
+ floatingValue = "Description",
42
+ placeholder = "Enter description...",
43
+ maxLength = 300,
44
+ onChangeText = { description.value = it }
45
+ )
46
+ ```
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: navigation-container
3
+ description: Entry point for Compose screens. Use when setting up the main container for a Compose-based screen.
4
+ ---
5
+
6
+ # NavigationContainer
7
+
8
+ Entry point for Compose screens.
9
+
10
+ ## Keywords
11
+
12
+ navigation, container, screen, màn hình
13
+
14
+ ## API
15
+
16
+ ```kotlin
17
+ @Composable
18
+ fun NavigationContainer(
19
+ initialScreen: @Composable () -> Unit,
20
+ options: NavigationOptions? = null,
21
+ initialTheme: Theme = defaultTheme,
22
+ applicationContext: MiniAppContext? = null,
23
+ maxApi: IMaxApi? = null,
24
+ setNavigator: ((Navigator) -> Unit)? = null,
25
+ statusBarHeight: Dp? = null,
26
+ config: KitConfig? = null,
27
+ language: String? = null
28
+ )
29
+ ```
30
+
31
+ ## Parameters
32
+
33
+ | Parameter | Type | Description |
34
+ |-----------|------|-------------|
35
+ | `initialScreen` | `@Composable () -> Unit` | Initial screen |
36
+ | `options` | `NavigationOptions?` | Navigation options |
37
+ | `maxApi` | `IMaxApi?` | Required for native features |
38
+ | `config` | `KitConfig?` | UI configuration |
39
+ | `language` | `String?` | Current language |
40
+
41
+ ## Examples
42
+
43
+ ```kotlin
44
+ NavigationContainer(
45
+ initialScreen = { HomeScreen() },
46
+ maxApi = maxApi,
47
+ config = config,
48
+ language = language,
49
+ setNavigator = { navigator = it }
50
+ )
51
+ ```