@radix-ui/react-context-menu 0.1.7-rc.9 → 1.0.1-rc.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.
- package/dist/index.d.ts +24 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -109
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +83 -96
- package/dist/index.module.js.map +1 -1
- package/package.json +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -15,8 +15,12 @@ type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
|
15
15
|
export interface ContextMenuTriggerProps extends PrimitiveSpanProps {
|
|
16
16
|
}
|
|
17
17
|
export const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
+
type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
|
|
19
|
+
export interface ContextMenuPortalProps extends MenuPortalProps {
|
|
20
|
+
}
|
|
21
|
+
export const ContextMenuPortal: React.FC<ContextMenuPortalProps>;
|
|
18
22
|
type MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
|
|
19
|
-
export interface ContextMenuContentProps extends Omit<MenuContentProps, '
|
|
23
|
+
export interface ContextMenuContentProps extends Omit<MenuContentProps, 'side' | 'sideOffset' | 'align'> {
|
|
20
24
|
}
|
|
21
25
|
export const ContextMenuContent: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
26
|
type MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
|
|
@@ -31,10 +35,6 @@ type MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
|
|
|
31
35
|
export interface ContextMenuItemProps extends MenuItemProps {
|
|
32
36
|
}
|
|
33
37
|
export const ContextMenuItem: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
35
|
-
export interface ContextMenuTriggerItemProps extends MenuSubTriggerProps {
|
|
36
|
-
}
|
|
37
|
-
export const ContextMenuTriggerItem: React.ForwardRefExoticComponent<ContextMenuTriggerItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
type MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
|
|
39
39
|
export interface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {
|
|
40
40
|
}
|
|
@@ -59,18 +59,36 @@ type MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>
|
|
|
59
59
|
export interface ContextMenuArrowProps extends MenuArrowProps {
|
|
60
60
|
}
|
|
61
61
|
export const ContextMenuArrow: React.ForwardRefExoticComponent<ContextMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
62
|
+
export interface ContextMenuSubProps {
|
|
63
|
+
children?: React.ReactNode;
|
|
64
|
+
open?: boolean;
|
|
65
|
+
defaultOpen?: boolean;
|
|
66
|
+
onOpenChange?(open: boolean): void;
|
|
67
|
+
}
|
|
68
|
+
export const ContextMenuSub: React.FC<ContextMenuSubProps>;
|
|
69
|
+
type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
70
|
+
export interface ContextMenuSubTriggerProps extends MenuSubTriggerProps {
|
|
71
|
+
}
|
|
72
|
+
export const ContextMenuSubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
type MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
|
|
74
|
+
export interface ContextMenuSubContentProps extends MenuSubContentProps {
|
|
75
|
+
}
|
|
76
|
+
export const ContextMenuSubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
77
|
export const Root: React.FC<ContextMenuProps>;
|
|
63
78
|
export const Trigger: React.ForwardRefExoticComponent<ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
79
|
+
export const Portal: React.FC<ContextMenuPortalProps>;
|
|
64
80
|
export const Content: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
81
|
export const Group: React.ForwardRefExoticComponent<ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
82
|
export const Label: React.ForwardRefExoticComponent<ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
83
|
export const Item: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
-
export const TriggerItem: React.ForwardRefExoticComponent<ContextMenuTriggerItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
84
|
export const CheckboxItem: React.ForwardRefExoticComponent<ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
70
85
|
export const RadioGroup: React.ForwardRefExoticComponent<ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
71
86
|
export const RadioItem: React.ForwardRefExoticComponent<ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
72
87
|
export const ItemIndicator: React.ForwardRefExoticComponent<ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
73
88
|
export const Separator: React.ForwardRefExoticComponent<ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
74
89
|
export const Arrow: React.ForwardRefExoticComponent<ContextMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
90
|
+
export const Sub: React.FC<ContextMenuSubProps>;
|
|
91
|
+
export const SubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
92
|
+
export const SubContent: React.ForwardRef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AM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,2CAAqC,SAAQ,mBAAmB;CAAG;AAEnE,OAAA,MAAM,wHAOJ,CAAC;AAWH,2BAA2B,MAAM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,2CAAqC,SAAQ,mBAAmB;CAAG;AAEnE,OAAA,MAAM,wHAoBJ,CAAC;AAUH,OAAA,MAAM,gCAAkB,CAAC;AACzB,OAAA,MAAM,wGAA4B,CAAC;AACnC,OAAA,MAAM,wCAA0B,CAAC;AACjC,OAAA,MAAM,uGAA4B,CAAC;AACnC,OAAA,MAAM,mGAAwB,CAAC;AAC/B,OAAA,MAAM,mGAAwB,CAAC;AAC/B,OAAA,MAAM,iGAAsB,CAAC;AAC7B,OAAA,MAAM,iHAAsC,CAAC;AAC7C,OAAA,MAAM,6GAAkC,CAAC;AACzC,OAAA,MAAM,2GAAgC,CAAC;AACvC,OAAA,MAAM,oHAAwC,CAAC;AAC/C,OAAA,MAAM,2GAAgC,CAAC;AACvC,OAAA,MAAM,kGAAwB,CAAC;AAC/B,OAAA,MAAM,kCAAoB,CAAC;AAC3B,OAAA,MAAM,6GAAkC,CAAC;AACzC,OAAA,MAAM,6GAAkC,CAAC","sources":["packages/react/context-menu/src/packages/react/context-menu/src/ContextMenu.tsx","packages/react/context-menu/src/packages/react/context-menu/src/index.ts","packages/react/context-menu/src/index.ts"],"sourcesContent":[null,null,"export {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './ContextMenu';\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n} from './ContextMenu';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.js
CHANGED
|
@@ -5,58 +5,49 @@ var $l8XVT$radixuireactcontext = require("@radix-ui/react-context");
|
|
|
5
5
|
var $l8XVT$radixuireactprimitive = require("@radix-ui/react-primitive");
|
|
6
6
|
var $l8XVT$radixuireactmenu = require("@radix-ui/react-menu");
|
|
7
7
|
var $l8XVT$radixuireactusecallbackref = require("@radix-ui/react-use-callback-ref");
|
|
8
|
+
var $l8XVT$radixuireactusecontrollablestate = require("@radix-ui/react-use-controllable-state");
|
|
8
9
|
|
|
9
|
-
function $parcel$
|
|
10
|
-
Object.
|
|
11
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(dest, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function get() {
|
|
18
|
-
return source[key];
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
return dest;
|
|
10
|
+
function $parcel$export(e, n, v, s) {
|
|
11
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
24
12
|
}
|
|
25
13
|
function $parcel$interopDefault(a) {
|
|
26
14
|
return a && a.__esModule ? a.default : a;
|
|
27
15
|
}
|
|
28
|
-
function $parcel$export(e, n, v, s) {
|
|
29
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
30
|
-
}
|
|
31
|
-
var $5de197f6cd80e8e9$exports = {};
|
|
32
16
|
|
|
33
|
-
$parcel$export(
|
|
34
|
-
$parcel$export(
|
|
35
|
-
$parcel$export(
|
|
36
|
-
$parcel$export(
|
|
37
|
-
$parcel$export(
|
|
38
|
-
$parcel$export(
|
|
39
|
-
$parcel$export(
|
|
40
|
-
$parcel$export(
|
|
41
|
-
$parcel$export(
|
|
42
|
-
$parcel$export(
|
|
43
|
-
$parcel$export(
|
|
44
|
-
$parcel$export(
|
|
45
|
-
$parcel$export(
|
|
46
|
-
$parcel$export(
|
|
47
|
-
$parcel$export(
|
|
48
|
-
$parcel$export(
|
|
49
|
-
$parcel$export(
|
|
50
|
-
$parcel$export(
|
|
51
|
-
$parcel$export(
|
|
52
|
-
$parcel$export(
|
|
53
|
-
$parcel$export(
|
|
54
|
-
$parcel$export(
|
|
55
|
-
$parcel$export(
|
|
56
|
-
$parcel$export(
|
|
57
|
-
$parcel$export(
|
|
58
|
-
$parcel$export(
|
|
59
|
-
$parcel$export(
|
|
17
|
+
$parcel$export(module.exports, "createContextMenuScope", () => $5de197f6cd80e8e9$export$1059331f43ddcc82);
|
|
18
|
+
$parcel$export(module.exports, "ContextMenu", () => $5de197f6cd80e8e9$export$8dc6765e8be191c7);
|
|
19
|
+
$parcel$export(module.exports, "ContextMenuTrigger", () => $5de197f6cd80e8e9$export$be6fc7b1d5b0beb9);
|
|
20
|
+
$parcel$export(module.exports, "ContextMenuPortal", () => $5de197f6cd80e8e9$export$14afd0be83e45060);
|
|
21
|
+
$parcel$export(module.exports, "ContextMenuContent", () => $5de197f6cd80e8e9$export$572205900c9369e);
|
|
22
|
+
$parcel$export(module.exports, "ContextMenuGroup", () => $5de197f6cd80e8e9$export$9860523b0fcdd664);
|
|
23
|
+
$parcel$export(module.exports, "ContextMenuLabel", () => $5de197f6cd80e8e9$export$d4b9d3b609a10742);
|
|
24
|
+
$parcel$export(module.exports, "ContextMenuItem", () => $5de197f6cd80e8e9$export$16a26dc176a49100);
|
|
25
|
+
$parcel$export(module.exports, "ContextMenuCheckboxItem", () => $5de197f6cd80e8e9$export$b6adbe51d5d8b7ec);
|
|
26
|
+
$parcel$export(module.exports, "ContextMenuRadioGroup", () => $5de197f6cd80e8e9$export$db5c89af5ed9aa07);
|
|
27
|
+
$parcel$export(module.exports, "ContextMenuRadioItem", () => $5de197f6cd80e8e9$export$8a727d09a7d9bfc2);
|
|
28
|
+
$parcel$export(module.exports, "ContextMenuItemIndicator", () => $5de197f6cd80e8e9$export$9ed8194dee42d94b);
|
|
29
|
+
$parcel$export(module.exports, "ContextMenuSeparator", () => $5de197f6cd80e8e9$export$8d6b009fadfe1207);
|
|
30
|
+
$parcel$export(module.exports, "ContextMenuArrow", () => $5de197f6cd80e8e9$export$f47d0a58228a61e2);
|
|
31
|
+
$parcel$export(module.exports, "ContextMenuSub", () => $5de197f6cd80e8e9$export$5bc21d1c00c4b201);
|
|
32
|
+
$parcel$export(module.exports, "ContextMenuSubTrigger", () => $5de197f6cd80e8e9$export$30b2b5c64556d316);
|
|
33
|
+
$parcel$export(module.exports, "ContextMenuSubContent", () => $5de197f6cd80e8e9$export$2c967063bd2dc512);
|
|
34
|
+
$parcel$export(module.exports, "Root", () => $5de197f6cd80e8e9$export$be92b6f5f03c0fe9);
|
|
35
|
+
$parcel$export(module.exports, "Trigger", () => $5de197f6cd80e8e9$export$41fb9f06171c75f4);
|
|
36
|
+
$parcel$export(module.exports, "Portal", () => $5de197f6cd80e8e9$export$602eac185826482c);
|
|
37
|
+
$parcel$export(module.exports, "Content", () => $5de197f6cd80e8e9$export$7c6e2c02157bb7d2);
|
|
38
|
+
$parcel$export(module.exports, "Group", () => $5de197f6cd80e8e9$export$eb2fcfdbd7ba97d4);
|
|
39
|
+
$parcel$export(module.exports, "Label", () => $5de197f6cd80e8e9$export$b04be29aa201d4f5);
|
|
40
|
+
$parcel$export(module.exports, "Item", () => $5de197f6cd80e8e9$export$6d08773d2e66f8f2);
|
|
41
|
+
$parcel$export(module.exports, "CheckboxItem", () => $5de197f6cd80e8e9$export$16ce288f89fa631c);
|
|
42
|
+
$parcel$export(module.exports, "RadioGroup", () => $5de197f6cd80e8e9$export$a98f0dcb43a68a25);
|
|
43
|
+
$parcel$export(module.exports, "RadioItem", () => $5de197f6cd80e8e9$export$371ab307eab489c0);
|
|
44
|
+
$parcel$export(module.exports, "ItemIndicator", () => $5de197f6cd80e8e9$export$c3468e2714d175fa);
|
|
45
|
+
$parcel$export(module.exports, "Separator", () => $5de197f6cd80e8e9$export$1ff3c3f08ae963c0);
|
|
46
|
+
$parcel$export(module.exports, "Arrow", () => $5de197f6cd80e8e9$export$21b07c8f274aebd5);
|
|
47
|
+
$parcel$export(module.exports, "Sub", () => $5de197f6cd80e8e9$export$d7a01e11500dfb6f);
|
|
48
|
+
$parcel$export(module.exports, "SubTrigger", () => $5de197f6cd80e8e9$export$2ea8a7a591ac5eac);
|
|
49
|
+
$parcel$export(module.exports, "SubContent", () => $5de197f6cd80e8e9$export$6d4de93b380beddf);
|
|
50
|
+
|
|
60
51
|
|
|
61
52
|
|
|
62
53
|
|
|
@@ -76,7 +67,6 @@ const [$5de197f6cd80e8e9$var$ContextMenuProvider, $5de197f6cd80e8e9$var$useConte
|
|
|
76
67
|
const $5de197f6cd80e8e9$export$8dc6765e8be191c7 = (props)=>{
|
|
77
68
|
const { __scopeContextMenu: __scopeContextMenu , children: children , onOpenChange: onOpenChange , dir: dir , modal: modal = true } = props;
|
|
78
69
|
const [open1, setOpen] = $l8XVT$react.useState(false);
|
|
79
|
-
const contentContext = $5de197f6cd80e8e9$var$useContentContext($5de197f6cd80e8e9$var$CONTEXT_MENU_NAME, __scopeContextMenu);
|
|
80
70
|
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
81
71
|
const handleOpenChangeProp = $l8XVT$radixuireactusecallbackref.useCallbackRef(onOpenChange);
|
|
82
72
|
const handleOpenChange = $l8XVT$react.useCallback((open)=>{
|
|
@@ -85,18 +75,8 @@ const $5de197f6cd80e8e9$export$8dc6765e8be191c7 = (props)=>{
|
|
|
85
75
|
}, [
|
|
86
76
|
handleOpenChangeProp
|
|
87
77
|
]);
|
|
88
|
-
return
|
|
89
|
-
scope: __scopeContextMenu,
|
|
90
|
-
isRootMenu: false,
|
|
91
|
-
open: open1,
|
|
92
|
-
onOpenChange: handleOpenChange,
|
|
93
|
-
modal: modal
|
|
94
|
-
}, /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Sub, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, {
|
|
95
|
-
open: open1,
|
|
96
|
-
onOpenChange: handleOpenChange
|
|
97
|
-
}), children)) : /*#__PURE__*/ $l8XVT$react.createElement($5de197f6cd80e8e9$var$ContextMenuProvider, {
|
|
78
|
+
return /*#__PURE__*/ $l8XVT$react.createElement($5de197f6cd80e8e9$var$ContextMenuProvider, {
|
|
98
79
|
scope: __scopeContextMenu,
|
|
99
|
-
isRootMenu: true,
|
|
100
80
|
open: open1,
|
|
101
81
|
onOpenChange: handleOpenChange,
|
|
102
82
|
modal: modal
|
|
@@ -142,12 +122,11 @@ const $5de197f6cd80e8e9$export$be6fc7b1d5b0beb9 = /*#__PURE__*/ $l8XVT$react.for
|
|
|
142
122
|
, [
|
|
143
123
|
clearLongPress
|
|
144
124
|
]);
|
|
145
|
-
return /*#__PURE__*/ $l8XVT$react.createElement($
|
|
146
|
-
scope: __scopeContextMenu,
|
|
147
|
-
isInsideContent: false
|
|
148
|
-
}, /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Anchor, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, {
|
|
125
|
+
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$react.Fragment, null, /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Anchor, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, {
|
|
149
126
|
virtualRef: virtualRef
|
|
150
|
-
})), /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactprimitive.Primitive.span, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({
|
|
127
|
+
})), /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactprimitive.Primitive.span, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({
|
|
128
|
+
"data-state": context.open ? 'open' : 'closed'
|
|
129
|
+
}, triggerProps, {
|
|
151
130
|
ref: forwardedRef // prevent iOS context menu from appearing
|
|
152
131
|
,
|
|
153
132
|
style: {
|
|
@@ -158,8 +137,8 @@ const $5de197f6cd80e8e9$export$be6fc7b1d5b0beb9 = /*#__PURE__*/ $l8XVT$react.for
|
|
|
158
137
|
// clearing the long press here because some platforms already support
|
|
159
138
|
// long press to trigger a `contextmenu` event
|
|
160
139
|
clearLongPress();
|
|
161
|
-
event.preventDefault();
|
|
162
140
|
handleOpen(event);
|
|
141
|
+
event.preventDefault();
|
|
163
142
|
}),
|
|
164
143
|
onPointerDown: $l8XVT$radixuiprimitive.composeEventHandlers(props.onPointerDown, $5de197f6cd80e8e9$var$whenTouchOrPen((event)=>{
|
|
165
144
|
// clear the long press here in case there's multiple touch points
|
|
@@ -175,46 +154,27 @@ const $5de197f6cd80e8e9$export$be6fc7b1d5b0beb9 = /*#__PURE__*/ $l8XVT$react.for
|
|
|
175
154
|
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$be6fc7b1d5b0beb9, {
|
|
176
155
|
displayName: $5de197f6cd80e8e9$var$TRIGGER_NAME
|
|
177
156
|
});
|
|
157
|
+
/* -------------------------------------------------------------------------------------------------
|
|
158
|
+
* ContextMenuPortal
|
|
159
|
+
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$PORTAL_NAME = 'ContextMenuPortal';
|
|
160
|
+
const $5de197f6cd80e8e9$export$14afd0be83e45060 = (props)=>{
|
|
161
|
+
const { __scopeContextMenu: __scopeContextMenu , ...portalProps } = props;
|
|
162
|
+
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
163
|
+
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Portal, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, portalProps));
|
|
164
|
+
};
|
|
165
|
+
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$14afd0be83e45060, {
|
|
166
|
+
displayName: $5de197f6cd80e8e9$var$PORTAL_NAME
|
|
167
|
+
});
|
|
178
168
|
/* -------------------------------------------------------------------------------------------------
|
|
179
169
|
* ContextMenuContent
|
|
180
170
|
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$CONTENT_NAME = 'ContextMenuContent';
|
|
181
|
-
const [$5de197f6cd80e8e9$var$ContentProvider, $5de197f6cd80e8e9$var$useContentContext] = $5de197f6cd80e8e9$var$createContextMenuContext($5de197f6cd80e8e9$var$CONTENT_NAME, {
|
|
182
|
-
isInsideContent: false
|
|
183
|
-
});
|
|
184
171
|
const $5de197f6cd80e8e9$export$572205900c9369e = /*#__PURE__*/ $l8XVT$react.forwardRef((props, forwardedRef)=>{
|
|
185
|
-
const { __scopeContextMenu: __scopeContextMenu , ...contentProps } = props;
|
|
186
|
-
const context = $5de197f6cd80e8e9$var$useContextMenuContext($5de197f6cd80e8e9$var$CONTENT_NAME, __scopeContextMenu);
|
|
187
|
-
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
188
|
-
const commonProps = {
|
|
189
|
-
...contentProps,
|
|
190
|
-
style: {
|
|
191
|
-
...props.style,
|
|
192
|
-
// re-namespace exposed content custom property
|
|
193
|
-
['--radix-context-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
return /*#__PURE__*/ $l8XVT$react.createElement($5de197f6cd80e8e9$var$ContentProvider, {
|
|
197
|
-
scope: __scopeContextMenu,
|
|
198
|
-
isInsideContent: true
|
|
199
|
-
}, context.isRootMenu ? /*#__PURE__*/ $l8XVT$react.createElement($5de197f6cd80e8e9$var$ContextMenuRootContent, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({
|
|
200
|
-
__scopeContextMenu: __scopeContextMenu
|
|
201
|
-
}, commonProps, {
|
|
202
|
-
ref: forwardedRef
|
|
203
|
-
})) : /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Content, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, commonProps, {
|
|
204
|
-
ref: forwardedRef
|
|
205
|
-
})));
|
|
206
|
-
});
|
|
207
|
-
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$572205900c9369e, {
|
|
208
|
-
displayName: $5de197f6cd80e8e9$var$CONTENT_NAME
|
|
209
|
-
});
|
|
210
|
-
/* ---------------------------------------------------------------------------------------------- */ const $5de197f6cd80e8e9$var$ContextMenuRootContent = /*#__PURE__*/ $l8XVT$react.forwardRef((props, forwardedRef)=>{
|
|
211
172
|
const { __scopeContextMenu: __scopeContextMenu , ...contentProps } = props;
|
|
212
173
|
const context = $5de197f6cd80e8e9$var$useContextMenuContext($5de197f6cd80e8e9$var$CONTENT_NAME, __scopeContextMenu);
|
|
213
174
|
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
214
175
|
const hasInteractedOutsideRef = $l8XVT$react.useRef(false);
|
|
215
176
|
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Content, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, contentProps, {
|
|
216
177
|
ref: forwardedRef,
|
|
217
|
-
portalled: true,
|
|
218
178
|
side: "right",
|
|
219
179
|
sideOffset: 2,
|
|
220
180
|
align: "start",
|
|
@@ -228,9 +188,17 @@ const $5de197f6cd80e8e9$export$572205900c9369e = /*#__PURE__*/ $l8XVT$react.forw
|
|
|
228
188
|
var _props$onInteractOuts;
|
|
229
189
|
(_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
|
|
230
190
|
if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;
|
|
191
|
+
},
|
|
192
|
+
style: {
|
|
193
|
+
...props.style,
|
|
194
|
+
// re-namespace exposed content custom property
|
|
195
|
+
['--radix-context-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
|
231
196
|
}
|
|
232
197
|
}));
|
|
233
198
|
});
|
|
199
|
+
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$572205900c9369e, {
|
|
200
|
+
displayName: $5de197f6cd80e8e9$var$CONTENT_NAME
|
|
201
|
+
});
|
|
234
202
|
/* -------------------------------------------------------------------------------------------------
|
|
235
203
|
* ContextMenuGroup
|
|
236
204
|
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$GROUP_NAME = 'ContextMenuGroup';
|
|
@@ -270,19 +238,6 @@ const $5de197f6cd80e8e9$export$16a26dc176a49100 = /*#__PURE__*/ $l8XVT$react.for
|
|
|
270
238
|
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$16a26dc176a49100, {
|
|
271
239
|
displayName: $5de197f6cd80e8e9$var$ITEM_NAME
|
|
272
240
|
});
|
|
273
|
-
/* -------------------------------------------------------------------------------------------------
|
|
274
|
-
* ContextMenuTriggerItem
|
|
275
|
-
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$TRIGGER_ITEM_NAME = 'ContextMenuTriggerItem';
|
|
276
|
-
const $5de197f6cd80e8e9$export$105a322f21932c2b = /*#__PURE__*/ $l8XVT$react.forwardRef((props, forwardedRef)=>{
|
|
277
|
-
const { __scopeContextMenu: __scopeContextMenu , ...triggerItemProps } = props;
|
|
278
|
-
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
279
|
-
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.SubTrigger, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, triggerItemProps, {
|
|
280
|
-
ref: forwardedRef
|
|
281
|
-
}));
|
|
282
|
-
});
|
|
283
|
-
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$105a322f21932c2b, {
|
|
284
|
-
displayName: $5de197f6cd80e8e9$var$TRIGGER_ITEM_NAME
|
|
285
|
-
});
|
|
286
241
|
/* -------------------------------------------------------------------------------------------------
|
|
287
242
|
* ContextMenuCheckboxItem
|
|
288
243
|
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';
|
|
@@ -361,26 +316,78 @@ const $5de197f6cd80e8e9$export$f47d0a58228a61e2 = /*#__PURE__*/ $l8XVT$react.for
|
|
|
361
316
|
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$f47d0a58228a61e2, {
|
|
362
317
|
displayName: $5de197f6cd80e8e9$var$ARROW_NAME
|
|
363
318
|
});
|
|
319
|
+
/* -------------------------------------------------------------------------------------------------
|
|
320
|
+
* ContextMenuSub
|
|
321
|
+
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$SUB_NAME = 'ContextMenuSub';
|
|
322
|
+
const $5de197f6cd80e8e9$export$5bc21d1c00c4b201 = (props)=>{
|
|
323
|
+
const { __scopeContextMenu: __scopeContextMenu , children: children , onOpenChange: onOpenChange , open: openProp , defaultOpen: defaultOpen } = props;
|
|
324
|
+
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
325
|
+
const [open, setOpen] = $l8XVT$radixuireactusecontrollablestate.useControllableState({
|
|
326
|
+
prop: openProp,
|
|
327
|
+
defaultProp: defaultOpen,
|
|
328
|
+
onChange: onOpenChange
|
|
329
|
+
});
|
|
330
|
+
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.Sub, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, {
|
|
331
|
+
open: open,
|
|
332
|
+
onOpenChange: setOpen
|
|
333
|
+
}), children);
|
|
334
|
+
};
|
|
335
|
+
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$5bc21d1c00c4b201, {
|
|
336
|
+
displayName: $5de197f6cd80e8e9$var$SUB_NAME
|
|
337
|
+
});
|
|
338
|
+
/* -------------------------------------------------------------------------------------------------
|
|
339
|
+
* ContextMenuSubTrigger
|
|
340
|
+
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$SUB_TRIGGER_NAME = 'ContextMenuSubTrigger';
|
|
341
|
+
const $5de197f6cd80e8e9$export$30b2b5c64556d316 = /*#__PURE__*/ $l8XVT$react.forwardRef((props, forwardedRef)=>{
|
|
342
|
+
const { __scopeContextMenu: __scopeContextMenu , ...triggerItemProps } = props;
|
|
343
|
+
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
344
|
+
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.SubTrigger, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, triggerItemProps, {
|
|
345
|
+
ref: forwardedRef
|
|
346
|
+
}));
|
|
347
|
+
});
|
|
348
|
+
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$30b2b5c64556d316, {
|
|
349
|
+
displayName: $5de197f6cd80e8e9$var$SUB_TRIGGER_NAME
|
|
350
|
+
});
|
|
351
|
+
/* -------------------------------------------------------------------------------------------------
|
|
352
|
+
* ContextMenuSubContent
|
|
353
|
+
* -----------------------------------------------------------------------------------------------*/ const $5de197f6cd80e8e9$var$SUB_CONTENT_NAME = 'ContextMenuSubContent';
|
|
354
|
+
const $5de197f6cd80e8e9$export$2c967063bd2dc512 = /*#__PURE__*/ $l8XVT$react.forwardRef((props, forwardedRef)=>{
|
|
355
|
+
const { __scopeContextMenu: __scopeContextMenu , ...subContentProps } = props;
|
|
356
|
+
const menuScope = $5de197f6cd80e8e9$var$useMenuScope(__scopeContextMenu);
|
|
357
|
+
return /*#__PURE__*/ $l8XVT$react.createElement($l8XVT$radixuireactmenu.SubContent, ($parcel$interopDefault($l8XVT$babelruntimehelpersextends))({}, menuScope, subContentProps, {
|
|
358
|
+
ref: forwardedRef,
|
|
359
|
+
style: {
|
|
360
|
+
...props.style,
|
|
361
|
+
// re-namespace exposed content custom property
|
|
362
|
+
['--radix-context-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
|
363
|
+
}
|
|
364
|
+
}));
|
|
365
|
+
});
|
|
366
|
+
/*#__PURE__*/ Object.assign($5de197f6cd80e8e9$export$2c967063bd2dc512, {
|
|
367
|
+
displayName: $5de197f6cd80e8e9$var$SUB_CONTENT_NAME
|
|
368
|
+
});
|
|
364
369
|
/* -----------------------------------------------------------------------------------------------*/ function $5de197f6cd80e8e9$var$whenTouchOrPen(handler) {
|
|
365
370
|
return (event)=>event.pointerType !== 'mouse' ? handler(event) : undefined
|
|
366
371
|
;
|
|
367
372
|
}
|
|
368
373
|
const $5de197f6cd80e8e9$export$be92b6f5f03c0fe9 = $5de197f6cd80e8e9$export$8dc6765e8be191c7;
|
|
369
374
|
const $5de197f6cd80e8e9$export$41fb9f06171c75f4 = $5de197f6cd80e8e9$export$be6fc7b1d5b0beb9;
|
|
375
|
+
const $5de197f6cd80e8e9$export$602eac185826482c = $5de197f6cd80e8e9$export$14afd0be83e45060;
|
|
370
376
|
const $5de197f6cd80e8e9$export$7c6e2c02157bb7d2 = $5de197f6cd80e8e9$export$572205900c9369e;
|
|
371
377
|
const $5de197f6cd80e8e9$export$eb2fcfdbd7ba97d4 = $5de197f6cd80e8e9$export$9860523b0fcdd664;
|
|
372
378
|
const $5de197f6cd80e8e9$export$b04be29aa201d4f5 = $5de197f6cd80e8e9$export$d4b9d3b609a10742;
|
|
373
379
|
const $5de197f6cd80e8e9$export$6d08773d2e66f8f2 = $5de197f6cd80e8e9$export$16a26dc176a49100;
|
|
374
|
-
const $5de197f6cd80e8e9$export$6d0911d397e3b965 = $5de197f6cd80e8e9$export$105a322f21932c2b;
|
|
375
380
|
const $5de197f6cd80e8e9$export$16ce288f89fa631c = $5de197f6cd80e8e9$export$b6adbe51d5d8b7ec;
|
|
376
381
|
const $5de197f6cd80e8e9$export$a98f0dcb43a68a25 = $5de197f6cd80e8e9$export$db5c89af5ed9aa07;
|
|
377
382
|
const $5de197f6cd80e8e9$export$371ab307eab489c0 = $5de197f6cd80e8e9$export$8a727d09a7d9bfc2;
|
|
378
383
|
const $5de197f6cd80e8e9$export$c3468e2714d175fa = $5de197f6cd80e8e9$export$9ed8194dee42d94b;
|
|
379
384
|
const $5de197f6cd80e8e9$export$1ff3c3f08ae963c0 = $5de197f6cd80e8e9$export$8d6b009fadfe1207;
|
|
380
385
|
const $5de197f6cd80e8e9$export$21b07c8f274aebd5 = $5de197f6cd80e8e9$export$f47d0a58228a61e2;
|
|
386
|
+
const $5de197f6cd80e8e9$export$d7a01e11500dfb6f = $5de197f6cd80e8e9$export$5bc21d1c00c4b201;
|
|
387
|
+
const $5de197f6cd80e8e9$export$2ea8a7a591ac5eac = $5de197f6cd80e8e9$export$30b2b5c64556d316;
|
|
388
|
+
const $5de197f6cd80e8e9$export$6d4de93b380beddf = $5de197f6cd80e8e9$export$2c967063bd2dc512;
|
|
381
389
|
|
|
382
390
|
|
|
383
|
-
$parcel$exportWildcard(module.exports, $5de197f6cd80e8e9$exports);
|
|
384
391
|
|
|
385
392
|
|
|
386
393
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;ACcA;;oGAEA,CAEA,MAAMO,uCAAiB,GAAG,aAA1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MwB,yCAAa,GAAGrB,yCAAtB,AAAA;AACA,MAAMsB,yCAAS,GAAGnB,yCAAlB,AAAA;AACA,MAAMoB,yCAAK,GAAGjB,yCAAd,AAAA;;ADzdA","sources":["packages/react/context-menu/src/index.ts","packages/react/context-menu/src/ContextMenu.tsx"],"sourcesContent":["export * from './ContextMenu';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ntype ContextMenuContextValue = {\n isRootMenu: boolean;\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n};\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;\n const [open, setOpen] = React.useState(false);\n const contentContext = useContentContext(CONTEXT_MENU_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n setOpen(open);\n handleOpenChangeProp(open);\n },\n [handleOpenChangeProp]\n );\n\n return contentContext.isInsideContent ? (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n isRootMenu={false}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={handleOpenChange}>\n {children}\n </MenuPrimitive.Sub>\n </ContextMenuProvider>\n ) : (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n isRootMenu={true}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n dir={dir}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\nContextMenu.displayName = CONTEXT_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {}\n\nconst ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMenuTriggerProps>(\n (props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const pointRef = React.useRef<Point>({ x: 0, y: 0 });\n const virtualRef = React.useRef({\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }),\n });\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n []\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n pointRef.current = { x: event.clientX, y: event.clientY };\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n\n return (\n <ContentProvider scope={__scopeContextMenu} isInsideContent={false}>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n onContextMenu={composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n event.preventDefault();\n handleOpen(event);\n })}\n onPointerDown={composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n })\n )}\n onPointerMove={composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))}\n onPointerCancel={composeEventHandlers(\n props.onPointerCancel,\n whenTouchOrPen(clearLongPress)\n )}\n onPointerUp={composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))}\n />\n </ContentProvider>\n );\n }\n);\n\nContextMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\nconst [ContentProvider, useContentContext] = createContextMenuContext(CONTENT_NAME, {\n isInsideContent: false,\n});\n\ntype ContextMenuContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<MenuContentProps, 'portalled' | 'side' | 'align'> {}\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n (props: ScopedProps<ContextMenuContentProps>, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n\n const commonProps = {\n ...contentProps,\n style: {\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-context-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n },\n };\n\n return (\n <ContentProvider scope={__scopeContextMenu} isInsideContent={true}>\n {context.isRootMenu ? (\n <ContextMenuRootContent\n __scopeContextMenu={__scopeContextMenu}\n {...commonProps}\n ref={forwardedRef}\n />\n ) : (\n <MenuPrimitive.Content {...menuScope} {...commonProps} ref={forwardedRef} />\n )}\n </ContentProvider>\n );\n }\n);\n\nContextMenuContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype ContextMenuRootContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuRootContentProps extends ScopedProps<MenuContentProps> {}\n\nconst ContextMenuRootContent = React.forwardRef<\n ContextMenuRootContentElement,\n ContextMenuRootContentProps\n>((props, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n portalled\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n />\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'ContextMenuGroup';\n\ntype ContextMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = React.forwardRef<ContextMenuGroupElement, ContextMenuGroupProps>(\n (props: ScopedProps<ContextMenuGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'ContextMenuLabel';\n\ntype ContextMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n (props: ScopedProps<ContextMenuLabelProps>, forwardedRef) => {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ContextMenuItem';\n\ntype ContextMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n (props: ScopedProps<ContextMenuItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTriggerItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_ITEM_NAME = 'ContextMenuTriggerItem';\n\ntype ContextMenuTriggerItemElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuTriggerItemProps extends MenuSubTriggerProps {}\n\nconst ContextMenuTriggerItem = React.forwardRef<\n ContextMenuTriggerItemElement,\n ContextMenuTriggerItemProps\n>((props: ScopedProps<ContextMenuTriggerItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\nContextMenuTriggerItem.displayName = TRIGGER_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'ContextMenuRadioGroup';\n\ntype ContextMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>((props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'ContextMenuRadioItem';\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ContextMenuItemIndicator';\n\ntype ContextMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>((props: ScopedProps<ContextMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nContextMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ContextMenuSeparator';\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>((props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nContextMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'ContextMenuArrow';\n\ntype ContextMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n (props: ScopedProps<ContextMenuArrowProps>, forwardedRef) => {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst TriggerItem = ContextMenuTriggerItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuTriggerItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n //\n Root,\n Trigger,\n Content,\n Group,\n Label,\n Item,\n TriggerItem,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuTriggerItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n};\n"],"names":["React","composeEventHandlers","createContextScope","Primitive","MenuPrimitive","createMenuScope","useCallbackRef","CONTEXT_MENU_NAME","createContextMenuContext","createContextMenuScope","useMenuScope","ContextMenuProvider","useContextMenuContext","ContextMenu","props","__scopeContextMenu","children","onOpenChange","dir","modal","open","setOpen","useState","contentContext","useContentContext","menuScope","handleOpenChangeProp","handleOpenChange","useCallback","isInsideContent","TRIGGER_NAME","ContextMenuTrigger","forwardRef","forwardedRef","triggerProps","context","pointRef","useRef","x","y","virtualRef","getBoundingClientRect","DOMRect","fromRect","width","height","current","longPressTimerRef","clearLongPress","window","clearTimeout","handleOpen","event","clientX","clientY","useEffect","WebkitTouchCallout","style","onContextMenu","preventDefault","onPointerDown","whenTouchOrPen","setTimeout","onPointerMove","onPointerCancel","onPointerUp","CONTENT_NAME","ContentProvider","ContextMenuContent","contentProps","commonProps","isRootMenu","ContextMenuRootContent","hasInteractedOutsideRef","onCloseAutoFocus","defaultPrevented","onInteractOutside","GROUP_NAME","ContextMenuGroup","groupProps","LABEL_NAME","ContextMenuLabel","labelProps","ITEM_NAME","ContextMenuItem","itemProps","TRIGGER_ITEM_NAME","ContextMenuTriggerItem","triggerItemProps","CHECKBOX_ITEM_NAME","ContextMenuCheckboxItem","checkboxItemProps","RADIO_GROUP_NAME","ContextMenuRadioGroup","radioGroupProps","RADIO_ITEM_NAME","ContextMenuRadioItem","radioItemProps","INDICATOR_NAME","ContextMenuItemIndicator","itemIndicatorProps","SEPARATOR_NAME","ContextMenuSeparator","separatorProps","ARROW_NAME","ContextMenuArrow","arrowProps","handler","pointerType","undefined","Root","Trigger","Content","Group","Label","Item","TriggerItem","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow"],"version":3,"file":"index.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;ACeA;;oGAEA,CAEA,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AK,CAACmD,WAAN,KAAsB,OAAtB,GAAgCD,OAAO,CAAClD,KAAD,CAAvC,GAAiDoD,SAApE;IAAA,CAAA;CACD;AAED,MAAMnH,yCAAI,GAAGhB,yCAAb,AAAA;AACA,MAAMiB,yCAAO,GAAGhB,yCAAhB,AAAA;AACA,MAAMiB,yCAAM,GAAGhB,yCAAf,AAAA;AACA,MAAMiB,yCAAO,GAAGhB,wCAAhB,AAAA;AACA,MAAMiB,yCAAK,GAAGhB,yCAAd,AAAA;AACA,MAAMiB,yCAAK,GAAGhB,yCAAd,AAAA;AACA,MAAMiB,yCAAI,GAAGhB,yCAAb,AAAA;AACA,MAAMiB,yCAAY,GAAGhB,yCAArB,AAAA;AACA,MAAMiB,yCAAU,GAAGhB,yCAAnB,AAAA;AACA,MAAMiB,yCAAS,GAAGhB,yCAAlB,AAAA;AACA,MAAMiB,yCAAa,GAAGhB,yCAAtB,AAAA;AACA,MAAMiB,yCAAS,GAAGhB,yCAAlB,AAAA;AACA,MAAMiB,yCAAK,GAAGhB,yCAAd,AAAA;AACA,MAAMiB,yCAAG,GAAGhB,yCAAZ,AAAA;AACA,MAAMiB,yCAAU,GAAGhB,yCAAnB,AAAA;AACA,MAAMiB,yCAAU,GAAGhB,yCAAnB,AAAA;;AD/fA","sources":["packages/react/context-menu/src/index.ts","packages/react/context-menu/src/ContextMenu.tsx"],"sourcesContent":["export {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './ContextMenu';\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n} from './ContextMenu';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ntype ContextMenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n};\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;\n const [open, setOpen] = React.useState(false);\n const menuScope = useMenuScope(__scopeContextMenu);\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n setOpen(open);\n handleOpenChangeProp(open);\n },\n [handleOpenChangeProp]\n );\n\n return (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n dir={dir}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\nContextMenu.displayName = CONTEXT_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {}\n\nconst ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMenuTriggerProps>(\n (props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const pointRef = React.useRef<Point>({ x: 0, y: 0 });\n const virtualRef = React.useRef({\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }),\n });\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n []\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n pointRef.current = { x: event.clientX, y: event.clientY };\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n\n return (\n <>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n data-state={context.open ? 'open' : 'closed'}\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n onContextMenu={composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })}\n onPointerDown={composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n })\n )}\n onPointerMove={composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))}\n onPointerCancel={composeEventHandlers(\n props.onPointerCancel,\n whenTouchOrPen(clearLongPress)\n )}\n onPointerUp={composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))}\n />\n </>\n );\n }\n);\n\nContextMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'ContextMenuPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC<ContextMenuPortalProps> = (\n props: ScopedProps<ContextMenuPortalProps>\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nContextMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<MenuContentProps, 'side' | 'sideOffset' | 'align'> {}\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n (props: ScopedProps<ContextMenuContentProps>, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-context-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n }\n);\n\nContextMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'ContextMenuGroup';\n\ntype ContextMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = React.forwardRef<ContextMenuGroupElement, ContextMenuGroupProps>(\n (props: ScopedProps<ContextMenuGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'ContextMenuLabel';\n\ntype ContextMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n (props: ScopedProps<ContextMenuLabelProps>, forwardedRef) => {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ContextMenuItem';\n\ntype ContextMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n (props: ScopedProps<ContextMenuItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'ContextMenuRadioGroup';\n\ntype ContextMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>((props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'ContextMenuRadioItem';\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ContextMenuItemIndicator';\n\ntype ContextMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>((props: ScopedProps<ContextMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nContextMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ContextMenuSeparator';\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>((props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nContextMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'ContextMenuArrow';\n\ntype ContextMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n (props: ScopedProps<ContextMenuArrowProps>, forwardedRef) => {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props: ScopedProps<ContextMenuSubProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\nContextMenuSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'ContextMenuSubTrigger';\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>((props: ScopedProps<ContextMenuSubTriggerProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\nContextMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'ContextMenuSubContent';\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>((props: ScopedProps<ContextMenuSubContentProps>, forwardedRef) => {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-context-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n});\n\nContextMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Portal = ContextMenuPortal;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\nconst Sub = ContextMenuSub;\nconst SubTrigger = ContextMenuSubTrigger;\nconst SubContent = ContextMenuSubContent;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"],"names":["createContextMenuScope","ContextMenu","ContextMenuTrigger","ContextMenuPortal","ContextMenuContent","ContextMenuGroup","ContextMenuLabel","ContextMenuItem","ContextMenuCheckboxItem","ContextMenuRadioGroup","ContextMenuRadioItem","ContextMenuItemIndicator","ContextMenuSeparator","ContextMenuArrow","ContextMenuSub","ContextMenuSubTrigger","ContextMenuSubContent","Root","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent","React","composeEventHandlers","createContextScope","Primitive","MenuPrimitive","createMenuScope","useCallbackRef","useControllableState","CONTEXT_MENU_NAME","createContextMenuContext","useMenuScope","ContextMenuProvider","useContextMenuContext","props","__scopeContextMenu","children","onOpenChange","dir","modal","open","setOpen","useState","menuScope","handleOpenChangeProp","handleOpenChange","useCallback","TRIGGER_NAME","forwardRef","forwardedRef","triggerProps","context","pointRef","useRef","x","y","virtualRef","getBoundingClientRect","DOMRect","fromRect","width","height","current","longPressTimerRef","clearLongPress","window","clearTimeout","handleOpen","event","clientX","clientY","useEffect","WebkitTouchCallout","style","onContextMenu","preventDefault","onPointerDown","whenTouchOrPen","setTimeout","onPointerMove","onPointerCancel","onPointerUp","PORTAL_NAME","portalProps","CONTENT_NAME","contentProps","hasInteractedOutsideRef","onCloseAutoFocus","defaultPrevented","onInteractOutside","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","SUB_NAME","openProp","defaultOpen","prop","defaultProp","onChange","SUB_TRIGGER_NAME","triggerItemProps","SUB_CONTENT_NAME","subContentProps","handler","pointerType","undefined"],"version":3,"file":"index.js.map"}
|
package/dist/index.module.js
CHANGED
|
@@ -1,43 +1,13 @@
|
|
|
1
1
|
import $3TiJz$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import {useState as $3TiJz$useState, useCallback as $3TiJz$useCallback, createElement as $3TiJz$createElement, forwardRef as $3TiJz$forwardRef, useRef as $3TiJz$useRef, useEffect as $3TiJz$useEffect} from "react";
|
|
2
|
+
import {useState as $3TiJz$useState, useCallback as $3TiJz$useCallback, createElement as $3TiJz$createElement, forwardRef as $3TiJz$forwardRef, useRef as $3TiJz$useRef, useEffect as $3TiJz$useEffect, Fragment as $3TiJz$Fragment} from "react";
|
|
3
3
|
import {composeEventHandlers as $3TiJz$composeEventHandlers} from "@radix-ui/primitive";
|
|
4
4
|
import {createContextScope as $3TiJz$createContextScope} from "@radix-ui/react-context";
|
|
5
5
|
import {Primitive as $3TiJz$Primitive} from "@radix-ui/react-primitive";
|
|
6
|
-
import {createMenuScope as $3TiJz$createMenuScope,
|
|
6
|
+
import {createMenuScope as $3TiJz$createMenuScope, Root as $3TiJz$Root, Anchor as $3TiJz$Anchor, Portal as $3TiJz$Portal, Content as $3TiJz$Content, Group as $3TiJz$Group, Label as $3TiJz$Label, Item as $3TiJz$Item, CheckboxItem as $3TiJz$CheckboxItem, RadioGroup as $3TiJz$RadioGroup, RadioItem as $3TiJz$RadioItem, ItemIndicator as $3TiJz$ItemIndicator, Separator as $3TiJz$Separator, Arrow as $3TiJz$Arrow, Sub as $3TiJz$Sub, SubTrigger as $3TiJz$SubTrigger, SubContent as $3TiJz$SubContent} from "@radix-ui/react-menu";
|
|
7
7
|
import {useCallbackRef as $3TiJz$useCallbackRef} from "@radix-ui/react-use-callback-ref";
|
|
8
|
+
import {useControllableState as $3TiJz$useControllableState} from "@radix-ui/react-use-controllable-state";
|
|
8
9
|
|
|
9
|
-
function $parcel$export(e, n, v, s) {
|
|
10
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
11
|
-
}
|
|
12
|
-
var $1b0217ee4a91d156$exports = {};
|
|
13
10
|
|
|
14
|
-
$parcel$export($1b0217ee4a91d156$exports, "createContextMenuScope", () => $1b0217ee4a91d156$export$1059331f43ddcc82);
|
|
15
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenu", () => $1b0217ee4a91d156$export$8dc6765e8be191c7);
|
|
16
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuTrigger", () => $1b0217ee4a91d156$export$be6fc7b1d5b0beb9);
|
|
17
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuContent", () => $1b0217ee4a91d156$export$572205900c9369e);
|
|
18
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuGroup", () => $1b0217ee4a91d156$export$9860523b0fcdd664);
|
|
19
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuLabel", () => $1b0217ee4a91d156$export$d4b9d3b609a10742);
|
|
20
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuItem", () => $1b0217ee4a91d156$export$16a26dc176a49100);
|
|
21
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuTriggerItem", () => $1b0217ee4a91d156$export$105a322f21932c2b);
|
|
22
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuCheckboxItem", () => $1b0217ee4a91d156$export$b6adbe51d5d8b7ec);
|
|
23
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuRadioGroup", () => $1b0217ee4a91d156$export$db5c89af5ed9aa07);
|
|
24
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuRadioItem", () => $1b0217ee4a91d156$export$8a727d09a7d9bfc2);
|
|
25
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuItemIndicator", () => $1b0217ee4a91d156$export$9ed8194dee42d94b);
|
|
26
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuSeparator", () => $1b0217ee4a91d156$export$8d6b009fadfe1207);
|
|
27
|
-
$parcel$export($1b0217ee4a91d156$exports, "ContextMenuArrow", () => $1b0217ee4a91d156$export$f47d0a58228a61e2);
|
|
28
|
-
$parcel$export($1b0217ee4a91d156$exports, "Root", () => $1b0217ee4a91d156$export$be92b6f5f03c0fe9);
|
|
29
|
-
$parcel$export($1b0217ee4a91d156$exports, "Trigger", () => $1b0217ee4a91d156$export$41fb9f06171c75f4);
|
|
30
|
-
$parcel$export($1b0217ee4a91d156$exports, "Content", () => $1b0217ee4a91d156$export$7c6e2c02157bb7d2);
|
|
31
|
-
$parcel$export($1b0217ee4a91d156$exports, "Group", () => $1b0217ee4a91d156$export$eb2fcfdbd7ba97d4);
|
|
32
|
-
$parcel$export($1b0217ee4a91d156$exports, "Label", () => $1b0217ee4a91d156$export$b04be29aa201d4f5);
|
|
33
|
-
$parcel$export($1b0217ee4a91d156$exports, "Item", () => $1b0217ee4a91d156$export$6d08773d2e66f8f2);
|
|
34
|
-
$parcel$export($1b0217ee4a91d156$exports, "TriggerItem", () => $1b0217ee4a91d156$export$6d0911d397e3b965);
|
|
35
|
-
$parcel$export($1b0217ee4a91d156$exports, "CheckboxItem", () => $1b0217ee4a91d156$export$16ce288f89fa631c);
|
|
36
|
-
$parcel$export($1b0217ee4a91d156$exports, "RadioGroup", () => $1b0217ee4a91d156$export$a98f0dcb43a68a25);
|
|
37
|
-
$parcel$export($1b0217ee4a91d156$exports, "RadioItem", () => $1b0217ee4a91d156$export$371ab307eab489c0);
|
|
38
|
-
$parcel$export($1b0217ee4a91d156$exports, "ItemIndicator", () => $1b0217ee4a91d156$export$c3468e2714d175fa);
|
|
39
|
-
$parcel$export($1b0217ee4a91d156$exports, "Separator", () => $1b0217ee4a91d156$export$1ff3c3f08ae963c0);
|
|
40
|
-
$parcel$export($1b0217ee4a91d156$exports, "Arrow", () => $1b0217ee4a91d156$export$21b07c8f274aebd5);
|
|
41
11
|
|
|
42
12
|
|
|
43
13
|
|
|
@@ -57,7 +27,6 @@ const [$1b0217ee4a91d156$var$ContextMenuProvider, $1b0217ee4a91d156$var$useConte
|
|
|
57
27
|
const $1b0217ee4a91d156$export$8dc6765e8be191c7 = (props)=>{
|
|
58
28
|
const { __scopeContextMenu: __scopeContextMenu , children: children , onOpenChange: onOpenChange , dir: dir , modal: modal = true } = props;
|
|
59
29
|
const [open1, setOpen] = $3TiJz$useState(false);
|
|
60
|
-
const contentContext = $1b0217ee4a91d156$var$useContentContext($1b0217ee4a91d156$var$CONTEXT_MENU_NAME, __scopeContextMenu);
|
|
61
30
|
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
62
31
|
const handleOpenChangeProp = $3TiJz$useCallbackRef(onOpenChange);
|
|
63
32
|
const handleOpenChange = $3TiJz$useCallback((open)=>{
|
|
@@ -66,18 +35,8 @@ const $1b0217ee4a91d156$export$8dc6765e8be191c7 = (props)=>{
|
|
|
66
35
|
}, [
|
|
67
36
|
handleOpenChangeProp
|
|
68
37
|
]);
|
|
69
|
-
return
|
|
38
|
+
return /*#__PURE__*/ $3TiJz$createElement($1b0217ee4a91d156$var$ContextMenuProvider, {
|
|
70
39
|
scope: __scopeContextMenu,
|
|
71
|
-
isRootMenu: false,
|
|
72
|
-
open: open1,
|
|
73
|
-
onOpenChange: handleOpenChange,
|
|
74
|
-
modal: modal
|
|
75
|
-
}, /*#__PURE__*/ $3TiJz$createElement($3TiJz$Sub, $3TiJz$babelruntimehelpersesmextends({}, menuScope, {
|
|
76
|
-
open: open1,
|
|
77
|
-
onOpenChange: handleOpenChange
|
|
78
|
-
}), children)) : /*#__PURE__*/ $3TiJz$createElement($1b0217ee4a91d156$var$ContextMenuProvider, {
|
|
79
|
-
scope: __scopeContextMenu,
|
|
80
|
-
isRootMenu: true,
|
|
81
40
|
open: open1,
|
|
82
41
|
onOpenChange: handleOpenChange,
|
|
83
42
|
modal: modal
|
|
@@ -123,12 +82,11 @@ const $1b0217ee4a91d156$export$be6fc7b1d5b0beb9 = /*#__PURE__*/ $3TiJz$forwardRe
|
|
|
123
82
|
, [
|
|
124
83
|
clearLongPress
|
|
125
84
|
]);
|
|
126
|
-
return /*#__PURE__*/ $3TiJz$createElement($
|
|
127
|
-
scope: __scopeContextMenu,
|
|
128
|
-
isInsideContent: false
|
|
129
|
-
}, /*#__PURE__*/ $3TiJz$createElement($3TiJz$Anchor, $3TiJz$babelruntimehelpersesmextends({}, menuScope, {
|
|
85
|
+
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$Fragment, null, /*#__PURE__*/ $3TiJz$createElement($3TiJz$Anchor, $3TiJz$babelruntimehelpersesmextends({}, menuScope, {
|
|
130
86
|
virtualRef: virtualRef
|
|
131
|
-
})), /*#__PURE__*/ $3TiJz$createElement($3TiJz$Primitive.span, $3TiJz$babelruntimehelpersesmextends({
|
|
87
|
+
})), /*#__PURE__*/ $3TiJz$createElement($3TiJz$Primitive.span, $3TiJz$babelruntimehelpersesmextends({
|
|
88
|
+
"data-state": context.open ? 'open' : 'closed'
|
|
89
|
+
}, triggerProps, {
|
|
132
90
|
ref: forwardedRef // prevent iOS context menu from appearing
|
|
133
91
|
,
|
|
134
92
|
style: {
|
|
@@ -139,8 +97,8 @@ const $1b0217ee4a91d156$export$be6fc7b1d5b0beb9 = /*#__PURE__*/ $3TiJz$forwardRe
|
|
|
139
97
|
// clearing the long press here because some platforms already support
|
|
140
98
|
// long press to trigger a `contextmenu` event
|
|
141
99
|
clearLongPress();
|
|
142
|
-
event.preventDefault();
|
|
143
100
|
handleOpen(event);
|
|
101
|
+
event.preventDefault();
|
|
144
102
|
}),
|
|
145
103
|
onPointerDown: $3TiJz$composeEventHandlers(props.onPointerDown, $1b0217ee4a91d156$var$whenTouchOrPen((event)=>{
|
|
146
104
|
// clear the long press here in case there's multiple touch points
|
|
@@ -156,46 +114,27 @@ const $1b0217ee4a91d156$export$be6fc7b1d5b0beb9 = /*#__PURE__*/ $3TiJz$forwardRe
|
|
|
156
114
|
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$be6fc7b1d5b0beb9, {
|
|
157
115
|
displayName: $1b0217ee4a91d156$var$TRIGGER_NAME
|
|
158
116
|
});
|
|
117
|
+
/* -------------------------------------------------------------------------------------------------
|
|
118
|
+
* ContextMenuPortal
|
|
119
|
+
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$PORTAL_NAME = 'ContextMenuPortal';
|
|
120
|
+
const $1b0217ee4a91d156$export$14afd0be83e45060 = (props)=>{
|
|
121
|
+
const { __scopeContextMenu: __scopeContextMenu , ...portalProps } = props;
|
|
122
|
+
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
123
|
+
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$Portal, $3TiJz$babelruntimehelpersesmextends({}, menuScope, portalProps));
|
|
124
|
+
};
|
|
125
|
+
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$14afd0be83e45060, {
|
|
126
|
+
displayName: $1b0217ee4a91d156$var$PORTAL_NAME
|
|
127
|
+
});
|
|
159
128
|
/* -------------------------------------------------------------------------------------------------
|
|
160
129
|
* ContextMenuContent
|
|
161
130
|
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$CONTENT_NAME = 'ContextMenuContent';
|
|
162
|
-
const [$1b0217ee4a91d156$var$ContentProvider, $1b0217ee4a91d156$var$useContentContext] = $1b0217ee4a91d156$var$createContextMenuContext($1b0217ee4a91d156$var$CONTENT_NAME, {
|
|
163
|
-
isInsideContent: false
|
|
164
|
-
});
|
|
165
131
|
const $1b0217ee4a91d156$export$572205900c9369e = /*#__PURE__*/ $3TiJz$forwardRef((props, forwardedRef)=>{
|
|
166
|
-
const { __scopeContextMenu: __scopeContextMenu , ...contentProps } = props;
|
|
167
|
-
const context = $1b0217ee4a91d156$var$useContextMenuContext($1b0217ee4a91d156$var$CONTENT_NAME, __scopeContextMenu);
|
|
168
|
-
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
169
|
-
const commonProps = {
|
|
170
|
-
...contentProps,
|
|
171
|
-
style: {
|
|
172
|
-
...props.style,
|
|
173
|
-
// re-namespace exposed content custom property
|
|
174
|
-
['--radix-context-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
return /*#__PURE__*/ $3TiJz$createElement($1b0217ee4a91d156$var$ContentProvider, {
|
|
178
|
-
scope: __scopeContextMenu,
|
|
179
|
-
isInsideContent: true
|
|
180
|
-
}, context.isRootMenu ? /*#__PURE__*/ $3TiJz$createElement($1b0217ee4a91d156$var$ContextMenuRootContent, $3TiJz$babelruntimehelpersesmextends({
|
|
181
|
-
__scopeContextMenu: __scopeContextMenu
|
|
182
|
-
}, commonProps, {
|
|
183
|
-
ref: forwardedRef
|
|
184
|
-
})) : /*#__PURE__*/ $3TiJz$createElement($3TiJz$Content, $3TiJz$babelruntimehelpersesmextends({}, menuScope, commonProps, {
|
|
185
|
-
ref: forwardedRef
|
|
186
|
-
})));
|
|
187
|
-
});
|
|
188
|
-
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$572205900c9369e, {
|
|
189
|
-
displayName: $1b0217ee4a91d156$var$CONTENT_NAME
|
|
190
|
-
});
|
|
191
|
-
/* ---------------------------------------------------------------------------------------------- */ const $1b0217ee4a91d156$var$ContextMenuRootContent = /*#__PURE__*/ $3TiJz$forwardRef((props, forwardedRef)=>{
|
|
192
132
|
const { __scopeContextMenu: __scopeContextMenu , ...contentProps } = props;
|
|
193
133
|
const context = $1b0217ee4a91d156$var$useContextMenuContext($1b0217ee4a91d156$var$CONTENT_NAME, __scopeContextMenu);
|
|
194
134
|
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
195
135
|
const hasInteractedOutsideRef = $3TiJz$useRef(false);
|
|
196
136
|
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$Content, $3TiJz$babelruntimehelpersesmextends({}, menuScope, contentProps, {
|
|
197
137
|
ref: forwardedRef,
|
|
198
|
-
portalled: true,
|
|
199
138
|
side: "right",
|
|
200
139
|
sideOffset: 2,
|
|
201
140
|
align: "start",
|
|
@@ -209,9 +148,17 @@ const $1b0217ee4a91d156$export$572205900c9369e = /*#__PURE__*/ $3TiJz$forwardRef
|
|
|
209
148
|
var _props$onInteractOuts;
|
|
210
149
|
(_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
|
|
211
150
|
if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;
|
|
151
|
+
},
|
|
152
|
+
style: {
|
|
153
|
+
...props.style,
|
|
154
|
+
// re-namespace exposed content custom property
|
|
155
|
+
['--radix-context-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
|
212
156
|
}
|
|
213
157
|
}));
|
|
214
158
|
});
|
|
159
|
+
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$572205900c9369e, {
|
|
160
|
+
displayName: $1b0217ee4a91d156$var$CONTENT_NAME
|
|
161
|
+
});
|
|
215
162
|
/* -------------------------------------------------------------------------------------------------
|
|
216
163
|
* ContextMenuGroup
|
|
217
164
|
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$GROUP_NAME = 'ContextMenuGroup';
|
|
@@ -251,19 +198,6 @@ const $1b0217ee4a91d156$export$16a26dc176a49100 = /*#__PURE__*/ $3TiJz$forwardRe
|
|
|
251
198
|
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$16a26dc176a49100, {
|
|
252
199
|
displayName: $1b0217ee4a91d156$var$ITEM_NAME
|
|
253
200
|
});
|
|
254
|
-
/* -------------------------------------------------------------------------------------------------
|
|
255
|
-
* ContextMenuTriggerItem
|
|
256
|
-
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$TRIGGER_ITEM_NAME = 'ContextMenuTriggerItem';
|
|
257
|
-
const $1b0217ee4a91d156$export$105a322f21932c2b = /*#__PURE__*/ $3TiJz$forwardRef((props, forwardedRef)=>{
|
|
258
|
-
const { __scopeContextMenu: __scopeContextMenu , ...triggerItemProps } = props;
|
|
259
|
-
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
260
|
-
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$SubTrigger, $3TiJz$babelruntimehelpersesmextends({}, menuScope, triggerItemProps, {
|
|
261
|
-
ref: forwardedRef
|
|
262
|
-
}));
|
|
263
|
-
});
|
|
264
|
-
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$105a322f21932c2b, {
|
|
265
|
-
displayName: $1b0217ee4a91d156$var$TRIGGER_ITEM_NAME
|
|
266
|
-
});
|
|
267
201
|
/* -------------------------------------------------------------------------------------------------
|
|
268
202
|
* ContextMenuCheckboxItem
|
|
269
203
|
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';
|
|
@@ -342,26 +276,79 @@ const $1b0217ee4a91d156$export$f47d0a58228a61e2 = /*#__PURE__*/ $3TiJz$forwardRe
|
|
|
342
276
|
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$f47d0a58228a61e2, {
|
|
343
277
|
displayName: $1b0217ee4a91d156$var$ARROW_NAME
|
|
344
278
|
});
|
|
279
|
+
/* -------------------------------------------------------------------------------------------------
|
|
280
|
+
* ContextMenuSub
|
|
281
|
+
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$SUB_NAME = 'ContextMenuSub';
|
|
282
|
+
const $1b0217ee4a91d156$export$5bc21d1c00c4b201 = (props)=>{
|
|
283
|
+
const { __scopeContextMenu: __scopeContextMenu , children: children , onOpenChange: onOpenChange , open: openProp , defaultOpen: defaultOpen } = props;
|
|
284
|
+
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
285
|
+
const [open, setOpen] = $3TiJz$useControllableState({
|
|
286
|
+
prop: openProp,
|
|
287
|
+
defaultProp: defaultOpen,
|
|
288
|
+
onChange: onOpenChange
|
|
289
|
+
});
|
|
290
|
+
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$Sub, $3TiJz$babelruntimehelpersesmextends({}, menuScope, {
|
|
291
|
+
open: open,
|
|
292
|
+
onOpenChange: setOpen
|
|
293
|
+
}), children);
|
|
294
|
+
};
|
|
295
|
+
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$5bc21d1c00c4b201, {
|
|
296
|
+
displayName: $1b0217ee4a91d156$var$SUB_NAME
|
|
297
|
+
});
|
|
298
|
+
/* -------------------------------------------------------------------------------------------------
|
|
299
|
+
* ContextMenuSubTrigger
|
|
300
|
+
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$SUB_TRIGGER_NAME = 'ContextMenuSubTrigger';
|
|
301
|
+
const $1b0217ee4a91d156$export$30b2b5c64556d316 = /*#__PURE__*/ $3TiJz$forwardRef((props, forwardedRef)=>{
|
|
302
|
+
const { __scopeContextMenu: __scopeContextMenu , ...triggerItemProps } = props;
|
|
303
|
+
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
304
|
+
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$SubTrigger, $3TiJz$babelruntimehelpersesmextends({}, menuScope, triggerItemProps, {
|
|
305
|
+
ref: forwardedRef
|
|
306
|
+
}));
|
|
307
|
+
});
|
|
308
|
+
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$30b2b5c64556d316, {
|
|
309
|
+
displayName: $1b0217ee4a91d156$var$SUB_TRIGGER_NAME
|
|
310
|
+
});
|
|
311
|
+
/* -------------------------------------------------------------------------------------------------
|
|
312
|
+
* ContextMenuSubContent
|
|
313
|
+
* -----------------------------------------------------------------------------------------------*/ const $1b0217ee4a91d156$var$SUB_CONTENT_NAME = 'ContextMenuSubContent';
|
|
314
|
+
const $1b0217ee4a91d156$export$2c967063bd2dc512 = /*#__PURE__*/ $3TiJz$forwardRef((props, forwardedRef)=>{
|
|
315
|
+
const { __scopeContextMenu: __scopeContextMenu , ...subContentProps } = props;
|
|
316
|
+
const menuScope = $1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);
|
|
317
|
+
return /*#__PURE__*/ $3TiJz$createElement($3TiJz$SubContent, $3TiJz$babelruntimehelpersesmextends({}, menuScope, subContentProps, {
|
|
318
|
+
ref: forwardedRef,
|
|
319
|
+
style: {
|
|
320
|
+
...props.style,
|
|
321
|
+
// re-namespace exposed content custom property
|
|
322
|
+
['--radix-context-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
|
323
|
+
}
|
|
324
|
+
}));
|
|
325
|
+
});
|
|
326
|
+
/*#__PURE__*/ Object.assign($1b0217ee4a91d156$export$2c967063bd2dc512, {
|
|
327
|
+
displayName: $1b0217ee4a91d156$var$SUB_CONTENT_NAME
|
|
328
|
+
});
|
|
345
329
|
/* -----------------------------------------------------------------------------------------------*/ function $1b0217ee4a91d156$var$whenTouchOrPen(handler) {
|
|
346
330
|
return (event)=>event.pointerType !== 'mouse' ? handler(event) : undefined
|
|
347
331
|
;
|
|
348
332
|
}
|
|
349
333
|
const $1b0217ee4a91d156$export$be92b6f5f03c0fe9 = $1b0217ee4a91d156$export$8dc6765e8be191c7;
|
|
350
334
|
const $1b0217ee4a91d156$export$41fb9f06171c75f4 = $1b0217ee4a91d156$export$be6fc7b1d5b0beb9;
|
|
335
|
+
const $1b0217ee4a91d156$export$602eac185826482c = $1b0217ee4a91d156$export$14afd0be83e45060;
|
|
351
336
|
const $1b0217ee4a91d156$export$7c6e2c02157bb7d2 = $1b0217ee4a91d156$export$572205900c9369e;
|
|
352
337
|
const $1b0217ee4a91d156$export$eb2fcfdbd7ba97d4 = $1b0217ee4a91d156$export$9860523b0fcdd664;
|
|
353
338
|
const $1b0217ee4a91d156$export$b04be29aa201d4f5 = $1b0217ee4a91d156$export$d4b9d3b609a10742;
|
|
354
339
|
const $1b0217ee4a91d156$export$6d08773d2e66f8f2 = $1b0217ee4a91d156$export$16a26dc176a49100;
|
|
355
|
-
const $1b0217ee4a91d156$export$6d0911d397e3b965 = $1b0217ee4a91d156$export$105a322f21932c2b;
|
|
356
340
|
const $1b0217ee4a91d156$export$16ce288f89fa631c = $1b0217ee4a91d156$export$b6adbe51d5d8b7ec;
|
|
357
341
|
const $1b0217ee4a91d156$export$a98f0dcb43a68a25 = $1b0217ee4a91d156$export$db5c89af5ed9aa07;
|
|
358
342
|
const $1b0217ee4a91d156$export$371ab307eab489c0 = $1b0217ee4a91d156$export$8a727d09a7d9bfc2;
|
|
359
343
|
const $1b0217ee4a91d156$export$c3468e2714d175fa = $1b0217ee4a91d156$export$9ed8194dee42d94b;
|
|
360
344
|
const $1b0217ee4a91d156$export$1ff3c3f08ae963c0 = $1b0217ee4a91d156$export$8d6b009fadfe1207;
|
|
361
345
|
const $1b0217ee4a91d156$export$21b07c8f274aebd5 = $1b0217ee4a91d156$export$f47d0a58228a61e2;
|
|
346
|
+
const $1b0217ee4a91d156$export$d7a01e11500dfb6f = $1b0217ee4a91d156$export$5bc21d1c00c4b201;
|
|
347
|
+
const $1b0217ee4a91d156$export$2ea8a7a591ac5eac = $1b0217ee4a91d156$export$30b2b5c64556d316;
|
|
348
|
+
const $1b0217ee4a91d156$export$6d4de93b380beddf = $1b0217ee4a91d156$export$2c967063bd2dc512;
|
|
362
349
|
|
|
363
350
|
|
|
364
351
|
|
|
365
352
|
|
|
366
|
-
export {$1b0217ee4a91d156$export$1059331f43ddcc82 as createContextMenuScope, $1b0217ee4a91d156$export$8dc6765e8be191c7 as ContextMenu, $1b0217ee4a91d156$export$be6fc7b1d5b0beb9 as ContextMenuTrigger, $1b0217ee4a91d156$export$
|
|
353
|
+
export {$1b0217ee4a91d156$export$1059331f43ddcc82 as createContextMenuScope, $1b0217ee4a91d156$export$8dc6765e8be191c7 as ContextMenu, $1b0217ee4a91d156$export$be6fc7b1d5b0beb9 as ContextMenuTrigger, $1b0217ee4a91d156$export$14afd0be83e45060 as ContextMenuPortal, $1b0217ee4a91d156$export$572205900c9369e as ContextMenuContent, $1b0217ee4a91d156$export$9860523b0fcdd664 as ContextMenuGroup, $1b0217ee4a91d156$export$d4b9d3b609a10742 as ContextMenuLabel, $1b0217ee4a91d156$export$16a26dc176a49100 as ContextMenuItem, $1b0217ee4a91d156$export$b6adbe51d5d8b7ec as ContextMenuCheckboxItem, $1b0217ee4a91d156$export$db5c89af5ed9aa07 as ContextMenuRadioGroup, $1b0217ee4a91d156$export$8a727d09a7d9bfc2 as ContextMenuRadioItem, $1b0217ee4a91d156$export$9ed8194dee42d94b as ContextMenuItemIndicator, $1b0217ee4a91d156$export$8d6b009fadfe1207 as ContextMenuSeparator, $1b0217ee4a91d156$export$f47d0a58228a61e2 as ContextMenuArrow, $1b0217ee4a91d156$export$5bc21d1c00c4b201 as ContextMenuSub, $1b0217ee4a91d156$export$30b2b5c64556d316 as ContextMenuSubTrigger, $1b0217ee4a91d156$export$2c967063bd2dc512 as ContextMenuSubContent, $1b0217ee4a91d156$export$be92b6f5f03c0fe9 as Root, $1b0217ee4a91d156$export$41fb9f06171c75f4 as Trigger, $1b0217ee4a91d156$export$602eac185826482c as Portal, $1b0217ee4a91d156$export$7c6e2c02157bb7d2 as Content, $1b0217ee4a91d156$export$eb2fcfdbd7ba97d4 as Group, $1b0217ee4a91d156$export$b04be29aa201d4f5 as Label, $1b0217ee4a91d156$export$6d08773d2e66f8f2 as Item, $1b0217ee4a91d156$export$16ce288f89fa631c as CheckboxItem, $1b0217ee4a91d156$export$a98f0dcb43a68a25 as RadioGroup, $1b0217ee4a91d156$export$371ab307eab489c0 as RadioItem, $1b0217ee4a91d156$export$c3468e2714d175fa as ItemIndicator, $1b0217ee4a91d156$export$1ff3c3f08ae963c0 as Separator, $1b0217ee4a91d156$export$21b07c8f274aebd5 as Arrow, $1b0217ee4a91d156$export$d7a01e11500dfb6f as Sub, $1b0217ee4a91d156$export$2ea8a7a591ac5eac as SubTrigger, $1b0217ee4a91d156$export$6d4de93b380beddf as SubContent};
|
|
367
354
|
//# sourceMappingURL=index.module.js.map
|
package/dist/index.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;ACcA;;oGAEA,CAEA,MAAMO,uCAAiB,GAAG,aAA1B,AAAA;AAGA,MAAM,CAACC,8CAAD,EAA2BC,yCAA3B,CAAA,GAAqDP,yBAAkB,CAACK,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K,GAAGjB,yCAAd,AAAA;;ADzdA","sources":["packages/react/context-menu/src/index.ts","packages/react/context-menu/src/ContextMenu.tsx"],"sourcesContent":["export * from './ContextMenu';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ntype ContextMenuContextValue = {\n isRootMenu: boolean;\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n};\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;\n const [open, setOpen] = React.useState(false);\n const contentContext = useContentContext(CONTEXT_MENU_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n setOpen(open);\n handleOpenChangeProp(open);\n },\n [handleOpenChangeProp]\n );\n\n return contentContext.isInsideContent ? (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n isRootMenu={false}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={handleOpenChange}>\n {children}\n </MenuPrimitive.Sub>\n </ContextMenuProvider>\n ) : (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n isRootMenu={true}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n dir={dir}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\nContextMenu.displayName = CONTEXT_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {}\n\nconst ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMenuTriggerProps>(\n (props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const pointRef = React.useRef<Point>({ x: 0, y: 0 });\n const virtualRef = React.useRef({\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }),\n });\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n []\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n pointRef.current = { x: event.clientX, y: event.clientY };\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n\n return (\n <ContentProvider scope={__scopeContextMenu} isInsideContent={false}>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n onContextMenu={composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n event.preventDefault();\n handleOpen(event);\n })}\n onPointerDown={composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n })\n )}\n onPointerMove={composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))}\n onPointerCancel={composeEventHandlers(\n props.onPointerCancel,\n whenTouchOrPen(clearLongPress)\n )}\n onPointerUp={composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))}\n />\n </ContentProvider>\n );\n }\n);\n\nContextMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\nconst [ContentProvider, useContentContext] = createContextMenuContext(CONTENT_NAME, {\n isInsideContent: false,\n});\n\ntype ContextMenuContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<MenuContentProps, 'portalled' | 'side' | 'align'> {}\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n (props: ScopedProps<ContextMenuContentProps>, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n\n const commonProps = {\n ...contentProps,\n style: {\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-context-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n },\n };\n\n return (\n <ContentProvider scope={__scopeContextMenu} isInsideContent={true}>\n {context.isRootMenu ? (\n <ContextMenuRootContent\n __scopeContextMenu={__scopeContextMenu}\n {...commonProps}\n ref={forwardedRef}\n />\n ) : (\n <MenuPrimitive.Content {...menuScope} {...commonProps} ref={forwardedRef} />\n )}\n </ContentProvider>\n );\n }\n);\n\nContextMenuContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype ContextMenuRootContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuRootContentProps extends ScopedProps<MenuContentProps> {}\n\nconst ContextMenuRootContent = React.forwardRef<\n ContextMenuRootContentElement,\n ContextMenuRootContentProps\n>((props, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n portalled\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n />\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'ContextMenuGroup';\n\ntype ContextMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = React.forwardRef<ContextMenuGroupElement, ContextMenuGroupProps>(\n (props: ScopedProps<ContextMenuGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'ContextMenuLabel';\n\ntype ContextMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n (props: ScopedProps<ContextMenuLabelProps>, forwardedRef) => {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ContextMenuItem';\n\ntype ContextMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n (props: ScopedProps<ContextMenuItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTriggerItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_ITEM_NAME = 'ContextMenuTriggerItem';\n\ntype ContextMenuTriggerItemElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuTriggerItemProps extends MenuSubTriggerProps {}\n\nconst ContextMenuTriggerItem = React.forwardRef<\n ContextMenuTriggerItemElement,\n ContextMenuTriggerItemProps\n>((props: ScopedProps<ContextMenuTriggerItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\nContextMenuTriggerItem.displayName = TRIGGER_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'ContextMenuRadioGroup';\n\ntype ContextMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>((props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'ContextMenuRadioItem';\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ContextMenuItemIndicator';\n\ntype ContextMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>((props: ScopedProps<ContextMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nContextMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ContextMenuSeparator';\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>((props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nContextMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'ContextMenuArrow';\n\ntype ContextMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n (props: ScopedProps<ContextMenuArrowProps>, forwardedRef) => {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst TriggerItem = ContextMenuTriggerItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuTriggerItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n //\n Root,\n Trigger,\n Content,\n Group,\n Label,\n Item,\n TriggerItem,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuTriggerItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n};\n"],"names":["React","composeEventHandlers","createContextScope","Primitive","MenuPrimitive","createMenuScope","useCallbackRef","CONTEXT_MENU_NAME","createContextMenuContext","createContextMenuScope","useMenuScope","ContextMenuProvider","useContextMenuContext","ContextMenu","props","__scopeContextMenu","children","onOpenChange","dir","modal","open","setOpen","useState","contentContext","useContentContext","menuScope","handleOpenChangeProp","handleOpenChange","useCallback","isInsideContent","TRIGGER_NAME","ContextMenuTrigger","forwardRef","forwardedRef","triggerProps","context","pointRef","useRef","x","y","virtualRef","getBoundingClientRect","DOMRect","fromRect","width","height","current","longPressTimerRef","clearLongPress","window","clearTimeout","handleOpen","event","clientX","clientY","useEffect","WebkitTouchCallout","style","onContextMenu","preventDefault","onPointerDown","whenTouchOrPen","setTimeout","onPointerMove","onPointerCancel","onPointerUp","CONTENT_NAME","ContentProvider","ContextMenuContent","contentProps","commonProps","isRootMenu","ContextMenuRootContent","hasInteractedOutsideRef","onCloseAutoFocus","defaultPrevented","onInteractOutside","GROUP_NAME","ContextMenuGroup","groupProps","LABEL_NAME","ContextMenuLabel","labelProps","ITEM_NAME","ContextMenuItem","itemProps","TRIGGER_ITEM_NAME","ContextMenuTriggerItem","triggerItemProps","CHECKBOX_ITEM_NAME","ContextMenuCheckboxItem","checkboxItemProps","RADIO_GROUP_NAME","ContextMenuRadioGroup","radioGroupProps","RADIO_ITEM_NAME","ContextMenuRadioItem","radioItemProps","INDICATOR_NAME","ContextMenuItemIndicator","itemIndicatorProps","SEPARATOR_NAME","ContextMenuSeparator","separatorProps","ARROW_NAME","ContextMenuArrow","arrowProps","handler","pointerType","undefined","Root","Trigger","Content","Group","Label","Item","TriggerItem","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow"],"version":3,"file":"index.module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;A;;;;;;;;;ACeA;;oGAEA,CAEA,MAAMyC,uCAAiB,GAAG,aAA1B,AAAA;AAGA,MAAM,CAACC,8CAAD,EAA2B1C,yCAA3B,CAAA,GAAqDmC,yBAAkB,CAACM,uCAAD,EAAoB;IAC/FH,sBAD+F;C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,GAAGhB,yCAAhB,AAAA;AACA,MAAMiB,yCAAM,GAAGhB,yCAAf,AAAA;AACA,MAAMiB,yCAAO,GAAGhB,wCAAhB,AAAA;AACA,MAAMiB,yCAAK,GAAGhB,yCAAd,AAAA;AACA,MAAMiB,yCAAK,GAAGhB,yCAAd,AAAA;AACA,MAAMiB,yCAAI,GAAGhB,yCAAb,AAAA;AACA,MAAMiB,yCAAY,GAAGhB,yCAArB,AAAA;AACA,MAAMiB,yCAAU,GAAGhB,yCAAnB,AAAA;AACA,MAAMiB,yCAAS,GAAGhB,yCAAlB,AAAA;AACA,MAAMiB,yCAAa,GAAGhB,yCAAtB,AAAA;AACA,MAAMiB,yCAAS,GAAGhB,yCAAlB,AAAA;AACA,MAAMiB,yCAAK,GAAGhB,yCAAd,AAAA;AACA,MAAMiB,yCAAG,GAAGhB,yCAAZ,AAAA;AACA,MAAMiB,yCAAU,GAAGhB,yCAAnB,AAAA;AACA,MAAMiB,yCAAU,GAAGhB,yCAAnB,AAAA;;AD/fA","sources":["packages/react/context-menu/src/index.ts","packages/react/context-menu/src/ContextMenu.tsx"],"sourcesContent":["export {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './ContextMenu';\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n} from './ContextMenu';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Point = { x: number; y: number };\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTEXT_MENU_NAME = 'ContextMenu';\n\ntype ScopedProps<P> = P & { __scopeContextMenu?: Scope };\nconst [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [\n createMenuScope,\n]);\nconst useMenuScope = createMenuScope();\n\ntype ContextMenuContextValue = {\n open: boolean;\n onOpenChange(open: boolean): void;\n modal: boolean;\n};\n\nconst [ContextMenuProvider, useContextMenuContext] =\n createContextMenuContext<ContextMenuContextValue>(CONTEXT_MENU_NAME);\n\ninterface ContextMenuProps {\n children?: React.ReactNode;\n onOpenChange?(open: boolean): void;\n dir?: Direction;\n modal?: boolean;\n}\n\nconst ContextMenu: React.FC<ContextMenuProps> = (props: ScopedProps<ContextMenuProps>) => {\n const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;\n const [open, setOpen] = React.useState(false);\n const menuScope = useMenuScope(__scopeContextMenu);\n const handleOpenChangeProp = useCallbackRef(onOpenChange);\n\n const handleOpenChange = React.useCallback(\n (open: boolean) => {\n setOpen(open);\n handleOpenChangeProp(open);\n },\n [handleOpenChangeProp]\n );\n\n return (\n <ContextMenuProvider\n scope={__scopeContextMenu}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n dir={dir}\n open={open}\n onOpenChange={handleOpenChange}\n modal={modal}\n >\n {children}\n </MenuPrimitive.Root>\n </ContextMenuProvider>\n );\n};\n\nContextMenu.displayName = CONTEXT_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'ContextMenuTrigger';\n\ntype ContextMenuTriggerElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface ContextMenuTriggerProps extends PrimitiveSpanProps {}\n\nconst ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMenuTriggerProps>(\n (props: ScopedProps<ContextMenuTriggerProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerProps } = props;\n const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const pointRef = React.useRef<Point>({ x: 0, y: 0 });\n const virtualRef = React.useRef({\n getBoundingClientRect: () => DOMRect.fromRect({ width: 0, height: 0, ...pointRef.current }),\n });\n const longPressTimerRef = React.useRef(0);\n const clearLongPress = React.useCallback(\n () => window.clearTimeout(longPressTimerRef.current),\n []\n );\n const handleOpen = (event: React.MouseEvent | React.PointerEvent) => {\n pointRef.current = { x: event.clientX, y: event.clientY };\n context.onOpenChange(true);\n };\n\n React.useEffect(() => clearLongPress, [clearLongPress]);\n\n return (\n <>\n <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />\n <Primitive.span\n data-state={context.open ? 'open' : 'closed'}\n {...triggerProps}\n ref={forwardedRef}\n // prevent iOS context menu from appearing\n style={{ WebkitTouchCallout: 'none', ...props.style }}\n onContextMenu={composeEventHandlers(props.onContextMenu, (event) => {\n // clearing the long press here because some platforms already support\n // long press to trigger a `contextmenu` event\n clearLongPress();\n handleOpen(event);\n event.preventDefault();\n })}\n onPointerDown={composeEventHandlers(\n props.onPointerDown,\n whenTouchOrPen((event) => {\n // clear the long press here in case there's multiple touch points\n clearLongPress();\n longPressTimerRef.current = window.setTimeout(() => handleOpen(event), 700);\n })\n )}\n onPointerMove={composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress))}\n onPointerCancel={composeEventHandlers(\n props.onPointerCancel,\n whenTouchOrPen(clearLongPress)\n )}\n onPointerUp={composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))}\n />\n </>\n );\n }\n);\n\nContextMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'ContextMenuPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface ContextMenuPortalProps extends MenuPortalProps {}\n\nconst ContextMenuPortal: React.FC<ContextMenuPortalProps> = (\n props: ScopedProps<ContextMenuPortalProps>\n) => {\n const { __scopeContextMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nContextMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'ContextMenuContent';\n\ntype ContextMenuContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface ContextMenuContentProps extends Omit<MenuContentProps, 'side' | 'sideOffset' | 'align'> {}\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n (props: ScopedProps<ContextMenuContentProps>, forwardedRef) => {\n const { __scopeContextMenu, ...contentProps } = props;\n const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);\n const menuScope = useMenuScope(__scopeContextMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n side=\"right\"\n sideOffset={2}\n align=\"start\"\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented && hasInteractedOutsideRef.current) {\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;\n }}\n style={{\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-context-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n }\n);\n\nContextMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'ContextMenuGroup';\n\ntype ContextMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface ContextMenuGroupProps extends MenuGroupProps {}\n\nconst ContextMenuGroup = React.forwardRef<ContextMenuGroupElement, ContextMenuGroupProps>(\n (props: ScopedProps<ContextMenuGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'ContextMenuLabel';\n\ntype ContextMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface ContextMenuLabelProps extends MenuLabelProps {}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n (props: ScopedProps<ContextMenuLabelProps>, forwardedRef) => {\n const { __scopeContextMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'ContextMenuItem';\n\ntype ContextMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface ContextMenuItemProps extends MenuItemProps {}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n (props: ScopedProps<ContextMenuItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'ContextMenuCheckboxItem';\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>((props: ScopedProps<ContextMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nContextMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'ContextMenuRadioGroup';\n\ntype ContextMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n ContextMenuRadioGroupElement,\n ContextMenuRadioGroupProps\n>((props: ScopedProps<ContextMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'ContextMenuRadioItem';\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>((props: ScopedProps<ContextMenuRadioItemProps>, forwardedRef) => {\n const { __scopeContextMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nContextMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ContextMenuItemIndicator';\n\ntype ContextMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst ContextMenuItemIndicator = React.forwardRef<\n ContextMenuItemIndicatorElement,\n ContextMenuItemIndicatorProps\n>((props: ScopedProps<ContextMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nContextMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ContextMenuSeparator';\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>((props: ScopedProps<ContextMenuSeparatorProps>, forwardedRef) => {\n const { __scopeContextMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nContextMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'ContextMenuArrow';\n\ntype ContextMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface ContextMenuArrowProps extends MenuArrowProps {}\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n (props: ScopedProps<ContextMenuArrowProps>, forwardedRef) => {\n const { __scopeContextMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nContextMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'ContextMenuSub';\n\ninterface ContextMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst ContextMenuSub: React.FC<ContextMenuSubProps> = (props: ScopedProps<ContextMenuSubProps>) => {\n const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\nContextMenuSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'ContextMenuSubTrigger';\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>((props: ScopedProps<ContextMenuSubTriggerProps>, forwardedRef) => {\n const { __scopeContextMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\nContextMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ContextMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'ContextMenuSubContent';\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface ContextMenuSubContentProps extends MenuSubContentProps {}\n\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>((props: ScopedProps<ContextMenuSubContentProps>, forwardedRef) => {\n const { __scopeContextMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeContextMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-context-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n});\n\nContextMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction whenTouchOrPen<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {\n return (event) => (event.pointerType !== 'mouse' ? handler(event) : undefined);\n}\n\nconst Root = ContextMenu;\nconst Trigger = ContextMenuTrigger;\nconst Portal = ContextMenuPortal;\nconst Content = ContextMenuContent;\nconst Group = ContextMenuGroup;\nconst Label = ContextMenuLabel;\nconst Item = ContextMenuItem;\nconst CheckboxItem = ContextMenuCheckboxItem;\nconst RadioGroup = ContextMenuRadioGroup;\nconst RadioItem = ContextMenuRadioItem;\nconst ItemIndicator = ContextMenuItemIndicator;\nconst Separator = ContextMenuSeparator;\nconst Arrow = ContextMenuArrow;\nconst Sub = ContextMenuSub;\nconst SubTrigger = ContextMenuSubTrigger;\nconst SubContent = ContextMenuSubContent;\n\nexport {\n createContextMenuScope,\n //\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuLabel,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuItemIndicator,\n ContextMenuSeparator,\n ContextMenuArrow,\n ContextMenuSub,\n ContextMenuSubTrigger,\n ContextMenuSubContent,\n //\n Root,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuGroupProps,\n ContextMenuLabelProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuArrowProps,\n ContextMenuSubProps,\n ContextMenuSubTriggerProps,\n ContextMenuSubContentProps,\n};\n"],"names":["createContextMenuScope","ContextMenu","ContextMenuTrigger","ContextMenuPortal","ContextMenuContent","ContextMenuGroup","ContextMenuLabel","ContextMenuItem","ContextMenuCheckboxItem","ContextMenuRadioGroup","ContextMenuRadioItem","ContextMenuItemIndicator","ContextMenuSeparator","ContextMenuArrow","ContextMenuSub","ContextMenuSubTrigger","ContextMenuSubContent","Root","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent","React","composeEventHandlers","createContextScope","Primitive","MenuPrimitive","createMenuScope","useCallbackRef","useControllableState","CONTEXT_MENU_NAME","createContextMenuContext","useMenuScope","ContextMenuProvider","useContextMenuContext","props","__scopeContextMenu","children","onOpenChange","dir","modal","open","setOpen","useState","menuScope","handleOpenChangeProp","handleOpenChange","useCallback","TRIGGER_NAME","forwardRef","forwardedRef","triggerProps","context","pointRef","useRef","x","y","virtualRef","getBoundingClientRect","DOMRect","fromRect","width","height","current","longPressTimerRef","clearLongPress","window","clearTimeout","handleOpen","event","clientX","clientY","useEffect","WebkitTouchCallout","style","onContextMenu","preventDefault","onPointerDown","whenTouchOrPen","setTimeout","onPointerMove","onPointerCancel","onPointerUp","PORTAL_NAME","portalProps","CONTENT_NAME","contentProps","hasInteractedOutsideRef","onCloseAutoFocus","defaultPrevented","onInteractOutside","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","SUB_NAME","openProp","defaultOpen","prop","defaultProp","onChange","SUB_TRIGGER_NAME","triggerItemProps","SUB_CONTENT_NAME","subContentProps","handler","pointerType","undefined"],"version":3,"file":"index.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-context-menu",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/runtime": "^7.13.10",
|
|
20
|
-
"@radix-ui/primitive": "
|
|
21
|
-
"@radix-ui/react-context": "
|
|
22
|
-
"@radix-ui/react-menu": "0.1
|
|
23
|
-
"@radix-ui/react-primitive": "
|
|
24
|
-
"@radix-ui/react-use-callback-ref": "
|
|
20
|
+
"@radix-ui/primitive": "1.0.0",
|
|
21
|
+
"@radix-ui/react-context": "1.0.0",
|
|
22
|
+
"@radix-ui/react-menu": "1.0.1-rc.1",
|
|
23
|
+
"@radix-ui/react-primitive": "1.0.0",
|
|
24
|
+
"@radix-ui/react-use-callback-ref": "1.0.0",
|
|
25
|
+
"@radix-ui/react-use-controllable-state": "1.0.0"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
28
|
"react": "^16.8 || ^17.0 || ^18.0",
|
|
@@ -35,5 +36,5 @@
|
|
|
35
36
|
"bugs": {
|
|
36
37
|
"url": "https://github.com/radix-ui/primitives/issues"
|
|
37
38
|
},
|
|
38
|
-
"stableVersion": "0.
|
|
39
|
+
"stableVersion": "1.0.0"
|
|
39
40
|
}
|