@expo/ui 57.0.14 → 57.0.16
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 +28 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +8 -0
- package/android/src/main/java/expo/modules/ui/HostView.kt +8 -1
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +20 -0
- package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +145 -0
- package/android/src/main/java/expo/modules/ui/textfield/BasicTextField.kt +2 -0
- package/build/jetpack-compose/RNHostView/index.d.ts +6 -0
- package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
- package/build/jetpack-compose/Slider/index.d.ts +21 -0
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/swift-ui/RNHostView.d.ts +2 -0
- package/build/swift-ui/RNHostView.d.ts.map +1 -1
- package/build/swift-ui/modifiers/background.d.ts +32 -5
- package/build/swift-ui/modifiers/background.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +13 -34
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/presentationModifiers.d.ts +3 -2
- package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
- package/build/swift-ui/modifiers/shapeStyle.d.ts +54 -0
- package/build/swift-ui/modifiers/shapeStyle.d.ts.map +1 -0
- package/build/universal/BottomSheet/index.android.d.ts +1 -1
- package/build/universal/BottomSheet/index.android.d.ts.map +1 -1
- package/build/universal/BottomSheet/index.d.ts +1 -1
- package/build/universal/BottomSheet/index.d.ts.map +1 -1
- package/build/universal/BottomSheet/index.ios.d.ts +1 -1
- package/build/universal/BottomSheet/index.ios.d.ts.map +1 -1
- package/build/universal/BottomSheet/types.d.ts +20 -0
- package/build/universal/BottomSheet/types.d.ts.map +1 -1
- package/build/universal/ListItem/ListItem.android.d.ts.map +1 -1
- package/build/universal/ListItem/types.d.ts +19 -0
- package/build/universal/ListItem/types.d.ts.map +1 -1
- package/build/universal/RNHostView/index.android.d.ts +1 -1
- package/build/universal/RNHostView/index.android.d.ts.map +1 -1
- package/build/universal/RNHostView/index.d.ts +1 -1
- package/build/universal/RNHostView/index.d.ts.map +1 -1
- package/build/universal/RNHostView/index.ios.d.ts +1 -1
- package/build/universal/RNHostView/index.ios.d.ts.map +1 -1
- package/build/universal/RNHostView/types.d.ts +2 -0
- package/build/universal/RNHostView/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Convertibles/ShapeStyleValue.swift +129 -0
- package/ios/Modifiers/BackgroundModifier.swift +10 -10
- package/ios/Modifiers/ForegroundStyleModifier.swift +12 -105
- package/ios/Modifiers/ViewModifierRegistry.swift +29 -5
- package/ios/RNHostView.swift +4 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.14/expo.modules.ui-57.0.14-sources.jar → 57.0.16/expo.modules.ui-57.0.16-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.14/expo.modules.ui-57.0.14.module → 57.0.16/expo.modules.ui-57.0.16.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.14/expo.modules.ui-57.0.14.pom → 57.0.16/expo.modules.ui-57.0.16.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.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 +4 -4
- package/src/jetpack-compose/RNHostView/index.tsx +12 -0
- package/src/jetpack-compose/Slider/index.tsx +33 -2
- package/src/swift-ui/RNHostView.tsx +3 -0
- package/src/swift-ui/modifiers/background.ts +49 -7
- package/src/swift-ui/modifiers/index.ts +14 -39
- package/src/swift-ui/modifiers/presentationModifiers.ts +3 -2
- package/src/swift-ui/modifiers/shapeStyle.ts +55 -0
- package/src/universal/BottomSheet/index.android.tsx +4 -0
- package/src/universal/BottomSheet/index.ios.tsx +5 -0
- package/src/universal/BottomSheet/index.tsx +4 -0
- package/src/universal/BottomSheet/types.ts +22 -0
- package/src/universal/ListItem/ListItem.android.tsx +2 -1
- package/src/universal/ListItem/types.ts +21 -0
- package/src/universal/RNHostView/index.android.tsx +2 -1
- package/src/universal/RNHostView/index.ios.tsx +6 -2
- package/src/universal/RNHostView/index.tsx +2 -0
- package/src/universal/RNHostView/types.ts +3 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.14/expo.modules.ui-57.0.14.pom.sha512 +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
36bbbdb98934c3b0ecf275049cb2012dcb65ad2d329fee1f7e42428dcb49da04
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
99fa1b7ecf29945c1331833c23ab82c3717bea6a43f8056dacf7179a8eb86b18b7d1511838585debdaa6df79b9ea528e8af0babce933a03bd606838ef8747b7a
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e2ee254493f7d171d19e6e659e95a4b5
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a14f54eee92691240a7cd6a83f944b0ba11733a0
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
478029e9cf52a0e86909c248a99329f7e3488a65fc3ac06bce0fbf614f5553f1
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5e177e8e0e7abb84c61422d42bd006f13589886297c6835028fd8df1be8a86bac8415dff355cd4d29abe28b209eca4171c32b5ef5552f46d71c2fc39a8f2a9fd
|
|
@@ -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.16",
|
|
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.16.aar",
|
|
28
|
+
"url": "expo.modules.ui-57.0.16.aar",
|
|
29
|
+
"size": 2023859,
|
|
30
|
+
"sha512": "5e177e8e0e7abb84c61422d42bd006f13589886297c6835028fd8df1be8a86bac8415dff355cd4d29abe28b209eca4171c32b5ef5552f46d71c2fc39a8f2a9fd",
|
|
31
|
+
"sha256": "478029e9cf52a0e86909c248a99329f7e3488a65fc3ac06bce0fbf614f5553f1",
|
|
32
|
+
"sha1": "a14f54eee92691240a7cd6a83f944b0ba11733a0",
|
|
33
|
+
"md5": "e2ee254493f7d171d19e6e659e95a4b5"
|
|
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.16.aar",
|
|
145
|
+
"url": "expo.modules.ui-57.0.16.aar",
|
|
146
|
+
"size": 2023859,
|
|
147
|
+
"sha512": "5e177e8e0e7abb84c61422d42bd006f13589886297c6835028fd8df1be8a86bac8415dff355cd4d29abe28b209eca4171c32b5ef5552f46d71c2fc39a8f2a9fd",
|
|
148
|
+
"sha256": "478029e9cf52a0e86909c248a99329f7e3488a65fc3ac06bce0fbf614f5553f1",
|
|
149
|
+
"sha1": "a14f54eee92691240a7cd6a83f944b0ba11733a0",
|
|
150
|
+
"md5": "e2ee254493f7d171d19e6e659e95a4b5"
|
|
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.16-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-57.0.16-sources.jar",
|
|
166
|
+
"size": 103145,
|
|
167
|
+
"sha512": "99fa1b7ecf29945c1331833c23ab82c3717bea6a43f8056dacf7179a8eb86b18b7d1511838585debdaa6df79b9ea528e8af0babce933a03bd606838ef8747b7a",
|
|
168
|
+
"sha256": "36bbbdb98934c3b0ecf275049cb2012dcb65ad2d329fee1f7e42428dcb49da04",
|
|
169
|
+
"sha1": "6b28263e7e0227478fe261eeffb9f640dced8ca0",
|
|
170
|
+
"md5": "56549744b9307aa46758e19db9dabf90"
|
|
171
171
|
}
|
|
172
172
|
]
|
|
173
173
|
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dd8aaf57dde82e067e3b01e533d18c81
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e8be172ae1de0c69a4721b510ad4b2a57f38d0d7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
606fea92fbb5bee94b622a8c8c181f4c7a092d8b495fbc69a5b78efe602667fd
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
29813d4039bcdd201463695c4dc7c25cd2a542a3e3b18d8a5dc483cd9ee8e654edcf8e87f896a44c31548e845e3f0b562440200ec50c23dcba4faf29e7918436
|
|
@@ -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.16</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.16/expo.modules.ui-57.0.16.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
94c56cd4cc07d1314adeb432470b7e18
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ba7bbd6ac7336e57e6f2bff3bbf73cb50e280e27
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7a5ff13f5a7f7b543453f3ca4d75fc04c726c75bd6ab837043af8100f6154adb
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
63a8a73c453fe98411f22786180631b84d8299418a6eded64c4a4b9df88017f60e8812a4d658d050ac0e9f4e79434cbb486799d5840b7a552978e24692160173
|
|
@@ -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.16</latest>
|
|
7
|
+
<release>57.0.16</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.16</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260904074016</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
06b4eb4f73252997f0c748122269fced
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
05ac7add69ca0a63ef04e38e0856a243b893ea2d
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ba5674dc8956e32170e50ea50d568498b400b971904ccb74191e0a5b5fe1756c
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2f30a796d34d631e97171fcd04ae67683c47d0bfcbafe4f4d2aec81201f4048079e549130446e2dd5345084f6d193a0481f2f2ccc691bc843648fedc2e71a07d
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.16",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.fx.js",
|
|
@@ -96,8 +96,8 @@
|
|
|
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
|
|
100
|
-
"expo": "
|
|
99
|
+
"expo": "57.0.20",
|
|
100
|
+
"expo-module-scripts": "56.0.3"
|
|
101
101
|
},
|
|
102
102
|
"jest": {
|
|
103
103
|
"preset": "expo-module-scripts"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"optional": true
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "d36f125067e9c6e67689f2b75cf4fb19254c3c59",
|
|
125
125
|
"scripts": {
|
|
126
126
|
"build": "expo-module build",
|
|
127
127
|
"clean": "expo-module clean",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
2
|
import type { ReactElement, ComponentType } from 'react';
|
|
3
|
+
import type { LayoutChangeEvent } from 'react-native';
|
|
3
4
|
|
|
4
5
|
import { PresentedContentContext, useIsPresentedInOwnWindow } from '../../PresentedContentContext';
|
|
5
6
|
import type { ModifierConfig } from '../../types';
|
|
@@ -14,6 +15,11 @@ export interface RNHostProps extends PrimitiveBaseProps {
|
|
|
14
15
|
* @default false
|
|
15
16
|
*/
|
|
16
17
|
matchContents?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Called on mount and whenever this view's layout in the React Native view tree changes.
|
|
20
|
+
* With `matchContents`, the reported size is the one measured from the hosted view.
|
|
21
|
+
*/
|
|
22
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
17
23
|
/**
|
|
18
24
|
* The RN View to be hosted.
|
|
19
25
|
*/
|
|
@@ -26,6 +32,11 @@ export interface RNHostProps extends PrimitiveBaseProps {
|
|
|
26
32
|
|
|
27
33
|
type NativeRNHostProps = RNHostProps & {
|
|
28
34
|
layoutRoot: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Internal. Drives the shadow node's content measurement, see
|
|
37
|
+
* `ExpoViewShadowNode::sizesToContent`.
|
|
38
|
+
*/
|
|
39
|
+
expoInternalSizeFromChildren?: boolean;
|
|
29
40
|
};
|
|
30
41
|
const NativeRNHostView: ComponentType<NativeRNHostProps> = requireNativeView(
|
|
31
42
|
'ExpoUI',
|
|
@@ -39,6 +50,7 @@ function transformProps(props: RNHostProps, layoutRoot: boolean): NativeRNHostPr
|
|
|
39
50
|
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
40
51
|
...restProps,
|
|
41
52
|
layoutRoot,
|
|
53
|
+
expoInternalSizeFromChildren: props.matchContents,
|
|
42
54
|
};
|
|
43
55
|
}
|
|
44
56
|
|
|
@@ -86,6 +86,14 @@ export interface SliderProps {
|
|
|
86
86
|
children?: React.ReactNode;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
export interface VerticalSliderProps extends SliderProps {
|
|
90
|
+
/**
|
|
91
|
+
* Whether the direction of the slider is reversed. By default, values increase from top to bottom.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
reverseDirection?: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
89
97
|
type NativeSliderProps = Omit<SliderProps, 'onValueChange' | 'onValueChangeFinished' | 'children'> &
|
|
90
98
|
ViewEvent<'onValueChange', { value: number }> &
|
|
91
99
|
ViewEvent<'onValueChangeFinished', void> & { children?: React.ReactNode };
|
|
@@ -95,6 +103,10 @@ const SliderNativeView: React.ComponentType<NativeSliderProps> = requireNativeVi
|
|
|
95
103
|
'SliderView'
|
|
96
104
|
);
|
|
97
105
|
|
|
106
|
+
const VerticalSliderNativeView: React.ComponentType<
|
|
107
|
+
NativeSliderProps & Pick<VerticalSliderProps, 'reverseDirection'>
|
|
108
|
+
> = requireNativeView('ExpoUI', 'VerticalSliderView');
|
|
109
|
+
|
|
98
110
|
function transformSliderProps(
|
|
99
111
|
props: Omit<SliderProps, 'children'>
|
|
100
112
|
): Omit<NativeSliderProps, 'children'> {
|
|
@@ -118,7 +130,7 @@ function transformSliderProps(
|
|
|
118
130
|
}
|
|
119
131
|
|
|
120
132
|
/**
|
|
121
|
-
* A custom thumb slot for `Slider`.
|
|
133
|
+
* A custom thumb slot for `Slider` and `VerticalSlider`.
|
|
122
134
|
* Wrap any content to use as the slider's thumb indicator.
|
|
123
135
|
*
|
|
124
136
|
* @platform android
|
|
@@ -128,7 +140,7 @@ function Thumb(props: { children: React.ReactNode }) {
|
|
|
128
140
|
}
|
|
129
141
|
|
|
130
142
|
/**
|
|
131
|
-
* A custom track slot for `Slider`.
|
|
143
|
+
* A custom track slot for `Slider` and `VerticalSlider`.
|
|
132
144
|
* Wrap any content to use as the slider's track.
|
|
133
145
|
*
|
|
134
146
|
* @platform android
|
|
@@ -150,4 +162,23 @@ function SliderComponent(props: SliderProps) {
|
|
|
150
162
|
SliderComponent.Thumb = Thumb;
|
|
151
163
|
SliderComponent.Track = Track;
|
|
152
164
|
|
|
165
|
+
/**
|
|
166
|
+
* A vertical slider component that wraps Material3's `VerticalSlider`.
|
|
167
|
+
*
|
|
168
|
+
* @platform android
|
|
169
|
+
*/
|
|
170
|
+
export function VerticalSlider(props: VerticalSliderProps) {
|
|
171
|
+
const { children, reverseDirection, ...sliderProps } = props;
|
|
172
|
+
return (
|
|
173
|
+
<VerticalSliderNativeView
|
|
174
|
+
{...transformSliderProps(sliderProps)}
|
|
175
|
+
reverseDirection={reverseDirection}>
|
|
176
|
+
{children}
|
|
177
|
+
</VerticalSliderNativeView>
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
VerticalSlider.Thumb = Thumb;
|
|
182
|
+
VerticalSlider.Track = Track;
|
|
183
|
+
|
|
153
184
|
export { SliderComponent as Slider };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
+
import type { LayoutChangeEvent } from 'react-native';
|
|
2
3
|
|
|
3
4
|
import { PresentedContentContext, useIsPresentedInOwnWindow } from '../PresentedContentContext';
|
|
4
5
|
|
|
@@ -13,6 +14,7 @@ export interface RNHostViewProps {
|
|
|
13
14
|
* @default false
|
|
14
15
|
*/
|
|
15
16
|
matchContents?: boolean;
|
|
17
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
16
18
|
/**
|
|
17
19
|
* The RN View to be hosted.
|
|
18
20
|
*/
|
|
@@ -30,6 +32,7 @@ export function RNHostView(props: RNHostViewProps) {
|
|
|
30
32
|
<RNHostNativeView
|
|
31
33
|
{...props}
|
|
32
34
|
layoutRoot={layoutRoot}
|
|
35
|
+
expoInternalSizeFromChildren={props.matchContents}
|
|
33
36
|
// `matchContents` can only be used once on mount
|
|
34
37
|
// So we force unmount when it changes to prevent unexpected layout
|
|
35
38
|
key={props.matchContents ? 'matchContents' : 'noMatchContents'}>
|
|
@@ -1,12 +1,54 @@
|
|
|
1
|
-
import { createModifier } from './createModifier';
|
|
1
|
+
import { createModifier, type ModifierConfig } from './createModifier';
|
|
2
|
+
import { resolveShapeStyle, type ShapeStyle } from './shapeStyle';
|
|
2
3
|
import type { Shape } from './shapes/index';
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
export type BackgroundOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* The safe area edges the background extends into.
|
|
8
|
+
* @default 'all'
|
|
9
|
+
*/
|
|
10
|
+
ignoresSafeAreaEdges?:
|
|
11
|
+
| 'all'
|
|
12
|
+
| 'top'
|
|
13
|
+
| 'bottom'
|
|
14
|
+
| 'leading'
|
|
15
|
+
| 'trailing'
|
|
16
|
+
| 'horizontal'
|
|
17
|
+
| 'vertical';
|
|
18
|
+
};
|
|
4
19
|
|
|
5
20
|
/**
|
|
6
21
|
* Sets the background of a view.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* Two variants matching SwiftUI:
|
|
24
|
+
* - `background(style)` — paints the whole view, expanding into the safe area unless
|
|
25
|
+
* `ignoresSafeAreaEdges` narrows it down
|
|
26
|
+
* - `background(style, shapes.capsule())` — paints the given shape
|
|
27
|
+
*
|
|
28
|
+
* To draw an arbitrary view behind another one, use the `Background` component instead.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <Text modifiers={[background('#FF0000')]}>Solid color</Text>
|
|
33
|
+
* <Text modifiers={[background({ type: 'material', material: 'thin' })]}>Blurred backdrop</Text>
|
|
34
|
+
* <Text modifiers={[background('#FF0000', shapes.roundedRectangle({ cornerRadius: 12 }))]}>
|
|
35
|
+
* Rounded
|
|
36
|
+
* </Text>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @param style - Any [`ShapeStyle`](#shapestyle): a color, a hierarchical style, a material, or a gradient.
|
|
40
|
+
* @param shape - The shape the style is painted in. Omit it to paint the whole view.
|
|
41
|
+
* @param options - Options of the variant without a shape, such as the safe area edges the background extends into.
|
|
42
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/background(_:ignoressafeareaedges:)).
|
|
10
43
|
*/
|
|
11
|
-
export
|
|
12
|
-
|
|
44
|
+
export function background(style: ShapeStyle, options?: BackgroundOptions): ModifierConfig;
|
|
45
|
+
export function background(style: ShapeStyle, shape?: Shape): ModifierConfig;
|
|
46
|
+
export function background(
|
|
47
|
+
style: ShapeStyle,
|
|
48
|
+
shapeOrOptions?: Shape | BackgroundOptions
|
|
49
|
+
): ModifierConfig {
|
|
50
|
+
return createModifier('background', {
|
|
51
|
+
style: resolveShapeStyle(style),
|
|
52
|
+
...shapeOrOptions,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -21,6 +21,7 @@ import { gaugeStyle } from './gaugeStyle';
|
|
|
21
21
|
import { progressViewStyle } from './progressViewStyle';
|
|
22
22
|
import { onScrollPhaseChange, useScrollGeometryChange } from './scrollObservation';
|
|
23
23
|
import { id, scrollPosition } from './scrollPosition';
|
|
24
|
+
import { resolveShapeStyle, type ShapeStyle } from './shapeStyle';
|
|
24
25
|
import { symbolEffect } from './symbolEffect';
|
|
25
26
|
import type { Color } from './types';
|
|
26
27
|
import { activityBackgroundTint, widgetAccentedRenderingMode, widgetURL } from './widgets';
|
|
@@ -457,51 +458,20 @@ export const foregroundColor = (color: Color) => createModifier('foregroundColor
|
|
|
457
458
|
* })]}>
|
|
458
459
|
* Gradient Text
|
|
459
460
|
* </Text>
|
|
461
|
+
*
|
|
462
|
+
* // Material
|
|
463
|
+
* <Text modifiers={[foregroundStyle({ type: 'material', material: 'regular' })]}>
|
|
464
|
+
* Text painted with a material
|
|
465
|
+
* </Text>
|
|
460
466
|
* ```
|
|
461
467
|
*
|
|
468
|
+
* @param style - Any [`ShapeStyle`](#shapestyle): a color, a hierarchical style, a material or a gradient.
|
|
462
469
|
* @returns A view modifier that applies the specified foreground style
|
|
463
470
|
* @since iOS 15.0+ (hierarchical quinary requires iOS 16.0+)
|
|
464
471
|
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/foregroundstyle(_:)).
|
|
465
472
|
*/
|
|
466
|
-
export const foregroundStyle = (
|
|
467
|
-
style:
|
|
468
|
-
| Color // Simple color (hex string, color name, or React Native ColorValue)
|
|
469
|
-
| { type: 'color'; color: Color }
|
|
470
|
-
| {
|
|
471
|
-
type: 'hierarchical';
|
|
472
|
-
style: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'quinary';
|
|
473
|
-
}
|
|
474
|
-
| {
|
|
475
|
-
type: 'linearGradient';
|
|
476
|
-
colors: Color[];
|
|
477
|
-
startPoint: { x: number; y: number };
|
|
478
|
-
endPoint: { x: number; y: number };
|
|
479
|
-
}
|
|
480
|
-
| {
|
|
481
|
-
type: 'radialGradient';
|
|
482
|
-
colors: Color[];
|
|
483
|
-
center: { x: number; y: number };
|
|
484
|
-
startRadius: number;
|
|
485
|
-
endRadius: number;
|
|
486
|
-
}
|
|
487
|
-
| {
|
|
488
|
-
type: 'angularGradient';
|
|
489
|
-
colors: Color[];
|
|
490
|
-
center: { x: number; y: number };
|
|
491
|
-
}
|
|
492
|
-
) => {
|
|
493
|
-
if (style == null || typeof style !== 'object' || !('type' in style)) {
|
|
494
|
-
return createModifier('foregroundStyle', { styleType: 'color', color: style });
|
|
495
|
-
}
|
|
496
|
-
if (style.type === 'hierarchical') {
|
|
497
|
-
return createModifier('foregroundStyle', {
|
|
498
|
-
styleType: 'hierarchical',
|
|
499
|
-
hierarchicalStyle: style.style,
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
const { type, ...rest } = style;
|
|
503
|
-
return createModifier('foregroundStyle', { styleType: type, ...rest });
|
|
504
|
-
};
|
|
473
|
+
export const foregroundStyle = (style: ShapeStyle) =>
|
|
474
|
+
createModifier('foregroundStyle', { style: resolveShapeStyle(style) });
|
|
505
475
|
|
|
506
476
|
/**
|
|
507
477
|
* Makes text bold.
|
|
@@ -1032,6 +1002,10 @@ export const overlay = (params: {
|
|
|
1032
1002
|
/**
|
|
1033
1003
|
* Adds a background behind the view.
|
|
1034
1004
|
* @param params - Background color and alignment.
|
|
1005
|
+
* @deprecated Wraps `background(_:alignment:)`, which SwiftUI deprecated in favor of
|
|
1006
|
+
* `background(alignment:content:)`, available since iOS 15. Use the `background` modifier for a
|
|
1007
|
+
* plain fill, or the `Background` component when the background has to be a view or needs an
|
|
1008
|
+
* alignment.
|
|
1035
1009
|
*/
|
|
1036
1010
|
export const backgroundOverlay = (params: {
|
|
1037
1011
|
color?: Color;
|
|
@@ -1854,6 +1828,7 @@ export * from './progressViewStyle';
|
|
|
1854
1828
|
export * from './gaugeStyle';
|
|
1855
1829
|
export * from './presentationModifiers';
|
|
1856
1830
|
export * from './environment';
|
|
1831
|
+
export type { ShapeStyle } from './shapeStyle';
|
|
1857
1832
|
export * from './scrollPosition';
|
|
1858
1833
|
export * from './symbolEffect';
|
|
1859
1834
|
export * from './scrollObservation';
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
createModifierWithEventListener,
|
|
4
4
|
type ModifierConfig,
|
|
5
5
|
} from './createModifier';
|
|
6
|
+
import type { Color } from './types';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Presentation detent type for controlling sheet heights.
|
|
@@ -88,12 +89,12 @@ export const presentationBackgroundInteraction = (
|
|
|
88
89
|
* Sets the background of a sheet presentation. Paints the entire sheet chrome
|
|
89
90
|
* including the drag-indicator zone and home-indicator safe-area inset, which
|
|
90
91
|
* a regular `background()` modifier cannot reach.
|
|
91
|
-
* @param color - The background color
|
|
92
|
+
* @param color - The background color.
|
|
92
93
|
* @platform ios 16.4+
|
|
93
94
|
* @see Official [SwiftUI
|
|
94
95
|
documentation](https://developer.apple.com/documentation/swiftui/view/presentationbackground(_:)).
|
|
95
96
|
*/
|
|
96
|
-
export const presentationBackground = (color:
|
|
97
|
+
export const presentationBackground = (color: Color) =>
|
|
97
98
|
createModifier('presentationBackground', { color });
|
|
98
99
|
|
|
99
100
|
/**
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Color } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A style that paints an area, mirroring SwiftUI's `ShapeStyle`.
|
|
5
|
+
* A bare color is a shorthand for `{ type: 'color', color }`.
|
|
6
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/shapestyle).
|
|
7
|
+
*/
|
|
8
|
+
export type ShapeStyle =
|
|
9
|
+
| Color // Simple color (hex string, color name, or React Native ColorValue)
|
|
10
|
+
| { type: 'color'; color: Color }
|
|
11
|
+
| {
|
|
12
|
+
type: 'hierarchical';
|
|
13
|
+
style: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'quinary';
|
|
14
|
+
}
|
|
15
|
+
| {
|
|
16
|
+
/**
|
|
17
|
+
* A blurred backdrop that samples the content behind the view and adapts to the current
|
|
18
|
+
* color scheme. `'bar'` has no tvOS counterpart and is ignored there.
|
|
19
|
+
*/
|
|
20
|
+
type: 'material';
|
|
21
|
+
material: 'ultraThin' | 'thin' | 'regular' | 'thick' | 'ultraThick' | 'bar';
|
|
22
|
+
}
|
|
23
|
+
| {
|
|
24
|
+
type: 'linearGradient';
|
|
25
|
+
colors: Color[];
|
|
26
|
+
startPoint: { x: number; y: number };
|
|
27
|
+
endPoint: { x: number; y: number };
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
type: 'radialGradient';
|
|
31
|
+
colors: Color[];
|
|
32
|
+
center: { x: number; y: number };
|
|
33
|
+
startRadius: number;
|
|
34
|
+
endRadius: number;
|
|
35
|
+
}
|
|
36
|
+
| {
|
|
37
|
+
type: 'angularGradient';
|
|
38
|
+
colors: Color[];
|
|
39
|
+
center: { x: number; y: number };
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Normalizes a style into the shape the native side reads. A `Color` may itself be an object
|
|
44
|
+
* (for example the one returned by `PlatformColor`), so a style is only treated as a tagged
|
|
45
|
+
* variant when it carries a `type` field.
|
|
46
|
+
*/
|
|
47
|
+
export function resolveShapeStyle(style: ShapeStyle): Record<string, any> {
|
|
48
|
+
if (style == null || typeof style !== 'object' || !('type' in style)) {
|
|
49
|
+
return { type: 'color', color: style };
|
|
50
|
+
}
|
|
51
|
+
if (style.type === 'hierarchical') {
|
|
52
|
+
return { type: 'hierarchical', hierarchical: style.style };
|
|
53
|
+
}
|
|
54
|
+
return { ...style };
|
|
55
|
+
}
|
|
@@ -43,6 +43,8 @@ export function BottomSheet({
|
|
|
43
43
|
shouldDismissOnClickOutside = true,
|
|
44
44
|
scrimColor,
|
|
45
45
|
contentPadding,
|
|
46
|
+
containerColor,
|
|
47
|
+
contentColor,
|
|
46
48
|
}: BottomSheetProps) {
|
|
47
49
|
const sheetRef = useRef<ModalBottomSheetRef>(null);
|
|
48
50
|
const [mount, setMount] = useState(isPresented);
|
|
@@ -86,6 +88,8 @@ export function BottomSheet({
|
|
|
86
88
|
skipPartiallyExpanded={shouldSkipPartiallyExpanded(snapPoints)}
|
|
87
89
|
properties={{ shouldDismissOnBackPress, shouldDismissOnClickOutside }}
|
|
88
90
|
scrimColor={scrimColor}
|
|
91
|
+
containerColor={containerColor}
|
|
92
|
+
contentColor={contentColor}
|
|
89
93
|
modifiers={modifiers}>
|
|
90
94
|
<Column modifiers={contentModifiers}>{children}</Column>
|
|
91
95
|
</ModalBottomSheet>
|
|
@@ -2,6 +2,7 @@ import { BottomSheet as SwiftUIBottomSheet, Group, Host } from '@expo/ui/swift-u
|
|
|
2
2
|
import {
|
|
3
3
|
frame,
|
|
4
4
|
padding,
|
|
5
|
+
presentationBackground,
|
|
5
6
|
presentationDetents,
|
|
6
7
|
presentationDragIndicator,
|
|
7
8
|
type ModifierConfig,
|
|
@@ -26,6 +27,7 @@ export function BottomSheet({
|
|
|
26
27
|
testID,
|
|
27
28
|
modifiers,
|
|
28
29
|
contentPadding,
|
|
30
|
+
containerColor,
|
|
29
31
|
}: BottomSheetProps) {
|
|
30
32
|
const { top, bottom, left, right } = resolveContentPadding(contentPadding, {
|
|
31
33
|
top: 16,
|
|
@@ -41,6 +43,9 @@ export function BottomSheet({
|
|
|
41
43
|
if (snapPoints && snapPoints.length > 0) {
|
|
42
44
|
presentationModifiers.push(presentationDetents(snapPoints.map(snapPointToDetent)));
|
|
43
45
|
}
|
|
46
|
+
if (containerColor) {
|
|
47
|
+
presentationModifiers.push(presentationBackground(containerColor));
|
|
48
|
+
}
|
|
44
49
|
if (modifiers?.length) {
|
|
45
50
|
presentationModifiers.push(...modifiers);
|
|
46
51
|
}
|
|
@@ -35,6 +35,7 @@ export function BottomSheet({
|
|
|
35
35
|
snapPoints,
|
|
36
36
|
testID,
|
|
37
37
|
contentPadding,
|
|
38
|
+
containerColor,
|
|
38
39
|
}: BottomSheetProps) {
|
|
39
40
|
const isDark = useColorScheme() === 'dark';
|
|
40
41
|
const { top, bottom, left, right } = resolveContentPadding(contentPadding, {
|
|
@@ -63,6 +64,9 @@ export function BottomSheet({
|
|
|
63
64
|
// The drawer has to fill the viewport or it gets pushed off-screen.
|
|
64
65
|
...(hasSnapPoints ? snapPointContentStyle : noSnapPointContentStyle),
|
|
65
66
|
...(showDragIndicator && dragIndicatorSpacing),
|
|
67
|
+
// An explicit containerColor overrides both the 'white' default
|
|
68
|
+
// above and the bare isDark fallback.
|
|
69
|
+
...(typeof containerColor === 'string' && { backgroundColor: containerColor }),
|
|
66
70
|
}}
|
|
67
71
|
aria-describedby={undefined}>
|
|
68
72
|
{/* Radix Dialog requires a title for a11y; render visually-hidden. */}
|
|
@@ -110,4 +110,26 @@ export interface BottomSheetProps {
|
|
|
110
110
|
* from `@expo/ui/swift-ui/modifiers` or `@expo/ui/jetpack-compose/modifiers`.
|
|
111
111
|
*/
|
|
112
112
|
modifiers?: ModifierConfig[];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The sheet's own background color, painting its full chrome (including the
|
|
116
|
+
* drag-indicator zone and, on iOS, the home-indicator safe-area inset).
|
|
117
|
+
* When omitted, each platform keeps its own default.
|
|
118
|
+
*
|
|
119
|
+
* This only paints the background. `children` are React Native views on
|
|
120
|
+
* every platform, so they don't pick up a contrasting text color
|
|
121
|
+
* automatically -- set one explicitly if you use a dark `containerColor`.
|
|
122
|
+
* @platform android
|
|
123
|
+
* @platform ios 16.4+
|
|
124
|
+
* @platform web
|
|
125
|
+
*/
|
|
126
|
+
containerColor?: ColorValue;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The preferred color for native Compose content that doesn't set its own
|
|
130
|
+
* color. Doesn't reach a `BottomSheet`'s (React Native) `children` -- see
|
|
131
|
+
* `containerColor`'s doc.
|
|
132
|
+
* @platform android
|
|
133
|
+
*/
|
|
134
|
+
contentColor?: ColorValue;
|
|
113
135
|
}
|