@momo-kits/native-kits 0.169.10-beta.1-debug → 0.169.10
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/ios/Application/DesignSystemKits.swift +2 -3
- package/ios/Application/LanguageSource.swift +2 -3
- package/ios/Application/Localize.swift +4 -7
- package/ios/Application/LocalizeModifier.swift +2 -3
- package/ios/Badge/Badge.swift +5 -7
- package/ios/Button/Button.swift +2 -3
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +3 -5
- package/ios/Carousel/Carousel.swift +2 -3
- package/ios/Collapse/Collapse.swift +17 -11
- package/ios/Extensions/ActiveOpacityButtonStyle.swift +2 -3
- package/ios/Icon/Icon.swift +2 -3
- package/ios/IconButton/IconButton.swift +2 -3
- package/ios/Input/InputSearch.swift +6 -23
- package/ios/Layout/ModalLayout.swift +2 -3
- package/ios/Layout/ScreenLayout.swift +10 -12
- package/ios/Layout/Section.swift +2 -3
- package/ios/Navigation/BottomSheet.swift +6 -9
- package/ios/Navigation/BottomTab/BottomTab.swift +6 -9
- package/ios/Navigation/BottomTab/BottomTabBar.swift +4 -6
- package/ios/Navigation/BottomTab/CurvedContainer.swift +2 -3
- package/ios/Navigation/BottomTab/DuoBarCompression.swift +2 -3
- package/ios/Navigation/BottomTab/DuoTabBar.swift +6 -6
- package/ios/Navigation/BottomTab/TabBarMetrics.swift +4 -6
- package/ios/Navigation/Component/Header.swift +46 -31
- package/ios/Navigation/Component/HeaderJourney.swift +1 -2
- package/ios/Navigation/Component/HeaderLocation.swift +1 -2
- package/ios/Navigation/Component/HeaderRight.swift +15 -18
- package/ios/Navigation/Component/HeaderUser.swift +1 -2
- package/ios/Navigation/Component/SideBar.swift +15 -7
- package/ios/Navigation/HostBackGestureBridge.swift +2 -3
- package/ios/Navigation/ModalScreen.swift +13 -11
- package/ios/Navigation/Navigation.swift +3 -9
- package/ios/Navigation/NavigationContainer.swift +4 -6
- package/ios/Navigation/Navigator.swift +12 -18
- package/ios/Navigation/StackScreen.swift +25 -40
- package/ios/Navigation/StackTransition.swift +7 -6
- package/ios/Skeleton/Skeleton.swift +3 -6
- package/ios/Steps/Steps.swift +20 -15
- package/ios/TabView/TabView.swift +2 -3
- package/ios/Title/Title.swift +1 -3
- package/ios/Typography/FontScale.swift +6 -9
- package/ios/Typography/Text.swift +2 -3
- package/ios/Typography/Typography.swift +3 -4
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +2 -11
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +0 -11
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +1 -1
- package/package.json +1 -1
- package/build.gradle.kts +0 -11
- package/compose/build.gradle.kts +0 -198
- package/compose/compose.podspec +0 -47
- package/compose/src/androidMain/kotlin/vn/momo/kits/const/HostFont.android.kt +0 -19
- package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +0 -6
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/BackGesture.android.kt +0 -12
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +0 -7
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -154
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReduceMotion.android.kt +0 -17
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReservedRegions.android.kt +0 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +0 -110
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/DesignSystemKits.kt +0 -62
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +0 -1067
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +0 -267
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +0 -56
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +0 -157
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +0 -82
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +0 -32
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +0 -338
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -175
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +0 -356
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +0 -115
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -89
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +0 -128
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +0 -209
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +0 -482
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +0 -49
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +0 -86
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +0 -125
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +0 -224
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +0 -195
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +0 -473
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +0 -113
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +0 -263
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +0 -235
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +0 -228
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +0 -280
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +0 -183
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +0 -343
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +0 -108
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +0 -56
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +0 -40
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +0 -82
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +0 -39
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +0 -363
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +0 -108
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +0 -307
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +0 -59
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +0 -87
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -21
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +0 -88
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +0 -306
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +0 -220
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +0 -457
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +0 -122
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +0 -205
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +0 -89
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +0 -542
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +0 -86
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +0 -120
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +0 -201
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +0 -498
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +0 -176
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +0 -182
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +0 -193
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +0 -29
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +0 -210
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +0 -180
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +0 -325
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/HostFont.kt +0 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +0 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +0 -16
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -194
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +0 -292
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +0 -54
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/HeaderLayout.kt +0 -67
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +0 -50
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +0 -184
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +0 -316
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +0 -41
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -52
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +0 -66
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +0 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +0 -104
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +0 -48
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +0 -51
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +0 -397
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/HostBackGestureBridge.kt +0 -58
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +0 -153
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +0 -118
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -205
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -422
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +0 -8
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +0 -747
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackTransition.kt +0 -148
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/SwipeBackHaptic.kt +0 -35
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +0 -242
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +0 -400
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +0 -100
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoBarCompression.kt +0 -97
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +0 -207
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/TabBarMetrics.kt +0 -132
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +0 -167
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +0 -446
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +0 -105
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderJourney.kt +0 -106
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderLocation.kt +0 -74
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +0 -398
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +0 -39
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +0 -363
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SideBar.kt +0 -197
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +0 -133
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +0 -127
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/BackGesture.kt +0 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +0 -114
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +0 -9
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReduceMotion.kt +0 -7
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +0 -22
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +0 -1329
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +0 -55
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +0 -15
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +0 -118
- package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +0 -42
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/HostBackGesture.ios.kt +0 -45
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +0 -32
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/BackGesture.ios.kt +0 -38
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +0 -66
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -218
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReduceMotion.ios.kt +0 -48
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +0 -144
- package/gradle/libs.versions.toml +0 -67
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +0 -8
- package/gradle.properties +0 -24
- package/gradlew +0 -252
- package/gradlew.bat +0 -94
- package/ios/Layout/HeaderLayout.swift +0 -67
- package/ios-demo/README.md +0 -120
- package/settings.gradle.kts +0 -64
|
@@ -20,9 +20,8 @@ public struct DesignSystemKitsConfigs: Equatable {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
///
|
|
24
|
-
///
|
|
25
|
-
/// only under `.momoFontScale()` (`NavigationContainer` applies it).
|
|
23
|
+
/// Compose's `DesignSystemKits` without `init(source:)` (Swift reserves `init`): the host pushes `setConfigs(_:)` at
|
|
24
|
+
/// startup and on every change. Also tracks Dynamic Type; views re-render only under `.momoFontScale()`.
|
|
26
25
|
public final class DesignSystemKits: ObservableObject {
|
|
27
26
|
public static let shared = DesignSystemKits()
|
|
28
27
|
|
|
@@ -9,9 +9,8 @@ public protocol LanguageSource: AnyObject {
|
|
|
9
9
|
func stopObserving()
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
///
|
|
13
|
-
///
|
|
14
|
-
/// same key on `UserDefaults.standard` in-process, so KVO on it sees every one of them.
|
|
12
|
+
/// All three host writers (RN bridge `RNResource`, `JSONLocalization`, KMP `LocalizationProvider`) write the same
|
|
13
|
+
/// `UserDefaults.standard` key in-process, so KVO on it sees every language change.
|
|
15
14
|
public final class UserDefaultsLanguageSource: NSObject, LanguageSource {
|
|
16
15
|
public static let defaultKey = "language"
|
|
17
16
|
|
|
@@ -318,9 +318,8 @@ public final class Localize: ObservableObject {
|
|
|
318
318
|
)
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
/// Snapshots `currentLanguage`
|
|
322
|
-
///
|
|
323
|
-
/// `@Environment` does not subscribe to `@Published` the way `@EnvironmentObject` does.
|
|
321
|
+
/// Snapshots `currentLanguage` so `changeLanguage` is an environment *change*: the reference never changes, and
|
|
322
|
+
/// `@Environment` doesn't subscribe to `@Published` the way `@EnvironmentObject` does.
|
|
324
323
|
private struct LocalizeBox: Equatable {
|
|
325
324
|
let localize: Localize
|
|
326
325
|
let language: String
|
|
@@ -339,10 +338,8 @@ private struct LocalizeBox: Equatable {
|
|
|
339
338
|
}
|
|
340
339
|
|
|
341
340
|
private struct LocalizeKey: EnvironmentKey {
|
|
342
|
-
///
|
|
343
|
-
///
|
|
344
|
-
/// A `static let`, never rebuilt: without `.momoLocalize()` (or `NavigationContainer`) the
|
|
345
|
-
/// language is right on first render but does not live-update.
|
|
341
|
+
/// Never traps like `@EnvironmentObject`, but as a `static let` it is never rebuilt: without `.momoLocalize()`
|
|
342
|
+
/// (or `NavigationContainer`) the language is right on first render but does not live-update.
|
|
346
343
|
static let defaultValue = LocalizeBox(Localize.shared)
|
|
347
344
|
}
|
|
348
345
|
|
|
@@ -8,9 +8,8 @@ public extension View {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/// `@ObservedObject` is load-bearing: `@Environment(\.localize)` only
|
|
12
|
-
///
|
|
13
|
-
/// set `\.localize` would inject a snapshot that never updates.
|
|
11
|
+
/// `@ObservedObject` is load-bearing: `@Environment(\.localize)` invalidates only when *this* body re-runs on a
|
|
12
|
+
/// publish; a helper that just set `\.localize` would inject a snapshot that never updates.
|
|
14
13
|
private struct MomoLocalizeModifier: ViewModifier {
|
|
15
14
|
@ObservedObject var localize: Localize
|
|
16
15
|
|
package/ios/Badge/Badge.swift
CHANGED
|
@@ -41,16 +41,14 @@ public struct Badge: View {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
private var badgeColor: Color {
|
|
44
|
-
|
|
45
|
-
? theme.colors.error.primary
|
|
46
|
-
: theme.colors.warning.primary
|
|
47
|
-
|
|
48
|
-
// Mirror Compose: only apply backgroundColor when it is one of the
|
|
49
|
-
// allowed primaryColors; otherwise fall back to the label-based default.
|
|
44
|
+
// Mirrors Compose: backgroundColor applies only when it is one of primaryColors.
|
|
50
45
|
if let bgColor = backgroundColor, primaryColors.contains(bgColor) {
|
|
51
46
|
return bgColor
|
|
52
47
|
}
|
|
53
|
-
|
|
48
|
+
if isNumber(label) {
|
|
49
|
+
return theme.colors.error.primary
|
|
50
|
+
}
|
|
51
|
+
return theme.colors.warning.primary
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
public var body: some View {
|
package/ios/Button/Button.swift
CHANGED
|
@@ -229,9 +229,8 @@ public struct Button: View {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
///
|
|
233
|
-
/// horizontal inset and the whole button
|
|
234
|
-
/// matching `animatedPadding`/`alpha` in Button.kt.
|
|
232
|
+
/// Compose's press feedback (`animatedPadding` / `alpha` in Button.kt): the background shrinks by an animated
|
|
233
|
+
/// horizontal inset and the whole button fades to 0.5.
|
|
235
234
|
private struct ButtonPressFeedbackStyle: ButtonStyle {
|
|
236
235
|
let isEnabled: Bool
|
|
237
236
|
let background: Color
|
|
@@ -92,11 +92,9 @@ public struct CalculatorKeyboard: View {
|
|
|
92
92
|
|
|
93
93
|
var result = terms[0]
|
|
94
94
|
for (sign, term) in zip(signs, terms.dropFirst()) {
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if overflow { return nil }
|
|
99
|
-
result = next
|
|
95
|
+
let step = sign == "+" ? result.addingReportingOverflow(term) : result.subtractingReportingOverflow(term)
|
|
96
|
+
if step.overflow { return nil }
|
|
97
|
+
result = step.partialValue
|
|
100
98
|
}
|
|
101
99
|
return result
|
|
102
100
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
-
/// Compose `Carousel`; `content` and the snap / scroll-index callbacks get the real (modulo) index.
|
|
4
|
-
///
|
|
5
|
-
/// virtualization or the inactive-slide opacity/scale effects.
|
|
3
|
+
/// Compose `Carousel`; `content` and the snap / scroll-index callbacks get the real (modulo) index. A drag-driven
|
|
4
|
+
/// pager, as ScrollView and `TabView(.page)` can't express the loop virtualization or inactive-slide effects.
|
|
6
5
|
public struct Carousel<Content: View>: View {
|
|
7
6
|
// MARK: Lifecycle
|
|
8
7
|
|
|
@@ -94,11 +94,7 @@ public struct Collapse<Content: View>: View {
|
|
|
94
94
|
content()
|
|
95
95
|
}
|
|
96
96
|
.frame(maxWidth: .infinity)
|
|
97
|
-
.overlay(
|
|
98
|
-
showBorder
|
|
99
|
-
? Rectangle().strokeBorder(theme.colors.border.default, lineWidth: 1)
|
|
100
|
-
: nil
|
|
101
|
-
)
|
|
97
|
+
.overlay(contentBorder)
|
|
102
98
|
.transition(.move(edge: .top))
|
|
103
99
|
}
|
|
104
100
|
}
|
|
@@ -108,17 +104,27 @@ public struct Collapse<Content: View>: View {
|
|
|
108
104
|
.frame(maxWidth: .infinity)
|
|
109
105
|
.background(resolvedBackgroundColor)
|
|
110
106
|
.clipShape(RoundedRectangle(cornerRadius: Radius.S, style: .continuous))
|
|
111
|
-
.overlay(
|
|
112
|
-
showBorder
|
|
113
|
-
? RoundedRectangle(cornerRadius: Radius.S, style: .continuous)
|
|
114
|
-
.strokeBorder(theme.colors.border.default, lineWidth: 1)
|
|
115
|
-
: nil
|
|
116
|
-
)
|
|
107
|
+
.overlay(containerBorder)
|
|
117
108
|
// `.contain` keeps the children's own identifiers instead of overriding them.
|
|
118
109
|
.accessibilityElement(children: .contain)
|
|
119
110
|
.accessibilityIdentifier(automationId)
|
|
120
111
|
}
|
|
121
112
|
|
|
113
|
+
@ViewBuilder
|
|
114
|
+
private var contentBorder: some View {
|
|
115
|
+
if showBorder {
|
|
116
|
+
Rectangle().strokeBorder(theme.colors.border.default, lineWidth: 1)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@ViewBuilder
|
|
121
|
+
private var containerBorder: some View {
|
|
122
|
+
if showBorder {
|
|
123
|
+
RoundedRectangle(cornerRadius: Radius.S, style: .continuous)
|
|
124
|
+
.strokeBorder(theme.colors.border.default, lineWidth: 1)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
private var header: some View {
|
|
123
129
|
SwiftUI.Button(action: {
|
|
124
130
|
onPress?(expanded)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
-
///
|
|
4
|
-
///
|
|
5
|
-
/// relying on a platform-default press indication.
|
|
3
|
+
/// Compose's `Modifier.activeOpacityClickable(activeOpacity:)`: the whole tappable subtree fades to `activeOpacity`
|
|
4
|
+
/// while pressed, instead of a platform-default press indication.
|
|
6
5
|
struct ActiveOpacityButtonStyle: ButtonStyle {
|
|
7
6
|
var activeOpacity: Double = 0.2
|
|
8
7
|
|
package/ios/Icon/Icon.swift
CHANGED
|
@@ -16,9 +16,8 @@ let iconSources: [String: String] = {
|
|
|
16
16
|
return kitIcons.merging(hostIcons.mapValues(\.uri)) { kit, _ in kit }
|
|
17
17
|
}()
|
|
18
18
|
|
|
19
|
-
// Compose defaults `color` to the theme text color
|
|
20
|
-
//
|
|
21
|
-
// unrepresentable sentinel: omitted -> theme text color, `nil` -> untinted.
|
|
19
|
+
// Compose defaults `color` to the theme text color, `null` meaning no tint. Swift can't tell an omitted argument
|
|
20
|
+
// from `nil`, so the default is this unrepresentable sentinel: omitted -> theme text color, `nil` -> untinted.
|
|
22
21
|
public let iconThemeColor = Color(.sRGB, red: -1, green: -1, blue: -1, opacity: -1)
|
|
23
22
|
|
|
24
23
|
public struct Icon: View {
|
|
@@ -118,9 +118,8 @@ public struct IconButton: View {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
///
|
|
122
|
-
///
|
|
123
|
-
/// erasure at the deployment target's iOS 15 floor.
|
|
121
|
+
/// Compose's `IconShape.toShape()` (`Circle` or a `Radius.S` rounded rect), type-erased by hand: `AnyShape` needs
|
|
122
|
+
/// iOS 17+ and the pod supports iOS 15.
|
|
124
123
|
private struct IconButtonShape: InsettableShape {
|
|
125
124
|
let shape: IconShape
|
|
126
125
|
var insetAmount: CGFloat = 0
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
-
/// Body searches keep 36 / 24; the header search matches the 32pt header buttons.
|
|
4
|
-
enum InputSearchSize {
|
|
5
|
-
case `default`, header
|
|
6
|
-
|
|
7
|
-
var height: CGFloat { self == .header ? HeaderLayoutMetrics.searchHeight : 36 }
|
|
8
|
-
var iconSize: CGFloat { self == .header ? HeaderLayoutMetrics.iconSize : 24 }
|
|
9
|
-
}
|
|
10
|
-
|
|
11
3
|
// MARK: - RenderRightIconSearch
|
|
12
4
|
|
|
13
5
|
struct RenderRightIconSearch: View {
|
|
@@ -15,7 +7,6 @@ struct RenderRightIconSearch: View {
|
|
|
15
7
|
let loading: Bool
|
|
16
8
|
let icon: String
|
|
17
9
|
let color: Color
|
|
18
|
-
var size: InputSearchSize = .default
|
|
19
10
|
let onClick: () -> Void
|
|
20
11
|
|
|
21
12
|
var body: some View {
|
|
@@ -26,13 +17,13 @@ struct RenderRightIconSearch: View {
|
|
|
26
17
|
.padding(.horizontal, Spacing.S)
|
|
27
18
|
}
|
|
28
19
|
if !icon.isEmpty {
|
|
29
|
-
// Compose: a 1pt rule inset S from the top and bottom of the bar.
|
|
20
|
+
// Compose: a 1pt rule inset S from the top and bottom of the 36pt bar.
|
|
30
21
|
Rectangle()
|
|
31
22
|
.fill(theme.colors.primary)
|
|
32
|
-
.frame(width: 1, height:
|
|
23
|
+
.frame(width: 1, height: 36 - Spacing.S * 2)
|
|
33
24
|
.padding(.leading, Spacing.S)
|
|
34
25
|
|
|
35
|
-
Icon(source: icon, size:
|
|
26
|
+
Icon(source: icon, size: 24, color: color)
|
|
36
27
|
.padding(.leading, Spacing.S)
|
|
37
28
|
.onTapGesture(perform: onClick)
|
|
38
29
|
}
|
|
@@ -146,7 +137,6 @@ public struct InputSearch: View {
|
|
|
146
137
|
var clearCondition: (() -> Bool)? = nil
|
|
147
138
|
var onClearPress: () -> Void = {}
|
|
148
139
|
var onSubmit: () -> Void = {}
|
|
149
|
-
var size: InputSearchSize = .default
|
|
150
140
|
|
|
151
141
|
@State private var isFocused = false
|
|
152
142
|
@State private var isBlurred = false
|
|
@@ -236,7 +226,7 @@ public struct InputSearch: View {
|
|
|
236
226
|
if let searchIcon = searchIcon {
|
|
237
227
|
searchIcon()
|
|
238
228
|
} else {
|
|
239
|
-
Icon(source: "navigation_search", size:
|
|
229
|
+
Icon(source: "navigation_search", size: 24, color: theme.colors.text.hint)
|
|
240
230
|
.padding(.trailing, Spacing.XS)
|
|
241
231
|
}
|
|
242
232
|
|
|
@@ -285,11 +275,11 @@ public struct InputSearch: View {
|
|
|
285
275
|
.padding(.leading, Spacing.XS)
|
|
286
276
|
}
|
|
287
277
|
|
|
288
|
-
RenderRightIconSearch(loading: loading, icon: icon, color: iconColor,
|
|
278
|
+
RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, onClick: onRightIconPressed)
|
|
289
279
|
}
|
|
290
280
|
.padding(.horizontal, Spacing.M)
|
|
291
281
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
292
|
-
.frame(height:
|
|
282
|
+
.frame(height: 36)
|
|
293
283
|
.background(
|
|
294
284
|
RoundedRectangle(cornerRadius: Radius.XL)
|
|
295
285
|
.fill(backgroundColor ?? theme.colors.background.surface)
|
|
@@ -308,13 +298,6 @@ public struct InputSearch: View {
|
|
|
308
298
|
}
|
|
309
299
|
}
|
|
310
300
|
|
|
311
|
-
/// The header search: 32pt tall with a 20pt icon, level with the header buttons.
|
|
312
|
-
func headerSize() -> InputSearch {
|
|
313
|
-
var copy = self
|
|
314
|
-
copy.size = .header
|
|
315
|
-
return copy
|
|
316
|
-
}
|
|
317
|
-
|
|
318
301
|
// MARK: - Helper Functions
|
|
319
302
|
|
|
320
303
|
func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
|
|
@@ -56,9 +56,8 @@ public extension ScreenLayout {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
public extension ModalLayout {
|
|
59
|
-
///
|
|
60
|
-
///
|
|
61
|
-
/// Duo `safeInsets` also carries the control column and `hinge` is the half-fold hinge (nil while flat).
|
|
59
|
+
/// For hosts without a kits screen (`ScreenLayout.current.modalLayout` covers the key window); window points.
|
|
60
|
+
/// On iPhone Duo `safeInsets` includes the control column and `hinge` is the half-fold hinge (nil while flat).
|
|
62
61
|
static func resolve(
|
|
63
62
|
width: CGFloat,
|
|
64
63
|
height: CGFloat,
|
|
@@ -147,9 +147,10 @@ extension ScreenLayout {
|
|
|
147
147
|
// Activities; region frames already include the system's margin
|
|
148
148
|
let occlusion = stripOcclusion(reservedRegions, stripLeft: stripLeft, stripRight: stripLeft + sideInset, windowHeight: height)
|
|
149
149
|
|
|
150
|
-
var top =
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
var top = insets.top + HeaderMetrics.barHeight + Spacing.M
|
|
151
|
+
if statusBarClearance != nil {
|
|
152
|
+
top = headerHeight + Spacing.M
|
|
153
|
+
}
|
|
153
154
|
if insets.top < HeaderMetrics.statusBarMinInset {
|
|
154
155
|
// status bar lives in the strip: start under its cluster, as the native bar does
|
|
155
156
|
if width <= height {
|
|
@@ -206,9 +207,8 @@ extension ScreenLayout {
|
|
|
206
207
|
return (height, max(0, centerY * 2 - height))
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
/// How far system regions reach into a side strip from its top and
|
|
210
|
-
///
|
|
211
|
-
/// of the region reaching furthest from the top.
|
|
210
|
+
/// How far system regions (e.g. the camera, at either end by rotation) reach into a side strip from its top and
|
|
211
|
+
/// bottom ends, and the center y of the one reaching furthest from the top.
|
|
212
212
|
private static func stripOcclusion(
|
|
213
213
|
_ regions: [CGRect],
|
|
214
214
|
stripLeft: CGFloat,
|
|
@@ -270,9 +270,8 @@ public func isIPhoneDuoDevice(windowSize: CGSize? = nil) -> Bool {
|
|
|
270
270
|
return FoldableDevice.isFoldable(measuredIn: keyWindow) || insets.map { $0.left != $0.right } == true
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
/// Apple's foldable check (
|
|
274
|
-
///
|
|
275
|
-
/// it apart from a large iPhone in landscape or a narrowed window.
|
|
273
|
+
/// Apple's foldable check (host `SideTabRailView.isFoldableDevice`): only a hinged device reports a `.division`
|
|
274
|
+
/// region, even inactive while flat. Screen size can't tell it from a landscape iPhone or a narrowed window.
|
|
276
275
|
enum FoldableDevice {
|
|
277
276
|
// a hinge never goes away, so a positive answer is kept
|
|
278
277
|
private static var isKnownFoldable = false
|
|
@@ -311,9 +310,8 @@ enum FoldableDevice {
|
|
|
311
310
|
|
|
312
311
|
// MARK: - Reserved regions
|
|
313
312
|
|
|
314
|
-
/// System occlusion regions (iOS 27.1
|
|
315
|
-
///
|
|
316
|
-
/// `division` is the active hinge region, there only while the device is half folded.
|
|
313
|
+
/// System occlusion regions (iOS 27.1+, else empty) in window coordinates: the iPhone Duo camera and the status bar
|
|
314
|
+
/// cluster, which grows for a call or a Live Activity. `division` is the hinge, there only while half folded.
|
|
317
315
|
enum ReservedRegions {
|
|
318
316
|
// last report of a probe, so `ScreenLayout.current` includes it
|
|
319
317
|
private(set) static var current: [CGRect] = []
|
package/ios/Layout/Section.swift
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
-
///
|
|
4
|
-
///
|
|
5
|
-
/// size from `\.gridContext`. Mirrors `vn.momo.kits.layout.Section`.
|
|
3
|
+
/// Compose `layout.Section`: a 12-column grid (24 when wider than 600pt) with margin, optional background image
|
|
4
|
+
/// and a wrapping row of children that read their span from `\.gridContext`.
|
|
6
5
|
public struct SectionView<Content: View>: View {
|
|
7
6
|
// MARK: Lifecycle
|
|
8
7
|
|
|
@@ -100,9 +100,8 @@ struct BottomSheetView<Content: View>: View {
|
|
|
100
100
|
return progress * maxDynamicAlpha
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
///
|
|
104
|
-
///
|
|
105
|
-
/// (backgroundAlpha holds steady until an explicit close()).
|
|
103
|
+
/// Compose's `(backgroundAlpha + dynamicAlpha) * scrimOpacity`: additive, so a drag fades the scrim only to half
|
|
104
|
+
/// of `scrimOpacity` (backgroundAlpha holds until an explicit close()).
|
|
106
105
|
private var totalScrimAlpha: CGFloat { (backgroundAlpha + dynamicAlpha) * modal.scrimOpacity }
|
|
107
106
|
|
|
108
107
|
var body: some View {
|
|
@@ -281,9 +280,8 @@ struct BottomSheetView<Content: View>: View {
|
|
|
281
280
|
}
|
|
282
281
|
}
|
|
283
282
|
|
|
284
|
-
/// Compose's `heightIn(max:)
|
|
285
|
-
/// larger, leaving a gap above the header
|
|
286
|
-
/// when taller.
|
|
283
|
+
/// Compose's `heightIn(max:)`: sizes the sheet to its content, capped only when taller. `.frame(maxHeight:)` grows
|
|
284
|
+
/// to the cap whenever the proposal is larger, leaving a gap above the header.
|
|
287
285
|
private struct CapHeight: ViewModifier {
|
|
288
286
|
let maxHeight: CGFloat
|
|
289
287
|
|
|
@@ -296,9 +294,8 @@ private struct CapHeight: ViewModifier {
|
|
|
296
294
|
}
|
|
297
295
|
}
|
|
298
296
|
|
|
299
|
-
/// iOS 15
|
|
300
|
-
///
|
|
301
|
-
/// content), so it is re-measured only when the cap grows, e.g. once the keyboard goes down.
|
|
297
|
+
/// iOS 15 (no `Layout`): hugs the ideal height until it outgrows the cap. A capped sheet can't read its ideal height
|
|
298
|
+
/// without a second copy of the content, so it is re-measured only when the cap grows (e.g. the keyboard hides).
|
|
302
299
|
private struct CapHeightFallback: ViewModifier {
|
|
303
300
|
let maxHeight: CGFloat
|
|
304
301
|
@State private var capped = false
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// SwiftUI mirror of Compose's `navigation/bottomtab/BottomTab.kt`:
|
|
2
|
-
// `
|
|
3
|
-
// rail / floating bar). Switching tabs cross-fades + scales the content.
|
|
1
|
+
// SwiftUI mirror of Compose's `navigation/bottomtab/BottomTab.kt`: tabs in `StackScreen` chrome, each with its own
|
|
2
|
+
// `Navigation`, over a `BottomTabBar` (or the iPhone Duo rail / floating bar); a switch cross-fades + scales.
|
|
4
3
|
|
|
5
4
|
import SwiftUI
|
|
6
5
|
import UIKit
|
|
@@ -25,9 +24,8 @@ public struct BottomTab: View {
|
|
|
25
24
|
@State private var expandedBar: DuoBar?
|
|
26
25
|
@State private var openedBar: DuoBar?
|
|
27
26
|
|
|
28
|
-
/// `compressionBehavior`:
|
|
29
|
-
///
|
|
30
|
-
/// login gate. `backToInitialTab`: back off another tab returns to the initial one first.
|
|
27
|
+
/// `compressionBehavior`: iPhone Duo bar that starts compressed when the side bar can't hold both (a tap swaps).
|
|
28
|
+
/// `onTabPress` gets the switch to run, e.g. after a login gate. `backToInitialTab`: back goes to it first.
|
|
31
29
|
public init(
|
|
32
30
|
items: [BottomTabItem],
|
|
33
31
|
floatingButton: BottomTabFloatingButton? = nil,
|
|
@@ -179,9 +177,8 @@ private struct TabScreenHost: View {
|
|
|
179
177
|
|
|
180
178
|
// MARK: - Tab host
|
|
181
179
|
|
|
182
|
-
/// Compose's tab NavHost with `saveState` / `restoreState`: a tab keeps its UIHostingController
|
|
183
|
-
///
|
|
184
|
-
/// gets onDisappear / onAppear (re-running screen tracking). Same scheme as `StackController`.
|
|
180
|
+
/// Compose's tab NavHost with `saveState` / `restoreState`: a tab keeps its UIHostingController (state, scroll).
|
|
181
|
+
/// Hidden, it leaves the window and gets onDisappear / onAppear, re-running screen tracking, as in `StackController`.
|
|
185
182
|
private struct TabHost: UIViewControllerRepresentable {
|
|
186
183
|
let selectedIndex: Int
|
|
187
184
|
let count: Int
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// SwiftUI mirror of Compose's `navigation/bottomtab/BottomTabBar.kt
|
|
2
|
-
//
|
|
3
|
-
// evenly with a tonal active indicator, badges/dots, and the Special type's center action in a notch.
|
|
1
|
+
// SwiftUI mirror of Compose's `navigation/bottomtab/BottomTabBar.kt` (Figma "Specs Navigation", DS-984): floating
|
|
2
|
+
// container, evenly split items with a tonal active indicator, badges/dots, the Special center action in a notch.
|
|
4
3
|
|
|
5
4
|
import SwiftUI
|
|
6
5
|
|
|
@@ -102,9 +101,8 @@ struct BottomTabBar: View {
|
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
///
|
|
106
|
-
///
|
|
107
|
-
/// behind the selected item.
|
|
104
|
+
/// One active indicator slides behind the selected item; the Special type's center action rises ctaLift above
|
|
105
|
+
/// the container's notch.
|
|
108
106
|
struct HorizontalTabBar: View {
|
|
109
107
|
let items: [BottomTabItem]
|
|
110
108
|
let floatingButton: BottomTabFloatingButton?
|
|
@@ -40,9 +40,8 @@ struct NotchedBarShape: Shape {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
///
|
|
44
|
-
///
|
|
45
|
-
/// shadows go over the fill (compositingGroup keeps the first from being re-cast).
|
|
43
|
+
/// Translucent fill (Figma .Nav/Background) with the shadow following the shape. Shadows go over the fill, as opaque
|
|
44
|
+
/// layers under it would make the glass solid (compositingGroup keeps the first from being re-cast).
|
|
46
45
|
struct TabBarContainer<S: Shape>: ViewModifier {
|
|
47
46
|
let shape: S
|
|
48
47
|
|
|
@@ -31,9 +31,8 @@ struct DuoBarCompression {
|
|
|
31
31
|
/// Back, then the single button the toolbar folds into.
|
|
32
32
|
private static let compressedToolbarHeight = 2 * DuoMetrics.controlSize + Spacing.M
|
|
33
33
|
|
|
34
|
-
/// Both fit: both
|
|
35
|
-
///
|
|
36
|
-
/// again once a tab is picked).
|
|
34
|
+
/// Both fit: both whole. One fits beside the other compressed: it is compressed and a tap swaps them. Otherwise
|
|
35
|
+
/// both rest compressed and a tap opens one for a moment (the rail closes again once a tab is picked).
|
|
37
36
|
static func resolve(
|
|
38
37
|
layout: ScreenLayout,
|
|
39
38
|
tabCount: Int,
|
|
@@ -26,9 +26,10 @@ extension EnvironmentValues {
|
|
|
26
26
|
|
|
27
27
|
/// Rail container plus the center action under it; compressed, the rail is a single button.
|
|
28
28
|
func duoRailHeight(itemCount: Int, hasQr: Bool, compressed: Bool = false) -> CGFloat {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
var rail = CGFloat(itemCount) * TabBarMetrics.railItemHeight + TabBarMetrics.railPaddingBottom
|
|
30
|
+
if compressed {
|
|
31
|
+
rail = compactSize
|
|
32
|
+
}
|
|
32
33
|
return rail + (hasQr ? TabBarMetrics.railCtaGap + TabBarMetrics.railCtaHeight : 0)
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -71,9 +72,8 @@ struct DuoTabBar: View {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
/// Vertical bar
|
|
75
|
-
///
|
|
76
|
-
/// (HIG "Tab bar compressed"); tapping it expands the rail and compresses the toolbar.
|
|
75
|
+
/// Vertical bar at the bottom of the side bar, center action below. A short side bar shrinks it to one button showing
|
|
76
|
+
/// the current tab (HIG "Tab bar compressed"); a tap expands the rail and compresses the toolbar.
|
|
77
77
|
private struct DuoRailTabBar: View {
|
|
78
78
|
let sideBar: SideBarLayout
|
|
79
79
|
let items: [BottomTabItem]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// Navigation bar measurements (Figma "Specs Navigation", DS-984), mirrored from Compose's
|
|
2
|
-
// `
|
|
3
|
-
// container, center action in a notch; vertical: iPhone Duo rail, center action under it.
|
|
1
|
+
// Navigation bar measurements (Figma "Specs Navigation", DS-984), mirrored from Compose's `TabBarMetrics.kt` and RN
|
|
2
|
+
// `BottomTab/metrics.ts`. Horizontal: floating, center action in a notch; vertical: iPhone Duo rail, action under it.
|
|
4
3
|
|
|
5
4
|
import SwiftUI
|
|
6
5
|
|
|
@@ -44,9 +43,8 @@ enum TabBarMetrics {
|
|
|
44
43
|
static let ctaLift: CGFloat = 22
|
|
45
44
|
static let ctaLabelGap = Spacing.M
|
|
46
45
|
static let ctaLabelHeight: CGFloat = 18
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
// each point as (dx from the center, dy below the top edge)
|
|
46
|
+
// container-top notch under the center action (Figma "Backgroud" path): from notchHalfWidth left of the center,
|
|
47
|
+
// cubic segments [control1, control2, end], each point (dx from the center, dy below the top edge)
|
|
50
48
|
static let notchHalfWidth: CGFloat = 50.758
|
|
51
49
|
static let notchCurves: [[CGPoint]] = [
|
|
52
50
|
[CGPoint(x: -39.749, y: 0), CGPoint(x: -31.231, y: 9.765), CGPoint(x: -24.563, y: 18.526)],
|