@radix-ui/react-menu 0.1.7-rc.42 → 0.1.7-rc.45
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 +0 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -57
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +3 -42
- package/dist/index.module.js.map +1 -1
- package/package.json +17 -17
package/dist/index.d.ts
CHANGED
|
@@ -6,20 +6,14 @@ import { Portal as _Portal1 } from "@radix-ui/react-portal";
|
|
|
6
6
|
import * as Radix from "@radix-ui/react-primitive";
|
|
7
7
|
import { Primitive } from "@radix-ui/react-primitive";
|
|
8
8
|
import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
|
|
9
|
-
import { RemoveScroll } from "react-remove-scroll";
|
|
10
9
|
type Direction = 'ltr' | 'rtl';
|
|
11
10
|
export const createMenuScope: import("@radix-ui/react-context").CreateScope;
|
|
12
|
-
type RemoveScrollProps = React.ComponentProps<typeof RemoveScroll>;
|
|
13
11
|
export interface MenuProps {
|
|
14
12
|
children?: React.ReactNode;
|
|
15
13
|
open?: boolean;
|
|
16
14
|
onOpenChange?(open: boolean): void;
|
|
17
15
|
dir?: Direction;
|
|
18
16
|
modal?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* @see https://github.com/theKashey/react-remove-scroll#usage
|
|
21
|
-
*/
|
|
22
|
-
allowPinchZoom?: RemoveScrollProps['allowPinchZoom'];
|
|
23
17
|
}
|
|
24
18
|
export const Menu: React.FC<MenuProps>;
|
|
25
19
|
type PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;AAyBA,iBAAiB,KAAK,GAAG,KAAK,CAAC;AA4B/B,OAAA,sFAIE,CAAC;AAsBH;IACE,QAAQ,CAAC,EAA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C;AAClB,OAAA,MAAM,8FAAmB,CAAC;AAC1B,OAAA,MAAM,iCAAmB,CAAC;AAC1B,OAAA,MAAM,gGAAqB,CAAC;AAC5B,OAAA,MAAM,4FAAiB,CAAC;AACxB,OAAA,MAAM,4FAAiB,CAAC;AACxB,OAAA,MAAM,0FAAe,CAAC;AACtB,OAAA,MAAM,0GAA+B,CAAC;AACtC,OAAA,MAAM,sGAA2B,CAAC;AAClC,OAAA,MAAM,oGAAyB,CAAC;AAChC,OAAA,MAAM,6GAAiC,CAAC;AACxC,OAAA,MAAM,oGAAyB,CAAC;AAChC,OAAA,MAAM,2FAAiB,CAAC;AACxB,OAAA,MAAM,2BAAa,CAAC;AACpB,OAAA,MAAM,sGAA2B,CAAC;AAClC,OAAA,MAAM,sGAA2B,CAAC","sources":["packages/react/menu/src/packages/react/menu/src/Menu.tsx","packages/react/menu/src/packages/react/menu/src/index.ts","packages/react/menu/src/index.ts"],"sourcesContent":[null,null,"export {\n createMenuScope,\n //\n Menu,\n MenuAnchor,\n MenuPortal,\n MenuContent,\n MenuGroup,\n MenuLabel,\n MenuItem,\n MenuCheckboxItem,\n MenuRadioGroup,\n MenuRadioItem,\n MenuItemIndicator,\n MenuSeparator,\n MenuArrow,\n MenuSub,\n MenuSubTrigger,\n MenuSubContent,\n //\n Root,\n Anchor,\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 './Menu';\nexport type {\n MenuProps,\n MenuAnchorProps,\n MenuPortalProps,\n MenuContentProps,\n MenuGroupProps,\n MenuLabelProps,\n MenuItemProps,\n MenuCheckboxItemProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuItemIndicatorProps,\n MenuSeparatorProps,\n MenuArrowProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuSubContentProps,\n} from './Menu';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.js
CHANGED
|
@@ -19,63 +19,46 @@ var $cnSS2$radixuireactusecallbackref = require("@radix-ui/react-use-callback-re
|
|
|
19
19
|
var $cnSS2$ariahidden = require("aria-hidden");
|
|
20
20
|
var $cnSS2$reactremovescroll = require("react-remove-scroll");
|
|
21
21
|
|
|
22
|
-
function $parcel$
|
|
23
|
-
Object.
|
|
24
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
Object.defineProperty(dest, key, {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function get() {
|
|
31
|
-
return source[key];
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
return dest;
|
|
22
|
+
function $parcel$export(e, n, v, s) {
|
|
23
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
37
24
|
}
|
|
38
25
|
function $parcel$interopDefault(a) {
|
|
39
26
|
return a && a.__esModule ? a.default : a;
|
|
40
27
|
}
|
|
41
|
-
function $parcel$export(e, n, v, s) {
|
|
42
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
43
|
-
}
|
|
44
|
-
var $213e4d2df823067d$exports = {};
|
|
45
28
|
|
|
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(
|
|
60
|
-
$parcel$export(
|
|
61
|
-
$parcel$export(
|
|
62
|
-
$parcel$export(
|
|
63
|
-
$parcel$export(
|
|
64
|
-
$parcel$export(
|
|
65
|
-
$parcel$export(
|
|
66
|
-
$parcel$export(
|
|
67
|
-
$parcel$export(
|
|
68
|
-
$parcel$export(
|
|
69
|
-
$parcel$export(
|
|
70
|
-
$parcel$export(
|
|
71
|
-
$parcel$export(
|
|
72
|
-
$parcel$export(
|
|
73
|
-
$parcel$export(
|
|
74
|
-
$parcel$export(
|
|
75
|
-
$parcel$export(
|
|
76
|
-
$parcel$export(
|
|
77
|
-
$parcel$export(
|
|
78
|
-
$parcel$export(
|
|
29
|
+
$parcel$export(module.exports, "createMenuScope", () => $213e4d2df823067d$export$4027731b685e72eb);
|
|
30
|
+
$parcel$export(module.exports, "Menu", () => $213e4d2df823067d$export$d9b273488cd8ce6f);
|
|
31
|
+
$parcel$export(module.exports, "MenuAnchor", () => $213e4d2df823067d$export$9fa5ebd18bee4d43);
|
|
32
|
+
$parcel$export(module.exports, "MenuPortal", () => $213e4d2df823067d$export$793392f970497feb);
|
|
33
|
+
$parcel$export(module.exports, "MenuContent", () => $213e4d2df823067d$export$479f0f2f71193efe);
|
|
34
|
+
$parcel$export(module.exports, "MenuGroup", () => $213e4d2df823067d$export$22a631d1f72787bb);
|
|
35
|
+
$parcel$export(module.exports, "MenuLabel", () => $213e4d2df823067d$export$dd37bec0e8a99143);
|
|
36
|
+
$parcel$export(module.exports, "MenuItem", () => $213e4d2df823067d$export$2ce376c2cc3355c8);
|
|
37
|
+
$parcel$export(module.exports, "MenuCheckboxItem", () => $213e4d2df823067d$export$f6f243521332502d);
|
|
38
|
+
$parcel$export(module.exports, "MenuRadioGroup", () => $213e4d2df823067d$export$ea2200c9eee416b3);
|
|
39
|
+
$parcel$export(module.exports, "MenuRadioItem", () => $213e4d2df823067d$export$69bd225e9817f6d0);
|
|
40
|
+
$parcel$export(module.exports, "MenuItemIndicator", () => $213e4d2df823067d$export$a2593e23056970a3);
|
|
41
|
+
$parcel$export(module.exports, "MenuSeparator", () => $213e4d2df823067d$export$1cec7dcdd713e220);
|
|
42
|
+
$parcel$export(module.exports, "MenuArrow", () => $213e4d2df823067d$export$bcdda4773debf5fa);
|
|
43
|
+
$parcel$export(module.exports, "MenuSub", () => $213e4d2df823067d$export$71bdb9d1e2909932);
|
|
44
|
+
$parcel$export(module.exports, "MenuSubTrigger", () => $213e4d2df823067d$export$5fbbb3ba7297405f);
|
|
45
|
+
$parcel$export(module.exports, "MenuSubContent", () => $213e4d2df823067d$export$e7142ab31822bde6);
|
|
46
|
+
$parcel$export(module.exports, "Root", () => $213e4d2df823067d$export$be92b6f5f03c0fe9);
|
|
47
|
+
$parcel$export(module.exports, "Anchor", () => $213e4d2df823067d$export$b688253958b8dfe7);
|
|
48
|
+
$parcel$export(module.exports, "Portal", () => $213e4d2df823067d$export$602eac185826482c);
|
|
49
|
+
$parcel$export(module.exports, "Content", () => $213e4d2df823067d$export$7c6e2c02157bb7d2);
|
|
50
|
+
$parcel$export(module.exports, "Group", () => $213e4d2df823067d$export$eb2fcfdbd7ba97d4);
|
|
51
|
+
$parcel$export(module.exports, "Label", () => $213e4d2df823067d$export$b04be29aa201d4f5);
|
|
52
|
+
$parcel$export(module.exports, "Item", () => $213e4d2df823067d$export$6d08773d2e66f8f2);
|
|
53
|
+
$parcel$export(module.exports, "CheckboxItem", () => $213e4d2df823067d$export$16ce288f89fa631c);
|
|
54
|
+
$parcel$export(module.exports, "RadioGroup", () => $213e4d2df823067d$export$a98f0dcb43a68a25);
|
|
55
|
+
$parcel$export(module.exports, "RadioItem", () => $213e4d2df823067d$export$371ab307eab489c0);
|
|
56
|
+
$parcel$export(module.exports, "ItemIndicator", () => $213e4d2df823067d$export$c3468e2714d175fa);
|
|
57
|
+
$parcel$export(module.exports, "Separator", () => $213e4d2df823067d$export$1ff3c3f08ae963c0);
|
|
58
|
+
$parcel$export(module.exports, "Arrow", () => $213e4d2df823067d$export$21b07c8f274aebd5);
|
|
59
|
+
$parcel$export(module.exports, "Sub", () => $213e4d2df823067d$export$d7a01e11500dfb6f);
|
|
60
|
+
$parcel$export(module.exports, "SubTrigger", () => $213e4d2df823067d$export$2ea8a7a591ac5eac);
|
|
61
|
+
$parcel$export(module.exports, "SubContent", () => $213e4d2df823067d$export$6d4de93b380beddf);
|
|
79
62
|
|
|
80
63
|
|
|
81
64
|
|
|
@@ -148,7 +131,7 @@ const $213e4d2df823067d$var$useRovingFocusGroupScope = $cnSS2$radixuireactroving
|
|
|
148
131
|
const [$213e4d2df823067d$var$MenuProvider, $213e4d2df823067d$var$useMenuContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$MENU_NAME);
|
|
149
132
|
const [$213e4d2df823067d$var$MenuRootProvider, $213e4d2df823067d$var$useMenuRootContext] = $213e4d2df823067d$var$createMenuContext($213e4d2df823067d$var$MENU_NAME);
|
|
150
133
|
const $213e4d2df823067d$export$d9b273488cd8ce6f = (props)=>{
|
|
151
|
-
const { __scopeMenu: __scopeMenu , open: open = false , children: children , dir: dir , onOpenChange: onOpenChange , modal: modal = true
|
|
134
|
+
const { __scopeMenu: __scopeMenu , open: open = false , children: children , dir: dir , onOpenChange: onOpenChange , modal: modal = true } = props;
|
|
152
135
|
const popperScope = $213e4d2df823067d$var$usePopperScope(__scopeMenu);
|
|
153
136
|
const [content, setContent] = $cnSS2$react.useState(null);
|
|
154
137
|
const isUsingKeyboardRef = $cnSS2$react.useRef(false);
|
|
@@ -199,8 +182,7 @@ const $213e4d2df823067d$export$d9b273488cd8ce6f = (props)=>{
|
|
|
199
182
|
]),
|
|
200
183
|
isUsingKeyboardRef: isUsingKeyboardRef,
|
|
201
184
|
dir: direction,
|
|
202
|
-
modal: modal
|
|
203
|
-
allowPinchZoom: allowPinchZoom
|
|
185
|
+
modal: modal
|
|
204
186
|
}, children)));
|
|
205
187
|
};
|
|
206
188
|
/*#__PURE__*/ Object.assign($213e4d2df823067d$export$d9b273488cd8ce6f, {
|
|
@@ -314,7 +296,7 @@ const $213e4d2df823067d$var$MenuRootContentNonModal = /*#__PURE__*/ $cnSS2$react
|
|
|
314
296
|
const ScrollLockWrapper = disableOutsideScroll ? $cnSS2$reactremovescroll.RemoveScroll : $cnSS2$react.Fragment;
|
|
315
297
|
const scrollLockWrapperProps = disableOutsideScroll ? {
|
|
316
298
|
as: $cnSS2$radixuireactslot.Slot,
|
|
317
|
-
allowPinchZoom:
|
|
299
|
+
allowPinchZoom: true
|
|
318
300
|
} : undefined;
|
|
319
301
|
const handleTypeaheadSearch = (key)=>{
|
|
320
302
|
var _items$find, _items$find2;
|
|
@@ -1035,7 +1017,6 @@ const $213e4d2df823067d$export$2ea8a7a591ac5eac = $213e4d2df823067d$export$5fbbb
|
|
|
1035
1017
|
const $213e4d2df823067d$export$6d4de93b380beddf = $213e4d2df823067d$export$e7142ab31822bde6;
|
|
1036
1018
|
|
|
1037
1019
|
|
|
1038
|
-
$parcel$exportWildcard(module.exports, $213e4d2df823067d$exports);
|
|
1039
1020
|
|
|
1040
1021
|
|
|
1041
1022
|
//# sourceMappingURL=index.js.map
|