@expo/ui 57.0.6 → 57.0.8
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/CHANGELOG.md +25 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +60 -15
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +5 -1
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +36 -28
- package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
- package/build/community/menu/MenuView.android.d.ts.map +1 -1
- package/build/community/menu/MenuView.ios.d.ts.map +1 -1
- package/build/community/menu/types.d.ts +6 -1
- package/build/community/menu/types.d.ts.map +1 -1
- package/build/jetpack-compose/RNHostView/index.d.ts +1 -3
- package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
- package/build/swift-ui/BottomSheet/index.d.ts +10 -6
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/Host/index.d.ts +4 -3
- package/build/swift-ui/Host/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +1 -0
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/menuOrder.d.ts +10 -0
- package/build/swift-ui/modifiers/menuOrder.d.ts.map +1 -0
- package/build/swift-ui/modifiers/presentationModifiers.d.ts +19 -0
- package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
- package/build/universal/Host/types.d.ts +1 -1
- package/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +20 -3
- package/ios/Modifiers/MenuOrderModifier.swift +34 -0
- package/ios/Modifiers/PresentationModifiers.swift +30 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +8 -0
- package/ios/TextFieldView.swift +8 -10
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.6/expo.modules.ui-57.0.6-sources.jar → 57.0.8/expo.modules.ui-57.0.8-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.6/expo.modules.ui-57.0.6.module → 57.0.8/expo.modules.ui-57.0.8.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.6/expo.modules.ui-57.0.6.pom → 57.0.8/expo.modules.ui-57.0.8.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +6 -6
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +3 -1
- package/src/community/masked-view/MaskedView.ios.tsx +1 -1
- package/src/community/menu/MenuView.android.tsx +2 -1
- package/src/community/menu/MenuView.ios.tsx +11 -13
- package/src/community/menu/types.tsx +12 -1
- package/src/community/pager-view/PagerView.ios.tsx +1 -1
- package/src/jetpack-compose/RNHostView/index.tsx +7 -4
- package/src/swift-ui/BottomSheet/index.tsx +21 -14
- package/src/swift-ui/Host/index.tsx +4 -3
- package/src/swift-ui/modifiers/index.ts +1 -0
- package/src/swift-ui/modifiers/menuOrder.ts +12 -0
- package/src/swift-ui/modifiers/presentationModifiers.ts +22 -0
- package/src/universal/Host/types.ts +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.6/expo.modules.ui-57.0.6.pom.sha512 +0 -1
|
@@ -64,4 +64,23 @@ export declare const presentationBackground: (color: string) => ModifierConfig;
|
|
|
64
64
|
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/interactivedismissdisabled(_:)).
|
|
65
65
|
*/
|
|
66
66
|
export declare const interactiveDismissDisabled: (isDisabled?: boolean) => ModifierConfig;
|
|
67
|
+
/**
|
|
68
|
+
* Sizing behavior for a sheet presentation.
|
|
69
|
+
* - `'automatic'`: The system default sizing.
|
|
70
|
+
* - `'fitted'`: Sizes the sheet to fit its content.
|
|
71
|
+
* - `'form'`: A compact, centered form sheet.
|
|
72
|
+
* - `'page'`: A larger page sheet.
|
|
73
|
+
*
|
|
74
|
+
* @remarks Sizing mainly affects the regular size class (iPad); in a compact size class (iPhone)
|
|
75
|
+
* sheets remain edge-attached and detents drive the height.
|
|
76
|
+
*/
|
|
77
|
+
export type PresentationSizingType = 'automatic' | 'fitted' | 'form' | 'page';
|
|
78
|
+
/**
|
|
79
|
+
* Sets the sizing of a sheet presentation.
|
|
80
|
+
* @param sizing - The sizing behavior to apply.
|
|
81
|
+
* @platform ios 18.0+
|
|
82
|
+
* @platform tvos 18.0+
|
|
83
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/presentationsizing(_:)).
|
|
84
|
+
*/
|
|
85
|
+
export declare const presentationSizing: (sizing: PresentationSizingType) => ModifierConfig;
|
|
67
86
|
//# sourceMappingURL=presentationModifiers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentationModifiers.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/modifiers/presentationModifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAC9B,SAAS,kBAAkB,EAAE,EAC7B,UAAU;IACR,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC1D,KACA,cAeF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,YAAY,WAAW,GAAG,SAAS,GAAG,QAAQ,mBAC3B,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,WAAW,GACX,SAAS,GACT,UAAU,GACV;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,GAC5C,aAAa,qCAAqC,mBASnD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,mBACC,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,aAAY,OAAc,mBACP,CAAC"}
|
|
1
|
+
{"version":3,"file":"presentationModifiers.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/modifiers/presentationModifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAC9B,SAAS,kBAAkB,EAAE,EAC7B,UAAU;IACR,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC1D,KACA,cAeF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,YAAY,WAAW,GAAG,SAAS,GAAG,QAAQ,mBAC3B,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,WAAW,GACX,SAAS,GACT,UAAU,GACV;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,GAC5C,aAAa,qCAAqC,mBASnD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,mBACC,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,aAAY,OAAc,mBACP,CAAC;AAE/D;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,sBAAsB,mBACf,CAAC"}
|
|
@@ -48,7 +48,7 @@ export interface UniversalHostProps extends ViewProps {
|
|
|
48
48
|
*/
|
|
49
49
|
layoutDirection?: 'leftToRight' | 'rightToLeft';
|
|
50
50
|
/**
|
|
51
|
-
* Controls which safe area regions the hosting view should ignore.
|
|
51
|
+
* Controls which safe area regions the hosting view should ignore.
|
|
52
52
|
* - `'all'`- ignores all safe area insets.
|
|
53
53
|
* - `'keyboard'` - ignores only the keyboard safe area.
|
|
54
54
|
*
|
package/expo-module.config.json
CHANGED
|
@@ -68,11 +68,19 @@ struct BottomSheetView: ExpoSwiftUI.View {
|
|
|
68
68
|
childrenSize = size
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
@ViewBuilder
|
|
72
|
+
private func contentChildren() -> some View {
|
|
73
|
+
ForEach(props.children?.withoutSlot("anchor") ?? [], id: \.id) { child in
|
|
74
|
+
let view: any View = child.childView
|
|
75
|
+
AnyView(view)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
71
79
|
@ViewBuilder
|
|
72
80
|
private var sheetContent: some View {
|
|
73
81
|
if props.fitToContents {
|
|
74
82
|
let content = BottomSheetSizeReader(
|
|
75
|
-
content:
|
|
83
|
+
content: contentChildren(),
|
|
76
84
|
onSizeChange: handleSizeChange
|
|
77
85
|
)
|
|
78
86
|
if #available(iOS 16.0, tvOS 16.0, *) {
|
|
@@ -81,12 +89,21 @@ struct BottomSheetView: ExpoSwiftUI.View {
|
|
|
81
89
|
content
|
|
82
90
|
}
|
|
83
91
|
} else {
|
|
84
|
-
|
|
92
|
+
contentChildren()
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@ViewBuilder
|
|
97
|
+
private var anchor: some View {
|
|
98
|
+
if let anchorView = props.children?.slot("anchor") {
|
|
99
|
+
anchorView
|
|
100
|
+
} else {
|
|
101
|
+
Color.clear.frame(width: 0, height: 0)
|
|
85
102
|
}
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
var body: some View {
|
|
89
|
-
|
|
106
|
+
anchor
|
|
90
107
|
.sheet(isPresented: $isPresented, onDismiss: {
|
|
91
108
|
props.onDismiss()
|
|
92
109
|
}) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesCore
|
|
4
|
+
import SwiftUI
|
|
5
|
+
|
|
6
|
+
internal enum MenuOrderType: String, Enumerable {
|
|
7
|
+
case automatic
|
|
8
|
+
case fixed
|
|
9
|
+
case priority
|
|
10
|
+
|
|
11
|
+
func toNativeMenuOrder() -> SwiftUI.MenuOrder {
|
|
12
|
+
switch self {
|
|
13
|
+
case .automatic:
|
|
14
|
+
return .automatic
|
|
15
|
+
case .fixed:
|
|
16
|
+
return .fixed
|
|
17
|
+
case .priority:
|
|
18
|
+
// `.priority` is unavailable on tvOS; fall back to the platform default there.
|
|
19
|
+
#if os(tvOS)
|
|
20
|
+
return .automatic
|
|
21
|
+
#else
|
|
22
|
+
return .priority
|
|
23
|
+
#endif
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
internal struct MenuOrderModifier: ViewModifier, Record {
|
|
29
|
+
@Field var order: MenuOrderType = .automatic
|
|
30
|
+
|
|
31
|
+
func body(content: Content) -> some View {
|
|
32
|
+
content.menuOrder(order.toNativeMenuOrder())
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -217,4 +217,34 @@ internal struct PresentationBackgroundModifier: ViewModifier, Record {
|
|
|
217
217
|
content
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// MARK: - Presentation Sizing
|
|
223
|
+
|
|
224
|
+
internal enum PresentationSizingOption: String, Enumerable {
|
|
225
|
+
case automatic
|
|
226
|
+
case fitted
|
|
227
|
+
case form
|
|
228
|
+
case page
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
internal struct PresentationSizingModifier: ViewModifier, Record {
|
|
232
|
+
@Field var sizing: PresentationSizingOption = .automatic
|
|
233
|
+
|
|
234
|
+
func body(content: Content) -> some View {
|
|
235
|
+
if #available(iOS 18.0, tvOS 18.0, macOS 15.0, *) {
|
|
236
|
+
switch sizing {
|
|
237
|
+
case .automatic:
|
|
238
|
+
content.presentationSizing(.automatic)
|
|
239
|
+
case .fitted:
|
|
240
|
+
content.presentationSizing(.fitted)
|
|
241
|
+
case .form:
|
|
242
|
+
content.presentationSizing(.form)
|
|
243
|
+
case .page:
|
|
244
|
+
content.presentationSizing(.page)
|
|
245
|
+
}
|
|
246
|
+
} else {
|
|
247
|
+
content
|
|
248
|
+
}
|
|
249
|
+
}
|
|
220
250
|
}
|
|
@@ -2068,6 +2068,10 @@ extension ViewModifierRegistry {
|
|
|
2068
2068
|
return try PickerStyleModifier(from: params, appContext: appContext)
|
|
2069
2069
|
}
|
|
2070
2070
|
|
|
2071
|
+
register("menuOrder") { params, appContext, _ in
|
|
2072
|
+
return try MenuOrderModifier(from: params, appContext: appContext)
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2071
2075
|
register("submitLabel") { params, appContext, _ in
|
|
2072
2076
|
return try SubmitLabelModifier(from: params, appContext: appContext)
|
|
2073
2077
|
}
|
|
@@ -2136,6 +2140,10 @@ extension ViewModifierRegistry {
|
|
|
2136
2140
|
return try PresentationBackgroundModifier(from: params, appContext: appContext)
|
|
2137
2141
|
}
|
|
2138
2142
|
|
|
2143
|
+
register("presentationSizing") { params, appContext, _ in
|
|
2144
|
+
return try PresentationSizingModifier(from: params, appContext: appContext)
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2139
2147
|
register("listStyle") { params, appContext, _ in
|
|
2140
2148
|
return try ListStyleModifier(from: params, appContext: appContext)
|
|
2141
2149
|
}
|
package/ios/TextFieldView.swift
CHANGED
|
@@ -219,16 +219,10 @@ private struct StatefulSelectableTextField: View {
|
|
|
219
219
|
)
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
if #available(iOS 26.0, macOS 26.0, tvOS 26.0, *) {
|
|
224
|
-
return $localSelection
|
|
225
|
-
}
|
|
226
|
-
return clampedSelectionBinding
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// iOS 18 SwiftUI can throw an out-of-bounds exception when selection becomes invalid after text is changed programmatically.
|
|
222
|
+
// SwiftUI can throw an out-of-bounds exception when selection becomes invalid after text is changed programmatically.
|
|
230
223
|
// Resetting to nil avoids passing SwiftUI the stale selection.
|
|
231
224
|
// https://github.com/expo/expo/issues/47434
|
|
225
|
+
// https://github.com/expo/expo/issues/48274
|
|
232
226
|
// https://github.com/swiftlang/swift/issues/82359#issuecomment-3038538035
|
|
233
227
|
private var clampedSelectionBinding: Binding<SwiftUI.TextSelection?> {
|
|
234
228
|
Binding(
|
|
@@ -251,7 +245,7 @@ private struct StatefulSelectableTextField: View {
|
|
|
251
245
|
TextField(
|
|
252
246
|
promptText == nil ? props.placeholder : "",
|
|
253
247
|
text: textBinding,
|
|
254
|
-
selection:
|
|
248
|
+
selection: clampedSelectionBinding,
|
|
255
249
|
prompt: promptText,
|
|
256
250
|
axis: swiftUIAxis
|
|
257
251
|
)
|
|
@@ -278,7 +272,11 @@ private struct StatefulSelectableTextField: View {
|
|
|
278
272
|
props.onSelectionChange(["start": start, "end": end])
|
|
279
273
|
}
|
|
280
274
|
.onChange(of: state.value as? String) { newValue in
|
|
281
|
-
guard userMutatingState else {
|
|
275
|
+
guard userMutatingState else {
|
|
276
|
+
// The text was replaced from JS; drop the selection so indices built for the old string are never validated against the new one.
|
|
277
|
+
localSelection = nil
|
|
278
|
+
return
|
|
279
|
+
}
|
|
282
280
|
if let max = props.maxLength, let str = newValue, str.count > max {
|
|
283
281
|
state.value = String(str.prefix(max))
|
|
284
282
|
return
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
861e2a9fc90c0f77fb3e0c4b1e733bda
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ab9529856e2d9014c4500bd026ef87271d46390e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
daa8952f564fc49bf1e8248beaa2f2bc5f305c02f01f9ea9f9209323034d7cdf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6773d96e9e4bc26584cb012c44b9e9f6afd9d4d099aa7c93eb35a2089a77b71155a671302db4a9f9d97267c310ad266476d2bbb04ce77cc4fa36f7b3e262e696
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ab9cf6f1056ef11c7f23e20f8a1f38aa
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d63d7f4aa7c5df81e966172abaf9880fc983cd76
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f078db5a7dc16e8022341819e24ca008117ae92d0268b557589bf67f646634aa
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6390e63cf59083e00fc8de86393ccb3ebadf501a93eb07664f0dba7d1658cdc75d0c0bd14713315ba477631c3933470719c62e073ce986a507ab122da0099e91
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "57.0.
|
|
6
|
+
"version": "57.0.8",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.ui-57.0.
|
|
28
|
-
"url": "expo.modules.ui-57.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-57.0.8.aar",
|
|
28
|
+
"url": "expo.modules.ui-57.0.8.aar",
|
|
29
|
+
"size": 1944802,
|
|
30
|
+
"sha512": "6390e63cf59083e00fc8de86393ccb3ebadf501a93eb07664f0dba7d1658cdc75d0c0bd14713315ba477631c3933470719c62e073ce986a507ab122da0099e91",
|
|
31
|
+
"sha256": "f078db5a7dc16e8022341819e24ca008117ae92d0268b557589bf67f646634aa",
|
|
32
|
+
"sha1": "d63d7f4aa7c5df81e966172abaf9880fc983cd76",
|
|
33
|
+
"md5": "ab9cf6f1056ef11c7f23e20f8a1f38aa"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
],
|
|
142
142
|
"files": [
|
|
143
143
|
{
|
|
144
|
-
"name": "expo.modules.ui-57.0.
|
|
145
|
-
"url": "expo.modules.ui-57.0.
|
|
146
|
-
"size":
|
|
147
|
-
"sha512": "
|
|
148
|
-
"sha256": "
|
|
149
|
-
"sha1": "
|
|
150
|
-
"md5": "
|
|
144
|
+
"name": "expo.modules.ui-57.0.8.aar",
|
|
145
|
+
"url": "expo.modules.ui-57.0.8.aar",
|
|
146
|
+
"size": 1944802,
|
|
147
|
+
"sha512": "6390e63cf59083e00fc8de86393ccb3ebadf501a93eb07664f0dba7d1658cdc75d0c0bd14713315ba477631c3933470719c62e073ce986a507ab122da0099e91",
|
|
148
|
+
"sha256": "f078db5a7dc16e8022341819e24ca008117ae92d0268b557589bf67f646634aa",
|
|
149
|
+
"sha1": "d63d7f4aa7c5df81e966172abaf9880fc983cd76",
|
|
150
|
+
"md5": "ab9cf6f1056ef11c7f23e20f8a1f38aa"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
@@ -161,13 +161,13 @@
|
|
|
161
161
|
},
|
|
162
162
|
"files": [
|
|
163
163
|
{
|
|
164
|
-
"name": "expo.modules.ui-57.0.
|
|
165
|
-
"url": "expo.modules.ui-57.0.
|
|
166
|
-
"size":
|
|
167
|
-
"sha512": "
|
|
168
|
-
"sha256": "
|
|
169
|
-
"sha1": "
|
|
170
|
-
"md5": "
|
|
164
|
+
"name": "expo.modules.ui-57.0.8-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-57.0.8-sources.jar",
|
|
166
|
+
"size": 95127,
|
|
167
|
+
"sha512": "6773d96e9e4bc26584cb012c44b9e9f6afd9d4d099aa7c93eb35a2089a77b71155a671302db4a9f9d97267c310ad266476d2bbb04ce77cc4fa36f7b3e262e696",
|
|
168
|
+
"sha256": "daa8952f564fc49bf1e8248beaa2f2bc5f305c02f01f9ea9f9209323034d7cdf",
|
|
169
|
+
"sha1": "ab9529856e2d9014c4500bd026ef87271d46390e",
|
|
170
|
+
"md5": "861e2a9fc90c0f77fb3e0c4b1e733bda"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cfd3389ed526bcc65584db6da158086e
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dac18ac772c3baa0c69629073f190af4ba016138
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fb7f4c399d8cbdc8a2f731c9aaa8f19890e79ddd78a785fb4707d1529ba1568b
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.module.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
66e4e68ad815f14ed5f5c4424aeca37f4aec5c41dc7a762712aca79af02c829fde28a0d8e323baced22094ec5e8cbcc999777eabc3dbcf8a9896e7482109e9c6
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.ui</groupId>
|
|
11
11
|
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>57.0.
|
|
12
|
+
<version>57.0.8</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bbd73fcda6fac6f3312359d8a06d3f44
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a2124d4f1776cfabe4cd30ae4be3d89f3af1cd1d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3c34c5ad65040d2c1f1a1405834a615fde19dd3acf97d690c20fa6af9ba593a2
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.8/expo.modules.ui-57.0.8.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
818bd654ddc94e1c19b1b92b9f9cb7fc809154e35ed224f973515065c63f699d1ee98dd71542a03cd5bb2c4c6f39a1e8d4a4e9e52321eb1ab8baf119a4ed70da
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>57.0.
|
|
7
|
-
<release>57.0.
|
|
6
|
+
<latest>57.0.8</latest>
|
|
7
|
+
<release>57.0.8</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.8</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260729192357</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8abdbdb7fb8c864d8b9cb1bdb34c4d99
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
52a88ddd19a3ee6d6e54d34442f58a731ca59a67
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
12eb6a1960ed41b884de04241900cc123204aea87a5dc08be31623316cec600f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
980a7b01fc99974f568c0e18c0fe130168925afc54ccffb0a8428ccce7035c98204c98a3ad6f6f407f711b312e7adc0f61ee1614ab6e2858f0608706d73aa9f1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.8",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"@types/babel__core": "^7.20.5",
|
|
95
95
|
"@types/node": "^22.14.0",
|
|
96
96
|
"@types/react": "~19.2.0",
|
|
97
|
-
"react-native-reanimated": "4.5.
|
|
98
|
-
"react-native-worklets": "0.10.
|
|
99
|
-
"expo
|
|
100
|
-
"expo": "
|
|
97
|
+
"react-native-reanimated": "4.5.1",
|
|
98
|
+
"react-native-worklets": "0.10.1",
|
|
99
|
+
"expo": "57.0.9",
|
|
100
|
+
"expo-module-scripts": "56.0.3"
|
|
101
101
|
},
|
|
102
102
|
"jest": {
|
|
103
103
|
"preset": "expo-module-scripts"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"optional": true
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "ff6a677893d78b02c3adf63f67ba159b926395b0",
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "expo-module build",
|
|
127
127
|
"clean": "expo-module clean",
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
presentationBackground,
|
|
17
17
|
presentationDetents,
|
|
18
18
|
presentationDragIndicator,
|
|
19
|
+
presentationSizing,
|
|
19
20
|
} from '../../swift-ui/modifiers/presentationModifiers';
|
|
20
21
|
|
|
21
22
|
export { useBottomSheet } from './context';
|
|
@@ -207,7 +208,8 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
207
208
|
const bg = extractBackgroundColor(backgroundStyle);
|
|
208
209
|
return [
|
|
209
210
|
...(fitToContents
|
|
210
|
-
?
|
|
211
|
+
? // Makes the iPad sheet size to that content instead of opening near full height.
|
|
212
|
+
[presentationSizing('fitted')]
|
|
211
213
|
: [
|
|
212
214
|
presentationDetents(detents, {
|
|
213
215
|
selection: selectedDetent,
|
|
@@ -16,7 +16,7 @@ export function MaskedView(props: MaskedViewProps) {
|
|
|
16
16
|
// and transforms because the inner views inherit layout from `absoluteFill`.
|
|
17
17
|
return (
|
|
18
18
|
<View {...viewProps} style={style}>
|
|
19
|
-
<Host style={StyleSheet.absoluteFill}>
|
|
19
|
+
<Host style={StyleSheet.absoluteFill} ignoreSafeArea="all">
|
|
20
20
|
<Mask alignment="topLeading">
|
|
21
21
|
<RNHostView>
|
|
22
22
|
<View style={StyleSheet.absoluteFill}>{children}</View>
|
|
@@ -155,6 +155,7 @@ export function MenuView(props: MenuComponentProps & { ref?: React.Ref<MenuCompo
|
|
|
155
155
|
const {
|
|
156
156
|
ref,
|
|
157
157
|
actions,
|
|
158
|
+
colorScheme,
|
|
158
159
|
onPressAction,
|
|
159
160
|
onOpenMenu,
|
|
160
161
|
onCloseMenu,
|
|
@@ -189,7 +190,7 @@ export function MenuView(props: MenuComponentProps & { ref?: React.Ref<MenuCompo
|
|
|
189
190
|
|
|
190
191
|
return (
|
|
191
192
|
<View style={style} testID={testID}>
|
|
192
|
-
<Host matchContents>
|
|
193
|
+
<Host colorScheme={colorScheme} matchContents>
|
|
193
194
|
<DropdownMenu expanded={expanded} onDismissRequest={dismissAll}>
|
|
194
195
|
<DropdownMenu.Trigger>
|
|
195
196
|
<RNHostView matchContents>
|
|
@@ -8,11 +8,7 @@ import { Menu } from '../../swift-ui/Menu';
|
|
|
8
8
|
import { RNHostView } from '../../swift-ui/RNHostView';
|
|
9
9
|
import { Section } from '../../swift-ui/Section';
|
|
10
10
|
import { Toggle } from '../../swift-ui/Toggle';
|
|
11
|
-
import {
|
|
12
|
-
disabled as disabledModifier,
|
|
13
|
-
foregroundColor as foregroundColorModifier,
|
|
14
|
-
tint as tintModifier,
|
|
15
|
-
} from '../../swift-ui/modifiers';
|
|
11
|
+
import { disabled as disabledModifier, tint as tintModifier } from '../../swift-ui/modifiers';
|
|
16
12
|
import type { ModifierConfig } from '../../types';
|
|
17
13
|
|
|
18
14
|
function actionId(action: MenuAction): string {
|
|
@@ -34,8 +30,8 @@ function renderAction(
|
|
|
34
30
|
const { subactions, displayInline, state, attributes, image, imageColor, title } = action;
|
|
35
31
|
const key = actionId(action);
|
|
36
32
|
const systemImage = typeof image === 'string' ? image : undefined;
|
|
37
|
-
// `tint` is what SwiftUI's `Menu
|
|
38
|
-
//
|
|
33
|
+
// `tint` is what SwiftUI's system `Menu` honors for an item's leading SF
|
|
34
|
+
// Symbol, for both `Toggle` and `Button` items.
|
|
39
35
|
const tintMod = imageColor ? tintModifier(imageColor) : null;
|
|
40
36
|
|
|
41
37
|
if (subactions && subactions.length > 0) {
|
|
@@ -49,7 +45,7 @@ function renderAction(
|
|
|
49
45
|
}
|
|
50
46
|
// SwiftUI's system menu UI ignores per-item color modifiers on submenu
|
|
51
47
|
// headers, so we don't forward `imageColor` here. Leaf `Button`s below
|
|
52
|
-
// tint via
|
|
48
|
+
// tint via `.tint`, which does take effect.
|
|
53
49
|
return (
|
|
54
50
|
<Menu key={key} label={title} systemImage={systemImage}>
|
|
55
51
|
{children}
|
|
@@ -76,11 +72,13 @@ function renderAction(
|
|
|
76
72
|
);
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
// Tint the leaf `Button`'s leading SF Symbol via `.tint`, the same modifier
|
|
76
|
+
// the `Toggle` branch above uses. `.foregroundColor` is not applied by the
|
|
77
|
+
// iOS system menu to a menu button's content, so it left action-item icons
|
|
78
|
+
// untinted. Skip when the role is destructive so SwiftUI's red tint remains
|
|
79
|
+
// in effect.
|
|
80
|
+
if (tintMod && !attributes?.destructive) {
|
|
81
|
+
modifiers.push(tintMod);
|
|
84
82
|
}
|
|
85
83
|
|
|
86
84
|
return (
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
ColorSchemeName,
|
|
4
|
+
ColorValue,
|
|
5
|
+
ImageSourcePropType,
|
|
6
|
+
StyleProp,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
3
9
|
import type { SFSymbol } from 'sf-symbols-typescript';
|
|
4
10
|
|
|
5
11
|
/**
|
|
@@ -119,6 +125,11 @@ export type NativeActionEvent = {
|
|
|
119
125
|
* Drop-in compatible with `@react-native-menu/menu`.
|
|
120
126
|
*/
|
|
121
127
|
export interface MenuComponentProps {
|
|
128
|
+
/**
|
|
129
|
+
* The color scheme of the menu on Android. Omit to follow the device setting.
|
|
130
|
+
* @platform android
|
|
131
|
+
*/
|
|
132
|
+
colorScheme?: ColorSchemeName;
|
|
122
133
|
/**
|
|
123
134
|
* Menu title shown at the top of the menu.
|
|
124
135
|
* @platform ios
|
|
@@ -213,7 +213,7 @@ export function PagerView(props: PagerViewProps) {
|
|
|
213
213
|
];
|
|
214
214
|
|
|
215
215
|
return (
|
|
216
|
-
<Host style={style ?? { flex: 1 }} ignoreSafeArea="
|
|
216
|
+
<Host style={style ?? { flex: 1 }} ignoreSafeArea="container" {...passthrough}>
|
|
217
217
|
<ScrollView axes="horizontal" showsIndicators={false} modifiers={modifiers}>
|
|
218
218
|
<LazyHStack spacing={0} modifiers={[scrollTargetLayout()]}>
|
|
219
219
|
{pages}
|
|
@@ -24,14 +24,14 @@ export interface RNHostProps extends PrimitiveBaseProps {
|
|
|
24
24
|
modifiers?: ModifierConfig[];
|
|
25
25
|
/**
|
|
26
26
|
* Style applied to the host view's React Native shadow node. Useful for
|
|
27
|
-
* controlling its layout position (e.g. `position: 'absolute'`)
|
|
28
|
-
* layout matches where the hosting Compose component draws the content —
|
|
29
|
-
* important for `measure()`-based hit-testing such as `Pressable`.
|
|
27
|
+
* controlling its layout position (e.g. `position: 'absolute'`).
|
|
30
28
|
*/
|
|
31
29
|
style?: StyleProp<ViewStyle>;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
|
-
type NativeRNHostProps = RNHostProps
|
|
32
|
+
type NativeRNHostProps = RNHostProps & {
|
|
33
|
+
layoutRoot: boolean;
|
|
34
|
+
};
|
|
35
35
|
const NativeRNHostView: ComponentType<NativeRNHostProps> = requireNativeView(
|
|
36
36
|
'ExpoUI',
|
|
37
37
|
'RNHostView'
|
|
@@ -43,6 +43,9 @@ function transformProps(props: RNHostProps): NativeRNHostProps {
|
|
|
43
43
|
modifiers,
|
|
44
44
|
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
45
45
|
...restProps,
|
|
46
|
+
// Touches on hosted content are dispatched relative to the host, so `measure()` must report
|
|
47
|
+
// the same coordinate space; otherwise `Pressable` cancels the press on any finger movement.
|
|
48
|
+
layoutRoot: true,
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
51
|
|