@momo-kits/native-kits 0.0.1-beta.5 → 0.89.1-2
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/README.md +1 -0
- package/android/.gradle/8.0/checksums/checksums.lock +0 -0
- package/android/.gradle/8.0/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/8.0/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.0/gc.properties +0 -0
- package/android/.gradle/config.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +12 -0
- package/android/.idea/migrations.xml +10 -0
- package/android/.idea/misc.xml +10 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/.idea/workspace.xml +50 -0
- package/android/build.gradle +35 -69
- package/android/local.properties +8 -0
- package/android/proguard-rules.pro +21 -0
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/momoplatform/nativekits/foundations/Button.kt +16 -0
- package/android/src/main/java/com/momoplatform/nativekits/libs/Logo.kt +63 -0
- package/android/src/main/java/com/momoplatform/nativekits/libs/TrustBanner.kt +246 -0
- package/android/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/android/src/main/res/drawable-v24/ic_launcher_foreground.xml +30 -0
- package/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
- package/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/values/colors.xml +10 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/themes.xml +3 -0
- package/android/src/main/res/values-night/themes.xml +3 -0
- package/android/src/main/res/xml/backup_rules.xml +13 -0
- package/android/src/main/res/xml/data_extraction_rules.xml +19 -0
- package/build.gradle.kts +18 -0
- package/compose/build.gradle.kts +82 -0
- package/compose/src/androidMain/AndroidManifest.xml +2 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +8 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/utils/Utils.android.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Components.kt +194 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +197 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +133 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +27 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +288 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +80 -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 +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +126 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +299 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +246 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +223 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +244 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +281 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PromotionPopup.kt +72 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +65 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +64 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +63 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +73 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +150 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +173 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +242 -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 +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1321 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +5 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +97 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +9 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/utils/Utils.ios.kt +18 -0
- package/gradle.properties +19 -0
- package/gradlew +240 -0
- package/gradlew.bat +91 -0
- package/ios/Button/Button.swift +9 -2
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +126 -0
- package/ios/Colors+Radius+Spacing/Colors.swift +21 -19
- package/ios/Input/Input.swift +1 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +12 -4
- package/ios/Popup/PopupDisplay.swift +72 -81
- package/ios/Popup/PopupInput.swift +96 -0
- package/ios/Popup/PopupPromotion.swift +52 -0
- package/ios/ScrollIndicator/ScrollIndicator.swift +79 -0
- package/ios/Template/Logo/Logo.swift +75 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +189 -0
- package/ios/native-kits.podspec +1 -1
- package/local.properties +8 -0
- package/package.json +6 -6
- package/publish.sh +1 -10
- package/settings.gradle.kts +41 -0
- package/android/gradle.properties +0 -5
- 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/Assets.xcassets/Background.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Border.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Card.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Contents.json +0 -6
- package/example/ios/Example/Assets.xcassets/Error.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Primary.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/PrimaryDark.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/PrimaryLight.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Secondary.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Success.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Text.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/TextSecondary.colorset/Contents.json +0 -38
- package/example/ios/Example/Assets.xcassets/Warning.colorset/Contents.json +0 -38
- 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/Preview Content/Preview Assets.xcassets/Contents.json +0 -6
- 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
|
@@ -16,27 +16,28 @@ public enum Colors {
|
|
|
16
16
|
public static let info = Color("Info")
|
|
17
17
|
public static let success = Color("Success")
|
|
18
18
|
|
|
19
|
-
public static let black20 = Color(hex: "
|
|
20
|
-
public static let black19 = Color(hex: "
|
|
21
|
-
public static let black18 = Color(hex: "
|
|
22
|
-
public static let black17 = Color(hex: "
|
|
23
|
-
public static let black16 = Color(hex: "
|
|
24
|
-
public static let black15 = Color(hex: "
|
|
25
|
-
public static let black14 = Color(hex: "
|
|
26
|
-
public static let black13 = Color(hex: "
|
|
27
|
-
public static let black12 = Color(hex: "
|
|
28
|
-
public static let black11 = Color(hex: "
|
|
29
|
-
public static let black10 = Color(hex: "
|
|
30
|
-
public static let black09 = Color(hex: "
|
|
31
|
-
public static let black08 = Color(hex: "
|
|
32
|
-
public static let black07 = Color(hex: "
|
|
33
|
-
public static let black06 = Color(hex: "
|
|
34
|
-
public static let black05 = Color(hex: "
|
|
35
|
-
public static let black04 = Color(hex: "
|
|
36
|
-
public static let black03 = Color(hex: "
|
|
37
|
-
public static let black02 = Color(hex: "
|
|
19
|
+
public static let black20 = Color(hex: "000000")
|
|
20
|
+
public static let black19 = Color(hex: "18191a")
|
|
21
|
+
public static let black18 = Color(hex: "242424")
|
|
22
|
+
public static let black17 = Color(hex: "303233")
|
|
23
|
+
public static let black16 = Color(hex: "404040")
|
|
24
|
+
public static let black15 = Color(hex: "484848")
|
|
25
|
+
public static let black14 = Color(hex: "565656")
|
|
26
|
+
public static let black13 = Color(hex: "646464")
|
|
27
|
+
public static let black12 = Color(hex: "727272")
|
|
28
|
+
public static let black11 = Color(hex: "878787")
|
|
29
|
+
public static let black10 = Color(hex: "a0a0a0")
|
|
30
|
+
public static let black09 = Color(hex: "b9b9b9")
|
|
31
|
+
public static let black08 = Color(hex: "c6c6c6")
|
|
32
|
+
public static let black07 = Color(hex: "cccccc")
|
|
33
|
+
public static let black06 = Color(hex: "d8d8d8")
|
|
34
|
+
public static let black05 = Color(hex: "e5e5e5")
|
|
35
|
+
public static let black04 = Color(hex: "e8e8e8")
|
|
36
|
+
public static let black03 = Color(hex: "f0f0f0")
|
|
37
|
+
public static let black02 = Color(hex: "f9f9f9")
|
|
38
38
|
public static let black01 = Color(hex: "ffffff")
|
|
39
39
|
|
|
40
|
+
|
|
40
41
|
public static let pink11 = Color(hex: "fef8fc")
|
|
41
42
|
public static let pink10 = Color(hex: "fef4fa")
|
|
42
43
|
public static let pink09 = Color(hex: "fdeaf4")
|
|
@@ -49,6 +50,7 @@ public enum Colors {
|
|
|
49
50
|
public static let pink02 = Color(hex: "d42a87")
|
|
50
51
|
public static let pink01 = Color(hex: "bc2678")
|
|
51
52
|
|
|
53
|
+
|
|
52
54
|
public static let violet10 = Color(hex: "fcf8fe")
|
|
53
55
|
public static let violet09 = Color(hex: "faf4fe")
|
|
54
56
|
public static let violet08 = Color(hex: "ead4fc")
|
package/ios/Input/Input.swift
CHANGED
|
@@ -8,9 +8,13 @@ typealias SwiftButton = SwiftUI.Button
|
|
|
8
8
|
public struct KeyboardButton: View {
|
|
9
9
|
// MARK: Lifecycle
|
|
10
10
|
|
|
11
|
-
public init(_ key: String, action: @escaping (_ key: String)->Void) {
|
|
11
|
+
public init(_ key: String, action: @escaping (_ key: String)->Void, width: CGFloat = .infinity, height: CGFloat = 48, color: Color = Colors.card, textColor: Color = Colors.text) {
|
|
12
12
|
self.key = key
|
|
13
13
|
self.action = action
|
|
14
|
+
self.width = width
|
|
15
|
+
self.height = height
|
|
16
|
+
self.color = color
|
|
17
|
+
self.textColor = textColor
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
// MARK: Public
|
|
@@ -19,9 +23,9 @@ public struct KeyboardButton: View {
|
|
|
19
23
|
SwiftUI.Button(action: { self.action(key) }) {
|
|
20
24
|
HStack {
|
|
21
25
|
Text(key).font(.system(size: 24, weight: .bold))
|
|
22
|
-
}.frame(maxWidth:
|
|
23
|
-
.background(
|
|
24
|
-
.foregroundColor(
|
|
26
|
+
}.frame(maxWidth: CGFloat(width), minHeight: height)
|
|
27
|
+
.background(color)
|
|
28
|
+
.foregroundColor(textColor)
|
|
25
29
|
.clipShape(RoundedRectangle(cornerRadius: 8))
|
|
26
30
|
}
|
|
27
31
|
}
|
|
@@ -30,4 +34,8 @@ public struct KeyboardButton: View {
|
|
|
30
34
|
|
|
31
35
|
var key: String = ""
|
|
32
36
|
var action: (_ key: String)->Void
|
|
37
|
+
var width: CGFloat
|
|
38
|
+
var height: CGFloat
|
|
39
|
+
var color: Color
|
|
40
|
+
var textColor: Color
|
|
33
41
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import SDWebImageSwiftUI
|
|
3
2
|
import SwiftUI
|
|
4
3
|
|
|
@@ -21,9 +20,8 @@ public enum PopupButtonType {
|
|
|
21
20
|
public struct PopupDisplay: View {
|
|
22
21
|
// MARK: Lifecycle
|
|
23
22
|
|
|
24
|
-
public init(isPresented: Binding<Bool>, title: String = "
|
|
23
|
+
public init(isPresented: Binding<Bool>, title: String = "", description: String = "", url: String = "", buttonDirection: PopupButtonDirection = .column, buttonType: PopupButtonType = .button, actionButtonTitle: String = "", closeButtonTitle: String = "", onPressAction: @escaping () -> Void = {}, onPressCloseButton: @escaping () -> Void = {}, onClose: @escaping () -> Void = {}) {
|
|
25
24
|
self._isPresented = isPresented
|
|
26
|
-
self._inputValue = inputValue
|
|
27
25
|
self.title = title
|
|
28
26
|
self.description = description
|
|
29
27
|
self.url = url
|
|
@@ -32,15 +30,72 @@ public struct PopupDisplay: View {
|
|
|
32
30
|
self.onPressAction = onPressAction
|
|
33
31
|
self.onPressCloseButton = onPressCloseButton
|
|
34
32
|
self.onClose = onClose
|
|
35
|
-
self.
|
|
36
|
-
self.
|
|
37
|
-
|
|
33
|
+
self.closeButtonTitle = closeButtonTitle
|
|
34
|
+
self.actionButtonTitle = actionButtonTitle
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// MARK: Public
|
|
38
|
+
|
|
39
|
+
public var body: some View {
|
|
40
|
+
VStack(spacing: 12) {
|
|
41
|
+
ZStack(alignment: .topTrailing) {
|
|
42
|
+
SwiftUI.Button(action: onPressClose) {
|
|
43
|
+
Image(systemName: "xmark.circle.fill")
|
|
44
|
+
.resizable()
|
|
45
|
+
.frame(width: 16, height: 16)
|
|
46
|
+
}.foregroundColor(Colors.black20)
|
|
47
|
+
.background(Colors.black01.cornerRadius(8))
|
|
48
|
+
.offset(x: 6, y: -6)
|
|
49
|
+
.zIndex(1)
|
|
50
|
+
|
|
51
|
+
VStack {
|
|
52
|
+
WebImage(url: URL(string: url), isAnimating: .constant(true))
|
|
53
|
+
.resizable()
|
|
54
|
+
.scaledToFill()
|
|
55
|
+
.frame(maxWidth: .infinity, maxHeight: 164)
|
|
56
|
+
.clipShape(RoundedCorner(radius: 8, corners: [.topLeft, .topRight]))
|
|
57
|
+
|
|
58
|
+
VStack(alignment: .leading) {
|
|
59
|
+
Text(title)
|
|
60
|
+
.foregroundColor(.black)
|
|
61
|
+
.font(.headerText1)
|
|
62
|
+
.padding(.top, 12)
|
|
63
|
+
.padding(.bottom, 24)
|
|
64
|
+
|
|
65
|
+
Text(description)
|
|
66
|
+
.foregroundColor(.black)
|
|
67
|
+
.font(.paragraph)
|
|
68
|
+
.opacity(0.6)
|
|
69
|
+
.multilineTextAlignment(.leading)
|
|
70
|
+
.padding(.bottom, 20)
|
|
71
|
+
}.padding(.horizontal, 24)
|
|
72
|
+
|
|
73
|
+
if buttonDirection == .row {
|
|
74
|
+
if buttonType == .text {
|
|
75
|
+
RowTextButtons
|
|
76
|
+
} else {
|
|
77
|
+
RowButtons
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
if buttonType == .text {
|
|
81
|
+
ColumnTextButtons
|
|
82
|
+
} else {
|
|
83
|
+
ColumnButtons
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
}.clipped()
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.background(Color.white.cornerRadius(8))
|
|
91
|
+
.shadow(color: .black.opacity(0.08), radius: 2, x: 0, y: 0)
|
|
92
|
+
.shadow(color: .black.opacity(0.16), radius: 24, x: 0, y: 0)
|
|
93
|
+
.padding(.horizontal, 40)
|
|
38
94
|
}
|
|
39
95
|
|
|
40
96
|
// MARK: Internal
|
|
41
97
|
|
|
42
98
|
@Binding var isPresented: Bool
|
|
43
|
-
@Binding var inputValue: String
|
|
44
99
|
var title: String
|
|
45
100
|
var description: String
|
|
46
101
|
var url: String
|
|
@@ -49,20 +104,19 @@ public struct PopupDisplay: View {
|
|
|
49
104
|
var onPressAction: () -> Void
|
|
50
105
|
var onPressCloseButton: () -> Void
|
|
51
106
|
var onClose: () -> Void
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var onTextChange: ((String) -> Void)?
|
|
107
|
+
var actionButtonTitle: String
|
|
108
|
+
var closeButtonTitle: String
|
|
55
109
|
|
|
56
110
|
var RowTextButtons: some View {
|
|
57
111
|
HStack {
|
|
58
112
|
SwiftUI.Button(action: onPressCloseButton) {
|
|
59
|
-
Text(
|
|
113
|
+
Text(closeButtonTitle)
|
|
60
114
|
.font(.action2)
|
|
61
115
|
}.foregroundColor(Colors.black09)
|
|
62
116
|
.padding(.trailing, 12)
|
|
63
117
|
|
|
64
118
|
SwiftUI.Button(action: onPressAction) {
|
|
65
|
-
Text(
|
|
119
|
+
Text(actionButtonTitle)
|
|
66
120
|
.font(.action2)
|
|
67
121
|
}.foregroundColor(Colors.primary)
|
|
68
122
|
}
|
|
@@ -73,13 +127,13 @@ public struct PopupDisplay: View {
|
|
|
73
127
|
var ColumnTextButtons: some View {
|
|
74
128
|
VStack(alignment: .trailing) {
|
|
75
129
|
SwiftUI.Button(action: onPressAction) {
|
|
76
|
-
Text(
|
|
130
|
+
Text(actionButtonTitle)
|
|
77
131
|
.font(.action2)
|
|
78
132
|
}.foregroundColor(Colors.primary)
|
|
79
133
|
.padding(.bottom, 6)
|
|
80
134
|
|
|
81
135
|
SwiftUI.Button(action: onPressCloseButton) {
|
|
82
|
-
Text(
|
|
136
|
+
Text(closeButtonTitle)
|
|
83
137
|
.font(.action2)
|
|
84
138
|
}.foregroundColor(Colors.black09)
|
|
85
139
|
}
|
|
@@ -89,8 +143,8 @@ public struct PopupDisplay: View {
|
|
|
89
143
|
|
|
90
144
|
var RowButtons: some View {
|
|
91
145
|
HStack {
|
|
92
|
-
Button(title:
|
|
93
|
-
Button(title:
|
|
146
|
+
Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
|
|
147
|
+
Button(title: actionButtonTitle, action: onPressAction)
|
|
94
148
|
}
|
|
95
149
|
.frame(maxWidth: .infinity, alignment: .center)
|
|
96
150
|
.padding(.horizontal, 24)
|
|
@@ -99,77 +153,14 @@ public struct PopupDisplay: View {
|
|
|
99
153
|
|
|
100
154
|
var ColumnButtons: some View {
|
|
101
155
|
VStack(alignment: .trailing) {
|
|
102
|
-
Button(title:
|
|
103
|
-
Button(title:
|
|
156
|
+
Button(title: actionButtonTitle, action: onPressAction)
|
|
157
|
+
Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
|
|
104
158
|
}
|
|
105
159
|
.frame(maxWidth: .infinity, alignment: .trailing)
|
|
106
160
|
.padding(.horizontal, 24)
|
|
107
161
|
.padding(.bottom, 24)
|
|
108
162
|
}
|
|
109
163
|
|
|
110
|
-
public var body: some View {
|
|
111
|
-
VStack(spacing: 12) {
|
|
112
|
-
ZStack(alignment: .topTrailing) {
|
|
113
|
-
SwiftUI.Button(action: onPressClose) {
|
|
114
|
-
Image(systemName: "xmark.circle.fill")
|
|
115
|
-
.resizable()
|
|
116
|
-
.frame(width: 16, height: 16)
|
|
117
|
-
}.foregroundColor(Colors.black20)
|
|
118
|
-
.background(Colors.black01.cornerRadius(8))
|
|
119
|
-
.offset(x: 6, y: -6)
|
|
120
|
-
.zIndex(1)
|
|
121
|
-
|
|
122
|
-
VStack {
|
|
123
|
-
WebImage(url: URL(string: url), isAnimating: .constant(true))
|
|
124
|
-
.resizable()
|
|
125
|
-
.scaledToFill()
|
|
126
|
-
.frame(maxWidth: .infinity, maxHeight: 164)
|
|
127
|
-
.cornerRadius(8, corners: .topLeft)
|
|
128
|
-
.cornerRadius(8, corners: .topRight)
|
|
129
|
-
|
|
130
|
-
VStack(alignment: .leading) {
|
|
131
|
-
Text(title)
|
|
132
|
-
.foregroundColor(.black)
|
|
133
|
-
.font(.headerText1)
|
|
134
|
-
.padding(.top, 12)
|
|
135
|
-
.padding(.bottom, 24)
|
|
136
|
-
|
|
137
|
-
Text(description)
|
|
138
|
-
.foregroundColor(.black)
|
|
139
|
-
.font(.paragraph)
|
|
140
|
-
.opacity(0.6)
|
|
141
|
-
.multilineTextAlignment(.leading)
|
|
142
|
-
.padding(.bottom, 20)
|
|
143
|
-
}.padding(.horizontal, 24)
|
|
144
|
-
|
|
145
|
-
if haveInput {
|
|
146
|
-
Input($inputValue, placeholder: inputPlaceholder, onChange: onTextChange)
|
|
147
|
-
.padding(.horizontal, 24)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if buttonDirection == .row {
|
|
151
|
-
if buttonType == .text {
|
|
152
|
-
RowTextButtons
|
|
153
|
-
} else {
|
|
154
|
-
RowButtons
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
if buttonType == .text {
|
|
158
|
-
ColumnTextButtons
|
|
159
|
-
} else {
|
|
160
|
-
ColumnButtons
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
}.clipped()
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
.background(Color.white.cornerRadius(8))
|
|
168
|
-
.shadow(color: .black.opacity(0.08), radius: 2, x: 0, y: 0)
|
|
169
|
-
.shadow(color: .black.opacity(0.16), radius: 24, x: 0, y: 0)
|
|
170
|
-
.padding(.horizontal, 40)
|
|
171
|
-
}
|
|
172
|
-
|
|
173
164
|
|
|
174
165
|
func onPressClose(){
|
|
175
166
|
isPresented = false
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import SDWebImageSwiftUI
|
|
2
|
+
import SwiftUI
|
|
3
|
+
|
|
4
|
+
public struct PopupInput: View {
|
|
5
|
+
// MARK: Lifecycle
|
|
6
|
+
|
|
7
|
+
public init(isPresented: Binding<Bool>, title: String = "", description: String = "", numberOfButtons: Int = 1, actionButtonTitle: String = "", closeButtonTitle: String = "", onPressAction: @escaping () -> Void = {}, onPressCloseButton: @escaping () -> Void = {}, onClose: @escaping () -> Void = {}, inputPlaceholder: String = "", inputValue: Binding<String> = Binding.constant(""), onTextChange: ((String) -> Void)? = nil) {
|
|
8
|
+
self._isPresented = isPresented
|
|
9
|
+
self._inputValue = inputValue
|
|
10
|
+
self.title = title
|
|
11
|
+
self.description = description
|
|
12
|
+
self.onPressAction = onPressAction
|
|
13
|
+
self.onPressCloseButton = onPressCloseButton
|
|
14
|
+
self.onClose = onClose
|
|
15
|
+
self.inputPlaceholder = inputPlaceholder
|
|
16
|
+
self.onTextChange = onTextChange
|
|
17
|
+
self.numberOfButtons = numberOfButtons
|
|
18
|
+
self.closeButtonTitle = closeButtonTitle
|
|
19
|
+
self.actionButtonTitle = actionButtonTitle
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// MARK: Public
|
|
23
|
+
|
|
24
|
+
public var body: some View {
|
|
25
|
+
VStack(spacing: 12) {
|
|
26
|
+
ZStack(alignment: .topTrailing) {
|
|
27
|
+
SwiftUI.Button(action: onPressClose) {
|
|
28
|
+
Image(systemName: "xmark.circle.fill")
|
|
29
|
+
.resizable()
|
|
30
|
+
.frame(width: 16, height: 16)
|
|
31
|
+
}.foregroundColor(Colors.black20)
|
|
32
|
+
.background(Colors.black01.cornerRadius(8))
|
|
33
|
+
.offset(x: 6, y: -6)
|
|
34
|
+
.zIndex(1)
|
|
35
|
+
|
|
36
|
+
VStack {
|
|
37
|
+
VStack(alignment: .leading) {
|
|
38
|
+
Text(title)
|
|
39
|
+
.foregroundColor(.black)
|
|
40
|
+
.font(.headerText1)
|
|
41
|
+
.padding(.top, 12)
|
|
42
|
+
.padding(.bottom, 24)
|
|
43
|
+
|
|
44
|
+
Text(description)
|
|
45
|
+
.foregroundColor(.black)
|
|
46
|
+
.font(.paragraph)
|
|
47
|
+
.opacity(0.6)
|
|
48
|
+
.multilineTextAlignment(.leading)
|
|
49
|
+
.padding(.bottom, 20)
|
|
50
|
+
}.padding(.horizontal, 24)
|
|
51
|
+
|
|
52
|
+
Input($inputValue, placeholder: inputPlaceholder, onChange: onTextChange)
|
|
53
|
+
.padding(.horizontal, 24)
|
|
54
|
+
|
|
55
|
+
if numberOfButtons == 1 {
|
|
56
|
+
Button(title: actionButtonTitle, action: onPressAction)
|
|
57
|
+
.padding(.horizontal, 24)
|
|
58
|
+
.padding(.bottom, 24)
|
|
59
|
+
} else {
|
|
60
|
+
HStack {
|
|
61
|
+
Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
|
|
62
|
+
Button(title: actionButtonTitle, action: onPressAction)
|
|
63
|
+
}.padding(.horizontal, 24)
|
|
64
|
+
.padding(.bottom, 24)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
}.clipped()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.background(Color.white.cornerRadius(8))
|
|
71
|
+
.shadow(color: .black.opacity(0.08), radius: 2, x: 0, y: 0)
|
|
72
|
+
.shadow(color: .black.opacity(0.16), radius: 24, x: 0, y: 0)
|
|
73
|
+
.padding(.horizontal, 40)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// MARK: Internal
|
|
77
|
+
|
|
78
|
+
@Binding var isPresented: Bool
|
|
79
|
+
@Binding var inputValue: String
|
|
80
|
+
var title: String
|
|
81
|
+
var description: String
|
|
82
|
+
var onPressAction: () -> Void
|
|
83
|
+
var onPressCloseButton: () -> Void
|
|
84
|
+
var onClose: () -> Void
|
|
85
|
+
var inputPlaceholder: String
|
|
86
|
+
var onTextChange: ((String) -> Void)?
|
|
87
|
+
var numberOfButtons: Int
|
|
88
|
+
var actionButtonTitle: String
|
|
89
|
+
var closeButtonTitle: String
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
func onPressClose(){
|
|
93
|
+
isPresented = false
|
|
94
|
+
onClose()
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import SDWebImageSwiftUI
|
|
2
|
+
import SwiftUI
|
|
3
|
+
|
|
4
|
+
public struct PopupPromotion: View {
|
|
5
|
+
// MARK: Lifecycle
|
|
6
|
+
|
|
7
|
+
public init(isPresented: Binding<Bool>, url: String = "", buttonTitle: String = "", onPressAction: @escaping () -> Void = {}, onClose: @escaping () -> Void = {}) {
|
|
8
|
+
self._isPresented = isPresented
|
|
9
|
+
self.onPressAction = onPressAction
|
|
10
|
+
self.buttonTitle = buttonTitle
|
|
11
|
+
self.onClose = onClose
|
|
12
|
+
self.url = url
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// MARK: Public
|
|
16
|
+
|
|
17
|
+
public var body: some View {
|
|
18
|
+
VStack(spacing: 12) {
|
|
19
|
+
ZStack(alignment: .bottom) {
|
|
20
|
+
WebImage(url: URL(string: url), isAnimating: .constant(true))
|
|
21
|
+
.resizable()
|
|
22
|
+
.placeholder {
|
|
23
|
+
Circle().foregroundColor(.gray)
|
|
24
|
+
}
|
|
25
|
+
.scaledToFill()
|
|
26
|
+
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
27
|
+
.cornerRadius(8)
|
|
28
|
+
|
|
29
|
+
Button(title: buttonTitle, action: onPressAction)
|
|
30
|
+
.padding(.horizontal, 24)
|
|
31
|
+
.padding(.bottom, 24)
|
|
32
|
+
}.clipped()
|
|
33
|
+
}
|
|
34
|
+
.frame(maxWidth: .infinity, maxHeight: 400)
|
|
35
|
+
.shadow(color: .black.opacity(0.08), radius: 2, x: 0, y: 0)
|
|
36
|
+
.shadow(color: .black.opacity(0.16), radius: 24, x: 0, y: 0)
|
|
37
|
+
.padding(.horizontal, 40)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// MARK: Internal
|
|
41
|
+
|
|
42
|
+
@Binding var isPresented: Bool
|
|
43
|
+
var onPressAction: () -> Void
|
|
44
|
+
var onClose: () -> Void
|
|
45
|
+
var buttonTitle: String
|
|
46
|
+
var url: String
|
|
47
|
+
|
|
48
|
+
func onPressClose(){
|
|
49
|
+
isPresented = false
|
|
50
|
+
onClose()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import SwiftUI
|
|
3
|
+
|
|
4
|
+
public struct ScrollViewWithScrollBar<Content: View>: View {
|
|
5
|
+
let INDICATOR_HEIGHT: CGFloat = 4
|
|
6
|
+
@State var position = CGPoint(x: 0, y: 2) //2 is INDICATOR_HEIGHT/2
|
|
7
|
+
@State var contentSize: CGFloat = 0
|
|
8
|
+
@State var scrollViewWidth: CGFloat = 0
|
|
9
|
+
var indicatorWidth: CGFloat
|
|
10
|
+
var indicatorContainerWidth: CGFloat
|
|
11
|
+
var indicatorColor: Color
|
|
12
|
+
var indicatorContainerColor: Color
|
|
13
|
+
@ViewBuilder var content: () -> Content
|
|
14
|
+
|
|
15
|
+
public init(indicatorWidth: CGFloat = 12, indicatorContainerWidth: CGFloat = 36,indicatorColor: Color = Colors.primary, indicatorContainerColor: Color = Colors.black06,@ViewBuilder content: @escaping () -> Content) {
|
|
16
|
+
self.indicatorWidth = indicatorWidth
|
|
17
|
+
self.indicatorContainerWidth = indicatorContainerWidth
|
|
18
|
+
self.content = content
|
|
19
|
+
self.indicatorColor = indicatorColor
|
|
20
|
+
self.indicatorContainerColor = indicatorContainerColor
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// MARK: Public
|
|
24
|
+
|
|
25
|
+
public var body: some View {
|
|
26
|
+
return VStack {
|
|
27
|
+
ScrollView(.horizontal, showsIndicators: false) {
|
|
28
|
+
HStack {
|
|
29
|
+
content()
|
|
30
|
+
}.background(GeometryReader {
|
|
31
|
+
proxy in
|
|
32
|
+
Color.clear.onAppear {
|
|
33
|
+
self.contentSize = proxy.size.width
|
|
34
|
+
self.position = CGPoint(x: indicatorWidth / 2, y: INDICATOR_HEIGHT / 2)
|
|
35
|
+
}
|
|
36
|
+
Color.clear.preference(key: ViewOffsetKey.self,
|
|
37
|
+
value: -proxy.frame(in: .named("scroll")).origin.x)
|
|
38
|
+
|
|
39
|
+
})
|
|
40
|
+
.onPreferenceChange(ViewOffsetKey.self) {
|
|
41
|
+
let newPosition = $0 * ((indicatorContainerWidth - indicatorWidth) / (contentSize - scrollViewWidth)) + indicatorWidth / 2
|
|
42
|
+
if (newPosition > indicatorWidth / 2 && newPosition < indicatorContainerWidth - indicatorWidth / 2 + 1)
|
|
43
|
+
{
|
|
44
|
+
self.position = CGPoint(x: newPosition, y: INDICATOR_HEIGHT / 2)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}.background(GeometryReader {
|
|
48
|
+
proxy in
|
|
49
|
+
Color.clear.onAppear {
|
|
50
|
+
self.scrollViewWidth = proxy.size.width
|
|
51
|
+
}
|
|
52
|
+
}).coordinateSpace(name: "scroll")
|
|
53
|
+
|
|
54
|
+
HStack {
|
|
55
|
+
HStack {}.frame(width: indicatorWidth, height: INDICATOR_HEIGHT)
|
|
56
|
+
.background(indicatorColor)
|
|
57
|
+
.cornerRadius(Radius.S)
|
|
58
|
+
.position(position)
|
|
59
|
+
}.frame(width: indicatorContainerWidth, height: INDICATOR_HEIGHT, alignment: .leading)
|
|
60
|
+
.background(indicatorContainerColor).cornerRadius(Radius.S)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// MARK: - ViewOffsetKey
|
|
70
|
+
|
|
71
|
+
struct ViewOffsetKey: PreferenceKey {
|
|
72
|
+
typealias Value = CGFloat
|
|
73
|
+
|
|
74
|
+
static var defaultValue = CGFloat.zero
|
|
75
|
+
|
|
76
|
+
static func reduce(value: inout Value, nextValue: () -> Value) {
|
|
77
|
+
value += nextValue()
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import SwiftUI
|
|
3
|
+
|
|
4
|
+
public struct LogoView: View {
|
|
5
|
+
var type: String
|
|
6
|
+
var useShadow: Bool
|
|
7
|
+
var useBorder: Bool
|
|
8
|
+
var useBackground : Bool
|
|
9
|
+
var backgroundColor: Color
|
|
10
|
+
var shadowColor : Color
|
|
11
|
+
var borderColor : Color
|
|
12
|
+
var source: String
|
|
13
|
+
var radius: CGFloat
|
|
14
|
+
|
|
15
|
+
public init(source: String = "",
|
|
16
|
+
type: String = "image",
|
|
17
|
+
useBackground : Bool = true,
|
|
18
|
+
useShadow: Bool = true,
|
|
19
|
+
useBorder : Bool = true,
|
|
20
|
+
backgroundColor: Color = Colors.black01,
|
|
21
|
+
shadowColor : Color = Color(hex: "d9d9d9"),
|
|
22
|
+
borderColor : Color = Color(hex: "e2e2e2")){
|
|
23
|
+
self.type = type
|
|
24
|
+
self.useShadow = useShadow
|
|
25
|
+
self.useBorder = useBorder
|
|
26
|
+
self.useBackground = useBackground
|
|
27
|
+
self.backgroundColor = backgroundColor
|
|
28
|
+
self.borderColor = borderColor
|
|
29
|
+
self.source = source
|
|
30
|
+
self.shadowColor = shadowColor
|
|
31
|
+
self.radius = type == "image" ? 7 : 0
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
public var body: some View {
|
|
36
|
+
return ImageView(source)
|
|
37
|
+
.scaledToFit()
|
|
38
|
+
.frame(width: 28, height: 28)
|
|
39
|
+
.cornerRadius(radius)
|
|
40
|
+
.containerBorder(type, useBorder, borderColor)
|
|
41
|
+
.containerBackground(type, useBackground, backgroundColor)
|
|
42
|
+
.containerShadow(useShadow, shadowColor)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private extension View {
|
|
48
|
+
func containerBorder (_ type: String, _ useBorder: Bool, _ borderColor: Color) -> some View {
|
|
49
|
+
Group {
|
|
50
|
+
if (useBorder && type != "icon") {
|
|
51
|
+
self.overlay(RoundedRectangle(cornerRadius: 8).stroke(borderColor, lineWidth: 1))
|
|
52
|
+
} else {
|
|
53
|
+
self
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
func containerBackground (_ type: String, _ useBackground: Bool, _ backgroundColor: Color) -> some View {
|
|
58
|
+
Group {
|
|
59
|
+
if (useBackground && type != "icon") {
|
|
60
|
+
self.background(backgroundColor)
|
|
61
|
+
} else {
|
|
62
|
+
self
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
func containerShadow (_ useShadow: Bool, _ shadowColor: Color) -> some View {
|
|
67
|
+
Group {
|
|
68
|
+
if useShadow {
|
|
69
|
+
self.shadow(color: shadowColor, radius: 2, x: 0, y: 2)
|
|
70
|
+
} else {
|
|
71
|
+
self
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|