@expo/ui 57.0.16 → 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 (75) hide show
  1. package/CHANGELOG.md +15 -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 +17 -0
  6. package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +23 -1
  7. package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
  8. package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
  9. package/build/jetpack-compose/DatePicker/index.d.ts +84 -0
  10. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  11. package/build/jetpack-compose/RadioButton/index.d.ts +19 -0
  12. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  13. package/build/swift-ui/modifiers/containerBackground.d.ts +9 -4
  14. package/build/swift-ui/modifiers/containerBackground.d.ts.map +1 -1
  15. package/build/swift-ui/modifiers/index.d.ts +41 -10
  16. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  17. package/build/swift-ui/modifiers/presentationModifiers.d.ts +6 -3
  18. package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
  19. package/expo-module.config.json +1 -1
  20. package/ios/Modifiers/ContainerBackgroundModifier.swift +4 -4
  21. package/ios/Modifiers/PresentationModifiers.swift +3 -3
  22. package/ios/Modifiers/ScrollClipDisabledModifier.swift +16 -0
  23. package/ios/Modifiers/ViewModifierRegistry.swift +18 -8
  24. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.16/expo.modules.ui-57.0.16-sources.jar → 57.0.17/expo.modules.ui-57.0.17-sources.jar} +0 -0
  25. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.md5 +1 -0
  26. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha1 +1 -0
  27. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha256 +1 -0
  28. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17-sources.jar.sha512 +1 -0
  29. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar +0 -0
  30. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.md5 +1 -0
  31. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha1 +1 -0
  32. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha256 +1 -0
  33. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.aar.sha512 +1 -0
  34. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.16/expo.modules.ui-57.0.16.module → 57.0.17/expo.modules.ui-57.0.17.module} +22 -22
  35. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.md5 +1 -0
  36. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha1 +1 -0
  37. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha256 +1 -0
  38. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.module.sha512 +1 -0
  39. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.16/expo.modules.ui-57.0.16.pom → 57.0.17/expo.modules.ui-57.0.17.pom} +1 -1
  40. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.md5 +1 -0
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha1 +1 -0
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha256 +1 -0
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.17/expo.modules.ui-57.0.17.pom.sha512 +1 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  49. package/package.json +3 -3
  50. package/spm.config.json +1 -1
  51. package/src/community/bottom-sheet/BottomSheet.android.tsx +5 -3
  52. package/src/community/bottom-sheet/BottomSheet.ios.tsx +4 -3
  53. package/src/jetpack-compose/DatePicker/index.tsx +152 -0
  54. package/src/jetpack-compose/RadioButton/index.tsx +20 -0
  55. package/src/swift-ui/modifiers/containerBackground.ts +10 -5
  56. package/src/swift-ui/modifiers/index.ts +58 -8
  57. package/src/swift-ui/modifiers/presentationModifiers.ts +7 -4
  58. package/src/universal/transformStyle.ios.ts +2 -2
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.md5 +0 -1
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha1 +0 -1
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha256 +0 -1
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha512 +0 -1
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar +0 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.md5 +0 -1
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha1 +0 -1
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha256 +0 -1
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha512 +0 -1
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.md5 +0 -1
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha1 +0 -1
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha256 +0 -1
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha512 +0 -1
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.md5 +0 -1
  73. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha1 +0 -1
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha256 +0 -1
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,21 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 57.0.17 — 2026-09-08
14
+
15
+ ### 🎉 New features
16
+
17
+ - [Android] Added the `enabled` and `colors` props to the Jetpack Compose `RadioButton` component. ([#49852](https://github.com/expo/expo/pull/49852) by [@felipe-software](https://github.com/felipe-software))
18
+ - [iOS] Taught the `presentationBackground` modifier to paint with any `ShapeStyle`, matching SwiftUI, so a sheet can be backed by a material, a gradient or a hierarchical style instead of only a color. iOS 26 renders a material as a flat color rather than a translucent blur. ([#49767](https://github.com/expo/expo/pull/49767) by [@Den1Marshall](https://github.com/Den1Marshall))
19
+ - [iOS] Added the `scrollClipDisabled` modifier, which lets content that draws outside a scrollable view's bounds, such as a shadow or a scaled-up card, stay visible instead of being clipped. ([#49780](https://github.com/expo/expo/pull/49780) by [@Den1Marshall](https://github.com/Den1Marshall))
20
+ - [iOS] Taught the `tint`, `border`, `strokeBorder` and `containerBackground` modifiers to paint with any `ShapeStyle`, matching SwiftUI, where all four take a `ShapeStyle` rather than a color. The `color` parameter of `border` and `strokeBorder` is deprecated in favor of `content`, the name SwiftUI gives it. ([#49838](https://github.com/expo/expo/pull/49838) by [@Den1Marshall](https://github.com/Den1Marshall))
21
+ - [Android] Added the Jetpack Compose `DateRangePicker` and `DateRangePickerDialog` components. ([#49788](https://github.com/expo/expo/pull/49788) by [@felipe-software](https://github.com/felipe-software))
22
+
23
+ ### 🐛 Bug fixes
24
+
25
+ - [Android][iOS] Fix `community/bottom-sheet` content shrinking to its own width instead of filling the sheet when the sheet sizes to its content. ([#49742](https://github.com/expo/expo/issues/49742) by [@agung-adhinata](https://github.com/agung-adhinata)) ([#49762](https://github.com/expo/expo/pull/49762) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
26
+ - [iOS] Fixed `PlatformColor` and `DynamicColorIOS` values dropping the `backgroundColor` and `borderColor` of a universal component. Both were stringified to `"[object Object]"`, which the native color converter rejects, so the modifier was discarded without a trace. ([#49746](https://github.com/expo/expo/pull/49746) by [@Den1Marshall](https://github.com/Den1Marshall))
27
+
13
28
  ## 57.0.16 — 2026-09-04
14
29
 
15
30
  ### 🎉 New features
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
12
12
  apply plugin: 'org.jetbrains.kotlin.plugin.compose'
13
13
 
14
14
  group = 'expo.modules.ui'
15
- version = '57.0.16'
15
+ version = '57.0.17'
16
16
 
17
17
  android {
18
18
  namespace "expo.modules.ui"
19
19
  defaultConfig {
20
20
  versionCode 1
21
- versionName "57.0.16"
21
+ versionName "57.0.17"
22
22
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
23
23
  }
24
24
  buildFeatures {
@@ -242,10 +242,14 @@ fun rememberSelectableDates(selectableDatesRecord: SelectableDatesRecord?): Sele
242
242
  // https://github.com/expo/expo/issues/47206
243
243
  @OptIn(ExperimentalMaterial3Api::class)
244
244
  @Composable
245
- fun rememberDatePickerYearRange(selectableDatesRecord: SelectableDatesRecord?, initialDateMillis: Long): IntRange {
245
+ fun rememberDatePickerYearRange(
246
+ selectableDatesRecord: SelectableDatesRecord?,
247
+ initialDateMillis: Long,
248
+ initialEndDateMillis: Long? = null
249
+ ): IntRange {
246
250
  val start = selectableDatesRecord?.start
247
251
  val end = selectableDatesRecord?.end
248
- return remember(start, end, initialDateMillis) {
252
+ return remember(start, end, initialDateMillis, initialEndDateMillis) {
249
253
  val defaults = DatePickerDefaults.YearRange
250
254
  val yearOf = { millis: Long ->
251
255
  Calendar.getInstance().apply { timeInMillis = millis }.get(Calendar.YEAR)
@@ -254,8 +258,9 @@ fun rememberDatePickerYearRange(selectableDatesRecord: SelectableDatesRecord?, i
254
258
  val endYear = end?.let(yearOf) ?: defaults.last
255
259
  // Keep the initially selected/displayed year inside the range so Material3 doesn't discard the
256
260
  // selection
257
- val initialYear = yearOf(initialDateMillis)
258
- minOf(startYear, initialYear)..maxOf(endYear, initialYear)
261
+ val initialStartYear = yearOf(initialDateMillis)
262
+ val initialEndYear = initialEndDateMillis?.let(yearOf) ?: initialStartYear
263
+ minOf(startYear, initialStartYear, initialEndYear)..maxOf(endYear, initialStartYear, initialEndYear)
259
264
  }
260
265
  }
261
266
 
@@ -319,6 +324,25 @@ fun buildTimePickerColors(
319
324
  )
320
325
  }
321
326
 
327
+ @OptIn(ExperimentalMaterial3Api::class)
328
+ @Composable
329
+ internal fun ApplyDatePickerDialogKeyboardBehavior(displayMode: DisplayMode) {
330
+ val view = LocalView.current
331
+ val keyboardController = LocalSoftwareKeyboardController.current
332
+ val originalSoftInputMode = remember(view) {
333
+ (view.parent as? DialogWindowProvider)?.window?.attributes?.softInputMode
334
+ }
335
+ SideEffect {
336
+ val window = (view.parent as? DialogWindowProvider)?.window ?: return@SideEffect
337
+ if (displayMode == DisplayMode.Picker) {
338
+ window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
339
+ keyboardController?.hide()
340
+ } else if (originalSoftInputMode != null) {
341
+ window.setSoftInputMode(originalSoftInputMode)
342
+ }
343
+ }
344
+ }
345
+
322
346
  @OptIn(ExperimentalMaterial3Api::class)
323
347
  @Composable
324
348
  fun ExpoDatePickerDialogContent(props: DatePickerDialogProps, onDateSelected: (DatePickerResult) -> Unit, onDismissRequest: () -> Unit) {
@@ -358,21 +382,8 @@ fun ExpoDatePickerDialogContent(props: DatePickerDialogProps, onDateSelected: (D
358
382
  },
359
383
  colors = colors
360
384
  ) {
361
- val view = LocalView.current
362
- val keyboardController = LocalSoftwareKeyboardController.current
363
385
  val displayMode = state.displayMode
364
- val originalSoftInputMode = remember(view) {
365
- (view.parent as? DialogWindowProvider)?.window?.attributes?.softInputMode
366
- }
367
- SideEffect {
368
- val window = (view.parent as? DialogWindowProvider)?.window ?: return@SideEffect
369
- if (displayMode == DisplayMode.Picker) {
370
- window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING)
371
- keyboardController?.hide()
372
- } else if (originalSoftInputMode != null) {
373
- window.setSoftInputMode(originalSoftInputMode)
374
- }
375
- }
386
+ ApplyDatePickerDialogKeyboardBehavior(displayMode)
376
387
 
377
388
  // Material3's year-selector chevron tints from the ambient LocalContentColor (which defaults to
378
389
  // black), not `navigationContentColor`; bind the local so the chevron honors the navigation color.
@@ -0,0 +1,191 @@
1
+ package expo.modules.ui
2
+
3
+ import androidx.compose.material3.ButtonDefaults
4
+ import androidx.compose.material3.DatePickerDefaults
5
+ import androidx.compose.material3.DatePickerDialog
6
+ import androidx.compose.material3.DateRangePicker
7
+ import androidx.compose.material3.DateRangePickerState
8
+ import androidx.compose.material3.ExperimentalMaterial3Api
9
+ import androidx.compose.material3.LocalContentColor
10
+ import androidx.compose.material3.Text
11
+ import androidx.compose.material3.TextButton
12
+ import androidx.compose.runtime.Composable
13
+ import androidx.compose.runtime.CompositionLocalProvider
14
+ import androidx.compose.runtime.LaunchedEffect
15
+ import androidx.compose.runtime.remember
16
+ import androidx.compose.ui.platform.LocalConfiguration
17
+ import androidx.compose.ui.res.stringResource
18
+ import expo.modules.kotlin.records.Field
19
+ import expo.modules.kotlin.records.Record
20
+ import expo.modules.kotlin.types.OptimizedRecord
21
+ import expo.modules.kotlin.views.ComposeProps
22
+ import expo.modules.kotlin.views.FunctionalComposableScope
23
+ import expo.modules.kotlin.views.OptimizedComposeProps
24
+ import java.util.Date
25
+ import android.graphics.Color as AndroidColor
26
+
27
+ @OptimizedRecord
28
+ data class DateRangePickerResult(
29
+ @Field
30
+ val start: Long?,
31
+ @Field
32
+ val end: Long?
33
+ ) : Record
34
+
35
+ @OptimizedComposeProps
36
+ data class DateRangePickerProps(
37
+ val initialStartDate: Long? = null,
38
+ val initialEndDate: Long? = null,
39
+ val variant: Variant = Variant.PICKER,
40
+ val showVariantToggle: Boolean = true,
41
+ val color: AndroidColor? = null,
42
+ val elementColors: DateTimePickerColorOverrides = DateTimePickerColorOverrides(),
43
+ val selectableDates: SelectableDatesRecord? = null,
44
+ val modifiers: ModifierList = emptyList()
45
+ ) : ComposeProps
46
+
47
+ @OptimizedComposeProps
48
+ data class DateRangePickerDialogProps(
49
+ val initialStartDate: Long? = null,
50
+ val initialEndDate: Long? = null,
51
+ val variant: Variant = Variant.PICKER,
52
+ val showVariantToggle: Boolean = true,
53
+ val confirmButtonLabel: String? = null,
54
+ val dismissButtonLabel: String? = null,
55
+ val color: AndroidColor? = null,
56
+ val elementColors: DateTimePickerColorOverrides = DateTimePickerColorOverrides(),
57
+ val selectableDates: SelectableDatesRecord? = null
58
+ ) : ComposeProps
59
+
60
+ @OptIn(ExperimentalMaterial3Api::class)
61
+ @Composable
62
+ private fun rememberDateRangePickerState(
63
+ initialStartDate: Long?,
64
+ initialEndDate: Long?,
65
+ variant: Variant,
66
+ selectableDatesRecord: SelectableDatesRecord?
67
+ ): DateRangePickerState {
68
+ val locale = LocalConfiguration.current.locales[0]
69
+ val displayMode = variant.toDisplayMode()
70
+ val selectableDates = rememberSelectableDates(selectableDatesRecord)
71
+ val fallbackDate = remember { Date().time }
72
+ val initialDisplayedMonth = initialStartDate ?: fallbackDate
73
+ val yearRange = rememberDatePickerYearRange(
74
+ selectableDatesRecord,
75
+ initialDisplayedMonth,
76
+ initialEndDate
77
+ )
78
+
79
+ val state = remember(locale, displayMode, selectableDates, yearRange) {
80
+ DateRangePickerState(
81
+ locale = locale,
82
+ initialSelectedStartDateMillis = initialStartDate,
83
+ initialSelectedEndDateMillis = initialEndDate,
84
+ initialDisplayedMonthMillis = initialDisplayedMonth,
85
+ yearRange = yearRange,
86
+ initialDisplayMode = displayMode,
87
+ selectableDates = selectableDates
88
+ )
89
+ }
90
+
91
+ LaunchedEffect(state, initialStartDate, initialEndDate) {
92
+ if (state.selectedStartDateMillis != initialStartDate || state.selectedEndDateMillis != initialEndDate) {
93
+ try {
94
+ state.setSelection(initialStartDate, initialEndDate)
95
+ } catch (e: IllegalArgumentException) {
96
+ // Material 3 rejects a range outside the year range or an end date before the start date.
97
+ }
98
+ }
99
+ }
100
+
101
+ return state
102
+ }
103
+
104
+ @OptIn(ExperimentalMaterial3Api::class)
105
+ @Composable
106
+ fun ExpoDateRangePickerDialogContent(
107
+ props: DateRangePickerDialogProps,
108
+ onDateRangeSelected: (DateRangePickerResult) -> Unit,
109
+ onDismissRequest: () -> Unit
110
+ ) {
111
+ val state = rememberDateRangePickerState(
112
+ props.initialStartDate,
113
+ props.initialEndDate,
114
+ props.variant,
115
+ props.selectableDates
116
+ )
117
+ val colors = buildDatePickerColors(props.elementColors, props.color.composeOrNull, DatePickerDefaults.colors())
118
+ val buttonColors = props.color.composeOrNull
119
+ ?.let { ButtonDefaults.textButtonColors(contentColor = it) } ?: ButtonDefaults.textButtonColors()
120
+
121
+ DatePickerDialog(
122
+ onDismissRequest = { onDismissRequest() },
123
+ confirmButton = {
124
+ TextButton(
125
+ onClick = {
126
+ onDateRangeSelected(
127
+ DateRangePickerResult(
128
+ start = state.selectedStartDateMillis,
129
+ end = state.selectedEndDateMillis
130
+ )
131
+ )
132
+ },
133
+ enabled = state.selectedStartDateMillis != null && state.selectedEndDateMillis != null,
134
+ colors = buttonColors
135
+ ) {
136
+ Text(props.confirmButtonLabel ?: stringResource(android.R.string.ok))
137
+ }
138
+ },
139
+ dismissButton = {
140
+ TextButton(onClick = { onDismissRequest() }, colors = buttonColors) {
141
+ Text(props.dismissButtonLabel ?: stringResource(android.R.string.cancel))
142
+ }
143
+ },
144
+ colors = colors
145
+ ) {
146
+ val displayMode = state.displayMode
147
+ ApplyDatePickerDialogKeyboardBehavior(displayMode)
148
+
149
+ CompositionLocalProvider(LocalContentColor provides colors.navigationContentColor) {
150
+ DateRangePicker(
151
+ state = state,
152
+ showModeToggle = props.showVariantToggle,
153
+ colors = colors
154
+ )
155
+ }
156
+ }
157
+ }
158
+
159
+ @OptIn(ExperimentalMaterial3Api::class)
160
+ @Composable
161
+ fun FunctionalComposableScope.DateRangePickerContent(
162
+ props: DateRangePickerProps,
163
+ onDateRangeSelected: (DateRangePickerResult) -> Unit
164
+ ) {
165
+ val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
166
+ val state = rememberDateRangePickerState(
167
+ props.initialStartDate,
168
+ props.initialEndDate,
169
+ props.variant,
170
+ props.selectableDates
171
+ )
172
+
173
+ LaunchedEffect(state.selectedStartDateMillis, state.selectedEndDateMillis) {
174
+ onDateRangeSelected(
175
+ DateRangePickerResult(
176
+ start = state.selectedStartDateMillis,
177
+ end = state.selectedEndDateMillis
178
+ )
179
+ )
180
+ }
181
+
182
+ val colors = buildDatePickerColors(props.elementColors, props.color.composeOrNull)
183
+ CompositionLocalProvider(LocalContentColor provides colors.navigationContentColor) {
184
+ DateRangePicker(
185
+ modifier = modifier,
186
+ state = state,
187
+ showModeToggle = props.showVariantToggle,
188
+ colors = colors
189
+ )
190
+ }
191
+ }
@@ -384,6 +384,14 @@ class ExpoUIModule : Module() {
384
384
  }
385
385
  }
386
386
 
387
+ ExpoUIView<DateRangePickerProps>("DateRangePickerView") {
388
+ val onDateRangeSelected by Event<DateRangePickerResult>()
389
+
390
+ Content { props ->
391
+ DateRangePickerContent(props) { onDateRangeSelected(it) }
392
+ }
393
+ }
394
+
387
395
  ExpoUIView<DatePickerDialogProps>("DatePickerDialogView") {
388
396
  val onDateSelected by Event<DatePickerResult>()
389
397
  val onDismissRequest by Event<Unit>()
@@ -393,6 +401,15 @@ class ExpoUIModule : Module() {
393
401
  }
394
402
  }
395
403
 
404
+ ExpoUIView<DateRangePickerDialogProps>("DateRangePickerDialogView") {
405
+ val onDateRangeSelected by Event<DateRangePickerResult>()
406
+ val onDismissRequest by Event<Unit>()
407
+
408
+ Content { props ->
409
+ ExpoDateRangePickerDialogContent(props, { onDateRangeSelected(it) }, { onDismissRequest(Unit) })
410
+ }
411
+ }
412
+
396
413
  ExpoUIView<TimePickerDialogProps>("TimePickerDialogView") {
397
414
  val onDateSelected by Event<DatePickerResult>()
398
415
  val onDismissRequest by Event<Unit>()
@@ -1,15 +1,30 @@
1
1
  package expo.modules.ui
2
2
 
3
+ import android.graphics.Color
3
4
  import androidx.compose.material3.RadioButton
5
+ import androidx.compose.material3.RadioButtonDefaults
4
6
  import androidx.compose.runtime.Composable
7
+ import expo.modules.kotlin.records.Field
8
+ import expo.modules.kotlin.records.Record
9
+ import expo.modules.kotlin.types.OptimizedRecord
5
10
  import expo.modules.kotlin.views.ComposeProps
6
11
  import expo.modules.kotlin.views.FunctionalComposableScope
7
12
  import expo.modules.kotlin.views.OptimizedComposeProps
8
13
 
14
+ @OptimizedRecord
15
+ data class RadioButtonColors(
16
+ @Field val selectedColor: Color? = null,
17
+ @Field val unselectedColor: Color? = null,
18
+ @Field val disabledSelectedColor: Color? = null,
19
+ @Field val disabledUnselectedColor: Color? = null
20
+ ) : Record
21
+
9
22
  @OptimizedComposeProps
10
23
  data class RadioButtonProps(
11
24
  val selected: Boolean = false,
25
+ val enabled: Boolean = true,
12
26
  val clickable: Boolean = true,
27
+ val colors: RadioButtonColors = RadioButtonColors(),
13
28
  val modifiers: ModifierList = emptyList()
14
29
  ) : ComposeProps
15
30
 
@@ -21,6 +36,13 @@ fun FunctionalComposableScope.RadioButtonContent(
21
36
  RadioButton(
22
37
  selected = props.selected,
23
38
  onClick = onClick,
24
- modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
39
+ modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
40
+ enabled = props.enabled,
41
+ colors = RadioButtonDefaults.colors(
42
+ selectedColor = props.colors.selectedColor.compose,
43
+ unselectedColor = props.colors.unselectedColor.compose,
44
+ disabledSelectedColor = props.colors.disabledSelectedColor.compose,
45
+ disabledUnselectedColor = props.colors.disabledUnselectedColor.compose
46
+ )
25
47
  )
26
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.android.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.android.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqC3C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA+JlD"}
1
+ {"version":3,"file":"BottomSheet.android.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.android.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqC3C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAiKlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.ios.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.ios.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAepE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAwD3C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA2KlD"}
1
+ {"version":3,"file":"BottomSheet.ios.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.ios.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAepE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAwD3C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA4KlD"}
@@ -2,6 +2,19 @@ import { type ColorValue } from 'react-native';
2
2
  import type { ModifierConfig } from '../../types';
3
3
  export type AndroidVariant = 'picker' | 'input';
4
4
  export type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
5
+ /**
6
+ * The date range reported by `DateRangePicker` and `DateRangePickerDialog`.
7
+ */
8
+ export type DateRangeSelection = {
9
+ /**
10
+ * The selected start date, or `null` when no start date is selected.
11
+ */
12
+ start: Date | null;
13
+ /**
14
+ * The selected end date, or `null` until the user selects the second date of the range.
15
+ */
16
+ end: Date | null;
17
+ };
5
18
  /**
6
19
  * Color overrides for the Material 3 DatePicker component.
7
20
  * All properties are optional — unset values use Material 3 theme defaults.
@@ -154,6 +167,55 @@ export interface DateTimePickerProps {
154
167
  * Renders an inline `DateTimePicker` component.
155
168
  */
156
169
  export declare function DateTimePicker(props: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
170
+ export interface DateRangePickerProps {
171
+ /**
172
+ * The initially selected start date, as an ISO 8601 string.
173
+ */
174
+ initialStartDate?: string | null;
175
+ /**
176
+ * The initially selected end date, as an ISO 8601 string. It must be on or after `initialStartDate`.
177
+ */
178
+ initialEndDate?: string | null;
179
+ /**
180
+ * Called once when the component mounts with the initial range, and again whenever the selected date range changes.
181
+ * The end date is `null` while the user is selecting a range.
182
+ */
183
+ onDateRangeSelected?: (range: DateRangeSelection) => void;
184
+ /**
185
+ * The variant of the picker, which determines its appearance and behavior.
186
+ * @default 'picker'
187
+ */
188
+ variant?: AndroidVariant;
189
+ /**
190
+ * Show a button to toggle between variants on Android.
191
+ * @default true
192
+ */
193
+ showVariantToggle?: boolean;
194
+ /**
195
+ * The tint color to use on the picker elements.
196
+ */
197
+ color?: ColorValue;
198
+ /**
199
+ * Fine-grained color overrides for individual picker elements.
200
+ */
201
+ elementColors?: DatePickerElementColors;
202
+ /**
203
+ * Constrains which dates can be selected. `start` is the earliest selectable date and `end` is
204
+ * the latest.
205
+ */
206
+ selectableDates?: {
207
+ start?: Date;
208
+ end?: Date;
209
+ };
210
+ /**
211
+ * Modifiers for the component.
212
+ */
213
+ modifiers?: ModifierConfig[];
214
+ }
215
+ /**
216
+ * Renders an inline Material 3 date range picker.
217
+ */
218
+ export declare function DateRangePicker(props: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
157
219
  export interface DatePickerDialogProps {
158
220
  initialDate?: string | null;
159
221
  variant?: AndroidVariant;
@@ -170,6 +232,28 @@ export interface DatePickerDialogProps {
170
232
  onDismissRequest: () => void;
171
233
  }
172
234
  export declare function DatePickerDialog(props: DatePickerDialogProps): import("react/jsx-runtime").JSX.Element;
235
+ export interface DateRangePickerDialogProps extends Omit<DateRangePickerProps, 'modifiers'> {
236
+ /**
237
+ * The label for the button that confirms the selected range.
238
+ * Defaults to the system "Ok" string.
239
+ */
240
+ confirmButtonLabel?: string;
241
+ /**
242
+ * The label for the button that dismisses the dialog.
243
+ * Defaults to the system "Cancel" string.
244
+ */
245
+ dismissButtonLabel?: string;
246
+ /** The tint color to use on the picker elements and dialog buttons. */
247
+ color?: ColorValue;
248
+ /** Callback function that is called when the user confirms a complete date range. */
249
+ onDateRangeSelected?: (range: DateRangeSelection) => void;
250
+ /** Callback function that is called when the dialog is dismissed. */
251
+ onDismissRequest: () => void;
252
+ }
253
+ /**
254
+ * Renders a modal Material 3 date range picker.
255
+ */
256
+ export declare function DateRangePickerDialog(props: DateRangePickerDialogProps): import("react/jsx-runtime").JSX.Element;
173
257
  export interface TimePickerDialogProps {
174
258
  initialDate?: string | null;
175
259
  is24Hour?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,aAAa,CAAC;AAG7D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,+DAA+D;IAC/D,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,2EAA2E;IAC3E,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,4CAA4C;IAC5C,gBAAgB,CA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H,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAStE;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,aAAa,CAAC,EAAE,uBAAuB,GAAG,uBAAuB,CAAC;IAClE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAcD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAY5D"}
@@ -1,13 +1,32 @@
1
+ import type { ColorValue } from 'react-native';
1
2
  import { type ModifierConfig } from '../../types';
3
+ /**
4
+ * Colors for the radio button in different states.
5
+ */
6
+ export type RadioButtonColors = {
7
+ selectedColor?: ColorValue;
8
+ unselectedColor?: ColorValue;
9
+ disabledSelectedColor?: ColorValue;
10
+ disabledUnselectedColor?: ColorValue;
11
+ };
2
12
  export interface RadioButtonProps {
3
13
  /**
4
14
  * Whether the radio button is selected.
5
15
  */
6
16
  selected: boolean;
17
+ /**
18
+ * Whether the radio button is enabled.
19
+ * @default true
20
+ */
21
+ enabled?: boolean;
7
22
  /**
8
23
  * Callback that is called when the radio button is clicked.
9
24
  */
10
25
  onClick?: () => void;
26
+ /**
27
+ * Colors for the radio button in different states.
28
+ */
29
+ colors?: RadioButtonColors;
11
30
  /**
12
31
  * Modifiers for the component.
13
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/RadioButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,aAAa,CAAC;AAGlE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAuBD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAElD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/RadioButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,aAAa,CAAC;AAGlE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,qBAAqB,CAAC,EAAE,UAAU,CAAC;IACnC,uBAAuB,CAAC,EAAE,UAAU,CAAC;CACtC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAuBD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAElD"}
@@ -1,10 +1,15 @@
1
- import type { Color } from './types';
1
+ import { type ShapeStyle } from './shapeStyle';
2
2
  export type ContainerBackgroundPlacement = 'widget' | 'navigation' | 'navigationSplitView';
3
3
  /**
4
- * Sets the container background of the enclosing container using a view.
5
- * @param color - The color to set as the background of the container.
4
+ * Sets the container background of the enclosing container.
5
+ *
6
+ * > **Note:** `navigation` and `navigationSplitView` require iOS 18. On iOS 17 they fall back to
7
+ * > the `widget` placement.
8
+ *
9
+ * @param style - Any [`ShapeStyle`](#shapestyle): a color, a hierarchical style, a material, or a gradient.
6
10
  * @param container - The type of container to apply the background to.
11
+ * @platform ios 17.0+
7
12
  * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/containerbackground(_:for:)).
8
13
  */
9
- export declare const containerBackground: (color: Color, container: ContainerBackgroundPlacement) => import("./createModifier").ModifierConfig;
14
+ export declare const containerBackground: (style: ShapeStyle, container: ContainerBackgroundPlacement) => import("./createModifier").ModifierConfig;
10
15
  //# sourceMappingURL=containerBackground.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"containerBackground.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/modifiers/containerBackground.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,4BAA4B,GAAG,QAAQ,GAAG,YAAY,GAAG,qBAAqB,CAAC;AAE3F;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,EAAE,WAAW,4BAA4B,8CAC5B,CAAC"}
1
+ {"version":3,"file":"containerBackground.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/modifiers/containerBackground.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,MAAM,4BAA4B,GAAG,QAAQ,GAAG,YAAY,GAAG,qBAAqB,CAAC;AAE3F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,UAAU,EAAE,WAAW,4BAA4B,8CACP,CAAC"}