@expo/ui 57.0.22 → 57.0.23
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 +18 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +35 -2
- package/android/src/main/java/expo/modules/ui/DateRangePickerView.kt +35 -2
- package/android/src/main/java/expo/modules/ui/HostView.kt +21 -0
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +2 -2
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +124 -17
- package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
- package/build/community/datetime-picker/DateTimePicker.android.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +38 -0
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/RNHostView/index.d.ts +6 -1
- package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
- package/build/swift-ui/Chart/index.d.ts +10 -0
- package/build/swift-ui/Chart/index.d.ts.map +1 -1
- package/build/swift-ui/RNHostView.d.ts +7 -2
- package/build/swift-ui/RNHostView.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/presentationModifiers.d.ts +17 -1
- package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
- package/build/swift-ui/modifiers/searchable.d.ts +84 -0
- package/build/swift-ui/modifiers/searchable.d.ts.map +1 -0
- package/build/universal/RNHostView/index.d.ts.map +1 -1
- package/build/universal/RNHostView/types.d.ts +9 -4
- package/build/universal/RNHostView/types.d.ts.map +1 -1
- package/build/utils/matchContents.d.ts +11 -0
- package/build/utils/matchContents.d.ts.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/ChartView.swift +15 -10
- package/ios/Modifiers/PresentationModifiers.swift +20 -4
- package/ios/Modifiers/SearchToolbarBehaviorModifier.swift +35 -0
- package/ios/Modifiers/SearchableModifier.swift +94 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +8 -0
- package/ios/Picker/PickerView.swift +9 -7
- package/ios/RNHostView.swift +55 -9
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.22/expo.modules.ui-57.0.22-sources.jar → 57.0.23/expo.modules.ui-57.0.23-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.22/expo.modules.ui-57.0.22.module → 57.0.23/expo.modules.ui-57.0.23.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.22/expo.modules.ui-57.0.22.pom → 57.0.23/expo.modules.ui-57.0.23.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.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 +3 -3
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +7 -6
- package/src/community/datetime-picker/DateTimePicker.android.tsx +4 -0
- package/src/jetpack-compose/DatePicker/index.tsx +38 -0
- package/src/jetpack-compose/RNHostView/index.tsx +17 -6
- package/src/swift-ui/Chart/index.tsx +10 -0
- package/src/swift-ui/RNHostView.tsx +11 -4
- package/src/swift-ui/modifiers/index.ts +1 -0
- package/src/swift-ui/modifiers/presentationModifiers.ts +18 -2
- package/src/swift-ui/modifiers/searchable.ts +107 -0
- package/src/universal/RNHostView/index.tsx +9 -4
- package/src/universal/RNHostView/types.ts +6 -4
- package/src/utils/matchContents.ts +14 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.22/expo.modules.ui-57.0.22.pom.sha512 +0 -1
package/ios/RNHostView.swift
CHANGED
|
@@ -4,7 +4,8 @@ import SwiftUI
|
|
|
4
4
|
import ExpoModulesCore
|
|
5
5
|
|
|
6
6
|
internal final class RNHostViewProps: ExpoSwiftUI.ViewProps {
|
|
7
|
-
@Field var
|
|
7
|
+
@Field var matchContentsHorizontal: Bool = false
|
|
8
|
+
@Field var matchContentsVertical: Bool = false
|
|
8
9
|
/**
|
|
9
10
|
Adds LeafNode and MeasurableYogaNode trait in Shadow node
|
|
10
11
|
*/
|
|
@@ -50,8 +51,13 @@ struct RNHostView: ExpoSwiftUI.View {
|
|
|
50
51
|
|
|
51
52
|
@ViewBuilder
|
|
52
53
|
private var hostedContent: some View {
|
|
53
|
-
if
|
|
54
|
-
ApplySizeFromYogaNode(
|
|
54
|
+
if matchesContents, let childUIView = firstChildUIView {
|
|
55
|
+
ApplySizeFromYogaNode(
|
|
56
|
+
childUIView: childUIView,
|
|
57
|
+
horizontal: props.matchContentsHorizontal,
|
|
58
|
+
vertical: props.matchContentsVertical,
|
|
59
|
+
shadowNodeProxy: props.shadowNodeProxy
|
|
60
|
+
) {
|
|
55
61
|
Children()
|
|
56
62
|
}
|
|
57
63
|
.onAppear {
|
|
@@ -62,7 +68,7 @@ struct RNHostView: ExpoSwiftUI.View {
|
|
|
62
68
|
.onDisappear {
|
|
63
69
|
touchHandler.detach()
|
|
64
70
|
}
|
|
65
|
-
} else if
|
|
71
|
+
} else if matchesContents {
|
|
66
72
|
// No hosted UIView (a pure SwiftUI child, e.g. Text/Image). Render it at its
|
|
67
73
|
// natural size instead of falling into the fill branch below, which would
|
|
68
74
|
// stretch a self-sizing SwiftUI view to fill its container.
|
|
@@ -87,6 +93,10 @@ struct RNHostView: ExpoSwiftUI.View {
|
|
|
87
93
|
}
|
|
88
94
|
}
|
|
89
95
|
|
|
96
|
+
private var matchesContents: Bool {
|
|
97
|
+
props.matchContentsHorizontal || props.matchContentsVertical
|
|
98
|
+
}
|
|
99
|
+
|
|
90
100
|
private var firstChildUIView: UIView? {
|
|
91
101
|
props.children?.first?.uiView
|
|
92
102
|
}
|
|
@@ -143,20 +153,52 @@ private final class RNHostTouchHandler: ObservableObject {
|
|
|
143
153
|
}
|
|
144
154
|
}
|
|
145
155
|
|
|
146
|
-
// Sets SwiftUI view size from Yoga node size
|
|
156
|
+
// Sets SwiftUI view size from Yoga node size on the matched axes
|
|
147
157
|
// Listens to Yoga node size changes and updates the SwiftUI view size
|
|
158
|
+
// An axis that is not matched fills the parent and reports its size to the Yoga node instead
|
|
148
159
|
private struct ApplySizeFromYogaNode<Content: SwiftUI.View>: SwiftUI.View {
|
|
149
160
|
@StateObject private var observer: Observer
|
|
161
|
+
let horizontal: Bool
|
|
162
|
+
let vertical: Bool
|
|
163
|
+
let shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
150
164
|
let content: Content
|
|
151
165
|
|
|
152
|
-
init(
|
|
166
|
+
init(
|
|
167
|
+
childUIView: UIView,
|
|
168
|
+
horizontal: Bool,
|
|
169
|
+
vertical: Bool,
|
|
170
|
+
shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy,
|
|
171
|
+
@ViewBuilder content: () -> Content
|
|
172
|
+
) {
|
|
153
173
|
_observer = StateObject(wrappedValue: Observer(view: childUIView))
|
|
174
|
+
self.horizontal = horizontal
|
|
175
|
+
self.vertical = vertical
|
|
176
|
+
self.shadowNodeProxy = shadowNodeProxy
|
|
154
177
|
self.content = content()
|
|
155
178
|
}
|
|
156
179
|
|
|
157
180
|
var body: some SwiftUI.View {
|
|
158
|
-
|
|
159
|
-
|
|
181
|
+
if horizontal && vertical {
|
|
182
|
+
content
|
|
183
|
+
.frame(width: observer.size.width, height: observer.size.height)
|
|
184
|
+
} else {
|
|
185
|
+
content
|
|
186
|
+
.frame(
|
|
187
|
+
width: horizontal ? observer.size.width : nil,
|
|
188
|
+
height: vertical ? observer.size.height : nil
|
|
189
|
+
)
|
|
190
|
+
.frame(
|
|
191
|
+
maxWidth: horizontal ? nil : .infinity,
|
|
192
|
+
maxHeight: vertical ? nil : .infinity
|
|
193
|
+
)
|
|
194
|
+
.modifier(
|
|
195
|
+
ReportSizeToYogaNodeModifier(
|
|
196
|
+
shadowNodeProxy: shadowNodeProxy,
|
|
197
|
+
reportWidth: !horizontal,
|
|
198
|
+
reportHeight: !vertical
|
|
199
|
+
)
|
|
200
|
+
)
|
|
201
|
+
}
|
|
160
202
|
}
|
|
161
203
|
|
|
162
204
|
@MainActor
|
|
@@ -183,9 +225,13 @@ private struct ApplySizeFromYogaNode<Content: SwiftUI.View>: SwiftUI.View {
|
|
|
183
225
|
// Listens to SwiftUI view size changes and updates the Yoga node size
|
|
184
226
|
private struct ReportSizeToYogaNodeModifier: ViewModifier {
|
|
185
227
|
let shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
228
|
+
var reportWidth = true
|
|
229
|
+
var reportHeight = true
|
|
186
230
|
|
|
187
231
|
private func handleSizeChange(_ size: CGSize) {
|
|
188
|
-
shadowNodeProxy.setViewSize?(
|
|
232
|
+
shadowNodeProxy.setViewSize?(
|
|
233
|
+
CGSize(width: reportWidth ? size.width : .nan, height: reportHeight ? size.height : .nan)
|
|
234
|
+
)
|
|
189
235
|
}
|
|
190
236
|
|
|
191
237
|
func body(content: Content) -> some View {
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9e119ee5a1c2c38e6d69d4f866341e7a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
04332c3498b6b2a56dfb4cbefe592c11f4a8f36a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5f4063182b296fa0028d945a2621f9d8a86eb5219b0ad88492a18dfe4d737978
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0a89146da34d837d01eb682540df3405b70f6b1d18c50bedc2ecc1d0dee3188df777de03a5b629100950a0f6d3c2d9f89f52416641cb22d8f3a715c8e841ff18
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
53230bb5c7cc2bcc0d717bc544974f6c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bc99884c9e5f484800ffb10156cc8b50fa4d31c8
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
45594b39ac8f0c6eb37b663d40160b8e93b6d5f56b985a739c8a03c6780d910f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7ba6b0ca0e41c0aeaea90cfc7d49664bb88531a251ba79b1124009eba0b724b48ba1c306744111a40871213cdf5767638b931803dc2229c4ba1850b6cc87ca15
|
|
@@ -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.23",
|
|
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.23.aar",
|
|
28
|
+
"url": "expo.modules.ui-57.0.23.aar",
|
|
29
|
+
"size": 2087870,
|
|
30
|
+
"sha512": "7ba6b0ca0e41c0aeaea90cfc7d49664bb88531a251ba79b1124009eba0b724b48ba1c306744111a40871213cdf5767638b931803dc2229c4ba1850b6cc87ca15",
|
|
31
|
+
"sha256": "45594b39ac8f0c6eb37b663d40160b8e93b6d5f56b985a739c8a03c6780d910f",
|
|
32
|
+
"sha1": "bc99884c9e5f484800ffb10156cc8b50fa4d31c8",
|
|
33
|
+
"md5": "53230bb5c7cc2bcc0d717bc544974f6c"
|
|
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.23.aar",
|
|
145
|
+
"url": "expo.modules.ui-57.0.23.aar",
|
|
146
|
+
"size": 2087870,
|
|
147
|
+
"sha512": "7ba6b0ca0e41c0aeaea90cfc7d49664bb88531a251ba79b1124009eba0b724b48ba1c306744111a40871213cdf5767638b931803dc2229c4ba1850b6cc87ca15",
|
|
148
|
+
"sha256": "45594b39ac8f0c6eb37b663d40160b8e93b6d5f56b985a739c8a03c6780d910f",
|
|
149
|
+
"sha1": "bc99884c9e5f484800ffb10156cc8b50fa4d31c8",
|
|
150
|
+
"md5": "53230bb5c7cc2bcc0d717bc544974f6c"
|
|
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.23-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-57.0.23-sources.jar",
|
|
166
|
+
"size": 107457,
|
|
167
|
+
"sha512": "0a89146da34d837d01eb682540df3405b70f6b1d18c50bedc2ecc1d0dee3188df777de03a5b629100950a0f6d3c2d9f89f52416641cb22d8f3a715c8e841ff18",
|
|
168
|
+
"sha256": "5f4063182b296fa0028d945a2621f9d8a86eb5219b0ad88492a18dfe4d737978",
|
|
169
|
+
"sha1": "04332c3498b6b2a56dfb4cbefe592c11f4a8f36a",
|
|
170
|
+
"md5": "9e119ee5a1c2c38e6d69d4f866341e7a"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b3a06b094eae6f84e73699ac32760a44
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0f57bae59c7621092ebe1c14bfb8c87cc5b7273c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0b119d47d60446499106b77dc5f2c57ceec7eba851a407248935ad6e2ecc3539
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7f583d3b3219882068aec8344ed3dc1018dd834668efb13abb894a7f40383e29d5927b3831e05e6fdeb563cc88c4dfbc7755f2cd1c196f7f94944a7952e43b70
|
|
@@ -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.23</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.23/expo.modules.ui-57.0.23.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
39de5794b34d0288ebb94069326a5c68
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
62243ce65c64f455e89ce81503d756d2e527d796
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
44a4eede4dc8a4bded07f608acb42e408ce8f348f356b2da8c9d59e213cd7211
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.23/expo.modules.ui-57.0.23.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cf1da141b64a97372daa7bd1c5df1e9b385ad5fcc99a1bc61405fe63cbdee68ac487cfd7a034fb6a2b103e9be2559c3f8366cdbec67826b71ccb6718ff31ee4c
|
|
@@ -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.23</latest>
|
|
7
|
+
<release>57.0.23</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.23</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20261012142026</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24ee94a25190ebaeb53918c5209d4321
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
19abdc5ee5d92e4d98095aba33600fd7d66cdd9a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d5851aa26d95ed5105d695c05844f6188c86f45a8320f41d9e135463fa0294b0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5ed30451f94f10e9f83d081992d999c14cca93e46c5d37296d2634c82ae630e4c5cc264158a9de4df3db398c3afa42f99f9b4fb64d19f6c432d0919950274cbc
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.23",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@types/react": "~19.2.0",
|
|
97
97
|
"react-native-reanimated": "4.5.1",
|
|
98
98
|
"react-native-worklets": "0.10.1",
|
|
99
|
-
"expo": "57.0.
|
|
99
|
+
"expo": "57.0.28",
|
|
100
100
|
"expo-module-scripts": "56.0.3"
|
|
101
101
|
},
|
|
102
102
|
"jest": {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"optional": true
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "58da4edafcb043872c3ed9bf8f5957e6544d0a9c",
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "expo-module build",
|
|
127
127
|
"clean": "expo-module clean",
|
|
@@ -199,8 +199,9 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
199
199
|
const bg = extractBackgroundColor(backgroundStyle);
|
|
200
200
|
return [
|
|
201
201
|
...(fitToContents
|
|
202
|
-
? //
|
|
203
|
-
|
|
202
|
+
? // Fits the sheet height to the content (iPad opens near full height otherwise) and lets
|
|
203
|
+
// the system choose the width.
|
|
204
|
+
[presentationSizing('automatic', { fitted: { horizontal: false, vertical: true } })]
|
|
204
205
|
: [
|
|
205
206
|
presentationDetents(detents, {
|
|
206
207
|
selection: selectedDetent,
|
|
@@ -231,16 +232,16 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
231
232
|
onDismiss={fireCloseCallbacks}
|
|
232
233
|
fitToContents={fitToContents}>
|
|
233
234
|
<Group modifiers={modifiers}>
|
|
234
|
-
<RNHostView matchContents={fitToContents}>
|
|
235
|
+
<RNHostView matchContents={fitToContents ? { vertical: true } : false}>
|
|
235
236
|
{/* paddingTop compensates for tighter spacing between native drag indicator and content
|
|
236
237
|
compared to gorhom's handle. flexGrow:1 + height:0 (flex-basis 0) fills the snap-point
|
|
237
238
|
height without inheriting the scrollable child's intrinsic content height. With matchContents,
|
|
238
|
-
RNHostView
|
|
239
|
-
|
|
239
|
+
RNHostView takes the width from the sheet, which can be narrower than the window, and
|
|
240
|
+
the height from the content. */}
|
|
240
241
|
<View
|
|
241
242
|
style={
|
|
242
243
|
fitToContents
|
|
243
|
-
? {
|
|
244
|
+
? { paddingTop: handleComponent !== null ? 16 : 0 }
|
|
244
245
|
: { flexGrow: 1, height: 0, paddingTop: handleComponent !== null ? 16 : 0 }
|
|
245
246
|
}>
|
|
246
247
|
<SheetScrollContextReset>{children}</SheetScrollContextReset>
|
|
@@ -129,6 +129,10 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
129
129
|
color={accentColor}
|
|
130
130
|
onDateSelected={onDateSelected}
|
|
131
131
|
showVariantToggle={false}
|
|
132
|
+
// Match iOS, where the inline picker has no label: hide Material 3's "Select date" title
|
|
133
|
+
// and its selected-date headline.
|
|
134
|
+
showTitle={false}
|
|
135
|
+
showHeadline={false}
|
|
132
136
|
{...(testID ? { testID } : undefined)}
|
|
133
137
|
/>
|
|
134
138
|
</Host>
|
|
@@ -131,6 +131,20 @@ export interface DateTimePickerProps {
|
|
|
131
131
|
* @default true
|
|
132
132
|
*/
|
|
133
133
|
showVariantToggle?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Whether the picker shows its title, such as "Select date". When `false`, the picker passes
|
|
136
|
+
* `null` to Material 3's `title` slot. This prop has no effect when `displayedComponents` is
|
|
137
|
+
* `'hourAndMinute'`.
|
|
138
|
+
* @default true
|
|
139
|
+
*/
|
|
140
|
+
showTitle?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Whether the picker shows its headline, which displays the current selection. When `false`,
|
|
143
|
+
* the picker passes `null` to Material 3's `headline` slot. This prop has no effect when
|
|
144
|
+
* `displayedComponents` is `'hourAndMinute'`.
|
|
145
|
+
* @default true
|
|
146
|
+
*/
|
|
147
|
+
showHeadline?: boolean;
|
|
134
148
|
/**
|
|
135
149
|
* The components that the picker should display.
|
|
136
150
|
* On Android, you can have a picker that selects just the date or just the time.
|
|
@@ -252,6 +266,18 @@ export interface DateRangePickerProps {
|
|
|
252
266
|
* @default true
|
|
253
267
|
*/
|
|
254
268
|
showVariantToggle?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Whether the picker shows its title, such as "Select date". When `false`, the picker passes
|
|
271
|
+
* `null` to Material 3's `title` slot.
|
|
272
|
+
* @default true
|
|
273
|
+
*/
|
|
274
|
+
showTitle?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Whether the picker shows its headline, which displays the current selection. When `false`,
|
|
277
|
+
* the picker passes `null` to Material 3's `headline` slot.
|
|
278
|
+
* @default true
|
|
279
|
+
*/
|
|
280
|
+
showHeadline?: boolean;
|
|
255
281
|
/**
|
|
256
282
|
* The tint color to use on the picker elements.
|
|
257
283
|
*/
|
|
@@ -332,6 +358,18 @@ export interface DatePickerDialogProps {
|
|
|
332
358
|
initialDate?: string | null;
|
|
333
359
|
variant?: AndroidVariant;
|
|
334
360
|
showVariantToggle?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Whether the picker shows its title, such as "Select date". When `false`, the picker passes
|
|
363
|
+
* `null` to Material 3's `title` slot.
|
|
364
|
+
* @default true
|
|
365
|
+
*/
|
|
366
|
+
showTitle?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Whether the picker shows its headline, which displays the current selection. When `false`,
|
|
369
|
+
* the picker passes `null` to Material 3's `headline` slot.
|
|
370
|
+
* @default true
|
|
371
|
+
*/
|
|
372
|
+
showHeadline?: boolean;
|
|
335
373
|
confirmButtonLabel?: string;
|
|
336
374
|
dismissButtonLabel?: string;
|
|
337
375
|
color?: ColorValue;
|
|
@@ -4,6 +4,7 @@ import type { LayoutChangeEvent } from 'react-native';
|
|
|
4
4
|
|
|
5
5
|
import { PresentedContentContext, useIsPresentedInOwnWindow } from '../../PresentedContentContext';
|
|
6
6
|
import type { ModifierConfig } from '../../types';
|
|
7
|
+
import { resolveMatchContents } from '../../utils/matchContents';
|
|
7
8
|
import type { PrimitiveBaseProps } from '../layout';
|
|
8
9
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
9
10
|
|
|
@@ -11,10 +12,12 @@ export interface RNHostProps extends PrimitiveBaseProps {
|
|
|
11
12
|
/**
|
|
12
13
|
* When `true`, the RNHost will update its size in the Jetpack Compose view tree to match the children's size.
|
|
13
14
|
* When `false`, the RNHost will use the size of the parent Jetpack Compose View.
|
|
15
|
+
* Pass an object to choose per axis. For example, `{ vertical: true }` takes the width from the
|
|
16
|
+
* parent and the height from the children, so text wraps and grows vertically.
|
|
14
17
|
* Can be only set once on mount.
|
|
15
18
|
* @default false
|
|
16
19
|
*/
|
|
17
|
-
matchContents?: boolean;
|
|
20
|
+
matchContents?: boolean | { vertical?: boolean; horizontal?: boolean };
|
|
18
21
|
/**
|
|
19
22
|
* Called on mount and whenever this view's layout in the React Native view tree changes.
|
|
20
23
|
* With `matchContents`, the reported size is the one measured from the hosted view.
|
|
@@ -30,8 +33,10 @@ export interface RNHostProps extends PrimitiveBaseProps {
|
|
|
30
33
|
modifiers?: ModifierConfig[];
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
type NativeRNHostProps = RNHostProps & {
|
|
36
|
+
type NativeRNHostProps = Omit<RNHostProps, 'matchContents'> & {
|
|
34
37
|
layoutRoot: boolean;
|
|
38
|
+
matchContentsHorizontal: boolean;
|
|
39
|
+
matchContentsVertical: boolean;
|
|
35
40
|
/**
|
|
36
41
|
* Internal. Drives the shadow node's content measurement, see
|
|
37
42
|
* `ExpoViewShadowNode::sizesToContent`.
|
|
@@ -44,13 +49,17 @@ const NativeRNHostView: ComponentType<NativeRNHostProps> = requireNativeView(
|
|
|
44
49
|
);
|
|
45
50
|
|
|
46
51
|
function transformProps(props: RNHostProps, layoutRoot: boolean): NativeRNHostProps {
|
|
47
|
-
const { modifiers, ...restProps } = props;
|
|
52
|
+
const { modifiers, matchContents, ...restProps } = props;
|
|
53
|
+
const { horizontal: matchContentsHorizontal, vertical: matchContentsVertical } =
|
|
54
|
+
resolveMatchContents(matchContents);
|
|
48
55
|
return {
|
|
49
56
|
modifiers,
|
|
50
57
|
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
51
58
|
...restProps,
|
|
52
59
|
layoutRoot,
|
|
53
|
-
|
|
60
|
+
matchContentsHorizontal,
|
|
61
|
+
matchContentsVertical,
|
|
62
|
+
expoInternalSizeFromChildren: matchContentsHorizontal || matchContentsVertical,
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
|
|
@@ -61,12 +70,14 @@ export function RNHostView(props: RNHostProps) {
|
|
|
61
70
|
// is what makes a `Pressable` drop its press on the first finger movement.
|
|
62
71
|
const layoutRoot = useIsPresentedInOwnWindow();
|
|
63
72
|
|
|
73
|
+
const nativeProps = transformProps(props, layoutRoot);
|
|
74
|
+
|
|
64
75
|
return (
|
|
65
76
|
<NativeRNHostView
|
|
66
|
-
{...
|
|
77
|
+
{...nativeProps}
|
|
67
78
|
// `matchContents` can only be used once on mount
|
|
68
79
|
// So we force unmount when it changes to prevent unexpected layout
|
|
69
|
-
key={
|
|
80
|
+
key={`${nativeProps.matchContentsHorizontal}-${nativeProps.matchContentsVertical}`}>
|
|
70
81
|
{/* Reset context here so only nearest RNHostView becomes the layout root for its children, and not any other RNHostView above it in the tree. */}
|
|
71
82
|
<PresentedContentContext.Provider value={false}>
|
|
72
83
|
{props.children}
|
|
@@ -102,6 +102,16 @@ export type PieChartStyle = {
|
|
|
102
102
|
* Space between slices in points.
|
|
103
103
|
*/
|
|
104
104
|
angularInset?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Corner radius of each slice in points. On a donut, half the ring's thickness gives fully rounded ends.
|
|
107
|
+
* @default 0
|
|
108
|
+
*/
|
|
109
|
+
cornerRadius?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Opacity of each slice, from 0 to 1.
|
|
112
|
+
* @default 0.8
|
|
113
|
+
*/
|
|
114
|
+
opacity?: number;
|
|
105
115
|
};
|
|
106
116
|
|
|
107
117
|
/**
|
|
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
|
|
|
2
2
|
import type { LayoutChangeEvent } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { PresentedContentContext, useIsPresentedInOwnWindow } from '../PresentedContentContext';
|
|
5
|
+
import { resolveMatchContents } from '../utils/matchContents';
|
|
5
6
|
|
|
6
7
|
const RNHostNativeView: React.ComponentType<any> = requireNativeView('ExpoUI', 'RNHostView');
|
|
7
8
|
|
|
@@ -10,10 +11,12 @@ export interface RNHostViewProps {
|
|
|
10
11
|
* When `true`, the RNHost will update its size in the React Native view tree to match the
|
|
11
12
|
* children's size.
|
|
12
13
|
* When `false`, the RNHost will use the size of the parent SwiftUI View.
|
|
14
|
+
* Pass an object to choose per axis. For example, `{ vertical: true }` takes the width from the
|
|
15
|
+
* parent and the height from the children, so text wraps and grows vertically.
|
|
13
16
|
* Can be only set once on mount.
|
|
14
17
|
* @default false
|
|
15
18
|
*/
|
|
16
|
-
matchContents?: boolean;
|
|
19
|
+
matchContents?: boolean | { vertical?: boolean; horizontal?: boolean };
|
|
17
20
|
onLayout?: (event: LayoutChangeEvent) => void;
|
|
18
21
|
/**
|
|
19
22
|
* The RN View to be hosted.
|
|
@@ -21,21 +24,25 @@ export interface RNHostViewProps {
|
|
|
21
24
|
children: React.ReactElement;
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
export function RNHostView(props: RNHostViewProps) {
|
|
27
|
+
export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
|
|
25
28
|
// A sheet or popover presents its content in its own view controller, where the React Native
|
|
26
29
|
// surface root is not an ancestor and so touch dispatches don't work.
|
|
27
30
|
// Hosted content there owns its touches and is the origin it is measured from; native reads
|
|
28
31
|
// this one prop for both.
|
|
29
32
|
const layoutRoot = useIsPresentedInOwnWindow();
|
|
33
|
+
const { horizontal: matchContentsHorizontal, vertical: matchContentsVertical } =
|
|
34
|
+
resolveMatchContents(matchContents);
|
|
30
35
|
|
|
31
36
|
return (
|
|
32
37
|
<RNHostNativeView
|
|
33
38
|
{...props}
|
|
34
39
|
layoutRoot={layoutRoot}
|
|
35
|
-
|
|
40
|
+
matchContentsHorizontal={matchContentsHorizontal}
|
|
41
|
+
matchContentsVertical={matchContentsVertical}
|
|
42
|
+
expoInternalSizeFromChildren={matchContentsHorizontal || matchContentsVertical}
|
|
36
43
|
// `matchContents` can only be used once on mount
|
|
37
44
|
// So we force unmount when it changes to prevent unexpected layout
|
|
38
|
-
key={
|
|
45
|
+
key={`${matchContentsHorizontal}-${matchContentsVertical}`}>
|
|
39
46
|
{/* Reset context here so only nearest RNHostView becomes the layout root for its children, and not any other RNHostView above it in the tree. */}
|
|
40
47
|
<PresentedContentContext.Provider value={false}>
|
|
41
48
|
{props.children}
|
|
@@ -1957,6 +1957,7 @@ export * from './presentationModifiers';
|
|
|
1957
1957
|
export * from './environment';
|
|
1958
1958
|
export type { ShapeStyle } from './shapeStyle';
|
|
1959
1959
|
export * from './scrollPosition';
|
|
1960
|
+
export * from './searchable';
|
|
1960
1961
|
export * from './symbolEffect';
|
|
1961
1962
|
export * from './scrollObservation';
|
|
1962
1963
|
export * from './widgets';
|
|
@@ -130,12 +130,28 @@ export const interactiveDismissDisabled = (isDisabled: boolean = true) =>
|
|
|
130
130
|
*/
|
|
131
131
|
export type PresentationSizingType = 'automatic' | 'fitted' | 'form' | 'page';
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Options for the `presentationSizing` modifier.
|
|
135
|
+
*/
|
|
136
|
+
export type PresentationSizingOptions = {
|
|
137
|
+
/**
|
|
138
|
+
* The axes on which the sheet fits its content. An axis that is not set keeps the size from
|
|
139
|
+
* `sizing`. For example, `{ horizontal: false, vertical: true }` fits the height to the content
|
|
140
|
+
* and lets the system choose the width.
|
|
141
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/presentationsizing/fitted(horizontal:vertical:)).
|
|
142
|
+
*/
|
|
143
|
+
fitted?: { horizontal?: boolean; vertical?: boolean };
|
|
144
|
+
};
|
|
145
|
+
|
|
133
146
|
/**
|
|
134
147
|
* Sets the sizing of a sheet presentation.
|
|
135
148
|
* @param sizing - The sizing behavior to apply.
|
|
149
|
+
* @param options - Additional sizing options.
|
|
136
150
|
* @platform ios 18.0+
|
|
137
151
|
* @platform tvos 18.0+
|
|
138
152
|
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/presentationsizing(_:)).
|
|
139
153
|
*/
|
|
140
|
-
export const presentationSizing = (
|
|
141
|
-
|
|
154
|
+
export const presentationSizing = (
|
|
155
|
+
sizing: PresentationSizingType,
|
|
156
|
+
options?: PresentationSizingOptions
|
|
157
|
+
) => createModifier('presentationSizing', { sizing, ...options });
|