@momo-kits/native-kits 0.162.2-beta.26 → 0.162.2-beta.27-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.md +1 -1
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +190 -0
- package/compose/build.gradle.kts.backup +190 -0
- package/compose/compose.podspec +47 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +123 -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 +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +101 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +183 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +207 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +39 -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 +294 -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 +826 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +107 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +378 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +82 -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 +338 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +356 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +113 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +128 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -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 +140 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +112 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +477 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +114 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +214 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +240 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +216 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +259 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +182 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +343 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -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 +84 -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 +328 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +97 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +310 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -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 +90 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +323 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +217 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +473 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +199 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +91 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +470 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +88 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +131 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +203 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +498 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +175 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -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 +234 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +188 -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 +16 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +270 -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 +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -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 +104 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -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 +253 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +129 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +100 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +154 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +360 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +581 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +156 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +225 -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 +169 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +320 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +81 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +309 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +34 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +360 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +128 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +70 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +58 -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 +55 -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 +105 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +32 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +184 -0
- package/gradle/libs.versions.toml +69 -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/ios/Application/ApplicationEnvironment.swift +0 -11
- package/ios/Application/Components.swift +44 -34
- package/ios/Application/FloatingButton.swift +9 -10
- package/ios/Application/HeaderRight.swift +45 -79
- package/ios/Application/Screen.swift +1 -2
- package/ios/Badge/Badge.swift +14 -11
- package/ios/Badge/BadgeRibbon.swift +21 -12
- package/ios/Button/Button.swift +22 -61
- package/ios/Checkbox/Checkbox.swift +13 -14
- package/ios/Chip/Chip.swift +9 -23
- package/ios/Colors+Radius+Spacing/Colors.swift +12 -12
- package/ios/Extensions/Color++.swift +0 -32
- package/ios/Icon/Icon.swift +1 -6
- package/ios/Input/Input.swift +25 -41
- package/ios/Input/InputPhoneNumber.swift +19 -20
- package/ios/Input/InputSearch.swift +47 -100
- package/ios/Input/InputTextArea.swift +40 -66
- package/ios/Popup/PopupDisplay.swift +16 -8
- package/ios/Popup/PopupInput.swift +8 -2
- package/ios/Swipeable/SwipeCell.swift +0 -185
- package/ios/Swipeable/SwipeCellModel.swift +0 -21
- package/ios/Typography/Text.swift +5 -79
- package/ios/Typography/Typography.swift +0 -3
- package/ios/native-kits.podspec +8 -61
- package/package.json +1 -1
- package/publish.sh +0 -50
- package/settings.gradle.kts +64 -0
- package/.claude/settings.local.json +0 -39
- package/ios/Application/Navigation/BottomTab/BottomTab.swift +0 -103
- package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +0 -215
- package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +0 -65
- package/ios/Application/Navigation/HeaderBackProps.swift +0 -66
- package/ios/Application/Navigation/HeaderTitle.swift +0 -57
- package/ios/Application/Navigation/HeaderUser.swift +0 -209
- package/ios/Application/Navigation/NavigationContainer.swift +0 -176
- package/ios/Application/Navigation/NavigationOptions.swift +0 -109
- package/ios/Application/Navigation/Navigator.swift +0 -364
- package/ios/Application/Navigation/Overplay/BottomSheet.swift +0 -188
- package/ios/Application/Navigation/Overplay/ModalScreen.swift +0 -68
- package/ios/Application/Navigation/Overplay/SnackBar.swift +0 -144
- package/ios/Application/Navigation/component/Header.swift +0 -178
- package/ios/Application/Navigation/component/HeaderBackground.swift +0 -83
- package/ios/Application/Navigation/component/HeaderColor.swift +0 -65
- package/ios/Application/StackScreen.swift +0 -453
- package/ios/Avatar/Avatar.swift +0 -193
- package/ios/BaselineView/BaselineView.swift +0 -163
- package/ios/Carousel/Carousel.swift +0 -181
- package/ios/Collapse/Collapse.swift +0 -182
- package/ios/Colors+Radius+Spacing/Theme.swift +0 -295
- package/ios/DateTimePicker/DateTimePicker.swift +0 -210
- package/ios/DateTimePicker/DateTimePickerTypes.swift +0 -55
- package/ios/DateTimePicker/DateTimePickerUtils.swift +0 -167
- package/ios/DateTimePicker/WheelPicker.swift +0 -161
- package/ios/Divider/Divider.swift +0 -16
- package/ios/IconButton/IconButton.swift +0 -112
- package/ios/InputDropDown/InputDropDown.swift +0 -198
- package/ios/InputMoney/InputMoney.swift +0 -335
- package/ios/InputOTP/InputOTP.swift +0 -210
- package/ios/Loader/Loader.swift +0 -113
- package/ios/MoMoUIKits.podspec +0 -5
- package/ios/Pagination/PaginationDot.swift +0 -61
- package/ios/Pagination/PaginationNumber.swift +0 -35
- package/ios/Pagination/PaginationScroll.swift +0 -101
- package/ios/Pagination/PaginationWhiteDot.swift +0 -37
- package/ios/Popup/PopupNotify.swift +0 -219
- package/ios/ProgressInfo/ProgressInfo.swift +0 -294
- package/ios/Radio/Radio.swift +0 -70
- package/ios/Rating/Rating.swift +0 -82
- package/ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json +0 -11
- package/ios/Resources/MoMoUIKitsColors.xcassets/Background.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Border.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Card.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Contents.json +0 -6
- package/ios/Resources/MoMoUIKitsColors.xcassets/Error.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Primary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryDark.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryLight.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Secondary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Success.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Text.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/TextSecondary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +0 -9
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +0 -38
- package/ios/Resources/MoMoUIKitsColors.xcassets/Warning.colorset/Contents.json +0 -38
- package/ios/Skeleton/Skeleton.swift +0 -99
- package/ios/Slider/Slider.swift +0 -237
- package/ios/Stepper/Stepper.swift +0 -220
- package/ios/Steps/Steps.swift +0 -451
- package/ios/SuggestAction/SuggestAction.swift +0 -97
- package/ios/TabView/TabView.swift +0 -530
- package/ios/Tag/Tag.swift +0 -98
- package/ios/Title/Title.swift +0 -269
- package/ios/Tooltip/Tooltip.swift +0 -482
- package/ios/Typography/FontScaleStore.swift +0 -19
- package/ios/Uploader/Uploader.swift +0 -183
- package/ios-demo/MoMoUIKitsDemo.podspec +0 -20
- package/ios-demo/Resources/dot_loading.json +0 -558
- package/ios-demo/Resources/icon.json +0 -4052
- package/ios-demo/Resources/lottie_circle_loader.json +0 -1
- package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +0 -48
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +0 -25
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +0 -26
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +0 -19
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +0 -33
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +0 -48
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +0 -21
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +0 -17
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +0 -28
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +0 -31
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +0 -24
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +0 -110
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +0 -93
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +0 -269
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +0 -117
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +0 -89
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +0 -100
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +0 -126
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +0 -63
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +0 -20
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +0 -93
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +0 -107
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +0 -124
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +0 -14
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +0 -49
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +0 -278
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +0 -58
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +0 -78
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +0 -138
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +0 -111
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +0 -136
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +0 -107
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +0 -73
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +0 -100
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +0 -32
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +0 -57
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +0 -70
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +0 -227
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +0 -72
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +0 -175
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +0 -121
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +0 -76
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +0 -89
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +0 -32
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +0 -56
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +0 -32
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +0 -150
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +0 -138
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +0 -103
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +0 -94
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +0 -79
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +0 -152
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +0 -33
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +0 -190
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +0 -34
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +0 -182
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +0 -109
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +0 -187
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +0 -87
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +0 -131
- package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +0 -51
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +0 -15
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +0 -73
- package/scripts/gen-ios-color.mjs +0 -136
|
@@ -9,12 +9,11 @@ import SwiftUI
|
|
|
9
9
|
// MARK: - RenderRightIconSearch
|
|
10
10
|
|
|
11
11
|
struct RenderRightIconSearch: View {
|
|
12
|
-
@Environment(\.appTheme) private var theme
|
|
13
12
|
let loading: Bool
|
|
14
13
|
let icon: String
|
|
15
14
|
let color: Color
|
|
16
15
|
let onClick: () -> Void
|
|
17
|
-
|
|
16
|
+
|
|
18
17
|
var body: some View {
|
|
19
18
|
HStack(spacing: 0) {
|
|
20
19
|
if loading {
|
|
@@ -25,10 +24,12 @@ struct RenderRightIconSearch: View {
|
|
|
25
24
|
if !icon.isEmpty {
|
|
26
25
|
Divider()
|
|
27
26
|
.frame(width: 1)
|
|
28
|
-
.background(
|
|
27
|
+
.background(Colors.primary)
|
|
29
28
|
.padding(.leading, Spacing.S)
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Image(systemName: icon)
|
|
31
|
+
.foregroundColor(color)
|
|
32
|
+
.frame(width: 24, height: 24)
|
|
32
33
|
.padding(.leading, Spacing.S)
|
|
33
34
|
.onTapGesture(perform: onClick)
|
|
34
35
|
}
|
|
@@ -47,18 +48,14 @@ public struct InputSearchProps {
|
|
|
47
48
|
var error: String = ""
|
|
48
49
|
var disabled: Bool = false
|
|
49
50
|
var icon: String = ""
|
|
50
|
-
var iconColor: Color
|
|
51
|
+
var iconColor: Color = Colors.text
|
|
51
52
|
var onRightIconPressed: () -> Void = {}
|
|
52
53
|
var onFocus: () -> Void = {}
|
|
53
54
|
var onBlur: () -> Void = {}
|
|
54
55
|
var loading: Bool = false
|
|
55
56
|
var fontWeight: Font.Weight = .regular
|
|
56
57
|
var keyboardType: UIKeyboardType = .default
|
|
57
|
-
|
|
58
|
-
var searchIcon: (() -> AnyView)? = nil
|
|
59
|
-
// Mirrors Compose's InputSearchProps.placeholderCustomRender — a custom placeholder view.
|
|
60
|
-
var placeholderCustomRender: (() -> AnyView)? = nil
|
|
61
|
-
|
|
58
|
+
|
|
62
59
|
public init(text: Binding<String>,
|
|
63
60
|
buttonText: String = "",
|
|
64
61
|
showButtonText: Bool = false,
|
|
@@ -69,15 +66,13 @@ public struct InputSearchProps {
|
|
|
69
66
|
error: String = "",
|
|
70
67
|
disabled: Bool = false,
|
|
71
68
|
icon: String = "",
|
|
72
|
-
iconColor: Color
|
|
69
|
+
iconColor: Color = Colors.text,
|
|
73
70
|
onRightIconPressed: @escaping () -> Void = {},
|
|
74
71
|
onFocus: @escaping () -> Void = {},
|
|
75
72
|
onBlur: @escaping () -> Void = {},
|
|
76
73
|
loading: Bool = false,
|
|
77
74
|
fontWeight: Font.Weight = .regular,
|
|
78
|
-
keyboardType: UIKeyboardType = .default
|
|
79
|
-
searchIcon: (() -> AnyView)? = nil,
|
|
80
|
-
placeholderCustomRender: (() -> AnyView)? = nil) {
|
|
75
|
+
keyboardType: UIKeyboardType = .default) {
|
|
81
76
|
self._text = text
|
|
82
77
|
self.buttonText = buttonText
|
|
83
78
|
self.showButtonText = showButtonText
|
|
@@ -95,15 +90,12 @@ public struct InputSearchProps {
|
|
|
95
90
|
self.loading = loading
|
|
96
91
|
self.fontWeight = fontWeight
|
|
97
92
|
self.keyboardType = keyboardType
|
|
98
|
-
self.searchIcon = searchIcon
|
|
99
|
-
self.placeholderCustomRender = placeholderCustomRender
|
|
100
93
|
}
|
|
101
94
|
}
|
|
102
95
|
|
|
103
96
|
// MARK: - InputSearch
|
|
104
97
|
|
|
105
98
|
public struct InputSearch: View {
|
|
106
|
-
@Environment(\.appTheme) private var theme
|
|
107
99
|
@Binding var text: String
|
|
108
100
|
var buttonText: String = ""
|
|
109
101
|
var showButtonText: Bool = false
|
|
@@ -114,19 +106,17 @@ public struct InputSearch: View {
|
|
|
114
106
|
var error: String = ""
|
|
115
107
|
var disabled: Bool = false
|
|
116
108
|
var icon: String = ""
|
|
117
|
-
var iconColor: Color
|
|
109
|
+
var iconColor: Color = Colors.text
|
|
118
110
|
var onRightIconPressed: () -> Void = {}
|
|
119
111
|
var onFocus: () -> Void = {}
|
|
120
112
|
var onBlur: () -> Void = {}
|
|
121
113
|
var loading: Bool = false
|
|
122
114
|
var fontWeight: Font.Weight = .regular
|
|
123
115
|
var keyboardType: UIKeyboardType = .default
|
|
124
|
-
|
|
125
|
-
var placeholderCustomRender: (() -> AnyView)? = nil
|
|
126
|
-
|
|
116
|
+
|
|
127
117
|
@State private var isFocused = false
|
|
128
118
|
@State private var isBlurred = false
|
|
129
|
-
|
|
119
|
+
|
|
130
120
|
public init(text: Binding<String>,
|
|
131
121
|
buttonText: String = "",
|
|
132
122
|
showButtonText: Bool = false,
|
|
@@ -137,15 +127,13 @@ public struct InputSearch: View {
|
|
|
137
127
|
error: String = "",
|
|
138
128
|
disabled: Bool = false,
|
|
139
129
|
icon: String = "",
|
|
140
|
-
iconColor: Color
|
|
130
|
+
iconColor: Color = Colors.text,
|
|
141
131
|
onRightIconPressed: @escaping () -> Void = {},
|
|
142
132
|
onFocus: @escaping () -> Void = {},
|
|
143
133
|
onBlur: @escaping () -> Void = {},
|
|
144
134
|
loading: Bool = false,
|
|
145
135
|
fontWeight: Font.Weight = .regular,
|
|
146
|
-
keyboardType: UIKeyboardType = .default
|
|
147
|
-
searchIcon: (() -> AnyView)? = nil,
|
|
148
|
-
placeholderCustomRender: (() -> AnyView)? = nil) {
|
|
136
|
+
keyboardType: UIKeyboardType = .default) {
|
|
149
137
|
self._text = text
|
|
150
138
|
self.buttonText = buttonText
|
|
151
139
|
self.showButtonText = showButtonText
|
|
@@ -163,60 +151,24 @@ public struct InputSearch: View {
|
|
|
163
151
|
self.loading = loading
|
|
164
152
|
self.fontWeight = fontWeight
|
|
165
153
|
self.keyboardType = keyboardType
|
|
166
|
-
self.searchIcon = searchIcon
|
|
167
|
-
self.placeholderCustomRender = placeholderCustomRender
|
|
168
154
|
}
|
|
169
155
|
|
|
170
|
-
|
|
171
|
-
public init(props: InputSearchProps) {
|
|
172
|
-
self.init(
|
|
173
|
-
text: props.$text,
|
|
174
|
-
buttonText: props.buttonText,
|
|
175
|
-
showButtonText: props.showButtonText,
|
|
176
|
-
showBorder: props.showBorder,
|
|
177
|
-
placeholder: props.placeholder,
|
|
178
|
-
onChangeText: props.onChangeText,
|
|
179
|
-
onPressButtonText: props.onPressButtonText,
|
|
180
|
-
error: props.error,
|
|
181
|
-
disabled: props.disabled,
|
|
182
|
-
icon: props.icon,
|
|
183
|
-
iconColor: props.iconColor,
|
|
184
|
-
onRightIconPressed: props.onRightIconPressed,
|
|
185
|
-
onFocus: props.onFocus,
|
|
186
|
-
onBlur: props.onBlur,
|
|
187
|
-
loading: props.loading,
|
|
188
|
-
fontWeight: props.fontWeight,
|
|
189
|
-
keyboardType: props.keyboardType,
|
|
190
|
-
searchIcon: props.searchIcon,
|
|
191
|
-
placeholderCustomRender: props.placeholderCustomRender
|
|
192
|
-
)
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
156
|
+
|
|
196
157
|
public var body: some View {
|
|
197
|
-
let iconColor: Color = disabled ? theme.colors.text.disable : (self.iconColor ?? theme.colors.text.default)
|
|
198
158
|
VStack(alignment: .leading, spacing: 0) {
|
|
199
159
|
HStack(spacing: 0) {
|
|
200
160
|
HStack {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
.frame(width: 24, height: 24)
|
|
207
|
-
.padding(.trailing, Spacing.XS)
|
|
208
|
-
}
|
|
209
|
-
|
|
161
|
+
Image(systemName: "magnifyingglass")
|
|
162
|
+
.foregroundColor(Colors.black12)
|
|
163
|
+
.frame(width: 24, height: 24)
|
|
164
|
+
.padding(.trailing, Spacing.XS)
|
|
165
|
+
|
|
210
166
|
ZStack(alignment: .leading) {
|
|
211
167
|
if text.isEmpty {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
.foregroundColor(disabled ? theme.colors.text.disable : theme.colors.text.hint)
|
|
217
|
-
.font(.system(size: scaleSize(14), weight: fontWeight))
|
|
218
|
-
.ignoreBoldTextSetting()
|
|
219
|
-
}
|
|
168
|
+
Text(placeholder)
|
|
169
|
+
.foregroundColor(disabled ? Colors.black08 : Colors.black12)
|
|
170
|
+
.font(.system(size: 16, weight: fontWeight))
|
|
171
|
+
.ignoreBoldTextSetting()
|
|
220
172
|
}
|
|
221
173
|
TextField("", text: $text, onEditingChanged: { editing in
|
|
222
174
|
isFocused = editing
|
|
@@ -230,27 +182,26 @@ public struct InputSearch: View {
|
|
|
230
182
|
}
|
|
231
183
|
}, onCommit: {})
|
|
232
184
|
.disabled(disabled)
|
|
233
|
-
.foregroundColor(disabled ?
|
|
234
|
-
.font(.system(size:
|
|
185
|
+
.foregroundColor(disabled ? Colors.black08 : Colors.black17)
|
|
186
|
+
.font(.system(size: 15, weight: fontWeight))
|
|
235
187
|
.ignoreBoldTextSetting()
|
|
236
188
|
.keyboardType(keyboardType)
|
|
237
|
-
.applyCursorColor(theme.colors.primary)
|
|
238
189
|
}
|
|
239
190
|
|
|
240
191
|
if isFocused && !text.isEmpty {
|
|
241
192
|
SwiftButton(action: { text = "" }) {
|
|
242
193
|
Image(systemName: "xmark.circle.fill")
|
|
243
|
-
.foregroundColor(
|
|
194
|
+
.foregroundColor(Colors.black12)
|
|
244
195
|
.frame(width: 16, height: 16)
|
|
245
196
|
}
|
|
246
197
|
.padding(.leading, Spacing.S)
|
|
247
198
|
}
|
|
248
199
|
|
|
249
|
-
RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, onClick: onRightIconPressed)
|
|
200
|
+
RenderRightIconSearch(loading: loading, icon: icon, color: disabled ? Colors.black08 : iconColor, onClick: onRightIconPressed)
|
|
250
201
|
}
|
|
251
202
|
.padding(.horizontal, Spacing.M)
|
|
252
203
|
.padding(.vertical, Spacing.S)
|
|
253
|
-
.background(
|
|
204
|
+
.background(Colors.black01)
|
|
254
205
|
.cornerRadius(Radius.XL)
|
|
255
206
|
.overlay(
|
|
256
207
|
RoundedRectangle(cornerRadius: Radius.XL)
|
|
@@ -260,35 +211,31 @@ public struct InputSearch: View {
|
|
|
260
211
|
|
|
261
212
|
if showButtonText {
|
|
262
213
|
SwiftButton(action: onPressButtonText) {
|
|
263
|
-
|
|
214
|
+
Text(buttonText)
|
|
215
|
+
.foregroundColor(Colors.black17)
|
|
216
|
+
.font(.system(size: 14, weight: .medium))
|
|
217
|
+
.ignoreBoldTextSetting()
|
|
264
218
|
}
|
|
265
219
|
.padding(.leading, Spacing.L)
|
|
266
220
|
}
|
|
267
221
|
}
|
|
268
222
|
}
|
|
269
223
|
}
|
|
270
|
-
|
|
271
|
-
// MARK: - Helper Functions
|
|
272
|
-
|
|
273
|
-
func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
|
|
274
|
-
if disabled {
|
|
275
|
-
return theme.colors.border.disable
|
|
276
|
-
} else if !error.isEmpty {
|
|
277
|
-
return theme.colors.error.primary
|
|
278
|
-
} else if isFocused {
|
|
279
|
-
return theme.colors.primary
|
|
280
|
-
} else {
|
|
281
|
-
return theme.colors.border.default
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
224
|
}
|
|
285
225
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
226
|
+
// MARK: - Helper Functions
|
|
227
|
+
|
|
228
|
+
func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
|
|
229
|
+
if disabled {
|
|
230
|
+
return Colors.black08
|
|
231
|
+
} else if !error.isEmpty {
|
|
232
|
+
return Colors.red03
|
|
233
|
+
} else if isFocused {
|
|
234
|
+
return Colors.primary
|
|
235
|
+
} else {
|
|
236
|
+
return Colors.black04
|
|
293
237
|
}
|
|
294
238
|
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
@@ -12,12 +12,6 @@ public let DEFAULT_HEIGHT: CGFloat = 104
|
|
|
12
12
|
|
|
13
13
|
struct UITextViewWrapper: UIViewRepresentable {
|
|
14
14
|
@Binding var text: String
|
|
15
|
-
var maxLength: Int
|
|
16
|
-
var textColor: Color
|
|
17
|
-
var cursorColor: Color
|
|
18
|
-
var fontWeight: Font.Weight
|
|
19
|
-
var disabled: Bool
|
|
20
|
-
var onChangeText: (String) -> Void
|
|
21
15
|
var onDone: (() -> Void)?
|
|
22
16
|
var onFocus: (() -> Void)?
|
|
23
17
|
var onBlur: (() -> Void)?
|
|
@@ -25,20 +19,11 @@ struct UITextViewWrapper: UIViewRepresentable {
|
|
|
25
19
|
func makeUIView(context: Context) -> UITextView {
|
|
26
20
|
let textView = UITextView()
|
|
27
21
|
textView.delegate = context.coordinator
|
|
28
|
-
textView.backgroundColor = .clear
|
|
29
|
-
textView.textContainerInset = .zero
|
|
30
|
-
textView.textContainer.lineFragmentPadding = 0
|
|
31
22
|
return textView
|
|
32
23
|
}
|
|
33
24
|
|
|
34
25
|
func updateUIView(_ uiView: UITextView, context: Context) {
|
|
35
|
-
|
|
36
|
-
uiView.text = text
|
|
37
|
-
}
|
|
38
|
-
uiView.textColor = UIColor(textColor)
|
|
39
|
-
uiView.tintColor = UIColor(cursorColor)
|
|
40
|
-
uiView.font = UIFont.systemFont(ofSize: scaleSize(16), weight: fontWeight == .bold ? .bold : .regular)
|
|
41
|
-
uiView.isEditable = !disabled
|
|
26
|
+
uiView.text = text
|
|
42
27
|
}
|
|
43
28
|
|
|
44
29
|
func makeCoordinator() -> Coordinator {
|
|
@@ -53,12 +38,7 @@ struct UITextViewWrapper: UIViewRepresentable {
|
|
|
53
38
|
}
|
|
54
39
|
|
|
55
40
|
func textViewDidChange(_ textView: UITextView) {
|
|
56
|
-
|
|
57
|
-
if textView.text != limited {
|
|
58
|
-
textView.text = limited
|
|
59
|
-
}
|
|
60
|
-
parent.text = limited
|
|
61
|
-
parent.onChangeText(limited)
|
|
41
|
+
parent.text = textView.text
|
|
62
42
|
}
|
|
63
43
|
|
|
64
44
|
func textViewDidBeginEditing(_ textView: UITextView) {
|
|
@@ -74,31 +54,27 @@ struct UITextViewWrapper: UIViewRepresentable {
|
|
|
74
54
|
parent.onDone?()
|
|
75
55
|
return false
|
|
76
56
|
}
|
|
77
|
-
|
|
78
|
-
guard let range = Range(range, in: current) else { return false }
|
|
79
|
-
let proposed = current.replacingCharacters(in: range, with: text)
|
|
80
|
-
return proposed.count <= parent.maxLength
|
|
57
|
+
return true
|
|
81
58
|
}
|
|
82
59
|
}
|
|
83
60
|
}
|
|
84
61
|
|
|
85
62
|
// Make the struct public
|
|
86
63
|
public struct InputTextArea: View {
|
|
87
|
-
@Environment(\.appTheme) private var theme
|
|
88
64
|
@Binding var text: String
|
|
89
65
|
var maxLength: Int = MAX_LENGTH
|
|
90
66
|
var height: CGFloat = DEFAULT_HEIGHT
|
|
91
67
|
var floatingValue: String = ""
|
|
92
|
-
var floatingValueColor: Color
|
|
68
|
+
var floatingValueColor: Color = .gray
|
|
93
69
|
var floatingIcon: String = ""
|
|
94
|
-
var floatingIconColor: Color
|
|
70
|
+
var floatingIconColor: Color = .black
|
|
95
71
|
var placeholder: String = ""
|
|
96
72
|
var onChangeText: (String) -> Void = { _ in }
|
|
97
73
|
var error: String = ""
|
|
98
74
|
var errorSpacing: Bool = false
|
|
99
75
|
var disabled: Bool = false
|
|
100
76
|
var icon: String = ""
|
|
101
|
-
var iconColor: Color
|
|
77
|
+
var iconColor: Color = .black
|
|
102
78
|
var onRightIconPressed: () -> Void = {}
|
|
103
79
|
var onFocus: () -> Void = {}
|
|
104
80
|
var onBlur: () -> Void = {}
|
|
@@ -116,16 +92,16 @@ public struct InputTextArea: View {
|
|
|
116
92
|
maxLength: Int = MAX_LENGTH,
|
|
117
93
|
height: CGFloat = DEFAULT_HEIGHT,
|
|
118
94
|
floatingValue: String = "",
|
|
119
|
-
floatingValueColor: Color
|
|
95
|
+
floatingValueColor: Color = .gray,
|
|
120
96
|
floatingIcon: String = "",
|
|
121
|
-
floatingIconColor: Color
|
|
97
|
+
floatingIconColor: Color = .black,
|
|
122
98
|
placeholder: String = "",
|
|
123
99
|
onChangeText: @escaping (String) -> Void = { _ in },
|
|
124
100
|
error: String = "",
|
|
125
101
|
errorSpacing: Bool = false,
|
|
126
102
|
disabled: Bool = false,
|
|
127
103
|
icon: String = "",
|
|
128
|
-
iconColor: Color
|
|
104
|
+
iconColor: Color = Colors.pink03,
|
|
129
105
|
onRightIconPressed: @escaping () -> Void = {},
|
|
130
106
|
onFocus: @escaping () -> Void = {},
|
|
131
107
|
onBlur: @escaping () -> Void = {},
|
|
@@ -162,27 +138,24 @@ public struct InputTextArea: View {
|
|
|
162
138
|
ZStack(alignment: .topLeading) {
|
|
163
139
|
if !floatingValue.isEmpty || !floatingIcon.isEmpty {
|
|
164
140
|
HStack(spacing: 4) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
color: disabled ? theme.colors.text.disable : (floatingValueColor ?? theme.colors.text.hint)
|
|
169
|
-
)
|
|
141
|
+
Text(floatingValue)
|
|
142
|
+
.font(.caption)
|
|
143
|
+
.foregroundColor(disabled ? .gray : floatingValueColor)
|
|
170
144
|
|
|
171
145
|
if required {
|
|
172
|
-
|
|
146
|
+
Text("*")
|
|
147
|
+
.font(.caption)
|
|
148
|
+
.foregroundColor(.red)
|
|
173
149
|
}
|
|
174
150
|
|
|
175
151
|
if !floatingIcon.isEmpty {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
color: disabled ? theme.colors.text.disable : (floatingIconColor ?? theme.colors.text.default)
|
|
180
|
-
)
|
|
181
|
-
.padding(.leading, Spacing.XS)
|
|
152
|
+
Image(systemName: floatingIcon)
|
|
153
|
+
.font(.caption)
|
|
154
|
+
.foregroundColor(disabled ? .gray : floatingIconColor)
|
|
182
155
|
}
|
|
183
156
|
}
|
|
184
|
-
.padding(.horizontal,
|
|
185
|
-
.background(
|
|
157
|
+
.padding(.horizontal, 8)
|
|
158
|
+
.background(Colors.black01)
|
|
186
159
|
.offset(x: Spacing.S, y: -height / 10)
|
|
187
160
|
.zIndex(10)
|
|
188
161
|
}
|
|
@@ -191,21 +164,13 @@ public struct InputTextArea: View {
|
|
|
191
164
|
ZStack(alignment: .topLeading) {
|
|
192
165
|
if text.isEmpty {
|
|
193
166
|
Text(placeholder)
|
|
194
|
-
.foregroundColor(disabled ?
|
|
167
|
+
.foregroundColor(disabled ? .gray : .gray)
|
|
195
168
|
.font(.system(size: 16, weight: fontWeight))
|
|
196
169
|
.padding(.horizontal, 16)
|
|
197
170
|
.padding(.vertical, 12)
|
|
198
171
|
}
|
|
199
172
|
|
|
200
|
-
UITextViewWrapper(
|
|
201
|
-
text: $text,
|
|
202
|
-
maxLength: maxLength,
|
|
203
|
-
textColor: disabled ? theme.colors.text.disable : theme.colors.text.default,
|
|
204
|
-
cursorColor: theme.colors.primary,
|
|
205
|
-
fontWeight: fontWeight,
|
|
206
|
-
disabled: disabled,
|
|
207
|
-
onChangeText: onChangeText,
|
|
208
|
-
onDone: {
|
|
173
|
+
UITextViewWrapper(text: $text, onDone: {
|
|
209
174
|
// Handle done action if needed
|
|
210
175
|
},
|
|
211
176
|
onFocus: {
|
|
@@ -223,20 +188,27 @@ public struct InputTextArea: View {
|
|
|
223
188
|
|
|
224
189
|
HStack {
|
|
225
190
|
Spacer()
|
|
226
|
-
|
|
191
|
+
Text("\(text.count)/\(maxLength)")
|
|
192
|
+
.font(.caption)
|
|
193
|
+
.foregroundColor(.gray)
|
|
227
194
|
}
|
|
228
195
|
.padding(.horizontal, 16)
|
|
229
196
|
.padding(.bottom, 12)
|
|
230
197
|
}
|
|
231
|
-
.background(
|
|
232
|
-
.cornerRadius(
|
|
198
|
+
.background(Color.white)
|
|
199
|
+
.cornerRadius(8)
|
|
233
200
|
.overlay(
|
|
234
|
-
RoundedRectangle(cornerRadius:
|
|
201
|
+
RoundedRectangle(cornerRadius: 8)
|
|
235
202
|
.stroke(borderColor, lineWidth: 1)
|
|
236
203
|
)
|
|
237
204
|
}
|
|
238
205
|
|
|
239
|
-
|
|
206
|
+
if !error.isEmpty {
|
|
207
|
+
Text(error)
|
|
208
|
+
.font(.caption)
|
|
209
|
+
.foregroundColor(.red)
|
|
210
|
+
.padding(.top, errorSpacing ? 8 : 4)
|
|
211
|
+
}
|
|
240
212
|
}
|
|
241
213
|
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in
|
|
242
214
|
if !isBlurred {
|
|
@@ -256,14 +228,16 @@ public struct InputTextArea: View {
|
|
|
256
228
|
|
|
257
229
|
private var borderColor: Color {
|
|
258
230
|
if disabled {
|
|
259
|
-
return
|
|
231
|
+
return Colors.black03
|
|
260
232
|
} else if !error.isEmpty {
|
|
261
|
-
return
|
|
233
|
+
return .red
|
|
262
234
|
} else if isFocused {
|
|
263
|
-
return
|
|
235
|
+
return Colors.pink03
|
|
264
236
|
} else {
|
|
265
|
-
return
|
|
237
|
+
return Colors.border
|
|
266
238
|
}
|
|
267
239
|
|
|
268
240
|
}
|
|
269
241
|
}
|
|
242
|
+
|
|
243
|
+
|
|
@@ -221,13 +221,17 @@ public struct PopupDisplay: View {
|
|
|
221
221
|
var RowTextButtons: some View {
|
|
222
222
|
HStack {
|
|
223
223
|
SwiftUI.Button(action: onPressCloseButton) {
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
Text(closeButtonTitle)
|
|
225
|
+
.font(.action2)
|
|
226
|
+
.ignoreBoldTextSetting()
|
|
227
|
+
}.foregroundColor(Colors.black09)
|
|
226
228
|
.padding(.trailing, 12)
|
|
227
229
|
|
|
228
230
|
SwiftUI.Button(action: onPressAction) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
+
Text(actionButtonTitle)
|
|
232
|
+
.font(.action2)
|
|
233
|
+
.ignoreBoldTextSetting()
|
|
234
|
+
}.foregroundColor(Colors.primary)
|
|
231
235
|
}
|
|
232
236
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
233
237
|
.padding(EdgeInsets(top: 0, leading: 0, bottom: 24, trailing: 24))
|
|
@@ -236,13 +240,17 @@ public struct PopupDisplay: View {
|
|
|
236
240
|
var ColumnTextButtons: some View {
|
|
237
241
|
VStack(alignment: .trailing) {
|
|
238
242
|
SwiftUI.Button(action: onPressAction) {
|
|
239
|
-
|
|
240
|
-
|
|
243
|
+
Text(actionButtonTitle)
|
|
244
|
+
.font(.action2)
|
|
245
|
+
.ignoreBoldTextSetting()
|
|
246
|
+
}.foregroundColor(Colors.primary)
|
|
241
247
|
.padding(.bottom, 6)
|
|
242
248
|
|
|
243
249
|
SwiftUI.Button(action: onPressCloseButton) {
|
|
244
|
-
|
|
245
|
-
|
|
250
|
+
Text(closeButtonTitle)
|
|
251
|
+
.font(.action2)
|
|
252
|
+
.ignoreBoldTextSetting()
|
|
253
|
+
}.foregroundColor(Colors.black09)
|
|
246
254
|
}
|
|
247
255
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
248
256
|
.padding(EdgeInsets(top: 0, leading: 0, bottom: 24, trailing: 24))
|
|
@@ -35,11 +35,17 @@ public struct PopupInput: View {
|
|
|
35
35
|
|
|
36
36
|
VStack {
|
|
37
37
|
VStack(alignment: .leading) {
|
|
38
|
-
|
|
38
|
+
Text(title)
|
|
39
|
+
.foregroundColor(.black)
|
|
40
|
+
.font(.headerText1)
|
|
41
|
+
.ignoreBoldTextSetting()
|
|
39
42
|
.padding(.top, 12)
|
|
40
43
|
.padding(.bottom, 24)
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
Text(description)
|
|
46
|
+
.foregroundColor(.black)
|
|
47
|
+
.font(.paragraph)
|
|
48
|
+
.ignoreBoldTextSetting()
|
|
43
49
|
.opacity(0.6)
|
|
44
50
|
.multilineTextAlignment(.leading)
|
|
45
51
|
.padding(.bottom, 20)
|