@expo/ui 56.0.7 → 56.0.9
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 +39 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +44 -3
- package/android/src/main/java/expo/modules/ui/HostView.kt +2 -0
- package/android/src/main/java/expo/modules/ui/LoadingView.kt +80 -0
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +50 -4
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +8 -3
- package/android/src/main/java/expo/modules/ui/ShadowNodeSyncFlush.kt +28 -0
- package/android/src/main/java/expo/modules/ui/SnackbarView.kt +126 -0
- package/android/src/main/java/expo/modules/ui/state/ObservableState.kt +10 -0
- package/assets/keyboard_arrow_down.xml +10 -0
- package/build/State/useNativeState.d.ts +32 -3
- package/build/State/useNativeState.d.ts.map +1 -1
- package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
- package/build/community/menu/MenuView.android.d.ts +16 -0
- package/build/community/menu/MenuView.android.d.ts.map +1 -0
- package/build/community/menu/MenuView.d.ts +19 -0
- package/build/community/menu/MenuView.d.ts.map +1 -0
- package/build/community/menu/MenuView.ios.d.ts +10 -0
- package/build/community/menu/MenuView.ios.d.ts.map +1 -0
- package/build/community/menu/index.d.ts +5 -0
- package/build/community/menu/index.d.ts.map +1 -0
- package/build/community/menu/types.d.ts +166 -0
- package/build/community/menu/types.d.ts.map +1 -0
- package/build/jetpack-compose/LoadingIndicator/index.d.ts +41 -0
- package/build/jetpack-compose/LoadingIndicator/index.d.ts.map +1 -0
- package/build/jetpack-compose/Snackbar/index.d.ts +94 -0
- package/build/jetpack-compose/Snackbar/index.d.ts.map +1 -0
- package/build/jetpack-compose/index.d.ts +2 -0
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +21 -2
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/Alert/index.d.ts +42 -0
- package/build/swift-ui/Alert/index.d.ts.map +1 -0
- package/build/swift-ui/BottomSheet/index.d.ts +5 -1
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/SlotView.d.ts +5 -2
- package/build/swift-ui/SlotView.d.ts.map +1 -1
- package/build/swift-ui/SwipeActions/index.d.ts +38 -0
- package/build/swift-ui/SwipeActions/index.d.ts.map +1 -0
- package/build/swift-ui/index.d.ts +3 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +3 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/symbolEffect.d.ts +103 -0
- package/build/swift-ui/modifiers/symbolEffect.d.ts.map +1 -0
- package/build/swift-ui/withAnimation.d.ts +26 -0
- package/build/swift-ui/withAnimation.d.ts.map +1 -0
- package/build/universal/BottomSheet/index.android.d.ts +1 -1
- package/build/universal/BottomSheet/index.android.d.ts.map +1 -1
- package/build/universal/BottomSheet/index.d.ts +1 -1
- package/build/universal/BottomSheet/index.d.ts.map +1 -1
- package/build/universal/BottomSheet/index.ios.d.ts +1 -1
- package/build/universal/BottomSheet/index.ios.d.ts.map +1 -1
- package/build/universal/BottomSheet/types.d.ts +27 -0
- package/build/universal/BottomSheet/types.d.ts.map +1 -1
- package/build/universal/Collapsible/index.android.d.ts +8 -0
- package/build/universal/Collapsible/index.android.d.ts.map +1 -0
- package/build/universal/Collapsible/index.d.ts +8 -0
- package/build/universal/Collapsible/index.d.ts.map +1 -0
- package/build/universal/Collapsible/index.ios.d.ts +7 -0
- package/build/universal/Collapsible/index.ios.d.ts.map +1 -0
- package/build/universal/Collapsible/types.d.ts +23 -0
- package/build/universal/Collapsible/types.d.ts.map +1 -0
- package/build/universal/Column/index.d.ts.map +1 -1
- package/build/universal/Host/index.d.ts +5 -7
- package/build/universal/Host/index.d.ts.map +1 -1
- package/build/universal/Host/types.d.ts +72 -0
- package/build/universal/Host/types.d.ts.map +1 -0
- package/build/universal/List/index.android.d.ts +9 -0
- package/build/universal/List/index.android.d.ts.map +1 -0
- package/build/universal/List/index.d.ts +8 -0
- package/build/universal/List/index.d.ts.map +1 -0
- package/build/universal/List/index.ios.d.ts +8 -0
- package/build/universal/List/index.ios.d.ts.map +1 -0
- package/build/universal/List/types.d.ts +26 -0
- package/build/universal/List/types.d.ts.map +1 -0
- package/build/universal/ListItem/ListItem.android.d.ts +8 -0
- package/build/universal/ListItem/ListItem.android.d.ts.map +1 -0
- package/build/universal/ListItem/ListItem.d.ts +9 -0
- package/build/universal/ListItem/ListItem.d.ts.map +1 -0
- package/build/universal/ListItem/ListItem.ios.d.ts +8 -0
- package/build/universal/ListItem/ListItem.ios.d.ts.map +1 -0
- package/build/universal/ListItem/ListItemSlots.d.ts +21 -0
- package/build/universal/ListItem/ListItemSlots.d.ts.map +1 -0
- package/build/universal/ListItem/index.d.ts +10 -0
- package/build/universal/ListItem/index.d.ts.map +1 -0
- package/build/universal/ListItem/types.d.ts +59 -0
- package/build/universal/ListItem/types.d.ts.map +1 -0
- package/build/universal/Picker/Picker.android.d.ts +9 -0
- package/build/universal/Picker/Picker.android.d.ts.map +1 -0
- package/build/universal/Picker/Picker.d.ts +8 -0
- package/build/universal/Picker/Picker.d.ts.map +1 -0
- package/build/universal/Picker/Picker.ios.d.ts +9 -0
- package/build/universal/Picker/Picker.ios.d.ts.map +1 -0
- package/build/universal/Picker/PickerItem.d.ts +9 -0
- package/build/universal/Picker/PickerItem.d.ts.map +1 -0
- package/build/universal/Picker/index.d.ts +8 -0
- package/build/universal/Picker/index.d.ts.map +1 -0
- package/build/universal/Picker/types.d.ts +69 -0
- package/build/universal/Picker/types.d.ts.map +1 -0
- package/build/universal/index.d.ts +4 -0
- package/build/universal/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/Alert/Alert.swift +56 -0
- package/ios/Alert/AlertProps.swift +8 -0
- package/ios/BottomSheetView.swift +4 -1
- package/ios/ExpoUIModule.swift +43 -1
- package/ios/ExpoUITouchHandlerHelper.h +4 -1
- package/ios/ExpoUITouchHandlerHelper.mm +1 -0
- package/ios/Modifiers/AnimationConfig.swift +109 -0
- package/ios/Modifiers/SwipeActionsModifier.swift +97 -0
- package/ios/Modifiers/SymbolEffectModifier.swift +452 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +5 -112
- package/ios/SlotView.swift +5 -0
- package/ios/State/ObservableState.swift +12 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.7/expo.modules.ui-56.0.7-sources.jar → 56.0.9/expo.modules.ui-56.0.9-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.7/expo.modules.ui-56.0.7.module → 56.0.9/expo.modules.ui-56.0.9.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.7/expo.modules.ui-56.0.7.pom → 56.0.9/expo.modules.ui-56.0.9.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.9/expo.modules.ui-56.0.9.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +7 -3
- package/src/State/useNativeState.ts +70 -10
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +0 -17
- package/src/community/menu/MenuView.android.tsx +224 -0
- package/src/community/menu/MenuView.ios.tsx +149 -0
- package/src/community/menu/MenuView.tsx +36 -0
- package/src/community/menu/index.tsx +14 -0
- package/src/community/menu/types.tsx +171 -0
- package/src/jetpack-compose/LoadingIndicator/index.tsx +92 -0
- package/src/jetpack-compose/Snackbar/index.tsx +135 -0
- package/src/jetpack-compose/index.ts +2 -0
- package/src/jetpack-compose/modifiers/index.ts +30 -2
- package/src/swift-ui/Alert/index.tsx +87 -0
- package/src/swift-ui/BottomSheet/index.tsx +32 -15
- package/src/swift-ui/SlotView.tsx +17 -4
- package/src/swift-ui/SwipeActions/index.tsx +73 -0
- package/src/swift-ui/index.tsx +3 -0
- package/src/swift-ui/modifiers/index.ts +3 -0
- package/src/swift-ui/modifiers/symbolEffect.ts +181 -0
- package/src/swift-ui/withAnimation.ts +71 -0
- package/src/ts-declarations/react-native-web.d.ts +27 -0
- package/src/universal/BottomSheet/index.android.tsx +27 -3
- package/src/universal/BottomSheet/index.ios.tsx +30 -12
- package/src/universal/BottomSheet/index.tsx +46 -4
- package/src/universal/BottomSheet/types.ts +25 -0
- package/src/universal/Collapsible/index.android.tsx +72 -0
- package/src/universal/Collapsible/index.ios.tsx +16 -0
- package/src/universal/Collapsible/index.tsx +58 -0
- package/src/universal/Collapsible/types.ts +25 -0
- package/src/universal/Column/index.tsx +3 -1
- package/src/universal/Host/index.tsx +69 -5
- package/src/universal/Host/types.ts +70 -0
- package/src/universal/List/index.android.tsx +44 -0
- package/src/universal/List/index.ios.tsx +19 -0
- package/src/universal/List/index.tsx +26 -0
- package/src/universal/List/types.ts +28 -0
- package/src/universal/ListItem/ListItem.android.tsx +52 -0
- package/src/universal/ListItem/ListItem.ios.tsx +58 -0
- package/src/universal/ListItem/ListItem.tsx +72 -0
- package/src/universal/ListItem/ListItemSlots.tsx +66 -0
- package/src/universal/ListItem/index.ts +15 -0
- package/src/universal/ListItem/types.ts +67 -0
- package/src/universal/Picker/Picker.android.tsx +69 -0
- package/src/universal/Picker/Picker.ios.tsx +45 -0
- package/src/universal/Picker/Picker.tsx +52 -0
- package/src/universal/Picker/PickerItem.tsx +27 -0
- package/src/universal/Picker/index.ts +11 -0
- package/src/universal/Picker/types.ts +79 -0
- package/src/universal/index.ts +4 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.7/expo.modules.ui-56.0.7.pom.sha512 +0 -1
- package/src/community/bottom-sheet/CLAUDE.md +0 -55
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`List`](#list) component.
|
|
4
|
+
* A virtualized vertical container of rows.
|
|
5
|
+
* Typically populated with [`ListItem`](#listitem) children, though any node is accepted.
|
|
6
|
+
*/
|
|
7
|
+
export interface ListProps {
|
|
8
|
+
/**
|
|
9
|
+
* The list rows. Usually `<ListItem>` elements.
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional pull-to-refresh handler.
|
|
14
|
+
* When provided, the list shows the platform-native refresh affordance.
|
|
15
|
+
* The returned promise drives the indicator's visibility.
|
|
16
|
+
*
|
|
17
|
+
* @platform android
|
|
18
|
+
* @platform ios
|
|
19
|
+
*/
|
|
20
|
+
onRefresh?: () => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Identifier used to locate the component in end-to-end tests.
|
|
23
|
+
*/
|
|
24
|
+
testID?: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/universal/List/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ListItemProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Android implementation of `ListItem`.
|
|
4
|
+
* Delegates to Material 3 `ListItem` and applies `clickable` for tap handling.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ListItem(props: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export * from './types';
|
|
8
|
+
//# sourceMappingURL=ListItem.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.android.d.ts","sourceRoot":"","sources":["../../../src/universal/ListItem/ListItem.android.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW7C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA6B5C;AAED,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ListItemProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A tappable row in a list.
|
|
4
|
+
* Composes with [`List`](#list).
|
|
5
|
+
* Pass row content via the `leading` / `trailing` / `supportingText` shorthand props or the compound `<ListItem.Leading>` / `<ListItem.Trailing>` / `<ListItem.Supporting>` slot children.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ListItem(props: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export * from './types';
|
|
9
|
+
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/universal/ListItem/ListItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS7C;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAwB5C;AA6BD,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ListItemProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* iOS implementation of `ListItem`.
|
|
4
|
+
* Wraps a plain SwiftUI `Button` and applies `contentShape(.rectangle())` so the full row rectangle registers taps, including the gap between slots.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ListItem(props: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export * from './types';
|
|
8
|
+
//# sourceMappingURL=ListItem.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.ios.d.ts","sourceRoot":"","sources":["../../../src/universal/ListItem/ListItem.ios.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmB7C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA2B5C;AAED,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ListItemLeadingProps, ListItemSupportingProps, ListItemTrailingProps } from './types';
|
|
3
|
+
/** Leading-slot marker for [`ListItem`](#listitem). */
|
|
4
|
+
export declare function Leading(props: ListItemLeadingProps): ReactNode;
|
|
5
|
+
/** Trailing-slot marker for [`ListItem`](#listitem). */
|
|
6
|
+
export declare function Trailing(props: ListItemTrailingProps): ReactNode;
|
|
7
|
+
/** Supporting-text-slot marker for [`ListItem`](#listitem), rendered below the headline. */
|
|
8
|
+
export declare function Supporting(props: ListItemSupportingProps): ReactNode;
|
|
9
|
+
export type ExtractedListItemSlots = {
|
|
10
|
+
leading?: ReactNode;
|
|
11
|
+
trailing?: ReactNode;
|
|
12
|
+
supporting?: ReactNode;
|
|
13
|
+
headline: ReactNode[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Walks `children`, pulls out any `<ListItem.Leading>` /
|
|
17
|
+
* `<ListItem.Trailing>` / `<ListItem.Supporting>` slots, and returns the
|
|
18
|
+
* remaining nodes as the headline content. Recurses into `React.Fragment`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function extractListItemSlots(children: ReactNode): ExtractedListItemSlots;
|
|
21
|
+
//# sourceMappingURL=ListItemSlots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemSlots.d.ts","sourceRoot":"","sources":["../../../src/universal/ListItem/ListItemSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEpG,uDAAuD;AACvD,wBAAgB,OAAO,CAAC,KAAK,EAAE,oBAAoB,aAElD;AAED,wDAAwD;AACxD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,qBAAqB,aAEpD;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CAAC,KAAK,EAAE,uBAAuB,aAExD;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,GAAG,sBAAsB,CAkChF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListItem as ListItemBase } from './ListItem';
|
|
2
|
+
import type { ListItemLeadingProps, ListItemSupportingProps, ListItemTrailingProps } from './types';
|
|
3
|
+
declare const ListItem: typeof ListItemBase & {
|
|
4
|
+
Leading: React.FC<ListItemLeadingProps>;
|
|
5
|
+
Trailing: React.FC<ListItemTrailingProps>;
|
|
6
|
+
Supporting: React.FC<ListItemSupportingProps>;
|
|
7
|
+
};
|
|
8
|
+
export { ListItem };
|
|
9
|
+
export * from './types';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/universal/ListItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEpG,QAAA,MAAM,QAAQ,EAAmB,OAAO,YAAY,GAAG;IACrD,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;IAC1C,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC;CAC/C,CAAC;AAKF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the [`ListItem.Leading`](#listitemleading) slot marker.
|
|
4
|
+
*/
|
|
5
|
+
export interface ListItemLeadingProps {
|
|
6
|
+
/** Content rendered in the leading (start) slot. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Props for the [`ListItem.Trailing`](#listitemtrailing) slot marker.
|
|
11
|
+
*/
|
|
12
|
+
export interface ListItemTrailingProps {
|
|
13
|
+
/** Content rendered in the trailing (end) slot. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Props for the [`ListItem.Supporting`](#listitemsupporting) slot marker.
|
|
18
|
+
*/
|
|
19
|
+
export interface ListItemSupportingProps {
|
|
20
|
+
/** Content rendered below the headline. */
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for the [`ListItem`](#listitem) component.
|
|
25
|
+
* A tappable row in a list.
|
|
26
|
+
*/
|
|
27
|
+
export interface ListItemProps {
|
|
28
|
+
/**
|
|
29
|
+
* Headline content of the row.
|
|
30
|
+
* The remaining (non-slot) children are rendered in the headline area.
|
|
31
|
+
*/
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Tap handler.
|
|
35
|
+
* Activates over the entire row rectangle, including the empty gap between leading/headline/trailing.
|
|
36
|
+
*/
|
|
37
|
+
onPress?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Shorthand for the leading slot.
|
|
40
|
+
* Overridden by `<ListItem.Leading>` if both are provided.
|
|
41
|
+
*/
|
|
42
|
+
leading?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Shorthand for the trailing slot.
|
|
45
|
+
* Overridden by `<ListItem.Trailing>` if both are provided.
|
|
46
|
+
*/
|
|
47
|
+
trailing?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Shorthand for the supporting (sub-)text slot.
|
|
50
|
+
* Strings are rendered with platform-appropriate secondary styling; pass a `ReactNode` for richer content.
|
|
51
|
+
* Overridden by `<ListItem.Supporting>` if both are provided.
|
|
52
|
+
*/
|
|
53
|
+
supportingText?: string | ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Identifier used to locate the component in end-to-end tests.
|
|
56
|
+
*/
|
|
57
|
+
testID?: string;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/universal/ListItem/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mDAAmD;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PickerItemValue, PickerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Android implementation of `Picker`.
|
|
4
|
+
* Renders a Material 3 `ExposedDropdownMenuBox`.
|
|
5
|
+
* `appearance` is accepted for API parity but ignored — Material 3 has no wheel-style picker.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Picker<T extends PickerItemValue>({ selectedValue, onValueChange, enabled, children, }: PickerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export * from './types';
|
|
9
|
+
//# sourceMappingURL=Picker.android.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Picker.android.d.ts","sourceRoot":"","sources":["../../../src/universal/Picker/Picker.android.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAU5D;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,EAChD,aAAa,EACb,aAAa,EACb,OAAc,EACd,QAAQ,GACT,EAAE,WAAW,CAAC,CAAC,CAAC,2CA2ChB;AAED,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PickerItemValue, PickerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A single-selection input.
|
|
4
|
+
* Declare options via `<Picker.Item label value />` children.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Picker<T extends PickerItemValue>({ selectedValue, onValueChange, enabled, children, testID, }: PickerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export * from './types';
|
|
8
|
+
//# sourceMappingURL=Picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../src/universal/Picker/Picker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAK5D;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,EAChD,aAAa,EACb,aAAa,EACb,OAAc,EACd,QAAQ,EACR,MAAM,GACP,EAAE,WAAW,CAAC,CAAC,CAAC,2CAqBhB;AAWD,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PickerItemValue, PickerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* iOS implementation of `Picker`.
|
|
4
|
+
* Wraps SwiftUI's `Picker` and applies the matching `.pickerStyle` for the requested `appearance`.
|
|
5
|
+
* Embed inside a parent `<Host>` (same as `Column` / `Row`).
|
|
6
|
+
*/
|
|
7
|
+
export declare function Picker<T extends PickerItemValue>({ selectedValue, onValueChange, appearance, enabled, children, testID, }: PickerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export * from './types';
|
|
9
|
+
//# sourceMappingURL=Picker.ios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Picker.ios.d.ts","sourceRoot":"","sources":["../../../src/universal/Picker/Picker.ios.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,eAAe,EAAE,EAChD,aAAa,EACb,aAAa,EACb,UAAmB,EACnB,OAAc,EACd,QAAQ,EACR,MAAM,GACP,EAAE,WAAW,CAAC,CAAC,CAAC,2CAmBhB;AAED,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { ExtractedPickerItem, PickerItemProps, PickerItemValue } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Data-only option marker for [`Picker`](#picker).
|
|
5
|
+
* Used via the compound API: `<Picker.Item label="…" value={…} />`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PickerItem<T extends PickerItemValue>(_props: PickerItemProps<T>): null;
|
|
8
|
+
export declare function extractPickerItems<T extends PickerItemValue>(children: ReactNode): ExtractedPickerItem<T>[];
|
|
9
|
+
//# sourceMappingURL=PickerItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PickerItem.d.ts","sourceRoot":"","sources":["../../../src/universal/Picker/PickerItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAErF;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,eAAe,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAEtF;AAID,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,EAC1D,QAAQ,EAAE,SAAS,GAClB,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAU1B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Picker as PickerBase } from './Picker';
|
|
2
|
+
import type { PickerItemProps, PickerItemValue } from './types';
|
|
3
|
+
declare const Picker: typeof PickerBase & {
|
|
4
|
+
Item: <T extends PickerItemValue>(props: PickerItemProps<T>) => null;
|
|
5
|
+
};
|
|
6
|
+
export { Picker };
|
|
7
|
+
export * from './types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/universal/Picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEhE,QAAA,MAAM,MAAM,EAAiB,OAAO,UAAU,GAAG;IAC/C,IAAI,EAAE,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACtE,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The type of values a [`Picker.Item`](#pickeritem) can carry.
|
|
4
|
+
*/
|
|
5
|
+
export type PickerItemValue = string | number;
|
|
6
|
+
/**
|
|
7
|
+
* Visual appearance of the picker.
|
|
8
|
+
*
|
|
9
|
+
* - `'menu'` — Compact button that opens a popup/dropdown on tap.
|
|
10
|
+
* Cross-platform default.
|
|
11
|
+
* - `'wheel'` — Scrollable rotor UI that's always visible inline.
|
|
12
|
+
* iOS only; on Android and web this falls back to the platform's default dropdown.
|
|
13
|
+
*/
|
|
14
|
+
export type PickerAppearance = 'wheel' | 'menu';
|
|
15
|
+
/**
|
|
16
|
+
* Props for the [`Picker.Item`](#pickeritem) component.
|
|
17
|
+
* A data-only marker used to declare options inside a [`Picker`](#picker).
|
|
18
|
+
*/
|
|
19
|
+
export interface PickerItemProps<T extends PickerItemValue = PickerItemValue> {
|
|
20
|
+
/**
|
|
21
|
+
* Display text for this option.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Value passed to `onValueChange` when this option is selected.
|
|
26
|
+
*/
|
|
27
|
+
value: T;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Props for the [`Picker`](#picker) component, a single-selection input.
|
|
31
|
+
*/
|
|
32
|
+
export interface PickerProps<T extends PickerItemValue = PickerItemValue> {
|
|
33
|
+
/**
|
|
34
|
+
* The currently selected value.
|
|
35
|
+
* Must match the `value` of one of the `<Picker.Item>` children.
|
|
36
|
+
*/
|
|
37
|
+
selectedValue: T;
|
|
38
|
+
/**
|
|
39
|
+
* Called when the user selects an option.
|
|
40
|
+
*/
|
|
41
|
+
onValueChange: (value: T) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Visual appearance of the picker.
|
|
44
|
+
* See [`PickerAppearance`](#pickerappearance).
|
|
45
|
+
* @default 'menu'
|
|
46
|
+
*/
|
|
47
|
+
appearance?: PickerAppearance;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the picker accepts input.
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
enabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* `<Picker.Item>` children that declare the available options.
|
|
55
|
+
*/
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Identifier used to locate the component in end-to-end tests.
|
|
59
|
+
*/
|
|
60
|
+
testID?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Internal: extracted item data from `<Picker.Item>` children.
|
|
64
|
+
*/
|
|
65
|
+
export interface ExtractedPickerItem<T extends PickerItemValue = PickerItemValue> {
|
|
66
|
+
label: string;
|
|
67
|
+
value: T;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/universal/Picker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IAC1E;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;CACV;AAED;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IACtE;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAElC;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV"}
|
|
@@ -8,8 +8,12 @@ export * from './Switch';
|
|
|
8
8
|
export * from './Slider';
|
|
9
9
|
export * from './Checkbox';
|
|
10
10
|
export * from './BottomSheet';
|
|
11
|
+
export * from './Collapsible';
|
|
11
12
|
export * from './FieldGroup';
|
|
12
13
|
export * from './Icon';
|
|
14
|
+
export * from './List';
|
|
15
|
+
export * from './ListItem';
|
|
16
|
+
export * from './Picker';
|
|
13
17
|
export * from './Spacer';
|
|
14
18
|
export * from './State';
|
|
15
19
|
export { TextInput, type TextInputProps, type TextInputRef } from './TextInput';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/universal/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/universal/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
package/expo-module.config.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
import ExpoModulesCore
|
|
3
|
+
|
|
4
|
+
internal struct AlertView: ExpoSwiftUI.View {
|
|
5
|
+
@ObservedObject var props: AlertProps
|
|
6
|
+
@State private var isPresented: Bool = false
|
|
7
|
+
|
|
8
|
+
var body: some View {
|
|
9
|
+
triggerContent
|
|
10
|
+
.alert(
|
|
11
|
+
props.title,
|
|
12
|
+
isPresented: $isPresented
|
|
13
|
+
) {
|
|
14
|
+
actionsContent
|
|
15
|
+
} message: {
|
|
16
|
+
messageContent
|
|
17
|
+
}
|
|
18
|
+
.onAppear {
|
|
19
|
+
isPresented = props.isPresented
|
|
20
|
+
}
|
|
21
|
+
.onChange(of: isPresented) { newValue in
|
|
22
|
+
if props.isPresented != newValue {
|
|
23
|
+
props.onIsPresentedChange(["isPresented": newValue])
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.onChange(of: props.isPresented) { newValue in
|
|
27
|
+
isPresented = newValue
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@ViewBuilder
|
|
32
|
+
private var triggerContent: some View {
|
|
33
|
+
if let trigger = props.children?.slot("trigger") {
|
|
34
|
+
trigger
|
|
35
|
+
} else {
|
|
36
|
+
EmptyView()
|
|
37
|
+
.onAppear {
|
|
38
|
+
log.warn("Alert requires an Alert.Trigger child to be visible")
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@ViewBuilder
|
|
44
|
+
private var actionsContent: some View {
|
|
45
|
+
if let actions = props.children?.slot("actions") {
|
|
46
|
+
actions
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@ViewBuilder
|
|
51
|
+
private var messageContent: some View {
|
|
52
|
+
if let message = props.children?.slot("message") {
|
|
53
|
+
message
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -7,6 +7,7 @@ final class BottomSheetProps: UIBaseViewProps {
|
|
|
7
7
|
@Field var isPresented: Bool = false
|
|
8
8
|
@Field var fitToContents: Bool = false
|
|
9
9
|
var onIsPresentedChange = EventDispatcher()
|
|
10
|
+
var onDismiss = EventDispatcher()
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
struct SizePreferenceKey: PreferenceKey {
|
|
@@ -86,7 +87,9 @@ struct BottomSheetView: ExpoSwiftUI.View {
|
|
|
86
87
|
|
|
87
88
|
var body: some View {
|
|
88
89
|
Rectangle().hidden()
|
|
89
|
-
.sheet(isPresented: $isPresented
|
|
90
|
+
.sheet(isPresented: $isPresented, onDismiss: {
|
|
91
|
+
props.onDismiss()
|
|
92
|
+
}) {
|
|
90
93
|
sheetContent
|
|
91
94
|
}
|
|
92
95
|
.onChange(of: isPresented, perform: { newIsPresented in
|
package/ios/ExpoUIModule.swift
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
3
|
import ExpoModulesCore
|
|
4
|
+
import SwiftUI
|
|
4
5
|
|
|
5
6
|
public final class ExpoUIModule: Module {
|
|
6
7
|
public func definition() -> ModuleDefinition {
|
|
@@ -28,7 +29,19 @@ public final class ExpoUIModule: Module {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
Function("setValue") { (state: ObservableState, wrapper: [String: Any]) in
|
|
31
|
-
|
|
32
|
+
let newValue = wrapper["value"]
|
|
33
|
+
// Update state on the UI thread
|
|
34
|
+
if Thread.isMainThread {
|
|
35
|
+
state.value = newValue
|
|
36
|
+
} else {
|
|
37
|
+
DispatchQueue.main.async {
|
|
38
|
+
state.value = newValue
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
Function("setOnChange") { (state: ObservableState, callback: WorkletCallback?) in
|
|
44
|
+
state.onChange = callback
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
47
|
|
|
@@ -38,6 +51,33 @@ public final class ExpoUIModule: Module {
|
|
|
38
51
|
RefreshableManager.shared.completeRefresh(id: id)
|
|
39
52
|
}
|
|
40
53
|
|
|
54
|
+
AsyncFunction("withAnimation") { (
|
|
55
|
+
animation: AnimationConfig?,
|
|
56
|
+
body: WorkletCallback,
|
|
57
|
+
completion: WorkletCallback?,
|
|
58
|
+
completionCriteria: AnimationCompletionCriteriaType?
|
|
59
|
+
) in
|
|
60
|
+
let swiftUIAnimation = animation?.toSwiftUIAnimation()
|
|
61
|
+
|
|
62
|
+
if let completion {
|
|
63
|
+
if #available(iOS 17.0, tvOS 17.0, *) {
|
|
64
|
+
let criteria: SwiftUI.AnimationCompletionCriteria =
|
|
65
|
+
completionCriteria == .removed ? .removed : .logicallyComplete
|
|
66
|
+
withAnimation(swiftUIAnimation, completionCriteria: criteria) {
|
|
67
|
+
body.invoke()
|
|
68
|
+
} completion: {
|
|
69
|
+
completion.invoke()
|
|
70
|
+
}
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
withAnimation(swiftUIAnimation) {
|
|
76
|
+
body.invoke()
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.runOnQueue(.main)
|
|
80
|
+
|
|
41
81
|
// MARK: - Expo UI Views with AsyncFunctions
|
|
42
82
|
|
|
43
83
|
ExpoUIView(SecureFieldView.self) {
|
|
@@ -91,6 +131,7 @@ public final class ExpoUIModule: Module {
|
|
|
91
131
|
|
|
92
132
|
// MARK: - Expo UI Views
|
|
93
133
|
|
|
134
|
+
ExpoUIView(AlertView.self)
|
|
94
135
|
ExpoUIView(BottomSheetView.self)
|
|
95
136
|
ExpoUIView(ExpoUI.Button.self)
|
|
96
137
|
ExpoUIView(ChartView.self)
|
|
@@ -131,6 +172,7 @@ public final class ExpoUIModule: Module {
|
|
|
131
172
|
ExpoUIView(GlassEffectContainerView.self)
|
|
132
173
|
ExpoUIView(LabeledContentView.self)
|
|
133
174
|
ExpoUIView(ScrollViewComponent.self)
|
|
175
|
+
ExpoUIView(SwipeActionsView.self)
|
|
134
176
|
ExpoUIView(RectangleView.self)
|
|
135
177
|
ExpoUIView(RoundedRectangleView.self)
|
|
136
178
|
ExpoUIView(EllipseView.self)
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
3
|
#import <Foundation/Foundation.h>
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
NS_ASSUME_NONNULL_BEGIN
|
|
6
6
|
|
|
7
|
+
@class UIGestureRecognizer;
|
|
8
|
+
@class UIView;
|
|
9
|
+
|
|
7
10
|
@interface ExpoUITouchHandlerHelper : NSObject
|
|
8
11
|
|
|
9
12
|
+ (nullable UIGestureRecognizer *)createAndAttachTouchHandlerForView:(UIView *)view;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesCore
|
|
4
|
+
import SwiftUI
|
|
5
|
+
|
|
6
|
+
internal enum AnimationType: String, Enumerable {
|
|
7
|
+
case easeInOut
|
|
8
|
+
case easeIn
|
|
9
|
+
case easeOut
|
|
10
|
+
case linear
|
|
11
|
+
case spring
|
|
12
|
+
case interpolatingSpring
|
|
13
|
+
case `default`
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
internal enum AnimationCompletionCriteriaType: String, Enumerable {
|
|
17
|
+
case logicallyComplete
|
|
18
|
+
case removed
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
Describes a SwiftUI `Animation` value over the JS bridge. Consumed by both
|
|
23
|
+
the `animation(_:value:)` view modifier and the `withAnimation(_:_:)`
|
|
24
|
+
function so they accept the same JS shape.
|
|
25
|
+
*/
|
|
26
|
+
internal struct AnimationConfig: Record {
|
|
27
|
+
// Shared fallbacks used when the JS side omits a parameter. Mirrors
|
|
28
|
+
// SwiftUI's own defaults so each animation variant resolves the same way.
|
|
29
|
+
private static let defaultDuration: Double = 0.5
|
|
30
|
+
private static let defaultResponse: Double = 0.5
|
|
31
|
+
private static let defaultDampingFraction: Double = 0.825
|
|
32
|
+
private static let defaultBlendDuration: Double = 0.0
|
|
33
|
+
private static let defaultBounce: Double = 0.0
|
|
34
|
+
|
|
35
|
+
@Field var type: AnimationType = .default
|
|
36
|
+
@Field var duration: Double?
|
|
37
|
+
@Field var response: Double?
|
|
38
|
+
@Field var dampingFraction: Double?
|
|
39
|
+
@Field var blendDuration: Double?
|
|
40
|
+
@Field var bounce: Double?
|
|
41
|
+
@Field var mass: Double = 1.0
|
|
42
|
+
@Field var stiffness: Double?
|
|
43
|
+
@Field var damping: Double?
|
|
44
|
+
@Field var initialVelocity: Double = 0.0
|
|
45
|
+
@Field var delay: Double?
|
|
46
|
+
@Field var repeatCount: Int?
|
|
47
|
+
@Field var autoreverses: Bool = true
|
|
48
|
+
|
|
49
|
+
func toSwiftUIAnimation() -> Animation {
|
|
50
|
+
var animation: Animation
|
|
51
|
+
|
|
52
|
+
switch type {
|
|
53
|
+
case .easeIn:
|
|
54
|
+
animation = duration.map { Animation.easeIn(duration: $0) } ?? .easeIn
|
|
55
|
+
case .easeOut:
|
|
56
|
+
animation = duration.map { Animation.easeOut(duration: $0) } ?? .easeOut
|
|
57
|
+
case .linear:
|
|
58
|
+
animation = duration.map { Animation.linear(duration: $0) } ?? .linear
|
|
59
|
+
case .easeInOut:
|
|
60
|
+
animation = duration.map { Animation.easeInOut(duration: $0) } ?? .easeInOut
|
|
61
|
+
case .spring:
|
|
62
|
+
if response != nil || dampingFraction != nil {
|
|
63
|
+
animation = .spring(
|
|
64
|
+
response: response ?? Self.defaultResponse,
|
|
65
|
+
dampingFraction: dampingFraction ?? Self.defaultDampingFraction,
|
|
66
|
+
blendDuration: blendDuration ?? Self.defaultBlendDuration
|
|
67
|
+
)
|
|
68
|
+
} else if duration != nil || bounce != nil {
|
|
69
|
+
animation = .spring(
|
|
70
|
+
duration: duration ?? Self.defaultDuration,
|
|
71
|
+
bounce: bounce ?? Self.defaultBounce,
|
|
72
|
+
blendDuration: blendDuration ?? Self.defaultBlendDuration
|
|
73
|
+
)
|
|
74
|
+
} else if let blendDuration {
|
|
75
|
+
animation = .spring(blendDuration: blendDuration)
|
|
76
|
+
} else {
|
|
77
|
+
animation = .spring
|
|
78
|
+
}
|
|
79
|
+
case .interpolatingSpring:
|
|
80
|
+
if duration != nil || bounce != nil {
|
|
81
|
+
animation = .interpolatingSpring(
|
|
82
|
+
duration: duration ?? Self.defaultDuration,
|
|
83
|
+
bounce: bounce ?? Self.defaultBounce,
|
|
84
|
+
initialVelocity: initialVelocity
|
|
85
|
+
)
|
|
86
|
+
} else if let stiffness, let damping {
|
|
87
|
+
animation = .interpolatingSpring(
|
|
88
|
+
mass: mass,
|
|
89
|
+
stiffness: stiffness,
|
|
90
|
+
damping: damping,
|
|
91
|
+
initialVelocity: initialVelocity
|
|
92
|
+
)
|
|
93
|
+
} else {
|
|
94
|
+
animation = .interpolatingSpring
|
|
95
|
+
}
|
|
96
|
+
default:
|
|
97
|
+
animation = .default
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if let delay {
|
|
101
|
+
animation = animation.delay(delay)
|
|
102
|
+
}
|
|
103
|
+
if let repeatCount {
|
|
104
|
+
animation = animation.repeatCount(repeatCount, autoreverses: autoreverses)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return animation
|
|
108
|
+
}
|
|
109
|
+
}
|