@momo-kits/native-kits 0.300.7 → 0.300.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +12 -8
- package/README.md +8 -7
- package/ios/Application/ApplicationEnvironment.swift +6 -4
- package/ios/Application/DesignSystemKits.swift +59 -13
- package/ios/Application/DesignSystemKitsPayload.swift +0 -8
- package/ios/Application/LanguageSource.swift +2 -11
- package/ios/Application/Localize.swift +8 -35
- package/ios/Application/LocalizeModifier.swift +2 -11
- package/ios/Application/MaxApi.swift +3 -11
- package/ios/Avatar/Avatar.swift +0 -1
- package/ios/Badge/Badge.swift +5 -8
- package/ios/Badge/BadgeRibbon.swift +2 -5
- package/ios/Button/Button.swift +4 -8
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +5 -7
- package/ios/Carousel/Carousel.swift +4 -17
- package/ios/Checkbox/Checkbox.swift +0 -2
- package/ios/Collapse/Collapse.swift +17 -11
- package/ios/Colors+Radius+Spacing/Theme.swift +0 -7
- package/ios/DateTimePicker/DateTimePicker.swift +4 -10
- package/ios/DateTimePicker/DateTimePickerTypes.swift +1 -3
- package/ios/DateTimePicker/DateTimePickerUtils.swift +0 -3
- package/ios/DateTimePicker/WheelPicker.swift +2 -4
- package/ios/Extensions/ActiveOpacityButtonStyle.swift +2 -3
- package/ios/Extensions/Color++.swift +2 -4
- package/ios/Extensions/SkeletonUICompat.swift +0 -8
- package/ios/Icon/Icon.swift +3 -6
- package/ios/IconButton/IconButton.swift +2 -5
- package/ios/Input/ErrorView.swift +0 -7
- package/ios/Input/Input.swift +9 -20
- package/ios/Input/InputPhoneNumber.swift +37 -20
- package/ios/Input/InputSearch.swift +23 -12
- package/ios/Input/InputTextArea.swift +4 -13
- package/ios/InputDropDown/InputDropDown.swift +1 -11
- package/ios/InputMoney/InputMoney.swift +9 -28
- package/ios/InputOTP/InputOTP.swift +2 -9
- package/ios/Layout/HeaderLayout.swift +72 -0
- package/ios/Layout/Item.swift +1 -2
- package/ios/Layout/ModalLayout.swift +144 -0
- package/ios/Layout/ScreenLayout.swift +48 -31
- package/ios/Layout/Section.swift +2 -3
- package/ios/Loader/Loader.swift +3 -12
- package/ios/Lottie/LottieView.swift +0 -11
- package/ios/Navigation/BottomSheet.swift +73 -94
- package/ios/Navigation/BottomTab/BottomTab.swift +58 -73
- package/ios/Navigation/BottomTab/BottomTabBar.swift +286 -121
- package/ios/Navigation/BottomTab/CurvedContainer.swift +52 -54
- package/ios/Navigation/BottomTab/DuoBarCompression.swift +5 -12
- package/ios/Navigation/BottomTab/DuoTabBar.swift +67 -202
- package/ios/Navigation/BottomTab/TabBarMetrics.swift +97 -0
- package/ios/Navigation/Component/FloatingButton.swift +4 -11
- package/ios/Navigation/Component/Header.swift +35 -54
- package/ios/Navigation/Component/HeaderBackground.swift +2 -8
- package/ios/Navigation/Component/HeaderJourney.swift +4 -8
- package/ios/Navigation/Component/HeaderLocation.swift +4 -8
- package/ios/Navigation/Component/HeaderRight.swift +20 -22
- package/ios/Navigation/Component/HeaderTitle.swift +1 -6
- package/ios/Navigation/Component/HeaderUser.swift +4 -10
- package/ios/Navigation/Component/SideBar.swift +6 -21
- package/ios/Navigation/Component/SnackBar.swift +9 -13
- package/ios/Navigation/HostBackGestureBridge.swift +2 -9
- package/ios/Navigation/ModalScreen.swift +24 -13
- package/ios/Navigation/Navigation.swift +35 -19
- package/ios/Navigation/NavigationContainer.swift +4 -15
- package/ios/Navigation/Navigator.swift +21 -39
- package/ios/Navigation/StackScreen.swift +64 -51
- package/ios/Navigation/StackTransition.swift +7 -14
- package/ios/Navigation/SwipeBackHaptic.swift +2 -7
- package/ios/Navigation/Tracking/ScreenTracker.swift +2 -7
- package/ios/Pagination/PaginationDot.swift +0 -9
- package/ios/Pagination/PaginationNumber.swift +1 -9
- package/ios/Pagination/PaginationScroll.swift +2 -14
- package/ios/Pagination/PaginationWhiteDot.swift +1 -10
- package/ios/Popup/PopupDisplay.swift +7 -5
- package/ios/Popup/PopupInput.swift +6 -4
- package/ios/Popup/PopupLayout.swift +17 -9
- package/ios/Popup/PopupNotify.swift +32 -25
- package/ios/PopupView/FullscreenPopup.swift +3 -4
- package/ios/PopupView/PopupView.swift +2 -2
- package/ios/PopupView/Utils++.swift +1 -2
- package/ios/ProgressInfo/ProgressInfo.swift +2 -13
- package/ios/Skeleton/Skeleton.swift +5 -16
- package/ios/Slider/Slider.swift +5 -12
- package/ios/StatusBarTap/StatusBarTap.h +2 -3
- package/ios/StatusBarTap/StatusBarTap.m +3 -16
- package/ios/Stepper/Stepper.swift +8 -27
- package/ios/Steps/Steps.swift +29 -26
- package/ios/Swipeable/SwipeCell.swift +2 -2
- package/ios/Swipeable/SwipeCellModel.swift +3 -6
- package/ios/TabView/TabView.swift +14 -28
- package/ios/Template/TrustBanner/TrustBanner.swift +2 -9
- package/ios/Title/Title.swift +1 -3
- package/ios/Tooltip/Tooltip.swift +4 -9
- package/ios/Typography/FontScale.swift +79 -24
- package/ios/Typography/Text.swift +6 -12
- package/ios/Typography/Typography.swift +8 -11
- package/ios/Uploader/Uploader.swift +2 -17
- package/ios-demo/Resources/tabbar_scan_qr_button.json +1 -0
- package/ios-demo/Resources/tabbar_scan_qr_label.json +1 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +11 -2
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +296 -59
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +15 -4
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +0 -8
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +114 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +29 -1
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +16 -0
- package/package.json +1 -1
- package/publish.sh +8 -2
|
@@ -13,6 +13,14 @@ struct PopupNotifyDemo: View {
|
|
|
13
13
|
|
|
14
14
|
// MARK: - Preview
|
|
15
15
|
|
|
16
|
+
// Figma Risk - eKYC (node 51445-177824)
|
|
17
|
+
private let popupHighlightTitle = "Tạm khoá giao dịch để bảo vệ bạn"
|
|
18
|
+
private let popupHighlightSentence =
|
|
19
|
+
"Mỗi ngày có ít nhất 20 người bị lừa đảo hơn 100 triệu đồng trong các giao dịch có dấu hiệu tương tự"
|
|
20
|
+
private let popupHighlightDescription =
|
|
21
|
+
"Hệ thống AI của MoMo đánh giá giao dịch này có dấu hiệu rủi ro. \(popupHighlightSentence)\n"
|
|
22
|
+
+ "Hãy kiểm tra lại người nhận và lý do chuyển tiền trước khi quyết định tiếp tục."
|
|
23
|
+
|
|
16
24
|
@available(iOS 16.0, *)
|
|
17
25
|
private struct PopupNotifyPreview: View {
|
|
18
26
|
@EnvironmentObject private var navigator: Navigator
|
|
@@ -21,6 +29,22 @@ private struct PopupNotifyPreview: View {
|
|
|
21
29
|
BasicColumnBox("PopupNotify", alignment: .leading) {
|
|
22
30
|
MoMoUIKits.Button(title: "Show popup", action: { show() }, size: .large)
|
|
23
31
|
}
|
|
32
|
+
BasicColumnBox("Highlight text", alignment: .leading) {
|
|
33
|
+
MoMoUIKits.Button(title: "Show highlight popup", action: { showHighlight() }, type: .secondary, size: .large)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private func showHighlight() {
|
|
38
|
+
navigator.showModal {
|
|
39
|
+
PopupNotify(props: PopupNotifyProps(
|
|
40
|
+
title: popupHighlightTitle,
|
|
41
|
+
description: popupHighlightDescription,
|
|
42
|
+
primary: PopupAction(title: "Primary", onPress: { navigator.hideOverplay() }),
|
|
43
|
+
secondary: PopupAction(title: "Secondary", onPress: { navigator.hideOverplay() }),
|
|
44
|
+
onIconClose: { navigator.hideOverplay() },
|
|
45
|
+
highlightText: [popupHighlightSentence]
|
|
46
|
+
))
|
|
47
|
+
}
|
|
24
48
|
}
|
|
25
49
|
|
|
26
50
|
private func show() {
|
|
@@ -53,6 +77,7 @@ private struct PopupNotifyPlayground: View {
|
|
|
53
77
|
@State private var image = "https://static.momocdn.net/app/img/popup_permission/img_permission_popup_camera.png"
|
|
54
78
|
@State private var title = "Title"
|
|
55
79
|
@State private var description = "Check lại một nhịp auto chuyển sang dạng CTA."
|
|
80
|
+
@State private var highlightText = ""
|
|
56
81
|
@State private var error = "9004"
|
|
57
82
|
@State private var primaryTitle = "Primary"
|
|
58
83
|
@State private var secondaryTitle = "Secondary"
|
|
@@ -68,6 +93,7 @@ private struct PopupNotifyPlayground: View {
|
|
|
68
93
|
.string("Image", $image),
|
|
69
94
|
.string("Title", $title),
|
|
70
95
|
.string("Description", $description),
|
|
96
|
+
.string("HighlightText: [String] (comma-separated)", $highlightText),
|
|
71
97
|
.string("Error", $error),
|
|
72
98
|
.string("PrimaryTitle", $primaryTitle),
|
|
73
99
|
.string("SecondaryTitle", $secondaryTitle),
|
|
@@ -88,7 +114,9 @@ private struct PopupNotifyPlayground: View {
|
|
|
88
114
|
secondary: PopupAction(title: secondaryTitle, onPress: { navigator.hideOverplay() }),
|
|
89
115
|
buttonDirection: (direction?.value as? PopupActionDirection) ?? .auto,
|
|
90
116
|
onIconClose: { navigator.hideOverplay() },
|
|
91
|
-
isShowCloseIcon: showClose
|
|
117
|
+
isShowCloseIcon: showClose,
|
|
118
|
+
highlightText: highlightText.components(separatedBy: ",")
|
|
119
|
+
.map { $0.trimmingCharacters(in: .whitespaces) }
|
|
92
120
|
))
|
|
93
121
|
}
|
|
94
122
|
}
|
|
@@ -39,6 +39,8 @@ struct TypographyDemo: View {
|
|
|
39
39
|
// MARK: - Preview
|
|
40
40
|
|
|
41
41
|
private struct TypographyPreview: View {
|
|
42
|
+
@Environment(\.appTheme) private var theme
|
|
43
|
+
|
|
42
44
|
var body: some View {
|
|
43
45
|
BasicColumnBox("Headers", alignment: .leading) {
|
|
44
46
|
MomoText("Headline Default Bold", typography: .headlineDefaultBold)
|
|
@@ -63,6 +65,20 @@ private struct TypographyPreview: View {
|
|
|
63
65
|
MomoText("Action XS Bold", typography: .actionXsBold)
|
|
64
66
|
MomoText("Action XXS Bold", typography: .actionXxsBold)
|
|
65
67
|
}
|
|
68
|
+
BasicColumnBox("ScaleSizeScope", alignment: .leading) {
|
|
69
|
+
MomoText(
|
|
70
|
+
"Increase the system font size to compare",
|
|
71
|
+
typography: .descriptionXsRegular,
|
|
72
|
+
color: theme.colors.text.secondary
|
|
73
|
+
)
|
|
74
|
+
MomoText("No scope", typography: .bodyDefaultRegular)
|
|
75
|
+
ScaleSizeScope(scaleSizeMaxRate: 1) {
|
|
76
|
+
MomoText("ScaleSizeScope(1)", typography: .bodyDefaultRegular)
|
|
77
|
+
}
|
|
78
|
+
ScaleSizeScope(scaleSizeMaxRate: 1.2) {
|
|
79
|
+
MomoText("ScaleSizeScope(1.2)", typography: .bodyDefaultRegular)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
84
|
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -291,9 +291,14 @@ phase_publish_maven() {
|
|
|
291
291
|
VERSION=$(node -p "require('./package.json').version")
|
|
292
292
|
export VERSION="$VERSION"
|
|
293
293
|
|
|
294
|
+
# Maven publishes to MoMo Artifacts (url in gradle.properties); credentials come from CI variables.
|
|
295
|
+
: "${PUBLISHING_USER:?Set PUBLISHING_USER for MoMo Artifacts}"
|
|
296
|
+
: "${PUBLISHING_PASSWORD:?Set PUBLISHING_PASSWORD for MoMo Artifacts}"
|
|
297
|
+
|
|
294
298
|
echo "📦 Publishing KMP artifacts to Maven (version ${VERSION})..."
|
|
295
299
|
|
|
296
|
-
./gradlew :compose:publishAllPublicationsToGitLabPackagesRepository
|
|
300
|
+
./gradlew :compose:publishAllPublicationsToGitLabPackagesRepository \
|
|
301
|
+
-Pgitlab.user="$PUBLISHING_USER" -Pgitlab.password="$PUBLISHING_PASSWORD"
|
|
297
302
|
|
|
298
303
|
echo "✅ compose Maven publishing completed successfully!"
|
|
299
304
|
|
|
@@ -314,7 +319,8 @@ phase_publish_maven() {
|
|
|
314
319
|
sed -i '/^compose {$/,/^}$/d' sample/shared/build.gradle.kts
|
|
315
320
|
fi
|
|
316
321
|
|
|
317
|
-
./gradlew :sample:shared:publishAllPublicationsToGitLabPackagesRepository
|
|
322
|
+
./gradlew :sample:shared:publishAllPublicationsToGitLabPackagesRepository \
|
|
323
|
+
-Pgitlab.user="$PUBLISHING_USER" -Pgitlab.password="$PUBLISHING_PASSWORD"
|
|
318
324
|
|
|
319
325
|
# Restore composeResources and build.gradle.kts
|
|
320
326
|
echo "📦 Restoring sample/shared composeResources and build.gradle.kts..."
|