@expo/ui 57.0.15 → 57.0.17

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +29 -18
  4. package/android/src/main/java/expo/modules/ui/DateRangePickerView.kt +191 -0
  5. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +25 -0
  6. package/android/src/main/java/expo/modules/ui/HostView.kt +8 -1
  7. package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +23 -1
  8. package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +145 -0
  9. package/android/src/main/java/expo/modules/ui/textfield/BasicTextField.kt +2 -0
  10. package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
  11. package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
  12. package/build/jetpack-compose/DatePicker/index.d.ts +84 -0
  13. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  14. package/build/jetpack-compose/RadioButton/index.d.ts +19 -0
  15. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  16. package/build/jetpack-compose/Slider/index.d.ts +21 -0
  17. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  18. package/build/swift-ui/modifiers/background.d.ts +32 -5
  19. package/build/swift-ui/modifiers/background.d.ts.map +1 -1
  20. package/build/swift-ui/modifiers/containerBackground.d.ts +9 -4
  21. package/build/swift-ui/modifiers/containerBackground.d.ts.map +1 -1
  22. package/build/swift-ui/modifiers/index.d.ts +45 -10
  23. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  24. package/build/swift-ui/modifiers/presentationModifiers.d.ts +6 -3
  25. package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
  26. package/expo-module.config.json +1 -1
  27. package/ios/Modifiers/BackgroundModifier.swift +10 -10
  28. package/ios/Modifiers/ContainerBackgroundModifier.swift +4 -4
  29. package/ios/Modifiers/PresentationModifiers.swift +3 -3
  30. package/ios/Modifiers/ScrollClipDisabledModifier.swift +16 -0
  31. package/ios/Modifiers/ViewModifierRegistry.swift +18 -8
  32. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.15/expo.modules.ui-57.0.15-sources.jar → 57.0.17/expo.modules.ui-57.0.17-sources.jar} +0 -0
  33. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.md5 +1 -0
  34. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha1 +1 -0
  35. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha256 +1 -0
  36. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha512 +1 -0
  37. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar +0 -0
  38. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.md5 +1 -0
  39. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha1 +1 -0
  40. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha256 +1 -0
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha512 +1 -0
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.15/expo.modules.ui-57.0.15.module → 57.0.17/expo.modules.ui-57.0.17.module} +22 -22
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.md5 +1 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha1 +1 -0
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha256 +1 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha512 +1 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.15/expo.modules.ui-57.0.15.pom → 57.0.17/expo.modules.ui-57.0.17.pom} +1 -1
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.md5 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha1 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha256 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha512 +1 -0
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  57. package/package.json +4 -4
  58. package/spm.config.json +1 -1
  59. package/src/community/bottom-sheet/BottomSheet.android.tsx +5 -3
  60. package/src/community/bottom-sheet/BottomSheet.ios.tsx +4 -3
  61. package/src/jetpack-compose/DatePicker/index.tsx +152 -0
  62. package/src/jetpack-compose/RadioButton/index.tsx +20 -0
  63. package/src/jetpack-compose/Slider/index.tsx +33 -2
  64. package/src/swift-ui/modifiers/background.ts +49 -7
  65. package/src/swift-ui/modifiers/containerBackground.ts +10 -5
  66. package/src/swift-ui/modifiers/index.ts +62 -8
  67. package/src/swift-ui/modifiers/presentationModifiers.ts +7 -4
  68. package/src/universal/transformStyle.ios.ts +2 -2
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.md5 +0 -1
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha1 +0 -1
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha256 +0 -1
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha512 +0 -1
  73. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar +0 -0
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.md5 +0 -1
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha1 +0 -1
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha256 +0 -1
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha512 +0 -1
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.md5 +0 -1
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha1 +0 -1
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha256 +0 -1
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha512 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.md5 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha1 +0 -1
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha256 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha512 +0 -1
@@ -208,11 +208,11 @@ internal struct InteractiveDismissDisabledModifier: ViewModifier, Record {
208
208
  // MARK: - Presentation Background
209
209
 
210
210
  internal struct PresentationBackgroundModifier: ViewModifier, Record {
211
- @Field var color: Color?
211
+ @Field var style: ShapeStyleValue?
212
212
 
213
213
  func body(content: Content) -> some View {
214
- if #available(iOS 16.4, tvOS 16.4, *), let color {
215
- content.presentationBackground(color)
214
+ if let shapeStyle = style?.toAnyShapeStyle() {
215
+ content.presentationBackground(shapeStyle)
216
216
  } else {
217
217
  content
218
218
  }
@@ -0,0 +1,16 @@
1
+ // Copyright 2015-present 650 Industries. All rights reserved.
2
+
3
+ import ExpoModulesCore
4
+ import SwiftUI
5
+
6
+ internal struct ScrollClipDisabledModifier: ViewModifier, Record {
7
+ @Field var disabled: Bool = true
8
+
9
+ func body(content: Content) -> some View {
10
+ if #available(iOS 17.0, tvOS 17.0, *) {
11
+ content.scrollClipDisabled(disabled)
12
+ } else {
13
+ content
14
+ }
15
+ }
16
+ }
@@ -231,11 +231,11 @@ internal struct MonospacedDigitModifier: ViewModifier, Record {
231
231
  }
232
232
 
233
233
  internal struct TintModifier: ViewModifier, Record {
234
- @Field var color: Color?
234
+ @Field var tint: ShapeStyleValue?
235
235
 
236
236
  func body(content: Content) -> some View {
237
- if let color = color {
238
- content.tint(color)
237
+ if let shapeStyle = tint?.toAnyShapeStyle() {
238
+ content.tint(shapeStyle)
239
239
  } else {
240
240
  content
241
241
  }
@@ -384,11 +384,16 @@ internal struct GrayscaleModifier: ViewModifier, Record {
384
384
  }
385
385
 
386
386
  internal struct BorderModifier: ViewModifier, Record {
387
- @Field var color: Color = .white
387
+ // Declared as `shapeStyle` because `content` is taken by the parameter of `body(content:)`.
388
+ @Field("content") var shapeStyle: ShapeStyleValue?
388
389
  @Field var width: CGFloat = 1.0
389
390
 
390
391
  func body(content: Content) -> some View {
391
- content.border(color, width: width)
392
+ if let resolvedStyle = shapeStyle?.toAnyShapeStyle() {
393
+ content.border(resolvedStyle, width: width)
394
+ } else {
395
+ content
396
+ }
392
397
  }
393
398
  }
394
399
 
@@ -418,7 +423,8 @@ internal struct ClipShapeModifier: ViewModifier, Record {
418
423
  }
419
424
 
420
425
  internal struct StrokeBorderModifier: ViewModifier, Record {
421
- @Field var color: Color?
426
+ // Declared as `shapeStyle` because `content` is taken by the parameter of `body(content:)`.
427
+ @Field("content") var shapeStyle: ShapeStyleValue?
422
428
  @Field var style: StrokeStyleConfig?
423
429
  @Field var antialiased: Bool = true
424
430
  @Field var shape: ShapeType = .rectangle
@@ -451,8 +457,8 @@ internal struct StrokeBorderModifier: ViewModifier, Record {
451
457
 
452
458
  @ViewBuilder
453
459
  private func applyStrokeBorder<S: InsettableShape>(_ shape: S, _ strokeStyle: StrokeStyle) -> some View {
454
- if let color {
455
- shape.strokeBorder(color, style: strokeStyle, antialiased: antialiased)
460
+ if let resolvedStyle = shapeStyle?.toAnyShapeStyle() {
461
+ shape.strokeBorder(resolvedStyle, style: strokeStyle, antialiased: antialiased)
456
462
  } else {
457
463
  shape.strokeBorder(style: strokeStyle, antialiased: antialiased)
458
464
  }
@@ -2274,6 +2280,10 @@ extension ViewModifierRegistry {
2274
2280
  return try ScrollDisabledModifier(from: params, appContext: appContext)
2275
2281
  }
2276
2282
 
2283
+ register("scrollClipDisabled") { params, appContext, _ in
2284
+ return try ScrollClipDisabledModifier(from: params, appContext: appContext)
2285
+ }
2286
+
2277
2287
  register("scrollIndicators") { params, appContext, _ in
2278
2288
  return try ScrollIndicatorsModifier(from: params, appContext: appContext)
2279
2289
  }
@@ -0,0 +1 @@
1
+ a2eb95b5f7bc80a8406159f0cd3cc67058927f3e88d1ce5e0eed1000f47bf6e7
@@ -0,0 +1 @@
1
+ 6a46b6260033cfdf2fcb8cb69b966ac7dcca618a6f3e9c011819a76e42f998c2a549b1864bbbbd642b106c01d9ee184eb822019cc58d4b438103ed8d421cbb2d
@@ -0,0 +1 @@
1
+ 394fabe7251e3d947f0bbf2037e2bb065b8493d5
@@ -0,0 +1 @@
1
+ 13b9babd2eaa4ed0f4ad6a09f8443eb1a4bca31cc519d29db8371cdabd6487e4
@@ -0,0 +1 @@
1
+ 10a5b1af451aa49760a4c2ca23f439feeff3ee645cef0ca3af0ef7e487efeb5d26c3ff608ce68568a005f46707a5b774e274b5ca0ffc058429d633e600c9ed1e
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "57.0.15",
6
+ "version": "57.0.17",
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.15.aar",
28
- "url": "expo.modules.ui-57.0.15.aar",
29
- "size": 1996194,
30
- "sha512": "0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0",
31
- "sha256": "3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb",
32
- "sha1": "413330dc1478358eefbcd2ad21a352e69567b868",
33
- "md5": "edd3e3bac5983521c3fb8ba7a1830f75"
27
+ "name": "expo.modules.ui-57.0.17.aar",
28
+ "url": "expo.modules.ui-57.0.17.aar",
29
+ "size": 2072906,
30
+ "sha512": "10a5b1af451aa49760a4c2ca23f439feeff3ee645cef0ca3af0ef7e487efeb5d26c3ff608ce68568a005f46707a5b774e274b5ca0ffc058429d633e600c9ed1e",
31
+ "sha256": "13b9babd2eaa4ed0f4ad6a09f8443eb1a4bca31cc519d29db8371cdabd6487e4",
32
+ "sha1": "394fabe7251e3d947f0bbf2037e2bb065b8493d5",
33
+ "md5": "87a5f6dc53fef1a3b6810eb8db0ccc6a"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-57.0.15.aar",
145
- "url": "expo.modules.ui-57.0.15.aar",
146
- "size": 1996194,
147
- "sha512": "0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0",
148
- "sha256": "3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb",
149
- "sha1": "413330dc1478358eefbcd2ad21a352e69567b868",
150
- "md5": "edd3e3bac5983521c3fb8ba7a1830f75"
144
+ "name": "expo.modules.ui-57.0.17.aar",
145
+ "url": "expo.modules.ui-57.0.17.aar",
146
+ "size": 2072906,
147
+ "sha512": "10a5b1af451aa49760a4c2ca23f439feeff3ee645cef0ca3af0ef7e487efeb5d26c3ff608ce68568a005f46707a5b774e274b5ca0ffc058429d633e600c9ed1e",
148
+ "sha256": "13b9babd2eaa4ed0f4ad6a09f8443eb1a4bca31cc519d29db8371cdabd6487e4",
149
+ "sha1": "394fabe7251e3d947f0bbf2037e2bb065b8493d5",
150
+ "md5": "87a5f6dc53fef1a3b6810eb8db0ccc6a"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-57.0.15-sources.jar",
165
- "url": "expo.modules.ui-57.0.15-sources.jar",
166
- "size": 101673,
167
- "sha512": "20a3c1eb5e1bddbb7b3708606f314fbffaa9165cff2e148826fd2e7cd7e1def14e2b3e7ef1190ba853b66f5a71f3d32c05c71f7c7e98dc8470d2e5c2bfccd752",
168
- "sha256": "c0de9f779e4c1fa3758abcbbee8831628a015e11cc4d7242fd1c1ead65a62eef",
169
- "sha1": "8f8ba3c03ae3deb578a50866e3aa7c1da0a1608a",
170
- "md5": "727cf7bc8ccb03288f429d152d19ebb8"
164
+ "name": "expo.modules.ui-57.0.17-sources.jar",
165
+ "url": "expo.modules.ui-57.0.17-sources.jar",
166
+ "size": 105126,
167
+ "sha512": "6a46b6260033cfdf2fcb8cb69b966ac7dcca618a6f3e9c011819a76e42f998c2a549b1864bbbbd642b106c01d9ee184eb822019cc58d4b438103ed8d421cbb2d",
168
+ "sha256": "a2eb95b5f7bc80a8406159f0cd3cc67058927f3e88d1ce5e0eed1000f47bf6e7",
169
+ "sha1": "43ac02b43fa332c84dbd29354a8ffc002828927a",
170
+ "md5": "cee93fd5a15e4eaab695ed3175a4949f"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ b7846d058304cfb924196deafc5d6e30418c63cd
@@ -0,0 +1 @@
1
+ 3ce103a426470ca2198f1231ebd5030611bcbd360a51bc830b48dcc7ad7853f2
@@ -0,0 +1 @@
1
+ 6c831b75309aa91c19aec99702afc5ce461d7fdd215d6acf9565429437744faf0ecc2b953f82fde708241646797dbd4adf9b47f6dc07b388e6179dd0ad4341e7
@@ -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.15</version>
12
+ <version>57.0.17</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.ui</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 8ec443820fac6b3c0527234e124be03c815e81d0
@@ -0,0 +1 @@
1
+ 68858cf5c7e2ff60833e8e6d3c4c5f1683969c7d5f24965470e431605eaa1f70
@@ -0,0 +1 @@
1
+ 637e334e0226ffefc9abe120e7c35fe3441432d6fe47bd1c0dff56445168808763dca58272af02d7af20442213088b037129ff8bff12ce37640a1ad88a13c4d7
@@ -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.15</latest>
7
- <release>57.0.15</release>
6
+ <latest>57.0.17</latest>
7
+ <release>57.0.17</release>
8
8
  <versions>
9
- <version>57.0.15</version>
9
+ <version>57.0.17</version>
10
10
  </versions>
11
- <lastUpdated>20260901160721</lastUpdated>
11
+ <lastUpdated>20260908134223</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- ef804b0b5130bf45649f48809235610b
1
+ dd7d18bde7636ea29ab7549373c2f43a
@@ -1 +1 @@
1
- 00c505224838ff5cfc459029b30fbe70426dc730
1
+ d491c408ce08119efc695fac8f3abe210c89b66a
@@ -1 +1 @@
1
- 0f4c9b5ca861ed3f22c5b000a3022934d9956a512c8c28ddb6b70f883ba75503
1
+ f6eeadee99bcfa2fce76c19ec4942a74b7323cddef420a50177b3ddaf7a0a699
@@ -1 +1 @@
1
- 786895d2586ce5fb37d448df152d909e98c025c03aaf2270c419fd12255f58901f577deb0cb4d9f63fad7d3c591b528caee5583839c481d23c1737e8646dd681
1
+ 7b2b797876e13355724bf86b591ebc3bd278cbb4c6c80b55ee5bd5cc80dcd174e67f5f1ff6c9d9901bcf5042799520c481924e8dad2e672b71ca7912db357f1a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "57.0.15",
3
+ "version": "57.0.17",
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-module-scripts": "56.0.3",
100
- "expo": "57.0.19"
99
+ "expo": "57.0.21",
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": "b76ecf192c5325793bcea31dd9bb8efd91f9ad7f",
124
+ "gitHead": "ee89f7c31877f111cb1705c8e5c2c8078fa80a03",
125
125
  "scripts": {
126
126
  "build": "expo-module build",
127
127
  "clean": "expo-module clean",
package/spm.config.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "ExpoUI",
6
6
  "podName": "ExpoUI",
7
7
  "platforms": [
8
- "iOS(.v16)"
8
+ "iOS(\"16.4\")"
9
9
  ],
10
10
  "externalDependencies": [
11
11
  "ReactNativeDependencies",
@@ -200,9 +200,11 @@ export function BottomSheet(props: BottomSheetProps) {
200
200
  shouldDismissOnClickOutside: enablePanDownToClose,
201
201
  }}>
202
202
  <RNHostView matchContents={fitToContents}>
203
- {/* flexGrow:1 + height:0 (flex-basis 0) fills RNHostView's measured height without
204
- inheriting the scrollable child's content height, which would block scrolling to the end. */}
205
- <View style={fitToContents ? undefined : { flexGrow: 1, height: 0 }}>
203
+ {/* With matchContents, RNHostView lays the hosted view out at its own size, so `width` gives it
204
+ the sheet width while its height stays content-sized. Otherwise flexGrow:1 + height:0
205
+ (flex-basis 0) fills RNHostView's measured height without inheriting the scrollable
206
+ child's content height, which would block scrolling to the end. */}
207
+ <View style={fitToContents ? { width } : { flexGrow: 1, height: 0 }}>
206
208
  <SheetScrollContextReset>{children}</SheetScrollContextReset>
207
209
  </View>
208
210
  </RNHostView>
@@ -234,12 +234,13 @@ export function BottomSheet(props: BottomSheetProps) {
234
234
  <RNHostView matchContents={fitToContents}>
235
235
  {/* paddingTop compensates for tighter spacing between native drag indicator and content
236
236
  compared to gorhom's handle. flexGrow:1 + height:0 (flex-basis 0) fills the snap-point
237
- height without inheriting the scrollable child's intrinsic content height. Omitted for fitToContents
238
- so RNHostView can measure natural content height. */}
237
+ height without inheriting the scrollable child's intrinsic content height. With matchContents,
238
+ RNHostView lays the hosted view out at its own size, so `width` gives it the sheet width
239
+ while its height stays content-sized. */}
239
240
  <View
240
241
  style={
241
242
  fitToContents
242
- ? { paddingTop: handleComponent !== null ? 16 : 0 }
243
+ ? { width, paddingTop: handleComponent !== null ? 16 : 0 }
243
244
  : { flexGrow: 1, height: 0, paddingTop: handleComponent !== null ? 16 : 0 }
244
245
  }>
245
246
  <SheetScrollContextReset>{children}</SheetScrollContextReset>
@@ -8,6 +8,20 @@ export type AndroidVariant = 'picker' | 'input';
8
8
 
9
9
  export type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
10
10
 
11
+ /**
12
+ * The date range reported by `DateRangePicker` and `DateRangePickerDialog`.
13
+ */
14
+ export type DateRangeSelection = {
15
+ /**
16
+ * The selected start date, or `null` when no start date is selected.
17
+ */
18
+ start: Date | null;
19
+ /**
20
+ * The selected end date, or `null` until the user selects the second date of the range.
21
+ */
22
+ end: Date | null;
23
+ };
24
+
11
25
  /**
12
26
  * Color overrides for the Material 3 DatePicker component.
13
27
  * All properties are optional — unset values use Material 3 theme defaults.
@@ -177,6 +191,10 @@ function convertSelectableDates(selectableDates?: {
177
191
  };
178
192
  }
179
193
 
194
+ function convertTimestampToDate(timestamp: number | null): Date | null {
195
+ return timestamp == null ? null : new Date(timestamp);
196
+ }
197
+
180
198
  function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps {
181
199
  const { modifiers, variant, initialDate, selectableDates, elementColors, color, ...rest } = props;
182
200
 
@@ -210,6 +228,100 @@ export function DateTimePicker(props: DateTimePickerProps) {
210
228
  return <DatePickerNativeView {...transformDateTimePickerProps(props)} />;
211
229
  }
212
230
 
231
+ export interface DateRangePickerProps {
232
+ /**
233
+ * The initially selected start date, as an ISO 8601 string.
234
+ */
235
+ initialStartDate?: string | null;
236
+ /**
237
+ * The initially selected end date, as an ISO 8601 string. It must be on or after `initialStartDate`.
238
+ */
239
+ initialEndDate?: string | null;
240
+ /**
241
+ * Called once when the component mounts with the initial range, and again whenever the selected date range changes.
242
+ * The end date is `null` while the user is selecting a range.
243
+ */
244
+ onDateRangeSelected?: (range: DateRangeSelection) => void;
245
+ /**
246
+ * The variant of the picker, which determines its appearance and behavior.
247
+ * @default 'picker'
248
+ */
249
+ variant?: AndroidVariant;
250
+ /**
251
+ * Show a button to toggle between variants on Android.
252
+ * @default true
253
+ */
254
+ showVariantToggle?: boolean;
255
+ /**
256
+ * The tint color to use on the picker elements.
257
+ */
258
+ color?: ColorValue;
259
+ /**
260
+ * Fine-grained color overrides for individual picker elements.
261
+ */
262
+ elementColors?: DatePickerElementColors;
263
+ /**
264
+ * Constrains which dates can be selected. `start` is the earliest selectable date and `end` is
265
+ * the latest.
266
+ */
267
+ selectableDates?: { start?: Date; end?: Date };
268
+ /**
269
+ * Modifiers for the component.
270
+ */
271
+ modifiers?: ModifierConfig[];
272
+ }
273
+
274
+ type NativeDateRangePickerProps = Omit<
275
+ DateRangePickerProps,
276
+ 'onDateRangeSelected' | 'initialStartDate' | 'initialEndDate' | 'selectableDates'
277
+ > & {
278
+ initialStartDate?: number | null;
279
+ initialEndDate?: number | null;
280
+ selectableDates?: { start?: number | null; end?: number | null } | null;
281
+ } & ViewEvent<'onDateRangeSelected', { start: number | null; end: number | null }>;
282
+
283
+ function transformDateRangePickerProps(
284
+ props: Omit<DateRangePickerProps, 'modifiers'>
285
+ ): Omit<NativeDateRangePickerProps, 'modifiers'> {
286
+ const {
287
+ initialStartDate,
288
+ initialEndDate,
289
+ selectableDates,
290
+ elementColors,
291
+ onDateRangeSelected,
292
+ ...rest
293
+ } = props;
294
+ return {
295
+ ...rest,
296
+ initialStartDate: initialStartDate ? new Date(initialStartDate).getTime() : null,
297
+ initialEndDate: initialEndDate ? new Date(initialEndDate).getTime() : null,
298
+ selectableDates: convertSelectableDates(selectableDates),
299
+ onDateRangeSelected: ({ nativeEvent: { start, end } }) => {
300
+ onDateRangeSelected?.({
301
+ start: convertTimestampToDate(start),
302
+ end: convertTimestampToDate(end),
303
+ });
304
+ },
305
+ ...(elementColors != null ? { elementColors } : undefined),
306
+ };
307
+ }
308
+
309
+ const DateRangePickerNativeView: React.ComponentType<NativeDateRangePickerProps> =
310
+ requireNativeView('ExpoUI', 'DateRangePickerView');
311
+
312
+ /**
313
+ * Renders an inline Material 3 date range picker.
314
+ */
315
+ export function DateRangePicker(props: DateRangePickerProps) {
316
+ const { modifiers, ...rest } = props;
317
+ const nativeProps: NativeDateRangePickerProps = {
318
+ modifiers,
319
+ ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
320
+ ...transformDateRangePickerProps(rest),
321
+ };
322
+ return <DateRangePickerNativeView {...nativeProps} />;
323
+ }
324
+
213
325
  // -- Dialog views (used internally by the compat layer) ---------------------
214
326
 
215
327
  export interface DatePickerDialogProps {
@@ -260,6 +372,46 @@ export function DatePickerDialog(props: DatePickerDialogProps) {
260
372
  return <DatePickerDialogNativeView {...nativeProps} />;
261
373
  }
262
374
 
375
+ export interface DateRangePickerDialogProps extends Omit<DateRangePickerProps, 'modifiers'> {
376
+ /**
377
+ * The label for the button that confirms the selected range.
378
+ * Defaults to the system "Ok" string.
379
+ */
380
+ confirmButtonLabel?: string;
381
+ /**
382
+ * The label for the button that dismisses the dialog.
383
+ * Defaults to the system "Cancel" string.
384
+ */
385
+ dismissButtonLabel?: string;
386
+ /** The tint color to use on the picker elements and dialog buttons. */
387
+ color?: ColorValue;
388
+ /** Callback function that is called when the user confirms a complete date range. */
389
+ onDateRangeSelected?: (range: DateRangeSelection) => void;
390
+ /** Callback function that is called when the dialog is dismissed. */
391
+ onDismissRequest: () => void;
392
+ }
393
+
394
+ type NativeDateRangePickerDialogProps = Omit<NativeDateRangePickerProps, 'modifiers'> &
395
+ Pick<DateRangePickerDialogProps, 'confirmButtonLabel' | 'dismissButtonLabel'> &
396
+ ViewEvent<'onDismissRequest', void>;
397
+
398
+ const DateRangePickerDialogNativeView: React.ComponentType<NativeDateRangePickerDialogProps> =
399
+ requireNativeView('ExpoUI', 'DateRangePickerDialogView');
400
+
401
+ /**
402
+ * Renders a modal Material 3 date range picker.
403
+ */
404
+ export function DateRangePickerDialog(props: DateRangePickerDialogProps) {
405
+ const { confirmButtonLabel, dismissButtonLabel, onDismissRequest, ...rest } = props;
406
+ const nativeProps: NativeDateRangePickerDialogProps = {
407
+ ...transformDateRangePickerProps(rest),
408
+ confirmButtonLabel,
409
+ dismissButtonLabel,
410
+ onDismissRequest,
411
+ };
412
+ return <DateRangePickerDialogNativeView {...nativeProps} />;
413
+ }
414
+
263
415
  export interface TimePickerDialogProps {
264
416
  initialDate?: string | null;
265
417
  is24Hour?: boolean;
@@ -1,17 +1,37 @@
1
1
  import { requireNativeView } from 'expo';
2
+ import type { ColorValue } from 'react-native';
2
3
 
3
4
  import { type ModifierConfig, type ViewEvent } from '../../types';
4
5
  import { createViewModifierEventListener } from '../modifiers/utils';
5
6
 
7
+ /**
8
+ * Colors for the radio button in different states.
9
+ */
10
+ export type RadioButtonColors = {
11
+ selectedColor?: ColorValue;
12
+ unselectedColor?: ColorValue;
13
+ disabledSelectedColor?: ColorValue;
14
+ disabledUnselectedColor?: ColorValue;
15
+ };
16
+
6
17
  export interface RadioButtonProps {
7
18
  /**
8
19
  * Whether the radio button is selected.
9
20
  */
10
21
  selected: boolean;
22
+ /**
23
+ * Whether the radio button is enabled.
24
+ * @default true
25
+ */
26
+ enabled?: boolean;
11
27
  /**
12
28
  * Callback that is called when the radio button is clicked.
13
29
  */
14
30
  onClick?: () => void;
31
+ /**
32
+ * Colors for the radio button in different states.
33
+ */
34
+ colors?: RadioButtonColors;
15
35
  /**
16
36
  * Modifiers for the component.
17
37
  */
@@ -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 };