@momo-kits/native-kits 0.157.1-skill.3 → 0.157.1-skill.6-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/skills/momo-native-kits-skills/README.md +52 -0
- package/.claude/skills/momo-native-kits-skills/SKILL.md +32 -0
- package/.claude/skills/momo-native-kits-skills/data-display/SKILL.md +42 -0
- package/.claude/skills/momo-native-kits-skills/feedback/SKILL.md +43 -0
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/popup.md +3 -10
- package/.claude/skills/momo-native-kits-skills/form-controls/SKILL.md +42 -0
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/button.md +2 -3
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/input.md +3 -7
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/radio.md +9 -9
- package/.claude/skills/momo-native-kits-skills/layout/SKILL.md +39 -0
- package/.claude/skills/momo-native-kits-skills/navigation/SKILL.md +38 -0
- package/.claude/skills/momo-native-kits-skills/output/test-report.json +12 -0
- package/.claude/skills/momo-native-kits-skills/output/validation-result.json +108 -0
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills}/references/constants.md +81 -6
- package/.claude/skills/momo-native-kits-skills/references/design-guidelines.md +130 -0
- package/.claude/skills/momo-native-kits-skills/references/developer/android-compose.md +29 -0
- package/.claude/skills/momo-native-kits-skills/references/developer/code-convention.md +118 -0
- package/.claude/skills/momo-native-kits-skills/references/developer/compose-multiplatform.md +29 -0
- package/.claude/skills/momo-native-kits-skills/scripts/logger.js +63 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/badge.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/bottomtab.js +19 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/button.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/card.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/checkbox.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/chip.js +59 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/divider.js +19 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/global.js +61 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/index.js +54 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/input.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/navigation.js +48 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/popup.js +45 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/radio.js +105 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/skeleton.js +20 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/snackbar.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/state.js +21 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/switch.js +45 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/text.js +19 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/tooltip.js +45 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/trustbanner.js +22 -0
- package/.claude/skills/momo-native-kits-skills/scripts/test-on-device.sh +117 -0
- package/.claude/skills/momo-native-kits-skills/scripts/test-runner.js +167 -0
- package/.claude/skills/momo-native-kits-skills/scripts/validate-kits.js +131 -0
- package/.momo-agent.json +13 -0
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +180 -0
- package/compose/build.gradle.kts.backup +180 -0
- package/compose/compose.podspec +54 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
- 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 +57 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
- package/gradle/libs.versions.toml +57 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/package.json +1 -1
- package/settings.gradle.kts +52 -0
- package/.claude/momo-native-kits-skill/SKILL.md +0 -51
- package/.claude/momo-native-kits-skill/evals/evals.json +0 -95
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json +0 -20
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.md +0 -13
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/with_skill/outputs/ButtonExample.kt +0 -55
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/without_skill/outputs/ButtonExample.kt +0 -45
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs/InputPhoneExample.kt +0 -40
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs/InputPhoneExample.kt +0 -42
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs/BottomTabExample.kt +0 -236
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs/BottomTabExample.kt +0 -152
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs/CheckBoxExample.kt +0 -49
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs/CheckBoxExample.kt +0 -123
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs/DateTimePickerExample.kt +0 -318
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs/DateTimePickerExample.kt +0 -330
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs/CardExample.kt +0 -124
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/without_skill/outputs/CardExample.kt +0 -71
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/with_skill/outputs/LoginFormExample.kt +0 -134
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/without_skill/outputs/LoginFormExample.kt +0 -199
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -224
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/without_skill/outputs/NavigationContainerExample.kt +0 -225
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs/PopupExample.kt +0 -79
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs/PopupExample.kt +0 -169
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -255
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -212
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs/SkeletonExample.kt +0 -199
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/without_skill/outputs/SkeletonExample.kt +0 -229
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.json +0 -20
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.md +0 -13
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/eval_metadata.json +0 -22
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/outputs/PrimaryButtonExample.kt +0 -38
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/outputs/PrimaryButtonExample.kt +0 -83
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json +0 -22
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -547
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/outputs/MoMoNavigationContainer.kt +0 -519
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json +0 -27
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -429
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -353
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/timing.json +0 -5
- package/.claude/settings.local.json +0 -41
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/badge.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/chip.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/skeleton.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/text.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/snackbar.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/tooltip.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/trustbanner.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/checkbox.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/switch.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/card.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/divider.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/navigation}/references/navigation.md +0 -0
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
package com.example.momoapp
|
|
2
|
-
|
|
3
|
-
import androidx.compose.foundation.layout.Box
|
|
4
|
-
import androidx.compose.foundation.layout.fillMaxSize
|
|
5
|
-
import androidx.compose.foundation.layout.padding
|
|
6
|
-
import androidx.compose.material3.Text
|
|
7
|
-
import androidx.compose.runtime.Composable
|
|
8
|
-
import androidx.compose.ui.Alignment
|
|
9
|
-
import androidx.compose.ui.Modifier
|
|
10
|
-
import androidx.compose.ui.unit.dp
|
|
11
|
-
import vn.momo.kits.navigation.BottomTab
|
|
12
|
-
import vn.momo.kits.navigation.BottomTabItem
|
|
13
|
-
import vn.momo.kits.navigation.NavigationOptions
|
|
14
|
-
import vn.momo.kits.navigation.StackScreen
|
|
15
|
-
import vn.momo.kits.navigation.component.HeaderType
|
|
16
|
-
import vn.momo.kits.components.Title
|
|
17
|
-
import vn.momo.kits.components.TitleType
|
|
18
|
-
import vn.momo.kits.navigation.component.Header
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* MoMo App Bottom Tab Navigation Example
|
|
22
|
-
*
|
|
23
|
-
* This example demonstrates how to implement a bottom tab navigation
|
|
24
|
-
* with 4 tabs: Home, Wallet, History, Profile
|
|
25
|
-
*/
|
|
26
|
-
@Composable
|
|
27
|
-
fun MoMoApp() {
|
|
28
|
-
BottomTab(
|
|
29
|
-
items = listOf(
|
|
30
|
-
// Home Tab
|
|
31
|
-
BottomTabItem(
|
|
32
|
-
name = "home",
|
|
33
|
-
label = "Trang chủ",
|
|
34
|
-
icon = "ic_home",
|
|
35
|
-
screen = {
|
|
36
|
-
StackScreen(
|
|
37
|
-
navigationOptions = NavigationOptions(
|
|
38
|
-
headerType = HeaderType.DEFAULT,
|
|
39
|
-
isShowBottomTab = true
|
|
40
|
-
)
|
|
41
|
-
) {
|
|
42
|
-
HomeScreen()
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
|
|
47
|
-
// Wallet Tab
|
|
48
|
-
BottomTabItem(
|
|
49
|
-
name = "wallet",
|
|
50
|
-
label = "Ví của tôi",
|
|
51
|
-
icon = "ic_wallet",
|
|
52
|
-
screen = {
|
|
53
|
-
StackScreen(
|
|
54
|
-
navigationOptions = NavigationOptions(
|
|
55
|
-
headerType = HeaderType.DEFAULT,
|
|
56
|
-
isShowBottomTab = true
|
|
57
|
-
)
|
|
58
|
-
) {
|
|
59
|
-
WalletScreen()
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
|
|
64
|
-
// History Tab
|
|
65
|
-
BottomTabItem(
|
|
66
|
-
name = "history",
|
|
67
|
-
label = "Lịch sử",
|
|
68
|
-
icon = "ic_history",
|
|
69
|
-
screen = {
|
|
70
|
-
StackScreen(
|
|
71
|
-
navigationOptions = NavigationOptions(
|
|
72
|
-
headerType = HeaderType.DEFAULT,
|
|
73
|
-
isShowBottomTab = true
|
|
74
|
-
)
|
|
75
|
-
) {
|
|
76
|
-
HistoryScreen()
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
|
|
81
|
-
// Profile Tab
|
|
82
|
-
BottomTabItem(
|
|
83
|
-
name = "profile",
|
|
84
|
-
label = "Tài khoản",
|
|
85
|
-
icon = "ic_profile",
|
|
86
|
-
screen = {
|
|
87
|
-
StackScreen(
|
|
88
|
-
navigationOptions = NavigationOptions(
|
|
89
|
-
headerType = HeaderType.DEFAULT,
|
|
90
|
-
isShowBottomTab = true
|
|
91
|
-
)
|
|
92
|
-
) {
|
|
93
|
-
ProfileScreen()
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
)
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// ==================== Screen Composables ====================
|
|
102
|
-
|
|
103
|
-
@Composable
|
|
104
|
-
private fun HomeScreen() {
|
|
105
|
-
Box(
|
|
106
|
-
modifier = Modifier
|
|
107
|
-
.fillMaxSize()
|
|
108
|
-
.padding(16.dp),
|
|
109
|
-
contentAlignment = Alignment.Center
|
|
110
|
-
) {
|
|
111
|
-
Title(
|
|
112
|
-
text = "Trang chủ",
|
|
113
|
-
type = TitleType.TITLE_1
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@Composable
|
|
119
|
-
private fun WalletScreen() {
|
|
120
|
-
Box(
|
|
121
|
-
modifier = Modifier
|
|
122
|
-
.fillMaxSize()
|
|
123
|
-
.padding(16.dp),
|
|
124
|
-
contentAlignment = Alignment.Center
|
|
125
|
-
) {
|
|
126
|
-
Title(
|
|
127
|
-
text = "Ví của tôi",
|
|
128
|
-
type = TitleType.TITLE_1
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@Composable
|
|
134
|
-
private fun HistoryScreen() {
|
|
135
|
-
Box(
|
|
136
|
-
modifier = Modifier
|
|
137
|
-
.fillMaxSize()
|
|
138
|
-
.padding(16.dp),
|
|
139
|
-
contentAlignment = Alignment.Center
|
|
140
|
-
) {
|
|
141
|
-
Title(
|
|
142
|
-
text = "Lịch sử giao dịch",
|
|
143
|
-
type = TitleType.TITLE_1
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
@Composable
|
|
149
|
-
private fun ProfileScreen() {
|
|
150
|
-
Box(
|
|
151
|
-
modifier = Modifier
|
|
152
|
-
.fillMaxSize()
|
|
153
|
-
.padding(16.dp),
|
|
154
|
-
contentAlignment = Alignment.Center
|
|
155
|
-
) {
|
|
156
|
-
Title(
|
|
157
|
-
text = "Tài khoản",
|
|
158
|
-
type = TitleType.TITLE_1
|
|
159
|
-
)
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// ==================== Alternative: With Badge Example ====================
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Example showing how to add badges/dots to tabs
|
|
167
|
-
*/
|
|
168
|
-
@Composable
|
|
169
|
-
fun MoMoAppWithBadges() {
|
|
170
|
-
BottomTab(
|
|
171
|
-
items = listOf(
|
|
172
|
-
BottomTabItem(
|
|
173
|
-
name = "home",
|
|
174
|
-
label = "Trang chủ",
|
|
175
|
-
icon = "ic_home",
|
|
176
|
-
screen = {
|
|
177
|
-
StackScreen(
|
|
178
|
-
navigationOptions = NavigationOptions(
|
|
179
|
-
headerType = HeaderType.DEFAULT,
|
|
180
|
-
isShowBottomTab = true
|
|
181
|
-
)
|
|
182
|
-
) {
|
|
183
|
-
HomeScreen()
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
BottomTabItem(
|
|
188
|
-
name = "wallet",
|
|
189
|
-
label = "Ví của tôi",
|
|
190
|
-
icon = "ic_wallet",
|
|
191
|
-
showDot = true, // Shows notification dot
|
|
192
|
-
screen = {
|
|
193
|
-
StackScreen(
|
|
194
|
-
navigationOptions = NavigationOptions(
|
|
195
|
-
headerType = HeaderType.DEFAULT,
|
|
196
|
-
isShowBottomTab = true
|
|
197
|
-
)
|
|
198
|
-
) {
|
|
199
|
-
WalletScreen()
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
),
|
|
203
|
-
BottomTabItem(
|
|
204
|
-
name = "history",
|
|
205
|
-
label = "Lịch sử",
|
|
206
|
-
icon = "ic_history",
|
|
207
|
-
badgeLabel = "3", // Shows badge with number
|
|
208
|
-
screen = {
|
|
209
|
-
StackScreen(
|
|
210
|
-
navigationOptions = NavigationOptions(
|
|
211
|
-
headerType = HeaderType.DEFAULT,
|
|
212
|
-
isShowBottomTab = true
|
|
213
|
-
)
|
|
214
|
-
) {
|
|
215
|
-
HistoryScreen()
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
BottomTabItem(
|
|
220
|
-
name = "profile",
|
|
221
|
-
label = "Tài khoản",
|
|
222
|
-
icon = "ic_profile",
|
|
223
|
-
screen = {
|
|
224
|
-
StackScreen(
|
|
225
|
-
navigationOptions = NavigationOptions(
|
|
226
|
-
headerType = HeaderType.DEFAULT,
|
|
227
|
-
isShowBottomTab = true
|
|
228
|
-
)
|
|
229
|
-
) {
|
|
230
|
-
ProfileScreen()
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
)
|
|
234
|
-
)
|
|
235
|
-
)
|
|
236
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
package com.momo.app.ui.navigation
|
|
2
|
-
|
|
3
|
-
import androidx.compose.foundation.layout.padding
|
|
4
|
-
import androidx.compose.material.icons.Icons
|
|
5
|
-
import androidx.compose.material.icons.filled.Home
|
|
6
|
-
import androidx.compose.material.icons.filled.Person
|
|
7
|
-
import androidx.compose.material.icons.filled.Receipt
|
|
8
|
-
import androidx.compose.material.icons.filled.Wallet
|
|
9
|
-
import androidx.compose.material.icons.outlined.Home
|
|
10
|
-
import androidx.compose.material.icons.outlined.Person
|
|
11
|
-
import androidx.compose.material.icons.outlined.Receipt
|
|
12
|
-
import androidx.compose.material.icons.outlined.Wallet
|
|
13
|
-
import androidx.compose.material3.Icon
|
|
14
|
-
import androidx.compose.material3.NavigationBar
|
|
15
|
-
import androidx.compose.material3.NavigationBarItem
|
|
16
|
-
import androidx.compose.material3.Scaffold
|
|
17
|
-
import androidx.compose.material3.Text
|
|
18
|
-
import androidx.compose.runtime.Composable
|
|
19
|
-
import androidx.compose.runtime.getValue
|
|
20
|
-
import androidx.compose.ui.Modifier
|
|
21
|
-
import androidx.compose.ui.graphics.vector.ImageVector
|
|
22
|
-
import androidx.navigation.NavDestination.Companion.hierarchy
|
|
23
|
-
import androidx.navigation.NavGraph.Companion.findStartDestination
|
|
24
|
-
import androidx.navigation.compose.NavHost
|
|
25
|
-
import androidx.navigation.compose.composable
|
|
26
|
-
import androidx.navigation.compose.currentBackStackEntryAsState
|
|
27
|
-
import androidx.navigation.compose.rememberNavController
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Bottom Tab Navigation with 4 tabs: Home, Wallet, History, Profile
|
|
31
|
-
* Designed for MoMo app
|
|
32
|
-
*/
|
|
33
|
-
sealed class BottomNavItem(
|
|
34
|
-
val route: String,
|
|
35
|
-
val title: String,
|
|
36
|
-
val selectedIcon: ImageVector,
|
|
37
|
-
val unselectedIcon: ImageVector
|
|
38
|
-
) {
|
|
39
|
-
data object Home : BottomNavItem(
|
|
40
|
-
route = "home",
|
|
41
|
-
title = "Home",
|
|
42
|
-
selectedIcon = Icons.Filled.Home,
|
|
43
|
-
unselectedIcon = Icons.Outlined.Home
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
data object Wallet : BottomNavItem(
|
|
47
|
-
route = "wallet",
|
|
48
|
-
title = "Wallet",
|
|
49
|
-
selectedIcon = Icons.Filled.Wallet,
|
|
50
|
-
unselectedIcon = Icons.Outlined.Wallet
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
data object History : BottomNavItem(
|
|
54
|
-
route = "history",
|
|
55
|
-
title = "History",
|
|
56
|
-
selectedIcon = Icons.Filled.Receipt,
|
|
57
|
-
unselectedIcon = Icons.Outlined.Receipt
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
data object Profile : BottomNavItem(
|
|
61
|
-
route = "profile",
|
|
62
|
-
title = "Profile",
|
|
63
|
-
selectedIcon = Icons.Filled.Person,
|
|
64
|
-
unselectedIcon = Icons.Outlined.Person
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@Composable
|
|
69
|
-
fun BottomTabNavigation() {
|
|
70
|
-
val navController = rememberNavController()
|
|
71
|
-
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
|
72
|
-
val currentDestination = navBackStackEntry?.destination
|
|
73
|
-
|
|
74
|
-
val bottomNavItems = listOf(
|
|
75
|
-
BottomNavItem.Home,
|
|
76
|
-
BottomNavItem.Wallet,
|
|
77
|
-
BottomNavItem.History,
|
|
78
|
-
BottomNavItem.Profile
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
Scaffold(
|
|
82
|
-
bottomBar = {
|
|
83
|
-
NavigationBar {
|
|
84
|
-
bottomNavItems.forEach { item ->
|
|
85
|
-
val selected = currentDestination?.hierarchy?.any { it.route == item.route } == true
|
|
86
|
-
|
|
87
|
-
NavigationBarItem(
|
|
88
|
-
selected = selected,
|
|
89
|
-
onClick = {
|
|
90
|
-
navController.navigate(item.route) {
|
|
91
|
-
popUpTo(navController.graph.findStartDestination().id) {
|
|
92
|
-
saveState = true
|
|
93
|
-
}
|
|
94
|
-
launchSingleTop = true
|
|
95
|
-
restoreState = true
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
icon = {
|
|
99
|
-
Icon(
|
|
100
|
-
imageVector = if (selected) item.selectedIcon else item.unselectedIcon,
|
|
101
|
-
contentDescription = item.title
|
|
102
|
-
)
|
|
103
|
-
},
|
|
104
|
-
label = {
|
|
105
|
-
Text(text = item.title)
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
) { paddingValues ->
|
|
112
|
-
NavHost(
|
|
113
|
-
navController = navController,
|
|
114
|
-
startDestination = BottomNavItem.Home.route,
|
|
115
|
-
modifier = Modifier.padding(paddingValues)
|
|
116
|
-
) {
|
|
117
|
-
composable(BottomNavItem.Home.route) {
|
|
118
|
-
HomeScreen()
|
|
119
|
-
}
|
|
120
|
-
composable(BottomNavItem.Wallet.route) {
|
|
121
|
-
WalletScreen()
|
|
122
|
-
}
|
|
123
|
-
composable(BottomNavItem.History.route) {
|
|
124
|
-
HistoryScreen()
|
|
125
|
-
}
|
|
126
|
-
composable(BottomNavItem.Profile.route) {
|
|
127
|
-
ProfileScreen()
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Placeholder screens for each tab
|
|
134
|
-
@Composable
|
|
135
|
-
private fun HomeScreen() {
|
|
136
|
-
Text(text = "Home Screen")
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
@Composable
|
|
140
|
-
private fun WalletScreen() {
|
|
141
|
-
Text(text = "Wallet Screen")
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
@Composable
|
|
145
|
-
private fun HistoryScreen() {
|
|
146
|
-
Text(text = "History Screen")
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@Composable
|
|
150
|
-
private fun ProfileScreen() {
|
|
151
|
-
Text(text = "Profile Screen")
|
|
152
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
package com.example
|
|
2
|
-
|
|
3
|
-
import androidx.compose.foundation.layout.Column
|
|
4
|
-
import androidx.compose.foundation.layout.Spacer
|
|
5
|
-
import androidx.compose.foundation.layout.height
|
|
6
|
-
import androidx.compose.foundation.layout.padding
|
|
7
|
-
import androidx.compose.runtime.getValue
|
|
8
|
-
import androidx.compose.runtime.mutableStateOf
|
|
9
|
-
import androidx.compose.runtime.remember
|
|
10
|
-
import androidx.compose.runtime.setValue
|
|
11
|
-
import androidx.compose.ui.Modifier
|
|
12
|
-
import androidx.compose.ui.unit.dp
|
|
13
|
-
import vn.momo.kits.components.Button
|
|
14
|
-
import vn.momo.kits.components.ButtonType
|
|
15
|
-
import vn.momo.kits.components.CheckBox
|
|
16
|
-
import vn.momo.kits.components.Size
|
|
17
|
-
import vn.momo.kits.const.Spacing
|
|
18
|
-
|
|
19
|
-
@Composable
|
|
20
|
-
fun TermsAndConditionsScreen() {
|
|
21
|
-
var isAgreed by remember { mutableStateOf(false) }
|
|
22
|
-
|
|
23
|
-
Column(
|
|
24
|
-
modifier = Modifier.padding(Spacing.L)
|
|
25
|
-
) {
|
|
26
|
-
// Checkbox for terms and conditions agreement
|
|
27
|
-
CheckBox(
|
|
28
|
-
checked = isAgreed,
|
|
29
|
-
onCheckedChange = { isAgreed = it },
|
|
30
|
-
label = "Tôi đồng ý với Điều khoản dịch vụ và Chính sách bảo mật",
|
|
31
|
-
enabled = true
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
Spacer(modifier = Modifier.height(Spacing.XL))
|
|
35
|
-
|
|
36
|
-
// Submit button that is enabled only when checkbox is checked
|
|
37
|
-
Button(
|
|
38
|
-
onClick = {
|
|
39
|
-
// Handle terms acceptance submission
|
|
40
|
-
// Navigate to next screen or process registration
|
|
41
|
-
},
|
|
42
|
-
title = "Tiếp tục",
|
|
43
|
-
type = ButtonType.PRIMARY,
|
|
44
|
-
size = Size.LARGE,
|
|
45
|
-
isFull = true,
|
|
46
|
-
enabled = isAgreed
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
package com.example.checkbox
|
|
2
|
-
|
|
3
|
-
import androidx.compose.foundation.layout.Column
|
|
4
|
-
import androidx.compose.foundation.layout.Row
|
|
5
|
-
import androidx.compose.foundation.layout.Spacer
|
|
6
|
-
import androidx.compose.foundation.layout.fillMaxWidth
|
|
7
|
-
import androidx.compose.foundation.layout.height
|
|
8
|
-
import androidx.compose.foundation.layout.padding
|
|
9
|
-
import androidx.compose.foundation.layout.width
|
|
10
|
-
import androidx.compose.material3.Button
|
|
11
|
-
import androidx.compose.material3.Checkbox
|
|
12
|
-
import androidx.compose.material3.MaterialTheme
|
|
13
|
-
import androidx.compose.material3.Text
|
|
14
|
-
import androidx.compose.material3.TextButton
|
|
15
|
-
import androidx.compose.runtime.Composable
|
|
16
|
-
import androidx.compose.runtime.getValue
|
|
17
|
-
import androidx.compose.runtime.mutableStateOf
|
|
18
|
-
import androidx.compose.runtime.remember
|
|
19
|
-
import androidx.compose.runtime.setValue
|
|
20
|
-
import androidx.compose.ui.Alignment
|
|
21
|
-
import androidx.compose.ui.Modifier
|
|
22
|
-
import androidx.compose.ui.text.style.TextDecoration
|
|
23
|
-
import androidx.compose.ui.unit.dp
|
|
24
|
-
|
|
25
|
-
@Composable
|
|
26
|
-
fun TermsAndConditionsCheckbox(
|
|
27
|
-
onTermsAccepted: (Boolean) -> Unit,
|
|
28
|
-
modifier: Modifier = Modifier
|
|
29
|
-
) {
|
|
30
|
-
var isChecked by remember { mutableStateOf(false) }
|
|
31
|
-
|
|
32
|
-
Row(
|
|
33
|
-
modifier = modifier
|
|
34
|
-
.fillMaxWidth()
|
|
35
|
-
.padding(vertical = 8.dp),
|
|
36
|
-
verticalAlignment = Alignment.CenterVertically
|
|
37
|
-
) {
|
|
38
|
-
Checkbox(
|
|
39
|
-
checked = isChecked,
|
|
40
|
-
onCheckedChange = { newValue ->
|
|
41
|
-
isChecked = newValue
|
|
42
|
-
onTermsAccepted(newValue)
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
Spacer(modifier = Modifier.width(8.dp))
|
|
47
|
-
|
|
48
|
-
Column(modifier = Modifier.weight(1f)) {
|
|
49
|
-
Row(verticalAlignment = Alignment.CenterVertically) {
|
|
50
|
-
Text(
|
|
51
|
-
text = "I agree to the",
|
|
52
|
-
style = MaterialTheme.typography.bodyMedium
|
|
53
|
-
)
|
|
54
|
-
TextButton(onClick = { /* Open terms */ }) {
|
|
55
|
-
Text(
|
|
56
|
-
text = "Terms and Conditions",
|
|
57
|
-
style = MaterialTheme.typography.bodyMedium,
|
|
58
|
-
textDecoration = TextDecoration.Underline,
|
|
59
|
-
color = MaterialTheme.colorScheme.primary
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
Text(
|
|
65
|
-
text = "and",
|
|
66
|
-
style = MaterialTheme.typography.bodyMedium
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
TextButton(onClick = { /* Open privacy policy */ }) {
|
|
70
|
-
Text(
|
|
71
|
-
text = "Privacy Policy",
|
|
72
|
-
style = MaterialTheme.typography.bodyMedium,
|
|
73
|
-
textDecoration = TextDecoration.Underline,
|
|
74
|
-
color = MaterialTheme.colorScheme.primary
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@Composable
|
|
82
|
-
fun CheckBoxExample(
|
|
83
|
-
modifier: Modifier = Modifier
|
|
84
|
-
) {
|
|
85
|
-
var termsAccepted by remember { mutableStateOf(false) }
|
|
86
|
-
|
|
87
|
-
Column(
|
|
88
|
-
modifier = modifier
|
|
89
|
-
.fillMaxWidth()
|
|
90
|
-
.padding(16.dp)
|
|
91
|
-
) {
|
|
92
|
-
Text(
|
|
93
|
-
text = "Create Account",
|
|
94
|
-
style = MaterialTheme.typography.headlineMedium,
|
|
95
|
-
modifier = Modifier.padding(bottom = 24.dp)
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
TermsAndConditionsCheckbox(
|
|
99
|
-
onTermsAccepted = { accepted ->
|
|
100
|
-
termsAccepted = accepted
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
Spacer(modifier = Modifier.height(24.dp))
|
|
105
|
-
|
|
106
|
-
Button(
|
|
107
|
-
onClick = { /* Handle signup */ },
|
|
108
|
-
enabled = termsAccepted,
|
|
109
|
-
modifier = Modifier.fillMaxWidth()
|
|
110
|
-
) {
|
|
111
|
-
Text(text = "Sign Up")
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (!termsAccepted) {
|
|
115
|
-
Spacer(modifier = Modifier.height(8.dp))
|
|
116
|
-
Text(
|
|
117
|
-
text = "Please accept the terms and conditions to continue",
|
|
118
|
-
style = MaterialTheme.typography.bodySmall,
|
|
119
|
-
color = MaterialTheme.colorScheme.error
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|