@momo-kits/native-kits 0.157.1-beta.9 → 0.157.1-com.1-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.
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +180 -0
- package/compose/build.gradle.kts.backup +180 -0
- package/compose/compose.podspec +54 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
- package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
- package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +123 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +224 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +350 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +360 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +256 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +494 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +131 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +215 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +449 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +192 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
- package/gradle/libs.versions.toml +57 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/ios/Input/Input.swift +4 -0
- package/local.properties +8 -0
- package/package.json +1 -1
- package/settings.gradle.kts +52 -0
- package/src/doctor/README.md +73 -0
- package/src/doctor/package-lock.json +885 -0
- package/src/doctor/package.json +44 -0
- package/src/doctor/publish.sh +27 -0
- package/src/doctor/src/Users.json +112 -0
- package/src/doctor/src/Whitelist.json +6 -0
- package/src/doctor/src/commands/check.ts +81 -0
- package/src/doctor/src/commands/doctor.ts +193 -0
- package/src/doctor/src/index.ts +35 -0
- package/src/doctor/src/logger.ts +84 -0
- package/src/doctor/src/task/native.ts +21 -0
- package/src/doctor/src/task/utils.ts +20 -0
- package/src/doctor/src/utils/checkCoreDependencies.ts +138 -0
- package/src/doctor/src/utils/checkDeletedPackage.ts +53 -0
- package/src/doctor/src/utils/checkDeprecatedPackages.ts +168 -0
- package/src/doctor/src/utils/checkDeprecatedVersion.ts +60 -0
- package/src/doctor/src/utils/checkShareDependencies.ts +251 -0
- package/src/doctor/src/utils/checkWrongVersionCommunityPackage.ts +64 -0
- package/src/doctor/src/utils/getErrorMessage.ts +84 -0
- package/src/doctor/src/utils/scanComponentUsage.ts +206 -0
- package/src/doctor/src/utils/scanFoundationImports.ts +169 -0
- package/src/doctor/src/utils/scanMaxApiUsage.ts +86 -0
- package/src/doctor/src/utils/scanNativeModulesUsage.ts +78 -0
- package/src/doctor/src/utils/sendMessage.ts +28 -0
- package/src/doctor/tsconfig.json +14 -0
- package/src/doctor/yarn.lock +492 -0
- package/src/foundations/Application/BottomSheet.tsx +358 -0
- package/src/foundations/Application/BottomTab/BottomTabBar.tsx +320 -0
- package/src/foundations/Application/BottomTab/CustomBottomTabItem.tsx +155 -0
- package/src/foundations/Application/BottomTab/TabBarIcon.tsx +113 -0
- package/src/foundations/Application/BottomTab/index.tsx +449 -0
- package/src/foundations/Application/Components/BackgroundImageView.tsx +126 -0
- package/src/foundations/Application/Components/HeaderAnimated.tsx +69 -0
- package/src/foundations/Application/Components/HeaderBackground.tsx +83 -0
- package/src/foundations/Application/Components/HeaderExtendHeader.tsx +225 -0
- package/src/foundations/Application/Components/HeaderLeft.tsx +93 -0
- package/src/foundations/Application/Components/HeaderRight.tsx +444 -0
- package/src/foundations/Application/Components/HeaderTitle.tsx +596 -0
- package/src/foundations/Application/Components/NavigationButton.tsx +76 -0
- package/src/foundations/Application/Components/SearchHeader.tsx +127 -0
- package/src/foundations/Application/Localize.ts +44 -0
- package/src/foundations/Application/ModalScreen.tsx +148 -0
- package/src/foundations/Application/Navigation.ts +63 -0
- package/src/foundations/Application/NavigationContainer.tsx +245 -0
- package/src/foundations/Application/Navigator.ts +171 -0
- package/src/foundations/Application/ScaleSizeProvider.tsx +16 -0
- package/src/foundations/Application/StackScreen.tsx +420 -0
- package/src/foundations/Application/TooltipPortal.tsx +127 -0
- package/src/foundations/Application/WidgetContainer.tsx +162 -0
- package/src/foundations/Application/index.ts +34 -0
- package/src/foundations/Application/types.ts +350 -0
- package/src/foundations/Application/utils.tsx +239 -0
- package/src/foundations/Assets/DotAnimation.json +256 -0
- package/src/foundations/Assets/SpinnerAnimation.json +1027 -0
- package/src/foundations/Assets/icon.json +4052 -0
- package/src/foundations/Assets/icon_bank.json +506 -0
- package/src/foundations/Assets/language.json +208 -0
- package/src/foundations/Assets/lottie_circle_loader.json +1 -0
- package/src/foundations/Assets/pinAnimation.json +1 -0
- package/src/foundations/Assets/unpinAnimation.json +1 -0
- package/src/foundations/Badge/Badge.tsx +104 -0
- package/src/foundations/Badge/BadgeDot.tsx +35 -0
- package/src/foundations/Badge/BadgeDotAnimation.tsx +95 -0
- package/src/foundations/Badge/BadgeRibbon.tsx +112 -0
- package/src/foundations/Badge/Shape.tsx +29 -0
- package/src/foundations/Badge/index.tsx +8 -0
- package/src/foundations/Badge/styles.ts +125 -0
- package/src/foundations/Badge/types.ts +68 -0
- package/src/foundations/Button/index.tsx +371 -0
- package/src/foundations/Button/styles.ts +65 -0
- package/src/foundations/CheckBox/index.tsx +104 -0
- package/src/foundations/CheckBox/styles.ts +17 -0
- package/src/foundations/CheckBox/types.ts +37 -0
- package/src/foundations/Consts/colors+spacing+radius.ts +232 -0
- package/src/foundations/Consts/index.ts +4 -0
- package/src/foundations/Consts/styles.ts +52 -0
- package/src/foundations/Consts/theme.ts +121 -0
- package/src/foundations/Context/index.ts +27 -0
- package/src/foundations/Divider/DashDivider.tsx +46 -0
- package/src/foundations/Divider/index.tsx +45 -0
- package/src/foundations/FoundationList/index.tsx +12 -0
- package/src/foundations/FoundationList/types.ts +7 -0
- package/src/foundations/Icon/index.tsx +57 -0
- package/src/foundations/Icon/types.ts +32 -0
- package/src/foundations/IconButton/index.tsx +144 -0
- package/src/foundations/IconButton/styles.ts +20 -0
- package/src/foundations/Image/index.tsx +115 -0
- package/src/foundations/Image/styles.ts +7 -0
- package/src/foundations/Image/types.ts +7 -0
- package/src/foundations/Input/Input.tsx +280 -0
- package/src/foundations/Input/InputDropDown.tsx +161 -0
- package/src/foundations/Input/InputMoney.tsx +325 -0
- package/src/foundations/Input/InputOTP.tsx +299 -0
- package/src/foundations/Input/InputPhoneNumber.tsx +287 -0
- package/src/foundations/Input/InputSearch.tsx +351 -0
- package/src/foundations/Input/InputTextArea.tsx +218 -0
- package/src/foundations/Input/SystemTextInput.tsx +44 -0
- package/src/foundations/Input/TextTyping.tsx +115 -0
- package/src/foundations/Input/common.tsx +243 -0
- package/src/foundations/Input/index.tsx +373 -0
- package/src/foundations/Input/styles.ts +226 -0
- package/src/foundations/Input/utils.ts +97 -0
- package/src/foundations/Layout/Card.tsx +108 -0
- package/src/foundations/Layout/FloatingButton.tsx +179 -0
- package/src/foundations/Layout/GridSystem.tsx +137 -0
- package/src/foundations/Layout/Item.tsx +59 -0
- package/src/foundations/Layout/ItemList.tsx +66 -0
- package/src/foundations/Layout/ItemSectionList.tsx +40 -0
- package/src/foundations/Layout/Screen.tsx +644 -0
- package/src/foundations/Layout/Section.tsx +103 -0
- package/src/foundations/Layout/TrackingScope.tsx +18 -0
- package/src/foundations/Layout/index.ts +34 -0
- package/src/foundations/Layout/styles.ts +95 -0
- package/src/foundations/Layout/types.ts +40 -0
- package/src/foundations/Layout/utils.ts +47 -0
- package/src/foundations/Loader/DotLoader.tsx +37 -0
- package/src/foundations/Loader/Loader.tsx +13 -0
- package/src/foundations/Loader/ProgressBar.tsx +45 -0
- package/src/foundations/Loader/Spinner.tsx +29 -0
- package/src/foundations/Loader/index.tsx +6 -0
- package/src/foundations/Loader/styles.ts +10 -0
- package/src/foundations/Loader/types.ts +35 -0
- package/src/foundations/Loader/utils.ts +25 -0
- package/src/foundations/Pagination/Dot.tsx +19 -0
- package/src/foundations/Pagination/PaginationDot.tsx +44 -0
- package/src/foundations/Pagination/PaginationNumber.tsx +31 -0
- package/src/foundations/Pagination/PaginationScroll.tsx +99 -0
- package/src/foundations/Pagination/PaginationWhiteDot.tsx +43 -0
- package/src/foundations/Pagination/index.tsx +25 -0
- package/src/foundations/Pagination/styles.ts +51 -0
- package/src/foundations/Pagination/types.ts +40 -0
- package/src/foundations/Popup/PopupNotify.tsx +276 -0
- package/src/foundations/Popup/PopupPromotion.tsx +118 -0
- package/src/foundations/Popup/index.tsx +4 -0
- package/src/foundations/Popup/types.ts +96 -0
- package/src/foundations/Radio/index.tsx +108 -0
- package/src/foundations/Radio/styles.ts +15 -0
- package/src/foundations/Radio/types.ts +31 -0
- package/src/foundations/Skeleton/index.tsx +118 -0
- package/src/foundations/Skeleton/styles.ts +5 -0
- package/src/foundations/Skeleton/types.ts +6 -0
- package/src/foundations/Switch/index.tsx +68 -0
- package/src/foundations/Switch/styles.ts +25 -0
- package/src/foundations/Switch/types.ts +19 -0
- package/src/foundations/Tag/index.tsx +128 -0
- package/src/foundations/Tag/types.ts +41 -0
- package/src/foundations/Text/index.tsx +241 -0
- package/src/foundations/Text/styles.ts +78 -0
- package/src/foundations/Text/types.ts +53 -0
- package/src/foundations/Text/utils.ts +63 -0
- package/src/foundations/Title/index.tsx +285 -0
- package/src/foundations/Title/styles.ts +55 -0
- package/src/foundations/Title/types.ts +21 -0
- package/src/foundations/index.ts +50 -0
- package/src/foundations/package.json +35 -0
- package/src/foundations/publish.sh +17 -0
- package/src/libs/AutoComplete/index.tsx +88 -0
- package/src/libs/AutoComplete/package.json +16 -0
- package/src/libs/AutoComplete/publish.sh +16 -0
- package/src/libs/AutoComplete/styles.ts +15 -0
- package/src/libs/AutoComplete/types.ts +60 -0
- package/src/libs/Avatar/index.tsx +146 -0
- package/src/libs/Avatar/package.json +16 -0
- package/src/libs/Avatar/publish.sh +20 -0
- package/src/libs/Avatar/styles.ts +18 -0
- package/src/libs/Avatar/types.ts +57 -0
- package/src/libs/Badge/Badge.tsx +70 -0
- package/src/libs/Badge/BadgeDot.tsx +11 -0
- package/src/libs/Badge/BadgeRibbon.tsx +122 -0
- package/src/libs/Badge/Shape.tsx +29 -0
- package/src/libs/Badge/index.tsx +7 -0
- package/src/libs/Badge/package.json +16 -0
- package/src/libs/Badge/publish.sh +18 -0
- package/src/libs/Badge/styles.ts +55 -0
- package/src/libs/Badge/types.ts +63 -0
- package/src/libs/Calendar/CalendarPro.tsx +307 -0
- package/src/libs/Calendar/Day.tsx +150 -0
- package/src/libs/Calendar/HeaderControl.tsx +55 -0
- package/src/libs/Calendar/LunarDateConverter.ts +228 -0
- package/src/libs/Calendar/LunarService.ts +206 -0
- package/src/libs/Calendar/Month.tsx +118 -0
- package/src/libs/Calendar/MonthList.tsx +226 -0
- package/src/libs/Calendar/TabHeader.tsx +91 -0
- package/src/libs/Calendar/Util.ts +288 -0
- package/src/libs/Calendar/holidayData.ts +118 -0
- package/src/libs/Calendar/index.tsx +383 -0
- package/src/libs/Calendar/package.json +18 -0
- package/src/libs/Calendar/publish.sh +18 -0
- package/src/libs/Calendar/styles.ts +122 -0
- package/src/libs/Calendar/types.ts +212 -0
- package/src/libs/Carousel/animation.ts +62 -0
- package/src/libs/Carousel/index.tsx +517 -0
- package/src/libs/Carousel/package.json +18 -0
- package/src/libs/Carousel/publish.sh +16 -0
- package/src/libs/Carousel/types.ts +71 -0
- package/src/libs/Chip/index.tsx +164 -0
- package/src/libs/Chip/package.json +16 -0
- package/src/libs/Chip/publish.sh +16 -0
- package/src/libs/Chip/styles.ts +20 -0
- package/src/libs/Chip/types.ts +72 -0
- package/src/libs/Collapse/index.tsx +305 -0
- package/src/libs/Collapse/package.json +16 -0
- package/src/libs/Collapse/publish.sh +18 -0
- package/src/libs/Collapse/styles.ts +37 -0
- package/src/libs/Collapse/types.ts +84 -0
- package/src/libs/DateTimePicker/WheelPicker.tsx +163 -0
- package/src/libs/DateTimePicker/WheelPickerItem.tsx +58 -0
- package/src/libs/DateTimePicker/index.tsx +188 -0
- package/src/libs/DateTimePicker/package.json +16 -0
- package/src/libs/DateTimePicker/publish.sh +17 -0
- package/src/libs/DateTimePicker/styles.ts +31 -0
- package/src/libs/DateTimePicker/types.ts +102 -0
- package/src/libs/DateTimePicker/utils.ts +114 -0
- package/src/libs/Information/index.tsx +129 -0
- package/src/libs/Information/package.json +16 -0
- package/src/libs/Information/publish.sh +18 -0
- package/src/libs/Information/styles.ts +34 -0
- package/src/libs/Information/types.ts +79 -0
- package/src/libs/Logo/index.tsx +39 -0
- package/src/libs/Logo/package.json +17 -0
- package/src/libs/Logo/publish.sh +16 -0
- package/src/libs/Logo/styles.ts +25 -0
- package/src/libs/Logo/types.ts +13 -0
- package/src/libs/ProgressInfo/ProgressInfoHorizontal.tsx +128 -0
- package/src/libs/ProgressInfo/ProgressInfoIcon.tsx +88 -0
- package/src/libs/ProgressInfo/ProgressInfoVertical.tsx +85 -0
- package/src/libs/ProgressInfo/index.tsx +22 -0
- package/src/libs/ProgressInfo/package.json +16 -0
- package/src/libs/ProgressInfo/publish.sh +16 -0
- package/src/libs/ProgressInfo/styles.ts +46 -0
- package/src/libs/ProgressInfo/types.ts +60 -0
- package/src/libs/ProgressInfo/yarn.lock +8 -0
- package/src/libs/Rating/index.tsx +74 -0
- package/src/libs/Rating/package.json +16 -0
- package/src/libs/Rating/publish.sh +18 -0
- package/src/libs/Rating/type.ts +25 -0
- package/src/libs/Slider/Label.tsx +33 -0
- package/src/libs/Slider/helpers.ts +35 -0
- package/src/libs/Slider/hooks.tsx +218 -0
- package/src/libs/Slider/index.tsx +453 -0
- package/src/libs/Slider/package.json +16 -0
- package/src/libs/Slider/publish.sh +18 -0
- package/src/libs/Slider/styles.ts +36 -0
- package/src/libs/Stepper/NumberView.tsx +64 -0
- package/src/libs/Stepper/StepperButton.tsx +37 -0
- package/src/libs/Stepper/index.tsx +139 -0
- package/src/libs/Stepper/package.json +16 -0
- package/src/libs/Stepper/publish.sh +17 -0
- package/src/libs/Stepper/styles.ts +44 -0
- package/src/libs/Stepper/types.ts +154 -0
- package/src/libs/Steps/StepIcon.tsx +86 -0
- package/src/libs/Steps/StepsHorizontal.tsx +189 -0
- package/src/libs/Steps/StepsVertical.tsx +133 -0
- package/src/libs/Steps/index.tsx +20 -0
- package/src/libs/Steps/package.json +16 -0
- package/src/libs/Steps/publish.sh +16 -0
- package/src/libs/Steps/styles.ts +46 -0
- package/src/libs/Steps/types.ts +159 -0
- package/src/libs/Steps/utils.ts +175 -0
- package/src/libs/SuggestAction/SuggestActionView.tsx +124 -0
- package/src/libs/SuggestAction/index.tsx +3 -0
- package/src/libs/SuggestAction/package.json +16 -0
- package/src/libs/SuggestAction/publish.sh +16 -0
- package/src/libs/SuggestAction/styles.ts +30 -0
- package/src/libs/SuggestAction/types.ts +36 -0
- package/src/libs/Swipe/SwipeView.tsx +151 -0
- package/src/libs/Swipe/index.tsx +5 -0
- package/src/libs/Swipe/package.json +16 -0
- package/src/libs/Swipe/publish.sh +16 -0
- package/src/libs/Swipe/styles.ts +16 -0
- package/src/libs/Swipe/types.ts +109 -0
- package/src/libs/TabView/assets/Path.tsx +29 -0
- package/src/libs/TabView/index.tsx +184 -0
- package/src/libs/TabView/package.json +16 -0
- package/src/libs/TabView/publish.sh +16 -0
- package/src/libs/TabView/styles.ts +96 -0
- package/src/libs/TabView/tabBar/CardTabBar.tsx +137 -0
- package/src/libs/TabView/tabBar/SrollableTabBar.tsx +218 -0
- package/src/libs/TabView/tabBar/TabBar.tsx +67 -0
- package/src/libs/TabView/tabItem/CardTabItem.tsx +118 -0
- package/src/libs/TabView/tabItem/TabItem.tsx +180 -0
- package/src/libs/TabView/types.ts +166 -0
- package/src/libs/Template/HeaderSliderBanner/index.tsx +86 -0
- package/src/libs/Template/HeaderSliderBanner/types.ts +16 -0
- package/src/libs/Template/TrustBanner/CustomAvatar.tsx +39 -0
- package/src/libs/Template/TrustBanner/index.tsx +161 -0
- package/src/libs/Template/TrustBanner/styles.ts +48 -0
- package/src/libs/Template/TrustBanner/types.ts +50 -0
- package/src/libs/Template/index.tsx +4 -0
- package/src/libs/Template/package.json +18 -0
- package/src/libs/Template/publish.sh +17 -0
- package/src/libs/Title/index.tsx +284 -0
- package/src/libs/Title/package.json +17 -0
- package/src/libs/Title/publish.sh +16 -0
- package/src/libs/Title/styles.ts +54 -0
- package/src/libs/Title/types.ts +21 -0
- package/src/libs/Tooltip/TooltipButtons.tsx +54 -0
- package/src/libs/Tooltip/index.tsx +608 -0
- package/src/libs/Tooltip/package.json +16 -0
- package/src/libs/Tooltip/publish.sh +18 -0
- package/src/libs/Tooltip/styles.ts +70 -0
- package/src/libs/Tooltip/types.ts +61 -0
- package/src/libs/Uploader/index.tsx +87 -0
- package/src/libs/Uploader/package.json +17 -0
- package/src/libs/Uploader/publish.sh +18 -0
- package/src/libs/Uploader/styles.ts +30 -0
- package/src/libs/Uploader/types.ts +69 -0
- package/src/native/MoMoNative.podspec +18 -0
- package/src/native/calculator/android/build.gradle +61 -0
- package/src/native/calculator/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/native/calculator/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/src/native/calculator/android/gradlew +172 -0
- package/src/native/calculator/android/gradlew.bat +84 -0
- package/src/native/calculator/android/src/main/AndroidManifest.xml +5 -0
- package/src/native/calculator/android/src/main/java/com/calculator/KeyboardViewModule.java +22 -0
- package/src/native/calculator/android/src/main/java/com/calculator/KeyboardViewPackage.java +35 -0
- package/src/native/calculator/android/src/main/java/com/calculator/modules/CalculatorKeyboardModule.java +157 -0
- package/src/native/calculator/android/src/main/java/com/calculator/views/calculatorkeyboard/CalculatorEditText.java +36 -0
- package/src/native/calculator/android/src/main/java/com/calculator/views/calculatorkeyboard/FixedRelativeLayout.java +45 -0
- package/src/native/calculator/android/src/main/java/com/calculator/views/calculatorkeyboard/MomoTextInputCalculatorManager.java +173 -0
- package/src/native/calculator/android/src/main/java/com/calculator/views/customkeyboard/RNCustomKeyboardModule.java +417 -0
- package/src/native/calculator/ios/Helper/MomoHelper.swift +16 -0
- package/src/native/calculator/ios/KeyboardView-Bridging-Header.h +60 -0
- package/src/native/calculator/ios/KeyboardView.h +19 -0
- package/src/native/calculator/ios/KeyboardView.m +56 -0
- package/src/native/calculator/ios/MomoTextInputCalculator.swift +144 -0
- package/src/native/calculator/ios/RNCustomKeyboard/RNCustomKeyboard.h +6 -0
- package/src/native/calculator/ios/RNCustomKeyboard/RNCustomKeyboard.m +143 -0
- package/src/native/package.json +14 -0
- package/src/native/publish.sh +29 -0
- package/src/native/resource/android/build.gradle +57 -0
- package/src/native/resource/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/native/resource/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/src/native/resource/android/src/main/AndroidManifest.xml +6 -0
- package/src/native/resource/android/src/main/java/com/resource/RNResourceModule.java +90 -0
- package/src/native/resource/android/src/main/java/com/resource/RNResourcePackage.java +22 -0
- package/src/native/resource/ios/RNResouce.m +71 -0
- package/src/native/resource/ios/RNResource.h +5 -0
- package/example/ios/Example.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
const itemSize = 42;
|
|
2
|
+
|
|
3
|
+
const paddingNum = (num: number) => {
|
|
4
|
+
return num > 9 ? String(num) : `0${num}`;
|
|
5
|
+
};
|
|
6
|
+
const getDaysInMonth = (
|
|
7
|
+
year: number,
|
|
8
|
+
month: number,
|
|
9
|
+
minDate: Date,
|
|
10
|
+
maxDate: Date,
|
|
11
|
+
) => {
|
|
12
|
+
const daysInMonth = new Date(year, month, 0).getDate();
|
|
13
|
+
|
|
14
|
+
let startDay = 1;
|
|
15
|
+
let endDay = daysInMonth;
|
|
16
|
+
|
|
17
|
+
if (year === minDate.getFullYear() && month === minDate.getMonth() + 1) {
|
|
18
|
+
startDay = minDate.getDate();
|
|
19
|
+
}
|
|
20
|
+
if (year === maxDate.getFullYear() && month === maxDate.getMonth() + 1) {
|
|
21
|
+
endDay = maxDate.getDate();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const days = [];
|
|
25
|
+
for (let day = startDay; day <= endDay; day++) {
|
|
26
|
+
days.push(paddingNum(day));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return days;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const getMonths = (minDate: Date, maxDate: Date, currentYear: number) => {
|
|
33
|
+
let startMonth = 1;
|
|
34
|
+
let endMonth = 12;
|
|
35
|
+
|
|
36
|
+
if (currentYear === minDate.getFullYear()) {
|
|
37
|
+
startMonth = minDate.getMonth() + 1;
|
|
38
|
+
}
|
|
39
|
+
if (currentYear === maxDate.getFullYear()) {
|
|
40
|
+
endMonth = maxDate.getMonth() + 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const months = [];
|
|
44
|
+
for (let month = startMonth; month <= endMonth; month++) {
|
|
45
|
+
months.push(paddingNum(month));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return months;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const getYears = (minDate: Date, maxDate: Date) => {
|
|
52
|
+
const startYear = minDate.getFullYear();
|
|
53
|
+
const endYear = maxDate.getFullYear();
|
|
54
|
+
const years = [];
|
|
55
|
+
|
|
56
|
+
for (let year = startYear; year <= endYear; year++) {
|
|
57
|
+
years.push(year.toString());
|
|
58
|
+
}
|
|
59
|
+
return years;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const getHours = (hourMode: 12 | 24) => {
|
|
63
|
+
const hours = [];
|
|
64
|
+
for (let i = 0; i < hourMode; i++) {
|
|
65
|
+
let hour = i;
|
|
66
|
+
if (hourMode === 12) {
|
|
67
|
+
hour = i + 1;
|
|
68
|
+
}
|
|
69
|
+
hours.push(paddingNum(hour));
|
|
70
|
+
}
|
|
71
|
+
return hours;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const getMinutes = (interval: number) => {
|
|
75
|
+
const minutes = [];
|
|
76
|
+
for (let min = 0; min < 60; min += interval) {
|
|
77
|
+
minutes.push(paddingNum(min));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return minutes;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const timeMode = ['', '', 'AM', 'PM', '', ''];
|
|
84
|
+
|
|
85
|
+
function debounce<T extends (...args: any[]) => any>(func: T, delay: number) {
|
|
86
|
+
let timer: ReturnType<typeof setTimeout>;
|
|
87
|
+
|
|
88
|
+
const debounced = function (
|
|
89
|
+
this: ThisParameterType<T>,
|
|
90
|
+
...args: Parameters<T>
|
|
91
|
+
) {
|
|
92
|
+
clearTimeout(timer);
|
|
93
|
+
timer = setTimeout(() => {
|
|
94
|
+
func.apply(this, args);
|
|
95
|
+
}, delay);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
debounced.cancel = () => {
|
|
99
|
+
clearTimeout(timer);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return debounced;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
getDaysInMonth,
|
|
107
|
+
getMonths,
|
|
108
|
+
getYears,
|
|
109
|
+
getHours,
|
|
110
|
+
getMinutes,
|
|
111
|
+
timeMode,
|
|
112
|
+
debounce,
|
|
113
|
+
itemSize,
|
|
114
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React, {FC, useContext, useMemo} from 'react';
|
|
2
|
+
import {TouchableOpacity, View} from 'react-native';
|
|
3
|
+
import {InformationProps} from './types';
|
|
4
|
+
import styles from './styles';
|
|
5
|
+
import {
|
|
6
|
+
Colors,
|
|
7
|
+
Icon,
|
|
8
|
+
Image,
|
|
9
|
+
MiniAppContext,
|
|
10
|
+
ScreenContext,
|
|
11
|
+
Text,
|
|
12
|
+
} from '@momo-kits/foundation';
|
|
13
|
+
|
|
14
|
+
const Information: FC<InformationProps> = ({
|
|
15
|
+
title,
|
|
16
|
+
description = 'Description',
|
|
17
|
+
state = 'default',
|
|
18
|
+
image,
|
|
19
|
+
onPressCTA,
|
|
20
|
+
showIcon = true,
|
|
21
|
+
CTA,
|
|
22
|
+
style,
|
|
23
|
+
showIconClose = true,
|
|
24
|
+
onPressClose,
|
|
25
|
+
accessibilityLabel,
|
|
26
|
+
}) => {
|
|
27
|
+
const app = useContext<any>(MiniAppContext);
|
|
28
|
+
const screen = useContext<any>(ScreenContext);
|
|
29
|
+
const componentName = 'Information';
|
|
30
|
+
const componentId = useMemo(() => {
|
|
31
|
+
if (accessibilityLabel) {
|
|
32
|
+
return accessibilityLabel;
|
|
33
|
+
}
|
|
34
|
+
return `${app.appId}/${app.code}/${screen.screenName}/${componentName}${
|
|
35
|
+
title ? `/${title}` : ''
|
|
36
|
+
}`;
|
|
37
|
+
}, [componentName, accessibilityLabel, app, screen, title]);
|
|
38
|
+
|
|
39
|
+
const getTypeStyle = () => {
|
|
40
|
+
let borderColor = Colors.blue_07;
|
|
41
|
+
let backgroundColor = Colors.blue_10;
|
|
42
|
+
let color = Colors.blue_03;
|
|
43
|
+
let iconSource = 'notifications_info';
|
|
44
|
+
|
|
45
|
+
if (state === 'warning') {
|
|
46
|
+
borderColor = Colors.yellow_06;
|
|
47
|
+
backgroundColor = Colors.yellow_09;
|
|
48
|
+
color = Colors.orange_03;
|
|
49
|
+
iconSource = '24_notifications_alert_triangle';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (state === 'error') {
|
|
53
|
+
borderColor = Colors.red_07;
|
|
54
|
+
backgroundColor = Colors.red_10;
|
|
55
|
+
color = Colors.red_03;
|
|
56
|
+
iconSource = '24_notifications_alert_octagon';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {borderColor, backgroundColor, color, iconSource};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const {backgroundColor, borderColor, color, iconSource} = getTypeStyle();
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<View
|
|
66
|
+
style={[style, {backgroundColor, borderColor}, styles.container]}
|
|
67
|
+
accessibilityLabel={componentId}>
|
|
68
|
+
<View style={styles.row}>
|
|
69
|
+
{!!image && (
|
|
70
|
+
<Image
|
|
71
|
+
source={{uri: image}}
|
|
72
|
+
style={styles.image}
|
|
73
|
+
accessibilityLabel={componentId + '|img'}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
{!image && showIcon && (
|
|
77
|
+
<Icon
|
|
78
|
+
color={color}
|
|
79
|
+
style={styles.icon}
|
|
80
|
+
size={16}
|
|
81
|
+
source={iconSource}
|
|
82
|
+
accessibilityLabel={componentId + '|icon'}
|
|
83
|
+
/>
|
|
84
|
+
)}
|
|
85
|
+
<View style={styles.flex}>
|
|
86
|
+
{!!title && (
|
|
87
|
+
<Text
|
|
88
|
+
typography={'label_default_medium'}
|
|
89
|
+
accessibilityLabel={componentId + '|title-text'}>
|
|
90
|
+
{title}
|
|
91
|
+
</Text>
|
|
92
|
+
)}
|
|
93
|
+
<Text
|
|
94
|
+
typography={'description_default_regular'}
|
|
95
|
+
accessibilityLabel={componentId + '|description-text'}>
|
|
96
|
+
{description}
|
|
97
|
+
</Text>
|
|
98
|
+
</View>
|
|
99
|
+
{showIconClose && (
|
|
100
|
+
<TouchableOpacity
|
|
101
|
+
onPress={onPressClose}
|
|
102
|
+
accessibilityLabel={componentId + '|close-icon-touch'}>
|
|
103
|
+
<Icon
|
|
104
|
+
size={16}
|
|
105
|
+
source={'navigation_close'}
|
|
106
|
+
style={styles.closeIcon}
|
|
107
|
+
/>
|
|
108
|
+
</TouchableOpacity>
|
|
109
|
+
)}
|
|
110
|
+
</View>
|
|
111
|
+
|
|
112
|
+
{!!CTA && (
|
|
113
|
+
<TouchableOpacity
|
|
114
|
+
style={styles.cta}
|
|
115
|
+
onPress={onPressCTA}
|
|
116
|
+
accessibilityLabel={componentId + '|cta-touch'}>
|
|
117
|
+
<Text
|
|
118
|
+
color={color}
|
|
119
|
+
typography={'action_xs_bold'}
|
|
120
|
+
accessibilityLabel={componentId + '|cta-text'}>
|
|
121
|
+
{CTA}
|
|
122
|
+
</Text>
|
|
123
|
+
</TouchableOpacity>
|
|
124
|
+
)}
|
|
125
|
+
</View>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export {Information};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@momo-kits/information",
|
|
3
|
+
"version": "0.157.1-beta.4",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "index.tsx",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@momo-kits/foundation": "latest",
|
|
8
|
+
"react": "*",
|
|
9
|
+
"react-native": "*"
|
|
10
|
+
},
|
|
11
|
+
"license": "MoMo",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {}
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
if [ "$1" == "stable" ]; then
|
|
4
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
5
|
+
npm version patch
|
|
6
|
+
npm publish --tag stable --access=public
|
|
7
|
+
elif [ "$1" == "latest" ]; then
|
|
8
|
+
npm publish --tag latest --access=public
|
|
9
|
+
elif [ "$1" == "beta" ]; then
|
|
10
|
+
npm publish --tag beta --access=public
|
|
11
|
+
else
|
|
12
|
+
npm publish --tag alpha --access=public
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
PACKAGE_NAME=$(npm pkg get name)
|
|
17
|
+
NEW_PACKAGE_VERSION=$(npm pkg get version)
|
|
18
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {Radius, Spacing} from '@momo-kits/foundation';
|
|
3
|
+
|
|
4
|
+
export default StyleSheet.create({
|
|
5
|
+
container: {
|
|
6
|
+
borderRadius: Radius.S,
|
|
7
|
+
borderWidth: 0.5,
|
|
8
|
+
padding: Spacing.M,
|
|
9
|
+
width: '100%',
|
|
10
|
+
},
|
|
11
|
+
image: {
|
|
12
|
+
width: 40,
|
|
13
|
+
height: 40,
|
|
14
|
+
borderRadius: Radius.XS,
|
|
15
|
+
marginRight: Spacing.S,
|
|
16
|
+
},
|
|
17
|
+
icon: {
|
|
18
|
+
marginRight: Spacing.S,
|
|
19
|
+
marginTop: Spacing.XXS,
|
|
20
|
+
},
|
|
21
|
+
closeIcon: {
|
|
22
|
+
marginTop: Spacing.XXS,
|
|
23
|
+
},
|
|
24
|
+
row: {
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
},
|
|
27
|
+
cta: {
|
|
28
|
+
width: '100%',
|
|
29
|
+
alignItems: 'flex-end',
|
|
30
|
+
},
|
|
31
|
+
flex: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {ViewStyle} from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Information component. This component is typically used to display a piece of
|
|
5
|
+
* information with optional actions for the user. It can represent various states and levels
|
|
6
|
+
* of importance or urgency.
|
|
7
|
+
*/
|
|
8
|
+
export type InformationProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional. The title for the information block, often used to emphasize the main theme or
|
|
11
|
+
* to indicate the reason for the message. If not provided, only the description will be shown.
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The main content text of the information block. This text provides the necessary details
|
|
17
|
+
* and is essential for understanding the context of the message.
|
|
18
|
+
*/
|
|
19
|
+
description: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Optional. The text for the Call To Action (CTA) button. This is intended to prompt the user
|
|
23
|
+
* to take some specified action like "Retry", "Learn More", or "Dismiss".
|
|
24
|
+
*/
|
|
25
|
+
CTA?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Optional. A callback function that is triggered when the CTA button is pressed. This is
|
|
29
|
+
* used to handle the user's response to the proposed call to action.
|
|
30
|
+
*/
|
|
31
|
+
onPressCTA?: () => void;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Optional. The URL or local file path of an image to be displayed. This is typically used
|
|
35
|
+
* to provide visual context or support to the information being presented.
|
|
36
|
+
*/
|
|
37
|
+
image?: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional. Specifies the state of the information block, which may influence the block's
|
|
41
|
+
* styling, such as color coding. The 'default' state is neutral, while 'warning' and 'error'
|
|
42
|
+
* represent increasing levels of urgency or attention.
|
|
43
|
+
* Defaults to 'default' if not provided.
|
|
44
|
+
*/
|
|
45
|
+
state?: 'default' | 'warning' | 'error';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Optional. If `true`, an icon is displayed within the information block, often used to
|
|
49
|
+
* visually reinforce the state or content of the block. The type of icon is typically
|
|
50
|
+
* influenced by the `state` prop.
|
|
51
|
+
* Defaults to `false` if not provided.
|
|
52
|
+
*/
|
|
53
|
+
showIcon?: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Optional. If `true`, a close icon is displayed, usually in the upper corner of the information
|
|
57
|
+
* block, indicating that the user can dismiss or remove the block from view.
|
|
58
|
+
* Defaults to `false` if not provided.
|
|
59
|
+
*/
|
|
60
|
+
showIconClose?: boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Optional. A callback function that is triggered when the close icon is pressed. This is
|
|
64
|
+
* used to handle the dismissal of the information block, often removing it from display.
|
|
65
|
+
*/
|
|
66
|
+
onPressClose?: () => void;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Optional. Custom styles to apply to the Information component. Can be used to adjust
|
|
70
|
+
* the visual presentation or layout beyond the default and state-based styling.
|
|
71
|
+
*/
|
|
72
|
+
style?: ViewStyle;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Optional. Assigns an accessibility label to the Information component for automated testing
|
|
76
|
+
* and screen readers. This label should provide a concise description of the information block.
|
|
77
|
+
*/
|
|
78
|
+
accessibilityLabel?: string;
|
|
79
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, {FC} from 'react';
|
|
2
|
+
import {View} from 'react-native';
|
|
3
|
+
import {LogoProps} from './types';
|
|
4
|
+
import {Colors, Image} from '@momo-kits/foundation';
|
|
5
|
+
import styles from './styles';
|
|
6
|
+
|
|
7
|
+
const Logo: FC<LogoProps> = ({
|
|
8
|
+
type = 'image',
|
|
9
|
+
useShadow = true,
|
|
10
|
+
useBorder = true,
|
|
11
|
+
useBackground = true,
|
|
12
|
+
backgroundColor = Colors.black_01,
|
|
13
|
+
shadowColor = '#d9d9d9',
|
|
14
|
+
borderColor = '#e2e2e2',
|
|
15
|
+
source,
|
|
16
|
+
style,
|
|
17
|
+
}) => {
|
|
18
|
+
const isIcon = type === 'icon';
|
|
19
|
+
const containerStyle = !isIcon ? styles.image : styles.icon;
|
|
20
|
+
const shadowStyle = useShadow ? [styles.shadow, {shadowColor}] : {};
|
|
21
|
+
const backgroundStyle = useBackground && !isIcon ? {backgroundColor} : {};
|
|
22
|
+
const borderStyle = useBorder && !isIcon ? {borderColor, borderWidth: 2} : {};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<View
|
|
26
|
+
style={[
|
|
27
|
+
style,
|
|
28
|
+
styles.container,
|
|
29
|
+
containerStyle,
|
|
30
|
+
backgroundStyle,
|
|
31
|
+
shadowStyle,
|
|
32
|
+
borderStyle,
|
|
33
|
+
]}>
|
|
34
|
+
<Image source={{uri: source}} style={styles.logo} />
|
|
35
|
+
</View>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export {Logo};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@momo-kits/logo",
|
|
3
|
+
"version": "0.157.1-beta.4",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "index.tsx",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@momo-kits/foundation": "latest",
|
|
8
|
+
"react": "*",
|
|
9
|
+
"react-native": "*"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {},
|
|
12
|
+
"license": "MoMo",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"registry": "https://registry.npmjs.org/"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {}
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
if [ "$1" == "stable" ]; then
|
|
4
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
5
|
+
npm version patch
|
|
6
|
+
npm publish --tag stable --access=public
|
|
7
|
+
elif [ "$1" == "latest" ]; then
|
|
8
|
+
npm publish --tag latest --access=public
|
|
9
|
+
elif [ "$1" == "beta" ]; then
|
|
10
|
+
npm publish --tag beta --access=public
|
|
11
|
+
else
|
|
12
|
+
npm publish --tag alpha --access=public
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
PACKAGE_NAME=$(npm pkg get name)
|
|
16
|
+
NEW_PACKAGE_VERSION=$(npm pkg get version)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
container: {
|
|
5
|
+
width: 28,
|
|
6
|
+
height: 28,
|
|
7
|
+
},
|
|
8
|
+
image: {
|
|
9
|
+
borderRadius: 9,
|
|
10
|
+
},
|
|
11
|
+
icon: {},
|
|
12
|
+
logo: {
|
|
13
|
+
width: '100%',
|
|
14
|
+
height: '100%',
|
|
15
|
+
borderRadius: 7,
|
|
16
|
+
},
|
|
17
|
+
shadow: {
|
|
18
|
+
shadowOffset: {
|
|
19
|
+
width: 0,
|
|
20
|
+
height: 2,
|
|
21
|
+
},
|
|
22
|
+
shadowOpacity: 1,
|
|
23
|
+
shadowRadius: 2,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {ViewStyle} from 'react-native';
|
|
2
|
+
|
|
3
|
+
export type LogoProps = {
|
|
4
|
+
type?: 'icon' | 'image';
|
|
5
|
+
useShadow?: boolean;
|
|
6
|
+
useBorder?: boolean;
|
|
7
|
+
useBackground?: boolean;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
shadowColor?: string;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
source: string;
|
|
12
|
+
style?: ViewStyle | ViewStyle[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React, {FC} from 'react';
|
|
2
|
+
import {FlexAlignType, View} from 'react-native';
|
|
3
|
+
import {ProgressInfoItem, ProgressInfoProps} from './types';
|
|
4
|
+
import {Colors, Spacing, Text} from '@momo-kits/foundation';
|
|
5
|
+
import styles from './styles';
|
|
6
|
+
import ProgressInfoIcon from './ProgressInfoIcon';
|
|
7
|
+
|
|
8
|
+
type TextAlign = 'left' | 'right' | 'center';
|
|
9
|
+
|
|
10
|
+
const ProgressInfoHorizontal: FC<ProgressInfoProps> = ({
|
|
11
|
+
steps,
|
|
12
|
+
size,
|
|
13
|
+
useNumber = false,
|
|
14
|
+
showDescription = true,
|
|
15
|
+
showTitle = true,
|
|
16
|
+
align,
|
|
17
|
+
customIcon,
|
|
18
|
+
}) => {
|
|
19
|
+
const renderProgressItem = (i: ProgressInfoItem, ii: number) => {
|
|
20
|
+
const {title, description} = steps[ii];
|
|
21
|
+
|
|
22
|
+
let alignItems: FlexAlignType = 'center';
|
|
23
|
+
let textAlign: TextAlign = 'center';
|
|
24
|
+
|
|
25
|
+
if (align === 'left') {
|
|
26
|
+
alignItems = 'flex-start';
|
|
27
|
+
textAlign = 'left';
|
|
28
|
+
} else if (align === 'right') {
|
|
29
|
+
alignItems = 'flex-end';
|
|
30
|
+
textAlign = 'right';
|
|
31
|
+
} else if (align === 'stretch') {
|
|
32
|
+
if (ii === 0) {
|
|
33
|
+
alignItems = 'flex-start';
|
|
34
|
+
textAlign = 'left';
|
|
35
|
+
} else if (ii === steps.length - 1) {
|
|
36
|
+
textAlign = 'right';
|
|
37
|
+
alignItems = 'flex-end';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const haveMarginRight =
|
|
42
|
+
ii !== steps.length - 1 && align !== 'center' && align !== 'stretch';
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<View
|
|
46
|
+
key={`Step ${ii}`}
|
|
47
|
+
style={{
|
|
48
|
+
flex: 1,
|
|
49
|
+
alignItems,
|
|
50
|
+
marginRight: haveMarginRight ? Spacing.XS : 0,
|
|
51
|
+
}}>
|
|
52
|
+
{renderStepIcon(i, ii, align)}
|
|
53
|
+
{!!title && showTitle && (
|
|
54
|
+
<Text
|
|
55
|
+
style={[styles.title, {textAlign}]}
|
|
56
|
+
typography={'header_xs_semibold'}>
|
|
57
|
+
{title}
|
|
58
|
+
</Text>
|
|
59
|
+
)}
|
|
60
|
+
{!!description && showDescription && (
|
|
61
|
+
<Text
|
|
62
|
+
style={{textAlign}}
|
|
63
|
+
color={Colors.black_12}
|
|
64
|
+
typography={'description_default_regular'}>
|
|
65
|
+
{description}
|
|
66
|
+
</Text>
|
|
67
|
+
)}
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
const renderStepIcon = (
|
|
72
|
+
i: ProgressInfoItem,
|
|
73
|
+
ii: number,
|
|
74
|
+
align: string = 'center'
|
|
75
|
+
) => {
|
|
76
|
+
const lineLeftHide = (align === 'stretch' && ii === 0) || align === 'left';
|
|
77
|
+
const lineRightHide =
|
|
78
|
+
(align === 'stretch' && ii === steps.length - 1) || align === 'right';
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<View style={styles.rowStep}>
|
|
82
|
+
{!lineLeftHide && (
|
|
83
|
+
<View
|
|
84
|
+
style={[
|
|
85
|
+
styles.lineHorizontal,
|
|
86
|
+
styles.radiusRight,
|
|
87
|
+
{
|
|
88
|
+
backgroundColor: Colors.pink_08,
|
|
89
|
+
},
|
|
90
|
+
]}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
93
|
+
<ProgressInfoIcon
|
|
94
|
+
size={size}
|
|
95
|
+
index={ii}
|
|
96
|
+
backgroundColor={Colors.pink_08}
|
|
97
|
+
borderColor={Colors.pink_08}
|
|
98
|
+
style={{
|
|
99
|
+
marginVertical: Spacing.XS,
|
|
100
|
+
}}
|
|
101
|
+
useNumber={useNumber}
|
|
102
|
+
customIcon={customIcon}
|
|
103
|
+
/>
|
|
104
|
+
{!lineRightHide && (
|
|
105
|
+
<View
|
|
106
|
+
style={[
|
|
107
|
+
styles.lineHorizontal,
|
|
108
|
+
styles.radiusLeft,
|
|
109
|
+
{
|
|
110
|
+
backgroundColor: Colors.pink_08,
|
|
111
|
+
},
|
|
112
|
+
]}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
115
|
+
</View>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<View style={{flexDirection: 'row'}}>
|
|
121
|
+
{steps.map((i, ii) => {
|
|
122
|
+
return renderProgressItem(i, ii);
|
|
123
|
+
})}
|
|
124
|
+
</View>
|
|
125
|
+
);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export default ProgressInfoHorizontal;
|