@momo-kits/native-kits 0.163.1-beta.2-debug → 0.163.1-beta.20-debug

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/.claude/settings.local.json +112 -0
  2. package/CLAUDE.md +1 -1
  3. package/compose/build.gradle.kts +2 -1
  4. package/compose/build.gradle.kts.backup +1 -0
  5. package/compose/compose.podspec +1 -1
  6. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
  7. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +30 -3
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +8 -10
  9. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +2 -3
  10. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +3 -0
  11. package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +56 -0
  12. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +11 -9
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +0 -1
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +40 -55
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +69 -26
  16. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +5 -5
  17. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +3 -1
  18. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
  19. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +3 -6
  20. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +19 -0
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitFontScale.kt +22 -0
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +28 -21
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +50 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +25 -22
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +37 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +68 -22
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +1 -1
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +7 -1
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +112 -115
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +15 -3
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +33 -9
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +6 -5
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +3 -1
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +2 -1
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +0 -1
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +23 -2
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +9 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +11 -0
  39. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +66 -0
  40. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +26 -3
  41. package/gradle/libs.versions.toml +2 -0
  42. package/gradle.properties +1 -1
  43. package/ios/Application/ApplicationEnvironment.swift +15 -3
  44. package/ios/Application/Components.swift +36 -30
  45. package/ios/Application/FloatingButton.swift +10 -9
  46. package/ios/Application/Localize.swift +309 -0
  47. package/ios/Application/MaxApi.swift +18 -0
  48. package/ios/Application/Navigation/BottomTab/BottomTab.swift +104 -0
  49. package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +215 -0
  50. package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +65 -0
  51. package/ios/Application/Navigation/HeaderBackProps.swift +66 -0
  52. package/ios/Application/Navigation/HeaderTitle.swift +57 -0
  53. package/ios/Application/Navigation/HeaderUser.swift +209 -0
  54. package/ios/Application/Navigation/NavigationContainer.swift +203 -0
  55. package/ios/Application/Navigation/NavigationOptions.swift +109 -0
  56. package/ios/Application/Navigation/Navigator.swift +385 -0
  57. package/ios/Application/Navigation/Overplay/BottomSheet.swift +256 -0
  58. package/ios/Application/Navigation/Overplay/ModalScreen.swift +74 -0
  59. package/ios/Application/Navigation/Overplay/SnackBar.swift +144 -0
  60. package/ios/Application/Navigation/Tracking/ScreenTracker.swift +117 -0
  61. package/ios/Application/Navigation/component/Header.swift +178 -0
  62. package/ios/Application/Navigation/component/HeaderBackground.swift +83 -0
  63. package/ios/Application/Navigation/component/HeaderColor.swift +65 -0
  64. package/ios/Application/Navigation/component/HeaderRightWidthKey.swift +11 -0
  65. package/ios/Application/Navigation/component/NavigationHeaderRight.swift +196 -0
  66. package/ios/Application/Screen.swift +2 -1
  67. package/ios/Application/StackScreen.swift +501 -0
  68. package/ios/Avatar/Avatar.swift +193 -0
  69. package/ios/Badge/Badge.swift +11 -14
  70. package/ios/Badge/BadgeRibbon.swift +91 -17
  71. package/ios/BaselineView/BaselineView.swift +163 -0
  72. package/ios/Button/Button.swift +137 -28
  73. package/ios/Carousel/Carousel.swift +196 -0
  74. package/ios/Checkbox/Checkbox.swift +23 -28
  75. package/ios/Chip/Chip.swift +56 -33
  76. package/ios/Collapse/Collapse.swift +192 -0
  77. package/ios/Colors+Radius+Spacing/Colors.swift +20 -17
  78. package/ios/Colors+Radius+Spacing/Spacing.swift +3 -1
  79. package/ios/Colors+Radius+Spacing/Theme.swift +295 -0
  80. package/ios/DateTimePicker/DateTimePicker.swift +212 -0
  81. package/ios/DateTimePicker/DateTimePickerTypes.swift +55 -0
  82. package/ios/DateTimePicker/DateTimePickerUtils.swift +167 -0
  83. package/ios/DateTimePicker/WheelPicker.swift +165 -0
  84. package/ios/Divider/Divider.swift +16 -0
  85. package/ios/Extensions/ActiveOpacityButtonStyle.swift +14 -0
  86. package/ios/Extensions/Color++.swift +32 -0
  87. package/ios/Icon/Icon.swift +10 -1
  88. package/ios/IconButton/IconButton.swift +140 -0
  89. package/ios/Image/Image.swift +16 -3
  90. package/ios/Information/Information.swift +3 -1
  91. package/ios/Input/ErrorView.swift +3 -1
  92. package/ios/Input/Input.swift +72 -33
  93. package/ios/Input/InputPhoneNumber.swift +33 -21
  94. package/ios/Input/InputSearch.swift +107 -48
  95. package/ios/Input/InputTextArea.swift +134 -64
  96. package/ios/InputDropDown/InputDropDown.swift +201 -0
  97. package/ios/InputMoney/InputMoney.swift +347 -0
  98. package/ios/InputOTP/InputOTP.swift +210 -0
  99. package/ios/Loader/Loader.swift +113 -0
  100. package/ios/MoMoUIKits.podspec +5 -0
  101. package/ios/Pagination/PaginationDot.swift +61 -0
  102. package/ios/Pagination/PaginationNumber.swift +35 -0
  103. package/ios/Pagination/PaginationScroll.swift +101 -0
  104. package/ios/Pagination/PaginationWhiteDot.swift +37 -0
  105. package/ios/Popup/PopupDisplay.swift +11 -20
  106. package/ios/Popup/PopupInput.swift +2 -8
  107. package/ios/Popup/PopupNotify.swift +218 -0
  108. package/ios/Popup/PopupPromotion.swift +5 -3
  109. package/ios/ProgressInfo/ProgressInfo.swift +296 -0
  110. package/ios/Radio/Radio.swift +69 -0
  111. package/ios/Rating/Rating.swift +82 -0
  112. package/ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json +11 -0
  113. package/ios/Resources/MoMoUIKitsColors.xcassets/Background.colorset/Contents.json +38 -0
  114. package/ios/Resources/MoMoUIKitsColors.xcassets/Border.colorset/Contents.json +38 -0
  115. package/ios/Resources/MoMoUIKitsColors.xcassets/Card.colorset/Contents.json +38 -0
  116. package/ios/Resources/MoMoUIKitsColors.xcassets/Contents.json +6 -0
  117. package/ios/Resources/MoMoUIKitsColors.xcassets/Error.colorset/Contents.json +38 -0
  118. package/ios/Resources/MoMoUIKitsColors.xcassets/Primary.colorset/Contents.json +38 -0
  119. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryDark.colorset/Contents.json +38 -0
  120. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryLight.colorset/Contents.json +38 -0
  121. package/ios/Resources/MoMoUIKitsColors.xcassets/Secondary.colorset/Contents.json +38 -0
  122. package/ios/Resources/MoMoUIKitsColors.xcassets/Success.colorset/Contents.json +38 -0
  123. package/ios/Resources/MoMoUIKitsColors.xcassets/Text.colorset/Contents.json +38 -0
  124. package/ios/Resources/MoMoUIKitsColors.xcassets/TextSecondary.colorset/Contents.json +38 -0
  125. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +9 -0
  126. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +38 -0
  127. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +38 -0
  128. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +38 -0
  129. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +38 -0
  130. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +38 -0
  131. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +38 -0
  132. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +38 -0
  133. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +38 -0
  134. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +38 -0
  135. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +38 -0
  136. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +38 -0
  137. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +38 -0
  138. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +38 -0
  139. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +38 -0
  140. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +38 -0
  141. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +38 -0
  142. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +38 -0
  143. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +38 -0
  144. package/ios/Resources/MoMoUIKitsColors.xcassets/Warning.colorset/Contents.json +38 -0
  145. package/ios/Skeleton/Skeleton.swift +99 -0
  146. package/ios/Slider/Slider.swift +237 -0
  147. package/ios/Stepper/Stepper.swift +220 -0
  148. package/ios/Steps/Steps.swift +467 -0
  149. package/ios/SuggestAction/SuggestAction.swift +99 -0
  150. package/ios/Swipeable/SwipeCell.swift +187 -0
  151. package/ios/Swipeable/SwipeCellModel.swift +21 -0
  152. package/ios/Switch/Switch.swift +53 -28
  153. package/ios/TabView/TabView.swift +534 -0
  154. package/ios/Tag/Tag.swift +98 -0
  155. package/ios/Template/TrustBanner/TrustBanner.swift +7 -8
  156. package/ios/Title/Title.swift +269 -0
  157. package/ios/Tooltip/Tooltip.swift +485 -0
  158. package/ios/Typography/FontScaleStore.swift +19 -0
  159. package/ios/Typography/Text.swift +86 -17
  160. package/ios/Typography/Typography.swift +12 -14
  161. package/ios/Uploader/Uploader.swift +174 -0
  162. package/ios/native-kits.podspec +61 -8
  163. package/ios-demo/MoMoUIKitsDemo.podspec +20 -0
  164. package/ios-demo/README.md +120 -0
  165. package/ios-demo/Resources/dot_loading.json +558 -0
  166. package/ios-demo/Resources/icon.json +4052 -0
  167. package/ios-demo/Resources/lottie_circle_loader.json +1 -0
  168. package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +48 -0
  169. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +25 -0
  170. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +26 -0
  171. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +19 -0
  172. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +33 -0
  173. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +48 -0
  174. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +21 -0
  175. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +17 -0
  176. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +28 -0
  177. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +31 -0
  178. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +24 -0
  179. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +110 -0
  180. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +93 -0
  181. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +269 -0
  182. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +117 -0
  183. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +89 -0
  184. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +100 -0
  185. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +126 -0
  186. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +64 -0
  187. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +20 -0
  188. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +93 -0
  189. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
  190. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +124 -0
  191. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +14 -0
  192. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
  193. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +279 -0
  194. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +58 -0
  195. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +78 -0
  196. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +138 -0
  197. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +111 -0
  198. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +136 -0
  199. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +107 -0
  200. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +73 -0
  201. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +100 -0
  202. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +32 -0
  203. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +57 -0
  204. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +70 -0
  205. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +188 -0
  206. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +229 -0
  207. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +72 -0
  208. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
  209. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +121 -0
  210. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +76 -0
  211. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +89 -0
  212. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +32 -0
  213. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +56 -0
  214. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +32 -0
  215. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +150 -0
  216. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +138 -0
  217. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +103 -0
  218. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +94 -0
  219. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +79 -0
  220. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +152 -0
  221. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +33 -0
  222. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +190 -0
  223. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +34 -0
  224. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +182 -0
  225. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +109 -0
  226. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +187 -0
  227. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
  228. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +131 -0
  229. package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +51 -0
  230. package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
  231. package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
  232. package/local.properties +2 -2
  233. package/package.json +1 -1
  234. package/publish.sh +53 -0
  235. package/scripts/gen-ios-color.mjs +136 -0
  236. package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  237. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  238. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -5
  239. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  240. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  241. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  242. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  243. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  244. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
  245. package/ios/Application/FontScaleStore.swift +0 -59
@@ -0,0 +1,196 @@
1
+ import Combine
2
+ import SwiftUI
3
+
4
+ /// Native SwiftUI port of the Compose `Carousel` component.
5
+ ///
6
+ /// Mirrors the Compose API: a paging horizontal carousel driven by an
7
+ /// `itemCount` and a `content` builder that receives the real (modulo) index.
8
+ /// Supports infinite `loop`, `autoplay` with a configurable interval,
9
+ /// inactive-slide `opacity`/`scale` effects, optional `contentPadding`,
10
+ /// snap behavior, and scroll enable/disable. Snap / scroll-index callbacks
11
+ /// report the real item index.
12
+ ///
13
+ /// Available iOS 14+ (uses a custom paging ScrollView so behavior is identical
14
+ /// across versions and supports the loop virtualization + transform effects
15
+ /// that `TabView(.page)` cannot express).
16
+ public struct Carousel<Content: View>: View {
17
+ // MARK: Lifecycle
18
+
19
+ public init(
20
+ itemCount: Int,
21
+ loop: Bool = false,
22
+ autoplay: Bool = false,
23
+ autoplayInterval: TimeInterval = 3.0,
24
+ enableSnap: Bool = true,
25
+ scrollEnabled: Bool = true,
26
+ inactiveSlideOpacity: Double = 1.0,
27
+ inactiveSlideScale: Double = 1.0,
28
+ contentPadding: CGFloat = 0,
29
+ onSnapToItem: @escaping (Int) -> Void = { _ in },
30
+ onScrollIndexChanged: @escaping (Int) -> Void = { _ in },
31
+ @ViewBuilder content: @escaping (_ index: Int) -> Content
32
+ ) {
33
+ self.itemCount = itemCount
34
+ self.loop = loop
35
+ self.autoplay = autoplay
36
+ self.autoplayInterval = autoplayInterval
37
+ self.enableSnap = enableSnap
38
+ self.scrollEnabled = scrollEnabled
39
+ self.inactiveSlideOpacity = inactiveSlideOpacity
40
+ self.inactiveSlideScale = inactiveSlideScale
41
+ self.contentPadding = contentPadding
42
+ self.onSnapToItem = onSnapToItem
43
+ self.onScrollIndexChanged = onScrollIndexChanged
44
+ self.content = content
45
+
46
+ let virtual = loop ? itemCount * 1000 : itemCount
47
+ let start = loop ? (virtual / 2) - ((virtual / 2) % max(itemCount, 1)) : 0
48
+ self.virtualPageCount = virtual
49
+ _currentPage = State(initialValue: start)
50
+ }
51
+
52
+ // MARK: Public
53
+
54
+ public var body: some View {
55
+ if itemCount <= 0 {
56
+ EmptyView()
57
+ } else {
58
+ GeometryReader { geo in
59
+ let pageWidth = max(geo.size.width - contentPadding * 2, 1)
60
+ carouselContent(pageWidth: pageWidth, viewportWidth: geo.size.width)
61
+ }
62
+ }
63
+ }
64
+
65
+ // MARK: Private
66
+
67
+ private let itemCount: Int
68
+ private let loop: Bool
69
+ private let autoplay: Bool
70
+ private let autoplayInterval: TimeInterval
71
+ private let enableSnap: Bool
72
+ private let scrollEnabled: Bool
73
+ private let inactiveSlideOpacity: Double
74
+ private let inactiveSlideScale: Double
75
+ private let contentPadding: CGFloat
76
+ private let onSnapToItem: (Int) -> Void
77
+ private let onScrollIndexChanged: (Int) -> Void
78
+ private let content: (Int) -> Content
79
+
80
+ private let virtualPageCount: Int
81
+
82
+ @State private var currentPage: Int
83
+ @State private var dragOffset: CGFloat = 0
84
+ @State private var isDragging: Bool = false
85
+ @State private var autoplayTick: Int = 0
86
+
87
+ private func realIndex(_ page: Int) -> Int {
88
+ ((page % itemCount) + itemCount) % itemCount
89
+ }
90
+
91
+ @ViewBuilder
92
+ private func carouselContent(pageWidth: CGFloat, viewportWidth: CGFloat) -> some View {
93
+ let step = pageWidth
94
+ // Offset so the current page is centered within the viewport padding.
95
+ let baseOffset = -CGFloat(currentPage) * step + contentPadding
96
+
97
+ // Windows the rendered range around `currentPage` instead of instantiating all
98
+ // `virtualPageCount` slides up front — with `loop=true`, that's `itemCount * 1000`
99
+ // eager views, a real memory/perf regression versus Compose's lazy `HorizontalPager`.
100
+ // Clear spacers of the skipped width keep the HStack's total layout size (and thus
101
+ // the existing `baseOffset` math) unchanged.
102
+ let windowRadius = 3
103
+ let windowStart = max(0, currentPage - windowRadius)
104
+ let windowEnd = min(virtualPageCount - 1, currentPage + windowRadius)
105
+
106
+ ZStack {
107
+ HStack(spacing: 0) {
108
+ if windowStart > 0 {
109
+ Color.clear.frame(width: CGFloat(windowStart) * step)
110
+ }
111
+ ForEach(windowStart...windowEnd, id: \.self) { page in
112
+ slide(page: page, step: step, viewportWidth: viewportWidth)
113
+ .frame(width: pageWidth)
114
+ }
115
+ if windowEnd < virtualPageCount - 1 {
116
+ Color.clear.frame(width: CGFloat(virtualPageCount - 1 - windowEnd) * step)
117
+ }
118
+ }
119
+ .offset(x: baseOffset + dragOffset)
120
+ .animation(isDragging ? nil : .easeInOut(duration: 0.25), value: currentPage)
121
+ .frame(width: viewportWidth, alignment: .leading)
122
+ .contentShape(Rectangle())
123
+ .gesture(scrollEnabled ? dragGesture(step: step) : nil)
124
+ }
125
+ .frame(width: viewportWidth)
126
+ .clipped()
127
+ .onReceive(autoplayTimer) { _ in
128
+ guard autoplay, itemCount > 1, !isDragging else { return }
129
+ advance()
130
+ }
131
+ }
132
+
133
+ @ViewBuilder
134
+ private func slide(page: Int, step: CGFloat, viewportWidth: CGFloat) -> some View {
135
+ // Fractional offset of this page from the current page (incl. drag).
136
+ let dragFraction = step > 0 ? -dragOffset / step : 0
137
+ let pageOffset = abs(CGFloat(currentPage - page) + dragFraction)
138
+ let isActive = pageOffset < 0.5
139
+ let scale = isActive ? 1.0 : inactiveSlideScale
140
+ let alpha = isActive ? 1.0 : inactiveSlideOpacity
141
+
142
+ content(realIndex(page))
143
+ .scaleEffect(scale)
144
+ .opacity(alpha)
145
+ .animation(.easeInOut(duration: 0.15), value: isActive)
146
+ }
147
+
148
+ private func dragGesture(step: CGFloat) -> some Gesture {
149
+ DragGesture(minimumDistance: 5)
150
+ .onChanged { value in
151
+ isDragging = true
152
+ dragOffset = value.translation.width
153
+ }
154
+ .onEnded { value in
155
+ isDragging = false
156
+ let predicted = value.predictedEndTranslation.width
157
+ let threshold = step / 4
158
+ var target = currentPage
159
+ if enableSnap {
160
+ if predicted < -threshold {
161
+ target = min(currentPage + 1, virtualPageCount - 1)
162
+ } else if predicted > threshold {
163
+ target = max(currentPage - 1, 0)
164
+ }
165
+ } else {
166
+ // Free scroll still settles to nearest page boundary.
167
+ let moved = step > 0 ? Int((-dragOffset / step).rounded()) : 0
168
+ target = min(max(currentPage + moved, 0), virtualPageCount - 1)
169
+ }
170
+ dragOffset = 0
171
+ setPage(target)
172
+ }
173
+ }
174
+
175
+ private func advance() {
176
+ let next = currentPage + 1
177
+ if next < virtualPageCount {
178
+ setPage(next)
179
+ }
180
+ }
181
+
182
+ private func setPage(_ page: Int) {
183
+ let clamped = min(max(page, 0), virtualPageCount - 1)
184
+ let changed = clamped != currentPage
185
+ currentPage = clamped
186
+ if changed {
187
+ let real = realIndex(clamped)
188
+ onSnapToItem(real)
189
+ onScrollIndexChanged(real)
190
+ }
191
+ }
192
+
193
+ private var autoplayTimer: Publishers.Autoconnect<Timer.TimerPublisher> {
194
+ Timer.publish(every: autoplayInterval, on: .main, in: .common).autoconnect()
195
+ }
196
+ }
@@ -2,6 +2,7 @@ import Foundation
2
2
  import SwiftUI
3
3
 
4
4
  public struct Checkbox: View{
5
+ @Environment(\.appTheme) private var theme
5
6
  @Binding var checked: Bool
6
7
  var disabled: Bool
7
8
  var onChange: ((Bool)->Void)?
@@ -27,54 +28,48 @@ public struct Checkbox: View{
27
28
  public var body: some View {
28
29
  HStack(spacing: Spacing.S) {
29
30
  // Checkbox
30
- ZStack {
31
- RoundedRectangle(cornerRadius: Radius.XS)
32
- .fill(backgroundColor)
33
- .frame(width: 20, height: 20)
34
- .overlay(
35
- RoundedRectangle(cornerRadius: Radius.XS)
36
- .stroke(borderColor, lineWidth: Spacing.XXS)
37
- )
38
-
39
- if checked {
40
- Image(systemName: indeterminate ? "minus.square.fill" : "checkmark.square.fill")
41
- .resizable()
42
- .foregroundColor(backgroundColor)
43
- .background(Colors.black01)
31
+ SwiftUI.Button(action: onCheck) {
32
+ ZStack {
33
+ RoundedRectangle(cornerRadius: Radius.XS)
34
+ .fill(backgroundColor)
44
35
  .frame(width: 20, height: 20)
45
- }
46
- }
36
+ .overlay(
37
+ RoundedRectangle(cornerRadius: Radius.XS)
38
+ .stroke(borderColor, lineWidth: Spacing.XXS)
39
+ )
47
40
 
48
- .onTapGesture {
49
- if !disabled {
50
- onCheck()
41
+ if checked {
42
+ Icon(source: indeterminate ? "navigation_minus" : "ic_checked", size: 20, color: Colors.black01)
43
+ }
51
44
  }
52
45
  }
46
+ .buttonStyle(ActiveOpacityButtonStyle(activeOpacity: 0.8))
47
+ .disabled(disabled)
53
48
 
54
49
  // Title
55
50
  if !title.isEmpty {
56
- Text(title)
57
- .font(.description1)
58
- .ignoreBoldTextSetting()
51
+ MomoText(title, typography: .descriptionDefaultRegular)
59
52
  }
60
53
  }
61
54
  }
62
55
 
63
56
  private var borderColor: Color {
64
- if disabled {
65
- return Colors.black03
57
+ if disabled && checked {
58
+ return theme.colors.background.tonal
59
+ } else if disabled {
60
+ return theme.colors.border.disable
66
61
  } else if checked {
67
- return Colors.primary
62
+ return theme.colors.primary
68
63
  } else {
69
- return Colors.text
64
+ return theme.colors.text.default
70
65
  }
71
66
  }
72
67
 
73
68
  private var backgroundColor: Color {
74
69
  if disabled && checked {
75
- return Colors.pink08
70
+ return theme.colors.background.tonal
76
71
  } else if checked {
77
- return Colors.primary
72
+ return theme.colors.primary
78
73
  } else {
79
74
  return Color.clear
80
75
  }
@@ -2,17 +2,18 @@ import SwiftUI
2
2
  import Foundation
3
3
 
4
4
  public struct Chip: View {
5
+ @Environment(\.appTheme) private var theme
5
6
  public enum ChipSize { case small, large }
6
7
 
7
8
  public struct Dimensions {
9
+ let height: CGFloat
8
10
  let horizontal: CGFloat
9
- let vertical: CGFloat
10
11
  let iconSize: CGFloat
11
12
  let iconSpacing: CGFloat
12
13
  }
13
14
 
14
- public static let Large = Dimensions(horizontal: 12, vertical: 8, iconSize: 20, iconSpacing: 8)
15
- public static let Small = Dimensions(horizontal: 10, vertical: 6, iconSize: 16, iconSpacing: 6)
15
+ public static let Large = Dimensions(height: 32, horizontal: 12, iconSize: 20, iconSpacing: 4)
16
+ public static let Small = Dimensions(height: 24, horizontal: 10, iconSize: 16, iconSpacing: 4)
16
17
 
17
18
  private let label: String?
18
19
  private let iconLeft: String?
@@ -51,46 +52,68 @@ public struct Chip: View {
51
52
 
52
53
  public var body: some View {
53
54
  let dims = (size == .small) ? Self.Small : Self.Large
55
+ // Mirrors Compose's `scaleSize(...)` on every chip dimension so it responds
56
+ // to Dynamic Type scaling the same way the rest of the kit does.
57
+ let height = scaleSize(dims.height)
58
+ let horizontal = scaleSize(dims.horizontal)
59
+ let iconSize = scaleSize(dims.iconSize)
60
+ let iconSpacing = scaleSize(dims.iconSpacing)
61
+ let radius = scaleSize(Radius.L)
54
62
 
55
63
  let bg: Color = {
56
- if selected { return Colors.pink10 }
64
+ if selected { return theme.colors.background.selected }
57
65
  if let explicit = backgroundColor { return explicit }
58
66
  return Colors.black03
59
67
  }()
60
68
 
61
- let textColor: Color = selected ? Colors.primary : Colors.text
62
- let leftTint: Color = selected ? Colors.primary : iconLeftTint ?? Colors.text
63
- let rightTint: Color = selected ? Colors.primary : iconRightTint ?? Colors.text
69
+ let textColor: Color = selected ? theme.colors.primary : theme.colors.text.default
70
+ let leftTint: Color = selected ? theme.colors.primary : iconLeftTint ?? theme.colors.text.default
71
+ let rightTint: Color = selected ? theme.colors.primary : iconRightTint ?? theme.colors.text.default
64
72
 
65
- HStack(spacing: dims.iconSpacing) {
66
- if let iconLeft {
67
- Icon(source: iconLeft, size: dims.iconSize, color: leftTint)
68
- }
73
+ SwiftUI.Button(action: onClick) {
74
+ HStack(spacing: iconSpacing) {
75
+ if let iconLeft {
76
+ Icon(source: iconLeft, size: iconSize, color: leftTint)
77
+ }
69
78
 
70
- if let text = label, !text.isEmpty {
71
- MomoText(text, typography: (size == .large) ? .labelDefaultMedium : .labelSMedium, color: textColor)
72
- .lineLimit(1)
73
- }
79
+ if let text = label, !text.isEmpty {
80
+ MomoText(text, typography: (size == .large) ? .labelDefaultMedium : .labelSMedium, color: textColor)
81
+ .lineLimit(1)
82
+ }
74
83
 
75
- if let iconRight {
76
- Icon(source: iconRight, size: dims.iconSize, color: rightTint)
77
- }
78
- }
79
- .padding(.horizontal, dims.horizontal)
80
- .padding(.vertical, dims.vertical)
81
- .background(
82
- RoundedRectangle(cornerRadius: Radius.L, style: .continuous)
83
- .fill(bg)
84
- )
85
- .overlay(
86
- Group {
87
- if selected {
88
- RoundedRectangle(cornerRadius: Radius.L, style: .continuous)
89
- .stroke(Colors.primary, lineWidth: 2)
84
+ if let iconRight {
85
+ Icon(source: iconRight, size: iconSize, color: rightTint)
90
86
  }
91
87
  }
92
- )
93
- .contentShape(RoundedRectangle(cornerRadius: Radius.L, style: .continuous))
94
- .onTapGesture(perform: onClick)
88
+ .padding(.horizontal, horizontal)
89
+ .frame(height: height)
90
+ .background(
91
+ RoundedRectangle(cornerRadius: radius, style: .continuous)
92
+ .fill(bg)
93
+ )
94
+ .overlay(
95
+ Group {
96
+ if selected {
97
+ RoundedRectangle(cornerRadius: radius, style: .continuous)
98
+ .stroke(theme.colors.secondary, lineWidth: 2)
99
+ }
100
+ }
101
+ )
102
+ .contentShape(RoundedRectangle(cornerRadius: radius, style: .continuous))
103
+ }
104
+ .buttonStyle(ActiveOpacityButtonStyle())
105
+ .modifier(ChipAccessibilityModifier(accessibilityLabel: accessibilityLabel))
106
+ }
107
+ }
108
+
109
+ private struct ChipAccessibilityModifier: ViewModifier {
110
+ let accessibilityLabel: String?
111
+
112
+ func body(content: Content) -> some View {
113
+ if let id = accessibilityLabel {
114
+ content.accessibilityIdentifier(id)
115
+ } else {
116
+ content
117
+ }
95
118
  }
96
119
  }
@@ -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,18 +3,18 @@ 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("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")
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
18
 
19
19
  public static let black20 = Color(hex: "000000")
20
20
  public static let black19 = Color(hex: "18191a")
@@ -49,15 +49,18 @@ public enum Colors {
49
49
  public static let pink03 = Color(hex: "eb2f96")
50
50
  public static let pink02 = Color(hex: "d42a87")
51
51
  public static let pink01 = Color(hex: "bc2678")
52
+ public static let pinkMoMoBranding = Color(hex: "a50064")
52
53
 
53
54
 
54
- public static let violet10 = Color(hex: "fcf8fe")
55
- public static let violet09 = Color(hex: "faf4fe")
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")
56
59
  public static let violet08 = Color(hex: "ead4fc")
57
60
  public static let violet07 = Color(hex: "d5aaf9")
58
- public static let violet06 = Color(hex: "f4e9fd")
59
- public static let violet05 = Color(hex: "c07ff6")
60
- public static let violet04 = Color(hex: "ab55f3")
61
+ public static let violet06 = Color(hex: "c07ff6")
62
+ public static let violet05 = Color(hex: "ab55f3")
63
+ public static let violet04 = Color(hex: "a03ff1")
61
64
  public static let violet03 = Color(hex: "962af0")
62
65
  public static let violet02 = Color(hex: "8726d8")
63
66
  public static let violet01 = Color(hex: "7822c0")
@@ -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 XXXL: CGFloat = 48
11
+ public static let Size3XL: CGFloat = 48
12
+ public static let Size4XL: CGFloat = 56
13
+ public static let Size5XL: CGFloat = 64
12
14
  }