@momo-kits/native-kits 0.0.1-beta.5 → 0.0.2-alpha.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.md +99 -0
- package/PUBLISH_GUIDE.md +675 -0
- package/README.md +184 -5
- package/ios/Application/ApplicationEnvironment.swift +71 -0
- package/ios/Application/Components.swift +270 -0
- package/ios/Application/ComposeApi.swift +22 -0
- package/ios/Application/FloatingButton.swift +174 -0
- package/ios/Application/HeaderRight.swift +306 -0
- package/ios/Application/LanguageSource.swift +93 -0
- package/ios/Application/Localize.swift +378 -0
- package/ios/Application/LocalizeModifier.swift +30 -0
- package/ios/Application/MaxApi.swift +18 -0
- package/ios/Application/Navigation/BottomTab/BottomTab.swift +104 -0
- package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +215 -0
- package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +65 -0
- package/ios/Application/Navigation/HeaderBackProps.swift +66 -0
- package/ios/Application/Navigation/HeaderTitle.swift +57 -0
- package/ios/Application/Navigation/HeaderUser.swift +209 -0
- package/ios/Application/Navigation/NavigationContainer.swift +213 -0
- package/ios/Application/Navigation/NavigationOptions.swift +109 -0
- package/ios/Application/Navigation/Navigator.swift +453 -0
- package/ios/Application/Navigation/NavigatorManager.swift +22 -0
- package/ios/Application/Navigation/Overplay/BottomSheet.swift +256 -0
- package/ios/Application/Navigation/Overplay/ModalScreen.swift +74 -0
- package/ios/Application/Navigation/Overplay/SnackBar.swift +144 -0
- package/ios/Application/Navigation/Tracking/ScreenTracker.swift +117 -0
- package/ios/Application/Navigation/component/Header.swift +178 -0
- package/ios/Application/Navigation/component/HeaderBackground.swift +83 -0
- package/ios/Application/Navigation/component/HeaderColor.swift +65 -0
- package/ios/Application/Navigation/component/HeaderRightWidthKey.swift +11 -0
- package/ios/Application/Navigation/component/NavigationFooter.swift +90 -0
- package/ios/Application/Navigation/component/NavigationHeaderRight.swift +196 -0
- package/ios/Application/Screen.swift +250 -0
- package/ios/Application/StackScreen.swift +492 -0
- package/ios/Avatar/Avatar.swift +193 -0
- package/ios/Badge/Badge.swift +84 -0
- package/ios/Badge/BadgeDot.swift +31 -0
- package/ios/Badge/BadgeRibbon.swift +319 -0
- package/ios/BaselineView/BaselineView.swift +163 -0
- package/ios/Button/Button.swift +232 -84
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +126 -0
- package/ios/Carousel/Carousel.swift +196 -0
- package/ios/Checkbox/Checkbox.swift +59 -20
- package/ios/Chip/Chip.swift +120 -0
- package/ios/Collapse/Collapse.swift +192 -0
- package/ios/Colors+Radius+Spacing/Colors.swift +42 -37
- package/ios/Colors+Radius+Spacing/Spacing.swift +3 -1
- package/ios/Colors+Radius+Spacing/Theme.swift +295 -0
- package/ios/DateTimePicker/DateTimePicker.swift +212 -0
- package/ios/DateTimePicker/DateTimePickerTypes.swift +55 -0
- package/ios/DateTimePicker/DateTimePickerUtils.swift +167 -0
- package/ios/DateTimePicker/WheelPicker.swift +165 -0
- package/ios/Divider/Divider.swift +16 -0
- package/ios/Extensions/ActiveOpacityButtonStyle.swift +14 -0
- package/ios/Extensions/Color++.swift +32 -0
- package/ios/Icon/Icon.swift +69 -0
- package/ios/IconButton/IconButton.swift +140 -0
- package/ios/Image/Image.swift +36 -9
- package/ios/Information/Information.swift +156 -0
- package/ios/Input/ErrorView.swift +58 -0
- package/ios/Input/Input.swift +455 -121
- package/ios/Input/InputPhoneNumber.swift +192 -0
- package/ios/Input/InputSearch.swift +301 -0
- package/ios/Input/InputTextArea.swift +318 -0
- package/ios/InputDropDown/InputDropDown.swift +201 -0
- package/ios/InputMoney/InputMoney.swift +405 -0
- package/ios/InputOTP/InputOTP.swift +211 -0
- package/ios/Layout/GridContext.swift +30 -0
- package/ios/Layout/Item.swift +42 -0
- package/ios/Layout/Section.swift +134 -0
- package/ios/Loader/Loader.swift +113 -0
- package/ios/Lottie/LottieView.swift +86 -0
- package/ios/MoMoUIKits.podspec +5 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +13 -5
- package/ios/Pagination/PaginationDot.swift +61 -0
- package/ios/Pagination/PaginationNumber.swift +35 -0
- package/ios/Pagination/PaginationScroll.swift +101 -0
- package/ios/Pagination/PaginationWhiteDot.swift +37 -0
- package/ios/Popup/PopupDisplay.swift +195 -94
- package/ios/Popup/PopupInput.swift +92 -0
- package/ios/Popup/PopupNotify.swift +219 -0
- package/ios/Popup/PopupPromotion.swift +74 -0
- package/ios/ProgressInfo/ProgressInfo.swift +297 -0
- package/ios/Radio/Radio.swift +69 -0
- package/ios/Rating/Rating.swift +83 -0
- package/{example/ios/Example/Preview Content/Preview Assets.xcassets/Contents.json → ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json} +5 -0
- package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Text.colorset/Contents.json +3 -3
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +9 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +38 -0
- package/ios/ScrollIndicator/ScrollIndicator.swift +110 -0
- package/ios/Skeleton/Skeleton.swift +99 -0
- package/ios/Slider/Slider.swift +237 -0
- package/ios/StatusBarTap/StatusBarTap.h +13 -0
- package/ios/StatusBarTap/StatusBarTap.m +75 -0
- package/ios/Stepper/Stepper.swift +221 -0
- package/ios/Steps/Steps.swift +467 -0
- package/ios/SuggestAction/SuggestAction.swift +100 -0
- package/ios/Swipeable/SwipeCell.swift +226 -31
- package/ios/Swipeable/SwipeCellModel.swift +21 -0
- package/ios/Switch/Switch.swift +53 -28
- package/ios/TabView/TabView.swift +534 -0
- package/ios/Tag/Tag.swift +99 -0
- package/ios/Template/Logo/Logo.swift +75 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +123 -0
- package/ios/Title/Title.swift +270 -0
- package/ios/Tooltip/Tooltip.swift +486 -0
- package/ios/Typography/FontScale.swift +103 -0
- package/ios/Typography/FontScaleStore.swift +58 -0
- package/ios/Typography/KitDesignSystem.swift +17 -0
- package/ios/Typography/Text.swift +262 -0
- package/ios/Typography/Typography.swift +80 -23
- package/ios/Uploader/Uploader.swift +174 -0
- package/ios/native-kits.podspec +73 -15
- package/ios-demo/MoMoUIKitsDemo.podspec +20 -0
- package/ios-demo/Resources/dot_loading.json +558 -0
- package/ios-demo/Resources/icon.json +4052 -0
- package/ios-demo/Resources/lottie_circle_loader.json +1 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +48 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +25 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +26 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +19 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +33 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +48 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +21 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +17 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +28 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +31 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +24 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +110 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +75 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +117 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +89 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +108 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +96 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +60 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +76 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +102 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +100 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DemoScreen.swift +420 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +56 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +276 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconDemo.swift +81 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +65 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +96 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +117 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +94 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +94 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +88 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +120 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +85 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +87 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +73 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +235 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +241 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +68 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PlaygroundData.swift +76 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +95 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +67 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +101 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +64 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +68 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SectionDemo.swift +83 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +61 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +90 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +82 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +114 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +90 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +58 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +114 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +86 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +181 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +104 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +118 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +85 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +53 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
- package/package.json +6 -6
- package/publish.sh +554 -20
- package/scripts/gen-ios-color.mjs +136 -0
- package/CODE_OF_CONDUCT.md +0 -133
- package/CONTRIBUTING.md +0 -114
- package/LICENSE +0 -20
- package/android/build.gradle +0 -82
- package/android/gradle.properties +0 -5
- package/android/src/main/AndroidManifest.xml +0 -4
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsPackage.kt +0 -17
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsViewManager.kt +0 -20
- package/example/ios/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -63
- package/example/ios/Example/ComponentDetail.swift +0 -35
- package/example/ios/Example/ComponentItem.swift +0 -24
- package/example/ios/Example/ComponentModel.swift +0 -38
- package/example/ios/Example/ContentView.swift +0 -39
- package/example/ios/Example/Example.entitlements +0 -10
- package/example/ios/Example/Foundation/ButtonDemo.swift +0 -80
- package/example/ios/Example/Foundation/ImageDemo.swift +0 -43
- package/example/ios/Example/Foundation/Popup/ActionSheets.swift +0 -136
- package/example/ios/Example/Foundation/Popup/Floats.swift +0 -127
- package/example/ios/Example/Foundation/Popup/Popups.swift +0 -51
- package/example/ios/Example/Foundation/PopupDemo.swift +0 -389
- package/example/ios/Example/Foundation/TextInputDemo.swift +0 -36
- package/example/ios/Example/Foundation/TypographyDemo.swift +0 -53
- package/example/ios/Example/Foundation.swift +0 -26
- package/example/ios/Example/Info.plist +0 -18
- package/example/ios/Example/Library/CheckboxDemo.swift +0 -19
- package/example/ios/Example/Library/SwipeableDemo.swift +0 -105
- package/example/ios/Example/Library/SwitchDemo.swift +0 -19
- package/example/ios/Example/Library.swift +0 -26
- package/example/ios/Example/Main.swift +0 -27
- package/example/ios/Example/Overview.swift +0 -20
- package/example/ios/Example/Resource/SFProText-Black.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Bold.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Heavy.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Light.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Medium.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Regular.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Semibold.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Thin.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Ultralight.ttf +0 -0
- package/example/ios/Example/Resource/foundation.json +0 -33
- package/example/ios/Example/Resource/library.json +0 -18
- package/example/ios/Example/Utils.swift +0 -30
- package/example/ios/Example/ViewModifier/DarkViewModifier.swift +0 -22
- package/example/ios/Example.xcodeproj/project.pbxproj +0 -581
- package/example/ios/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/example/ios/Example.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/example/ios/Podfile +0 -7
- package/example/ios/Podfile.lock +0 -35
- package/example/ios/Pods/Local Podspecs/MoMoUIKits.podspec.json +0 -37
- package/example/ios/Pods/Manifest.lock +0 -35
- package/example/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -2047
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
- package/example/ios/Pods/SDWebImage/LICENSE +0 -20
- package/example/ios/Pods/SDWebImage/README.md +0 -352
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSButton+WebCache.h +0 -340
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSButton+WebCache.m +0 -172
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSData+ImageContentType.h +0 -63
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSData+ImageContentType.m +0 -165
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSImage+Compatibility.h +0 -67
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSImage+Compatibility.m +0 -120
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImage.h +0 -114
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImage.m +0 -392
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.h +0 -112
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.m +0 -420
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageRep.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageRep.m +0 -133
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.h +0 -168
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.m +0 -79
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView.h +0 -110
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView.m +0 -540
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDDiskCache.h +0 -145
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDDiskCache.m +0 -326
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.h +0 -73
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.m +0 -256
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.m +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAWebPCoder.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAWebPCoder.m +0 -98
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCache.h +0 -450
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCache.m +0 -1030
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheConfig.h +0 -153
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheConfig.m +0 -68
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheDefine.h +0 -156
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheDefine.m +0 -138
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCachesManager.h +0 -81
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCachesManager.m +0 -556
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoder.h +0 -297
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoder.m +0 -26
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.h +0 -153
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.m +0 -822
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.h +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.m +0 -130
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageFrame.h +0 -36
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageFrame.m +0 -28
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.h +0 -22
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.m +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.h +0 -28
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.m +0 -127
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageHEICCoder.h +0 -25
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageHEICCoder.m +0 -101
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.h +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.m +0 -807
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOCoder.h +0 -30
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOCoder.m +0 -420
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoader.h +0 -146
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoader.m +0 -170
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoadersManager.h +0 -40
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoadersManager.m +0 -123
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageTransformer.h +0 -241
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageTransformer.m +0 -331
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDMemoryCache.h +0 -78
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDMemoryCache.m +0 -158
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.h +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.m +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.h +0 -36
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.m +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCompat.h +0 -95
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCompat.m +0 -17
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.h +0 -352
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.m +0 -149
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloader.h +0 -314
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloader.m +0 -658
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.h +0 -113
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.m +0 -60
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.h +0 -49
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.m +0 -55
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.h +0 -191
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.m +0 -722
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h +0 -69
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.m +0 -71
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h +0 -69
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.m +0 -73
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageError.h +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageError.m +0 -16
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageIndicator.h +0 -115
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageIndicator.m +0 -275
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageManager.h +0 -290
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageManager.m +0 -775
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.h +0 -27
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.m +0 -14
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.h +0 -72
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.m +0 -59
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.h +0 -143
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.m +0 -303
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.h +0 -131
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.m +0 -194
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIButton+WebCache.h +0 -387
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIButton+WebCache.m +0 -234
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.h +0 -24
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.m +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ForceDecode.h +0 -46
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ForceDecode.m +0 -60
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+GIF.h +0 -26
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+GIF.m +0 -22
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.h +0 -27
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.m +0 -47
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.h +0 -89
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.m +0 -221
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MultiFormat.h +0 -80
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MultiFormat.m +0 -47
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h +0 -146
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.m +0 -824
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.h +0 -129
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.m +0 -76
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+WebCache.h +0 -194
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+WebCache.m +0 -67
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCache.h +0 -110
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCache.m +0 -446
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.h +0 -48
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.m +0 -82
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.h +0 -24
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.m +0 -42
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.h +0 -14
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.m +0 -29
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.h +0 -21
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.m +0 -92
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.h +0 -18
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.m +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDisplayLink.h +0 -29
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDisplayLink.m +0 -227
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDFileAttributeHelper.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDFileAttributeHelper.m +0 -127
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.m +0 -164
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.h +0 -21
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.m +0 -83
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageIOAnimatedCoderInternal.h +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.h +0 -122
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.m +0 -13
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.h +0 -20
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.m +0 -79
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWebImageTransitionInternal.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDmetamacros.h +0 -667
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/UIColor+SDHexString.h +0 -18
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/UIColor+SDHexString.m +0 -42
- package/example/ios/Pods/SDWebImage/WebImage/SDWebImage.h +0 -89
- package/example/ios/Pods/SDWebImageSwiftUI/LICENSE +0 -19
- package/example/ios/Pods/SDWebImageSwiftUI/README.md +0 -690
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift +0 -870
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/Backport.swift +0 -59
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/OnChange.swift +0 -52
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/Overlay.swift +0 -124
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/StateObject.swift +0 -151
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift +0 -78
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift +0 -132
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift +0 -122
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift +0 -133
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift +0 -82
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift +0 -97
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift +0 -114
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift +0 -64
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SwiftUICompatibility.swift +0 -92
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift +0 -93
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift +0 -509
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Module/SDWebImageSwiftUI.h +0 -15
- package/example/ios/Pods/SkeletonUI/LICENSE +0 -21
- package/example/ios/Pods/SkeletonUI/README.md +0 -137
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Angle/AngleInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Angle/AnglePresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Animation/AnimationInteractor.swift +0 -56
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Appearance/AppearanceInteractor.swift +0 -58
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Appearance/AppearancePresenter.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/ClosedRange+Normalize.swift +0 -16
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Image+OptionalType.swift +0 -102
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/ModifiedContent+SkeletonModifier.swift +0 -26
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Optional+OptionalType.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/SecureField+OptionalType.swift +0 -19
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Text+OptionalType.swift +0 -27
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/TextField+OptionalType.swift +0 -35
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Toggle+OptionalType.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/UnitPoint+Angle.swift +0 -8
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/View+SkeletonModifier.swift +0 -8
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Modifiers/SkeletonModifier.swift +0 -52
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Multiline/MultilineInteractor.swift +0 -41
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Multiline/MultilinePresenter.swift +0 -9
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Opacity/OpacityInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Opacity/OpacityPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Position/PositionInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Position/PositionPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Protocols/OptionalType.swift +0 -4
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Radius/RadiusInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Radius/RadiusPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Shape/ShapeInteractor.swift +0 -33
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Shape/ShapePresenter.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonForEach.swift +0 -20
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonInteractor.swift +0 -27
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonList.swift +0 -20
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonPresenter.swift +0 -15
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonShape.swift +0 -64
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonView.swift +0 -25
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.debug.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.release.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown +0 -75
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist +0 -119
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-umbrella.h +0 -75
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.debug.xcconfig +0 -14
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.release.xcconfig +0 -14
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-umbrella.h +0 -17
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.debug.xcconfig +0 -17
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.release.xcconfig +0 -17
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.debug.xcconfig +0 -12
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.release.xcconfig +0 -12
- package/ios/Extensions/View++.swift +0 -9
- package/ios/Theme.md +0 -18
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Background.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Border.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Card.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Error.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Primary.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/PrimaryDark.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/PrimaryLight.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Secondary.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Success.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/TextSecondary.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Warning.colorset/Contents.json +0 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
//
|
|
2
|
+
// InputTextArea.swift
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by dung.pham2 on 2/12/24.
|
|
6
|
+
//
|
|
7
|
+
import SwiftUI
|
|
8
|
+
|
|
9
|
+
// Make these constants public
|
|
10
|
+
public let MAX_LENGTH = 300
|
|
11
|
+
public let DEFAULT_HEIGHT: CGFloat = 104
|
|
12
|
+
|
|
13
|
+
struct UITextViewWrapper: UIViewRepresentable {
|
|
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
|
+
var onDone: (() -> Void)?
|
|
22
|
+
var onFocus: (() -> Void)?
|
|
23
|
+
var onBlur: (() -> Void)?
|
|
24
|
+
|
|
25
|
+
func makeUIView(context: Context) -> UITextView {
|
|
26
|
+
let textView = UITextView()
|
|
27
|
+
textView.delegate = context.coordinator
|
|
28
|
+
textView.backgroundColor = .clear
|
|
29
|
+
textView.textContainerInset = .zero
|
|
30
|
+
textView.textContainer.lineFragmentPadding = 0
|
|
31
|
+
return textView
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
func updateUIView(_ uiView: UITextView, context: Context) {
|
|
35
|
+
if uiView.text != text {
|
|
36
|
+
uiView.text = text
|
|
37
|
+
}
|
|
38
|
+
uiView.textColor = UIColor(textColor)
|
|
39
|
+
uiView.tintColor = UIColor(cursorColor)
|
|
40
|
+
// Read through `context.environment` rather than the global `scaleSize`: that is what makes
|
|
41
|
+
// SwiftUI re-run updateUIView when the font scale changes.
|
|
42
|
+
uiView.font = UIFont.systemFont(
|
|
43
|
+
ofSize: context.environment.momoFontScale(16),
|
|
44
|
+
weight: fontWeight == .bold ? .bold : .regular
|
|
45
|
+
)
|
|
46
|
+
uiView.isEditable = !disabled
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
func makeCoordinator() -> Coordinator {
|
|
50
|
+
Coordinator(self)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
class Coordinator: NSObject, UITextViewDelegate {
|
|
54
|
+
var parent: UITextViewWrapper
|
|
55
|
+
|
|
56
|
+
init(_ parent: UITextViewWrapper) {
|
|
57
|
+
self.parent = parent
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
func textViewDidChange(_ textView: UITextView) {
|
|
61
|
+
let limited = String(textView.text.prefix(parent.maxLength))
|
|
62
|
+
if textView.text != limited {
|
|
63
|
+
textView.text = limited
|
|
64
|
+
}
|
|
65
|
+
parent.text = limited
|
|
66
|
+
parent.onChangeText(limited)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
func textViewDidBeginEditing(_ textView: UITextView) {
|
|
70
|
+
parent.onFocus?()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
func textViewDidEndEditing(_ textView: UITextView) {
|
|
74
|
+
parent.onBlur?()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
|
|
78
|
+
if text == "\n" {
|
|
79
|
+
parent.onDone?()
|
|
80
|
+
return false
|
|
81
|
+
}
|
|
82
|
+
let current = textView.text ?? ""
|
|
83
|
+
guard let range = Range(range, in: current) else { return false }
|
|
84
|
+
let proposed = current.replacingCharacters(in: range, with: text)
|
|
85
|
+
return proposed.count <= parent.maxLength
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Make the struct public
|
|
91
|
+
public struct InputTextArea: View {
|
|
92
|
+
@Environment(\.appTheme) private var theme
|
|
93
|
+
@Binding var text: String
|
|
94
|
+
var maxLength: Int = MAX_LENGTH
|
|
95
|
+
var height: CGFloat = DEFAULT_HEIGHT
|
|
96
|
+
var floatingValue: String = ""
|
|
97
|
+
var floatingValueColor: Color?
|
|
98
|
+
var floatingIcon: String = ""
|
|
99
|
+
var floatingIconColor: Color?
|
|
100
|
+
var placeholder: String = ""
|
|
101
|
+
var onChangeText: (String) -> Void = { _ in }
|
|
102
|
+
var error: String = ""
|
|
103
|
+
var errorSpacing: Bool = false
|
|
104
|
+
var disabled: Bool = false
|
|
105
|
+
var icon: String = ""
|
|
106
|
+
var iconColor: Color?
|
|
107
|
+
var onRightIconPressed: () -> Void = {}
|
|
108
|
+
var onFocus: () -> Void = {}
|
|
109
|
+
var onBlur: () -> Void = {}
|
|
110
|
+
var loading: Bool = false
|
|
111
|
+
var required: Bool = false
|
|
112
|
+
var fontWeight: Font.Weight = .regular
|
|
113
|
+
var keyboardType: UIKeyboardType = .default
|
|
114
|
+
|
|
115
|
+
@State private var isFocused = false
|
|
116
|
+
@State private var isBlurred = false
|
|
117
|
+
@State private var floatingLabelHeight: CGFloat = 16
|
|
118
|
+
|
|
119
|
+
// Make the initializer public
|
|
120
|
+
public init(
|
|
121
|
+
text: Binding<String>,
|
|
122
|
+
maxLength: Int = MAX_LENGTH,
|
|
123
|
+
height: CGFloat = DEFAULT_HEIGHT,
|
|
124
|
+
floatingValue: String = "",
|
|
125
|
+
floatingValueColor: Color? = nil,
|
|
126
|
+
floatingIcon: String = "",
|
|
127
|
+
floatingIconColor: Color? = nil,
|
|
128
|
+
placeholder: String = "",
|
|
129
|
+
onChangeText: @escaping (String) -> Void = { _ in },
|
|
130
|
+
error: String = "",
|
|
131
|
+
errorSpacing: Bool = false,
|
|
132
|
+
disabled: Bool = false,
|
|
133
|
+
icon: String = "",
|
|
134
|
+
iconColor: Color? = nil,
|
|
135
|
+
onRightIconPressed: @escaping () -> Void = {},
|
|
136
|
+
onFocus: @escaping () -> Void = {},
|
|
137
|
+
onBlur: @escaping () -> Void = {},
|
|
138
|
+
loading: Bool = false,
|
|
139
|
+
required: Bool = false,
|
|
140
|
+
fontWeight: Font.Weight = .regular,
|
|
141
|
+
keyboardType: UIKeyboardType = .default
|
|
142
|
+
) {
|
|
143
|
+
self._text = text
|
|
144
|
+
self.maxLength = maxLength
|
|
145
|
+
self.height = height
|
|
146
|
+
self.floatingValue = floatingValue
|
|
147
|
+
self.floatingValueColor = floatingValueColor
|
|
148
|
+
self.floatingIcon = floatingIcon
|
|
149
|
+
self.floatingIconColor = floatingIconColor
|
|
150
|
+
self.placeholder = placeholder
|
|
151
|
+
self.onChangeText = onChangeText
|
|
152
|
+
self.error = error
|
|
153
|
+
self.errorSpacing = errorSpacing
|
|
154
|
+
self.disabled = disabled
|
|
155
|
+
self.icon = icon
|
|
156
|
+
self.iconColor = iconColor
|
|
157
|
+
self.onRightIconPressed = onRightIconPressed
|
|
158
|
+
self.onFocus = onFocus
|
|
159
|
+
self.onBlur = onBlur
|
|
160
|
+
self.loading = loading
|
|
161
|
+
self.required = required
|
|
162
|
+
self.fontWeight = fontWeight
|
|
163
|
+
self.keyboardType = keyboardType
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
public var body: some View {
|
|
167
|
+
VStack(alignment: .leading, spacing: 0) {
|
|
168
|
+
ZStack(alignment: .topLeading) {
|
|
169
|
+
if !floatingValue.isEmpty || !floatingIcon.isEmpty {
|
|
170
|
+
HStack(spacing: 4) {
|
|
171
|
+
MomoText(
|
|
172
|
+
floatingValue,
|
|
173
|
+
typography: .labelSMedium,
|
|
174
|
+
color: disabled ? theme.colors.text.disable : (floatingValueColor ?? theme.colors.text.hint)
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
if required {
|
|
178
|
+
MomoText("*", typography: .labelSMedium, color: theme.colors.error.primary)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if !floatingIcon.isEmpty {
|
|
182
|
+
Icon(
|
|
183
|
+
source: floatingIcon,
|
|
184
|
+
size: 16,
|
|
185
|
+
color: disabled ? theme.colors.text.disable : (floatingIconColor ?? theme.colors.text.default)
|
|
186
|
+
)
|
|
187
|
+
.padding(.leading, Spacing.XS)
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
.padding(.horizontal, Spacing.S)
|
|
191
|
+
.background(
|
|
192
|
+
GeometryReader { geo in
|
|
193
|
+
Color.clear.onAppear { floatingLabelHeight = geo.size.height }
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
.background(theme.colors.background.surface)
|
|
197
|
+
// Kotlin centers the label within the box-height-tall decorationBox
|
|
198
|
+
// by default, then applies `offsetY = -scaleHeight / 2` — net effect:
|
|
199
|
+
// the label ends up centered exactly on the box's top border. Our
|
|
200
|
+
// ZStack anchors top-leading instead, so matching that requires
|
|
201
|
+
// offsetting by half the label's OWN measured height, not half the
|
|
202
|
+
// (104pt-tall) text-area box height.
|
|
203
|
+
.offset(x: Spacing.S, y: -floatingLabelHeight / 2)
|
|
204
|
+
.zIndex(10)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
VStack {
|
|
208
|
+
HStack(alignment: .top, spacing: 0) {
|
|
209
|
+
ZStack(alignment: .topLeading) {
|
|
210
|
+
if text.isEmpty {
|
|
211
|
+
Text(placeholder)
|
|
212
|
+
.foregroundColor(disabled ? theme.colors.text.disable : theme.colors.text.hint)
|
|
213
|
+
.font(.system(size: 16, weight: fontWeight))
|
|
214
|
+
.padding(.horizontal, 16)
|
|
215
|
+
.padding(.vertical, 12)
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
UITextViewWrapper(
|
|
219
|
+
text: $text,
|
|
220
|
+
maxLength: maxLength,
|
|
221
|
+
textColor: disabled ? theme.colors.text.disable : theme.colors.text.default,
|
|
222
|
+
cursorColor: theme.colors.primary,
|
|
223
|
+
fontWeight: fontWeight,
|
|
224
|
+
disabled: disabled,
|
|
225
|
+
onChangeText: onChangeText,
|
|
226
|
+
onDone: {
|
|
227
|
+
// Handle done action if needed
|
|
228
|
+
},
|
|
229
|
+
onFocus: {
|
|
230
|
+
isFocused = true
|
|
231
|
+
onFocus()
|
|
232
|
+
}, onBlur: {
|
|
233
|
+
isFocused = false
|
|
234
|
+
isBlurred = true
|
|
235
|
+
onBlur()
|
|
236
|
+
})
|
|
237
|
+
.frame(height: height)
|
|
238
|
+
.padding(.horizontal, 12)
|
|
239
|
+
.padding(.vertical, 8)
|
|
240
|
+
.disabled(disabled)
|
|
241
|
+
}
|
|
242
|
+
.frame(maxWidth: .infinity)
|
|
243
|
+
|
|
244
|
+
// Clear button (mirrors Compose: focused + non-empty).
|
|
245
|
+
if isFocused && !text.isEmpty {
|
|
246
|
+
SwiftUI.Button(action: {
|
|
247
|
+
text = ""
|
|
248
|
+
onChangeText("")
|
|
249
|
+
}) {
|
|
250
|
+
Icon(source: "24_navigation_close_circle_full", size: 16, color: theme.colors.text.hint)
|
|
251
|
+
}
|
|
252
|
+
.padding(.leading, Spacing.XS)
|
|
253
|
+
.padding(.top, 12)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Loading indicator and right icon (independent, mirrors
|
|
257
|
+
// Compose's RenderRightIcon: both can render at once).
|
|
258
|
+
if loading {
|
|
259
|
+
ActivityIndicator(isAnimating: .constant(true), style: .medium)
|
|
260
|
+
.frame(width: 16, height: 16)
|
|
261
|
+
.padding(.leading, Spacing.XS)
|
|
262
|
+
.padding(.top, 12)
|
|
263
|
+
}
|
|
264
|
+
if !icon.isEmpty {
|
|
265
|
+
SwiftUI.Button(action: onRightIconPressed) {
|
|
266
|
+
Icon(source: icon, size: 24, color: disabled ? theme.colors.text.disable : (iconColor ?? theme.colors.text.default))
|
|
267
|
+
}
|
|
268
|
+
.padding(.leading, Spacing.XS)
|
|
269
|
+
.padding(.top, 12)
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
HStack {
|
|
274
|
+
Spacer()
|
|
275
|
+
MomoText("\(text.count)/\(maxLength)", typography: .descriptionXsRegular, color: theme.colors.text.hint)
|
|
276
|
+
}
|
|
277
|
+
.padding(.horizontal, 16)
|
|
278
|
+
.padding(.bottom, 12)
|
|
279
|
+
}
|
|
280
|
+
.background(theme.colors.background.surface)
|
|
281
|
+
.cornerRadius(Radius.S)
|
|
282
|
+
.overlay(
|
|
283
|
+
RoundedRectangle(cornerRadius: Radius.S)
|
|
284
|
+
.stroke(borderColor, lineWidth: 1)
|
|
285
|
+
)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
ErrorView(errorMessage: error, errorSpacing: errorSpacing, hintText: "")
|
|
289
|
+
}
|
|
290
|
+
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in
|
|
291
|
+
if !isBlurred {
|
|
292
|
+
isFocused = true
|
|
293
|
+
onFocus()
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification)) { _ in
|
|
297
|
+
if isFocused {
|
|
298
|
+
isFocused = false
|
|
299
|
+
isBlurred = true
|
|
300
|
+
onBlur()
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
.ignoreBoldTextSetting()
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
private var borderColor: Color {
|
|
307
|
+
if disabled {
|
|
308
|
+
return theme.colors.border.disable
|
|
309
|
+
} else if !error.isEmpty {
|
|
310
|
+
return theme.colors.error.primary
|
|
311
|
+
} else if isFocused {
|
|
312
|
+
return theme.colors.primary
|
|
313
|
+
} else {
|
|
314
|
+
return theme.colors.border.default
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
}
|
|
318
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
//
|
|
2
|
+
// InputDropDown.swift
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Hand-written SwiftUI reimplementation of Compose `InputDropDown`.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import SwiftUI
|
|
9
|
+
|
|
10
|
+
// MARK: - RenderRightIcon (mirrors Compose RenderRightIcon for InputDropDown)
|
|
11
|
+
|
|
12
|
+
private struct RenderRightIcon: View {
|
|
13
|
+
let loading: Bool
|
|
14
|
+
let icon: String
|
|
15
|
+
let color: Color
|
|
16
|
+
let onPressed: () -> Void
|
|
17
|
+
|
|
18
|
+
var body: some View {
|
|
19
|
+
// Mirrors Compose's two independent `if` blocks: loading spinner and icon
|
|
20
|
+
// can both render at once, not exclusively (not an if/else).
|
|
21
|
+
if loading {
|
|
22
|
+
ActivityIndicator(isAnimating: .constant(true), style: .medium)
|
|
23
|
+
.frame(width: 16, height: 16)
|
|
24
|
+
}
|
|
25
|
+
if !icon.isEmpty {
|
|
26
|
+
SwiftUI.Button(action: onPressed) {
|
|
27
|
+
Icon(source: icon, size: 24, color: color)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// MARK: - InputDropDown
|
|
34
|
+
|
|
35
|
+
public struct InputDropDown: View {
|
|
36
|
+
@Environment(\.appTheme) private var theme
|
|
37
|
+
@Binding public var value: String
|
|
38
|
+
|
|
39
|
+
public var floatingValue: String
|
|
40
|
+
public var floatingValueColor: Color?
|
|
41
|
+
public var floatingIcon: String
|
|
42
|
+
public var floatingIconColor: Color?
|
|
43
|
+
public var placeholder: String
|
|
44
|
+
public var size: InputSize
|
|
45
|
+
public var onPress: () -> Void
|
|
46
|
+
public var hintText: String
|
|
47
|
+
public var error: String
|
|
48
|
+
public var errorSpacing: Bool
|
|
49
|
+
public var disabled: Bool
|
|
50
|
+
public var icon: String
|
|
51
|
+
public var iconColor: Color?
|
|
52
|
+
public var onRightIconPressed: () -> Void
|
|
53
|
+
public var leadingIcon: String
|
|
54
|
+
public var leadingIconColor: Color?
|
|
55
|
+
public var loading: Bool
|
|
56
|
+
public var required: Bool
|
|
57
|
+
|
|
58
|
+
public init(
|
|
59
|
+
value: Binding<String>,
|
|
60
|
+
floatingValue: String = "",
|
|
61
|
+
floatingValueColor: Color? = nil,
|
|
62
|
+
floatingIcon: String = "",
|
|
63
|
+
floatingIconColor: Color? = nil,
|
|
64
|
+
placeholder: String = "",
|
|
65
|
+
size: InputSize = .small,
|
|
66
|
+
onPress: @escaping () -> Void = {},
|
|
67
|
+
hintText: String = "",
|
|
68
|
+
error: String = "",
|
|
69
|
+
errorSpacing: Bool = false,
|
|
70
|
+
disabled: Bool = false,
|
|
71
|
+
icon: String = "arrow_chevron_down_small",
|
|
72
|
+
iconColor: Color? = nil,
|
|
73
|
+
onRightIconPressed: @escaping () -> Void = {},
|
|
74
|
+
leadingIcon: String = "",
|
|
75
|
+
leadingIconColor: Color? = nil,
|
|
76
|
+
loading: Bool = false,
|
|
77
|
+
required: Bool = false
|
|
78
|
+
) {
|
|
79
|
+
self._value = value
|
|
80
|
+
self.floatingValue = floatingValue
|
|
81
|
+
self.floatingValueColor = floatingValueColor
|
|
82
|
+
self.floatingIcon = floatingIcon
|
|
83
|
+
self.floatingIconColor = floatingIconColor
|
|
84
|
+
self.placeholder = placeholder
|
|
85
|
+
self.size = size
|
|
86
|
+
self.onPress = onPress
|
|
87
|
+
self.hintText = hintText
|
|
88
|
+
self.error = error
|
|
89
|
+
self.errorSpacing = errorSpacing
|
|
90
|
+
self.disabled = disabled
|
|
91
|
+
self.icon = icon
|
|
92
|
+
self.iconColor = iconColor
|
|
93
|
+
self.onRightIconPressed = onRightIconPressed
|
|
94
|
+
self.leadingIcon = leadingIcon
|
|
95
|
+
self.leadingIconColor = leadingIconColor
|
|
96
|
+
self.loading = loading
|
|
97
|
+
self.required = required
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public var body: some View {
|
|
101
|
+
VStack(alignment: .leading, spacing: 4) {
|
|
102
|
+
ZStack(alignment: .topLeading) {
|
|
103
|
+
// Floating label
|
|
104
|
+
if !floatingValue.isEmpty || !floatingIcon.isEmpty {
|
|
105
|
+
HStack(spacing: 0) {
|
|
106
|
+
MomoText(floatingValue, typography: .labelSMedium, color: floatingTitleColor)
|
|
107
|
+
if required {
|
|
108
|
+
MomoText("*", typography: .labelSMedium, color: theme.colors.error.primary)
|
|
109
|
+
}
|
|
110
|
+
if !floatingIcon.isEmpty {
|
|
111
|
+
Icon(source: floatingIcon, size: 16, color: floatingIconTintColor)
|
|
112
|
+
.padding(.leading, Spacing.XS)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
.padding(.horizontal, Spacing.S)
|
|
116
|
+
.background(theme.colors.background.surface)
|
|
117
|
+
.offset(x: Spacing.S, y: -8)
|
|
118
|
+
.zIndex(10)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Input container
|
|
122
|
+
HStack(alignment: .center, spacing: 0) {
|
|
123
|
+
if !leadingIcon.isEmpty {
|
|
124
|
+
Icon(source: leadingIcon, size: size == .small ? 24 : 32, color: leadingIconTintColor)
|
|
125
|
+
.padding(.trailing, Spacing.M)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
MomoText(
|
|
129
|
+
value.isEmpty ? placeholder : value,
|
|
130
|
+
typography: .bodyDefaultRegular,
|
|
131
|
+
color: value.isEmpty ? placeholderColor : textColor
|
|
132
|
+
)
|
|
133
|
+
.frame(maxWidth: .infinity, alignment: .leading)
|
|
134
|
+
|
|
135
|
+
RenderRightIcon(
|
|
136
|
+
loading: loading,
|
|
137
|
+
icon: icon,
|
|
138
|
+
color: iconTintColor,
|
|
139
|
+
onPressed: onRightIconPressed
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
.padding(.horizontal, Spacing.M)
|
|
143
|
+
.frame(height: size == .small ? 48 : 56)
|
|
144
|
+
.overlay(
|
|
145
|
+
RoundedRectangle(cornerRadius: Radius.S)
|
|
146
|
+
.stroke(getBorderColor(isFocused: false, error: error, disabled: disabled), lineWidth: 1)
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
.contentShape(Rectangle())
|
|
150
|
+
.onTapGesture {
|
|
151
|
+
if !disabled { onPress() }
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
ErrorView(
|
|
155
|
+
errorMessage: error,
|
|
156
|
+
errorSpacing: errorSpacing,
|
|
157
|
+
hintText: hintText
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
.accessibilityElement(children: .combine)
|
|
161
|
+
.accessibility(label: Text(floatingValue))
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// MARK: - Computed colors
|
|
165
|
+
|
|
166
|
+
private var textColor: Color {
|
|
167
|
+
disabled ? theme.colors.text.disable : theme.colors.text.default
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
private var placeholderColor: Color {
|
|
171
|
+
disabled ? theme.colors.text.disable : theme.colors.text.hint
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private var iconTintColor: Color {
|
|
175
|
+
disabled ? theme.colors.text.disable : (iconColor ?? theme.colors.text.default)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
private var floatingTitleColor: Color {
|
|
179
|
+
disabled ? theme.colors.text.disable : (floatingValueColor ?? theme.colors.text.hint)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
private var floatingIconTintColor: Color {
|
|
183
|
+
disabled ? theme.colors.text.disable : (floatingIconColor ?? theme.colors.text.default)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
private var leadingIconTintColor: Color {
|
|
187
|
+
disabled ? theme.colors.text.disable : (leadingIconColor ?? theme.colors.text.hint)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
private func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
|
|
191
|
+
if disabled {
|
|
192
|
+
return theme.colors.border.disable
|
|
193
|
+
} else if !error.isEmpty {
|
|
194
|
+
return theme.colors.error.primary
|
|
195
|
+
} else if isFocused {
|
|
196
|
+
return theme.colors.primary
|
|
197
|
+
} else {
|
|
198
|
+
return theme.colors.border.default
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|