@momo-kits/native-kits 0.157.1-debug → 0.157.1-skill.1
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.md +87 -0
- package/.claude/momo-native-kits/references/Badge.md +39 -0
- package/.claude/momo-native-kits/references/BadgeDot.md +37 -0
- package/.claude/momo-native-kits/references/BottomSheet.md +51 -0
- package/.claude/momo-native-kits/references/BottomTab.md +65 -0
- package/.claude/momo-native-kits/references/Button.md +197 -0
- package/.claude/momo-native-kits/references/CheckBox.md +51 -0
- package/.claude/momo-native-kits/references/Chip.md +47 -0
- package/.claude/momo-native-kits/references/Divider.md +29 -0
- package/.claude/momo-native-kits/references/HeaderTitle.md +45 -0
- package/.claude/momo-native-kits/references/HeaderType.md +47 -0
- package/.claude/momo-native-kits/references/Icon.md +32 -0
- package/.claude/momo-native-kits/references/Image.md +38 -0
- package/.claude/momo-native-kits/references/Information.md +36 -0
- package/.claude/momo-native-kits/references/Input.md +334 -0
- package/.claude/momo-native-kits/references/InputDropDown.md +47 -0
- package/.claude/momo-native-kits/references/InputMoney.md +241 -0
- package/.claude/momo-native-kits/references/InputOTP.md +52 -0
- package/.claude/momo-native-kits/references/InputPhoneNumber.md +175 -0
- package/.claude/momo-native-kits/references/InputSearch.md +57 -0
- package/.claude/momo-native-kits/references/InputTextArea.md +46 -0
- package/.claude/momo-native-kits/references/NavigationContainer.md +51 -0
- package/.claude/momo-native-kits/references/Navigator.md +287 -0
- package/.claude/momo-native-kits/references/PaginationDot.md +28 -0
- package/.claude/momo-native-kits/references/PaginationNumber.md +28 -0
- package/.claude/momo-native-kits/references/PopupNotify.md +47 -0
- package/.claude/momo-native-kits/references/Radio.md +44 -0
- package/.claude/momo-native-kits/references/Skeleton.md +32 -0
- package/.claude/momo-native-kits/references/Switch.md +36 -0
- package/.claude/momo-native-kits/references/Tag.md +40 -0
- package/.claude/momo-native-kits/references/Text.md +37 -0
- package/.claude/momo-native-kits/references/Title.md +43 -0
- package/.claude/momo-native-kits/references/Tooltip.md +30 -0
- package/.claude/settings.local.json +13 -0
- package/building-skill-for-claude.md +1190 -0
- package/ios/Input/InputPhoneNumber.swift +2 -1
- package/package.json +1 -1
- package/build.gradle.kts +0 -11
- package/compose/build.gradle.kts +0 -180
- package/compose/build.gradle.kts.backup +0 -180
- package/compose/compose.podspec +0 -54
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -110
- package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
- package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +0 -57
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +0 -107
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +0 -201
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +0 -222
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +0 -48
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +0 -86
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +0 -305
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +0 -33
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +0 -720
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +0 -121
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +0 -405
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +0 -69
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +0 -85
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +0 -32
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +0 -340
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -198
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +0 -339
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -94
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +0 -136
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +0 -543
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +0 -23
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +0 -148
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +0 -188
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +0 -116
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +0 -448
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +0 -172
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +0 -255
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +0 -231
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +0 -233
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +0 -254
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +0 -241
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +0 -364
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +0 -56
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +0 -41
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +0 -92
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +0 -40
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +0 -352
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +0 -103
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +0 -70
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -17
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +0 -96
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +0 -96
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +0 -92
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +0 -130
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +0 -214
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +0 -576
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +0 -177
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +0 -205
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +0 -29
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +0 -239
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +0 -191
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +0 -306
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +0 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +0 -13
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -185
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +0 -285
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +0 -35
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -59
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +0 -68
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +0 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +0 -14
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +0 -50
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +0 -51
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +0 -239
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +0 -119
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +0 -98
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -161
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -331
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +0 -497
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +0 -162
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +0 -243
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +0 -86
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +0 -187
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +0 -279
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +0 -80
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +0 -306
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +0 -32
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +0 -370
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +0 -132
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +0 -42
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +0 -1329
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +0 -62
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +0 -15
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +0 -88
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -149
- package/gradle/libs.versions.toml +0 -57
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +0 -8
- package/gradle.properties +0 -26
- package/gradlew +0 -252
- package/gradlew.bat +0 -94
- package/settings.gradle.kts +0 -52
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: icon
|
|
3
|
+
description: Icon component for displaying icons. Use when adding visual icons to UI elements.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Icon
|
|
7
|
+
|
|
8
|
+
Icon component for displaying icons.
|
|
9
|
+
|
|
10
|
+
## Keywords
|
|
11
|
+
|
|
12
|
+
icon, biểu tượng
|
|
13
|
+
|
|
14
|
+
## API
|
|
15
|
+
|
|
16
|
+
```kotlin
|
|
17
|
+
@Composable
|
|
18
|
+
fun Icon(
|
|
19
|
+
source: String, // Icon name or URL
|
|
20
|
+
size: Dp = 24.dp,
|
|
21
|
+
color: Color? = AppTheme.current.colors.text.default,
|
|
22
|
+
modifier: Modifier = Modifier,
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
```kotlin
|
|
29
|
+
Icon(source = "home", size = 24.dp)
|
|
30
|
+
|
|
31
|
+
Icon(source = "settings", color = AppTheme.current.colors.primary)
|
|
32
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: image
|
|
3
|
+
description: Image component for displaying images. Use when adding image content to screens.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Image
|
|
7
|
+
|
|
8
|
+
Image component for displaying images.
|
|
9
|
+
|
|
10
|
+
## Keywords
|
|
11
|
+
|
|
12
|
+
image, hình ảnh, picture
|
|
13
|
+
|
|
14
|
+
## API
|
|
15
|
+
|
|
16
|
+
```kotlin
|
|
17
|
+
@Composable
|
|
18
|
+
fun Image(
|
|
19
|
+
source: Any, // URL or resource
|
|
20
|
+
modifier: Modifier = Modifier,
|
|
21
|
+
options: Options? = null,
|
|
22
|
+
loading: Boolean = true,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
data class Options(
|
|
26
|
+
val alignment: Alignment = Alignment.TopStart,
|
|
27
|
+
val contentScale: ContentScale = ContentScale.Crop,
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
```kotlin
|
|
34
|
+
Image(
|
|
35
|
+
source = "https://example.com/image.jpg",
|
|
36
|
+
modifier = Modifier.fillMaxWidth().height(200.dp)
|
|
37
|
+
)
|
|
38
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: information
|
|
3
|
+
description: Info banner component. Use when displaying informational messages, warnings, or success notifications.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Information
|
|
7
|
+
|
|
8
|
+
Info banner component.
|
|
9
|
+
|
|
10
|
+
## Keywords
|
|
11
|
+
|
|
12
|
+
info, information, thông báo, banner
|
|
13
|
+
|
|
14
|
+
## API
|
|
15
|
+
|
|
16
|
+
```kotlin
|
|
17
|
+
@Composable
|
|
18
|
+
fun Information(
|
|
19
|
+
title: String,
|
|
20
|
+
content: String? = null,
|
|
21
|
+
icon: String? = null,
|
|
22
|
+
type: InformationType = InformationType.INFO
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
enum class InformationType { INFO, WARNING, ERROR, SUCCESS }
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
```kotlin
|
|
31
|
+
Information(
|
|
32
|
+
title = "Info",
|
|
33
|
+
content = "Information here",
|
|
34
|
+
type = InformationType.INFO
|
|
35
|
+
)
|
|
36
|
+
```
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: input
|
|
3
|
+
description: Text input field with floating label support. Use when collecting text input from users.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Input
|
|
7
|
+
|
|
8
|
+
Text input field with floating label, validation, icons, and various states.
|
|
9
|
+
|
|
10
|
+
## API
|
|
11
|
+
|
|
12
|
+
```kotlin
|
|
13
|
+
@Composable
|
|
14
|
+
fun Input(
|
|
15
|
+
text: MutableState<String> = remember { mutableStateOf("") },
|
|
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 = "",
|
|
21
|
+
size: InputSize = InputSize.SMALL,
|
|
22
|
+
onChangeText: (String) -> Unit = {},
|
|
23
|
+
hintText: String = "",
|
|
24
|
+
error: String = "",
|
|
25
|
+
errorSpacing: Boolean = false,
|
|
26
|
+
disabled: Boolean = false,
|
|
27
|
+
readOnly: Boolean = false,
|
|
28
|
+
secureTextEntry: Boolean = false,
|
|
29
|
+
icon: String = "",
|
|
30
|
+
iconColor: Color = AppTheme.current.colors.text.default,
|
|
31
|
+
onRightIconPressed: () -> Unit = {},
|
|
32
|
+
leadingIcon: String = "",
|
|
33
|
+
leadingIconColor: Color = AppTheme.current.colors.text.hint,
|
|
34
|
+
onFocus: () -> Unit = {},
|
|
35
|
+
onBlur: () -> Unit = {},
|
|
36
|
+
loading: Boolean = false,
|
|
37
|
+
required: Boolean = false,
|
|
38
|
+
fontWeight: InputFontWeight = InputFontWeight.REGULAR,
|
|
39
|
+
keyboardType: KeyboardType = KeyboardType.Text,
|
|
40
|
+
modifier: Modifier = Modifier,
|
|
41
|
+
inputModifier: Modifier = Modifier,
|
|
42
|
+
)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Props
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Default | Description |
|
|
48
|
+
|------|------|---------|-------------|
|
|
49
|
+
| `text` | `MutableState<String>` | `""` | Current text value (required) |
|
|
50
|
+
| `floatingValue` | `String` | `""` | Floating label text |
|
|
51
|
+
| `floatingValueColor` | `Color` | hint color | Floating label color |
|
|
52
|
+
| `floatingIcon` | `String` | `""` | Icon next to floating label |
|
|
53
|
+
| `floatingIconColor` | `Color` | default color | Floating icon color |
|
|
54
|
+
| `placeholder` | `String` | `""` | Placeholder text |
|
|
55
|
+
| `size` | `InputSize` | `SMALL` | Input height |
|
|
56
|
+
| `onChangeText` | `(String) -> Unit` | `{}` | Text change callback |
|
|
57
|
+
| `hintText` | `String` | `""` | Hint text below input |
|
|
58
|
+
| `error` | `String` | `""` | Error message |
|
|
59
|
+
| `errorSpacing` | `Boolean` | `false` | Show spacing for error |
|
|
60
|
+
| `disabled` | `Boolean` | `false` | Disabled state |
|
|
61
|
+
| `readOnly` | `Boolean` | `false` | Read-only state |
|
|
62
|
+
| `secureTextEntry` | `Boolean` | `false` | Password field |
|
|
63
|
+
| `icon` | `String` | `""` | Right icon name |
|
|
64
|
+
| `iconColor` | `Color` | default color | Right icon color |
|
|
65
|
+
| `onRightIconPressed` | `() -> Unit` | `{}` | Right icon click |
|
|
66
|
+
| `leadingIcon` | `String` | `""` | Left icon name |
|
|
67
|
+
| `leadingIconColor` | `Color` | hint color | Left icon color |
|
|
68
|
+
| `onFocus` | `() -> Unit` | `{}` | Focus callback |
|
|
69
|
+
| `onBlur` | `() -> Unit` | `{}` | Blur callback |
|
|
70
|
+
| `loading` | `Boolean` | `false` | Loading spinner |
|
|
71
|
+
| `required` | `Boolean` | `false` | Show required asterisk |
|
|
72
|
+
| `fontWeight` | `InputFontWeight` | `REGULAR` | Text font weight |
|
|
73
|
+
| `keyboardType` | `KeyboardType` | `Text` | Keyboard type |
|
|
74
|
+
| `modifier` | `Modifier` | `Modifier` | Outer modifier |
|
|
75
|
+
| `inputModifier` | `Modifier` | `Modifier` | Input field modifier |
|
|
76
|
+
|
|
77
|
+
## InputSize
|
|
78
|
+
|
|
79
|
+
| Size | Height | Border Radius |
|
|
80
|
+
|------|--------|---------------|
|
|
81
|
+
| `SMALL` | 48dp | Radius.S |
|
|
82
|
+
| `LARGE` | 56dp | Radius.S |
|
|
83
|
+
|
|
84
|
+
## InputFontWeight
|
|
85
|
+
|
|
86
|
+
| Value | Description |
|
|
87
|
+
|-------|-------------|
|
|
88
|
+
| `REGULAR` | FontWeight 400 |
|
|
89
|
+
| `BOLD` | FontWeight 700 |
|
|
90
|
+
|
|
91
|
+
## States
|
|
92
|
+
|
|
93
|
+
- **Default**: Normal border color
|
|
94
|
+
- **Focused**: Primary border color (1.5dp)
|
|
95
|
+
- **Error**: Error border color + error message
|
|
96
|
+
- **Disabled**: Disable border color, reduced opacity
|
|
97
|
+
- **ReadOnly**: No border highlight
|
|
98
|
+
|
|
99
|
+
## Examples
|
|
100
|
+
|
|
101
|
+
### Basic Usage
|
|
102
|
+
|
|
103
|
+
```kotlin
|
|
104
|
+
val text = remember { mutableStateOf("") }
|
|
105
|
+
|
|
106
|
+
Input(
|
|
107
|
+
text = text,
|
|
108
|
+
onChangeText = { text.value = it }
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
// With floating label
|
|
112
|
+
Input(
|
|
113
|
+
text = text,
|
|
114
|
+
floatingValue = "Name",
|
|
115
|
+
onChangeText = { text.value = it }
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
// With placeholder
|
|
119
|
+
Input(
|
|
120
|
+
text = text,
|
|
121
|
+
placeholder = "Enter your name",
|
|
122
|
+
onChangeText = { text.value = it }
|
|
123
|
+
)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### With Error
|
|
127
|
+
|
|
128
|
+
```kotlin
|
|
129
|
+
val email = remember { mutableStateOf("") }
|
|
130
|
+
val emailError = remember { mutableStateOf("") }
|
|
131
|
+
|
|
132
|
+
// Show error message
|
|
133
|
+
Input(
|
|
134
|
+
text = email,
|
|
135
|
+
floatingValue = "Email",
|
|
136
|
+
error = "Invalid email address",
|
|
137
|
+
errorSpacing = true,
|
|
138
|
+
onChangeText = { email.value = it }
|
|
139
|
+
)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Password Field
|
|
143
|
+
|
|
144
|
+
```kotlin
|
|
145
|
+
val password = remember { mutableStateOf("") }
|
|
146
|
+
|
|
147
|
+
Input(
|
|
148
|
+
text = password,
|
|
149
|
+
floatingValue = "Password",
|
|
150
|
+
secureTextEntry = true,
|
|
151
|
+
onChangeText = { password.value = it }
|
|
152
|
+
)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### With Icons
|
|
156
|
+
|
|
157
|
+
```kotlin
|
|
158
|
+
val text = remember { mutableStateOf("") }
|
|
159
|
+
|
|
160
|
+
// Leading icon (left)
|
|
161
|
+
Input(
|
|
162
|
+
text = text,
|
|
163
|
+
floatingValue = "Username",
|
|
164
|
+
leadingIcon = "person",
|
|
165
|
+
leadingIconColor = AppTheme.current.colors.text.hint,
|
|
166
|
+
onChangeText = { text.value = it }
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
// Trailing icon (right)
|
|
170
|
+
Input(
|
|
171
|
+
text = text,
|
|
172
|
+
floatingValue = "Email",
|
|
173
|
+
icon = "close",
|
|
174
|
+
onRightIconPressed = { text.value = "" },
|
|
175
|
+
onChangeText = { text.value = it }
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
// Both icons
|
|
179
|
+
Input(
|
|
180
|
+
text = text,
|
|
181
|
+
floatingValue = "Search",
|
|
182
|
+
leadingIcon = "search",
|
|
183
|
+
icon = "clear",
|
|
184
|
+
onChangeText = { text.value = it }
|
|
185
|
+
)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### With Floating Label Icon
|
|
189
|
+
|
|
190
|
+
```kotlin
|
|
191
|
+
Input(
|
|
192
|
+
text = text,
|
|
193
|
+
floatingValue = "Phone",
|
|
194
|
+
floatingIcon = "phone",
|
|
195
|
+
floatingIconColor = AppTheme.current.colors.primary,
|
|
196
|
+
onChangeText = { text.value = it }
|
|
197
|
+
)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Required Field
|
|
201
|
+
|
|
202
|
+
```kotlin
|
|
203
|
+
Input(
|
|
204
|
+
text = text,
|
|
205
|
+
floatingValue = "Full Name",
|
|
206
|
+
required = true,
|
|
207
|
+
onChangeText = { text.value = it }
|
|
208
|
+
)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Disabled / ReadOnly
|
|
212
|
+
|
|
213
|
+
```kotlin
|
|
214
|
+
// Disabled
|
|
215
|
+
Input(
|
|
216
|
+
text = text,
|
|
217
|
+
floatingValue = "Disabled",
|
|
218
|
+
disabled = true,
|
|
219
|
+
onChangeText = { }
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
// Read only
|
|
223
|
+
Input(
|
|
224
|
+
text = text,
|
|
225
|
+
floatingValue = "Read Only",
|
|
226
|
+
readOnly = true,
|
|
227
|
+
onChangeText = { }
|
|
228
|
+
)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Keyboard Types
|
|
232
|
+
|
|
233
|
+
```kotlin
|
|
234
|
+
// Text keyboard (default)
|
|
235
|
+
Input(
|
|
236
|
+
text = text,
|
|
237
|
+
floatingValue = "Name",
|
|
238
|
+
keyboardType = KeyboardType.Text,
|
|
239
|
+
onChangeText = { }
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
// Number keyboard
|
|
243
|
+
Input(
|
|
244
|
+
text = text,
|
|
245
|
+
floatingValue = "Age",
|
|
246
|
+
keyboardType = KeyboardType.Number,
|
|
247
|
+
onChangeText = { }
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
// Email keyboard
|
|
251
|
+
Input(
|
|
252
|
+
text = text,
|
|
253
|
+
floatingValue = "Email",
|
|
254
|
+
keyboardType = KeyboardType.Email,
|
|
255
|
+
onChangeText = { }
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
// Phone keyboard
|
|
259
|
+
Input(
|
|
260
|
+
text = text,
|
|
261
|
+
floatingValue = "Phone",
|
|
262
|
+
keyboardType = KeyboardType.Phone,
|
|
263
|
+
onChangeText = { }
|
|
264
|
+
)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Focus Callbacks
|
|
268
|
+
|
|
269
|
+
```kotlin
|
|
270
|
+
Input(
|
|
271
|
+
text = text,
|
|
272
|
+
floatingValue = "Name",
|
|
273
|
+
onFocus = { /* show keyboard */ },
|
|
274
|
+
onBlur = { /* hide keyboard, validate */ },
|
|
275
|
+
onChangeText = { text.value = it }
|
|
276
|
+
)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Loading State
|
|
280
|
+
|
|
281
|
+
```kotlin
|
|
282
|
+
Input(
|
|
283
|
+
text = text,
|
|
284
|
+
floatingValue = "Loading",
|
|
285
|
+
loading = true,
|
|
286
|
+
onChangeText = { text.value = it }
|
|
287
|
+
)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Hint Text
|
|
291
|
+
|
|
292
|
+
```kotlin
|
|
293
|
+
Input(
|
|
294
|
+
text = text,
|
|
295
|
+
floatingValue = "Email",
|
|
296
|
+
hintText = "We will never share your email",
|
|
297
|
+
onChangeText = { text.value = it }
|
|
298
|
+
)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Large Size
|
|
302
|
+
|
|
303
|
+
```kotlin
|
|
304
|
+
Input(
|
|
305
|
+
text = text,
|
|
306
|
+
floatingValue = "Large Input",
|
|
307
|
+
size = InputSize.LARGE,
|
|
308
|
+
onChangeText = { text.value = it }
|
|
309
|
+
)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Bold Font Weight
|
|
313
|
+
|
|
314
|
+
```kotlin
|
|
315
|
+
Input(
|
|
316
|
+
text = text,
|
|
317
|
+
floatingValue = "Bold Text",
|
|
318
|
+
fontWeight = InputFontWeight.BOLD,
|
|
319
|
+
onChangeText = { text.value = it }
|
|
320
|
+
)
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Auto-Clear Behavior
|
|
324
|
+
|
|
325
|
+
When focused with text:
|
|
326
|
+
- Clear icon appears on the right
|
|
327
|
+
- Clicking clears the text and triggers `onChangeText("")`
|
|
328
|
+
|
|
329
|
+
## Password Toggle
|
|
330
|
+
|
|
331
|
+
When `secureTextEntry = true`:
|
|
332
|
+
- Eye icon appears on the right
|
|
333
|
+
- Clicking toggles between show/hide password
|
|
334
|
+
- Default icon: `24_security_eye_open` (show) / `24_security_eye_off` (hide)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: input-dropdown
|
|
3
|
+
description: Dropdown selection input. Use when user needs to select one option from a list.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# InputDropDown
|
|
7
|
+
|
|
8
|
+
Dropdown selection input.
|
|
9
|
+
|
|
10
|
+
## Keywords
|
|
11
|
+
|
|
12
|
+
dropdown, select, chọn, danh mục, picker
|
|
13
|
+
|
|
14
|
+
## API
|
|
15
|
+
|
|
16
|
+
```kotlin
|
|
17
|
+
@Composable
|
|
18
|
+
fun InputDropDown(
|
|
19
|
+
text: MutableState<String>,
|
|
20
|
+
items: List<String> = emptyList(),
|
|
21
|
+
onItemSelected: (String, Int) -> Unit = { _, _ -> },
|
|
22
|
+
floatingValue: String = "",
|
|
23
|
+
placeholder: String = "",
|
|
24
|
+
error: String = "",
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- List of string items
|
|
31
|
+
- Returns selected item and index
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
```kotlin
|
|
36
|
+
val selected = remember { mutableStateOf("") }
|
|
37
|
+
val items = listOf("Option 1", "Option 2", "Option 3")
|
|
38
|
+
|
|
39
|
+
InputDropDown(
|
|
40
|
+
text = selected,
|
|
41
|
+
items = items,
|
|
42
|
+
floatingValue = "Select",
|
|
43
|
+
onItemSelected = { item, index ->
|
|
44
|
+
selected.value = item
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
```
|