@momo-kits/native-kits 0.0.1-beta.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/CODE_OF_CONDUCT.md +133 -0
- package/CONTRIBUTING.md +114 -0
- package/LICENSE +20 -0
- package/README.md +6 -0
- package/android/build.gradle +82 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsPackage.kt +17 -0
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsViewManager.kt +20 -0
- package/example/ios/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +63 -0
- package/example/ios/Example/Assets.xcassets/Background.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Border.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Card.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Contents.json +6 -0
- package/example/ios/Example/Assets.xcassets/Error.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Primary.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/PrimaryDark.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/PrimaryLight.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Secondary.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Success.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Text.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/TextSecondary.colorset/Contents.json +38 -0
- package/example/ios/Example/Assets.xcassets/Warning.colorset/Contents.json +38 -0
- package/example/ios/Example/ComponentDetail.swift +35 -0
- package/example/ios/Example/ComponentItem.swift +24 -0
- package/example/ios/Example/ComponentModel.swift +31 -0
- package/example/ios/Example/ContentView.swift +53 -0
- package/example/ios/Example/Example.entitlements +10 -0
- package/example/ios/Example/Foundation/ButtonDemo.swift +80 -0
- package/example/ios/Example/Foundation/Popup/ActionSheets.swift +136 -0
- package/example/ios/Example/Foundation/Popup/Floats.swift +127 -0
- package/example/ios/Example/Foundation/Popup/Popups.swift +101 -0
- package/example/ios/Example/Foundation/PopupDemo.swift +366 -0
- package/example/ios/Example/Foundation/TypographyDemo.swift +53 -0
- package/example/ios/Example/Foundation.swift +26 -0
- package/example/ios/Example/Info.plist +18 -0
- package/example/ios/Example/Library/SwipeableDemo.swift +105 -0
- package/example/ios/Example/Library.swift +26 -0
- package/example/ios/Example/Main.swift +11 -0
- package/example/ios/Example/Overview.swift +20 -0
- package/example/ios/Example/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
- 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 +33 -0
- package/example/ios/Example/Resource/library.json +8 -0
- package/example/ios/Example/Utils.swift +30 -0
- package/example/ios/Example/ViewModifier/DarkViewModifier.swift +22 -0
- package/example/ios/Example.xcodeproj/project.pbxproj +565 -0
- package/example/ios/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- 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 +14 -0
- package/example/ios/Example.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
- package/example/ios/Podfile +6 -0
- package/example/ios/Podfile.lock +16 -0
- package/example/ios/Pods/Local Podspecs/MoMoUIKits.podspec.json +29 -0
- package/example/ios/Pods/Manifest.lock +16 -0
- package/example/ios/Pods/Pods.xcodeproj/project.pbxproj +661 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +25 -0
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-dummy.m +5 -0
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-prefix.pch +12 -0
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-umbrella.h +16 -0
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.debug.xcconfig +12 -0
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.modulemap +6 -0
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.release.xcconfig +12 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown +3 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist +29 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m +5 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h +16 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig +14 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap +6 -0
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig +14 -0
- package/ios/Button/Button.swift +131 -0
- package/ios/Colors+Spacing/Colors.swift +170 -0
- package/ios/Colors+Spacing/Radius.swift +11 -0
- package/ios/Colors+Spacing/Spacing.swift +12 -0
- package/ios/Extensions/Color++.swift +25 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +33 -0
- package/ios/OTPKeyboard/OTPKeyboard.swift +145 -0
- package/ios/Popup/Modifiers.swift +172 -0
- package/ios/Popup/PopupView.swift +397 -0
- package/ios/Popup/Utils.swift +186 -0
- package/ios/Swipeable/SwipeCell.swift +270 -0
- package/ios/Swipeable/SwipeCellModel.swift +86 -0
- package/ios/Theme.md +18 -0
- package/ios/Typography/Typography.swift +30 -0
- package/ios/native-kits.podspec +15 -0
- package/package.json +8 -0
- package/publish.sh +28 -0
package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/MoMoUIKits.xcscheme
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1300"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "3B6FB503A75BF5BC1FA6F30BC06B9D28"
|
|
18
|
+
BuildableName = "libMoMoUIKits.a"
|
|
19
|
+
BlueprintName = "MoMoUIKits"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/Pods-Example.xcscheme
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1300"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "0AEE99A309977BD12A049FF48AF9BA4B"
|
|
18
|
+
BuildableName = "libPods-Example.a"
|
|
19
|
+
BlueprintName = "Pods-Example"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>MoMoUIKits.xcscheme</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>isShown</key>
|
|
10
|
+
<false/>
|
|
11
|
+
<key>orderHint</key>
|
|
12
|
+
<integer>0</integer>
|
|
13
|
+
</dict>
|
|
14
|
+
<key>Pods-Example.xcscheme</key>
|
|
15
|
+
<dict>
|
|
16
|
+
<key>isShown</key>
|
|
17
|
+
<false/>
|
|
18
|
+
<key>orderHint</key>
|
|
19
|
+
<integer>1</integer>
|
|
20
|
+
</dict>
|
|
21
|
+
</dict>
|
|
22
|
+
<key>SuppressBuildableAutocreation</key>
|
|
23
|
+
<dict/>
|
|
24
|
+
</dict>
|
|
25
|
+
</plist>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#ifdef __OBJC__
|
|
2
|
+
#import <UIKit/UIKit.h>
|
|
3
|
+
#else
|
|
4
|
+
#ifndef FOUNDATION_EXPORT
|
|
5
|
+
#if defined(__cplusplus)
|
|
6
|
+
#define FOUNDATION_EXPORT extern "C"
|
|
7
|
+
#else
|
|
8
|
+
#define FOUNDATION_EXPORT extern
|
|
9
|
+
#endif
|
|
10
|
+
#endif
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
FOUNDATION_EXPORT double MoMoUIKitsVersionNumber;
|
|
15
|
+
FOUNDATION_EXPORT const unsigned char MoMoUIKitsVersionString[];
|
|
16
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
|
2
|
+
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits
|
|
3
|
+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
|
4
|
+
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
|
|
5
|
+
PODS_BUILD_DIR = ${BUILD_DIR}
|
|
6
|
+
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
|
7
|
+
PODS_ROOT = ${SRCROOT}
|
|
8
|
+
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../../ios
|
|
9
|
+
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
|
|
10
|
+
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
|
11
|
+
SKIP_INSTALL = YES
|
|
12
|
+
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
|
2
|
+
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits
|
|
3
|
+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
|
4
|
+
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
|
|
5
|
+
PODS_BUILD_DIR = ${BUILD_DIR}
|
|
6
|
+
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
|
7
|
+
PODS_ROOT = ${SRCROOT}
|
|
8
|
+
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../../ios
|
|
9
|
+
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
|
|
10
|
+
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
|
11
|
+
SKIP_INSTALL = YES
|
|
12
|
+
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>PreferenceSpecifiers</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>FooterText</key>
|
|
9
|
+
<string>This application makes use of the following third party libraries:</string>
|
|
10
|
+
<key>Title</key>
|
|
11
|
+
<string>Acknowledgements</string>
|
|
12
|
+
<key>Type</key>
|
|
13
|
+
<string>PSGroupSpecifier</string>
|
|
14
|
+
</dict>
|
|
15
|
+
<dict>
|
|
16
|
+
<key>FooterText</key>
|
|
17
|
+
<string>Generated by CocoaPods - https://cocoapods.org</string>
|
|
18
|
+
<key>Title</key>
|
|
19
|
+
<string></string>
|
|
20
|
+
<key>Type</key>
|
|
21
|
+
<string>PSGroupSpecifier</string>
|
|
22
|
+
</dict>
|
|
23
|
+
</array>
|
|
24
|
+
<key>StringsTable</key>
|
|
25
|
+
<string>Acknowledgements</string>
|
|
26
|
+
<key>Title</key>
|
|
27
|
+
<string>Acknowledgements</string>
|
|
28
|
+
</dict>
|
|
29
|
+
</plist>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#ifdef __OBJC__
|
|
2
|
+
#import <UIKit/UIKit.h>
|
|
3
|
+
#else
|
|
4
|
+
#ifndef FOUNDATION_EXPORT
|
|
5
|
+
#if defined(__cplusplus)
|
|
6
|
+
#define FOUNDATION_EXPORT extern "C"
|
|
7
|
+
#else
|
|
8
|
+
#define FOUNDATION_EXPORT extern
|
|
9
|
+
#endif
|
|
10
|
+
#endif
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
FOUNDATION_EXPORT double Pods_ExampleVersionNumber;
|
|
15
|
+
FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[];
|
|
16
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
|
2
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
|
3
|
+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
|
4
|
+
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits" /usr/lib/swift
|
|
5
|
+
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits/MoMoUIKits.modulemap"
|
|
6
|
+
OTHER_LDFLAGS = $(inherited) -ObjC -l"MoMoUIKits" -framework "Combine" -framework "SwiftUI"
|
|
7
|
+
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits/MoMoUIKits.modulemap"
|
|
8
|
+
PODS_BUILD_DIR = ${BUILD_DIR}
|
|
9
|
+
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
|
10
|
+
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
|
11
|
+
PODS_ROOT = ${SRCROOT}/Pods
|
|
12
|
+
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
|
|
13
|
+
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits"
|
|
14
|
+
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
|
2
|
+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
|
|
3
|
+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
|
4
|
+
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" "${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits" /usr/lib/swift
|
|
5
|
+
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits/MoMoUIKits.modulemap"
|
|
6
|
+
OTHER_LDFLAGS = $(inherited) -ObjC -l"MoMoUIKits" -framework "Combine" -framework "SwiftUI"
|
|
7
|
+
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits/MoMoUIKits.modulemap"
|
|
8
|
+
PODS_BUILD_DIR = ${BUILD_DIR}
|
|
9
|
+
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
|
10
|
+
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
|
11
|
+
PODS_ROOT = ${SRCROOT}/Pods
|
|
12
|
+
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
|
|
13
|
+
SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/MoMoUIKits"
|
|
14
|
+
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
|
|
2
|
+
import Foundation
|
|
3
|
+
import SwiftUI
|
|
4
|
+
|
|
5
|
+
// MARK: - ButtonType
|
|
6
|
+
|
|
7
|
+
public enum ButtonType {
|
|
8
|
+
case primary
|
|
9
|
+
case danger
|
|
10
|
+
case tonal
|
|
11
|
+
case secondary
|
|
12
|
+
case outline
|
|
13
|
+
case disabled
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// MARK: - ButtonSize
|
|
17
|
+
|
|
18
|
+
public enum ButtonSize {
|
|
19
|
+
case large
|
|
20
|
+
case medium
|
|
21
|
+
case small
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// MARK: - Button
|
|
25
|
+
|
|
26
|
+
public struct Button: View {
|
|
27
|
+
// MARK: Lifecycle
|
|
28
|
+
|
|
29
|
+
public init(title: String = "", action: @escaping () -> Void, type: ButtonType = .primary, size: ButtonSize = .large, iconLeft: AnyView? = nil, iconRight: AnyView? = nil) {
|
|
30
|
+
self.title = title
|
|
31
|
+
self.action = action
|
|
32
|
+
self.type = type
|
|
33
|
+
self.size = size
|
|
34
|
+
self.iconLeft = iconLeft
|
|
35
|
+
self.iconRight = iconRight
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// MARK: Public
|
|
39
|
+
|
|
40
|
+
public var body: some View {
|
|
41
|
+
SwiftUI.Button(action: action) {
|
|
42
|
+
HStack {
|
|
43
|
+
iconLeft
|
|
44
|
+
renderTitle(title: title, type: type, size: size)
|
|
45
|
+
iconRight
|
|
46
|
+
}
|
|
47
|
+
.buttonSize(size)
|
|
48
|
+
.buttonType(type)
|
|
49
|
+
}.disabled(type == .disabled)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// MARK: Internal
|
|
53
|
+
|
|
54
|
+
var title: String
|
|
55
|
+
var action: () -> Void = {}
|
|
56
|
+
var type: ButtonType = .primary
|
|
57
|
+
var size: ButtonSize = .large
|
|
58
|
+
var iconLeft: AnyView?
|
|
59
|
+
var iconRight: AnyView?
|
|
60
|
+
|
|
61
|
+
func renderTitle(title: String, type: ButtonType, size: ButtonSize) -> Text {
|
|
62
|
+
switch size {
|
|
63
|
+
case .large:
|
|
64
|
+
return Text(title).font(.system(size: 16, weight: Font.Weight.bold))
|
|
65
|
+
case .medium:
|
|
66
|
+
return Text(title).font(.system(size: 14, weight: Font.Weight.bold))
|
|
67
|
+
case .small:
|
|
68
|
+
return Text(title).font(.system(size: 12, weight: Font.Weight.bold))
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private extension View {
|
|
74
|
+
func buttonType(_ type: ButtonType) -> some View {
|
|
75
|
+
switch type {
|
|
76
|
+
case .primary:
|
|
77
|
+
return AnyView(self
|
|
78
|
+
.background(Colors.primary)
|
|
79
|
+
.foregroundColor(Colors.black01)
|
|
80
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.S)))
|
|
81
|
+
case .danger:
|
|
82
|
+
return AnyView(self
|
|
83
|
+
.background(Colors.error)
|
|
84
|
+
.foregroundColor(Colors.black01)
|
|
85
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.S)))
|
|
86
|
+
case .tonal:
|
|
87
|
+
return AnyView(self
|
|
88
|
+
.background(Colors.primaryLight)
|
|
89
|
+
.foregroundColor(Colors.primary)
|
|
90
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.S)))
|
|
91
|
+
case .secondary:
|
|
92
|
+
return AnyView(self
|
|
93
|
+
.background(Colors.card)
|
|
94
|
+
.foregroundColor(Colors.text)
|
|
95
|
+
.cornerRadius(8)
|
|
96
|
+
.overlay(RoundedRectangle(cornerRadius: Radius.S).stroke(Colors.black06, lineWidth: 1))
|
|
97
|
+
.padding(2)
|
|
98
|
+
)
|
|
99
|
+
case .outline:
|
|
100
|
+
return AnyView(self
|
|
101
|
+
.background(Colors.card)
|
|
102
|
+
.foregroundColor(Colors.primary)
|
|
103
|
+
.cornerRadius(8)
|
|
104
|
+
.overlay(RoundedRectangle(cornerRadius: Radius.S).stroke(Colors.primary, lineWidth: 1))
|
|
105
|
+
.padding(2)
|
|
106
|
+
)
|
|
107
|
+
case .disabled:
|
|
108
|
+
return AnyView(self
|
|
109
|
+
.background(Colors.black05)
|
|
110
|
+
.foregroundColor(Colors.black06)
|
|
111
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.S)))
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
func buttonSize(_ size: ButtonSize) -> some View {
|
|
116
|
+
switch size {
|
|
117
|
+
case .large:
|
|
118
|
+
return self
|
|
119
|
+
.frame(maxWidth: .infinity, minHeight: 48, maxHeight: 48)
|
|
120
|
+
.padding([.leading, .trailing], Spacing.XS)
|
|
121
|
+
case .medium:
|
|
122
|
+
return self
|
|
123
|
+
.frame(minWidth: 80, maxWidth: 96, minHeight: 36, maxHeight: 36)
|
|
124
|
+
.padding([.leading, .trailing], Spacing.XS)
|
|
125
|
+
case .small:
|
|
126
|
+
return self
|
|
127
|
+
.frame(minWidth: 56, maxWidth: 76, minHeight: 28, maxHeight: 28)
|
|
128
|
+
.padding([.leading, .trailing], Spacing.XS)
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
|
|
2
|
+
import Foundation
|
|
3
|
+
import SwiftUI
|
|
4
|
+
|
|
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("Text")
|
|
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 = Color("Info")
|
|
17
|
+
public static let success = Color("Success")
|
|
18
|
+
|
|
19
|
+
public static let black20 = Color(hex: "08101d")
|
|
20
|
+
public static let black19 = Color(hex: "0f1c2f")
|
|
21
|
+
public static let black18 = Color(hex: "1c293d")
|
|
22
|
+
public static let black17 = Color(hex: "2b3748")
|
|
23
|
+
public static let black16 = Color(hex: "3a4454")
|
|
24
|
+
public static let black15 = Color(hex: "475160")
|
|
25
|
+
public static let black14 = Color(hex: "555e6c")
|
|
26
|
+
public static let black13 = Color(hex: "636b78")
|
|
27
|
+
public static let black12 = Color(hex: "6f7682")
|
|
28
|
+
public static let black11 = Color(hex: "7e8590")
|
|
29
|
+
public static let black10 = Color(hex: "8c929c")
|
|
30
|
+
public static let black09 = Color(hex: "9a9fa8")
|
|
31
|
+
public static let black08 = Color(hex: "a8adb4")
|
|
32
|
+
public static let black07 = Color(hex: "b5bac0")
|
|
33
|
+
public static let black06 = Color(hex: "c8cbcf")
|
|
34
|
+
public static let black05 = Color(hex: "e0e1e4")
|
|
35
|
+
public static let black04 = Color(hex: "ececee")
|
|
36
|
+
public static let black03 = Color(hex: "f4f5f6")
|
|
37
|
+
public static let black02 = Color(hex: "fafbfc")
|
|
38
|
+
public static let black01 = Color(hex: "ffffff")
|
|
39
|
+
|
|
40
|
+
public static let pink11 = Color(hex: "fef8fc")
|
|
41
|
+
public static let pink10 = Color(hex: "fef4fa")
|
|
42
|
+
public static let pink09 = Color(hex: "fdeaf4")
|
|
43
|
+
public static let pink08 = Color(hex: "fbd5ea")
|
|
44
|
+
public static let pink07 = Color(hex: "f7acd5")
|
|
45
|
+
public static let pink06 = Color(hex: "f382c0")
|
|
46
|
+
public static let pink05 = Color(hex: "ef59ab")
|
|
47
|
+
public static let pink04 = Color(hex: "ed43a0")
|
|
48
|
+
public static let pink03 = Color(hex: "eb2f96")
|
|
49
|
+
public static let pink02 = Color(hex: "d42a87")
|
|
50
|
+
public static let pink01 = Color(hex: "bc2678")
|
|
51
|
+
|
|
52
|
+
public static let violet10 = Color(hex: "fcf8fe")
|
|
53
|
+
public static let violet09 = Color(hex: "faf4fe")
|
|
54
|
+
public static let violet08 = Color(hex: "ead4fc")
|
|
55
|
+
public static let violet07 = Color(hex: "d5aaf9")
|
|
56
|
+
public static let violet06 = Color(hex: "f4e9fd")
|
|
57
|
+
public static let violet05 = Color(hex: "c07ff6")
|
|
58
|
+
public static let violet04 = Color(hex: "ab55f3")
|
|
59
|
+
public static let violet03 = Color(hex: "962af0")
|
|
60
|
+
public static let violet02 = Color(hex: "8726d8")
|
|
61
|
+
public static let violet01 = Color(hex: "7822c0")
|
|
62
|
+
|
|
63
|
+
public static let indigo11 = Color(hex: "f9f9ff")
|
|
64
|
+
public static let indigo10 = Color(hex: "f6f6ff")
|
|
65
|
+
public static let indigo09 = Color(hex: "ededff")
|
|
66
|
+
public static let indigo08 = Color(hex: "dcdbff")
|
|
67
|
+
public static let indigo07 = Color(hex: "b8b7ff")
|
|
68
|
+
public static let indigo06 = Color(hex: "9593ff")
|
|
69
|
+
public static let indigo05 = Color(hex: "716fff")
|
|
70
|
+
public static let indigo04 = Color(hex: "5f5dff")
|
|
71
|
+
public static let indigo03 = Color(hex: "4e4bff")
|
|
72
|
+
public static let indigo02 = Color(hex: "4644e6")
|
|
73
|
+
public static let indigo01 = Color(hex: "3e3ccc")
|
|
74
|
+
|
|
75
|
+
public static let blue11 = Color(hex: "f7fbff")
|
|
76
|
+
public static let blue10 = Color(hex: "f2f8ff")
|
|
77
|
+
public static let blue09 = Color(hex: "e5f1ff")
|
|
78
|
+
public static let blue08 = Color(hex: "cce4ff")
|
|
79
|
+
public static let blue07 = Color(hex: "99caff")
|
|
80
|
+
public static let blue06 = Color(hex: "66afff")
|
|
81
|
+
public static let blue05 = Color(hex: "3395ff")
|
|
82
|
+
public static let blue04 = Color(hex: "1987ff")
|
|
83
|
+
public static let blue03 = Color(hex: "007aff")
|
|
84
|
+
public static let blue02 = Color(hex: "006ee6")
|
|
85
|
+
public static let blue01 = Color(hex: "0062cc")
|
|
86
|
+
|
|
87
|
+
public static let mint11 = Color(hex: "f8fdfd")
|
|
88
|
+
public static let mint10 = Color(hex: "f3fcfc")
|
|
89
|
+
public static let mint09 = Color(hex: "e7f8f8")
|
|
90
|
+
public static let mint08 = Color(hex: "d0f3f3")
|
|
91
|
+
public static let mint07 = Color(hex: "a1e7e7")
|
|
92
|
+
public static let mint06 = Color(hex: "71dada")
|
|
93
|
+
public static let mint05 = Color(hex: "42cece")
|
|
94
|
+
public static let mint04 = Color(hex: "2ac8c8")
|
|
95
|
+
public static let mint03 = Color(hex: "13c2c2")
|
|
96
|
+
public static let mint02 = Color(hex: "11afaf")
|
|
97
|
+
public static let mint01 = Color(hex: "0f9b9b")
|
|
98
|
+
|
|
99
|
+
public static let green11 = Color(hex: "f9fdfa")
|
|
100
|
+
public static let green10 = Color(hex: "f5fcf6")
|
|
101
|
+
public static let green09 = Color(hex: "eaf9ee")
|
|
102
|
+
public static let green08 = Color(hex: "d6f4de")
|
|
103
|
+
public static let green07 = Color(hex: "aee9bd")
|
|
104
|
+
public static let green06 = Color(hex: "85dd9b")
|
|
105
|
+
public static let green05 = Color(hex: "5dd27a")
|
|
106
|
+
public static let green04 = Color(hex: "48cc69")
|
|
107
|
+
public static let green03 = Color(hex: "34c759")
|
|
108
|
+
public static let green02 = Color(hex: "2fb350")
|
|
109
|
+
public static let green01 = Color(hex: "2a9f47")
|
|
110
|
+
|
|
111
|
+
public static let lime11 = Color(hex: "fcfef8")
|
|
112
|
+
public static let lime10 = Color(hex: "fafdf3")
|
|
113
|
+
public static let lime09 = Color(hex: "f5fbe7")
|
|
114
|
+
public static let lime08 = Color(hex: "ecf7cf")
|
|
115
|
+
public static let lime07 = Color(hex: "d9f0a0")
|
|
116
|
+
public static let lime06 = Color(hex: "c6e870")
|
|
117
|
+
public static let lime05 = Color(hex: "b3e141")
|
|
118
|
+
public static let lime04 = Color(hex: "a9dc28")
|
|
119
|
+
public static let lime03 = Color(hex: "a0d911")
|
|
120
|
+
public static let lime02 = Color(hex: "90c30f")
|
|
121
|
+
public static let lime01 = Color(hex: "80ae0e")
|
|
122
|
+
|
|
123
|
+
public static let yellow11 = Color(hex: "fffdf7")
|
|
124
|
+
public static let yellow10 = Color(hex: "fffcf2")
|
|
125
|
+
public static let yellow09 = Color(hex: "fff9e5")
|
|
126
|
+
public static let yellow08 = Color(hex: "fff5cc")
|
|
127
|
+
public static let yellow07 = Color(hex: "ffeb99")
|
|
128
|
+
public static let yellow06 = Color(hex: "ffe066")
|
|
129
|
+
public static let yellow05 = Color(hex: "ffd633")
|
|
130
|
+
public static let yellow04 = Color(hex: "ffd119")
|
|
131
|
+
public static let yellow03 = Color(hex: "fc0")
|
|
132
|
+
public static let yellow02 = Color(hex: "e6b800")
|
|
133
|
+
public static let yellow01 = Color(hex: "cca300")
|
|
134
|
+
|
|
135
|
+
public static let gold11 = Color(hex: "fefbf8")
|
|
136
|
+
public static let gold10 = Color(hex: "fff9f3")
|
|
137
|
+
public static let gold09 = Color(hex: "fef3e7")
|
|
138
|
+
public static let gold08 = Color(hex: "fee8d0")
|
|
139
|
+
public static let gold07 = Color(hex: "fdd1a2")
|
|
140
|
+
public static let gold06 = Color(hex: "fcba73")
|
|
141
|
+
public static let gold05 = Color(hex: "fba345")
|
|
142
|
+
public static let gold04 = Color(hex: "fa972d")
|
|
143
|
+
public static let gold03 = Color(hex: "fa8c16")
|
|
144
|
+
public static let gold02 = Color(hex: "e17e14")
|
|
145
|
+
public static let gold01 = Color(hex: "c87012")
|
|
146
|
+
|
|
147
|
+
public static let orange11 = Color(hex: "fefaf8")
|
|
148
|
+
public static let orange10 = Color(hex: "fff6f3")
|
|
149
|
+
public static let orange09 = Color(hex: "feede8")
|
|
150
|
+
public static let orange08 = Color(hex: "feddd2")
|
|
151
|
+
public static let orange07 = Color(hex: "fdbba4")
|
|
152
|
+
public static let orange06 = Color(hex: "fc9877")
|
|
153
|
+
public static let orange05 = Color(hex: "fb7649")
|
|
154
|
+
public static let orange04 = Color(hex: "fa6532")
|
|
155
|
+
public static let orange03 = Color(hex: "fa541c")
|
|
156
|
+
public static let orange02 = Color(hex: "e14c19")
|
|
157
|
+
public static let orange01 = Color(hex: "c84316")
|
|
158
|
+
|
|
159
|
+
public static let red11 = Color(hex: "fef8f8")
|
|
160
|
+
public static let red10 = Color(hex: "fef4f4")
|
|
161
|
+
public static let red09 = Color(hex: "fee8ea")
|
|
162
|
+
public static let red08 = Color(hex: "fdd3d5")
|
|
163
|
+
public static let red07 = Color(hex: "fba7ab")
|
|
164
|
+
public static let red06 = Color(hex: "f97a81")
|
|
165
|
+
public static let red05 = Color(hex: "f74e57")
|
|
166
|
+
public static let red04 = Color(hex: "f63842")
|
|
167
|
+
public static let red03 = Color(hex: "f5222d")
|
|
168
|
+
public static let red02 = Color(hex: "dd1f29")
|
|
169
|
+
public static let red01 = Color(hex: "c41b24")
|
|
170
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
public enum Spacing {
|
|
4
|
+
public static let XXS: CGFloat = 2
|
|
5
|
+
public static let XS: CGFloat = 4
|
|
6
|
+
public static let S: CGFloat = 8
|
|
7
|
+
public static let M: CGFloat = 12
|
|
8
|
+
public static let L: CGFloat = 16
|
|
9
|
+
public static let XL: CGFloat = 24
|
|
10
|
+
public static let XXL: CGFloat = 32
|
|
11
|
+
public static let XXXL: CGFloat = 48
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
|
|
3
|
+
public extension Color {
|
|
4
|
+
init(hex: UInt, alpha: Double = 1) {
|
|
5
|
+
self.init(
|
|
6
|
+
.sRGB,
|
|
7
|
+
red: Double((hex >> 16) & 0xFF) / 255,
|
|
8
|
+
green: Double((hex >> 08) & 0xFF) / 255,
|
|
9
|
+
blue: Double((hex >> 00) & 0xFF) / 255,
|
|
10
|
+
opacity: alpha
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
init(hex: String) {
|
|
15
|
+
let scanner = Scanner(string: hex)
|
|
16
|
+
var rgbValue: UInt64 = 0
|
|
17
|
+
scanner.scanHexInt64(&rgbValue)
|
|
18
|
+
|
|
19
|
+
let r = (rgbValue & 0xff0000) >> 16
|
|
20
|
+
let g = (rgbValue & 0xff00) >> 8
|
|
21
|
+
let b = rgbValue & 0xff
|
|
22
|
+
|
|
23
|
+
self.init(red: Double(r) / 0xff, green: Double(g) / 0xff, blue: Double(b) / 0xff)
|
|
24
|
+
}
|
|
25
|
+
}
|