@expo/ui 57.0.17 → 57.0.18
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 +12 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +2 -2
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +2 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +2 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +4 -0
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/index.d.ts +7 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -1
- package/build/swift-ui/Button/index.d.ts +3 -1
- package/build/swift-ui/Button/index.d.ts.map +1 -1
- package/build/swift-ui/NavigationDestination/index.d.ts +30 -0
- package/build/swift-ui/NavigationDestination/index.d.ts.map +1 -0
- package/build/swift-ui/NavigationLink/index.d.ts +32 -0
- package/build/swift-ui/NavigationLink/index.d.ts.map +1 -0
- package/build/swift-ui/NavigationStack/index.d.ts +45 -0
- package/build/swift-ui/NavigationStack/index.d.ts.map +1 -0
- package/build/swift-ui/Toolbar/index.d.ts +40 -0
- package/build/swift-ui/Toolbar/index.d.ts.map +1 -0
- package/build/swift-ui/index.d.ts +4 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +7 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Button/Button.swift +13 -0
- package/ios/Button/ButtonProps.swift +6 -0
- package/ios/ExpoUIModule.swift +4 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +17 -0
- package/ios/NavigationLinkView.swift +22 -0
- package/ios/NavigationStackView.swift +63 -0
- package/ios/SlotView.swift +5 -0
- package/ios/ToolbarView.swift +33 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.17/expo.modules.ui-57.0.17-sources.jar → 57.0.18/expo.modules.ui-57.0.18-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.17/expo.modules.ui-57.0.17.module → 57.0.18/expo.modules.ui-57.0.18.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.17/expo.modules.ui-57.0.17.pom → 57.0.18/expo.modules.ui-57.0.18.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.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/jetpack-compose/DatePicker/index.tsx +4 -0
- package/src/jetpack-compose/DropdownMenu/index.tsx +9 -0
- package/src/swift-ui/Button/index.tsx +3 -1
- package/src/swift-ui/NavigationDestination/index.tsx +39 -0
- package/src/swift-ui/NavigationLink/index.tsx +51 -0
- package/src/swift-ui/NavigationStack/index.tsx +75 -0
- package/src/swift-ui/Toolbar/index.tsx +64 -0
- package/src/swift-ui/index.tsx +4 -0
- package/src/swift-ui/modifiers/index.ts +9 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha512 +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import SwiftUI
|
|
4
|
+
import ExpoModulesCore
|
|
5
|
+
|
|
6
|
+
internal final class NavigationStackViewProps: UIBaseViewProps {
|
|
7
|
+
@Field var path: [String]?
|
|
8
|
+
var onPathChange = EventDispatcher()
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
private struct NavigationDestinationContent: View {
|
|
12
|
+
@ObservedObject var props: NavigationStackViewProps
|
|
13
|
+
let value: String
|
|
14
|
+
|
|
15
|
+
var body: some View {
|
|
16
|
+
props.children?
|
|
17
|
+
.slots("destination")
|
|
18
|
+
.first { $0.extra("value", as: String.self) == value }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
internal struct NavigationStackView: ExpoSwiftUI.View {
|
|
23
|
+
@ObservedObject var props: NavigationStackViewProps
|
|
24
|
+
@State private var uncontrolledPath: [String] = []
|
|
25
|
+
|
|
26
|
+
init(props: NavigationStackViewProps) {
|
|
27
|
+
self.props = props
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private var pathBinding: Binding<[String]> {
|
|
31
|
+
let props = props
|
|
32
|
+
let uncontrolled = $uncontrolledPath
|
|
33
|
+
return Binding(
|
|
34
|
+
get: { props.path ?? uncontrolled.wrappedValue },
|
|
35
|
+
set: { newPath in
|
|
36
|
+
guard (props.path ?? uncontrolled.wrappedValue) != newPath else {
|
|
37
|
+
return
|
|
38
|
+
}
|
|
39
|
+
if props.path == nil {
|
|
40
|
+
uncontrolled.wrappedValue = newPath
|
|
41
|
+
}
|
|
42
|
+
props.onPathChange(["path": newPath])
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var body: some View {
|
|
48
|
+
NavigationStack(path: pathBinding) {
|
|
49
|
+
rootContent
|
|
50
|
+
.navigationDestination(for: String.self) { value in
|
|
51
|
+
NavigationDestinationContent(props: props, value: value)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@ViewBuilder
|
|
57
|
+
private var rootContent: some View {
|
|
58
|
+
ForEach(props.children?.withoutSlot("destination") ?? [], id: \.id) { child in
|
|
59
|
+
let view: any View = child.childView
|
|
60
|
+
AnyView(view)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
package/ios/SlotView.swift
CHANGED
|
@@ -30,6 +30,11 @@ extension [any ExpoSwiftUI.AnyChild] {
|
|
|
30
30
|
.first { $0.props.name == name }
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
func slots(_ name: String) -> [SlotView] {
|
|
34
|
+
compactMap { $0.childView as? SlotView }
|
|
35
|
+
.filter { $0.props.name == name }
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
func withoutSlot(_ name: String) -> [any ExpoSwiftUI.AnyChild] {
|
|
34
39
|
filter {
|
|
35
40
|
guard let slot = $0.childView as? SlotView else { return true }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import SwiftUI
|
|
4
|
+
import ExpoModulesCore
|
|
5
|
+
|
|
6
|
+
internal final class ToolbarViewProps: UIBaseViewProps {}
|
|
7
|
+
|
|
8
|
+
internal struct ToolbarView: ExpoSwiftUI.View {
|
|
9
|
+
@ObservedObject var props: ToolbarViewProps
|
|
10
|
+
|
|
11
|
+
init(props: ToolbarViewProps) {
|
|
12
|
+
self.props = props
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
var body: some View {
|
|
16
|
+
if let content = props.children?.slot("content") {
|
|
17
|
+
baseContent
|
|
18
|
+
.toolbar {
|
|
19
|
+
content
|
|
20
|
+
}
|
|
21
|
+
} else {
|
|
22
|
+
baseContent
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@ViewBuilder
|
|
27
|
+
private var baseContent: some View {
|
|
28
|
+
ForEach(props.children?.withoutSlots() ?? [], id: \.id) { child in
|
|
29
|
+
let view: any View = child.childView
|
|
30
|
+
AnyView(view)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
10a87f7e5b9322022e3579f88cee7441
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6b806f321f975d6caff272f29bc91464e74acbb2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
6b32ef025930afd41b632295e3d20bed5d52b29001680721148abc18b7dbf3c8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5cdf850cb3e0dd28112d6a77eead05862cd9d3e5a75b0e1da56a032b872378b05770bc5640f69fc904bd58383e1c4c24933da4702029e6f8dba9f9ab000ef4ac
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b3a59c37f58880f20a32caa6a69c8c42
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aad7ad5ee2eae34a4143404fa774449f0dc7f6a0
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
69f99c64824f782c36b1e44617e59fd5f5ddb13f92d906007918534cc8a29dfe
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d1c36be4bda31ef4d9df2b222c12ab6ee240523984bb7c550ede0186ac99aebb95f31695f76b74a8ad68c34615fa3c0d5ef15ee8c5f58c5e8e90e766a6f4d1d2
|
|
@@ -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.18",
|
|
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.18.aar",
|
|
28
|
+
"url": "expo.modules.ui-57.0.18.aar",
|
|
29
|
+
"size": 2073510,
|
|
30
|
+
"sha512": "d1c36be4bda31ef4d9df2b222c12ab6ee240523984bb7c550ede0186ac99aebb95f31695f76b74a8ad68c34615fa3c0d5ef15ee8c5f58c5e8e90e766a6f4d1d2",
|
|
31
|
+
"sha256": "69f99c64824f782c36b1e44617e59fd5f5ddb13f92d906007918534cc8a29dfe",
|
|
32
|
+
"sha1": "aad7ad5ee2eae34a4143404fa774449f0dc7f6a0",
|
|
33
|
+
"md5": "b3a59c37f58880f20a32caa6a69c8c42"
|
|
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.18.aar",
|
|
145
|
+
"url": "expo.modules.ui-57.0.18.aar",
|
|
146
|
+
"size": 2073510,
|
|
147
|
+
"sha512": "d1c36be4bda31ef4d9df2b222c12ab6ee240523984bb7c550ede0186ac99aebb95f31695f76b74a8ad68c34615fa3c0d5ef15ee8c5f58c5e8e90e766a6f4d1d2",
|
|
148
|
+
"sha256": "69f99c64824f782c36b1e44617e59fd5f5ddb13f92d906007918534cc8a29dfe",
|
|
149
|
+
"sha1": "aad7ad5ee2eae34a4143404fa774449f0dc7f6a0",
|
|
150
|
+
"md5": "b3a59c37f58880f20a32caa6a69c8c42"
|
|
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.18-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-57.0.18-sources.jar",
|
|
166
|
+
"size": 105192,
|
|
167
|
+
"sha512": "5cdf850cb3e0dd28112d6a77eead05862cd9d3e5a75b0e1da56a032b872378b05770bc5640f69fc904bd58383e1c4c24933da4702029e6f8dba9f9ab000ef4ac",
|
|
168
|
+
"sha256": "6b32ef025930afd41b632295e3d20bed5d52b29001680721148abc18b7dbf3c8",
|
|
169
|
+
"sha1": "6b806f321f975d6caff272f29bc91464e74acbb2",
|
|
170
|
+
"md5": "10a87f7e5b9322022e3579f88cee7441"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
272c092ee9ed7e2fc5ae6075f1c7462c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bb161f9b1ed6f40ef52b0fbf499f220b2f2dcaae
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b3959c1ffa53081a1d1dc78b91d28066f74a30ee4f0c5e636bb889f793c3f7b0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4bb668ea7d90ee112845564638ba91737dc20fb020ad3373d90ab0a1ba4cf3c680720d652e17dcf9910c119f3d1b48342a3fe089c00e3a0cbe165fd303eb3fd6
|
|
@@ -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.18</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.18/expo.modules.ui-57.0.18.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
79532f24975324db511694a8bc767af6
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9d0123bf63bf3c0e42c4a611dc594003f9edf46f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
50edde22ac9a6cd2659ebedca41486469824fb3ab8c860ee75ac75f3b5b1dd3f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5482643787bed8dcb3a4b658a91225aa6ac54173443c93f7f30a393c082cf33c7ef6af5b26bfc353380da41e59072cb6908d65a04ced73c620f067b1361e4ae7
|
|
@@ -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.18</latest>
|
|
7
|
+
<release>57.0.18</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.18</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260911111656</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
04e4bbda95115c882497c79e219dae7e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e192dcc8dd2efc7b7e7cc064e4e76462e87c4e97
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6154ba7267f0b402f8af16a924de1329c7a15afe7b0a945cbc8a275698ad03c0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3b107556159f09e7d3ec09e1b3c39a2dc00ee3a2567bbca3918dbe8dbc030ce5557870c68fe708808310b78b4f1b43316f10d2f6760a45ae7e2797015a9553d5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.18",
|
|
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.22",
|
|
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": "9e5319c0f821a27b7924841903abae50e2b41790",
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "expo-module build",
|
|
127
127
|
"clean": "expo-module clean",
|
|
@@ -325,6 +325,10 @@ export function DateRangePicker(props: DateRangePickerProps) {
|
|
|
325
325
|
// -- Dialog views (used internally by the compat layer) ---------------------
|
|
326
326
|
|
|
327
327
|
export interface DatePickerDialogProps {
|
|
328
|
+
/**
|
|
329
|
+
* The initially selected date. When omitted, the dialog opens on the current month with no
|
|
330
|
+
* selection and the confirm button stays disabled until a date is picked.
|
|
331
|
+
*/
|
|
328
332
|
initialDate?: string | null;
|
|
329
333
|
variant?: AndroidVariant;
|
|
330
334
|
showVariantToggle?: boolean;
|
|
@@ -43,6 +43,14 @@ export interface DropdownMenuProps {
|
|
|
43
43
|
*/
|
|
44
44
|
color?: ColorValue;
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Shadow elevation of the dropdown menu popup in dp. Set to `0` to remove the shadow.
|
|
48
|
+
* Defaults to Material3's `MenuDefaults.ShadowElevation`.
|
|
49
|
+
*
|
|
50
|
+
* @platform android
|
|
51
|
+
*/
|
|
52
|
+
shadowElevation?: number;
|
|
53
|
+
|
|
46
54
|
/**
|
|
47
55
|
* Optional styles to apply to the `DropdownMenu`.
|
|
48
56
|
*/
|
|
@@ -58,6 +66,7 @@ type NativeMenuProps = {
|
|
|
58
66
|
expanded?: boolean;
|
|
59
67
|
onDismissRequest?: () => void;
|
|
60
68
|
color?: ColorValue;
|
|
69
|
+
shadowElevation?: number;
|
|
61
70
|
style?: StyleProp<ViewStyle>;
|
|
62
71
|
modifiers?: ModifierConfig[];
|
|
63
72
|
children?: ReactNode;
|
|
@@ -10,8 +10,10 @@ import { type CommonViewModifierProps } from '../types';
|
|
|
10
10
|
* - `default` - The default button role.
|
|
11
11
|
* - `cancel` - A button that cancels the current operation.
|
|
12
12
|
* - `destructive` - A button that deletes data or performs a destructive action.
|
|
13
|
+
* - `close` - A button that closes the view it is presented in. Given no `label` and no children,
|
|
14
|
+
* the system draws it as an xmark.
|
|
13
15
|
*/
|
|
14
|
-
export type ButtonRole = 'default' | 'cancel' | 'destructive';
|
|
16
|
+
export type ButtonRole = 'default' | 'cancel' | 'destructive' | 'close';
|
|
15
17
|
|
|
16
18
|
export interface ButtonProps extends CommonViewModifierProps {
|
|
17
19
|
/**
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Slot } from '../SlotView';
|
|
4
|
+
|
|
5
|
+
export interface NavigationDestinationProps {
|
|
6
|
+
/**
|
|
7
|
+
* The `NavigationLink` value this destination is presented for.
|
|
8
|
+
*/
|
|
9
|
+
value: string;
|
|
10
|
+
/**
|
|
11
|
+
* The view pushed onto the stack for `value`.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Associates a destination view with a `NavigationLink` value, matching SwiftUI's
|
|
18
|
+
* `navigationDestination(for:destination:)`. It must be a direct child of the `NavigationStack`,
|
|
19
|
+
* however deeply the link that pushes it is nested inside that stack.
|
|
20
|
+
*
|
|
21
|
+
* Keep it mounted so the pushed screen already carries its `navigationTitle` when the slide
|
|
22
|
+
* starts, or render one for each value on the stack's `path` to build screens on demand.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <NavigationDestination value="settings">
|
|
27
|
+
* <SettingsScreen />
|
|
28
|
+
* </NavigationDestination>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @platform ios
|
|
32
|
+
*/
|
|
33
|
+
export function NavigationDestination(props: NavigationDestinationProps) {
|
|
34
|
+
return (
|
|
35
|
+
<Slot name="destination" extraProps={{ value: props.value }}>
|
|
36
|
+
{props.children}
|
|
37
|
+
</Slot>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
+
import { type CommonViewModifierProps } from '../types';
|
|
6
|
+
|
|
7
|
+
export interface NavigationLinkProps extends CommonViewModifierProps {
|
|
8
|
+
/**
|
|
9
|
+
* The value to append to the enclosing `NavigationStack`'s path when the link is tapped. The
|
|
10
|
+
* stack presents the `NavigationDestination` whose `value` matches.
|
|
11
|
+
*/
|
|
12
|
+
value: string;
|
|
13
|
+
/**
|
|
14
|
+
* A view that describes the link.
|
|
15
|
+
*/
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const NavigationLinkNativeView: ComponentType<NavigationLinkProps> = requireNativeView(
|
|
20
|
+
'ExpoUI',
|
|
21
|
+
'NavigationLinkView'
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A view that controls a navigation presentation. In a `List` it renders as a row with a
|
|
26
|
+
* disclosure chevron, and tapping it pushes the matching `NavigationDestination`.
|
|
27
|
+
*
|
|
28
|
+
* The link has to be inside the `NavigationStack` itself. Content presented from the stack, such
|
|
29
|
+
* as a `BottomSheet` or a `Popover`, is its own presentation context and does not reach the
|
|
30
|
+
* stack's destinations, so give that content its own `NavigationStack`.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <NavigationLink value="settings">
|
|
35
|
+
* <Text>Settings</Text>
|
|
36
|
+
* </NavigationLink>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @platform ios
|
|
40
|
+
*/
|
|
41
|
+
export function NavigationLink(props: NavigationLinkProps) {
|
|
42
|
+
const { modifiers, children, ...restProps } = props;
|
|
43
|
+
return (
|
|
44
|
+
<NavigationLinkNativeView
|
|
45
|
+
modifiers={modifiers}
|
|
46
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
47
|
+
{...restProps}>
|
|
48
|
+
{children}
|
|
49
|
+
</NavigationLinkNativeView>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
3
|
+
import { type NativeSyntheticEvent } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
|
+
import { type CommonViewModifierProps } from '../types';
|
|
7
|
+
|
|
8
|
+
export interface NavigationStackProps extends CommonViewModifierProps {
|
|
9
|
+
/**
|
|
10
|
+
* The root view of the stack, and the `NavigationDestination` views the stack can push. It is
|
|
11
|
+
* displayed inside a navigation bar.
|
|
12
|
+
*/
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The values of the views pushed on top of the root view, in the order they were pushed.
|
|
16
|
+
* Leave it undefined to let the stack manage its own path.
|
|
17
|
+
*/
|
|
18
|
+
path?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Callback function that is called when the stack pushes or pops a view, for example when a
|
|
21
|
+
* `NavigationLink` is tapped or the user swipes back. Gets called with the new path.
|
|
22
|
+
*
|
|
23
|
+
* When `path` is set, the stack is controlled: a push takes effect once the new path comes back
|
|
24
|
+
* through this prop.
|
|
25
|
+
*/
|
|
26
|
+
onPathChange?: (path: string[]) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type NativeNavigationStackProps = Omit<NavigationStackProps, 'onPathChange'> & {
|
|
30
|
+
onPathChange?: (event: NativeSyntheticEvent<{ path: string[] }>) => void;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const NavigationStackNativeView: ComponentType<NativeNavigationStackProps> = requireNativeView(
|
|
34
|
+
'ExpoUI',
|
|
35
|
+
'NavigationStackView'
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A view that displays a root view and enables you to present additional views over the root view.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* const [path, setPath] = useState<string[]>([]);
|
|
44
|
+
*
|
|
45
|
+
* <NavigationStack path={path} onPathChange={setPath}>
|
|
46
|
+
* <List>
|
|
47
|
+
* <NavigationLink value="settings">
|
|
48
|
+
* <Text>Settings</Text>
|
|
49
|
+
* </NavigationLink>
|
|
50
|
+
* </List>
|
|
51
|
+
* <NavigationDestination value="settings">
|
|
52
|
+
* <SettingsScreen />
|
|
53
|
+
* </NavigationDestination>
|
|
54
|
+
* </NavigationStack>
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @platform ios
|
|
58
|
+
*/
|
|
59
|
+
export function NavigationStack(props: NavigationStackProps) {
|
|
60
|
+
const { modifiers, onPathChange, ...restProps } = props;
|
|
61
|
+
return (
|
|
62
|
+
<NavigationStackNativeView
|
|
63
|
+
modifiers={modifiers}
|
|
64
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
65
|
+
{...restProps}
|
|
66
|
+
onPathChange={
|
|
67
|
+
onPathChange
|
|
68
|
+
? ({ nativeEvent: { path } }) => {
|
|
69
|
+
onPathChange(path);
|
|
70
|
+
}
|
|
71
|
+
: undefined
|
|
72
|
+
}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { requireNativeView } from 'expo';
|
|
2
|
+
|
|
3
|
+
import { Slot } from '../SlotView';
|
|
4
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
+
import { type CommonViewModifierProps } from '../types';
|
|
6
|
+
|
|
7
|
+
export interface ToolbarProps extends CommonViewModifierProps {
|
|
8
|
+
/**
|
|
9
|
+
* The view the toolbar belongs to, together with the `Toolbar.Content` that fills it.
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ToolbarContentProps {
|
|
15
|
+
/**
|
|
16
|
+
* The items to place in the toolbar.
|
|
17
|
+
*/
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ToolbarNativeView: React.ComponentType<ToolbarProps> = requireNativeView(
|
|
22
|
+
'ExpoUI',
|
|
23
|
+
'ToolbarView'
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The items placed in the toolbar of the view `Toolbar` wraps.
|
|
28
|
+
*/
|
|
29
|
+
function ToolbarContent(props: ToolbarContentProps) {
|
|
30
|
+
return <Slot name="content">{props.children}</Slot>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Adds a toolbar to the view it wraps, matching SwiftUI's `toolbar(content:)`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <NavigationStack>
|
|
39
|
+
* <Toolbar>
|
|
40
|
+
* <Text>Bird description</Text>
|
|
41
|
+
* <Toolbar.Content>
|
|
42
|
+
* <Button role="close" onPress={() => setIsPresented(false)} />
|
|
43
|
+
* </Toolbar.Content>
|
|
44
|
+
* </Toolbar>
|
|
45
|
+
* </NavigationStack>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @platform ios
|
|
49
|
+
*/
|
|
50
|
+
function ToolbarComponent(props: ToolbarProps) {
|
|
51
|
+
const { modifiers, children, ...restProps } = props;
|
|
52
|
+
return (
|
|
53
|
+
<ToolbarNativeView
|
|
54
|
+
modifiers={modifiers}
|
|
55
|
+
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
56
|
+
{...restProps}>
|
|
57
|
+
{children}
|
|
58
|
+
</ToolbarNativeView>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const Toolbar = Object.assign(ToolbarComponent, { Content: ToolbarContent });
|
|
63
|
+
|
|
64
|
+
export { Toolbar };
|
package/src/swift-ui/index.tsx
CHANGED
|
@@ -25,6 +25,9 @@ export * from './ZStack';
|
|
|
25
25
|
export * from './Group';
|
|
26
26
|
export * from './List';
|
|
27
27
|
export * from './Menu';
|
|
28
|
+
export * from './NavigationDestination';
|
|
29
|
+
export * from './NavigationLink';
|
|
30
|
+
export * from './NavigationStack';
|
|
28
31
|
export * from './Picker';
|
|
29
32
|
export * from './ProgressView';
|
|
30
33
|
export * from './Section';
|
|
@@ -38,6 +41,7 @@ export { useNativeState } from '../State';
|
|
|
38
41
|
export { withAnimation, type WithAnimationCompletionCriteria } from './withAnimation';
|
|
39
42
|
export * from './SyncToggle';
|
|
40
43
|
export * from './TabView';
|
|
44
|
+
export * from './Toolbar';
|
|
41
45
|
export * from './Toggle';
|
|
42
46
|
export {
|
|
43
47
|
TextField,
|
|
@@ -1687,6 +1687,13 @@ export const resizable = (
|
|
|
1687
1687
|
resizingMode?: 'stretch' | 'tile'
|
|
1688
1688
|
) => createModifier('resizable', { ...capInsets, resizingMode });
|
|
1689
1689
|
|
|
1690
|
+
/**
|
|
1691
|
+
* Configures the view's title for purposes of navigation, using a string.
|
|
1692
|
+
* @param title - The title to display.
|
|
1693
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/navigationtitle(_:)).
|
|
1694
|
+
*/
|
|
1695
|
+
export const navigationTitle = (title: string) => createModifier('navigationTitle', { title });
|
|
1696
|
+
|
|
1690
1697
|
// =============================================================================
|
|
1691
1698
|
// Type Definitions
|
|
1692
1699
|
// =============================================================================
|
|
@@ -1830,7 +1837,8 @@ export type BuiltInModifier =
|
|
|
1830
1837
|
| ReturnType<typeof widgetAccentedRenderingMode>
|
|
1831
1838
|
| ReturnType<typeof widgetURL>
|
|
1832
1839
|
| ReturnType<typeof activityBackgroundTint>
|
|
1833
|
-
| ReturnType<typeof containerBackground
|
|
1840
|
+
| ReturnType<typeof containerBackground>
|
|
1841
|
+
| ReturnType<typeof navigationTitle>;
|
|
1834
1842
|
|
|
1835
1843
|
/**
|
|
1836
1844
|
* Main ViewModifier type that supports both built-in and 3rd party modifiers.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cee93fd5a15e4eaab695ed3175a4949f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
43ac02b43fa332c84dbd29354a8ffc002828927a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a2eb95b5f7bc80a8406159f0cd3cc67058927f3e88d1ce5e0eed1000f47bf6e7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6a46b6260033cfdf2fcb8cb69b966ac7dcca618a6f3e9c011819a76e42f998c2a549b1864bbbbd642b106c01d9ee184eb822019cc58d4b438103ed8d421cbb2d
|