@expo/ui 58.0.27 → 58.0.29

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 +23 -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/assets/check.xml +10 -0
  12. package/build/community/bottom-sheet/BottomSheet.ios.js +1 -0
  13. package/build/community/bottom-sheet/BottomSheet.ios.js.map +1 -1
  14. package/build/community/menu/MenuView.android.d.ts +1 -1
  15. package/build/community/menu/MenuView.android.js +188 -95
  16. package/build/community/menu/MenuView.android.js.map +1 -1
  17. package/build/jetpack-compose/DropdownMenu/index.d.ts +7 -0
  18. package/build/jetpack-compose/DropdownMenu/index.js.map +1 -1
  19. package/build/jetpack-compose/RangeSlider/index.d.ts +78 -0
  20. package/build/jetpack-compose/RangeSlider/index.js +51 -0
  21. package/build/jetpack-compose/RangeSlider/index.js.map +1 -0
  22. package/build/jetpack-compose/Slider/index.d.ts +15 -0
  23. package/build/jetpack-compose/Slider/index.js.map +1 -1
  24. package/build/jetpack-compose/index.d.ts +1 -0
  25. package/build/jetpack-compose/index.js +1 -0
  26. package/build/jetpack-compose/index.js.map +1 -1
  27. package/build/jetpack-compose/modifiers/index.d.ts +12 -0
  28. package/build/jetpack-compose/modifiers/index.js +11 -0
  29. package/build/jetpack-compose/modifiers/index.js.map +1 -1
  30. package/build/swift-ui/modifiers/index.d.ts +18 -3
  31. package/build/swift-ui/modifiers/index.js +18 -2
  32. package/build/swift-ui/modifiers/index.js.map +1 -1
  33. package/build/swift-ui/modifiers/symbolEffect.d.ts +49 -6
  34. package/build/swift-ui/modifiers/symbolEffect.js +1 -28
  35. package/build/swift-ui/modifiers/symbolEffect.js.map +1 -1
  36. package/build/swift-ui/modifiers/symbolEffectOptions.d.ts +22 -0
  37. package/build/swift-ui/modifiers/symbolEffectOptions.js +30 -0
  38. package/build/swift-ui/modifiers/symbolEffectOptions.js.map +1 -0
  39. package/build/universal/Picker/Picker.android.d.ts +1 -1
  40. package/build/universal/Picker/Picker.android.js +8 -3
  41. package/build/universal/Picker/Picker.android.js.map +1 -1
  42. package/build/universal/Picker/Picker.d.ts +1 -1
  43. package/build/universal/Picker/Picker.ios.d.ts +1 -1
  44. package/build/universal/Picker/Picker.ios.js +5 -2
  45. package/build/universal/Picker/Picker.ios.js.map +1 -1
  46. package/build/universal/Picker/Picker.js +2 -1
  47. package/build/universal/Picker/Picker.js.map +1 -1
  48. package/build/universal/Picker/types.d.ts +4 -0
  49. package/build/universal/Picker/types.js.map +1 -1
  50. package/ios/HostView.swift +0 -1
  51. package/ios/Modifiers/ContentTransitionModifier.swift +49 -0
  52. package/ios/RNHostView.swift +55 -1
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.27/expo.modules.ui-58.0.27-sources.jar → 58.0.29/expo.modules.ui-58.0.29-sources.jar} +0 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29-sources.jar.md5 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29-sources.jar.sha1 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29-sources.jar.sha256 +1 -0
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29-sources.jar.sha512 +1 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.aar +0 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.aar.md5 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.aar.sha1 +1 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.aar.sha256 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.aar.sha512 +1 -0
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.27/expo.modules.ui-58.0.27.module → 58.0.29/expo.modules.ui-58.0.29.module} +22 -22
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.module.md5 +1 -0
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.module.sha1 +1 -0
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.module.sha256 +1 -0
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.module.sha512 +1 -0
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.27/expo.modules.ui-58.0.27.pom → 58.0.29/expo.modules.ui-58.0.29.pom} +1 -1
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.pom.md5 +1 -0
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.pom.sha1 +1 -0
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.pom.sha256 +1 -0
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.29/expo.modules.ui-58.0.29.pom.sha512 +1 -0
  73. package/package.json +1 -1
  74. package/src/community/bottom-sheet/BottomSheet.ios.tsx +5 -2
  75. package/src/community/menu/MenuView.android.tsx +193 -107
  76. package/src/jetpack-compose/DropdownMenu/index.tsx +9 -0
  77. package/src/jetpack-compose/RangeSlider/index.tsx +125 -0
  78. package/src/jetpack-compose/Slider/index.tsx +15 -0
  79. package/src/jetpack-compose/index.ts +1 -0
  80. package/src/jetpack-compose/modifiers/index.ts +13 -0
  81. package/src/swift-ui/modifiers/index.ts +28 -4
  82. package/src/swift-ui/modifiers/symbolEffect.ts +53 -27
  83. package/src/swift-ui/modifiers/symbolEffectOptions.ts +22 -0
  84. package/src/universal/Picker/Picker.android.tsx +9 -2
  85. package/src/universal/Picker/Picker.ios.tsx +5 -0
  86. package/src/universal/Picker/Picker.tsx +2 -0
  87. package/src/universal/Picker/types.ts +5 -0
  88. package/ios/Modifiers/HostViewContentMarginsMitigation.swift +0 -98
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.md5 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha1 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha256 +0 -1
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27-sources.jar.sha512 +0 -1
  93. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar +0 -0
  94. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.md5 +0 -1
  95. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha1 +0 -1
  96. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha256 +0 -1
  97. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.aar.sha512 +0 -1
  98. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.md5 +0 -1
  99. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha1 +0 -1
  100. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha256 +0 -1
  101. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.module.sha512 +0 -1
  102. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.md5 +0 -1
  103. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha1 +0 -1
  104. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha256 +0 -1
  105. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.27/expo.modules.ui-58.0.27.pom.sha512 +0 -1
@@ -1,18 +1,25 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { Pressable, View } from 'react-native';
4
- import { HorizontalDivider } from '../../jetpack-compose/Divider';
5
- import { DropdownMenu } from '../../jetpack-compose/DropdownMenu';
4
+ import { Box } from '../../jetpack-compose/Box';
5
+ import { DropdownMenuGroup, DropdownMenuPopup, SelectableDropdownMenuItem } from '../../jetpack-compose/DropdownMenu';
6
6
  import { DropdownMenuItem } from '../../jetpack-compose/DropdownMenu/DropdownMenuItem';
7
7
  import { Host } from '../../jetpack-compose/Host';
8
8
  import { Icon } from '../../jetpack-compose/Icon';
9
9
  import { RNHostView } from '../../jetpack-compose/RNHostView';
10
+ import { Spacer } from '../../jetpack-compose/Spacer';
10
11
  import { Text as ComposeText } from '../../jetpack-compose/Text';
11
12
  import { useMaterialColors } from '../../jetpack-compose/colors';
13
+ import { height, verticalScroll } from '../../jetpack-compose/modifiers';
12
14
  // Clipped popups drop the status bar offset, so edge-to-edge menus near the bottom detach from the anchor.
13
15
  const POPUP_PROPERTIES = {
14
16
  clippingEnabled: false
15
17
  };
18
+ const CHECK_ICON = require('../../../assets/check.xml');
19
+ // Compose's `MenuDefaults.GroupSpacing`.
20
+ const MENU_GROUP_SPACING = 2;
21
+ // Compose's `MenuDefaults.LeadingIconSize`.
22
+ const MENU_ITEM_ICON_SIZE = 20;
16
23
  function actionId(action) {
17
24
  return action.id ?? action.title;
18
25
  }
@@ -40,95 +47,179 @@ function buildElementColors(action, destructiveColor) {
40
47
  disabledLeadingIconColor: leadingIconColor
41
48
  };
42
49
  }
43
- function MenuActionItem({ action, onPressAction, dismissAll, destructiveColor }) {
44
- const [submenuExpanded, setSubmenuExpanded] = React.useState(false);
45
- if (action.attributes?.hidden) {
46
- return null;
50
+ function buildSelectableColors(action, destructiveColor) {
51
+ const colors = buildElementColors(action, destructiveColor);
52
+ if (colors == null) {
53
+ return undefined;
47
54
  }
48
- const { subactions, displayInline, state, attributes, title, image, imageColor } = action;
55
+ // A selected item keeps the destructive or custom colors instead of the selected-state colors.
56
+ return {
57
+ ...colors,
58
+ selectedTextColor: colors.textColor,
59
+ selectedLeadingIconColor: colors.leadingIconColor
60
+ };
61
+ }
62
+ /**
63
+ * Splits actions into the groups of a Material 3 Expressive menu. A `displayInline` action
64
+ * becomes a group of its own. Other actions that follow each other share a group.
65
+ */ function groupActions(actions, keyPrefix = '') {
66
+ const groups = [];
67
+ let run = [];
68
+ // The key of a run of actions comes from the inline action before it, not from its first action.
69
+ // So the group does not remount, and an open submenu in it does not close, when an action hides.
70
+ let runKey = `${keyPrefix}^`;
71
+ for (const action of actions){
72
+ if (action.attributes?.hidden) {
73
+ continue;
74
+ }
75
+ if (action.displayInline && action.subactions && action.subactions.length > 0) {
76
+ if (run.length > 0) {
77
+ groups.push({
78
+ key: runKey,
79
+ actions: run
80
+ });
81
+ run = [];
82
+ }
83
+ const sectionKey = `${keyPrefix}${actionId(action)}`;
84
+ groups.push(...groupActions(action.subactions, `${sectionKey}/`));
85
+ runKey = `${sectionKey}$`;
86
+ } else {
87
+ run.push(action);
88
+ }
89
+ }
90
+ if (run.length > 0) {
91
+ groups.push({
92
+ key: runKey,
93
+ actions: run
94
+ });
95
+ }
96
+ return groups;
97
+ }
98
+ function MenuGroups({ actions, ...handlers }) {
99
+ const groups = groupActions(actions);
100
+ return groups.map((group, groupIndex)=>/*#__PURE__*/ _jsxs(React.Fragment, {
101
+ children: [
102
+ groupIndex > 0 && /*#__PURE__*/ _jsx(Spacer, {
103
+ modifiers: [
104
+ height(MENU_GROUP_SPACING)
105
+ ]
106
+ }),
107
+ /*#__PURE__*/ _jsx(DropdownMenuGroup, {
108
+ shapes: {
109
+ index: groupIndex,
110
+ count: groups.length
111
+ },
112
+ children: group.actions.map((action, index)=>/*#__PURE__*/ _jsx(MenuActionItem, {
113
+ action: action,
114
+ shape: {
115
+ index,
116
+ count: group.actions.length
117
+ },
118
+ ...handlers
119
+ }, actionId(action)))
120
+ })
121
+ ]
122
+ }, group.key));
123
+ }
124
+ function MenuActionItem({ action, shape, onPressAction, dismissAll, destructiveColor }) {
125
+ const [submenuExpanded, setSubmenuExpanded] = React.useState(false);
126
+ const { subactions, state, attributes, title, image, imageColor } = action;
49
127
  // `image` is non-string only when caller passes an ImageSourcePropType
50
128
  // (number from `require()` or `{ uri }`). The string form is iOS-only (SF Symbol).
51
129
  const leadingIconSource = typeof image === 'string' || image == null ? null : image;
52
130
  const elementColors = buildElementColors(action, destructiveColor);
131
+ const leadingIcon = leadingIconSource && /*#__PURE__*/ _jsx(Icon, {
132
+ source: leadingIconSource,
133
+ size: MENU_ITEM_ICON_SIZE,
134
+ tint: imageColor
135
+ });
53
136
  if (subactions && subactions.length > 0) {
54
- if (displayInline) {
55
- return /*#__PURE__*/ _jsxs(_Fragment, {
56
- children: [
57
- /*#__PURE__*/ _jsx(HorizontalDivider, {}),
58
- subactions.map((sub)=>/*#__PURE__*/ _jsx(MenuActionItem, {
59
- action: sub,
60
- onPressAction: onPressAction,
61
- dismissAll: dismissAll,
62
- destructiveColor: destructiveColor
63
- }, actionId(sub))),
64
- /*#__PURE__*/ _jsx(HorizontalDivider, {})
65
- ]
66
- });
67
- }
68
- return /*#__PURE__*/ _jsxs(DropdownMenu, {
69
- expanded: submenuExpanded,
70
- onDismissRequest: ()=>setSubmenuExpanded(false),
71
- properties: POPUP_PROPERTIES,
137
+ return /*#__PURE__*/ _jsxs(Box, {
72
138
  children: [
73
- /*#__PURE__*/ _jsx(DropdownMenu.Trigger, {
74
- children: /*#__PURE__*/ _jsxs(DropdownMenuItem, {
75
- enabled: !attributes?.disabled,
76
- elementColors: elementColors,
77
- onClick: ()=>setSubmenuExpanded(true),
78
- children: [
79
- /*#__PURE__*/ _jsx(DropdownMenuItem.Text, {
80
- children: /*#__PURE__*/ _jsx(ComposeText, {
81
- children: title
82
- })
83
- }),
84
- leadingIconSource && /*#__PURE__*/ _jsx(DropdownMenuItem.LeadingIcon, {
85
- children: /*#__PURE__*/ _jsx(Icon, {
86
- source: leadingIconSource,
87
- size: 24,
88
- tint: imageColor
89
- })
139
+ /*#__PURE__*/ _jsxs(DropdownMenuItem, {
140
+ enabled: !attributes?.disabled,
141
+ shape: shape,
142
+ elementColors: elementColors,
143
+ onClick: ()=>setSubmenuExpanded(true),
144
+ children: [
145
+ /*#__PURE__*/ _jsx(DropdownMenuItem.Text, {
146
+ children: /*#__PURE__*/ _jsx(ComposeText, {
147
+ children: title
90
148
  })
91
- ]
149
+ }),
150
+ leadingIcon && /*#__PURE__*/ _jsx(DropdownMenuItem.LeadingIcon, {
151
+ children: leadingIcon
152
+ })
153
+ ]
154
+ }),
155
+ /*#__PURE__*/ _jsx(DropdownMenuPopup, {
156
+ expanded: submenuExpanded,
157
+ onDismissRequest: ()=>setSubmenuExpanded(false),
158
+ anchorPosition: "end",
159
+ properties: POPUP_PROPERTIES,
160
+ // Unlike `DropdownMenu`, `DropdownMenuPopup` does not scroll a menu taller than the window.
161
+ modifiers: [
162
+ verticalScroll()
163
+ ],
164
+ children: /*#__PURE__*/ _jsx(MenuGroups, {
165
+ actions: subactions,
166
+ onPressAction: onPressAction,
167
+ dismissAll: ()=>{
168
+ setSubmenuExpanded(false);
169
+ dismissAll();
170
+ },
171
+ destructiveColor: destructiveColor
172
+ })
173
+ })
174
+ ]
175
+ });
176
+ }
177
+ const onClick = ()=>{
178
+ onPressAction?.(makeEvent(action));
179
+ dismissAll();
180
+ };
181
+ // An action with a `state` is a choice. Compose gives a selected choice a highlighted container
182
+ // and `SelectedLeadingIcon`, which replaces the leading icon while the item is selected, and
183
+ // exposes the selected state to screen readers.
184
+ if (state != null) {
185
+ const colors = buildSelectableColors(action, destructiveColor);
186
+ return /*#__PURE__*/ _jsxs(SelectableDropdownMenuItem, {
187
+ selected: state === 'on',
188
+ enabled: !attributes?.disabled,
189
+ shapes: shape,
190
+ colors: colors,
191
+ onClick: onClick,
192
+ children: [
193
+ /*#__PURE__*/ _jsx(SelectableDropdownMenuItem.Text, {
194
+ children: /*#__PURE__*/ _jsx(ComposeText, {
195
+ children: title
92
196
  })
93
197
  }),
94
- /*#__PURE__*/ _jsx(DropdownMenu.Items, {
95
- children: subactions.map((sub)=>/*#__PURE__*/ _jsx(MenuActionItem, {
96
- action: sub,
97
- onPressAction: onPressAction,
98
- dismissAll: ()=>{
99
- setSubmenuExpanded(false);
100
- dismissAll();
101
- },
102
- destructiveColor: destructiveColor
103
- }, actionId(sub)))
198
+ leadingIcon && /*#__PURE__*/ _jsx(SelectableDropdownMenuItem.LeadingIcon, {
199
+ children: leadingIcon
200
+ }),
201
+ /*#__PURE__*/ _jsx(SelectableDropdownMenuItem.SelectedLeadingIcon, {
202
+ children: /*#__PURE__*/ _jsx(Icon, {
203
+ source: CHECK_ICON,
204
+ size: MENU_ITEM_ICON_SIZE
205
+ })
104
206
  })
105
207
  ]
106
208
  });
107
209
  }
108
210
  return /*#__PURE__*/ _jsxs(DropdownMenuItem, {
109
211
  enabled: !attributes?.disabled,
212
+ shape: shape,
110
213
  elementColors: elementColors,
111
- onClick: ()=>{
112
- onPressAction?.(makeEvent(action));
113
- dismissAll();
114
- },
214
+ onClick: onClick,
115
215
  children: [
116
216
  /*#__PURE__*/ _jsx(DropdownMenuItem.Text, {
117
217
  children: /*#__PURE__*/ _jsx(ComposeText, {
118
218
  children: title
119
219
  })
120
220
  }),
121
- leadingIconSource && /*#__PURE__*/ _jsx(DropdownMenuItem.LeadingIcon, {
122
- children: /*#__PURE__*/ _jsx(Icon, {
123
- source: leadingIconSource,
124
- size: 24,
125
- tint: imageColor
126
- })
127
- }),
128
- state === 'on' && /*#__PURE__*/ _jsx(DropdownMenuItem.TrailingIcon, {
129
- children: /*#__PURE__*/ _jsx(ComposeText, {
130
- children: "✓"
131
- })
221
+ leadingIcon && /*#__PURE__*/ _jsx(DropdownMenuItem.LeadingIcon, {
222
+ children: leadingIcon
132
223
  })
133
224
  ]
134
225
  });
@@ -136,7 +227,7 @@ function MenuActionItem({ action, onPressAction, dismissAll, destructiveColor })
136
227
  /**
137
228
  * A drop-in replacement for `@react-native-menu/menu` on Android.
138
229
  * Wraps the trigger in a `Pressable` (whose `onPress`/`onLongPress` opens the menu) and
139
- * renders the actions tree as a controlled Material `DropdownMenu`.
230
+ * renders the actions tree as a controlled Material 3 Expressive `DropdownMenuPopup`.
140
231
  *
141
232
  * Note: when `action.image` is a string, it is treated as an iOS SF Symbol and ignored
142
233
  * on Android — pass an `ImageSourcePropType` (e.g. `require('./icon.xml')`) to render
@@ -177,34 +268,36 @@ function MenuActionItem({ action, onPressAction, dismissAll, destructiveColor })
177
268
  children: /*#__PURE__*/ _jsx(Host, {
178
269
  colorScheme: colorScheme,
179
270
  matchContents: true,
180
- children: /*#__PURE__*/ _jsxs(DropdownMenu, {
181
- expanded: expanded,
182
- onDismissRequest: dismissAll,
183
- properties: POPUP_PROPERTIES,
271
+ children: /*#__PURE__*/ _jsxs(Box, {
184
272
  children: [
185
- /*#__PURE__*/ _jsx(DropdownMenu.Trigger, {
186
- children: /*#__PURE__*/ _jsx(RNHostView, {
187
- matchContents: true,
188
- children: /*#__PURE__*/ _jsx(Pressable, {
189
- onPress: shouldOpenOnLongPress ? undefined : open,
190
- onLongPress: shouldOpenOnLongPress ? open : undefined,
191
- // Mirror upstream `@react-native-menu/menu`, which intercepts touches
192
- // natively on a bare `ReactViewGroup`: no click sound, no focus
193
- // highlight, no extra a11y node — children declare their own role.
194
- android_disableSound: true,
195
- focusable: false,
196
- accessible: false,
197
- children: children
198
- })
273
+ /*#__PURE__*/ _jsx(RNHostView, {
274
+ matchContents: true,
275
+ children: /*#__PURE__*/ _jsx(Pressable, {
276
+ onPress: shouldOpenOnLongPress ? undefined : open,
277
+ onLongPress: shouldOpenOnLongPress ? open : undefined,
278
+ // Mirror upstream `@react-native-menu/menu`, which intercepts touches
279
+ // natively on a bare `ReactViewGroup`: no click sound, no focus
280
+ // highlight, no extra a11y node — children declare their own role.
281
+ android_disableSound: true,
282
+ focusable: false,
283
+ accessible: false,
284
+ children: children
199
285
  })
200
286
  }),
201
- /*#__PURE__*/ _jsx(DropdownMenu.Items, {
202
- children: actions.map((action)=>/*#__PURE__*/ _jsx(MenuActionItem, {
203
- action: action,
204
- onPressAction: onPressAction,
205
- dismissAll: dismissAll,
206
- destructiveColor: destructiveColor
207
- }, actionId(action)))
287
+ /*#__PURE__*/ _jsx(DropdownMenuPopup, {
288
+ expanded: expanded,
289
+ onDismissRequest: dismissAll,
290
+ properties: POPUP_PROPERTIES,
291
+ // Unlike `DropdownMenu`, `DropdownMenuPopup` does not scroll a menu taller than the window.
292
+ modifiers: [
293
+ verticalScroll()
294
+ ],
295
+ children: /*#__PURE__*/ _jsx(MenuGroups, {
296
+ actions: actions,
297
+ onPressAction: onPressAction,
298
+ dismissAll: dismissAll,
299
+ destructiveColor: destructiveColor
300
+ })
208
301
  })
209
302
  ]
210
303
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["community/menu/MenuView.android.tsx"],"sourcesContent":[null],"names":["React","Pressable","View","HorizontalDivider","DropdownMenu","DropdownMenuItem","Host","Icon","RNHostView","Text","ComposeText","useMaterialColors","POPUP_PROPERTIES","clippingEnabled","actionId","action","id","title","makeEvent","nativeEvent","event","buildElementColors","destructiveColor","isDestructive","attributes","destructive","textColor","titleColor","undefined","leadingIconColor","disabledTextColor","disabledLeadingIconColor","MenuActionItem","onPressAction","dismissAll","submenuExpanded","setSubmenuExpanded","useState","hidden","subactions","displayInline","state","image","imageColor","leadingIconSource","elementColors","length","map","sub","expanded","onDismissRequest","properties","Trigger","enabled","disabled","onClick","LeadingIcon","source","size","tint","Items","TrailingIcon","MenuView","props","ref","actions","colorScheme","onOpenMenu","onCloseMenu","shouldOpenOnLongPress","style","children","testID","setExpanded","expandedRef","useRef","open","useCallback","current","useImperativeHandle","show","error","matchContents","onPress","onLongPress","android_disableSound","focusable","accessible"],"mappings":";AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAE/C,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,YAAY,QAAQ,qCAAqC;AAClE,SACEC,gBAAgB,QAEX,sDAAsD;AAC7D,SAASC,IAAI,QAAQ,6BAA6B;AAClD,SAASC,IAAI,QAAQ,6BAA6B;AAClD,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,QAAQC,WAAW,QAAQ,6BAA6B;AACjE,SAASC,iBAAiB,QAAQ,+BAA+B;AAIjE,2GAA2G;AAC3G,MAAMC,mBAAoC;IAAEC,iBAAiB;AAAM;AAEnE,SAASC,SAASC,MAAkB;IAClC,OAAOA,OAAOC,EAAE,IAAID,OAAOE,KAAK;AAClC;AAEA,SAASC,UAAUH,MAAkB;IACnC,OAAO;QAAEI,aAAa;YAAEC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AM6E,WAAW,CAAC;QAC7B,IAAIH,YAAYI,OAAO,EAAE;QACzBJ,YAAYI,OAAO,GAAG;QACtBL,YAAY;QACZN;IACF,GAAG;QAACA;KAAW;IAEf,MAAMjC,aAAalC,MAAM6E,WAAW,CAAC;QACnC,IAAI,CAACH,YAAYI,OAAO,EAAE;QAC1BJ,YAAYI,OAAO,GAAG;QACtBL,YAAY;QACZL;IACF,GAAG;QAACA;KAAY;IAEhBpE,MAAM+E,mBAAmB,CAACf,KAAK,IAAO,CAAA;YAAEgB,MAAMJ;QAAK,CAAA,GAAI;QAACA;KAAK;IAE7D,MAAMtD,mBAAmBX,oBAAoBsE,KAAK;IAElD,qBACE,KAAC/E;QAAKoE,OAAOA;QAAOE,QAAQA;kBAC1B,cAAA,KAAClE;YAAK4D,aAAaA;YAAagB,aAAa;sBAC3C,cAAA,MAAC9E;gBACC6C,UAAUA;gBACVC,kBAAkBhB;gBAClBiB,YAAYvC;;kCACZ,KAACR,aAAagD,OAAO;kCACnB,cAAA,KAAC5C;4BAAW0E,aAAa;sCACvB,cAAA,KAACjF;gCACCkF,SAASd,wBAAwBzC,YAAYgD;gCAC7CQ,aAAaf,wBAAwBO,OAAOhD;gCAC5C,sEAAsE;gCACtE,gEAAgE;gCAChE,mEAAmE;gCACnEyD,oBAAoB;gCACpBC,WAAW;gCACXC,YAAY;0CACXhB;;;;kCAIP,KAACnE,aAAawD,KAAK;kCAChBK,QAAQlB,GAAG,CAAC,CAAChC,uBACZ,KAACiB;gCAECjB,QAAQA;gCACRkB,eAAeA;gCACfC,YAAYA;gCACZZ,kBAAkBA;+BAJbR,SAASC;;;;;;AAY9B"}
1
+ {"version":3,"sources":["community/menu/MenuView.android.tsx"],"sourcesContent":[null],"names":["React","Pressable","View","Box","DropdownMenuGroup","DropdownMenuPopup","SelectableDropdownMenuItem","DropdownMenuItem","Host","Icon","RNHostView","Spacer","Text","ComposeText","useMaterialColors","height","verticalScroll","POPUP_PROPERTIES","clippingEnabled","CHECK_ICON","require","MENU_GROUP_SPACING","MENU_ITEM_ICON_SIZE","actionId","action","id","title","makeEvent","nativeEvent","event","buildElementColors","destructiveColor","isDestructive","attributes","destructive","textColor","titleColor","undefined","leadingIconColor","disabledTextColor","disabledLeadingIconColor","buildSelectableColors","colors","selectedTextColor","selectedLeadingIconColor","groupActions","actions","keyPrefix","groups","run","runKey","hidden","displayInline","subactions","length","push","key","sectionKey","MenuGroups","handlers","map","group","groupIndex","Fragment","modifiers","shapes","index","count","MenuActionItem","shape","onPressAction","dismissAll","submenuExpanded","setSubmenuExpanded","useState","state","image","imageColor","leadingIconSource","elementColors","leadingIcon","source","size","tint","enabled","disabled","onClick","LeadingIcon","expanded","onDismissRequest","anchorPosition","properties","selected","SelectedLeadingIcon","MenuView","props","ref","colorScheme","onOpenMenu","onCloseMenu","shouldOpenOnLongPress","style","children","testID","setExpanded","expandedRef","useRef","open","useCallback","current","useImperativeHandle","show","error","matchContents","onPress","onLongPress","android_disableSound","focusable","accessible"],"mappings":";AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAE/C,SAASC,GAAG,QAAQ,4BAA4B;AAChD,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,0BAA0B,QAGrB,qCAAqC;AAC5C,SACEC,gBAAgB,QAEX,sDAAsD;AAC7D,SAASC,IAAI,QAAQ,6BAA6B;AAClD,SAASC,IAAI,QAAQ,6BAA6B;AAClD,SAASC,UAAU,QAAQ,mCAAmC;AAC9D,SAASC,MAAM,QAAQ,+BAA+B;AACtD,SAASC,QAAQC,WAAW,QAAQ,6BAA6B;AACjE,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,MAAM,EAAEC,cAAc,QAAQ,kCAAkC;AAIzE,2GAA2G;AAC3G,MAAMC,mBAAoC;IAAEC,iBAAiB;AAAM;AAEnE,MAAMC,aAAaC,QAAQ;AAE3B,yCAAyC;AACzC,MAAMC,qBAAqB;AAC3B,4CAA4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AAChH;4BACCiH,SAASd,wBAAwB/D,YAAYsE;4BAC7CQ,aAAaf,wBAAwBO,OAAOtE;4BAC5C,sEAAsE;4BACtE,gEAAgE;4BAChE,mEAAmE;4BACnE+E,oBAAoB;4BACpBC,WAAW;4BACXC,YAAY;sCACXhB;;;kCAGL,KAACjG;wBACCmF,UAAUA;wBACVC,kBAAkBlB;wBAClBoB,YAAY1E;wBACZ,4FAA4F;wBAC5F+C,WAAW;4BAAChD;yBAAiB;kCAC7B,cAAA,KAAC0C;4BACCZ,SAASA;4BACTwB,eAAeA;4BACfC,YAAYA;4BACZxC,kBAAkBA;;;;;;;AAOhC"}
@@ -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;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AEtD,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","use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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';