@expo/ui 56.0.23 → 56.0.25
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 +33 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +28 -0
- 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/swift-ui/BottomSheet/index.d.ts +10 -6
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/contentShape.d.ts +25 -2
- package/build/swift-ui/modifiers/contentShape.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/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +20 -3
- package/ios/GlassEffectContainerView.swift +1 -1
- package/ios/HStackView.swift +1 -1
- package/ios/Modifiers/ContentShapeModifier.swift +53 -7
- package/ios/Modifiers/MenuOrderModifier.swift +34 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +4 -0
- package/ios/TextFieldView.swift +8 -10
- package/ios/VStackView.swift +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.23/expo.modules.ui-56.0.23-sources.jar → 56.0.25/expo.modules.ui-56.0.25-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.23/expo.modules.ui-56.0.23.module → 56.0.25/expo.modules.ui-56.0.25.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.23/expo.modules.ui-56.0.23.pom → 56.0.25/expo.modules.ui-56.0.25.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.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 +11 -19
- 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/swift-ui/BottomSheet/index.tsx +21 -14
- package/src/swift-ui/modifiers/contentShape.ts +35 -2
- package/src/swift-ui/modifiers/index.ts +1 -0
- package/src/swift-ui/modifiers/menuOrder.ts +12 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.sha512 +0 -1
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ee6c268f863cee623f7916ccdfd01fd0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
db6c2784ec4226897ba61cb7841a1c593fdc07e8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e53eaaf162c99ea11003c510033d74f581ecbb9dace9dbe566b15f85cbd1c27e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
23505426b78f10e16cc91d5157f0c5e4387705e4524b7a3bf0e579ffe19c77ae45a7442a97b6dd7b568171395ede319edc5909a390385ae96c6801935a5ecfc4
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9796a0df6d89a9678a6787ce853725a4
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e03e2f31c624301c84fc40a2e9cec212037b2bf0
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cb6ad358b8a9621bc1af657b5ee5dae249aab307096259dc366c79cde06d3508
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5f93ae090d6aa16199dce7f757d5b6862e51fda7997ebaddc37c32f53a37528d9f4aadb054e8565b9c8c44899a25ac91f3149df8f080e0d4d8cf67200dae1527
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "56.0.
|
|
6
|
+
"version": "56.0.25",
|
|
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-56.0.
|
|
28
|
-
"url": "expo.modules.ui-56.0.
|
|
29
|
-
"size":
|
|
30
|
-
"sha512": "
|
|
31
|
-
"sha256": "
|
|
32
|
-
"sha1": "
|
|
33
|
-
"md5": "
|
|
27
|
+
"name": "expo.modules.ui-56.0.25.aar",
|
|
28
|
+
"url": "expo.modules.ui-56.0.25.aar",
|
|
29
|
+
"size": 1950647,
|
|
30
|
+
"sha512": "5f93ae090d6aa16199dce7f757d5b6862e51fda7997ebaddc37c32f53a37528d9f4aadb054e8565b9c8c44899a25ac91f3149df8f080e0d4d8cf67200dae1527",
|
|
31
|
+
"sha256": "cb6ad358b8a9621bc1af657b5ee5dae249aab307096259dc366c79cde06d3508",
|
|
32
|
+
"sha1": "e03e2f31c624301c84fc40a2e9cec212037b2bf0",
|
|
33
|
+
"md5": "9796a0df6d89a9678a6787ce853725a4"
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
],
|
|
142
142
|
"files": [
|
|
143
143
|
{
|
|
144
|
-
"name": "expo.modules.ui-56.0.
|
|
145
|
-
"url": "expo.modules.ui-56.0.
|
|
146
|
-
"size":
|
|
147
|
-
"sha512": "
|
|
148
|
-
"sha256": "
|
|
149
|
-
"sha1": "
|
|
150
|
-
"md5": "
|
|
144
|
+
"name": "expo.modules.ui-56.0.25.aar",
|
|
145
|
+
"url": "expo.modules.ui-56.0.25.aar",
|
|
146
|
+
"size": 1950647,
|
|
147
|
+
"sha512": "5f93ae090d6aa16199dce7f757d5b6862e51fda7997ebaddc37c32f53a37528d9f4aadb054e8565b9c8c44899a25ac91f3149df8f080e0d4d8cf67200dae1527",
|
|
148
|
+
"sha256": "cb6ad358b8a9621bc1af657b5ee5dae249aab307096259dc366c79cde06d3508",
|
|
149
|
+
"sha1": "e03e2f31c624301c84fc40a2e9cec212037b2bf0",
|
|
150
|
+
"md5": "9796a0df6d89a9678a6787ce853725a4"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
@@ -161,13 +161,13 @@
|
|
|
161
161
|
},
|
|
162
162
|
"files": [
|
|
163
163
|
{
|
|
164
|
-
"name": "expo.modules.ui-56.0.
|
|
165
|
-
"url": "expo.modules.ui-56.0.
|
|
166
|
-
"size":
|
|
167
|
-
"sha512": "
|
|
168
|
-
"sha256": "
|
|
169
|
-
"sha1": "
|
|
170
|
-
"md5": "
|
|
164
|
+
"name": "expo.modules.ui-56.0.25-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-56.0.25-sources.jar",
|
|
166
|
+
"size": 94747,
|
|
167
|
+
"sha512": "23505426b78f10e16cc91d5157f0c5e4387705e4524b7a3bf0e579ffe19c77ae45a7442a97b6dd7b568171395ede319edc5909a390385ae96c6801935a5ecfc4",
|
|
168
|
+
"sha256": "e53eaaf162c99ea11003c510033d74f581ecbb9dace9dbe566b15f85cbd1c27e",
|
|
169
|
+
"sha1": "db6c2784ec4226897ba61cb7841a1c593fdc07e8",
|
|
170
|
+
"md5": "ee6c268f863cee623f7916ccdfd01fd0"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f53e1243f1c6fcf4bf2b837861142a34
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d24eb9c58833906ad4a9fe0836fabfae9c45ef08
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f91648580c486c82a50fe5d1427078834d223172908db5f93e42a7931f5e4e35
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bfbaea478f0039baee5025a2abb427f11e7812e8051bfcab64695c9e096bc87dad4c963f62041422fb5620c6406029a8cfdca79521763cf98ead67fe56f3230b
|
|
@@ -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>56.0.
|
|
12
|
+
<version>56.0.25</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/56.0.25/expo.modules.ui-56.0.25.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
77cc5eb2881bd80307eb8d0a86429c82
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ecb53e1cd406d1fcd8cc45b648ea7fa38fdeb0c5
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d573fcbfc5e8c6afa2d49420491b8ef814fde5fa6e0ed0e3214a0b850c251db9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.25/expo.modules.ui-56.0.25.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f319292e6a84d658e0a762a140627a4cde5114f00068f46c6b89d469aa4bd8bfa12427ffe166e0de5e2b2258be73f0d4700c084d14bb6635c6e1c4aaf97956ad
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.ui</groupId>
|
|
4
4
|
<artifactId>expo.modules.ui</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.0.
|
|
7
|
-
<release>56.0.
|
|
6
|
+
<latest>56.0.25</latest>
|
|
7
|
+
<release>56.0.25</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.0.
|
|
9
|
+
<version>56.0.25</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260806114100</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
626e69c30fd8fa090bc74a352071e9c8
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
797e98dfbe3ba62fe03b9645762212b3b76a4a16
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
45362961b4607ece0177a8852bbbfc0364564fbe68bae6f610eef18143fd6d4e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
118ab8dede46cc631be12e99688fcfea3dced50df79dd91f2e33c75febe556f2ae29e1075ba00cff9996bc854ccaf6e577d1def0056f9c0d839d0703c8034e3c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.25",
|
|
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-worklets": "0.8.3",
|
|
98
98
|
"expo-module-scripts": "56.0.3",
|
|
99
|
-
"expo": "56.0.
|
|
99
|
+
"expo": "56.0.19"
|
|
100
100
|
},
|
|
101
101
|
"jest": {
|
|
102
102
|
"preset": "expo-module-scripts"
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"optional": true
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "eebecc21d8d868d97e72bd61bb8e668fb2feb704",
|
|
124
124
|
"scripts": {
|
|
125
125
|
"build": "expo-module build",
|
|
126
126
|
"clean": "expo-module clean",
|
|
@@ -132,7 +132,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
132
132
|
useEffect(() => {
|
|
133
133
|
if (indexProp === -1) {
|
|
134
134
|
setIsPresented(false);
|
|
135
|
-
fireCloseCallbacks();
|
|
136
135
|
} else if (indexProp >= 0) {
|
|
137
136
|
closedRef.current = false;
|
|
138
137
|
setIsPresented(true);
|
|
@@ -140,17 +139,13 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
140
139
|
setCurrentIndex(clampedIndex);
|
|
141
140
|
currentIndexRef.current = clampedIndex;
|
|
142
141
|
}
|
|
143
|
-
}, [indexProp, detents.length
|
|
142
|
+
}, [indexProp, detents.length]);
|
|
144
143
|
|
|
145
|
-
const handlePresentedChange = useCallback(
|
|
146
|
-
(presented
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
[fireCloseCallbacks]
|
|
153
|
-
);
|
|
144
|
+
const handlePresentedChange = useCallback((presented: boolean) => {
|
|
145
|
+
if (!presented) {
|
|
146
|
+
setIsPresented(false);
|
|
147
|
+
}
|
|
148
|
+
}, []);
|
|
154
149
|
|
|
155
150
|
const handleDetentChange = useCallback(
|
|
156
151
|
(detent: PresentationDetent) => {
|
|
@@ -168,7 +163,6 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
168
163
|
const snapToIndex = (index: number) => {
|
|
169
164
|
if (index === -1) {
|
|
170
165
|
setIsPresented(false);
|
|
171
|
-
fireCloseCallbacks();
|
|
172
166
|
return;
|
|
173
167
|
}
|
|
174
168
|
const clampedIndex = Math.min(Math.max(index, 0), detents.length - 1);
|
|
@@ -179,14 +173,11 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
179
173
|
onChangeRef.current?.(clampedIndex);
|
|
180
174
|
};
|
|
181
175
|
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
// closedRef guard inside fireCloseCallbacks prevents double-firing if a
|
|
186
|
-
// native user-dismiss event also arrives during the animation.
|
|
176
|
+
// Close callbacks fire from the native `onDismiss` event, which SwiftUI sends after
|
|
177
|
+
// the dismissal transition finishes, so they can present another modal without UIKit
|
|
178
|
+
// rejecting it. Android awaits `hide()` for the same reason.
|
|
187
179
|
const close = () => {
|
|
188
180
|
setIsPresented(false);
|
|
189
|
-
fireCloseCallbacks();
|
|
190
181
|
};
|
|
191
182
|
|
|
192
183
|
return {
|
|
@@ -200,7 +191,7 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
200
191
|
present: () => snapToIndex(0),
|
|
201
192
|
dismiss: close,
|
|
202
193
|
};
|
|
203
|
-
}, [detents
|
|
194
|
+
}, [detents]);
|
|
204
195
|
|
|
205
196
|
useImperativeHandle(ref, () => methods, [methods]);
|
|
206
197
|
|
|
@@ -237,6 +228,7 @@ export function BottomSheet(props: BottomSheetProps) {
|
|
|
237
228
|
<NativeBottomSheet
|
|
238
229
|
isPresented={isPresented}
|
|
239
230
|
onIsPresentedChange={handlePresentedChange}
|
|
231
|
+
onDismiss={fireCloseCallbacks}
|
|
240
232
|
fitToContents={fitToContents}>
|
|
241
233
|
<Group modifiers={modifiers}>
|
|
242
234
|
<RNHostView matchContents={fitToContents}>
|
|
@@ -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
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import { useState, type ComponentType } from 'react';
|
|
2
|
+
import { useState, type ComponentType, type ReactNode } from 'react';
|
|
3
3
|
import { type NativeSyntheticEvent } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { Slot } from '../SlotView';
|
|
5
6
|
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
7
|
import { type CommonViewModifierProps } from '../types';
|
|
7
8
|
|
|
8
9
|
export interface BottomSheetProps extends CommonViewModifierProps {
|
|
9
10
|
/**
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
12
|
-
* like `presentationDetents`, `presentationDragIndicator`,
|
|
13
|
-
* `presentationBackgroundInteraction`, and `interactiveDismissDisabled`.
|
|
11
|
+
* The sheet's content, mounted while presented and unmounted after dismiss. Wrap it in `Group`
|
|
12
|
+
* to apply presentation modifiers.
|
|
14
13
|
*/
|
|
15
|
-
children:
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* A view the sheet is anchored to, for example the `Button` that opens it. Rendered in place and
|
|
17
|
+
* kept mounted, so presenting the sheet doesn't shift surrounding layout. Optional.
|
|
18
|
+
*/
|
|
19
|
+
anchor?: ReactNode;
|
|
16
20
|
/**
|
|
17
21
|
* Whether the `BottomSheet` is presented.
|
|
18
22
|
*/
|
|
@@ -33,7 +37,10 @@ export interface BottomSheetProps extends CommonViewModifierProps {
|
|
|
33
37
|
fitToContents?: boolean;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
type NativeBottomSheetProps = Omit<
|
|
40
|
+
type NativeBottomSheetProps = Omit<
|
|
41
|
+
BottomSheetProps,
|
|
42
|
+
'onIsPresentedChange' | 'onDismiss' | 'anchor'
|
|
43
|
+
> & {
|
|
37
44
|
onIsPresentedChange: (event: NativeSyntheticEvent<{ isPresented: boolean }>) => void;
|
|
38
45
|
onDismiss: (event: NativeSyntheticEvent<object>) => void;
|
|
39
46
|
};
|
|
@@ -47,17 +54,15 @@ const BottomSheetNativeView: ComponentType<NativeBottomSheetProps> = requireNati
|
|
|
47
54
|
* `BottomSheet` presents content from the bottom of the screen.
|
|
48
55
|
*/
|
|
49
56
|
function BottomSheet(props: BottomSheetProps) {
|
|
50
|
-
const { modifiers, onIsPresentedChange, onDismiss, ...restProps } = props;
|
|
57
|
+
const { modifiers, onIsPresentedChange, onDismiss, anchor, children, ...restProps } = props;
|
|
51
58
|
const [isMounted, setIsMounted] = useState(props.isPresented);
|
|
52
59
|
|
|
53
60
|
if (props.isPresented && !isMounted) {
|
|
54
61
|
setIsMounted(true);
|
|
55
62
|
}
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
64
|
+
// The anchor stays mounted so it's always visible; the content mounts on present and unmounts
|
|
65
|
+
// after dismiss.
|
|
61
66
|
return (
|
|
62
67
|
<BottomSheetNativeView
|
|
63
68
|
modifiers={modifiers}
|
|
@@ -69,8 +74,10 @@ function BottomSheet(props: BottomSheetProps) {
|
|
|
69
74
|
onDismiss={() => {
|
|
70
75
|
setIsMounted(false);
|
|
71
76
|
onDismiss?.();
|
|
72
|
-
}}
|
|
73
|
-
|
|
77
|
+
}}>
|
|
78
|
+
{anchor != null ? <Slot name="anchor">{anchor}</Slot> : null}
|
|
79
|
+
{isMounted ? children : null}
|
|
80
|
+
</BottomSheetNativeView>
|
|
74
81
|
);
|
|
75
82
|
}
|
|
76
83
|
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import { createModifier } from './createModifier';
|
|
2
2
|
import type { Shape } from './shapes/index';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The kinds of interaction a content shape applies to.
|
|
6
|
+
*
|
|
7
|
+
* - `interaction` - The kind for hit-testing and accessibility.
|
|
8
|
+
* - `dragPreview` - The kind for drag and drop previews.
|
|
9
|
+
* - `contextMenuPreview` - The kind for context menu previews.
|
|
10
|
+
* - `hoverEffect` - The kind for hover effects.
|
|
11
|
+
* - `accessibility` - The kind for accessibility.
|
|
12
|
+
*/
|
|
13
|
+
export type ContentShapeKind =
|
|
14
|
+
| 'interaction'
|
|
15
|
+
| 'dragPreview'
|
|
16
|
+
| 'contextMenuPreview'
|
|
17
|
+
| 'hoverEffect'
|
|
18
|
+
| 'accessibility';
|
|
19
|
+
|
|
4
20
|
/**
|
|
5
21
|
* Defines the content shape for hit-testing purposes.
|
|
6
22
|
*
|
|
7
23
|
* This modifier is essential for making entire view areas (including `Spacer` or empty space)
|
|
8
24
|
* interactive. Without it, only visible elements like `Text` or `Image` respond to tap gestures.
|
|
9
25
|
*
|
|
26
|
+
* Pass `kind` to shape something other than the default `interaction` (hit-testing), such as
|
|
27
|
+
* the preview used while a `List.ForEach` row is dragged to reorder it.
|
|
28
|
+
*
|
|
10
29
|
* @param shape - A shape configuration from the shapes API (rectangle, circle, capsule, ellipse, roundedRectangle).
|
|
30
|
+
* @param kind - The kinds to apply the shape to. Defaults to `interaction` when not provided.
|
|
11
31
|
*
|
|
12
32
|
* @example
|
|
13
33
|
* ```tsx
|
|
@@ -35,6 +55,19 @@ import type { Shape } from './shapes/index';
|
|
|
35
55
|
* }
|
|
36
56
|
* ```
|
|
37
57
|
*
|
|
38
|
-
* @
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* // Round the preview shown while a row is dragged, so its corners are not filled in.
|
|
61
|
+
* <Label
|
|
62
|
+
* title={item.title}
|
|
63
|
+
* modifiers={[contentShape(shapes.roundedRectangle({ cornerRadius: 10 }), 'dragPreview')]}
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/contentshape(_:_:eofill:)).
|
|
39
68
|
*/
|
|
40
|
-
export const contentShape = (shape: Shape
|
|
69
|
+
export const contentShape = (shape: Shape, kind?: ContentShapeKind | ContentShapeKind[]) =>
|
|
70
|
+
createModifier('contentShape', {
|
|
71
|
+
...shape,
|
|
72
|
+
kind: kind === undefined ? undefined : [kind].flat(),
|
|
73
|
+
});
|
|
@@ -1743,6 +1743,7 @@ export * from './background';
|
|
|
1743
1743
|
export type * from './types';
|
|
1744
1744
|
export * from './tag';
|
|
1745
1745
|
export * from './pickerStyle';
|
|
1746
|
+
export * from './menuOrder';
|
|
1746
1747
|
export * from './tabViewModifiers';
|
|
1747
1748
|
export * from './datePickerStyle';
|
|
1748
1749
|
export * from './progressViewStyle';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createModifier } from './createModifier';
|
|
2
|
+
|
|
3
|
+
export type MenuOrderType = 'automatic' | 'fixed' | 'priority';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sets the preferred order of items for menus presented from this view.
|
|
7
|
+
* With the default `automatic` order, a menu that opens upward displays its items
|
|
8
|
+
* in reverse. Pass `fixed` to always keep the order the items were provided in.
|
|
9
|
+
* @param order - The preferred menu item ordering.
|
|
10
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/menuorder(_:)).
|
|
11
|
+
*/
|
|
12
|
+
export const menuOrder = (order: MenuOrderType) => createModifier('menuOrder', { order });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
15997973c79a34aad0aa9284381987fa
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
27592d060013020ce468af28cef07d3b45ec26a1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
454872b768b077cea96607a41337f2c696ab2a2a71435cc3836e7f2891910d73
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
23a6ec3e0acaeaa4884440b4410188c75f0e11da49493e08d8bb58a12548db951018417820aa073be5f9aa62000db96be2fe3c04fd88bb073f81f2f964dc145a
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar
DELETED
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a7109c0dee1ee28f19f905bd7deee4e1
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1946982601650cce80a1a4dd0d8969f92ec323c6
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1961d3901f622d2a724f44c75361561cde6ab74c25c29e0990467f06d1666ade
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1866cb015b14c19bf62eae828e70031e1c64ea23c3264a931f3d1126c87c40d000f4f1d850a00dc4178ba859a930808e99af0ccb9732063bd782f93c400d2865
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3b484faeaf8072bec4cac4dc869106d5
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dd76602c0ec060da89cf359611b4f6f785c10f85
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ad75d95203d94641fd30e2864fb113915382f06e4f63a0a19b3af914ad386114
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5621d7635c5118e1a675f4bd823c96a475caa4aa21640938c88349be00092c6d6e7ed8c5fe862afedf33487b28a4a40f2eb85c389f4aaff73197b3b4a71f9465
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
993a5487f3f778a8652eaf25c4cbf786
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ada37294ad48a8562a14e537096b6ea4f759ef4f
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4afa19345a85e797dc4aa3375a6e356e6efd67945e747c5f6d152e959518cc7c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.23/expo.modules.ui-56.0.23.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
21619906c4d762e78c7c470bd250907c6b25b7b1cc8575593265e2d78751ef0bb27b32400005a5a8fa54e635177f87544014daff7b7976a8c7174a756e54cffa
|