@expo/ui 58.0.23 → 58.0.25

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 (90) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +6 -4
  4. package/android/src/main/java/expo/modules/ui/HostView.kt +33 -7
  5. package/android/src/main/java/expo/modules/ui/RNHostView.kt +138 -2
  6. package/android/src/main/java/expo/modules/ui/SliderView.kt +5 -4
  7. package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +5 -4
  8. package/build/community/bottom-sheet/BottomSheet.android.js +2 -0
  9. package/build/community/bottom-sheet/BottomSheet.android.js.map +1 -1
  10. package/build/community/datetime-picker/DateTimePicker.android.js +8 -1
  11. package/build/community/datetime-picker/DateTimePicker.android.js.map +1 -1
  12. package/build/community/datetime-picker/types.d.ts +0 -1
  13. package/build/community/datetime-picker/types.js.map +1 -1
  14. package/build/community/menu/MenuView.ios.js +2 -1
  15. package/build/community/menu/MenuView.ios.js.map +1 -1
  16. package/build/jetpack-compose/Text/index.js +5 -4
  17. package/build/jetpack-compose/Text/index.js.map +1 -1
  18. package/build/swift-ui/ContentUnavailableView/index.d.ts +5 -0
  19. package/build/swift-ui/ContentUnavailableView/index.js +7 -2
  20. package/build/swift-ui/ContentUnavailableView/index.js.map +1 -1
  21. package/build/swift-ui/RNHostView.d.ts +7 -1
  22. package/build/swift-ui/RNHostView.js +2 -1
  23. package/build/swift-ui/RNHostView.js.map +1 -1
  24. package/build/swift-ui/Text/index.js +2 -1
  25. package/build/swift-ui/Text/index.js.map +1 -1
  26. package/build/swift-ui/modifiers/index.d.ts +18 -0
  27. package/build/swift-ui/modifiers/index.js +9 -0
  28. package/build/swift-ui/modifiers/index.js.map +1 -1
  29. package/build/universal/BottomSheet/index.android.js +5 -5
  30. package/build/universal/BottomSheet/index.android.js.map +1 -1
  31. package/build/universal/FieldGroup/FieldSection.android.js +32 -5
  32. package/build/universal/FieldGroup/FieldSection.android.js.map +1 -1
  33. package/build/utils/flattenFragments.d.ts +7 -0
  34. package/build/utils/flattenFragments.js +17 -0
  35. package/build/utils/flattenFragments.js.map +1 -0
  36. package/ios/ContentUnavailableView.swift +9 -1
  37. package/ios/Modifiers/FontModifier.swift +27 -0
  38. package/ios/Modifiers/SectionIndexLabelModifier.swift +21 -0
  39. package/ios/Modifiers/ViewModifierRegistry.swift +22 -0
  40. package/ios/RNHostView.swift +4 -0
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.23/expo.modules.ui-58.0.23-sources.jar → 58.0.25/expo.modules.ui-58.0.25-sources.jar} +0 -0
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.md5 +1 -0
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha1 +1 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha256 +1 -0
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25-sources.jar.sha512 +1 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar +0 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.md5 +1 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha1 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha256 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.aar.sha512 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.23/expo.modules.ui-58.0.23.module → 58.0.25/expo.modules.ui-58.0.25.module} +22 -22
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.md5 +1 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha1 +1 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha256 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.module.sha512 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.23/expo.modules.ui-58.0.23.pom → 58.0.25/expo.modules.ui-58.0.25.pom} +1 -1
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.md5 +1 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha1 +1 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha256 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.25/expo.modules.ui-58.0.25.pom.sha512 +1 -0
  61. package/package.json +2 -2
  62. package/src/community/bottom-sheet/BottomSheet.android.tsx +2 -1
  63. package/src/community/datetime-picker/DateTimePicker.android.tsx +6 -3
  64. package/src/community/datetime-picker/types.tsx +0 -1
  65. package/src/community/menu/MenuView.ios.tsx +3 -2
  66. package/src/jetpack-compose/Text/index.tsx +5 -4
  67. package/src/swift-ui/ContentUnavailableView/index.tsx +19 -4
  68. package/src/swift-ui/RNHostView.tsx +8 -1
  69. package/src/swift-ui/Text/index.tsx +2 -1
  70. package/src/swift-ui/modifiers/index.ts +19 -0
  71. package/src/universal/BottomSheet/index.android.tsx +3 -1
  72. package/src/universal/FieldGroup/FieldSection.android.tsx +28 -2
  73. package/src/utils/flattenFragments.ts +22 -0
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.md5 +0 -1
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha1 +0 -1
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha256 +0 -1
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23-sources.jar.sha512 +0 -1
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar +0 -0
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.md5 +0 -1
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha1 +0 -1
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha256 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.aar.sha512 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.md5 +0 -1
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha1 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha256 +0 -1
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.module.sha512 +0 -1
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.md5 +0 -1
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha1 +0 -1
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha256 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.23/expo.modules.ui-58.0.23.pom.sha512 +0 -1
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "58.0.23",
6
+ "version": "58.0.25",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.ui-58.0.23.aar",
28
- "url": "expo.modules.ui-58.0.23.aar",
29
- "size": 1926373,
30
- "sha512": "af535bbaf8b95e60596de23f669fba4cdd80bdc7a0348baea99c16ce43bcc01cc5ffa1e7b84a5b90c5dc4e63be193ad6b91ce972d114e353f38b3e9605d3f37b",
31
- "sha256": "f671f187a74250ba996b92e17f0c80993c0d8108de7bdd9acd90d7b489025e97",
32
- "sha1": "cacbac944e97aa2e56e6e7095d5ab64bff82fe73",
33
- "md5": "e67ac71a9fce6fac7aecbd8d681af3b9"
27
+ "name": "expo.modules.ui-58.0.25.aar",
28
+ "url": "expo.modules.ui-58.0.25.aar",
29
+ "size": 1946686,
30
+ "sha512": "d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581",
31
+ "sha256": "f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f",
32
+ "sha1": "955a5ea0689652fd52f312a16936c39cdd9a8f98",
33
+ "md5": "92b25ba3977597adf5cb9f0393240678"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-58.0.23.aar",
145
- "url": "expo.modules.ui-58.0.23.aar",
146
- "size": 1926373,
147
- "sha512": "af535bbaf8b95e60596de23f669fba4cdd80bdc7a0348baea99c16ce43bcc01cc5ffa1e7b84a5b90c5dc4e63be193ad6b91ce972d114e353f38b3e9605d3f37b",
148
- "sha256": "f671f187a74250ba996b92e17f0c80993c0d8108de7bdd9acd90d7b489025e97",
149
- "sha1": "cacbac944e97aa2e56e6e7095d5ab64bff82fe73",
150
- "md5": "e67ac71a9fce6fac7aecbd8d681af3b9"
144
+ "name": "expo.modules.ui-58.0.25.aar",
145
+ "url": "expo.modules.ui-58.0.25.aar",
146
+ "size": 1946686,
147
+ "sha512": "d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581",
148
+ "sha256": "f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f",
149
+ "sha1": "955a5ea0689652fd52f312a16936c39cdd9a8f98",
150
+ "md5": "92b25ba3977597adf5cb9f0393240678"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-58.0.23-sources.jar",
165
- "url": "expo.modules.ui-58.0.23-sources.jar",
166
- "size": 120740,
167
- "sha512": "b26a89fb05660b23803476e429d601d1748e326174f8e14f1cf41b81136ee433430b89e6f8ff8a0416fe395849622e90460ace881524eb25ee7535e9e8145349",
168
- "sha256": "4ee2c0ad4fd1bd658bdb798f98175ff9e2aa611111d7903ecf08100e6a30993b",
169
- "sha1": "ab9fe4d79b8ab44c10f285cdc817c2772b1628be",
170
- "md5": "4363fa4b990255ed9fb723cae45368cf"
164
+ "name": "expo.modules.ui-58.0.25-sources.jar",
165
+ "url": "expo.modules.ui-58.0.25-sources.jar",
166
+ "size": 122645,
167
+ "sha512": "7067f7aabef1e8872cc798d93f8b8bc1736f678f3668d7eb4c13af5cb301454b1bcd184f3d2f8e54e73ad5638956b3e517955166551e94fe5e74ee25c6e7c703",
168
+ "sha256": "1f04b317f757dbed2ba12650ac539706c6a5d9a7a05cc6c004f4b0d752482ca4",
169
+ "sha1": "9e68c38ef193df41a3c083158aa103c674511b71",
170
+ "md5": "c817ba0333b967a239df3a6777bd57ff"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ 87f148a603920eca9955ff39ccefa283932f9627
@@ -0,0 +1 @@
1
+ ee1ce6b5958aede97efbd68fd62f0db816860f9f76d6c809f629f382db9d65ed
@@ -0,0 +1 @@
1
+ 6f8dc44b2cd482c1321242e46eb30c4c02da5472ffd5d983492e482c134fdf3752dcc008612453e40e377588627e9b8ae8f3072d0658739351c1d6cb562eafe9
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.ui</groupId>
11
11
  <artifactId>expo.modules.ui</artifactId>
12
- <version>58.0.23</version>
12
+ <version>58.0.25</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.ui</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 3780297b6c6f103af3449a71798de47b6558698c
@@ -0,0 +1 @@
1
+ b78be19358302cd52bce296b7aa89c6a34b6e2624dbc9e42904d41389a17fb80
@@ -0,0 +1 @@
1
+ 8a9735eae90ae90c91881c8a28a3beae4b787ec44c2a4fb4f8cc9801f472d985aed0c2bb2f7f47dce024a1c8dfd39ae7282d66bdefaf675d1ed995c5d045cddc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "58.0.23",
3
+ "version": "58.0.25",
4
4
  "description": "A collection of UI components",
5
5
  "keywords": [
6
6
  "Jetpack Compose",
@@ -141,7 +141,7 @@
141
141
  },
142
142
  "devDependencies": {
143
143
  "@babel/core": "^7.26.0",
144
- "@expo/internal-scripts": "58.0.4",
144
+ "@expo/internal-scripts": "58.0.5",
145
145
  "@playwright/test": "^1.59.0",
146
146
  "@testing-library/react": "^16.3.0",
147
147
  "@testing-library/react-native": "^14.0.1",
@@ -186,7 +186,8 @@ export function BottomSheet(props: BottomSheetProps) {
186
186
  return (
187
187
  <BottomSheetInternalContext.Provider value={internalContextValue}>
188
188
  <BottomSheetContext.Provider value={methods}>
189
- <Host style={{ position: 'absolute', width }} pointerEvents="none">
189
+ {/* Fill the parent, so `removeClippedSubviews` doesn't detach a zero-height host. */}
190
+ <Host style={{ position: 'absolute', top: 0, bottom: 0, width }} pointerEvents="none">
190
191
  <ModalBottomSheet
191
192
  ref={sheetRef}
192
193
  onDismissRequest={handleDismiss}
@@ -48,6 +48,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
48
48
  testID,
49
49
  style,
50
50
  accentColor,
51
+ themeVariant,
51
52
  presentation = 'dialog',
52
53
  positiveButton,
53
54
  negativeButton,
@@ -102,13 +103,13 @@ export function DateTimePicker(props: DateTimePickerProps) {
102
103
  if (presentation === 'dialog') {
103
104
  if (mode === 'time') {
104
105
  return (
105
- <Host style={style}>
106
+ <Host colorScheme={themeVariant} style={style}>
106
107
  <AndroidTimePickerDialog {...dialogProps} is24Hour={is24Hour} />
107
108
  </Host>
108
109
  );
109
110
  }
110
111
  return (
111
- <Host style={style}>
112
+ <Host colorScheme={themeVariant} style={style}>
112
113
  <AndroidDatePickerDialog
113
114
  {...dialogProps}
114
115
  variant={displayToAndroidVariant(display)}
@@ -119,7 +120,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
119
120
  }
120
121
 
121
122
  return (
122
- <Host matchContents={{ vertical: true }} style={style}>
123
+ <Host matchContents={{ vertical: true }} colorScheme={themeVariant} style={style}>
123
124
  <AndroidPicker
124
125
  initialDate={initialDate}
125
126
  displayedComponents={modeToDisplayedComponents(mode)}
@@ -127,6 +128,8 @@ export function DateTimePicker(props: DateTimePickerProps) {
127
128
  selectableDates={selectableDates}
128
129
  is24Hour={is24Hour}
129
130
  color={accentColor}
131
+ // Match iOS, where the inline picker has no background of its own.
132
+ elementColors={{ containerColor: 'transparent' }}
130
133
  onDateSelected={onDateSelected}
131
134
  showVariantToggle={false}
132
135
  // Match iOS, where the inline picker has no label: hide Material 3's "Select date" title
@@ -93,7 +93,6 @@ export interface DateTimePickerProps extends Pick<ViewProps, 'style'> {
93
93
  locale?: string;
94
94
  /**
95
95
  * Force a specific color scheme on the picker.
96
- * @platform ios
97
96
  */
98
97
  themeVariant?: 'dark' | 'light';
99
98
  /**
@@ -127,13 +127,14 @@ export function MenuView(props: MenuComponentProps & { ref?: React.Ref<MenuCompo
127
127
  // RNHostView requires a single ReactElement; wrap in a fragment so callers
128
128
  // can pass any `ReactNode` (string, array, etc.).
129
129
  const trigger = (
130
- <RNHostView matchContents>
130
+ <RNHostView matchContents boundedByHost>
131
131
  <>{children}</>
132
132
  </RNHostView>
133
133
  );
134
134
 
135
+ // Sized by Yoga like a `View`, so the trigger can fill or wrap in the space it is given.
135
136
  return (
136
- <Host matchContents style={style} testID={testID} ignoreSafeArea="all">
137
+ <Host style={style} testID={testID} ignoreSafeArea="all">
137
138
  {shouldOpenOnLongPress ? (
138
139
  <ContextMenu>
139
140
  <ContextMenu.Trigger>{trigger}</ContextMenu.Trigger>
@@ -4,6 +4,7 @@ import type { ColorValue } from 'react-native';
4
4
 
5
5
  import { type ModifierConfig } from '../../types';
6
6
  import { getTextFromChildren } from '../../utils';
7
+ import { flattenFragments } from '../../utils/flattenFragments';
7
8
  import { createViewModifierEventListener } from '../modifiers/utils';
8
9
 
9
10
  /**
@@ -260,7 +261,7 @@ const TextNativeView: React.ComponentType<NativeTextProps> = requireNativeView(
260
261
  function collectSpans(children: React.ReactNode): TextSpanRecord[] | null {
261
262
  if (children === undefined || children === null) return null;
262
263
 
263
- const childArray = React.Children.toArray(children);
264
+ const childArray = flattenFragments(children);
264
265
  if (childArray.length === 0) return null;
265
266
 
266
267
  const hasNestedText = childArray.some(
@@ -294,14 +295,14 @@ function collectSpans(children: React.ReactNode): TextSpanRecord[] | null {
294
295
  if (nestedSpans) {
295
296
  span.children = nestedSpans;
296
297
  } else {
297
- span.text = getTextFromChildren(childProps.children) ?? '';
298
+ span.text = getTextFromChildren(flattenFragments(childProps.children)) ?? '';
298
299
  }
299
300
 
300
301
  spans.push(span);
301
302
  } else if (__DEV__ && React.isValidElement(child)) {
302
303
  console.warn(
303
304
  'Text: Unsupported child element of type "%s" inside <Text>. Only <Text>, string, and number children are supported.',
304
- typeof child.type === 'function' ? child.type.name || 'Unknown' : child.type
305
+ typeof child.type === 'function' ? child.type.name || 'Unknown' : String(child.type)
305
306
  );
306
307
  }
307
308
  }
@@ -319,7 +320,7 @@ function transformTextProps(props: TextProps): NativeTextProps {
319
320
  ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
320
321
  ...restProps,
321
322
  // When spans are present, use them instead of flat text
322
- ...(spans ? { spans } : { text: getTextFromChildren(children) ?? '' }),
323
+ ...(spans ? { spans } : { text: getTextFromChildren(flattenFragments(children)) ?? '' }),
323
324
  // Extract typography from style (used as base style)
324
325
  typography: style?.typography,
325
326
  // Flatten other style properties (these override the typography style)
@@ -1,6 +1,8 @@
1
1
  import { requireNativeView } from 'expo';
2
+ import { type ReactNode } from 'react';
2
3
  import { type SFSymbol } from 'sf-symbols-typescript';
3
4
 
5
+ import { Slot } from '../SlotView';
4
6
  import { createViewModifierEventListener } from '../modifiers/utils';
5
7
  import { type CommonViewModifierProps } from '../types';
6
8
 
@@ -19,15 +21,24 @@ export interface ContentUnavailableViewProps extends CommonViewModifierProps {
19
21
  * Description of why the content is not available.
20
22
  */
21
23
  description?: string;
24
+
25
+ /**
26
+ * Controls shown below the description, such as a `Button` that tries again.
27
+ */
28
+ actions?: ReactNode;
22
29
  }
23
30
 
24
- const ContentUnavailableViewNativeView: React.ComponentType<ContentUnavailableViewProps> =
31
+ type NativeContentUnavailableViewProps = Omit<ContentUnavailableViewProps, 'actions'> & {
32
+ children?: ReactNode;
33
+ };
34
+
35
+ const ContentUnavailableViewNativeView: React.ComponentType<NativeContentUnavailableViewProps> =
25
36
  requireNativeView('ExpoUI', 'ContentUnavailableView');
26
37
 
27
38
  function transformContentUnavailableViewProps(
28
39
  props: ContentUnavailableViewProps
29
- ): ContentUnavailableViewProps {
30
- const { modifiers, ...restProps } = props;
40
+ ): NativeContentUnavailableViewProps {
41
+ const { modifiers, actions, ...restProps } = props;
31
42
  return {
32
43
  modifiers,
33
44
  ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
@@ -41,5 +52,9 @@ function transformContentUnavailableViewProps(
41
52
  * @platform tvos 17.0+
42
53
  */
43
54
  export function ContentUnavailableView(props: ContentUnavailableViewProps) {
44
- return <ContentUnavailableViewNativeView {...transformContentUnavailableViewProps(props)} />;
55
+ return (
56
+ <ContentUnavailableViewNativeView {...transformContentUnavailableViewProps(props)}>
57
+ {props.actions != null ? <Slot name="actions">{props.actions}</Slot> : null}
58
+ </ContentUnavailableViewNativeView>
59
+ );
45
60
  }
@@ -19,13 +19,19 @@ export interface RNHostViewProps {
19
19
  */
20
20
  matchContents?: boolean | { vertical?: boolean; horizontal?: boolean };
21
21
  onLayout?: (event: LayoutChangeEvent) => void;
22
+ /**
23
+ * Measures the children within the space Yoga gives the `Host`. SwiftUI layout between the
24
+ * `Host` and this view (padding, siblings, scroll views) is not taken into account.
25
+ * @hidden
26
+ */
27
+ boundedByHost?: boolean;
22
28
  /**
23
29
  * The RN View to be hosted.
24
30
  */
25
31
  children: React.ReactElement;
26
32
  }
27
33
 
28
- export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
34
+ export function RNHostView({ matchContents, boundedByHost, ...props }: RNHostViewProps) {
29
35
  // A sheet or popover presents its content in its own view controller, where the React Native
30
36
  // surface root is not an ancestor and so touch dispatches don't work.
31
37
  // Hosted content there owns its touches and is the origin it is measured from; native reads
@@ -41,6 +47,7 @@ export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
41
47
  matchContentsHorizontal={matchContentsHorizontal}
42
48
  matchContentsVertical={matchContentsVertical}
43
49
  expoInternalSizeFromChildren={matchContentsHorizontal || matchContentsVertical}
50
+ expoInternalBoundedByHost={boundedByHost}
44
51
  // `matchContents` can only be used once on mount
45
52
  // So we force unmount when it changes to prevent unexpected layout
46
53
  key={`${matchContentsHorizontal}-${matchContentsVertical}`}>
@@ -1,6 +1,7 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import * as React from 'react';
3
3
 
4
+ import { flattenFragments } from '../../utils/flattenFragments';
4
5
  import { createViewModifierEventListener } from '../modifiers/utils';
5
6
  import { type ClosedRangeDate, type CommonViewModifierProps } from '../types';
6
7
 
@@ -98,7 +99,7 @@ export function Text(props: TextProps) {
98
99
  return null;
99
100
  }
100
101
 
101
- const childArray = React.Children.toArray(children);
102
+ const childArray = flattenFragments(children);
102
103
  if (childArray.length === 0) return null;
103
104
 
104
105
  const isSimpleText = childArray.every(
@@ -1458,6 +1458,16 @@ export const font = (params: {
1458
1458
  | 'footnote'
1459
1459
  | 'caption'
1460
1460
  | 'caption2';
1461
+ /**
1462
+ * Draws both lowercase and uppercase letters as small capitals.
1463
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/font/smallcaps()).
1464
+ */
1465
+ smallCaps?: boolean;
1466
+ /**
1467
+ * The space between lines of text, relative to the font's standard leading.
1468
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/font/leading(_:)).
1469
+ */
1470
+ leading?: 'standard' | 'tight' | 'loose';
1461
1471
  }) => createModifier('font', params);
1462
1472
  /**
1463
1473
  * A standard size for Dynamic Type, from `xSmall` through the five
@@ -1734,6 +1744,15 @@ export type ListStyle = 'automatic' | 'plain' | 'inset' | 'insetGrouped' | 'grou
1734
1744
  */
1735
1745
  export const listStyle = (style: ListStyle) => createModifier('listStyle', { style });
1736
1746
 
1747
+ /**
1748
+ * Sets the label that a list's section index shows for this `Section`. People tap or drag along
1749
+ * the index to scroll the list to the section. On versions before iOS 26 it does nothing.
1750
+ * @param label - The label for the section, usually a single letter.
1751
+ * @platform ios 26.0+
1752
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/sectionindexlabel(_:)).
1753
+ */
1754
+ export const sectionIndexLabel = (label: string) => createModifier('sectionIndexLabel', { label });
1755
+
1737
1756
  /**
1738
1757
  * Adds a luminance to alpha effect to this view.
1739
1758
  * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/SwiftUI/View/luminanceToAlpha()).
@@ -6,6 +6,7 @@ import {
6
6
  type ModifierConfig,
7
7
  } from '@expo/ui/jetpack-compose/modifiers';
8
8
  import { useEffect, useRef, useState } from 'react';
9
+ import { StyleSheet } from 'react-native';
9
10
 
10
11
  import { useIsInsideNativeTree } from '../../NativeTreeContext';
11
12
  import type { BottomSheetProps, SnapPoint } from './types';
@@ -102,7 +103,8 @@ export function BottomSheet({
102
103
  return sheet;
103
104
  }
104
105
  return (
105
- <Host style={{ position: 'absolute' }} pointerEvents="none">
106
+ // Fill the parent, so `removeClippedSubviews` doesn't detach a zero-size host.
107
+ <Host style={StyleSheet.absoluteFill} pointerEvents="none">
106
108
  {sheet}
107
109
  </Host>
108
110
  );
@@ -4,8 +4,10 @@ import {
4
4
  ListItem,
5
5
  useMaterialColors,
6
6
  } from '@expo/ui/jetpack-compose';
7
- import { clip, fillMaxWidth, padding, Shapes } from '@expo/ui/jetpack-compose/modifiers';
7
+ import { clickable, clip, fillMaxWidth, padding, Shapes } from '@expo/ui/jetpack-compose/modifiers';
8
+ import { cloneElement, isValidElement, type ReactElement, type ReactNode } from 'react';
8
9
 
10
+ import { ListItem as UniversalListItem, type ListItemProps } from '../ListItem';
9
11
  import { useUniversalLifecycle } from '../hooks';
10
12
  import { getUserSizingOverrides } from '../modifierUtils';
11
13
  import { transformToModifiers } from '../transformStyle';
@@ -77,11 +79,31 @@ export function FieldSection({
77
79
  <ComposeColumn verticalArrangement={{ spacedBy: 2 }} modifiers={[fillMaxWidth()]}>
78
80
  {rows.map((child, index) => {
79
81
  const position = getFieldItemPosition(index, rows.length);
82
+ const rowModifiers = [
83
+ fillMaxWidth(),
84
+ clip(Shapes.RoundedCorner(cornerRadii(position))),
85
+ ];
86
+ if (isUniversalListItem(child)) {
87
+ // A `ListItem` already renders a Compose `ListItem`. Style it as the row instead of
88
+ // nesting it in another one, which would draw a second surface with its own padding.
89
+ const { onPress, modifiers, colors: itemColors } = child.props;
90
+ return cloneElement(child, {
91
+ key: index,
92
+ onPress: undefined,
93
+ colors: { containerColor: colors.surfaceContainer, ...itemColors },
94
+ // Clip before `clickable` so the ripple follows the rounded row.
95
+ modifiers: [
96
+ ...rowModifiers,
97
+ ...(onPress ? [clickable(onPress)] : []),
98
+ ...(modifiers ?? []),
99
+ ],
100
+ });
101
+ }
80
102
  return (
81
103
  <ListItem
82
104
  key={index}
83
105
  colors={{ containerColor: colors.surfaceContainer }}
84
- modifiers={[fillMaxWidth(), clip(Shapes.RoundedCorner(cornerRadii(position)))]}>
106
+ modifiers={rowModifiers}>
85
107
  <ListItem.HeadlineContent>{child}</ListItem.HeadlineContent>
86
108
  </ListItem>
87
109
  );
@@ -93,6 +115,10 @@ export function FieldSection({
93
115
  );
94
116
  }
95
117
 
118
+ function isUniversalListItem(node: ReactNode): node is ReactElement<ListItemProps> {
119
+ return isValidElement(node) && node.type === UniversalListItem;
120
+ }
121
+
96
122
  /**
97
123
  * Per-position corner radii used to produce the Material 3 grouped-list look.
98
124
  *
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+
3
+ /**
4
+ * Like `React.Children.toArray`, but also flattens `React.Fragment` children so
5
+ * their contents are treated as direct children. Keys of nested elements are
6
+ * prefixed with the fragment's key to stay unique.
7
+ */
8
+ export function flattenFragments(children: React.ReactNode): React.ReactNode[] {
9
+ return React.Children.toArray(children).flatMap((child) => {
10
+ if (
11
+ React.isValidElement<{ children?: React.ReactNode }>(child) &&
12
+ child.type === React.Fragment
13
+ ) {
14
+ return flattenFragments(child.props.children).map((nested) =>
15
+ React.isValidElement(nested)
16
+ ? React.cloneElement(nested, { key: `${child.key}${nested.key}` })
17
+ : nested
18
+ );
19
+ }
20
+ return child;
21
+ });
22
+ }
@@ -1 +0,0 @@
1
- ab9fe4d79b8ab44c10f285cdc817c2772b1628be
@@ -1 +0,0 @@
1
- 4ee2c0ad4fd1bd658bdb798f98175ff9e2aa611111d7903ecf08100e6a30993b
@@ -1 +0,0 @@
1
- b26a89fb05660b23803476e429d601d1748e326174f8e14f1cf41b81136ee433430b89e6f8ff8a0416fe395849622e90460ace881524eb25ee7535e9e8145349
@@ -1 +0,0 @@
1
- cacbac944e97aa2e56e6e7095d5ab64bff82fe73
@@ -1 +0,0 @@
1
- f671f187a74250ba996b92e17f0c80993c0d8108de7bdd9acd90d7b489025e97
@@ -1 +0,0 @@
1
- af535bbaf8b95e60596de23f669fba4cdd80bdc7a0348baea99c16ce43bcc01cc5ffa1e7b84a5b90c5dc4e63be193ad6b91ce972d114e353f38b3e9605d3f37b
@@ -1 +0,0 @@
1
- ac6c7e9eb38f62047ab9db03a8e2d95e3fe6b0a1
@@ -1 +0,0 @@
1
- 418e45206f42efb489f42ed18e5b723cc3f1f9fb1abbf3f32d17033b7119049d
@@ -1 +0,0 @@
1
- b80563b657625ec8904ed747a0050cf9e9d5a07d616ec2d96aa1857dd88b3bcbe7152aade79b0d4766b1b31546b24adf6acc05ec77a11b082bd8a03db2265071
@@ -1 +0,0 @@
1
- 084a07045eafbc0189dba01de4090f037c9e0877
@@ -1 +0,0 @@
1
- f8dba5118733f8693617b5734eded16d6561fb4b99a775f24474d5a0cae715c4
@@ -1 +0,0 @@
1
- 346a85307de71e2c04a7d8de5d73695d9fbe064b6363bd6bbe24819c477a9b737b2173358ae0c2a7377a55c4644cc22f0489095cd93a7cfb052e7a35b83d2324