@momo-kits/native-kits 0.0.1-beta.4 → 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 +77 -0
- package/ios/Chip/Chip.swift +120 -0
- package/ios/Collapse/Collapse.swift +192 -0
- package/ios/{Colors+Spacing → Colors+Radius+Spacing}/Colors.swift +42 -37
- package/ios/Colors+Radius+Spacing/Radius.swift +22 -0
- package/ios/{Colors+Spacing → 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 +87 -0
- package/ios/Information/Information.swift +156 -0
- package/ios/Input/ErrorView.swift +58 -0
- package/ios/Input/Input.swift +461 -77
- 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/OTPKeyboard/OTPKeyboard.swift +1 -1
- 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 +279 -0
- package/ios/Popup/PopupInput.swift +92 -0
- package/ios/Popup/PopupNotify.swift +219 -0
- package/ios/Popup/PopupPromotion.swift +74 -0
- package/ios/PopupView/FullscreenPopup.swift +251 -0
- package/ios/{Popup → PopupView}/Modifiers.swift +6 -20
- package/ios/{Popup → PopupView}/PopupView.swift +38 -146
- package/ios/PopupView/Utils++.swift +281 -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 +69 -0
- 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 -13
- 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 -33
- package/example/ios/Example/ContentView.swift +0 -53
- package/example/ios/Example/Example.entitlements +0 -10
- package/example/ios/Example/Foundation/ButtonDemo.swift +0 -80
- 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 -101
- package/example/ios/Example/Foundation/PopupDemo.swift +0 -366
- package/example/ios/Example/Foundation/TextInputDemo.swift +0 -31
- 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/SwipeableDemo.swift +0 -105
- package/example/ios/Example/Library.swift +0 -26
- package/example/ios/Example/Main.swift +0 -11
- 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 -8
- 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 -570
- 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 -6
- package/example/ios/Podfile.lock +0 -16
- package/example/ios/Pods/Local Podspecs/MoMoUIKits.podspec.json +0 -29
- package/example/ios/Pods/Manifest.lock +0 -16
- package/example/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -661
- 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/xcschememanagement.plist +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 -12
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.release.xcconfig +0 -12
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown +0 -3
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist +0 -29
- 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 -14
- 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 -14
- package/ios/Colors+Spacing/Radius.swift +0 -11
- package/ios/Popup/Utils++.swift +0 -163
- 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,77 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import SwiftUI
|
|
3
|
+
|
|
4
|
+
public struct Checkbox: View{
|
|
5
|
+
@Environment(\.appTheme) private var theme
|
|
6
|
+
@Binding var checked: Bool
|
|
7
|
+
var disabled: Bool
|
|
8
|
+
var onChange: ((Bool)->Void)?
|
|
9
|
+
var indeterminate: Bool
|
|
10
|
+
var title: String
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
public init(_ checked: Binding<Bool>,disabled: Bool = false, onChange: ( (Bool) -> Void)? = nil,
|
|
14
|
+
indeterminate: Bool = false,
|
|
15
|
+
title: String = ""){
|
|
16
|
+
self._checked = checked
|
|
17
|
+
self.disabled = disabled
|
|
18
|
+
self.onChange = onChange
|
|
19
|
+
self.indeterminate = indeterminate
|
|
20
|
+
self.title = title
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
func onCheck(){
|
|
24
|
+
checked.toggle()
|
|
25
|
+
onChange?(checked)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public var body: some View {
|
|
29
|
+
HStack(spacing: Spacing.S) {
|
|
30
|
+
// Checkbox
|
|
31
|
+
SwiftUI.Button(action: onCheck) {
|
|
32
|
+
ZStack {
|
|
33
|
+
RoundedRectangle(cornerRadius: Radius.XS)
|
|
34
|
+
.fill(backgroundColor)
|
|
35
|
+
.frame(width: 20, height: 20)
|
|
36
|
+
.overlay(
|
|
37
|
+
RoundedRectangle(cornerRadius: Radius.XS)
|
|
38
|
+
.stroke(borderColor, lineWidth: Spacing.XXS)
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
if checked {
|
|
42
|
+
Icon(source: indeterminate ? "navigation_minus" : "ic_checked", size: 20, color: Colors.black01)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.buttonStyle(ActiveOpacityButtonStyle(activeOpacity: 0.8))
|
|
47
|
+
.disabled(disabled)
|
|
48
|
+
|
|
49
|
+
// Title
|
|
50
|
+
if !title.isEmpty {
|
|
51
|
+
MomoText(title, typography: .descriptionDefaultRegular)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
private var borderColor: Color {
|
|
57
|
+
if disabled && checked {
|
|
58
|
+
return theme.colors.background.tonal
|
|
59
|
+
} else if disabled {
|
|
60
|
+
return theme.colors.border.disable
|
|
61
|
+
} else if checked {
|
|
62
|
+
return theme.colors.primary
|
|
63
|
+
} else {
|
|
64
|
+
return theme.colors.text.default
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private var backgroundColor: Color {
|
|
69
|
+
if disabled && checked {
|
|
70
|
+
return theme.colors.background.tonal
|
|
71
|
+
} else if checked {
|
|
72
|
+
return theme.colors.primary
|
|
73
|
+
} else {
|
|
74
|
+
return Color.clear
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
public struct Chip: View {
|
|
5
|
+
@Environment(\.appTheme) private var theme
|
|
6
|
+
@Environment(\.momoFontScale) private var fontScale
|
|
7
|
+
public enum ChipSize { case small, large }
|
|
8
|
+
|
|
9
|
+
public struct Dimensions {
|
|
10
|
+
let height: CGFloat
|
|
11
|
+
let horizontal: CGFloat
|
|
12
|
+
let iconSize: CGFloat
|
|
13
|
+
let iconSpacing: CGFloat
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public static let Large = Dimensions(height: 32, horizontal: 12, iconSize: 20, iconSpacing: 4)
|
|
17
|
+
public static let Small = Dimensions(height: 24, horizontal: 10, iconSize: 16, iconSpacing: 4)
|
|
18
|
+
|
|
19
|
+
private let label: String?
|
|
20
|
+
private let iconLeft: String?
|
|
21
|
+
private let iconRight: String?
|
|
22
|
+
private let selected: Bool
|
|
23
|
+
private let onClick: () -> Void
|
|
24
|
+
private let size: ChipSize
|
|
25
|
+
private let iconLeftTint: Color?
|
|
26
|
+
private let iconRightTint: Color?
|
|
27
|
+
private let backgroundColor: Color?
|
|
28
|
+
private let accessibilityLabel: String?
|
|
29
|
+
|
|
30
|
+
public init(
|
|
31
|
+
label: String? = "Label",
|
|
32
|
+
iconLeft: String? = nil,
|
|
33
|
+
iconRight: String? = nil,
|
|
34
|
+
selected: Bool = false,
|
|
35
|
+
onClick: @escaping () -> Void = {},
|
|
36
|
+
size: ChipSize = .large,
|
|
37
|
+
iconLeftTint: Color? = nil,
|
|
38
|
+
iconRightTint: Color? = nil,
|
|
39
|
+
backgroundColor: Color? = nil,
|
|
40
|
+
accessibilityLabel: String? = nil
|
|
41
|
+
) {
|
|
42
|
+
self.label = label
|
|
43
|
+
self.iconLeft = iconLeft
|
|
44
|
+
self.iconRight = iconRight
|
|
45
|
+
self.selected = selected
|
|
46
|
+
self.onClick = onClick
|
|
47
|
+
self.size = size
|
|
48
|
+
self.iconLeftTint = iconLeftTint
|
|
49
|
+
self.iconRightTint = iconRightTint
|
|
50
|
+
self.backgroundColor = backgroundColor
|
|
51
|
+
self.accessibilityLabel = accessibilityLabel
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public var body: some View {
|
|
55
|
+
let dims = (size == .small) ? Self.Small : Self.Large
|
|
56
|
+
// Mirrors Compose's `scaleSize(...)` on every chip dimension so it responds
|
|
57
|
+
// to Dynamic Type scaling the same way the rest of the kit does.
|
|
58
|
+
let height = fontScale(dims.height)
|
|
59
|
+
let horizontal = fontScale(dims.horizontal)
|
|
60
|
+
let iconSize = fontScale(dims.iconSize)
|
|
61
|
+
let iconSpacing = fontScale(dims.iconSpacing)
|
|
62
|
+
let radius = fontScale(Radius.L)
|
|
63
|
+
|
|
64
|
+
let bg: Color = {
|
|
65
|
+
if selected { return theme.colors.background.selected }
|
|
66
|
+
if let explicit = backgroundColor { return explicit }
|
|
67
|
+
return Colors.black03
|
|
68
|
+
}()
|
|
69
|
+
|
|
70
|
+
let textColor: Color = selected ? theme.colors.primary : theme.colors.text.default
|
|
71
|
+
let leftTint: Color = selected ? theme.colors.primary : iconLeftTint ?? theme.colors.text.default
|
|
72
|
+
let rightTint: Color = selected ? theme.colors.primary : iconRightTint ?? theme.colors.text.default
|
|
73
|
+
|
|
74
|
+
SwiftUI.Button(action: onClick) {
|
|
75
|
+
HStack(spacing: iconSpacing) {
|
|
76
|
+
if let iconLeft {
|
|
77
|
+
Icon(source: iconLeft, size: iconSize, color: leftTint)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if let text = label, !text.isEmpty {
|
|
81
|
+
MomoText(text, typography: (size == .large) ? .labelDefaultMedium : .labelSMedium, color: textColor)
|
|
82
|
+
.lineLimit(1)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if let iconRight {
|
|
86
|
+
Icon(source: iconRight, size: iconSize, color: rightTint)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.padding(.horizontal, horizontal)
|
|
90
|
+
.frame(height: height)
|
|
91
|
+
.background(
|
|
92
|
+
RoundedRectangle(cornerRadius: radius, style: .continuous)
|
|
93
|
+
.fill(bg)
|
|
94
|
+
)
|
|
95
|
+
.overlay(
|
|
96
|
+
Group {
|
|
97
|
+
if selected {
|
|
98
|
+
RoundedRectangle(cornerRadius: radius, style: .continuous)
|
|
99
|
+
.stroke(theme.colors.secondary, lineWidth: 2)
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
.contentShape(RoundedRectangle(cornerRadius: radius, style: .continuous))
|
|
104
|
+
}
|
|
105
|
+
.buttonStyle(ActiveOpacityButtonStyle())
|
|
106
|
+
.modifier(ChipAccessibilityModifier(accessibilityLabel: accessibilityLabel))
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private struct ChipAccessibilityModifier: ViewModifier {
|
|
111
|
+
let accessibilityLabel: String?
|
|
112
|
+
|
|
113
|
+
func body(content: Content) -> some View {
|
|
114
|
+
if let id = accessibilityLabel {
|
|
115
|
+
content.accessibilityIdentifier(id)
|
|
116
|
+
} else {
|
|
117
|
+
content
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
|
|
3
|
+
public enum CollapseTitleSize {
|
|
4
|
+
case small
|
|
5
|
+
case medium
|
|
6
|
+
case large
|
|
7
|
+
|
|
8
|
+
var typography: TypographyStyle {
|
|
9
|
+
switch self {
|
|
10
|
+
case .small: return .headerSSemibold
|
|
11
|
+
case .medium: return .headerDefaultBold
|
|
12
|
+
case .large: return .headerMBold
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public struct Collapse<Content: View>: View {
|
|
18
|
+
@Environment(\.appTheme) private var theme
|
|
19
|
+
|
|
20
|
+
private let title: String
|
|
21
|
+
private let description: String?
|
|
22
|
+
private let image: String?
|
|
23
|
+
private let imageSize: CGFloat
|
|
24
|
+
private let subTitle: String?
|
|
25
|
+
private let tagLabel: String?
|
|
26
|
+
private let tagColor: Tag.TagColor
|
|
27
|
+
private let showBorder: Bool
|
|
28
|
+
private let expandDefault: Bool
|
|
29
|
+
private let titleSize: CollapseTitleSize
|
|
30
|
+
private let useBackgroundCollapseButton: Bool
|
|
31
|
+
private let backgroundColor: Color?
|
|
32
|
+
private let titleColor: Color?
|
|
33
|
+
private let accessibilityId: String?
|
|
34
|
+
private let onPress: ((Bool) -> Void)?
|
|
35
|
+
private let content: (() -> Content)?
|
|
36
|
+
|
|
37
|
+
@State private var expanded: Bool
|
|
38
|
+
|
|
39
|
+
public init(
|
|
40
|
+
title: String,
|
|
41
|
+
description: String? = nil,
|
|
42
|
+
image: String? = nil,
|
|
43
|
+
imageSize: CGFloat = 24,
|
|
44
|
+
subTitle: String? = nil,
|
|
45
|
+
tagLabel: String? = nil,
|
|
46
|
+
tagColor: Tag.TagColor = .default,
|
|
47
|
+
showBorder: Bool = false,
|
|
48
|
+
expandDefault: Bool = false,
|
|
49
|
+
titleSize: CollapseTitleSize = .medium,
|
|
50
|
+
useBackgroundCollapseButton: Bool = false,
|
|
51
|
+
backgroundColor: Color? = nil,
|
|
52
|
+
titleColor: Color? = nil,
|
|
53
|
+
accessibilityId: String? = nil,
|
|
54
|
+
onPress: ((Bool) -> Void)? = nil,
|
|
55
|
+
@ViewBuilder content: @escaping () -> Content
|
|
56
|
+
) {
|
|
57
|
+
self.title = title
|
|
58
|
+
self.description = description
|
|
59
|
+
self.image = image
|
|
60
|
+
self.imageSize = imageSize
|
|
61
|
+
self.subTitle = subTitle
|
|
62
|
+
self.tagLabel = tagLabel
|
|
63
|
+
self.tagColor = tagColor
|
|
64
|
+
self.showBorder = showBorder
|
|
65
|
+
self.expandDefault = expandDefault
|
|
66
|
+
self.titleSize = titleSize
|
|
67
|
+
self.useBackgroundCollapseButton = useBackgroundCollapseButton
|
|
68
|
+
self.backgroundColor = backgroundColor
|
|
69
|
+
self.titleColor = titleColor
|
|
70
|
+
self.accessibilityId = accessibilityId
|
|
71
|
+
self.onPress = onPress
|
|
72
|
+
self.content = content
|
|
73
|
+
_expanded = State(initialValue: expandDefault)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Mirrors Kotlin's `accessibilityId ?: "Collapse/$title"`.
|
|
77
|
+
private var automationId: String {
|
|
78
|
+
accessibilityId ?? "Collapse/\(title)"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private var resolvedBackgroundColor: Color {
|
|
82
|
+
backgroundColor ?? theme.colors.background.surface
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public var body: some View {
|
|
86
|
+
VStack(spacing: 0) {
|
|
87
|
+
header
|
|
88
|
+
|
|
89
|
+
if let content {
|
|
90
|
+
if expanded {
|
|
91
|
+
VStack(spacing: 0) {
|
|
92
|
+
content()
|
|
93
|
+
}
|
|
94
|
+
.frame(maxWidth: .infinity)
|
|
95
|
+
.overlay(
|
|
96
|
+
showBorder
|
|
97
|
+
? RoundedRectangle(cornerRadius: 0)
|
|
98
|
+
.stroke(theme.colors.border.default, lineWidth: 1)
|
|
99
|
+
: nil
|
|
100
|
+
)
|
|
101
|
+
.transition(.move(edge: .top).combined(with: .opacity))
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
.frame(maxWidth: .infinity)
|
|
106
|
+
.background(resolvedBackgroundColor)
|
|
107
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.S, style: .continuous))
|
|
108
|
+
.accessibilityIdentifier(automationId)
|
|
109
|
+
.overlay(
|
|
110
|
+
showBorder
|
|
111
|
+
? RoundedRectangle(cornerRadius: Radius.S, style: .continuous)
|
|
112
|
+
.stroke(theme.colors.border.default, lineWidth: 1)
|
|
113
|
+
: nil
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private var header: some View {
|
|
118
|
+
SwiftUI.Button(action: {
|
|
119
|
+
onPress?(expanded)
|
|
120
|
+
withAnimation(.easeInOut(duration: 0.3)) {
|
|
121
|
+
expanded.toggle()
|
|
122
|
+
}
|
|
123
|
+
}) {
|
|
124
|
+
HStack(alignment: .top, spacing: 0) {
|
|
125
|
+
if let image {
|
|
126
|
+
ImageView(image, contentMode: .fill)
|
|
127
|
+
.frame(width: imageSize, height: imageSize)
|
|
128
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.XS, style: .continuous))
|
|
129
|
+
Spacer().frame(width: Spacing.S)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
VStack(alignment: .leading, spacing: 0) {
|
|
133
|
+
MomoText(
|
|
134
|
+
title,
|
|
135
|
+
typography: titleSize.typography,
|
|
136
|
+
color: titleColor ?? theme.colors.text.default
|
|
137
|
+
)
|
|
138
|
+
if let description {
|
|
139
|
+
MomoText(
|
|
140
|
+
description,
|
|
141
|
+
typography: .bodyDefaultRegular,
|
|
142
|
+
color: theme.colors.text.secondary
|
|
143
|
+
)
|
|
144
|
+
.lineLimit(2)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.frame(maxWidth: .infinity, alignment: .leading)
|
|
148
|
+
|
|
149
|
+
if subTitle != nil || tagLabel != nil {
|
|
150
|
+
Spacer().frame(width: Spacing.S)
|
|
151
|
+
if let subTitle {
|
|
152
|
+
MomoText(
|
|
153
|
+
subTitle,
|
|
154
|
+
typography: .bodyDefaultRegular,
|
|
155
|
+
color: theme.colors.text.secondary
|
|
156
|
+
)
|
|
157
|
+
.lineLimit(1)
|
|
158
|
+
} else if let tagLabel {
|
|
159
|
+
Tag(label: tagLabel, color: tagColor)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
Spacer().frame(width: Spacing.S)
|
|
164
|
+
chevron
|
|
165
|
+
}
|
|
166
|
+
.padding(.horizontal, Spacing.M)
|
|
167
|
+
.padding(.vertical, Spacing.S)
|
|
168
|
+
.frame(maxWidth: .infinity)
|
|
169
|
+
.contentShape(Rectangle())
|
|
170
|
+
}
|
|
171
|
+
.buttonStyle(ActiveOpacityButtonStyle())
|
|
172
|
+
.accessibilityIdentifier("\(automationId)|touch")
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
private var chevron: some View {
|
|
176
|
+
Group {
|
|
177
|
+
if useBackgroundCollapseButton {
|
|
178
|
+
Icon(source: "arrow_chevron_down_small", size: 16, color: theme.colors.primary)
|
|
179
|
+
.rotationEffect(.degrees(expanded ? 180 : 0))
|
|
180
|
+
.frame(width: 24, height: 24)
|
|
181
|
+
.background(
|
|
182
|
+
RoundedRectangle(cornerRadius: Radius.M, style: .continuous)
|
|
183
|
+
.fill(theme.colors.background.tonal)
|
|
184
|
+
)
|
|
185
|
+
} else {
|
|
186
|
+
Icon(source: "arrow_chevron_down_small", size: 24, color: theme.colors.text.default)
|
|
187
|
+
.rotationEffect(.degrees(expanded ? 180 : 0))
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
.animation(.easeInOut(duration: 0.3), value: expanded)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -3,40 +3,41 @@ import Foundation
|
|
|
3
3
|
import SwiftUI
|
|
4
4
|
|
|
5
5
|
public enum Colors {
|
|
6
|
-
public static let primary = Color("Primary")
|
|
7
|
-
public static let primaryDark = Color("PrimaryDark")
|
|
8
|
-
public static let primaryLight = Color("PrimaryLight")
|
|
9
|
-
public static let secondary = Color("Secondary")
|
|
10
|
-
public static let background = Color("Background")
|
|
11
|
-
public static let border = Color("Border")
|
|
12
|
-
public static let text = Color("
|
|
13
|
-
public static let textSecondary = Color("TextSecondary")
|
|
14
|
-
public static let card = Color("Card")
|
|
15
|
-
public static let error = Color("Error")
|
|
16
|
-
public static let info =
|
|
17
|
-
public static let success = Color("Success")
|
|
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: "
|
|
6
|
+
public static let primary = Color.momoAsset("Primary")
|
|
7
|
+
public static let primaryDark = Color.momoAsset("PrimaryDark")
|
|
8
|
+
public static let primaryLight = Color.momoAsset("PrimaryLight")
|
|
9
|
+
public static let secondary = Color.momoAsset("Secondary")
|
|
10
|
+
public static let background = Color.momoAsset("Background")
|
|
11
|
+
public static let border = Color.momoAsset("Border")
|
|
12
|
+
public static let text = Color.momoAsset("ThemeColors/text-default")
|
|
13
|
+
public static let textSecondary = Color.momoAsset("TextSecondary")
|
|
14
|
+
public static let card = Color.momoAsset("Card")
|
|
15
|
+
public static let error = Color.momoAsset("Error")
|
|
16
|
+
public static let info = blue03
|
|
17
|
+
public static let success = Color.momoAsset("Success")
|
|
18
|
+
|
|
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")
|
|
@@ -48,14 +49,18 @@ public enum Colors {
|
|
|
48
49
|
public static let pink03 = Color(hex: "eb2f96")
|
|
49
50
|
public static let pink02 = Color(hex: "d42a87")
|
|
50
51
|
public static let pink01 = Color(hex: "bc2678")
|
|
52
|
+
public static let pinkMoMoBranding = Color(hex: "a50064")
|
|
53
|
+
|
|
51
54
|
|
|
52
|
-
public static let
|
|
53
|
-
public static let
|
|
55
|
+
public static let violet11 = Color(hex: "fcf8fe")
|
|
56
|
+
public static let violet11Stroke = Color(hex: "dfe1e5")
|
|
57
|
+
public static let violet10 = Color(hex: "faf4fe")
|
|
58
|
+
public static let violet09 = Color(hex: "f4e9fd")
|
|
54
59
|
public static let violet08 = Color(hex: "ead4fc")
|
|
55
60
|
public static let violet07 = Color(hex: "d5aaf9")
|
|
56
|
-
public static let violet06 = Color(hex: "
|
|
57
|
-
public static let violet05 = Color(hex: "
|
|
58
|
-
public static let violet04 = Color(hex: "
|
|
61
|
+
public static let violet06 = Color(hex: "c07ff6")
|
|
62
|
+
public static let violet05 = Color(hex: "ab55f3")
|
|
63
|
+
public static let violet04 = Color(hex: "a03ff1")
|
|
59
64
|
public static let violet03 = Color(hex: "962af0")
|
|
60
65
|
public static let violet02 = Color(hex: "8726d8")
|
|
61
66
|
public static let violet01 = Color(hex: "7822c0")
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
public enum Radius {
|
|
5
|
+
public static let XXS: CGFloat = 2
|
|
6
|
+
public static let XS: CGFloat = 4
|
|
7
|
+
public static let S: CGFloat = 8
|
|
8
|
+
public static let M: CGFloat = 12
|
|
9
|
+
public static let L: CGFloat = 16
|
|
10
|
+
public static let XL: CGFloat = 24
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public struct RoundedCorner: Shape {
|
|
14
|
+
|
|
15
|
+
var radius: CGFloat = .infinity
|
|
16
|
+
var corners: UIRectCorner = .allCorners
|
|
17
|
+
|
|
18
|
+
public func path(in rect: CGRect) -> Path {
|
|
19
|
+
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
|
|
20
|
+
return Path(path.cgPath)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -8,5 +8,7 @@ public enum Spacing {
|
|
|
8
8
|
public static let L: CGFloat = 16
|
|
9
9
|
public static let XL: CGFloat = 24
|
|
10
10
|
public static let XXL: CGFloat = 32
|
|
11
|
-
public static let
|
|
11
|
+
public static let Size3XL: CGFloat = 48
|
|
12
|
+
public static let Size4XL: CGFloat = 56
|
|
13
|
+
public static let Size5XL: CGFloat = 64
|
|
12
14
|
}
|