@mrmeg/expo-ui 0.6.0 → 0.6.1
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.
|
@@ -9,15 +9,6 @@ declare const DropdownMenu: {
|
|
|
9
9
|
} & React.RefAttributes<View>): React.JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
|
-
declare const DropdownMenuTrigger: {
|
|
13
|
-
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
14
|
-
asChild?: boolean;
|
|
15
|
-
} & {
|
|
16
|
-
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
17
|
-
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
18
|
-
} & React.RefAttributes<import("@rn-primitives/dropdown-menu").TriggerRef>): React.JSX.Element;
|
|
19
|
-
displayName: string;
|
|
20
|
-
};
|
|
21
12
|
declare const DropdownMenuGroup: {
|
|
22
13
|
({ asChild, ref, ...props }: import("react-native").ViewProps & {
|
|
23
14
|
asChild?: boolean;
|
|
@@ -44,6 +35,18 @@ declare const DropdownMenuRadioGroup: {
|
|
|
44
35
|
} & React.RefAttributes<View>): React.JSX.Element;
|
|
45
36
|
displayName: string;
|
|
46
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* DropdownMenuTrigger Component
|
|
40
|
+
* Wraps the primitive Trigger to default `accessibilityRole="button"`.
|
|
41
|
+
*
|
|
42
|
+
* The underlying @rn-primitives Trigger renders a RN-Web Pressable (or a Slot
|
|
43
|
+
* when `asChild`) without a role, so on web it becomes `role="generic"` —
|
|
44
|
+
* breaking screen-reader semantics and `getByRole("button")` queries. When
|
|
45
|
+
* `asChild` is used, the child's own role still wins (the Slot merges child
|
|
46
|
+
* props over slot props), so this only fills the gap when none is set.
|
|
47
|
+
*/
|
|
48
|
+
type DropdownMenuTriggerProps = DropdownMenuPrimitive.TriggerProps;
|
|
49
|
+
declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
47
50
|
/**
|
|
48
51
|
* DropdownMenuSubTrigger Component
|
|
49
52
|
* Trigger for sub-menus with automatic chevron icon
|
|
@@ -117,4 +120,4 @@ interface DropdownMenuShortcutProps {
|
|
|
117
120
|
}
|
|
118
121
|
declare function DropdownMenuShortcut({ style: styleOverride, ...props }: DropdownMenuShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
119
122
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, };
|
|
120
|
-
export type { DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, };
|
|
123
|
+
export type { DropdownMenuTriggerProps, DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps, DropdownMenuLabelProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, };
|
|
@@ -11,13 +11,15 @@ import { FullWindowOverlay as RNFullWindowOverlay } from "react-native-screens";
|
|
|
11
11
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
12
12
|
// Re-export primitives that don't need styling
|
|
13
13
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
14
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
15
14
|
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
16
15
|
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
17
16
|
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
18
17
|
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
19
18
|
// Platform-specific overlay
|
|
20
19
|
const FullWindowOverlay = Platform.OS === "ios" ? RNFullWindowOverlay : React.Fragment;
|
|
20
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
21
|
+
return _jsx(DropdownMenuPrimitive.Trigger, { accessibilityRole: "button", ...props });
|
|
22
|
+
}
|
|
21
23
|
function DropdownMenuSubTrigger({ inset = false, children, style: styleOverride, ...props }) {
|
|
22
24
|
const { theme } = useTheme();
|
|
23
25
|
const { open } = DropdownMenuPrimitive.useSubContext();
|