@expo/ui 57.0.16 → 57.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +31 -20
  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/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +2 -0
  8. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +2 -1
  9. package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
  10. package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
  11. package/build/jetpack-compose/DatePicker/index.d.ts +88 -0
  12. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  13. package/build/jetpack-compose/DropdownMenu/index.d.ts +7 -0
  14. package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -1
  15. package/build/jetpack-compose/RadioButton/index.d.ts +19 -0
  16. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  17. package/build/swift-ui/Button/index.d.ts +3 -1
  18. package/build/swift-ui/Button/index.d.ts.map +1 -1
  19. package/build/swift-ui/NavigationDestination/index.d.ts +30 -0
  20. package/build/swift-ui/NavigationDestination/index.d.ts.map +1 -0
  21. package/build/swift-ui/NavigationLink/index.d.ts +32 -0
  22. package/build/swift-ui/NavigationLink/index.d.ts.map +1 -0
  23. package/build/swift-ui/NavigationStack/index.d.ts +45 -0
  24. package/build/swift-ui/NavigationStack/index.d.ts.map +1 -0
  25. package/build/swift-ui/Toolbar/index.d.ts +40 -0
  26. package/build/swift-ui/Toolbar/index.d.ts.map +1 -0
  27. package/build/swift-ui/index.d.ts +4 -0
  28. package/build/swift-ui/index.d.ts.map +1 -1
  29. package/build/swift-ui/modifiers/containerBackground.d.ts +9 -4
  30. package/build/swift-ui/modifiers/containerBackground.d.ts.map +1 -1
  31. package/build/swift-ui/modifiers/index.d.ts +47 -10
  32. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  33. package/build/swift-ui/modifiers/presentationModifiers.d.ts +6 -3
  34. package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
  35. package/expo-module.config.json +1 -1
  36. package/ios/Button/Button.swift +13 -0
  37. package/ios/Button/ButtonProps.swift +6 -0
  38. package/ios/ExpoUIModule.swift +4 -0
  39. package/ios/Modifiers/ContainerBackgroundModifier.swift +4 -4
  40. package/ios/Modifiers/PresentationModifiers.swift +3 -3
  41. package/ios/Modifiers/ScrollClipDisabledModifier.swift +16 -0
  42. package/ios/Modifiers/ViewModifierRegistry.swift +35 -8
  43. package/ios/NavigationLinkView.swift +22 -0
  44. package/ios/NavigationStackView.swift +63 -0
  45. package/ios/SlotView.swift +5 -0
  46. package/ios/ToolbarView.swift +33 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.16/expo.modules.ui-57.0.16-sources.jar → 57.0.18/expo.modules.ui-57.0.18-sources.jar} +0 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.md5 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.sha1 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.sha256 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18-sources.jar.sha512 +1 -0
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar +0 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.md5 +1 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha1 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha256 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.aar.sha512 +1 -0
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.16/expo.modules.ui-57.0.16.module → 57.0.18/expo.modules.ui-57.0.18.module} +22 -22
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.md5 +1 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha1 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha256 +1 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.module.sha512 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.16/expo.modules.ui-57.0.16.pom → 57.0.18/expo.modules.ui-57.0.18.pom} +1 -1
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.md5 +1 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha1 +1 -0
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha256 +1 -0
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.18/expo.modules.ui-57.0.18.pom.sha512 +1 -0
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  72. package/package.json +3 -3
  73. package/spm.config.json +1 -1
  74. package/src/community/bottom-sheet/BottomSheet.android.tsx +5 -3
  75. package/src/community/bottom-sheet/BottomSheet.ios.tsx +4 -3
  76. package/src/jetpack-compose/DatePicker/index.tsx +156 -0
  77. package/src/jetpack-compose/DropdownMenu/index.tsx +9 -0
  78. package/src/jetpack-compose/RadioButton/index.tsx +20 -0
  79. package/src/swift-ui/Button/index.tsx +3 -1
  80. package/src/swift-ui/NavigationDestination/index.tsx +39 -0
  81. package/src/swift-ui/NavigationLink/index.tsx +51 -0
  82. package/src/swift-ui/NavigationStack/index.tsx +75 -0
  83. package/src/swift-ui/Toolbar/index.tsx +64 -0
  84. package/src/swift-ui/index.tsx +4 -0
  85. package/src/swift-ui/modifiers/containerBackground.ts +10 -5
  86. package/src/swift-ui/modifiers/index.ts +67 -9
  87. package/src/swift-ui/modifiers/presentationModifiers.ts +7 -4
  88. package/src/universal/transformStyle.ios.ts +2 -2
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.md5 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha1 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha256 +0 -1
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16-sources.jar.sha512 +0 -1
  93. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar +0 -0
  94. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.md5 +0 -1
  95. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha1 +0 -1
  96. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha256 +0 -1
  97. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.aar.sha512 +0 -1
  98. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.md5 +0 -1
  99. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha1 +0 -1
  100. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha256 +0 -1
  101. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.module.sha512 +0 -1
  102. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.md5 +0 -1
  103. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha1 +0 -1
  104. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.16/expo.modules.ui-57.0.16.pom.sha256 +0 -1
  105. 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,33 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 57.0.18 — 2026-09-11
14
+
15
+ ### 🎉 New features
16
+
17
+ - [Android] Add `shadowElevation` to `DropdownMenu` to customize the popup shadow in dp. ([#49896](https://github.com/expo/expo/pull/49896) by [@maxlapides](https://github.com/maxlapides))
18
+ - [iOS] Added the `NavigationStack` and `Toolbar` components, the `navigationTitle` modifier, and the `close` button role. ([#49940](https://github.com/expo/expo/pull/49940) by [@nishan](https://github.com/intergalacticspacehighway))
19
+ - [iOS] Added the `NavigationLink` component, and the `path` and `onPathChange` props and the `NavigationDestination` component, so a stack can push a destination that is built only when the link is followed. ([#49991](https://github.com/expo/expo/pull/49991) by [@nishan](https://github.com/intergalacticspacehighway))
20
+
21
+ ### 🐛 Bug fixes
22
+
23
+ - [Android] Fix `DatePickerDialog` preselecting today when `initialDate` is omitted, and keep its confirm button disabled while no date is selected so `onDateSelected` never receives an invalid date. ([#49898](https://github.com/expo/expo/pull/49898) by [@pataar](https://github.com/pataar))
24
+
25
+ ## 57.0.17 — 2026-09-08
26
+
27
+ ### 🎉 New features
28
+
29
+ - [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))
30
+ - [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))
31
+ - [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))
32
+ - [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))
33
+ - [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))
34
+
35
+ ### 🐛 Bug fixes
36
+
37
+ - [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))
38
+ - [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))
39
+
13
40
  ## 57.0.16 — 2026-09-04
14
41
 
15
42
  ### 🎉 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.18'
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.18"
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) {
@@ -333,7 +357,7 @@ fun ExpoDatePickerDialogContent(props: DatePickerDialogProps, onDateSelected: (D
333
357
  DatePickerState(
334
358
  initialDisplayMode = variant,
335
359
  locale = locale,
336
- initialSelectedDateMillis = initialDate,
360
+ initialSelectedDateMillis = props.initialDate,
337
361
  initialDisplayedMonthMillis = initialDate,
338
362
  yearRange = yearRange,
339
363
  selectableDates = selectableDates
@@ -347,7 +371,7 @@ fun ExpoDatePickerDialogContent(props: DatePickerDialogProps, onDateSelected: (D
347
371
  DatePickerDialog(
348
372
  onDismissRequest = { onDismissRequest() },
349
373
  confirmButton = {
350
- TextButton(onClick = { onDateSelected(DatePickerResult(date = state.selectedDateMillis)) }, colors = buttonColors) {
374
+ TextButton(onClick = { onDateSelected(DatePickerResult(date = state.selectedDateMillis)) }, enabled = state.selectedDateMillis != null, colors = buttonColors) {
351
375
  Text(props.confirmButtonLabel ?: stringResource(android.R.string.ok))
352
376
  }
353
377
  },
@@ -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
  }
@@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Box
4
4
  import androidx.compose.material3.DropdownMenu
5
5
  import androidx.compose.material3.MenuDefaults
6
6
  import androidx.compose.runtime.Composable
7
+ import androidx.compose.ui.unit.dp
7
8
  import expo.modules.kotlin.views.FunctionalComposableScope
8
9
  import expo.modules.ui.UIComposableScope
9
10
  import expo.modules.ui.ModifierRegistry
@@ -24,6 +25,7 @@ fun FunctionalComposableScope.DropdownMenuContent(
24
25
 
25
26
  DropdownMenu(
26
27
  containerColor = props.color?.composeOrNull ?: MenuDefaults.containerColor,
28
+ shadowElevation = props.shadowElevation?.dp ?: MenuDefaults.ShadowElevation,
27
29
  expanded = props.expanded,
28
30
  onDismissRequest = onDismissRequest
29
31
  ) {
@@ -16,5 +16,6 @@ data class DropdownMenuProps(
16
16
  val activationMethod: ActivationMethod = ActivationMethod.SINGLE_PRESS,
17
17
  val expanded: Boolean = false,
18
18
  val color: Color? = null,
19
- val modifiers: ModifierList = emptyList()
19
+ val modifiers: ModifierList = emptyList(),
20
+ val shadowElevation: Float? = null
20
21
  ) : ComposeProps
@@ -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,7 +167,60 @@ 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 {
220
+ /**
221
+ * The initially selected date. When omitted, the dialog opens on the current month with no
222
+ * selection and the confirm button stays disabled until a date is picked.
223
+ */
158
224
  initialDate?: string | null;
159
225
  variant?: AndroidVariant;
160
226
  showVariantToggle?: boolean;
@@ -170,6 +236,28 @@ export interface DatePickerDialogProps {
170
236
  onDismissRequest: () => void;
171
237
  }
172
238
  export declare function DatePickerDialog(props: DatePickerDialogProps): import("react/jsx-runtime").JSX.Element;
239
+ export interface DateRangePickerDialogProps extends Omit<DateRangePickerProps, 'modifiers'> {
240
+ /**
241
+ * The label for the button that confirms the selected range.
242
+ * Defaults to the system "Ok" string.
243
+ */
244
+ confirmButtonLabel?: string;
245
+ /**
246
+ * The label for the button that dismisses the dialog.
247
+ * Defaults to the system "Cancel" string.
248
+ */
249
+ dismissButtonLabel?: string;
250
+ /** The tint color to use on the picker elements and dialog buttons. */
251
+ color?: ColorValue;
252
+ /** Callback function that is called when the user confirms a complete date range. */
253
+ onDateRangeSelected?: (range: DateRangeSelection) => void;
254
+ /** Callback function that is called when the dialog is dismissed. */
255
+ onDismissRequest: () => void;
256
+ }
257
+ /**
258
+ * Renders a modal Material 3 date range picker.
259
+ */
260
+ export declare function DateRangePickerDialog(props: DateRangePickerDialogProps): import("react/jsx-runtime").JSX.Element;
173
261
  export interface TimePickerDialogProps {
174
262
  initialDate?: string | null;
175
263
  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,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CAAC;QAAC,GAAG,CAAC,EAAE,IAAI,CAAA;KAAE,CAAC;IAC/C,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAqBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAc5D;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC;IACzF;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uEAAuE;IACvE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC1D,qEAAqE;IACrE,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AASD;;GAEG;AACH,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"}
@@ -23,6 +23,13 @@ export interface DropdownMenuProps {
23
23
  * The color of the container holding the dropdown menu items.
24
24
  */
25
25
  color?: ColorValue;
26
+ /**
27
+ * Shadow elevation of the dropdown menu popup in dp. Set to `0` to remove the shadow.
28
+ * Defaults to Material3's `MenuDefaults.ShadowElevation`.
29
+ *
30
+ * @platform android
31
+ */
32
+ shadowElevation?: number;
26
33
  /**
27
34
  * Optional styles to apply to the `DropdownMenu`.
28
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DropdownMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAclD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAWD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAOnD;yBAPe,KAAK;;;AAUrB;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAErD;yBAFe,OAAO;;;AAKvB;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAErD;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAW7C;kBAXQ,YAAY;;;;;AAiBrB,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E,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -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"}
@@ -5,8 +5,10 @@ import { type CommonViewModifierProps } from '../types';
5
5
  * - `default` - The default button role.
6
6
  * - `cancel` - A button that cancels the current operation.
7
7
  * - `destructive` - A button that deletes data or performs a destructive action.
8
+ * - `close` - A button that closes the view it is presented in. Given no `label` and no children,
9
+ * the system draws it as an xmark.
8
10
  */
9
- export type ButtonRole = 'default' | 'cancel' | 'destructive';
11
+ export type ButtonRole = 'default' | 'cancel' | 'destructive' | 'close';
10
12
  export interface ButtonProps extends CommonViewModifierProps {
11
13
  /**
12
14
  * A callback that is called when the button is pressed.