@expo/ui 58.0.27 → 58.0.28

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 (97) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +9 -0
  4. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +4 -0
  5. package/android/src/main/java/expo/modules/ui/RangeSliderView.kt +126 -0
  6. package/android/src/main/java/expo/modules/ui/ScrollDismissesKeyboard.kt +46 -0
  7. package/android/src/main/java/expo/modules/ui/SliderView.kt +31 -7
  8. package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +1 -8
  9. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuPopup.kt +4 -0
  10. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +21 -0
  11. package/build/jetpack-compose/DropdownMenu/index.d.ts +7 -0
  12. package/build/jetpack-compose/DropdownMenu/index.js.map +1 -1
  13. package/build/jetpack-compose/RangeSlider/index.d.ts +78 -0
  14. package/build/jetpack-compose/RangeSlider/index.js +51 -0
  15. package/build/jetpack-compose/RangeSlider/index.js.map +1 -0
  16. package/build/jetpack-compose/Slider/index.d.ts +15 -0
  17. package/build/jetpack-compose/Slider/index.js.map +1 -1
  18. package/build/jetpack-compose/index.d.ts +1 -0
  19. package/build/jetpack-compose/index.js +1 -0
  20. package/build/jetpack-compose/index.js.map +1 -1
  21. package/build/jetpack-compose/modifiers/index.d.ts +12 -0
  22. package/build/jetpack-compose/modifiers/index.js +11 -0
  23. package/build/jetpack-compose/modifiers/index.js.map +1 -1
  24. package/build/swift-ui/modifiers/index.d.ts +18 -3
  25. package/build/swift-ui/modifiers/index.js +18 -2
  26. package/build/swift-ui/modifiers/index.js.map +1 -1
  27. package/build/swift-ui/modifiers/symbolEffect.d.ts +49 -6
  28. package/build/swift-ui/modifiers/symbolEffect.js +1 -28
  29. package/build/swift-ui/modifiers/symbolEffect.js.map +1 -1
  30. package/build/swift-ui/modifiers/symbolEffectOptions.d.ts +22 -0
  31. package/build/swift-ui/modifiers/symbolEffectOptions.js +30 -0
  32. package/build/swift-ui/modifiers/symbolEffectOptions.js.map +1 -0
  33. package/build/universal/Picker/Picker.android.d.ts +1 -1
  34. package/build/universal/Picker/Picker.android.js +8 -3
  35. package/build/universal/Picker/Picker.android.js.map +1 -1
  36. package/build/universal/Picker/Picker.d.ts +1 -1
  37. package/build/universal/Picker/Picker.ios.d.ts +1 -1
  38. package/build/universal/Picker/Picker.ios.js +5 -2
  39. package/build/universal/Picker/Picker.ios.js.map +1 -1
  40. package/build/universal/Picker/Picker.js +2 -1
  41. package/build/universal/Picker/Picker.js.map +1 -1
  42. package/build/universal/Picker/types.d.ts +4 -0
  43. package/build/universal/Picker/types.js.map +1 -1
  44. package/ios/HostView.swift +0 -1
  45. package/ios/Modifiers/ContentTransitionModifier.swift +49 -0
  46. package/ios/RNHostView.swift +55 -1
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.27/expo.modules.ui-58.0.27-sources.jar → 58.0.28/expo.modules.ui-58.0.28-sources.jar} +0 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28-sources.jar.md5 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28-sources.jar.sha1 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28-sources.jar.sha256 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28-sources.jar.sha512 +1 -0
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.aar +0 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.aar.md5 +1 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.aar.sha1 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.aar.sha256 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.aar.sha512 +1 -0
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.27/expo.modules.ui-58.0.27.module → 58.0.28/expo.modules.ui-58.0.28.module} +22 -22
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.module.md5 +1 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.module.sha1 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.module.sha256 +1 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.module.sha512 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.27/expo.modules.ui-58.0.27.pom → 58.0.28/expo.modules.ui-58.0.28.pom} +1 -1
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.pom.md5 +1 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.pom.sha1 +1 -0
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.pom.sha256 +1 -0
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.28/expo.modules.ui-58.0.28.pom.sha512 +1 -0
  67. package/package.json +1 -1
  68. package/src/jetpack-compose/DropdownMenu/index.tsx +9 -0
  69. package/src/jetpack-compose/RangeSlider/index.tsx +125 -0
  70. package/src/jetpack-compose/Slider/index.tsx +15 -0
  71. package/src/jetpack-compose/index.ts +1 -0
  72. package/src/jetpack-compose/modifiers/index.ts +13 -0
  73. package/src/swift-ui/modifiers/index.ts +28 -4
  74. package/src/swift-ui/modifiers/symbolEffect.ts +53 -27
  75. package/src/swift-ui/modifiers/symbolEffectOptions.ts +22 -0
  76. package/src/universal/Picker/Picker.android.tsx +9 -2
  77. package/src/universal/Picker/Picker.ios.tsx +5 -0
  78. package/src/universal/Picker/Picker.tsx +2 -0
  79. package/src/universal/Picker/types.ts +5 -0
  80. package/ios/Modifiers/HostViewContentMarginsMitigation.swift +0 -98
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.md5 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha1 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha256 +0 -1
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha512 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar +0 -0
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.md5 +0 -1
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha1 +0 -1
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha256 +0 -1
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha512 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.md5 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha1 +0 -1
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha256 +0 -1
  93. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha512 +0 -1
  94. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.md5 +0 -1
  95. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha1 +0 -1
  96. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha256 +0 -1
  97. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 58.0.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [Android] Add an `anchorPosition` prop to `DropdownMenuPopup`. ([#52884](https://github.com/expo/expo/pull/52884) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
8
+ - [Android] Add the `scrollDismissesKeyboard` modifier to Jetpack Compose. ([#52844](https://github.com/expo/expo/pull/52844) by [@jgreuter-ferchau](https://github.com/jgreuter-ferchau))
9
+ - [iOS] Add the `symbolEffect` type to the `contentTransition` modifier to animate an SF Symbol that changes to another symbol, with an optional `automatic` or `replace` effect and symbol effect `options`. ([#52993](https://github.com/expo/expo/pull/52993) by [@sethwebster](https://github.com/sethwebster))
10
+ - [Android] Add the Jetpack Compose `RangeSlider` component with custom thumbs, track, and colors.
11
+ Support disabled color overrides in Jetpack Compose `Slider` and `VerticalSlider`.
12
+
13
+ ([#53088](https://github.com/expo/expo/pull/53088) by [@akshayjadhav4](https://github.com/akshayjadhav4))
14
+
15
+ - [iOS] Remove the `Form` and `List` content-margin workaround for a split view beside the iPhone Duo tab rail. iOS 27.1 fixes the underlying SwiftUI issue. ([#52616](https://github.com/expo/expo/pull/52616) by [@huntie](https://github.com/huntie))
16
+ - [iOS] Fix the content of `RNHostView` snapping to its final size during an animated SwiftUI resize, such as a frame whose width animates. The hosted tree now follows the animation frame by frame. ([#52402](https://github.com/expo/expo/pull/52402) by [@dileepapeiris](https://github.com/dileepapeiris))
17
+ - Add an `accessibilityLabel` prop to the universal `Picker`, which gives the picker a name for screen readers. ([#53122](https://github.com/expo/expo/pull/53122) by [@miniware9](https://github.com/miniware9))
18
+
3
19
  ## 58.0.27
4
20
 
5
21
  ### Patch Changes
@@ -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 = '58.0.27'
15
+ version = '58.0.28'
16
16
 
17
17
  android {
18
18
  namespace "expo.modules.ui"
19
19
  defaultConfig {
20
20
  versionCode 1
21
- versionName "58.0.27"
21
+ versionName "58.0.28"
22
22
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
23
23
  }
24
24
  buildFeatures {
@@ -373,6 +373,15 @@ class ExpoUIModule : Module() {
373
373
  }
374
374
  }
375
375
 
376
+ ExpoUIView<RangeSliderProps>("RangeSliderView") {
377
+ val onValueChange by Event<RangeSliderRange>()
378
+ val onValueChangeFinished by Event<Unit>()
379
+
380
+ Content { props ->
381
+ RangeSliderContent(props, { onValueChange(it) }, { onValueChangeFinished(it) })
382
+ }
383
+ }
384
+
376
385
  ExpoUIView<VerticalSliderProps>("VerticalSliderView") {
377
386
  val onValueChange by Event<SliderValueChangedEvent>()
378
387
  val onValueChangeFinished by Event<Unit>()
@@ -903,5 +903,9 @@ object ModifierRegistry {
903
903
  register("horizontalScroll") { _, _, _, _ ->
904
904
  Modifier.horizontalScroll(rememberScrollState())
905
905
  }
906
+
907
+ register("scrollDismissesKeyboard") { _, _, _, _ ->
908
+ Modifier.scrollDismissesKeyboard()
909
+ }
906
910
  }
907
911
  }
@@ -0,0 +1,126 @@
1
+ package expo.modules.ui
2
+
3
+ import androidx.compose.foundation.interaction.MutableInteractionSource
4
+ import androidx.compose.foundation.interaction.collectIsDraggedAsState
5
+ import androidx.compose.material3.ExperimentalMaterial3Api
6
+ import androidx.compose.material3.RangeSlider
7
+ import androidx.compose.material3.RangeSliderState
8
+ import androidx.compose.material3.SliderDefaults
9
+ import androidx.compose.runtime.Composable
10
+ import androidx.compose.runtime.getValue
11
+ import androidx.compose.runtime.mutableStateOf
12
+ import androidx.compose.runtime.remember
13
+ import androidx.compose.runtime.setValue
14
+ import expo.modules.kotlin.records.Field
15
+ import expo.modules.kotlin.records.Record
16
+ import expo.modules.kotlin.types.OptimizedRecord
17
+ import expo.modules.kotlin.views.ComposeProps
18
+ import expo.modules.kotlin.views.FunctionalComposableScope
19
+ import expo.modules.kotlin.views.OptimizedComposeProps
20
+
21
+ @OptimizedRecord
22
+ data class RangeSliderRange(
23
+ @Field val start: Float = 0f,
24
+ @Field val endInclusive: Float = 1f
25
+ ) : Record
26
+
27
+ @OptimizedComposeProps
28
+ data class RangeSliderProps(
29
+ val startValue: Float = 0f,
30
+ val endValue: Float = 1f,
31
+ val trackRange: RangeSliderRange = RangeSliderRange(),
32
+ val steps: Int = 0,
33
+ val enabled: Boolean = true,
34
+ val colors: SliderColors = SliderColors(),
35
+ val modifiers: ModifierList = emptyList()
36
+ ) : ComposeProps
37
+
38
+ @OptIn(ExperimentalMaterial3Api::class)
39
+ @Composable
40
+ fun FunctionalComposableScope.RangeSliderContent(
41
+ props: RangeSliderProps,
42
+ onValueChange: (RangeSliderRange) -> Unit,
43
+ onValueChangeFinished: (Unit) -> Unit
44
+ ) {
45
+ val startInteractionSource = remember { MutableInteractionSource() }
46
+ val endInteractionSource = remember { MutableInteractionSource() }
47
+ val isStartDragging by startInteractionSource.collectIsDraggedAsState()
48
+ val isEndDragging by endInteractionSource.collectIsDraggedAsState()
49
+ val trackRange = props.trackRange.start..props.trackRange.endInclusive
50
+ var state by remember {
51
+ mutableStateOf(RangeSliderState(props.startValue, props.endValue, props.steps, trackRange))
52
+ }
53
+ val values = props.startValue to props.endValue
54
+ var previousValues by remember { mutableStateOf(values) }
55
+ val valuesChanged = values != previousValues
56
+ val configurationChanged = state.steps != props.steps || state.trackRange != trackRange
57
+
58
+ if (valuesChanged) {
59
+ previousValues = values
60
+ }
61
+ if (configurationChanged || (valuesChanged && !isStartDragging && !isEndDragging)) {
62
+ val start = if (valuesChanged) {
63
+ props.startValue
64
+ } else {
65
+ state.startValue
66
+ }
67
+ val end = if (valuesChanged) {
68
+ props.endValue
69
+ } else {
70
+ state.endValue
71
+ }
72
+ if (configurationChanged || start != state.startValue || end != state.endValue) {
73
+ // Construct the pair together: each native setter clamps against the other endpoint.
74
+ state = RangeSliderState(start, end, props.steps, trackRange)
75
+ }
76
+ }
77
+
78
+ val startThumb = findChildSlotView(view, "startThumb")
79
+ val endThumb = findChildSlotView(view, "endThumb")
80
+ val track = findChildSlotView(view, "track")
81
+ val colors = props.colors.toComposeColors()
82
+
83
+ RangeSlider(
84
+ state = state,
85
+ onValueChange = {
86
+ state.startValue = it.start
87
+ state.endValue = it.endInclusive
88
+ onValueChange(RangeSliderRange(state.startValue, state.endValue))
89
+ },
90
+ onValueChangeFinished = { onValueChangeFinished(Unit) },
91
+ enabled = props.enabled,
92
+ colors = colors,
93
+ startThumbInteractionSource = startInteractionSource,
94
+ endThumbInteractionSource = endInteractionSource,
95
+ startThumb = {
96
+ if (startThumb != null) {
97
+ with(UIComposableScope()) { with(startThumb) { Content() } }
98
+ } else {
99
+ SliderDefaults.Thumb(
100
+ interactionSource = startInteractionSource,
101
+ colors = colors,
102
+ enabled = props.enabled
103
+ )
104
+ }
105
+ },
106
+ endThumb = {
107
+ if (endThumb != null) {
108
+ with(UIComposableScope()) { with(endThumb) { Content() } }
109
+ } else {
110
+ SliderDefaults.Thumb(
111
+ interactionSource = endInteractionSource,
112
+ colors = colors,
113
+ enabled = props.enabled
114
+ )
115
+ }
116
+ },
117
+ track = {
118
+ if (track != null) {
119
+ with(UIComposableScope()) { with(track) { Content() } }
120
+ } else {
121
+ SliderDefaults.Track(rangeSliderState = it, colors = colors, enabled = props.enabled)
122
+ }
123
+ },
124
+ modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
125
+ )
126
+ }
@@ -0,0 +1,46 @@
1
+ package expo.modules.ui
2
+
3
+ import android.view.inputmethod.InputMethodManager
4
+ import androidx.compose.runtime.Composable
5
+ import androidx.compose.runtime.remember
6
+ import androidx.compose.ui.Modifier
7
+ import androidx.compose.ui.geometry.Offset
8
+ import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
9
+ import androidx.compose.ui.input.nestedscroll.NestedScrollSource
10
+ import androidx.compose.ui.input.nestedscroll.nestedScroll
11
+ import androidx.compose.ui.platform.LocalFocusManager
12
+ import androidx.compose.ui.platform.LocalView
13
+ import androidx.compose.ui.unit.Velocity
14
+
15
+ @Composable
16
+ fun Modifier.scrollDismissesKeyboard(): Modifier {
17
+ val view = LocalView.current
18
+ val focusManager = LocalFocusManager.current
19
+ val connection = remember(view, focusManager) {
20
+ object : NestedScrollConnection {
21
+ private var dismissedInDrag = false
22
+
23
+ override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
24
+ if (source == NestedScrollSource.UserInput && !dismissedInDrag) {
25
+ dismissedInDrag = true
26
+ focusManager.clearFocus()
27
+ // A React Native TextInput outside the Host is a plain Android view, so the Compose focus manager cannot clear it.
28
+ val focusedView = view.rootView.findFocus()
29
+ if (focusedView != null && focusedView !== view) {
30
+ focusedView.clearFocus()
31
+ }
32
+ view.context.getSystemService(InputMethodManager::class.java)
33
+ ?.hideSoftInputFromWindow(view.windowToken, 0)
34
+ }
35
+ return Offset.Zero
36
+ }
37
+
38
+ // The scrollable calls onPreFling when the drag ends, also when the velocity is zero.
39
+ override suspend fun onPreFling(available: Velocity): Velocity {
40
+ dismissedInDrag = false
41
+ return Velocity.Zero
42
+ }
43
+ }
44
+ }
45
+ return this.nestedScroll(connection)
46
+ }
@@ -18,6 +18,7 @@ import expo.modules.kotlin.views.ComposeProps
18
18
  import expo.modules.kotlin.views.FunctionalComposableScope
19
19
  import expo.modules.kotlin.types.OptimizedRecord
20
20
  import expo.modules.kotlin.views.OptimizedComposeProps
21
+ import androidx.compose.material3.SliderColors as MaterialSliderColors
21
22
 
22
23
  @OptimizedRecord
23
24
  class SliderColors : Record {
@@ -35,8 +36,37 @@ class SliderColors : Record {
35
36
 
36
37
  @Field
37
38
  val inactiveTickColor: Color? = null
39
+
40
+ @Field
41
+ val disabledThumbColor: Color? = null
42
+
43
+ @Field
44
+ val disabledActiveTrackColor: Color? = null
45
+
46
+ @Field
47
+ val disabledInactiveTrackColor: Color? = null
48
+
49
+ @Field
50
+ val disabledActiveTickColor: Color? = null
51
+
52
+ @Field
53
+ val disabledInactiveTickColor: Color? = null
38
54
  }
39
55
 
56
+ @Composable
57
+ internal fun SliderColors.toComposeColors(): MaterialSliderColors = SliderDefaults.colors(
58
+ thumbColor = thumbColor.compose,
59
+ activeTrackColor = activeTrackColor.compose,
60
+ inactiveTrackColor = inactiveTrackColor.compose,
61
+ activeTickColor = activeTickColor.compose,
62
+ inactiveTickColor = inactiveTickColor.compose,
63
+ disabledThumbColor = disabledThumbColor.compose,
64
+ disabledActiveTrackColor = disabledActiveTrackColor.compose,
65
+ disabledInactiveTrackColor = disabledInactiveTrackColor.compose,
66
+ disabledActiveTickColor = disabledActiveTickColor.compose,
67
+ disabledInactiveTickColor = disabledInactiveTickColor.compose
68
+ )
69
+
40
70
  @OptimizedComposeProps
41
71
  data class SliderProps(
42
72
  val value: Float = 0.0f,
@@ -89,13 +119,7 @@ fun FunctionalComposableScope.SliderContent(
89
119
  val thumbSlotView = findChildSlotView(view, "thumb")
90
120
  val trackSlotView = findChildSlotView(view, "track")
91
121
 
92
- val sliderColors = SliderDefaults.colors(
93
- thumbColor = props.colors.thumbColor.compose,
94
- activeTrackColor = props.colors.activeTrackColor.compose,
95
- inactiveTrackColor = props.colors.inactiveTrackColor.compose,
96
- activeTickColor = props.colors.activeTickColor.compose,
97
- inactiveTickColor = props.colors.inactiveTickColor.compose
98
- )
122
+ val sliderColors = props.colors.toComposeColors()
99
123
 
100
124
  SideEffect {
101
125
  val target = localValue.coerceIn(effectiveLower, effectiveUpper)
@@ -3,7 +3,6 @@ package expo.modules.ui
3
3
  import androidx.compose.foundation.interaction.MutableInteractionSource
4
4
  import androidx.compose.material3.ExperimentalMaterial3Api
5
5
  import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
6
- import androidx.compose.material3.SliderDefaults
7
6
  import androidx.compose.material3.SliderState
8
7
  import androidx.compose.material3.VerticalSlider
9
8
  import androidx.compose.runtime.Composable
@@ -64,13 +63,7 @@ fun FunctionalComposableScope.VerticalSliderContent(
64
63
  val thumbSlotView = findChildSlotView(view, "thumb")
65
64
  val trackSlotView = findChildSlotView(view, "track")
66
65
 
67
- val sliderColors = SliderDefaults.colors(
68
- thumbColor = props.colors.thumbColor.compose,
69
- activeTrackColor = props.colors.activeTrackColor.compose,
70
- inactiveTrackColor = props.colors.inactiveTrackColor.compose,
71
- activeTickColor = props.colors.activeTickColor.compose,
72
- inactiveTickColor = props.colors.inactiveTickColor.compose
73
- )
66
+ val sliderColors = props.colors.toComposeColors()
74
67
  val modifier = ModifierRegistry.applyModifiers(
75
68
  props.modifiers,
76
69
  appContext,
@@ -1,6 +1,7 @@
1
1
  package expo.modules.ui.menu
2
2
 
3
3
  import androidx.compose.material3.DropdownMenuPopup
4
+ import androidx.compose.material3.MenuDefaults
4
5
  import androidx.compose.runtime.Composable
5
6
  import androidx.compose.ui.window.PopupProperties
6
7
  import expo.modules.kotlin.views.FunctionalComposableScope
@@ -16,6 +17,9 @@ fun FunctionalComposableScope.DropdownMenuPopupContent(
16
17
  expanded = props.expanded,
17
18
  onDismissRequest = onDismissRequest,
18
19
  modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
20
+ popupPositionProvider = MenuDefaults.rememberDropdownMenuPopupPositionProvider(
21
+ props.anchorPosition.toComposeAnchorPosition()
22
+ ),
19
23
  properties = PopupProperties(
20
24
  focusable = props.properties.focusable,
21
25
  dismissOnBackPress = props.properties.dismissOnBackPress,
@@ -1,6 +1,7 @@
1
1
  package expo.modules.ui.menu
2
2
 
3
3
  import android.graphics.Color
4
+ import androidx.compose.material3.MenuAnchorPosition
4
5
  import expo.modules.kotlin.records.Field
5
6
  import expo.modules.kotlin.records.Record
6
7
  import expo.modules.kotlin.types.Enumerable
@@ -33,6 +34,25 @@ data class DropdownMenuProps(
33
34
  val properties: ExpoPopupProperties = ExpoPopupProperties()
34
35
  ) : ComposeProps
35
36
 
37
+ enum class DropdownMenuAnchorPosition(val value: String) : Enumerable {
38
+ BELOW("below"),
39
+ ABOVE("above"),
40
+ START("start"),
41
+ END("end"),
42
+ LEFT("left"),
43
+ RIGHT("right");
44
+
45
+ fun toComposeAnchorPosition(): MenuAnchorPosition =
46
+ when (this) {
47
+ BELOW -> MenuAnchorPosition.Below
48
+ ABOVE -> MenuAnchorPosition.Above
49
+ START -> MenuAnchorPosition.Start
50
+ END -> MenuAnchorPosition.End
51
+ LEFT -> MenuAnchorPosition.Left
52
+ RIGHT -> MenuAnchorPosition.Right
53
+ }
54
+ }
55
+
36
56
  @OptimizedRecord
37
57
  data class MenuShapePosition(
38
58
  @Field val index: Int = 0,
@@ -42,6 +62,7 @@ data class MenuShapePosition(
42
62
  @OptimizedComposeProps
43
63
  data class DropdownMenuPopupProps(
44
64
  val expanded: Boolean = false,
65
+ val anchorPosition: DropdownMenuAnchorPosition = DropdownMenuAnchorPosition.BELOW,
45
66
  val modifiers: ModifierList = emptyList(),
46
67
  val properties: ExpoPopupProperties = ExpoPopupProperties()
47
68
  ) : ComposeProps
@@ -84,6 +84,13 @@ export interface DropdownMenuPopupProps {
84
84
  * Must be provided when `expanded` is `true` to allow the menu to close.
85
85
  */
86
86
  onDismissRequest?: () => void;
87
+ /**
88
+ * The side of the anchor where the menu opens, through Compose's `MenuAnchorPosition`. When
89
+ * there is not sufficient space on that side, Compose moves the menu to a different side. Use
90
+ * `'end'` for a submenu that opens next to its item.
91
+ * @default 'below'
92
+ */
93
+ anchorPosition?: 'below' | 'above' | 'start' | 'end' | 'left' | 'right';
87
94
  /**
88
95
  * Properties for the popup window of the menu.
89
96
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["jetpack-compose/DropdownMenu/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","PresentedContent","createViewModifierEventListener","MenuNativeView","MenuPopupNativeView","MenuGroupNativeView","SlotNativeView","Items","props","slotName","children","tag","Trigger","Preview","DropdownMenu","modifiers","restProps","style","undefined","DropdownMenuPopup","DropdownMenuGroup","DropdownMenuItem","SelectableDropdownMenuItem"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,SAASC,+BAA+B,QAAQ,qBAAqB;AAErE,MAAMC,iBAAuDH,kBAC3D,UACA;AAGF,MAAMI,sBAAiEJ,kBACrE,UACA;AAGF,MAAMK,sBAAmEL,kBACvE,UACA;AAGF,2DAA2D;AAC3D,MAAMM,iBAGDN,kBAAkB,UAAU;AAuKjC;;;CAGC,GACD,OAAO,SAASO,MAAMC,KAA8B;IAClD,oGAAoG;IACpG,qBACE,KAACF;QAAeG,UAAS;kBACvB,cAAA,KAACR;sBAAkBO,MAAME,QAAQ;;;AAGvC;AACAH,MAAMI,GAAG,GAAG;AAEZ;;CAEC,GACD,OAAO,SAASC,QAAQJ,KAA8B;IACpD,qBAAO;kBAAGA,MAAME,QAAQ;;AAC1B;AACAE,QAAQD,GAAG,GAAG;AAEd;;CAEC,GACD,OAAO,SAASE,QAAQL,KAA8B;IACpD,qBAAO;AACT;AAEA,SAASM,aAAaN,KAAwB;IAC5C,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACL;QACCc,OAAOT,MAAMS,KAAK;QAClBF,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBACZR,MAAME,QAAQ;;AAGrB;AAEAI,aAAaF,OAAO,GAAGA;AACvBE,aAAaD,OAAO,GAAGA;AACvBC,aAAaP,KAAK,GAAGA;AAErB,SAASO,YAAY,GAAG;AAExB;;;;;;CAMC,GACD,OAAO,SAASK,kBAAkBX,KAA6B;IAC7D,MAAM,EAAEO,SAAS,EAAEL,QAAQ,EAAE,GAAGM,WAAW,GAAGR;IAC9C,qBACE,KAACJ;QACCW,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBAEb,cAAA,KAACf;sBAAkBS;;;AAGzB;AAEA;;;;;CAKC,GACD,OAAO,SAASU,kBAAkBZ,KAA6B;IAC7D,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACH;QACCU,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;;AAGnB;AAEA,SAASK,gBAAgB,QAAQ,qBAAqB;AAEtD,SAASC,0BAA0B,QAAQ,+BAA+B"}
1
+ {"version":3,"sources":["jetpack-compose/DropdownMenu/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","PresentedContent","createViewModifierEventListener","MenuNativeView","MenuPopupNativeView","MenuGroupNativeView","SlotNativeView","Items","props","slotName","children","tag","Trigger","Preview","DropdownMenu","modifiers","restProps","style","undefined","DropdownMenuPopup","DropdownMenuGroup","DropdownMenuItem","SelectableDropdownMenuItem"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,SAASC,+BAA+B,QAAQ,qBAAqB;AAErE,MAAMC,iBAAuDH,kBAC3D,UACA;AAGF,MAAMI,sBAAiEJ,kBACrE,UACA;AAGF,MAAMK,sBAAmEL,kBACvE,UACA;AAGF,2DAA2D;AAC3D,MAAMM,iBAGDN,kBAAkB,UAAU;AAgLjC;;;CAGC,GACD,OAAO,SAASO,MAAMC,KAA8B;IAClD,oGAAoG;IACpG,qBACE,KAACF;QAAeG,UAAS;kBACvB,cAAA,KAACR;sBAAkBO,MAAME,QAAQ;;;AAGvC;AACAH,MAAMI,GAAG,GAAG;AAEZ;;CAEC,GACD,OAAO,SAASC,QAAQJ,KAA8B;IACpD,qBAAO;kBAAGA,MAAME,QAAQ;;AAC1B;AACAE,QAAQD,GAAG,GAAG;AAEd;;CAEC,GACD,OAAO,SAASE,QAAQL,KAA8B;IACpD,qBAAO;AACT;AAEA,SAASM,aAAaN,KAAwB;IAC5C,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACL;QACCc,OAAOT,MAAMS,KAAK;QAClBF,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBACZR,MAAME,QAAQ;;AAGrB;AAEAI,aAAaF,OAAO,GAAGA;AACvBE,aAAaD,OAAO,GAAGA;AACvBC,aAAaP,KAAK,GAAGA;AAErB,SAASO,YAAY,GAAG;AAExB;;;;;;CAMC,GACD,OAAO,SAASK,kBAAkBX,KAA6B;IAC7D,MAAM,EAAEO,SAAS,EAAEL,QAAQ,EAAE,GAAGM,WAAW,GAAGR;IAC9C,qBACE,KAACJ;QACCW,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;kBAEb,cAAA,KAACf;sBAAkBS;;;AAGzB;AAEA;;;;;CAKC,GACD,OAAO,SAASU,kBAAkBZ,KAA6B;IAC7D,MAAM,EAAEO,SAAS,EAAE,GAAGC,WAAW,GAAGR;IACpC,qBACE,KAACH;QACCU,WAAWA;QACV,GAAIA,YAAYb,gCAAgCa,aAAaG,SAAS;QACtE,GAAGF,SAAS;;AAGnB;AAEA,SAASK,gBAAgB,QAAQ,qBAAqB;AAEtD,SAASC,0BAA0B,QAAQ,+BAA+B"}
@@ -0,0 +1,78 @@
1
+ import type { ModifierConfig } from '../../types';
2
+ import type { SliderColors } from '../Slider';
3
+ export type { SliderColors };
4
+ /**
5
+ * An inclusive numeric range for `RangeSlider`.
6
+ */
7
+ export type RangeSliderRange = {
8
+ /** The start of the range. */
9
+ start: number;
10
+ /** The end of the range, included in the selection. */
11
+ endInclusive: number;
12
+ };
13
+ export interface RangeSliderProps {
14
+ /**
15
+ * The selected start value. Changing this prop updates the native selection when the user is not dragging.
16
+ * @default 0
17
+ */
18
+ startValue?: number;
19
+ /**
20
+ * The selected end value. Changing this prop updates the native selection when the user is not dragging.
21
+ * @default 1
22
+ */
23
+ endValue?: number;
24
+ /**
25
+ * The bounds of the entire track. The slider clamps values outside these bounds.
26
+ * @default \{ start: 0, endInclusive: 1 \}
27
+ */
28
+ trackRange?: RangeSliderRange;
29
+ /**
30
+ * The number of selectable positions between the track bounds.
31
+ * Must be a nonnegative integer. `0` means continuous selection.
32
+ * @default 0
33
+ */
34
+ steps?: number;
35
+ /**
36
+ * Whether the slider responds to user interaction.
37
+ * @default true
38
+ */
39
+ enabled?: boolean;
40
+ /**
41
+ * Colors for the thumbs, track, and tick marks. Omitted colors use the Material theme.
42
+ */
43
+ colors?: SliderColors;
44
+ /**
45
+ * Called with both endpoints when the user changes the selection.
46
+ */
47
+ onValueChange?: (range: RangeSliderRange) => void;
48
+ /**
49
+ * Called when the user finishes changing the selection.
50
+ * It has no value argument. `onValueChange` reports the selection.
51
+ */
52
+ onValueChangeFinished?: () => void;
53
+ /**
54
+ * Modifiers for the component.
55
+ */
56
+ modifiers?: ModifierConfig[];
57
+ /**
58
+ * Custom content wrapped in `RangeSlider.StartThumb`, `RangeSlider.EndThumb`, or `RangeSlider.Track`.
59
+ */
60
+ children?: React.ReactNode;
61
+ }
62
+ /**
63
+ * A Material 3 slider for selecting two values on a bounded track.
64
+ * It works only inside a `Host` component.
65
+ * @platform android
66
+ */
67
+ export declare function RangeSlider(props: RangeSliderProps): import("react").JSX.Element;
68
+ export declare namespace RangeSlider {
69
+ var StartThumb: (props: {
70
+ children: React.ReactNode;
71
+ }) => import("react").JSX.Element;
72
+ var EndThumb: (props: {
73
+ children: React.ReactNode;
74
+ }) => import("react").JSX.Element;
75
+ var Track: (props: {
76
+ children: React.ReactNode;
77
+ }) => import("react").JSX.Element;
78
+ }
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { requireNativeView } from 'expo';
3
+ import { createViewModifierEventListener } from '../modifiers/utils';
4
+ const RangeSliderNativeView = requireNativeView('ExpoUI', 'RangeSliderView');
5
+ const SlotNativeView = requireNativeView('ExpoUI', 'SlotView');
6
+ /**
7
+ * Custom content for the start thumb of a `RangeSlider`.
8
+ * @platform android
9
+ */ function StartThumb(props) {
10
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
11
+ slotName: "startThumb",
12
+ children: props.children
13
+ });
14
+ }
15
+ /**
16
+ * Custom content for the end thumb of a `RangeSlider`.
17
+ * @platform android
18
+ */ function EndThumb(props) {
19
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
20
+ slotName: "endThumb",
21
+ children: props.children
22
+ });
23
+ }
24
+ /**
25
+ * Custom content for the track of a `RangeSlider`.
26
+ * @platform android
27
+ */ function Track(props) {
28
+ return /*#__PURE__*/ _jsx(SlotNativeView, {
29
+ slotName: "track",
30
+ children: props.children
31
+ });
32
+ }
33
+ /**
34
+ * A Material 3 slider for selecting two values on a bounded track.
35
+ * It works only inside a `Host` component.
36
+ * @platform android
37
+ */ export function RangeSlider(props) {
38
+ const { modifiers, onValueChange, onValueChangeFinished, ...restProps } = props;
39
+ return /*#__PURE__*/ _jsx(RangeSliderNativeView, {
40
+ ...restProps,
41
+ modifiers: modifiers,
42
+ ...modifiers ? createViewModifierEventListener(modifiers) : undefined,
43
+ onValueChange: onValueChange ? ({ nativeEvent })=>onValueChange(nativeEvent) : undefined,
44
+ onValueChangeFinished: onValueChangeFinished ? ()=>onValueChangeFinished() : undefined
45
+ });
46
+ }
47
+ RangeSlider.StartThumb = StartThumb;
48
+ RangeSlider.EndThumb = EndThumb;
49
+ RangeSlider.Track = Track;
50
+
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["jetpack-compose/RangeSlider/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","RangeSliderNativeView","SlotNativeView","StartThumb","props","slotName","children","EndThumb","Track","RangeSlider","modifiers","onValueChange","onValueChangeFinished","restProps","undefined","nativeEvent"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AAoErE,MAAMC,wBAAqEF,kBACzE,UACA;AAGF,MAAMG,iBACJH,kBAAkB,UAAU;AAE9B;;;CAGC,GACD,SAASI,WAAWC,KAAoC;IACtD,qBAAO,KAACF;QAAeG,UAAS;kBAAcD,MAAME,QAAQ;;AAC9D;AAEA;;;CAGC,GACD,SAASC,SAASH,KAAoC;IACpD,qBAAO,KAACF;QAAeG,UAAS;kBAAYD,MAAME,QAAQ;;AAC5D;AAEA;;;CAGC,GACD,SAASE,MAAMJ,KAAoC;IACjD,qBAAO,KAACF;QAAeG,UAAS;kBAASD,MAAME,QAAQ;;AACzD;AAEA;;;;CAIC,GACD,OAAO,SAASG,YAAYL,KAAuB;IACjD,MAAM,EAAEM,SAAS,EAAEC,aAAa,EAAEC,qBAAqB,EAAE,GAAGC,WAAW,GAAGT;IAC1E,qBACE,KAACH;QACE,GAAGY,SAAS;QACbH,WAAWA;QACV,GAAIA,YAAYV,gCAAgCU,aAAaI,SAAS;QACvEH,eAAeA,gBAAgB,CAAC,EAAEI,WAAW,EAAE,GAAKJ,cAAcI,eAAeD;QACjFF,uBAAuBA,wBAAwB,IAAMA,0BAA0BE;;AAGrF;AAEAL,YAAYN,UAAU,GAAGA;AACzBM,YAAYF,QAAQ,GAAGA;AACvBE,YAAYD,KAAK,GAAGA"}
@@ -5,11 +5,26 @@ import type { ModifierConfig } from '../../types';
5
5
  * @platform android
6
6
  */
7
7
  export type SliderColors = {
8
+ /** The thumb color when enabled. */
8
9
  thumbColor?: ColorValue;
10
+ /** The active track color when enabled. */
9
11
  activeTrackColor?: ColorValue;
12
+ /** The inactive track color when enabled. */
10
13
  inactiveTrackColor?: ColorValue;
14
+ /** The active tick color when enabled. */
11
15
  activeTickColor?: ColorValue;
16
+ /** The inactive tick color when enabled. */
12
17
  inactiveTickColor?: ColorValue;
18
+ /** The thumb color when disabled. */
19
+ disabledThumbColor?: ColorValue;
20
+ /** The active track color when disabled. */
21
+ disabledActiveTrackColor?: ColorValue;
22
+ /** The inactive track color when disabled. */
23
+ disabledInactiveTrackColor?: ColorValue;
24
+ /** The active tick color when disabled. */
25
+ disabledActiveTickColor?: ColorValue;
26
+ /** The inactive tick color when disabled. */
27
+ disabledInactiveTickColor?: ColorValue;
13
28
  };
14
29
  export interface SliderProps {
15
30
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["jetpack-compose/Slider/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","SlotNativeView","SliderNativeView","VerticalSliderNativeView","transformSliderProps","props","modifiers","onValueChange","onValueChangeFinished","restProps","undefined","min","max","steps","value","enabled","nativeEvent","Thumb","slotName","children","Track","SliderComponent","VerticalSlider","reverseDirection","sliderProps","Slider"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AAOrE,MAAMC,iBAA2DF,kBAC/D,UACA;AAuFF,MAAMG,mBAA2DH,kBAC/D,UACA;AAGF,MAAMI,2BAEFJ,kBAAkB,UAAU;AAEhC,SAASK,qBACPC,KAAoC;IAEpC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,qBAAqB,EAAE,GAAGC,WAAW,GAAGJ;IAC1E,OAAO;QACLC;QACA,GAAIA,YAAYN,gCAAgCM,aAAaI,SAAS;QACtE,GAAGD,SAAS;QACZE,KAAKN,MAAMM,GAAG,IAAI;QAClBC,KAAKP,MAAMO,GAAG,IAAI;QAClBC,OAAOR,MAAMQ,KAAK,IAAI;QACtBC,OAAOT,MAAMS,KAAK,IAAI;QACtBC,SAASV,MAAMU,OAAO,IAAI;QAC1BR,eAAeA,gBACX,CAAC,EAAES,aAAa,EAAEF,KAAK,EAAE,EAAE;YACzBP,cAAcO;QAChB,IACAJ;QACJF,uBAAuBA,wBAAwB,IAAMA,0BAA0BE;IACjF;AACF;AAEA;;;;;CAKC,GACD,SAASO,MAAMZ,KAAoC;IACjD,qBAAO,KAACJ;QAAeiB,UAAS;kBAASb,MAAMc,QAAQ;;AACzD;AAEA;;;;;CAKC,GACD,SAASC,MAAMf,KAAoC;IACjD,qBAAO,KAACJ;QAAeiB,UAAS;kBAASb,MAAMc,QAAQ;;AACzD;AAEA;;;;CAIC,GACD,SAASE,gBAAgBhB,KAAkB;IACzC,MAAM,EAAEc,QAAQ,EAAE,GAAGV,WAAW,GAAGJ;IACnC,qBAAO,KAACH;QAAkB,GAAGE,qBAAqBK,UAAU;kBAAGU;;AACjE;AAEAE,gBAAgBJ,KAAK,GAAGA;AACxBI,gBAAgBD,KAAK,GAAGA;AAExB;;;;CAIC,GACD,OAAO,SAASE,eAAejB,KAA0B;IACvD,MAAM,EAAEc,QAAQ,EAAEI,gBAAgB,EAAE,GAAGC,aAAa,GAAGnB;IACvD,qBACE,KAACF;QACE,GAAGC,qBAAqBoB,YAAY;QACrCD,kBAAkBA;kBACjBJ;;AAGP;AAEAG,eAAeL,KAAK,GAAGA;AACvBK,eAAeF,KAAK,GAAGA;AAEvB,SAASC,mBAAmBI,MAAM,GAAG"}
1
+ {"version":3,"sources":["jetpack-compose/Slider/index.tsx"],"sourcesContent":[null],"names":["requireNativeView","createViewModifierEventListener","SlotNativeView","SliderNativeView","VerticalSliderNativeView","transformSliderProps","props","modifiers","onValueChange","onValueChangeFinished","restProps","undefined","min","max","steps","value","enabled","nativeEvent","Thumb","slotName","children","Track","SliderComponent","VerticalSlider","reverseDirection","sliderProps","Slider"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAIzC,SAASC,+BAA+B,QAAQ,qBAAqB;AAOrE,MAAMC,iBAA2DF,kBAC/D,UACA;AAsGF,MAAMG,mBAA2DH,kBAC/D,UACA;AAGF,MAAMI,2BAEFJ,kBAAkB,UAAU;AAEhC,SAASK,qBACPC,KAAoC;IAEpC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,qBAAqB,EAAE,GAAGC,WAAW,GAAGJ;IAC1E,OAAO;QACLC;QACA,GAAIA,YAAYN,gCAAgCM,aAAaI,SAAS;QACtE,GAAGD,SAAS;QACZE,KAAKN,MAAMM,GAAG,IAAI;QAClBC,KAAKP,MAAMO,GAAG,IAAI;QAClBC,OAAOR,MAAMQ,KAAK,IAAI;QACtBC,OAAOT,MAAMS,KAAK,IAAI;QACtBC,SAASV,MAAMU,OAAO,IAAI;QAC1BR,eAAeA,gBACX,CAAC,EAAES,aAAa,EAAEF,KAAK,EAAE,EAAE;YACzBP,cAAcO;QAChB,IACAJ;QACJF,uBAAuBA,wBAAwB,IAAMA,0BAA0BE;IACjF;AACF;AAEA;;;;;CAKC,GACD,SAASO,MAAMZ,KAAoC;IACjD,qBAAO,KAACJ;QAAeiB,UAAS;kBAASb,MAAMc,QAAQ;;AACzD;AAEA;;;;;CAKC,GACD,SAASC,MAAMf,KAAoC;IACjD,qBAAO,KAACJ;QAAeiB,UAAS;kBAASb,MAAMc,QAAQ;;AACzD;AAEA;;;;CAIC,GACD,SAASE,gBAAgBhB,KAAkB;IACzC,MAAM,EAAEc,QAAQ,EAAE,GAAGV,WAAW,GAAGJ;IACnC,qBAAO,KAACH;QAAkB,GAAGE,qBAAqBK,UAAU;kBAAGU;;AACjE;AAEAE,gBAAgBJ,KAAK,GAAGA;AACxBI,gBAAgBD,KAAK,GAAGA;AAExB;;;;CAIC,GACD,OAAO,SAASE,eAAejB,KAA0B;IACvD,MAAM,EAAEc,QAAQ,EAAEI,gBAAgB,EAAE,GAAGC,aAAa,GAAGnB;IACvD,qBACE,KAACF;QACE,GAAGC,qBAAqBoB,YAAY;QACrCD,kBAAkBA;kBACjBJ;;AAGP;AAEAG,eAAeL,KAAK,GAAGA;AACvBK,eAAeF,KAAK,GAAGA;AAEvB,SAASC,mBAAmBI,MAAM,GAAG"}
@@ -22,6 +22,7 @@ export * from './RNHostView';
22
22
  export * from './DatePicker';
23
23
  export * from './SegmentedButton';
24
24
  export * from './Progress';
25
+ export * from './RangeSlider';
25
26
  export * from './Slider';
26
27
  export * from './Spacer';
27
28
  export * from './SplitButtonLayout';
@@ -22,6 +22,7 @@ export * from './RNHostView';
22
22
  export * from './DatePicker';
23
23
  export * from './SegmentedButton';
24
24
  export * from './Progress';
25
+ export * from './RangeSlider';
25
26
  export * from './Slider';
26
27
  export * from './Spacer';
27
28
  export * from './SplitButtonLayout';
@@ -1 +1 @@
1
- {"version":3,"sources":["jetpack-compose/index.ts"],"sourcesContent":[null],"names":["BasicAlertDialog","TextField","OutlinedTextField","BasicTextField","HorizontalPager","Text","useNativeState","useWorkletCallback"],"mappings":"AAAA,OAAO,wCAAwC;AAE/C,cAAc,gBAAgB;AAC9B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,SAASA,gBAAgB,QAAoC,qBAAqB;AAClF,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,2BAA2B;AACzC,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,SACEC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,QAcT,cAAc;AACrB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,SACEC,eAAe,QAGV,oBAAoB;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,SAAyBC,IAAI,QAAQ,SAAS;AAC9C,cAAc,YAAY;AAC1B,cAAc,qBAAqB;AAEnC,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,6BAA6B;AAC3C,cAAc,YAAY;AAC1B,SAASC,cAAc,EAAEC,kBAAkB,QAA8B,WAAW"}
1
+ {"version":3,"sources":["jetpack-compose/index.ts"],"sourcesContent":[null],"names":["BasicAlertDialog","TextField","OutlinedTextField","BasicTextField","HorizontalPager","Text","useNativeState","useWorkletCallback"],"mappings":"AAAA,OAAO,wCAAwC;AAE/C,cAAc,gBAAgB;AAC9B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,SAASA,gBAAgB,QAAoC,qBAAqB;AAClF,cAAc,SAAS;AACvB,cAAc,aAAa;AAC3B,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,iBAAiB;AAC/B,cAAc,2BAA2B;AACzC,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,aAAa;AAC3B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,aAAa;AAC3B,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,SACEC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,QAcT,cAAc;AACrB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,SACEC,eAAe,QAGV,oBAAoB;AAC3B,cAAc,cAAc;AAC5B,cAAc,aAAa;AAC3B,cAAc,oBAAoB;AAClC,cAAc,8BAA8B;AAC5C,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,qBAAqB;AACnC,cAAc,gBAAgB;AAC9B,cAAc,YAAY;AAC1B,SAAyBC,IAAI,QAAQ,SAAS;AAC9C,cAAc,YAAY;AAC1B,cAAc,qBAAqB;AAEnC,cAAc,uBAAuB;AACrC,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,6BAA6B;AAC3C,cAAc,YAAY;AAC1B,SAASC,cAAc,EAAEC,kBAAkB,QAA8B,WAAW"}
@@ -459,5 +459,17 @@ export declare const verticalScroll: () => import("./createModifier").ModifierCo
459
459
  * Use on a Row to create a non-lazy scrollable container.
460
460
  */
461
461
  export declare const horizontalScroll: () => import("./createModifier").ModifierConfig;
462
+ /**
463
+ * Hides the keyboard and clears focus when the user starts to drag the scrollable content.
464
+ *
465
+ * When used with `verticalScroll()` or `horizontalScroll()` modifier, it must be placed
466
+ * before them in the modifier list.
467
+ *
468
+ * @example
469
+ * ```tsx
470
+ * modifiers={[scrollDismissesKeyboard(), verticalScroll()]}
471
+ * ```
472
+ */
473
+ export declare const scrollDismissesKeyboard: () => import("./createModifier").ModifierConfig;
462
474
  export { createModifier, createModifierWithEventListener } from './createModifier';
463
475
  export { createViewModifierEventListener } from './utils';
@@ -430,6 +430,17 @@ const material = (name)=>({
430
430
  * Wraps `Modifier.horizontalScroll(rememberScrollState())`.
431
431
  * Use on a Row to create a non-lazy scrollable container.
432
432
  */ export const horizontalScroll = ()=>createModifier('horizontalScroll');
433
+ /**
434
+ * Hides the keyboard and clears focus when the user starts to drag the scrollable content.
435
+ *
436
+ * When used with `verticalScroll()` or `horizontalScroll()` modifier, it must be placed
437
+ * before them in the modifier list.
438
+ *
439
+ * @example
440
+ * ```tsx
441
+ * modifiers={[scrollDismissesKeyboard(), verticalScroll()]}
442
+ * ```
443
+ */ export const scrollDismissesKeyboard = ()=>createModifier('scrollDismissesKeyboard');
433
444
  export { createModifier, createModifierWithEventListener } from './createModifier';
434
445
  export { createViewModifierEventListener } from './utils';
435
446