@expo/ui 58.0.20 → 58.0.22
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.
- package/CHANGELOG.md +29 -0
- package/README.md +86 -2
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/CompositionLocalProviderView.kt +26 -0
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +12 -0
- package/android/src/main/java/expo/modules/ui/HostView.kt +4 -1
- package/android/src/main/java/expo/modules/ui/MaskView.kt +3 -2
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +3 -1
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +11 -7
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +6 -1
- package/android/src/main/java/expo/modules/ui/TopAppBarView.kt +62 -0
- package/android/src/main/java/expo/modules/ui/colors/MaterialColors.kt +61 -0
- package/build/community/bottom-sheet/BottomSheet.ios.js +8 -3
- package/build/community/bottom-sheet/BottomSheet.ios.js.map +1 -1
- package/build/community/pager-view/PagerView.ios.js +25 -8
- package/build/community/pager-view/PagerView.ios.js.map +1 -1
- package/build/community/segmented-control/SegmentedControl.ios.js +11 -2
- package/build/community/segmented-control/SegmentedControl.ios.js.map +1 -1
- package/build/community/segmented-control/types.d.ts +5 -1
- package/build/community/segmented-control/types.js.map +1 -1
- package/build/community/segmented-control/vendor/SegmentedControl.js +2 -2
- package/build/community/segmented-control/vendor/SegmentedControl.js.map +1 -1
- package/build/jetpack-compose/CompositionLocalProvider/index.d.ts +28 -0
- package/build/jetpack-compose/CompositionLocalProvider/index.js +15 -0
- package/build/jetpack-compose/CompositionLocalProvider/index.js.map +1 -0
- package/build/jetpack-compose/Host/index.d.ts +8 -0
- package/build/jetpack-compose/Host/index.js +38 -5
- package/build/jetpack-compose/Host/index.js.map +1 -1
- package/build/jetpack-compose/Switch/index.d.ts +2 -0
- package/build/jetpack-compose/Switch/index.js +1 -0
- package/build/jetpack-compose/Switch/index.js.map +1 -1
- package/build/jetpack-compose/TopAppBar/index.d.ts +72 -0
- package/build/jetpack-compose/TopAppBar/index.js +45 -0
- package/build/jetpack-compose/TopAppBar/index.js.map +1 -0
- package/build/jetpack-compose/index.d.ts +2 -0
- package/build/jetpack-compose/index.js +2 -0
- package/build/jetpack-compose/index.js.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +5 -1
- package/build/jetpack-compose/modifiers/index.js +6 -2
- package/build/jetpack-compose/modifiers/index.js.map +1 -1
- package/build/swift-ui/BottomSheet/index.d.ts +6 -0
- package/build/swift-ui/BottomSheet/index.js +9 -3
- package/build/swift-ui/BottomSheet/index.js.map +1 -1
- package/build/universal/Checkbox/index.android.js +16 -4
- package/build/universal/Checkbox/index.android.js.map +1 -1
- package/build/universal/ScrollView/index.ios.js +12 -6
- package/build/universal/ScrollView/index.ios.js.map +1 -1
- package/build/universal/Switch/index.android.js +17 -4
- package/build/universal/Switch/index.android.js.map +1 -1
- package/build/universal/Switch/index.js +1 -0
- package/build/universal/Switch/index.js.map +1 -1
- package/build/universal/Text/index.js +2 -2
- package/build/universal/Text/index.js.map +1 -1
- package/build/universal/webUtils.js +4 -0
- package/build/universal/webUtils.js.map +1 -1
- package/ios/BottomSheetView.swift +11 -2
- package/ios/DataListForEachView.swift +24 -6
- package/ios/DatePickerView.swift +134 -9
- package/ios/Modifiers/SelectedSegmentTintColorModifier.swift +86 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +4 -0
- package/ios/RNHostView.swift +34 -16
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.20/expo.modules.ui-58.0.20-sources.jar → 58.0.22/expo.modules.ui-58.0.22-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.20/expo.modules.ui-58.0.20.module → 58.0.22/expo.modules.ui-58.0.22.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.20/expo.modules.ui-58.0.20.pom → 58.0.22/expo.modules.ui-58.0.22.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha512 +1 -0
- package/package.json +2 -2
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +7 -3
- package/src/community/pager-view/PagerView.ios.tsx +25 -8
- package/src/community/segmented-control/SegmentedControl.ios.tsx +13 -1
- package/src/community/segmented-control/types.tsx +5 -1
- package/src/community/segmented-control/vendor/SegmentedControl.tsx +10 -2
- package/src/jetpack-compose/CompositionLocalProvider/index.tsx +43 -0
- package/src/jetpack-compose/Host/index.tsx +50 -4
- package/src/jetpack-compose/Switch/index.tsx +4 -0
- package/src/jetpack-compose/TopAppBar/index.tsx +113 -0
- package/src/jetpack-compose/index.ts +2 -0
- package/src/jetpack-compose/modifiers/index.ts +11 -3
- package/src/swift-ui/BottomSheet/index.tsx +24 -3
- package/src/universal/Checkbox/index.android.tsx +24 -5
- package/src/universal/ScrollView/index.ios.tsx +14 -3
- package/src/universal/Switch/index.android.tsx +23 -4
- package/src/universal/Switch/index.tsx +1 -0
- package/src/universal/Text/index.tsx +2 -2
- package/src/universal/webUtils.ts +4 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.20/expo.modules.ui-58.0.20.pom.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [Android] Fix screen readers not announcing the label of a labeled universal `Switch` or `Checkbox`. ([#51896](https://github.com/expo/expo/pull/51896) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
8
|
+
- [Android] Fix touches not reaching the content of `MaskedView`. ([#51988](https://github.com/expo/expo/pull/51988) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
9
|
+
- [Android] Fix `RNHostView` showing the previous, emptied child after its child is remounted, for example by a `key` change. ([#51914](https://github.com/expo/expo/pull/51914) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
10
|
+
- [Android] Add `CompositionLocalProvider` with `minimumInteractiveComponentSize`, so Material components can be smaller than the 48dp minimum touch target. ([#51954](https://github.com/expo/expo/pull/51954) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
11
|
+
- [Android] Add `colorOverrides` to the Jetpack Compose `Host`. It replaces individual Material 3 color roles in the palette from `colorScheme` and `seedColor`. Compose children and `useMaterialColors()` use the result. ([#51650](https://github.com/expo/expo/pull/51650) by [@juliusmarminge](https://github.com/juliusmarminge))
|
|
12
|
+
- [iOS] Fix the graphical `DatePicker` keeping a wrong height when it appears after launch, for example in a sheet. ([#51958](https://github.com/expo/expo/pull/51958) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
13
|
+
- [iOS] Lay out children of a horizontal universal `ScrollView` in a row. They were stacked vertically. ([#51888](https://github.com/expo/expo/pull/51888) by [@itisrmk](https://github.com/itisrmk))
|
|
14
|
+
- [iOS] Add a `presentationBackground` prop to `BottomSheet` that fills the sheet with a view, so a material stays translucent on iOS 26 and later. ([#51971](https://github.com/expo/expo/pull/51971) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
15
|
+
- Update `README.md` with the package overview, entry points, available components and installation instructions. ([#50024](https://github.com/expo/expo/pull/50024) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
16
|
+
- [iOS] Fix hosted React Native content going blank or keeping a stale size after its child view is remounted, for example by a `key` change in an `RNHostView`. ([#51906](https://github.com/expo/expo/pull/51906) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
17
|
+
- [iOS] Add `accessibilityLabel` to the community `SegmentedControl`, so screen readers announce a name for the control. ([#51899](https://github.com/expo/expo/pull/51899) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
18
|
+
- [iOS] Support `tintColor` in the community `SegmentedControl`. ([#51904](https://github.com/expo/expo/pull/51904) by [@expo-tuft](https://github.com/apps/expo-tuft))
|
|
19
|
+
- [Android] Add the Jetpack Compose `TopAppBar` component with `TopAppBar.Title`, `TopAppBar.NavigationIcon`, and `TopAppBar.Actions` slots, `colors`, and `windowInsets`. ([#51651](https://github.com/expo/expo/pull/51651) by [@juliusmarminge](https://github.com/juliusmarminge))
|
|
20
|
+
- [web] Fix the universal `Text` ignoring the `colorScheme` of its `Host`. Its default color followed the browser color scheme, so a `Text` in a dark `Host` was black in a light browser. It now uses the `Host` foreground color and keeps the old color when no `Host` is on the page. A light `Host` now also gets the light colors when the browser or an outer `Host` is dark. ([#51698](https://github.com/expo/expo/pull/51698) by [@expo-bot](https://github.com/expo-bot))
|
|
21
|
+
- Fix bottom sheet modals closing on iOS when the snap point count changes. ([#51889](https://github.com/expo/expo/pull/51889) by [@Fizzbow](https://github.com/Fizzbow))
|
|
22
|
+
- [iOS] Stop the community `PagerView` from pressing a `Pressable` on a page when a swipe starts or ends on it, or when a tap stops a moving page. The pager now takes the touch from its pages while it scrolls, like React Native's `ScrollView`. This needs iOS 18 or later. ([#51799](https://github.com/expo/expo/pull/51799) by [@julian-gargicevich](https://github.com/julian-gargicevich))
|
|
23
|
+
- [Web] Put a labeled `Switch` at the trailing edge of its row, as on Android and iOS. ([#51867](https://github.com/expo/expo/pull/51867) by [@miniware9](https://github.com/miniware9))
|
|
24
|
+
|
|
25
|
+
## 58.0.21
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- [iOS] Fix `List.ForEach` with `data` and a `children` render function. With recycling, `List` ignored the `moveDisabled` and `deleteDisabled` modifiers on a row. With `recycling={false}`, dragging a row did not reorder it or call `onMove`, and `onDelete` received the wrong index. ([#51704](https://github.com/expo/expo/pull/51704) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
30
|
+
- [Web] Stop the community `SegmentedControl` from logging the `useNativeDriver` warning when it mounts. ([#51775](https://github.com/expo/expo/pull/51775) by [@miniware9](https://github.com/miniware9))
|
|
31
|
+
|
|
3
32
|
## 58.0.20
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,3 +1,87 @@
|
|
|
1
|
-
|
|
1
|
+
<p>
|
|
2
|
+
<a href="https://docs.expo.dev/versions/latest/sdk/ui/">
|
|
3
|
+
<img
|
|
4
|
+
src="../../.github/resources/expo-ui.svg"
|
|
5
|
+
alt="expo-ui"
|
|
6
|
+
height="64" />
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
2
9
|
|
|
3
|
-
A
|
|
10
|
+
A set of native input components that let you build interfaces with Jetpack Compose on Android and SwiftUI on iOS, from React.
|
|
11
|
+
|
|
12
|
+
## Main features
|
|
13
|
+
|
|
14
|
+
- Real native components. Jetpack Compose on Android, SwiftUI on iOS — not reimplementations.
|
|
15
|
+
- The JavaScript API mirrors the native API. Component, prop, and event names match the platform.
|
|
16
|
+
- Three tiers, so you can pick how much platform detail you want to handle.
|
|
17
|
+
- Modifiers stay modifiers, from `@expo/ui/swift-ui/modifiers` and `@expo/ui/jetpack-compose/modifiers`.
|
|
18
|
+
|
|
19
|
+
## The three tiers
|
|
20
|
+
|
|
21
|
+
### Platform (low-level)
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
import { ... } from '@expo/ui/swift-ui';
|
|
25
|
+
import { ... } from '@expo/ui/jetpack-compose';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
One export per platform, each mapping directly onto the underlying native component. Use these when you want the full SwiftUI or Jetpack Compose surface and are willing to write a `.ios` and `.android` file.
|
|
29
|
+
|
|
30
|
+
### Universal
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { ... } from '@expo/ui';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Cross-platform components that run on Android, iOS, and web from one source. Each one is built on top of the platform tier — a universal `Switch` renders a SwiftUI `Toggle` on iOS and a Jetpack Compose `Switch` on Android — so you write once and still get the native experience. This is the tier to start with.
|
|
37
|
+
|
|
38
|
+
### Drop-in replacements
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
import { ... } from '@expo/ui/community/...';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
API-compatible replacements for popular React Native community libraries, backed by the same native components. Swapping the import is usually the whole migration.
|
|
45
|
+
|
|
46
|
+
| Replaces | Import from |
|
|
47
|
+
| --------------------------------------------------- | -------------------------------------- |
|
|
48
|
+
| `@gorhom/bottom-sheet` | `@expo/ui/community/bottom-sheet` |
|
|
49
|
+
| `@react-native-community/datetimepicker` | `@expo/ui/community/datetime-picker` |
|
|
50
|
+
| `@react-native-community/slider` | `@expo/ui/community/slider` |
|
|
51
|
+
| `@react-native-masked-view/masked-view` | `@expo/ui/community/masked-view` |
|
|
52
|
+
| `@react-native-menu/menu` | `@expo/ui/community/menu` |
|
|
53
|
+
| `@react-native-picker/picker` | `@expo/ui/community/picker` |
|
|
54
|
+
| `@react-native-segmented-control/segmented-control` | `@expo/ui/community/segmented-control` |
|
|
55
|
+
| `react-native-pager-view` | `@expo/ui/community/pager-view` |
|
|
56
|
+
|
|
57
|
+
# API documentation
|
|
58
|
+
|
|
59
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/ui/)
|
|
60
|
+
|
|
61
|
+
# Installation in managed Expo projects
|
|
62
|
+
|
|
63
|
+
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/ui/).
|
|
64
|
+
|
|
65
|
+
# Installation in bare React Native projects
|
|
66
|
+
|
|
67
|
+
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
|
|
68
|
+
|
|
69
|
+
### Add the package to your npm dependencies
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
npx expo install @expo/ui
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Configure for iOS
|
|
76
|
+
|
|
77
|
+
Run `npx pod-install` after installing the npm package.
|
|
78
|
+
|
|
79
|
+
### Configure for Android
|
|
80
|
+
|
|
81
|
+
No additional setup necessary.
|
|
82
|
+
|
|
83
|
+
# Contributing
|
|
84
|
+
|
|
85
|
+
Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
|
|
86
|
+
|
|
87
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for notes specific to this package.
|
package/android/build.gradle
CHANGED
|
@@ -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.
|
|
15
|
+
version = '58.0.22'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "58.0.
|
|
21
|
+
versionName "58.0.22"
|
|
22
22
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
23
23
|
}
|
|
24
24
|
buildFeatures {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
package expo.modules.ui
|
|
2
|
+
|
|
3
|
+
import androidx.compose.material3.LocalMinimumInteractiveComponentSize
|
|
4
|
+
import androidx.compose.runtime.Composable
|
|
5
|
+
import androidx.compose.runtime.CompositionLocalProvider
|
|
6
|
+
import androidx.compose.runtime.ProvidedValue
|
|
7
|
+
import androidx.compose.ui.unit.dp
|
|
8
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
9
|
+
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
10
|
+
import expo.modules.kotlin.views.OptimizedComposeProps
|
|
11
|
+
|
|
12
|
+
@OptimizedComposeProps
|
|
13
|
+
data class CompositionLocalProviderProps(
|
|
14
|
+
val minimumInteractiveComponentSize: Float? = null
|
|
15
|
+
) : ComposeProps
|
|
16
|
+
|
|
17
|
+
@Composable
|
|
18
|
+
fun FunctionalComposableScope.CompositionLocalProviderContent(props: CompositionLocalProviderProps) {
|
|
19
|
+
val values = buildList<ProvidedValue<*>> {
|
|
20
|
+
props.minimumInteractiveComponentSize?.let { add(LocalMinimumInteractiveComponentSize provides it.dp) }
|
|
21
|
+
}
|
|
22
|
+
// Passes the parent's scope through, so children keep modifiers like `weight` from the surrounding layout.
|
|
23
|
+
CompositionLocalProvider(*values.toTypedArray()) {
|
|
24
|
+
Children(composableScope)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -487,6 +487,12 @@ class ExpoUIModule : Module() {
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
+
ExpoUIView<CompositionLocalProviderProps>("CompositionLocalProviderView") {
|
|
491
|
+
Content { props ->
|
|
492
|
+
CompositionLocalProviderContent(props)
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
490
496
|
ExpoUIView<LayoutProps>("BoxView") {
|
|
491
497
|
Content { props ->
|
|
492
498
|
BoxContent(props)
|
|
@@ -533,6 +539,12 @@ class ExpoUIModule : Module() {
|
|
|
533
539
|
}
|
|
534
540
|
}
|
|
535
541
|
|
|
542
|
+
ExpoUIView<TopAppBarProps>("TopAppBarView") {
|
|
543
|
+
Content { props ->
|
|
544
|
+
TopAppBarContent(props)
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
536
548
|
ExpoUIView<HorizontalFloatingToolbarProps>("HorizontalFloatingToolbarView") {
|
|
537
549
|
Content { props ->
|
|
538
550
|
HorizontalFloatingToolbarContent(props)
|
|
@@ -52,6 +52,7 @@ import expo.modules.kotlin.views.ExpoComposeView
|
|
|
52
52
|
import expo.modules.kotlin.views.OptimizedComposeProps
|
|
53
53
|
import expo.modules.ui.colors.isDynamicColorSupported
|
|
54
54
|
import expo.modules.ui.colors.seedColorScheme
|
|
55
|
+
import expo.modules.ui.colors.withOverrides
|
|
55
56
|
|
|
56
57
|
internal enum class ExpoLayoutDirection(val value: String) : Enumerable {
|
|
57
58
|
LeftToRight("leftToRight"),
|
|
@@ -69,6 +70,7 @@ internal enum class ExpoLayoutDirection(val value: String) : Enumerable {
|
|
|
69
70
|
internal data class HostProps(
|
|
70
71
|
val colorScheme: MutableState<ExpoColorScheme?> = mutableStateOf(null),
|
|
71
72
|
val seedColor: MutableState<android.graphics.Color?> = mutableStateOf(null),
|
|
73
|
+
val colorOverrides: MutableState<Map<String, android.graphics.Color>?> = mutableStateOf(null),
|
|
72
74
|
val layoutDirection: MutableState<ExpoLayoutDirection> = mutableStateOf(ExpoLayoutDirection.LeftToRight),
|
|
73
75
|
val useViewportSizeMeasurement: MutableState<Boolean> = mutableStateOf(false),
|
|
74
76
|
val ignoreSafeAreaKeyboardInsets: MutableState<Boolean> = mutableStateOf(false),
|
|
@@ -153,9 +155,10 @@ internal class HostView(context: Context, appContext: AppContext) :
|
|
|
153
155
|
val seededScheme = remember(seedArgb, isDark) {
|
|
154
156
|
seedArgb?.let { seedColorScheme(it, isDark) }
|
|
155
157
|
}
|
|
156
|
-
val
|
|
158
|
+
val baseColorScheme = seededScheme
|
|
157
159
|
?: props.colorScheme.value?.toColorScheme(context)
|
|
158
160
|
?: ExpoColorScheme.defaultColorScheme(context, isSystemInDarkTheme())
|
|
161
|
+
val colorScheme = baseColorScheme.withOverrides(props.colorOverrides.value.orEmpty())
|
|
159
162
|
val layoutDirection = props.layoutDirection.value.toLayoutDirection()
|
|
160
163
|
|
|
161
164
|
// Material3's `MaterialTheme` does not provide `LocalContentColor` — only `Surface` does — so
|
|
@@ -34,8 +34,7 @@ fun FunctionalComposableScope.MaskViewContent(props: MaskViewProps) {
|
|
|
34
34
|
drawLayer(maskLayer)
|
|
35
35
|
}
|
|
36
36
|
) {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
// Composed first so the children stay on top and receive touches.
|
|
39
38
|
if (maskSlotView != null) {
|
|
40
39
|
Box(
|
|
41
40
|
modifier = Modifier
|
|
@@ -52,5 +51,7 @@ fun FunctionalComposableScope.MaskViewContent(props: MaskViewProps) {
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
}
|
|
54
|
+
|
|
55
|
+
Children(UIComposableScope(), filter = { !isSlotView(it) })
|
|
55
56
|
}
|
|
56
57
|
}
|
|
@@ -323,7 +323,8 @@ internal enum class SemanticRoleType(val value: String) : Enumerable {
|
|
|
323
323
|
@OptimizedRecord
|
|
324
324
|
internal data class ToggleableParams(
|
|
325
325
|
@Field val value: Boolean = false,
|
|
326
|
-
@Field val role: SemanticRoleType? = null
|
|
326
|
+
@Field val role: SemanticRoleType? = null,
|
|
327
|
+
@Field val enabled: Boolean = true
|
|
327
328
|
) : Record
|
|
328
329
|
|
|
329
330
|
internal enum class MenuAnchorType(val value: String) : Enumerable {
|
|
@@ -831,6 +832,7 @@ object ModifierRegistry {
|
|
|
831
832
|
}
|
|
832
833
|
Modifier.toggleable(
|
|
833
834
|
value = params.value,
|
|
835
|
+
enabled = params.enabled,
|
|
834
836
|
role = role,
|
|
835
837
|
onValueChange = { eventDispatcher("toggleable", emptyMap()) }
|
|
836
838
|
)
|
|
@@ -20,6 +20,7 @@ import androidx.compose.foundation.layout.wrapContentSize
|
|
|
20
20
|
import androidx.compose.foundation.layout.wrapContentWidth
|
|
21
21
|
import androidx.compose.runtime.Composable
|
|
22
22
|
import androidx.compose.runtime.MutableState
|
|
23
|
+
import androidx.compose.runtime.key
|
|
23
24
|
import androidx.compose.runtime.mutableStateOf
|
|
24
25
|
import androidx.compose.ui.Alignment
|
|
25
26
|
import androidx.compose.ui.Modifier
|
|
@@ -204,13 +205,16 @@ internal class RNHostView(context: Context, appContext: AppContext) :
|
|
|
204
205
|
.then(sizingModifier)
|
|
205
206
|
.then(publishContentOriginModifier())
|
|
206
207
|
|
|
207
|
-
AndroidView
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
208
|
+
// `addView` creates a new wrapper for each mounted child, and `AndroidView` only calls `factory` once.
|
|
209
|
+
key(wrapper) {
|
|
210
|
+
AndroidView(
|
|
211
|
+
factory = {
|
|
212
|
+
detachForReuse(wrapper)
|
|
213
|
+
wrapper
|
|
214
|
+
},
|
|
215
|
+
modifier = modifiers
|
|
216
|
+
)
|
|
217
|
+
}
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
220
|
|
|
@@ -41,6 +41,7 @@ data class SwitchColors(
|
|
|
41
41
|
data class SwitchProps(
|
|
42
42
|
val value: Boolean = false,
|
|
43
43
|
val enabled: Boolean = true,
|
|
44
|
+
val nativeClickable: Boolean = true,
|
|
44
45
|
val colors: SwitchColors = SwitchColors(),
|
|
45
46
|
val modifiers: ModifierList = emptyList()
|
|
46
47
|
) : ComposeProps
|
|
@@ -54,7 +55,11 @@ fun FunctionalComposableScope.SwitchContent(
|
|
|
54
55
|
|
|
55
56
|
Switch(
|
|
56
57
|
checked = props.value,
|
|
57
|
-
onCheckedChange =
|
|
58
|
+
onCheckedChange = if (props.nativeClickable) {
|
|
59
|
+
onCheckedChange
|
|
60
|
+
} else {
|
|
61
|
+
null
|
|
62
|
+
},
|
|
58
63
|
modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
|
|
59
64
|
enabled = props.enabled,
|
|
60
65
|
thumbContent = thumbContentSlotView?.let {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@file:OptIn(ExperimentalMaterial3Api::class)
|
|
2
|
+
|
|
3
|
+
package expo.modules.ui
|
|
4
|
+
|
|
5
|
+
import android.graphics.Color
|
|
6
|
+
import androidx.compose.foundation.layout.WindowInsets
|
|
7
|
+
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
8
|
+
import androidx.compose.material3.TopAppBar
|
|
9
|
+
import androidx.compose.material3.TopAppBarDefaults
|
|
10
|
+
import androidx.compose.runtime.Composable
|
|
11
|
+
import androidx.compose.ui.platform.LocalLayoutDirection
|
|
12
|
+
import expo.modules.kotlin.records.Field
|
|
13
|
+
import expo.modules.kotlin.records.Record
|
|
14
|
+
import expo.modules.kotlin.types.OptimizedRecord
|
|
15
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
16
|
+
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
17
|
+
import expo.modules.kotlin.views.OptimizedComposeProps
|
|
18
|
+
|
|
19
|
+
@OptimizedRecord
|
|
20
|
+
class TopAppBarColors : Record {
|
|
21
|
+
@Field val containerColor: Color? = null
|
|
22
|
+
|
|
23
|
+
@Field val navigationIconContentColor: Color? = null
|
|
24
|
+
|
|
25
|
+
@Field val titleContentColor: Color? = null
|
|
26
|
+
|
|
27
|
+
@Field val actionIconContentColor: Color? = null
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@OptimizedComposeProps
|
|
31
|
+
data class TopAppBarProps(
|
|
32
|
+
val colors: TopAppBarColors = TopAppBarColors(),
|
|
33
|
+
val windowInsets: PaddingValuesRecord? = null,
|
|
34
|
+
val modifiers: ModifierList = emptyList()
|
|
35
|
+
) : ComposeProps
|
|
36
|
+
|
|
37
|
+
@Composable
|
|
38
|
+
fun FunctionalComposableScope.TopAppBarContent(props: TopAppBarProps) {
|
|
39
|
+
val layoutDirection = LocalLayoutDirection.current
|
|
40
|
+
val windowInsets = props.windowInsets?.toPaddingValues()?.let {
|
|
41
|
+
WindowInsets(
|
|
42
|
+
left = it.calculateLeftPadding(layoutDirection),
|
|
43
|
+
top = it.calculateTopPadding(),
|
|
44
|
+
right = it.calculateRightPadding(layoutDirection),
|
|
45
|
+
bottom = it.calculateBottomPadding()
|
|
46
|
+
)
|
|
47
|
+
} ?: TopAppBarDefaults.windowInsets
|
|
48
|
+
|
|
49
|
+
TopAppBar(
|
|
50
|
+
title = { Children(UIComposableScope(), filter = { isSlotWithName(it, "title") }) },
|
|
51
|
+
navigationIcon = { Children(UIComposableScope(), filter = { isSlotWithName(it, "navigationIcon") }) },
|
|
52
|
+
actions = { Children(UIComposableScope(rowScope = this), filter = { isSlotWithName(it, "actions") }) },
|
|
53
|
+
windowInsets = windowInsets,
|
|
54
|
+
colors = TopAppBarDefaults.topAppBarColors(
|
|
55
|
+
containerColor = props.colors.containerColor.compose,
|
|
56
|
+
navigationIconContentColor = props.colors.navigationIconContentColor.compose,
|
|
57
|
+
titleContentColor = props.colors.titleContentColor.compose,
|
|
58
|
+
actionIconContentColor = props.colors.actionIconContentColor.compose
|
|
59
|
+
),
|
|
60
|
+
modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -15,6 +15,7 @@ import expo.modules.kotlin.records.Field
|
|
|
15
15
|
import expo.modules.kotlin.records.Record
|
|
16
16
|
import expo.modules.kotlin.types.OptimizedRecord
|
|
17
17
|
import expo.modules.ui.ExpoColorScheme
|
|
18
|
+
import expo.modules.ui.composeOrNull
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Whether the current device supports Material You wallpaper-based dynamic
|
|
@@ -165,3 +166,63 @@ internal fun ColorScheme.toTokenMap(): Map<String, String> = mapOf(
|
|
|
165
166
|
"onTertiaryFixed" to onTertiaryFixed.toRgbaHex(),
|
|
166
167
|
"onTertiaryFixedVariant" to onTertiaryFixedVariant.toRgbaHex()
|
|
167
168
|
)
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Replaces the roles named in [overrides], keyed like [toTokenMap], and keeps the others.
|
|
172
|
+
*/
|
|
173
|
+
internal fun ColorScheme.withOverrides(overrides: Map<String, android.graphics.Color>): ColorScheme {
|
|
174
|
+
if (overrides.isEmpty()) {
|
|
175
|
+
return this
|
|
176
|
+
}
|
|
177
|
+
fun color(role: String, fallback: Color): Color = overrides[role]?.composeOrNull ?: fallback
|
|
178
|
+
return copy(
|
|
179
|
+
primary = color("primary", primary),
|
|
180
|
+
onPrimary = color("onPrimary", onPrimary),
|
|
181
|
+
primaryContainer = color("primaryContainer", primaryContainer),
|
|
182
|
+
onPrimaryContainer = color("onPrimaryContainer", onPrimaryContainer),
|
|
183
|
+
inversePrimary = color("inversePrimary", inversePrimary),
|
|
184
|
+
secondary = color("secondary", secondary),
|
|
185
|
+
onSecondary = color("onSecondary", onSecondary),
|
|
186
|
+
secondaryContainer = color("secondaryContainer", secondaryContainer),
|
|
187
|
+
onSecondaryContainer = color("onSecondaryContainer", onSecondaryContainer),
|
|
188
|
+
tertiary = color("tertiary", tertiary),
|
|
189
|
+
onTertiary = color("onTertiary", onTertiary),
|
|
190
|
+
tertiaryContainer = color("tertiaryContainer", tertiaryContainer),
|
|
191
|
+
onTertiaryContainer = color("onTertiaryContainer", onTertiaryContainer),
|
|
192
|
+
background = color("background", background),
|
|
193
|
+
onBackground = color("onBackground", onBackground),
|
|
194
|
+
surface = color("surface", surface),
|
|
195
|
+
onSurface = color("onSurface", onSurface),
|
|
196
|
+
surfaceVariant = color("surfaceVariant", surfaceVariant),
|
|
197
|
+
onSurfaceVariant = color("onSurfaceVariant", onSurfaceVariant),
|
|
198
|
+
surfaceTint = color("surfaceTint", surfaceTint),
|
|
199
|
+
inverseSurface = color("inverseSurface", inverseSurface),
|
|
200
|
+
inverseOnSurface = color("inverseOnSurface", inverseOnSurface),
|
|
201
|
+
error = color("error", error),
|
|
202
|
+
onError = color("onError", onError),
|
|
203
|
+
errorContainer = color("errorContainer", errorContainer),
|
|
204
|
+
onErrorContainer = color("onErrorContainer", onErrorContainer),
|
|
205
|
+
outline = color("outline", outline),
|
|
206
|
+
outlineVariant = color("outlineVariant", outlineVariant),
|
|
207
|
+
scrim = color("scrim", scrim),
|
|
208
|
+
surfaceBright = color("surfaceBright", surfaceBright),
|
|
209
|
+
surfaceDim = color("surfaceDim", surfaceDim),
|
|
210
|
+
surfaceContainer = color("surfaceContainer", surfaceContainer),
|
|
211
|
+
surfaceContainerHigh = color("surfaceContainerHigh", surfaceContainerHigh),
|
|
212
|
+
surfaceContainerHighest = color("surfaceContainerHighest", surfaceContainerHighest),
|
|
213
|
+
surfaceContainerLow = color("surfaceContainerLow", surfaceContainerLow),
|
|
214
|
+
surfaceContainerLowest = color("surfaceContainerLowest", surfaceContainerLowest),
|
|
215
|
+
primaryFixed = color("primaryFixed", primaryFixed),
|
|
216
|
+
primaryFixedDim = color("primaryFixedDim", primaryFixedDim),
|
|
217
|
+
onPrimaryFixed = color("onPrimaryFixed", onPrimaryFixed),
|
|
218
|
+
onPrimaryFixedVariant = color("onPrimaryFixedVariant", onPrimaryFixedVariant),
|
|
219
|
+
secondaryFixed = color("secondaryFixed", secondaryFixed),
|
|
220
|
+
secondaryFixedDim = color("secondaryFixedDim", secondaryFixedDim),
|
|
221
|
+
onSecondaryFixed = color("onSecondaryFixed", onSecondaryFixed),
|
|
222
|
+
onSecondaryFixedVariant = color("onSecondaryFixedVariant", onSecondaryFixedVariant),
|
|
223
|
+
tertiaryFixed = color("tertiaryFixed", tertiaryFixed),
|
|
224
|
+
tertiaryFixedDim = color("tertiaryFixedDim", tertiaryFixedDim),
|
|
225
|
+
onTertiaryFixed = color("onTertiaryFixed", onTertiaryFixed),
|
|
226
|
+
onTertiaryFixedVariant = color("onTertiaryFixedVariant", onTertiaryFixedVariant)
|
|
227
|
+
)
|
|
228
|
+
}
|
|
@@ -116,10 +116,15 @@ function findNearestDetentIndex(detents, position) {
|
|
|
116
116
|
} else if (indexProp >= 0) {
|
|
117
117
|
closedRef.current = false;
|
|
118
118
|
setIsPresented(true);
|
|
119
|
-
const clampedIndex = Math.min(indexProp, detents.length - 1);
|
|
120
|
-
setCurrentIndex(clampedIndex);
|
|
121
|
-
currentIndexRef.current = clampedIndex;
|
|
122
119
|
}
|
|
120
|
+
}, [
|
|
121
|
+
indexProp
|
|
122
|
+
]);
|
|
123
|
+
useEffect(()=>{
|
|
124
|
+
const requestedIndex = indexProp >= 0 ? indexProp : currentIndexRef.current;
|
|
125
|
+
const clampedIndex = Math.min(requestedIndex, detents.length - 1);
|
|
126
|
+
setCurrentIndex(clampedIndex);
|
|
127
|
+
currentIndexRef.current = clampedIndex;
|
|
123
128
|
}, [
|
|
124
129
|
indexProp,
|
|
125
130
|
detents.length
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["community/bottom-sheet/BottomSheet.ios.tsx"],"sourcesContent":[null],"names":["useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","useWindowDimensions","View","StyleSheet","BottomSheet","NativeBottomSheet","Group","Host","RNHostView","interactiveDismissDisabled","presentationBackground","presentationDetents","presentationDragIndicator","presentationSizing","BottomSheetContext","BottomSheetInternalContext","SheetScrollContextReset","parseSnapPoint","useBottomSheet","extractBackgroundColor","style","undefined","flat","flatten","color","backgroundColor","snapPointToDetent","point","parsed","type","fraction","value","height","detentsAreEqual","a","b","findDetentIndex","detents","detent","findIndex","d","findNearestDetentIndex","position","nearestIndex","nearestDist","Infinity","forEach","i","pValue","dValue","dist","Math","abs","props","ref","snapPoints","snapPointsProp","index","indexProp","onChange","onClose","onDismiss","enablePanDownToClose","enableDynamicSizing","handleComponent","backgroundStyle","children","width","isPresented","setIsPresented","currentIndex","setCurrentIndex","max","currentIndexRef","closedRef","onChangeRef","current","onCloseRef","onDismissRef","length","map","selectedDetent","fitToContents","internalContextValue","fireCloseCallbacks","clampedIndex","min","handlePresentedChange","presented","handleDetentChange","newIndex","methods","snapToIndex","close","snapToPosition","expand","collapse","forceClose","present","dismiss","modifiers","bg","fitted","horizontal","vertical","selection","onSelectionChange","Provider","pointerEvents","onIsPresentedChange","matchContents","paddingTop","flexGrow"],"mappings":";AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,mBAAmB,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC/F,SAASC,mBAAmB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,eAAe;AAGrE,SAASC,eAAeC,iBAAiB,QAAQ,6BAA6B;AAC9E,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,IAAI,QAAQ,sBAAsB;AAC3C,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAEEC,0BAA0B,EAC1BC,sBAAsB,EACtBC,mBAAmB,EACnBC,y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A,eAAeuB,MAAM,KAAK,GAAG,OAAO;YAAC;YAAU;SAAQ;QAC9E,OAAOvB,eAAewB,GAAG,CAACtD;IAC5B,GAAG;QAAC8B;KAAe;IAEnB,MAAMyB,iBAAiB5C,OAAO,CAACiC,aAAa,IAAIjC,OAAO,CAAC,EAAE;IAC1D,MAAM6C,gBAAgBnB,uBAAwB,CAAA,CAACP,kBAAkBA,eAAeuB,MAAM,KAAK,CAAA;IAC3F,MAAMI,uBAAuBrF,QAAQ,IAAO,CAAA;YAAEoF;QAAc,CAAA,GAAI;QAACA;KAAc;IAE/E,MAAME,qBAAqBzF,YAAY;QACrC,IAAI+E,UAAUE,OAAO,EAAE;QACvBF,UAAUE,OAAO,GAAG;QACpBC,WAAWD,OAAO;QAClBE,aAAaF,OAAO;QACpBD,YAAYC,OAAO,GAAG,CAAC;IACzB,GAAG,EAAE;IAEL,wCAAwC;IACxChF,UAAU;QACR,IAAI8D,cAAc,CAAC,GAAG;YACpBW,eAAe;QACjB,OAAO,IAAIX,aAAa,GAAG;YACzBgB,UAAUE,OAAO,GAAG;YACpBP,eAAe;
|
|
1
|
+
{"version":3,"sources":["community/bottom-sheet/BottomSheet.ios.tsx"],"sourcesContent":[null],"names":["useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","useWindowDimensions","View","StyleSheet","BottomSheet","NativeBottomSheet","Group","Host","RNHostView","interactiveDismissDisabled","presentationBackground","presentationDetents","presentationDragIndicator","presentationSizing","BottomSheetContext","BottomSheetInternalContext","SheetScrollContextReset","parseSnapPoint","useBottomSheet","extractBackgroundColor","style","undefined","flat","flatten","color","backgroundColor","snapPointToDetent","point","parsed","type","fraction","value","height","detentsAreEqual","a","b","findDetentIndex","detents","detent","findIndex","d","findNearestDetentIndex","position","nearestIndex","nearestDist","Infinity","forEach","i","pValue","dValue","dist","Math","abs","props","ref","snapPoints","snapPointsProp","index","indexProp","onChange","onClose","onDismiss","enablePanDownToClose","enableDynamicSizing","handleComponent","backgroundStyle","children","width","isPresented","setIsPresented","currentIndex","setCurrentIndex","max","currentIndexRef","closedRef","onChangeRef","current","onCloseRef","onDismissRef","length","map","selectedDetent","fitToContents","internalContextValue","fireCloseCallbacks","requestedIndex","clampedIndex","min","handlePresentedChange","presented","handleDetentChange","newIndex","methods","snapToIndex","close","snapToPosition","expand","collapse","forceClose","present","dismiss","modifiers","bg","fitted","horizontal","vertical","selection","onSelectionChange","Provider","pointerEvents","onIsPresentedChange","matchContents","paddingTop","flexGrow"],"mappings":";AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,mBAAmB,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC/F,SAASC,mBAAmB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,eAAe;AAGrE,SAASC,eAAeC,iBAAiB,QAAQ,6BAA6B;AAC9E,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,IAAI,QAAQ,sBAAsB;AAC3C,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAEEC,0BAA0B,EAC1BC,sBAAsB,EACtBC,mBAAmB,EACnBC,yBAAyB,EACzBC,kBAAkB,QACb,iDAAiD;AACxD,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,YAAY;AAC3E,SAASC,uBAAuB,QAAQ,uBAAuB;AAE/D,SAASC,cAAc,QAAQ,UAAU;AAEzC,SAASC,cAAc,QAAQ,YAAY;AAE3C,kBAAkB;AAElB,SAASC,uBAAuBC,KAA2B;IACzD,IAAI,CAACA,OAAO,OAAOC;IACnB,MAAMC,OAAOnB,WAAWoB,OAAO,CAACH;IAChC,MAAMI,QAAQF,MAAMG;IACpB,OAAO,OAAOD,UAAU,WAAWA,QAAQH;AAC7C;AAEA,SAASK,kBAAkBC,KAAsB;IAC/C,MAAMC,SAASX,eAAeU;IAC9B,OAAOC,OAAOC,IAAI,KAAK,aAAa;QAAEC,UAAUF,OAAOG,KAAK;IAAC,IAAI;QAAEC,QAAQJ,OAAOG,KAAK;IAAC;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CAAGgF,YAAYhD,oBAAoB,OAAO,KAAK;gCAAE;0CAE9E,cAAA,KAAChD;8CAAyBkD;;;;;;;;;AAS5C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Children, isValidElement, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { Platform } from 'react-native';
|
|
3
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { useNativeState, worklets } from '../../State';
|
|
5
5
|
import { Group } from '../../swift-ui/Group';
|
|
6
6
|
import { Host } from '../../swift-ui/Host';
|
|
@@ -51,6 +51,11 @@ function phaseToPageState(phase) {
|
|
|
51
51
|
const pageCount = validChildren.length;
|
|
52
52
|
const pageCountRef = useRef(0);
|
|
53
53
|
pageCountRef.current = pageCount;
|
|
54
|
+
const isScrollingRef = useRef(false);
|
|
55
|
+
// The SwiftUI scroll doesn't cancel React Native touches on its pages. Like
|
|
56
|
+
// React Native's `ScrollView`, take the touch from the page content while
|
|
57
|
+
// the pager moves, so a swipe or a tap that stops it doesn't press anything.
|
|
58
|
+
const shouldCaptureTouch = ()=>isScrollingRef.current;
|
|
54
59
|
// Clamp on first render — out-of-range initials produce an id that matches
|
|
55
60
|
// no `Group`, leaving `.scrollPosition(id:)` silently stuck at 0.
|
|
56
61
|
const [clampedInitialPage] = useState(()=>{
|
|
@@ -141,9 +146,13 @@ function phaseToPageState(phase) {
|
|
|
141
146
|
onPageScroll
|
|
142
147
|
]);
|
|
143
148
|
const geometryModifier = useScrollGeometryChange(handleScrollGeometry);
|
|
144
|
-
const phaseModifier =
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
const phaseModifier = onScrollPhaseChange((phase)=>{
|
|
150
|
+
const pageScrollState = phaseToPageState(phase);
|
|
151
|
+
isScrollingRef.current = pageScrollState !== 'idle';
|
|
152
|
+
onPageScrollStateChanged?.(wrapNativeEvent({
|
|
153
|
+
pageScrollState
|
|
154
|
+
}));
|
|
155
|
+
});
|
|
147
156
|
const pages = validChildren.map((child, index)=>/*#__PURE__*/ _jsx(Group, {
|
|
148
157
|
modifiers: [
|
|
149
158
|
containerRelativeFrame({
|
|
@@ -152,7 +161,12 @@ function phaseToPageState(phase) {
|
|
|
152
161
|
id(String(index))
|
|
153
162
|
],
|
|
154
163
|
children: /*#__PURE__*/ _jsx(RNHostView, {
|
|
155
|
-
children:
|
|
164
|
+
children: /*#__PURE__*/ _jsx(View, {
|
|
165
|
+
style: styles.page,
|
|
166
|
+
onStartShouldSetResponderCapture: shouldCaptureTouch,
|
|
167
|
+
onMoveShouldSetResponderCapture: shouldCaptureTouch,
|
|
168
|
+
children: child
|
|
169
|
+
})
|
|
156
170
|
})
|
|
157
171
|
}, child.key ?? String(index)));
|
|
158
172
|
// Toggle the flag rather than splicing the modifier in/out — SwiftUI diffs
|
|
@@ -166,9 +180,7 @@ function phaseToPageState(phase) {
|
|
|
166
180
|
...geometryModifier ? [
|
|
167
181
|
geometryModifier
|
|
168
182
|
] : [],
|
|
169
|
-
|
|
170
|
-
phaseModifier
|
|
171
|
-
] : []
|
|
183
|
+
phaseModifier
|
|
172
184
|
];
|
|
173
185
|
return /*#__PURE__*/ _jsx(Host, {
|
|
174
186
|
style: style ?? {
|
|
@@ -227,5 +239,10 @@ function warnIfPreIOS18ScrollCallbacksDropped(onPageScroll, onPageScrollStateCha
|
|
|
227
239
|
console.warn(`[expo-ui PagerView] onPageScroll and onPageScrollStateChanged require iOS 18+ ` + `and will not fire on iOS ${Platform.Version}. Guard with Platform.Version or ` + `provide a fallback for older iOS targets.`);
|
|
228
240
|
}
|
|
229
241
|
}
|
|
242
|
+
const styles = StyleSheet.create({
|
|
243
|
+
page: {
|
|
244
|
+
flex: 1
|
|
245
|
+
}
|
|
246
|
+
});
|
|
230
247
|
|
|
231
248
|
//# sourceMappingURL=PagerView.ios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["community/pager-view/PagerView.ios.tsx"],"sourcesContent":[null],"names":["Children","isValidElement","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useRef","useState","Platform","useNativeState","worklets","Group","Host","LazyHStack","RNHostView","ScrollView","containerRelativeFrame","id","onScrollPhaseChange","scrollDisabled","scrollPosition","scrollTargetBehavior","scrollTargetLayout","useScrollGeometryChange","Animation","withAnimation","wrapNativeEvent","phaseToPageState","phase","PagerView","props","ref","initialPage","scrollEnabled","onPageScroll","onPageScrollStateChanged","onPageSelected","children","style","layoutDirection","_layoutDirection","offscreenPageLimit","_offscreenPageLimit","pageMargin","_pageMargin","passthrough","warnIfPreIOS18ScrollCallbacksDropped","scrollEnabledState","setScrollEnabledState","validChildren","toArray","filter","c","pageCount","length","pageCountRef","current","clampedInitialPage","Math","max","min","activePageState","String","lastSelectedPageRef","onPageSelectedRef","handleScrolledIDChange","newId","page","parseInt","Number","isFinite","position","clampPage","count","writePageFromJS","setValue","value","clamped","setPage","nextId","default","setPageWithoutAnimation","setScrollEnabled","handleScrollGeometry","buildHandleScrollGeometry","undefined","geometryModifier","phaseModifier","pageScrollState","pages","map","child","index","modifiers","axes","key","onChange","flex","ignoreSafeArea","showsIndicators","spacing","geometryToPageScroll","geometry","round","contentWidth","containerWidth","positionFloat","contentOffsetX","floor","offset","userOnPageScroll","isWorkletFunction","didWarnPreIOS18","__DEV__","major","Version","console","warn"],"mappings":";AAAA,SACEA,QAAQ,EACRC,cAAc,EACdC,SAAS,EACTC,mBAAmB,EACnBC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAEH,QAAQ;AACf,SAASC,QAAQ,QAAQ,eAAe;
|
|
1
|
+
{"version":3,"sources":["community/pager-view/PagerView.ios.tsx"],"sourcesContent":[null],"names":["Children","isValidElement","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useRef","useState","Platform","StyleSheet","View","useNativeState","worklets","Group","Host","LazyHStack","RNHostView","ScrollView","containerRelativeFrame","id","onScrollPhaseChange","scrollDisabled","scrollPosition","scrollTargetBehavior","scrollTargetLayout","useScrollGeometryChange","Animation","withAnimation","wrapNativeEvent","phaseToPageState","phase","PagerView","props","ref","initialPage","scrollEnabled","onPageScroll","onPageScrollStateChanged","onPageSelected","children","style","layoutDirection","_layoutDirection","offscreenPageLimit","_offscreenPageLimit","pageMargin","_pageMargin","passthrough","warnIfPreIOS18ScrollCallbacksDropped","scrollEnabledState","setScrollEnabledState","validChildren","toArray","filter","c","pageCount","length","pageCountRef","current","isScrollingRef","shouldCaptureTouch","clampedInitialPage","Math","max","min","activePageState","String","lastSelectedPageRef","onPageSelectedRef","handleScrolledIDChange","newId","page","parseInt","Number","isFinite","position","clampPage","count","writePageFromJS","setValue","value","clamped","setPage","nextId","default","setPageWithoutAnimation","setScrollEnabled","handleScrollGeometry","buildHandleScrollGeometry","undefined","geometryModifier","phaseModifier","pageScrollState","pages","map","child","index","modifiers","axes","styles","onStartShouldSetResponderCapture","onMoveShouldSetResponderCapture","key","onChange","flex","ignoreSafeArea","showsIndicators","spacing","geometryToPageScroll","geometry","round","contentWidth","containerWidth","positionFloat","contentOffsetX","floor","offset","userOnPageScroll","isWorkletFunction","didWarnPreIOS18","__DEV__","major","Version","console","warn","create"],"mappings":";AAAA,SACEA,QAAQ,EACRC,cAAc,EACdC,SAAS,EACTC,mBAAmB,EACnBC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAEH,QAAQ;AACf,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,eAAe;AAE1D,SAASC,cAAc,EAAEC,QAAQ,QAAQ,cAAc;AACvD,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,IAAI,QAAQ,sBAAsB;AAC3C,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAASC,UAAU,QAA+C,4BAA4B;AAC9F,SACEC,sBAAsB,EACtBC,EAAE,EACFC,mBAAmB,EACnBC,cAAc,EAC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