@radix-ui/react-dropdown-menu 0.1.7-rc.3 → 0.1.7-rc.32

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 CHANGED
@@ -2,19 +2,20 @@ import * as React from "react";
2
2
  import * as Radix from "@radix-ui/react-primitive";
3
3
  import { Primitive } from "@radix-ui/react-primitive";
4
4
  import * as MenuPrimitive from "@radix-ui/react-menu";
5
- import { Scope } from "@radix-ui/react-context";
6
5
  type Direction = 'ltr' | 'rtl';
7
- type ScopedProps<P> = P & {
8
- __scopeDropdownMenu?: Scope;
9
- };
10
6
  export const createDropdownMenuScope: import("@radix-ui/react-context").CreateScope;
7
+ type MenuRootProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Root>;
11
8
  export interface DropdownMenuProps {
9
+ children?: React.ReactNode;
12
10
  dir?: Direction;
13
11
  open?: boolean;
14
12
  defaultOpen?: boolean;
15
13
  onOpenChange?(open: boolean): void;
16
14
  modal?: boolean;
17
- children?: React.ReactNode;
15
+ /**
16
+ * @see https://github.com/theKashey/react-remove-scroll#usage
17
+ */
18
+ allowPinchZoom?: MenuRootProps['allowPinchZoom'];
18
19
  }
19
20
  export const DropdownMenu: React.FC<DropdownMenuProps>;
20
21
  type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
@@ -22,11 +23,9 @@ export interface DropdownMenuTriggerProps extends PrimitiveButtonProps {
22
23
  }
23
24
  export const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
24
25
  type MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
25
- export interface DropdownMenuContentProps extends DropdownMenuRootContentProps, MenuContentProps {
26
+ export interface DropdownMenuContentProps extends MenuContentProps {
26
27
  }
27
28
  export const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
28
- interface DropdownMenuRootContentProps extends ScopedProps<MenuContentProps> {
29
- }
30
29
  type MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
31
30
  export interface DropdownMenuGroupProps extends MenuGroupProps {
32
31
  }
@@ -39,10 +38,6 @@ type MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
39
38
  export interface DropdownMenuItemProps extends MenuItemProps {
40
39
  }
41
40
  export const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
42
- type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
43
- export interface DropdownMenuTriggerItemProps extends MenuSubTriggerProps {
44
- }
45
- export const DropdownMenuTriggerItem: React.ForwardRefExoticComponent<DropdownMenuTriggerItemProps & React.RefAttributes<HTMLDivElement>>;
46
41
  type MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
47
42
  export interface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {
48
43
  }
@@ -67,18 +62,35 @@ type MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>
67
62
  export interface DropdownMenuArrowProps extends MenuArrowProps {
68
63
  }
69
64
  export const DropdownMenuArrow: React.ForwardRefExoticComponent<DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
65
+ export interface DropdownMenuSubProps {
66
+ children?: React.ReactNode;
67
+ open?: boolean;
68
+ defaultOpen?: boolean;
69
+ onOpenChange?(open: boolean): void;
70
+ }
71
+ export const DropdownMenuSub: React.FC<DropdownMenuSubProps>;
72
+ type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
73
+ export interface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {
74
+ }
75
+ export const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
76
+ type MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
77
+ export interface DropdownMenuSubContentProps extends MenuSubContentProps {
78
+ }
79
+ export const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
70
80
  export const Root: React.FC<DropdownMenuProps>;
71
81
  export const Trigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
72
82
  export const Content: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
73
83
  export const Group: React.ForwardRefExoticComponent<DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
74
84
  export const Label: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
75
85
  export const Item: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
76
- export const TriggerItem: React.ForwardRefExoticComponent<DropdownMenuTriggerItemProps & React.RefAttributes<HTMLDivElement>>;
77
86
  export const CheckboxItem: React.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
78
87
  export const RadioGroup: React.ForwardRefExoticComponent<DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
79
88
  export const RadioItem: React.ForwardRefExoticComponent<DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
80
89
  export const ItemIndicator: React.ForwardRefExoticComponent<DropdownMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
81
90
  export const Separator: React.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
82
91
  export const Arrow: React.ForwardRefExoticComponent<DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
92
+ export const Sub: React.FC<DropdownMenuSubProps>;
93
+ export const SubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
94
+ export const SubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
83
95
 
84
96
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"mappings":"A;A;A;A;A;AAaA,iBAAiB,KAAK,GAAG,KAAK,CAAC;AAQ/B,iBAAiB,CAAC,IAAI,CAAC,GAAG;IAAE,mBAAmB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAC1D,OAAA,8FAGC,CAAC;AAyBF;IACE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;CAC5B;AAED,OAAA,MAAM,cAAc,MAAM,EAAE,CAAC,iBAAiB,CA6B7C,CAAC;AA6DF,4BAA4B,MAAM,wBAAwB,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC;AACpF,yCAAmC,SAAQ,oBAAoB;CAAG;AAElE,OAAA,MAAM,uHAuCL,CAAC;AAiBF,wBAAwB,MAAM,wBAAwB,CAAC,OAAO,cAAc,OAAO,CAAC,CAAC;AACrF,yCAAmC,SAAQ,4BAA4B,EAAE,gBAAgB;CAAG;AAE5F,OAAA,MAAM,oHA6BL,CAAC;AAOF,sCAAuC,SAAQ,YAAY,gBAAgB,CAAC;CAAG;AAyC/E,sBAAsB,MAAM,wBAAwB,CAAC,OAAO,cAAc,KAAK,CAAC,CAAC;AACjF,uCAAiC,SAAQ,cAAc;CAAG;AAE1D,OAAA,MAAM,gHAML,CAAC;AAWF,sBAAsB,MAAM,wBAAwB,CAAC,OAAO,cAAc,KAAK,CAAC,CAAC;AACjF,uCAAiC,SAAQ,cAAc;CAAG;AAE1D,OAAA,MAAM,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AyB,CAAC;AAChC,OAAA,MAAM,kGAAuB,CAAC;AAC9B,OAAA,MAAM,gHAAqC,CAAC;AAC5C,OAAA,MAAM,kHAAuC,CAAC;AAC9C,OAAA,MAAM,8GAAmC,CAAC;AAC1C,OAAA,MAAM,4GAAiC,CAAC;AACxC,OAAA,MAAM,qHAAyC,CAAC;AAChD,OAAA,MAAM,4GAAiC,CAAC;AACxC,OAAA,MAAM,mGAAyB,CAAC","sources":["./packages/react/dropdown-menu/src/packages/react/dropdown-menu/src/DropdownMenu.tsx","./packages/react/dropdown-menu/src/packages/react/dropdown-menu/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;AAaA,iBAAiB,KAAK,GAAG,KAAK,CAAC;AAS/B,OAAA,8FAGC,CAAC;AAgBF,qBAAqB,MAAM,wBAAwB,CAAC,OAAO,cAAc,IAAI,CAAC,CAAC;AAC/E;IACE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAClD;AAED,OAAA,MAAM,cAAc,MAAM,EAAE,CAAC,iBAAiB,CA0C7C,CAAC;AAWF,4BAA4B,MAAM,wBAAwB,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC;AACpF,yCAAmC,SAAQ,oBAAoB;CAAG;AAElE,OAAA,MAAM,uHAuCL,CAAC;AAWF,wBAAwB,MAAM,wBAAwB,CAAC,OAAO,cAAc,OAAO,CAAC,CAAC;AACrF,yCAAmC,SAAQ,gBAAgB;CAAG;AAE9D,OAAA,MAAM,oHAoCL,CAAC;A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,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC;AAED,OAAA,MAAM,iBAAiB,MAAM,EAAE,CAAC,oBAAoB,CAgBnD,CAAC;AASF,2BAA2B,MAAM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,4CAAsC,SAAQ,mBAAmB;CAAG;AAEpE,OAAA,MAAM,0HAOJ,CAAC;AAWH,2BAA2B,MAAM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,4CAAsC,SAAQ,mBAAmB;CAAG;AAEpE,OAAA,MAAM,0HAoBJ,CAAC;AAMH,OAAA,MAAM,iCAAmB,CAAC;AAC1B,OAAA,MAAM,2GAA6B,CAAC;AACpC,OAAA,MAAM,wGAA6B,CAAC;AACpC,OAAA,MAAM,oGAAyB,CAAC;AAChC,OAAA,MAAM,oGAAyB,CAAC;AAChC,OAAA,MAAM,kGAAuB,CAAC;AAC9B,OAAA,MAAM,kHAAuC,CAAC;AAC9C,OAAA,MAAM,8GAAmC,CAAC;AAC1C,OAAA,MAAM,4GAAiC,CAAC;AACxC,OAAA,MAAM,qHAAyC,CAAC;AAChD,OAAA,MAAM,4GAAiC,CAAC;AACxC,OAAA,MAAM,mGAAyB,CAAC;AAChC,OAAA,MAAM,mCAAqB,CAAC;AAC5B,OAAA,MAAM,8GAAmC,CAAC;AAC1C,OAAA,MAAM,8GAAmC,CAAC","sources":["packages/react/dropdown-menu/src/packages/react/dropdown-menu/src/DropdownMenu.tsx","packages/react/dropdown-menu/src/packages/react/dropdown-menu/src/index.ts","packages/react/dropdown-menu/src/index.ts"],"sourcesContent":[null,null,"export * from './DropdownMenu';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -1,2 +1,382 @@
1
- var e,o=require("@radix-ui/react-id").useId,n=require("@radix-ui/react-menu"),r=l({},n),t=n.createMenuScope,p=require("@radix-ui/react-primitive").Primitive,s=require("@radix-ui/react-use-controllable-state").useControllableState,c=require("@radix-ui/react-context").createContextScope,a=require("@radix-ui/react-compose-refs").composeRefs,u=require("@radix-ui/primitive").composeEventHandlers,d=l({},require("react")),i=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function l(e,o){return Object.keys(o).forEach((function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return o[n]}})})),e}const[f,w]=c("DropdownMenu",[t]);exports.createDropdownMenuScope=w;const m=t(),[g,D]=f("DropdownMenu"),M=e=>{const{__scopeDropdownMenu:o,children:n,open:t,defaultOpen:p,onOpenChange:c}=e,a=I("DropdownMenu",o),u=m(o),[l=!1,f]=s({prop:t,defaultProp:p,onChange:c}),w=d.useCallback((()=>f((e=>!e))),[f]);return a.isInsideContent?/*#__PURE__*/d.createElement(g,{scope:o,isRootMenu:!1,open:l,onOpenChange:f,onOpenToggle:w},/*#__PURE__*/d.createElement(r.Sub,i({},u,{open:l,onOpenChange:f}),n)):/*#__PURE__*/d.createElement(x,i({},e,{open:l,onOpenChange:f,onOpenToggle:w}),n)};exports.DropdownMenu=M;const x=e=>{const{__scopeDropdownMenu:n,children:t,dir:p,open:s,onOpenChange:c,onOpenToggle:a,modal:u=!0}=e,l=m(n),f=d.useRef(null);/*#__PURE__*/return d.createElement(g,{scope:n,isRootMenu:!0,triggerId:o(),triggerRef:f,contentId:o(),open:s,onOpenChange:c,onOpenToggle:a,modal:u},/*#__PURE__*/d.createElement(r.Root,i({},l,{open:s,onOpenChange:c,dir:p,modal:u}),t))},_=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,disabled:t=!1,...s}=e,c=D("DropdownMenuTrigger",n),l=m(n);return c.isRootMenu?/*#__PURE__*/d.createElement(r.Anchor,i({asChild:!0},l),/*#__PURE__*/d.createElement(p.button,i({type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":!!c.open||void 0,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":t?"":void 0,disabled:t},s,{ref:a(o,c.triggerRef),onPointerDown:u(e.onPointerDown,(e=>{t||0!==e.button||!1!==e.ctrlKey||(c.open||e.preventDefault(),c.onOpenToggle())})),onKeyDown:u(e.onKeyDown,(e=>{t||(["Enter"," "].includes(e.key)&&c.onOpenToggle(),"ArrowDown"===e.key&&c.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault())}))}))):null}));exports.DropdownMenuTrigger=_;const[R,I]=f("DropdownMenuContent",{isInsideContent:!1}),C=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=D("DropdownMenuContent",n),s=m(n),c={...t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};/*#__PURE__*/return d.createElement(R,{scope:n,isInsideContent:!0},p.isRootMenu?/*#__PURE__*/d.createElement(b,i({__scopeDropdownMenu:n},c,{ref:o})):/*#__PURE__*/d.createElement(r.Content,i({},s,c,{ref:o})))}));exports.DropdownMenuContent=C;const b=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,portalled:t=!0,...p}=e,s=D("DropdownMenuContent",n),c=m(n),a=d.useRef(!1);return s.isRootMenu?/*#__PURE__*/d.createElement(r.Content,i({id:s.contentId,"aria-labelledby":s.triggerId},c,p,{ref:o,portalled:t,onCloseAutoFocus:u(e.onCloseAutoFocus,(e=>{var o;a.current||null===(o=s.triggerRef.current)||void 0===o||o.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:u(e.onInteractOutside,(e=>{const o=e.detail.originalEvent,n=0===o.button&&!0===o.ctrlKey,r=2===o.button||n;s.modal&&!r||(a.current=!0)}))})):null})),E=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.Group,i({},p,t,{ref:o}))}));exports.DropdownMenuGroup=E;const h=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.Label,i({},p,t,{ref:o}))}));exports.DropdownMenuLabel=h;const O=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.Item,i({},p,t,{ref:o}))}));exports.DropdownMenuItem=O;const v=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.SubTrigger,i({},p,t,{ref:o}))}));exports.DropdownMenuTriggerItem=v;const y=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.CheckboxItem,i({},p,t,{ref:o}))}));exports.DropdownMenuCheckboxItem=y;const T=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.RadioGroup,i({},p,t,{ref:o}))}));exports.DropdownMenuRadioGroup=T;const q=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.RadioItem,i({},p,t,{ref:o}))}));exports.DropdownMenuRadioItem=q;const S=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.ItemIndicator,i({},p,t,{ref:o}))}));exports.DropdownMenuItemIndicator=S;const k=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.Separator,i({},p,t,{ref:o}))}));exports.DropdownMenuSeparator=k;const A=/*#__PURE__*/d.forwardRef(((e,o)=>{const{__scopeDropdownMenu:n,...t}=e,p=m(n);/*#__PURE__*/return d.createElement(r.Arrow,i({},p,t,{ref:o}))}));exports.DropdownMenuArrow=A;const G=M;exports.Root=G;const P=_;exports.Trigger=P;const K=C;exports.Content=K;const L=E;exports.Group=L;const j=h;exports.Label=j;const F=O;exports.Item=F;const H=v;exports.TriggerItem=H;const z=y;exports.CheckboxItem=z;const B=T;exports.RadioGroup=B;const J=q;exports.RadioItem=J;const N=S;exports.ItemIndicator=N;const Q=k;exports.Separator=Q;const U=A;exports.Arrow=U;
1
+ var $7dQ7Q$babelruntimehelpersextends = require("@babel/runtime/helpers/extends");
2
+ var $7dQ7Q$react = require("react");
3
+ var $7dQ7Q$radixuiprimitive = require("@radix-ui/primitive");
4
+ var $7dQ7Q$radixuireactcomposerefs = require("@radix-ui/react-compose-refs");
5
+ var $7dQ7Q$radixuireactcontext = require("@radix-ui/react-context");
6
+ var $7dQ7Q$radixuireactusecontrollablestate = require("@radix-ui/react-use-controllable-state");
7
+ var $7dQ7Q$radixuireactprimitive = require("@radix-ui/react-primitive");
8
+ var $7dQ7Q$radixuireactmenu = require("@radix-ui/react-menu");
9
+ var $7dQ7Q$radixuireactid = require("@radix-ui/react-id");
10
+
11
+ function $parcel$exportWildcard(dest, source) {
12
+ Object.keys(source).forEach(function(key) {
13
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
14
+ return;
15
+ }
16
+
17
+ Object.defineProperty(dest, key, {
18
+ enumerable: true,
19
+ get: function get() {
20
+ return source[key];
21
+ }
22
+ });
23
+ });
24
+
25
+ return dest;
26
+ }
27
+ function $parcel$interopDefault(a) {
28
+ return a && a.__esModule ? a.default : a;
29
+ }
30
+ function $parcel$export(e, n, v, s) {
31
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
32
+ }
33
+ var $d1bf075a6b218014$exports = {};
34
+
35
+ $parcel$export($d1bf075a6b218014$exports, "createDropdownMenuScope", () => $d1bf075a6b218014$export$c0623cd925aeb687);
36
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenu", () => $d1bf075a6b218014$export$e44a253a59704894);
37
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuTrigger", () => $d1bf075a6b218014$export$d2469213b3befba9);
38
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuContent", () => $d1bf075a6b218014$export$6e76d93a37c01248);
39
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuGroup", () => $d1bf075a6b218014$export$246bebaba3a2f70e);
40
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuLabel", () => $d1bf075a6b218014$export$76e48c5b57f24495);
41
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuItem", () => $d1bf075a6b218014$export$ed97964d1871885d);
42
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuCheckboxItem", () => $d1bf075a6b218014$export$53a69729da201fa9);
43
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuRadioGroup", () => $d1bf075a6b218014$export$3323ad73d55f587e);
44
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuRadioItem", () => $d1bf075a6b218014$export$e4f69b41b1637536);
45
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuItemIndicator", () => $d1bf075a6b218014$export$42355ae145153fb6);
46
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuSeparator", () => $d1bf075a6b218014$export$da160178fd3bc7e9);
47
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuArrow", () => $d1bf075a6b218014$export$34b8980744021ec5);
48
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuSub", () => $d1bf075a6b218014$export$2f307d81a64f5442);
49
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuSubTrigger", () => $d1bf075a6b218014$export$21dcb7ec56f874cf);
50
+ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuSubContent", () => $d1bf075a6b218014$export$f34ec8bc2482cc5f);
51
+ $parcel$export($d1bf075a6b218014$exports, "Root", () => $d1bf075a6b218014$export$be92b6f5f03c0fe9);
52
+ $parcel$export($d1bf075a6b218014$exports, "Trigger", () => $d1bf075a6b218014$export$41fb9f06171c75f4);
53
+ $parcel$export($d1bf075a6b218014$exports, "Content", () => $d1bf075a6b218014$export$7c6e2c02157bb7d2);
54
+ $parcel$export($d1bf075a6b218014$exports, "Group", () => $d1bf075a6b218014$export$eb2fcfdbd7ba97d4);
55
+ $parcel$export($d1bf075a6b218014$exports, "Label", () => $d1bf075a6b218014$export$b04be29aa201d4f5);
56
+ $parcel$export($d1bf075a6b218014$exports, "Item", () => $d1bf075a6b218014$export$6d08773d2e66f8f2);
57
+ $parcel$export($d1bf075a6b218014$exports, "CheckboxItem", () => $d1bf075a6b218014$export$16ce288f89fa631c);
58
+ $parcel$export($d1bf075a6b218014$exports, "RadioGroup", () => $d1bf075a6b218014$export$a98f0dcb43a68a25);
59
+ $parcel$export($d1bf075a6b218014$exports, "RadioItem", () => $d1bf075a6b218014$export$371ab307eab489c0);
60
+ $parcel$export($d1bf075a6b218014$exports, "ItemIndicator", () => $d1bf075a6b218014$export$c3468e2714d175fa);
61
+ $parcel$export($d1bf075a6b218014$exports, "Separator", () => $d1bf075a6b218014$export$1ff3c3f08ae963c0);
62
+ $parcel$export($d1bf075a6b218014$exports, "Arrow", () => $d1bf075a6b218014$export$21b07c8f274aebd5);
63
+ $parcel$export($d1bf075a6b218014$exports, "Sub", () => $d1bf075a6b218014$export$d7a01e11500dfb6f);
64
+ $parcel$export($d1bf075a6b218014$exports, "SubTrigger", () => $d1bf075a6b218014$export$2ea8a7a591ac5eac);
65
+ $parcel$export($d1bf075a6b218014$exports, "SubContent", () => $d1bf075a6b218014$export$6d4de93b380beddf);
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ /* -------------------------------------------------------------------------------------------------
77
+ * DropdownMenu
78
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$DROPDOWN_MENU_NAME = 'DropdownMenu';
79
+ const [$d1bf075a6b218014$var$createDropdownMenuContext, $d1bf075a6b218014$export$c0623cd925aeb687] = $7dQ7Q$radixuireactcontext.createContextScope($d1bf075a6b218014$var$DROPDOWN_MENU_NAME, [
80
+ $7dQ7Q$radixuireactmenu.createMenuScope
81
+ ]);
82
+ const $d1bf075a6b218014$var$useMenuScope = $7dQ7Q$radixuireactmenu.createMenuScope();
83
+ const [$d1bf075a6b218014$var$DropdownMenuProvider, $d1bf075a6b218014$var$useDropdownMenuContext] = $d1bf075a6b218014$var$createDropdownMenuContext($d1bf075a6b218014$var$DROPDOWN_MENU_NAME);
84
+ const $d1bf075a6b218014$export$e44a253a59704894 = (props)=>{
85
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true , allowPinchZoom: allowPinchZoom } = props;
86
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
87
+ const triggerRef = $7dQ7Q$react.useRef(null);
88
+ const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
89
+ prop: openProp,
90
+ defaultProp: defaultOpen,
91
+ onChange: onOpenChange
92
+ });
93
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuProvider, {
94
+ scope: __scopeDropdownMenu,
95
+ triggerId: $7dQ7Q$radixuireactid.useId(),
96
+ triggerRef: triggerRef,
97
+ contentId: $7dQ7Q$radixuireactid.useId(),
98
+ open: open,
99
+ onOpenChange: setOpen,
100
+ onOpenToggle: $7dQ7Q$react.useCallback(()=>setOpen((prevOpen)=>!prevOpen
101
+ )
102
+ , [
103
+ setOpen
104
+ ]),
105
+ modal: modal
106
+ }, /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Root, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, {
107
+ open: open,
108
+ onOpenChange: setOpen,
109
+ dir: dir,
110
+ modal: modal,
111
+ allowPinchZoom: allowPinchZoom
112
+ }), children));
113
+ };
114
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$e44a253a59704894, {
115
+ displayName: $d1bf075a6b218014$var$DROPDOWN_MENU_NAME
116
+ });
117
+ /* -------------------------------------------------------------------------------------------------
118
+ * DropdownMenuTrigger
119
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$TRIGGER_NAME = 'DropdownMenuTrigger';
120
+ const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
121
+ const { __scopeDropdownMenu: __scopeDropdownMenu , disabled: disabled = false , ...triggerProps } = props;
122
+ const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$TRIGGER_NAME, __scopeDropdownMenu);
123
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
124
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Anchor, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
125
+ asChild: true
126
+ }, menuScope), /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactprimitive.Primitive.button, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
127
+ type: "button",
128
+ id: context.triggerId,
129
+ "aria-haspopup": "menu",
130
+ "aria-expanded": context.open ? true : undefined,
131
+ "aria-controls": context.open ? context.contentId : undefined,
132
+ "data-state": context.open ? 'open' : 'closed',
133
+ "data-disabled": disabled ? '' : undefined,
134
+ disabled: disabled
135
+ }, triggerProps, {
136
+ ref: $7dQ7Q$radixuireactcomposerefs.composeRefs(forwardedRef, context.triggerRef),
137
+ onPointerDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onPointerDown, (event)=>{
138
+ // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
139
+ // but not when the control key is pressed (avoiding MacOS right click)
140
+ if (!disabled && event.button === 0 && event.ctrlKey === false) {
141
+ context.onOpenToggle(); // prevent trigger focusing when opening
142
+ // this allows the content to be given focus without competition
143
+ if (!context.open) event.preventDefault();
144
+ }
145
+ }),
146
+ onKeyDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onKeyDown, (event)=>{
147
+ if (disabled) return;
148
+ if ([
149
+ 'Enter',
150
+ ' '
151
+ ].includes(event.key)) context.onOpenToggle();
152
+ if (event.key === 'ArrowDown') context.onOpenChange(true); // prevent keypresses from scrolling window
153
+ if ([
154
+ ' ',
155
+ 'ArrowDown'
156
+ ].includes(event.key)) event.preventDefault();
157
+ })
158
+ })));
159
+ });
160
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$d2469213b3befba9, {
161
+ displayName: $d1bf075a6b218014$var$TRIGGER_NAME
162
+ });
163
+ /* -------------------------------------------------------------------------------------------------
164
+ * DropdownMenuContent
165
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$CONTENT_NAME = 'DropdownMenuContent';
166
+ const $d1bf075a6b218014$export$6e76d93a37c01248 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
167
+ const { __scopeDropdownMenu: __scopeDropdownMenu , portalled: portalled = true , ...contentProps } = props;
168
+ const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$CONTENT_NAME, __scopeDropdownMenu);
169
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
170
+ const hasInteractedOutsideRef = $7dQ7Q$react.useRef(false);
171
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Content, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
172
+ id: context.contentId,
173
+ "aria-labelledby": context.triggerId
174
+ }, menuScope, contentProps, {
175
+ ref: forwardedRef,
176
+ portalled: portalled,
177
+ onCloseAutoFocus: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onCloseAutoFocus, (event)=>{
178
+ var _context$triggerRef$c;
179
+ if (!hasInteractedOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
180
+ hasInteractedOutsideRef.current = false; // Always prevent auto focus because we either focus manually or want user agent focus
181
+ event.preventDefault();
182
+ }),
183
+ onInteractOutside: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onInteractOutside, (event)=>{
184
+ const originalEvent = event.detail.originalEvent;
185
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
186
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
187
+ if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
188
+ }),
189
+ style: {
190
+ ...props.style,
191
+ // re-namespace exposed content custom property
192
+ ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
193
+ }
194
+ }));
195
+ });
196
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$6e76d93a37c01248, {
197
+ displayName: $d1bf075a6b218014$var$CONTENT_NAME
198
+ });
199
+ /* -------------------------------------------------------------------------------------------------
200
+ * DropdownMenuGroup
201
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$GROUP_NAME = 'DropdownMenuGroup';
202
+ const $d1bf075a6b218014$export$246bebaba3a2f70e = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
203
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...groupProps } = props;
204
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
205
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Group, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, groupProps, {
206
+ ref: forwardedRef
207
+ }));
208
+ });
209
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$246bebaba3a2f70e, {
210
+ displayName: $d1bf075a6b218014$var$GROUP_NAME
211
+ });
212
+ /* -------------------------------------------------------------------------------------------------
213
+ * DropdownMenuLabel
214
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$LABEL_NAME = 'DropdownMenuLabel';
215
+ const $d1bf075a6b218014$export$76e48c5b57f24495 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
216
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...labelProps } = props;
217
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
218
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Label, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, labelProps, {
219
+ ref: forwardedRef
220
+ }));
221
+ });
222
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$76e48c5b57f24495, {
223
+ displayName: $d1bf075a6b218014$var$LABEL_NAME
224
+ });
225
+ /* -------------------------------------------------------------------------------------------------
226
+ * DropdownMenuItem
227
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$ITEM_NAME = 'DropdownMenuItem';
228
+ const $d1bf075a6b218014$export$ed97964d1871885d = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
229
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...itemProps } = props;
230
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
231
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Item, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, itemProps, {
232
+ ref: forwardedRef
233
+ }));
234
+ });
235
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$ed97964d1871885d, {
236
+ displayName: $d1bf075a6b218014$var$ITEM_NAME
237
+ });
238
+ /* -------------------------------------------------------------------------------------------------
239
+ * DropdownMenuCheckboxItem
240
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';
241
+ const $d1bf075a6b218014$export$53a69729da201fa9 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
242
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...checkboxItemProps } = props;
243
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
244
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.CheckboxItem, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, checkboxItemProps, {
245
+ ref: forwardedRef
246
+ }));
247
+ });
248
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$53a69729da201fa9, {
249
+ displayName: $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME
250
+ });
251
+ /* -------------------------------------------------------------------------------------------------
252
+ * DropdownMenuRadioGroup
253
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';
254
+ const $d1bf075a6b218014$export$3323ad73d55f587e = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
255
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...radioGroupProps } = props;
256
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
257
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.RadioGroup, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, radioGroupProps, {
258
+ ref: forwardedRef
259
+ }));
260
+ });
261
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$3323ad73d55f587e, {
262
+ displayName: $d1bf075a6b218014$var$RADIO_GROUP_NAME
263
+ });
264
+ /* -------------------------------------------------------------------------------------------------
265
+ * DropdownMenuRadioItem
266
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$RADIO_ITEM_NAME = 'DropdownMenuRadioItem';
267
+ const $d1bf075a6b218014$export$e4f69b41b1637536 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
268
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...radioItemProps } = props;
269
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
270
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.RadioItem, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, radioItemProps, {
271
+ ref: forwardedRef
272
+ }));
273
+ });
274
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$e4f69b41b1637536, {
275
+ displayName: $d1bf075a6b218014$var$RADIO_ITEM_NAME
276
+ });
277
+ /* -------------------------------------------------------------------------------------------------
278
+ * DropdownMenuItemIndicator
279
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$INDICATOR_NAME = 'DropdownMenuItemIndicator';
280
+ const $d1bf075a6b218014$export$42355ae145153fb6 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
281
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...itemIndicatorProps } = props;
282
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
283
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.ItemIndicator, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, itemIndicatorProps, {
284
+ ref: forwardedRef
285
+ }));
286
+ });
287
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$42355ae145153fb6, {
288
+ displayName: $d1bf075a6b218014$var$INDICATOR_NAME
289
+ });
290
+ /* -------------------------------------------------------------------------------------------------
291
+ * DropdownMenuSeparator
292
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$SEPARATOR_NAME = 'DropdownMenuSeparator';
293
+ const $d1bf075a6b218014$export$da160178fd3bc7e9 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
294
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...separatorProps } = props;
295
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
296
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Separator, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, separatorProps, {
297
+ ref: forwardedRef
298
+ }));
299
+ });
300
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$da160178fd3bc7e9, {
301
+ displayName: $d1bf075a6b218014$var$SEPARATOR_NAME
302
+ });
303
+ /* -------------------------------------------------------------------------------------------------
304
+ * DropdownMenuArrow
305
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$ARROW_NAME = 'DropdownMenuArrow';
306
+ const $d1bf075a6b218014$export$34b8980744021ec5 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
307
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...arrowProps } = props;
308
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
309
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Arrow, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, arrowProps, {
310
+ ref: forwardedRef
311
+ }));
312
+ });
313
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$34b8980744021ec5, {
314
+ displayName: $d1bf075a6b218014$var$ARROW_NAME
315
+ });
316
+ /* -------------------------------------------------------------------------------------------------
317
+ * DropdownMenuSub
318
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$export$2f307d81a64f5442 = (props)=>{
319
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , open: openProp , onOpenChange: onOpenChange , defaultOpen: defaultOpen } = props;
320
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
321
+ const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
322
+ prop: openProp,
323
+ defaultProp: defaultOpen,
324
+ onChange: onOpenChange
325
+ });
326
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Sub, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, {
327
+ open: open,
328
+ onOpenChange: setOpen
329
+ }), children);
330
+ };
331
+ /* -------------------------------------------------------------------------------------------------
332
+ * DropdownMenuSubTrigger
333
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';
334
+ const $d1bf075a6b218014$export$21dcb7ec56f874cf = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
335
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subTriggerProps } = props;
336
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
337
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubTrigger, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, subTriggerProps, {
338
+ ref: forwardedRef
339
+ }));
340
+ });
341
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$21dcb7ec56f874cf, {
342
+ displayName: $d1bf075a6b218014$var$SUB_TRIGGER_NAME
343
+ });
344
+ /* -------------------------------------------------------------------------------------------------
345
+ * DropdownMenuSubContent
346
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$SUB_CONTENT_NAME = 'DropdownMenuSubContent';
347
+ const $d1bf075a6b218014$export$f34ec8bc2482cc5f = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
348
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subContentProps } = props;
349
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
350
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubContent, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, subContentProps, {
351
+ ref: forwardedRef,
352
+ style: {
353
+ ...props.style,
354
+ // re-namespace exposed content custom property
355
+ ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
356
+ }
357
+ }));
358
+ });
359
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$f34ec8bc2482cc5f, {
360
+ displayName: $d1bf075a6b218014$var$SUB_CONTENT_NAME
361
+ });
362
+ /* -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$export$be92b6f5f03c0fe9 = $d1bf075a6b218014$export$e44a253a59704894;
363
+ const $d1bf075a6b218014$export$41fb9f06171c75f4 = $d1bf075a6b218014$export$d2469213b3befba9;
364
+ const $d1bf075a6b218014$export$7c6e2c02157bb7d2 = $d1bf075a6b218014$export$6e76d93a37c01248;
365
+ const $d1bf075a6b218014$export$eb2fcfdbd7ba97d4 = $d1bf075a6b218014$export$246bebaba3a2f70e;
366
+ const $d1bf075a6b218014$export$b04be29aa201d4f5 = $d1bf075a6b218014$export$76e48c5b57f24495;
367
+ const $d1bf075a6b218014$export$6d08773d2e66f8f2 = $d1bf075a6b218014$export$ed97964d1871885d;
368
+ const $d1bf075a6b218014$export$16ce288f89fa631c = $d1bf075a6b218014$export$53a69729da201fa9;
369
+ const $d1bf075a6b218014$export$a98f0dcb43a68a25 = $d1bf075a6b218014$export$3323ad73d55f587e;
370
+ const $d1bf075a6b218014$export$371ab307eab489c0 = $d1bf075a6b218014$export$e4f69b41b1637536;
371
+ const $d1bf075a6b218014$export$c3468e2714d175fa = $d1bf075a6b218014$export$42355ae145153fb6;
372
+ const $d1bf075a6b218014$export$1ff3c3f08ae963c0 = $d1bf075a6b218014$export$da160178fd3bc7e9;
373
+ const $d1bf075a6b218014$export$21b07c8f274aebd5 = $d1bf075a6b218014$export$34b8980744021ec5;
374
+ const $d1bf075a6b218014$export$d7a01e11500dfb6f = $d1bf075a6b218014$export$2f307d81a64f5442;
375
+ const $d1bf075a6b218014$export$2ea8a7a591ac5eac = $d1bf075a6b218014$export$21dcb7ec56f874cf;
376
+ const $d1bf075a6b218014$export$6d4de93b380beddf = $d1bf075a6b218014$export$f34ec8bc2482cc5f;
377
+
378
+
379
+ $parcel$exportWildcard(module.exports, $d1bf075a6b218014$exports);
380
+
381
+
2
382
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":"IAAgCA,kaAAAA,8CAClBA,EAAEC,WAAaD,EAAEE,QAAUF,EAWzC,SAASG,EAAuBC,EAAMC,GAcpC,OAbAC,OAAOC,KAAKF,GAAQG,SAAQ,SAASC,GACvB,YAARA,GAA6B,eAARA,GAIzBH,OAAOI,eAAeN,EAAMK,EAAK,CAC/BE,YAAY,EACZC,IAAK,WACH,OAAOP,EAAOI,SAKbL,ECPT,MAGOS,EAA2BC,GAA2BC,EAHlC,eAKzB,CAACC,sCAEH,MAAMC,EAAeD,KAoBdE,EAAsBC,GAA0BN,EA3B5B,gBAwCrBO,EAA6CC,IACjD,MAAMC,oBAAEA,EAAFC,SAAuBA,EAAUC,KAAMC,EAAvCC,YAAiDA,EAAjDC,aAA8DA,GAAiBN,EAC/EO,EAAiBC,EA1CE,eA0CoCP,GACvDQ,EAAYb,EAAaK,IACxBE,GAAO,EAAOO,GAAWC,EAAqB,CACnDC,KAAMR,EACNS,YAAaR,EACbS,SAAUR,IAGNS,EAAmBC,EAAMC,aAAY,IAAMP,GAASQ,IAAcA,KAAW,CAACR,IAEpF,OAAOH,EAAeY,6BACpBC,EAAAC,cAACC,EAAD,CACEC,MAAOtB,EACPuB,YAAY,EACZrB,KAAMA,EACNG,aAAcI,EACde,aAAcV,gBAEdK,EAAAC,cAACK,EAAcC,IAAfC,EAAA,GAAuBnB,EAAvB,CAAkCN,KAAMA,EAAMG,aAAcI,IACzDR,iBAILkB,EAAAC,cAACQ,EAADD,EAAA,GAAsB5B,EAAtB,CAA6BG,KAAMA,EAAMG,aAAcI,EAASe,aAAcV,IAC3E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UxE,oBAChB,MAAM6B,EAAUN,oBAChB,MAAMqB,EAAQF,kBACd,MAAMK,EAAQF,kBACd,MAAMK,EAAOF,iBACb,MAAMyB,EAActB,wBACpB,MAAMK,EAAeF,yBACrB,MAAMK,EAAaF,uBACnB,MAAMK,EAAYF,sBAClB,MAAMK,EAAgBF,0BACtB,MAAMK,EAAYF,sBAClB,MAAMK,EAAQF","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./packages/react/dropdown-menu/src/DropdownMenu.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$reexport(e, n, v) {\n Object.defineProperty(e, n, {get: v, enumerable: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useId } from '@radix-ui/react-id';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps<P> = P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuRootContextValue = {\n isRootMenu: true;\n triggerId: string;\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\ntype DropdownMenuSubContextValue = {\n isRootMenu: false;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext<\n DropdownMenuRootContextValue | DropdownMenuSubContextValue\n>(DROPDOWN_MENU_NAME);\n\ninterface DropdownMenuProps {\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n children?: React.ReactNode;\n}\n\nconst DropdownMenu: React.FC<DropdownMenuProps> = (props: ScopedProps<DropdownMenuProps>) => {\n const { __scopeDropdownMenu, children, open: openProp, defaultOpen, onOpenChange } = props;\n const contentContext = useContentContext(DROPDOWN_MENU_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const handleOpenToggle = React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]);\n\n return contentContext.isInsideContent ? (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n isRootMenu={false}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={handleOpenToggle}\n >\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n </DropdownMenuProvider>\n ) : (\n <DropdownMenuRoot {...props} open={open} onOpenChange={setOpen} onOpenToggle={handleOpenToggle}>\n {children}\n </DropdownMenuRoot>\n );\n};\n\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ninterface DropdownMenuRootProps {\n dir?: Direction;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal?: boolean;\n children?: React.ReactNode;\n}\n\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (\n props: ScopedProps<DropdownMenuRootProps>\n) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open,\n onOpenChange,\n onOpenToggle,\n modal = true,\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n return (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n isRootMenu={true}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n open={open}\n onOpenChange={onOpenChange}\n onOpenToggle={onOpenToggle}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={onOpenChange}\n dir={dir}\n modal={modal}\n >\n {children}\n </MenuPrimitive.Root>\n </DropdownMenuProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n (props: ScopedProps<DropdownMenuTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return context.isRootMenu ? (\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n id={context.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={context.open ? true : undefined}\n aria-controls={context.open ? context.contentId : undefined}\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composeRefs(forwardedRef, context.triggerRef)}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) event.preventDefault();\n context.onOpenToggle();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onOpenToggle();\n if (event.key === 'ArrowDown') context.onOpenChange(true);\n // prevent keypresses from scrolling window\n if ([' ', 'ArrowDown'].includes(event.key)) event.preventDefault();\n })}\n />\n </MenuPrimitive.Anchor>\n ) : null;\n }\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\nconst [ContentProvider, useContentContext] = createDropdownMenuContext(CONTENT_NAME, {\n isInsideContent: false,\n});\n\ntype DropdownMenuContentElement =\n | DropdownMenuRootContentElement\n | React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface DropdownMenuContentProps extends DropdownMenuRootContentProps, MenuContentProps {}\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props: ScopedProps<DropdownMenuContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const commonProps = {\n ...contentProps,\n style: {\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-dropdown-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n },\n };\n\n return (\n <ContentProvider scope={__scopeDropdownMenu} isInsideContent={true}>\n {context.isRootMenu ? (\n <DropdownMenuRootContent\n __scopeDropdownMenu={__scopeDropdownMenu}\n {...commonProps}\n ref={forwardedRef}\n />\n ) : (\n <MenuPrimitive.Content {...menuScope} {...commonProps} ref={forwardedRef} />\n )}\n </ContentProvider>\n );\n }\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DropdownMenuRootContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ninterface DropdownMenuRootContentProps extends ScopedProps<MenuContentProps> {}\n\nconst DropdownMenuRootContent = React.forwardRef<\n DropdownMenuRootContentElement,\n DropdownMenuRootContentProps\n>((props, forwardedRef) => {\n const { __scopeDropdownMenu, portalled = true, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return context.isRootMenu ? (\n <MenuPrimitive.Content\n id={context.contentId}\n aria-labelledby={context.triggerId}\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n portalled={portalled}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n })}\n />\n ) : null;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n (props: ScopedProps<DropdownMenuGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n (props: ScopedProps<DropdownMenuLabelProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props: ScopedProps<DropdownMenuItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTriggerItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_ITEM_NAME = 'DropdownMenuTriggerItem';\n\ntype DropdownMenuTriggerItemElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface DropdownMenuTriggerItemProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuTriggerItem = React.forwardRef<\n DropdownMenuTriggerItemElement,\n DropdownMenuTriggerItemProps\n>((props: ScopedProps<DropdownMenuTriggerItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuTriggerItem.displayName = TRIGGER_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props: ScopedProps<DropdownMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>((props: ScopedProps<DropdownMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props: ScopedProps<DropdownMenuRadioItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = React.forwardRef<\n DropdownMenuItemIndicatorElement,\n DropdownMenuItemIndicatorProps\n>((props: ScopedProps<DropdownMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>((props: ScopedProps<DropdownMenuSeparatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = React.forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n (props: ScopedProps<DropdownMenuArrowProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = DropdownMenu;\nconst Trigger = DropdownMenuTrigger;\nconst Content = DropdownMenuContent;\nconst Group = DropdownMenuGroup;\nconst Label = DropdownMenuLabel;\nconst Item = DropdownMenuItem;\nconst TriggerItem = DropdownMenuTriggerItem;\nconst CheckboxItem = DropdownMenuCheckboxItem;\nconst RadioGroup = DropdownMenuRadioGroup;\nconst RadioItem = DropdownMenuRadioItem;\nconst ItemIndicator = DropdownMenuItemIndicator;\nconst Separator = DropdownMenuSeparator;\nconst Arrow = DropdownMenuArrow;\n\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuTriggerItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\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 DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuTriggerItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n};\n"],"names":["a","__esModule","default","$parcel$exportWildcard","dest","source","Object","keys","forEach","key","defineProperty","enumerable","get","createDropdownMenuContext","createDropdownMenuScope","createContextScope","createMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","open","openProp","defaultOpen","onOpenChange","contentContext","useContentContext","menuScope","setOpen","useControllableState","prop","defaultProp","onChange","handleOpenToggle","React","useCallback","prevOpen","isInsideContent","_react","createElement","$e185b8015793f9eefe208950c9dca8be$var$DropdownMenuProvider","scope","isRootMenu","onOpenToggle","_radixUiReactMenu","Sub","_babelRuntimeHelpersExtends","$e185b8015793f9eefe208950c9dca8be$var$DropdownMenuRoot","DropdownMenuRoot","dir","modal","triggerRef","useRef","triggerId","useId","contentId","Root","DropdownMenuTrigger","forwardRef","forwardedRef","disabled","triggerProps","context","Anchor","asChild","Primitive","button","type","id","undefined","ref","composeRefs","onPointerDown","composeEventHandlers","event","ctrlKey","preventDefault","onKeyDown","includes","ContentProvider","DropdownMenuContent","contentProps","commonProps","style","$e185b8015793f9eefe208950c9dca8be$var$ContentProvider","$e185b8015793f9eefe208950c9dca8be$var$DropdownMenuRootContent","Content","DropdownMenuRootContent","portalled","hasInteractedOutsideRef","onCloseAutoFocus","_context$triggerRef$c","current","focus","onInteractOutside","originalEvent","detail","ctrlLeftClick","isRightClick","DropdownMenuGroup","groupProps","Group","DropdownMenuLabel","labelProps","Label","DropdownMenuItem","itemProps","Item","DropdownMenuTriggerItem","triggerItemProps","SubTrigger","DropdownMenuCheckboxItem","checkboxItemProps","CheckboxItem","DropdownMenuRadioGroup","radioGroupProps","RadioGroup","DropdownMenuRadioItem","radioItemProps","RadioItem","DropdownMenuItemIndicator","itemIndicatorProps","ItemIndicator","DropdownMenuSeparator","separatorProps","Separator","DropdownMenuArrow","arrowProps","Arrow","Trigger","TriggerItem"],"version":3,"file":"index.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;ACeA;;oGAEA,CAEA,MAAMS,wCAAkB,GAAG,cAA3B,AAAA;AAGA,MAAM,CAACC,+CAAD,EAA4BC,yCAA5B,CAAA,GAAuDR,6CAAkB,CAC7EM,wCAD6E,EAE7E;IAACF,uCAAD;CAF6E,CAA/E,AAAA;AAIA,MAAMK,kCAAY,GAAGL,uCAAe,EAApC,AAAA;AAYA,MAAM,CAACM,0CAAD,EAAuBC,4CAAvB,CAAA,GACJJ,+CAAyB,CAA2BD,wCAA3B,CAD3B,AAAA;AAiBA,MAAMM,yCAAyC,GAAIC,CAAAA,KAAD,GAA2C;IAC3F,MAAM,E,qBACJC,mBADI,CAAA,E,UAEJC,QAFI,CAAA,E,KAGJC,GAHI,CAAA,EAIJC,IAAI,EAAEC,QAJF,CAAA,E,aAKJC,WALI,CAAA,E,cAMJC,YANI,CAAA,SAOJC,KAAK,GAAG,IAPJ,G,gBAQJC,cAAAA,CAAAA,EARI,GASFT,KATJ,AAAM;IAUN,MAAMU,SAAS,GAAGd,kCAAY,CAACK,mBAAD,CAA9B,AAAA;IACA,MAAMU,UAAU,GAAG3B,mBAAA,CAAgC,IAAhC,CAAnB,AAAA;IACA,MAAM,CAACoB,IAAI,GAAG,KAAR,EAAeS,OAAf,CAAA,GA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,GAAGxB,yCAAtB,AAAA;AACA,MAAMyB,yCAAS,GAAGtB,yCAAlB,AAAA;AACA,MAAMuB,yCAAK,GAAGpB,yCAAd,AAAA;AACA,MAAMqB,yCAAG,GAAGnB,yCAAZ,AAAA;AACA,MAAMoB,yCAAU,GAAGlB,yCAAnB,AAAA;AACA,MAAMmB,yCAAU,GAAGhB,yCAAnB,AAAA;;ADzeA","sources":["packages/react/dropdown-menu/src/index.ts","packages/react/dropdown-menu/src/DropdownMenu.tsx"],"sourcesContent":["export * from './DropdownMenu';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useId } from '@radix-ui/react-id';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps<P> = P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuContextValue = {\n triggerId: string;\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] =\n createDropdownMenuContext<DropdownMenuContextValue>(DROPDOWN_MENU_NAME);\n\ntype MenuRootProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Root>;\ninterface DropdownMenuProps {\n children?: React.ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: MenuRootProps['allowPinchZoom'];\n}\n\nconst DropdownMenu: React.FC<DropdownMenuProps> = (props: ScopedProps<DropdownMenuProps>) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n allowPinchZoom,\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={setOpen}\n dir={dir}\n modal={modal}\n allowPinchZoom={allowPinchZoom}\n >\n {children}\n </MenuPrimitive.Root>\n </DropdownMenuProvider>\n );\n};\n\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n (props: ScopedProps<DropdownMenuTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return (\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n id={context.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={context.open ? true : undefined}\n aria-controls={context.open ? context.contentId : undefined}\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composeRefs(forwardedRef, context.triggerRef)}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onOpenToggle();\n if (event.key === 'ArrowDown') context.onOpenChange(true);\n // prevent keypresses from scrolling window\n if ([' ', 'ArrowDown'].includes(event.key)) event.preventDefault();\n })}\n />\n </MenuPrimitive.Anchor>\n );\n }\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\ntype DropdownMenuContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface DropdownMenuContentProps extends MenuContentProps {}\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props: ScopedProps<DropdownMenuContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, portalled = true, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n id={context.contentId}\n aria-labelledby={context.triggerId}\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n portalled={portalled}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n })}\n style={{\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-dropdown-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n }\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n (props: ScopedProps<DropdownMenuGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n (props: ScopedProps<DropdownMenuLabelProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props: ScopedProps<DropdownMenuItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props: ScopedProps<DropdownMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>((props: ScopedProps<DropdownMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props: ScopedProps<DropdownMenuRadioItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = React.forwardRef<\n DropdownMenuItemIndicatorElement,\n DropdownMenuItemIndicatorProps\n>((props: ScopedProps<DropdownMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>((props: ScopedProps<DropdownMenuSeparatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = React.forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n (props: ScopedProps<DropdownMenuArrowProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DropdownMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = (\n props: ScopedProps<DropdownMenuSubProps>\n) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, 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\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props: ScopedProps<DropdownMenuSubTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...subTriggerProps} ref={forwardedRef} />;\n});\n\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'DropdownMenuSubContent';\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps extends MenuSubContentProps {}\n\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props: ScopedProps<DropdownMenuSubContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\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-dropdown-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n});\n\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = DropdownMenu;\nconst Trigger = DropdownMenuTrigger;\nconst Content = DropdownMenuContent;\nconst Group = DropdownMenuGroup;\nconst Label = DropdownMenuLabel;\nconst Item = DropdownMenuItem;\nconst CheckboxItem = DropdownMenuCheckboxItem;\nconst RadioGroup = DropdownMenuRadioGroup;\nconst RadioItem = DropdownMenuRadioItem;\nconst ItemIndicator = DropdownMenuItemIndicator;\nconst Separator = DropdownMenuSeparator;\nconst Arrow = DropdownMenuArrow;\nconst Sub = DropdownMenuSub;\nconst SubTrigger = DropdownMenuSubTrigger;\nconst SubContent = DropdownMenuSubContent;\n\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n //\n Root,\n Trigger,\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 DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n"],"names":["React","composeEventHandlers","composeRefs","createContextScope","useControllableState","Primitive","MenuPrimitive","createMenuScope","useId","DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","dir","open","openProp","defaultOpen","onOpenChange","modal","allowPinchZoom","menuScope","triggerRef","useRef","setOpen","prop","defaultProp","onChange","useCallback","prevOpen","TRIGGER_NAME","DropdownMenuTrigger","forwardRef","forwardedRef","disabled","triggerProps","context","triggerId","undefined","contentId","onPointerDown","event","button","ctrlKey","onOpenToggle","preventDefault","onKeyDown","includes","key","CONTENT_NAME","DropdownMenuContent","portalled","contentProps","hasInteractedOutsideRef","onCloseAutoFocus","current","focus","onInteractOutside","originalEvent","detail","ctrlLeftClick","isRightClick","style","GROUP_NAME","DropdownMenuGroup","groupProps","LABEL_NAME","DropdownMenuLabel","labelProps","ITEM_NAME","DropdownMenuItem","itemProps","CHECKBOX_ITEM_NAME","DropdownMenuCheckboxItem","checkboxItemProps","RADIO_GROUP_NAME","DropdownMenuRadioGroup","radioGroupProps","RADIO_ITEM_NAME","DropdownMenuRadioItem","radioItemProps","INDICATOR_NAME","DropdownMenuItemIndicator","itemIndicatorProps","SEPARATOR_NAME","DropdownMenuSeparator","separatorProps","ARROW_NAME","DropdownMenuArrow","arrowProps","DropdownMenuSub","SUB_TRIGGER_NAME","DropdownMenuSubTrigger","subTriggerProps","SUB_CONTENT_NAME","DropdownMenuSubContent","subContentProps","Root","Trigger","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent"],"version":3,"file":"index.js.map"}
@@ -1,2 +1,363 @@
1
- import{useId as e}from"@radix-ui/react-id";import*as o from"@radix-ui/react-menu";import{createMenuScope as n}from"@radix-ui/react-menu";import{Primitive as r}from"@radix-ui/react-primitive";import{useControllableState as t}from"@radix-ui/react-use-controllable-state";import{createContextScope as p}from"@radix-ui/react-context";import{composeRefs as d}from"@radix-ui/react-compose-refs";import{composeEventHandlers as a}from"@radix-ui/primitive";import*as c from"react";import u from"@babel/runtime/helpers/esm/extends";const[s,i]=p("DropdownMenu",[n]);export{i as createDropdownMenuScope};const l=n(),[m,w]=s("DropdownMenu");export const DropdownMenu=e=>{const{__scopeDropdownMenu:n,children:r,open:p,defaultOpen:d,onOpenChange:a}=e,s=M("DropdownMenu",n),i=l(n),[w=!1,D]=t({prop:p,defaultProp:d,onChange:a}),g=c.useCallback((()=>D((e=>!e))),[D]);return s.isInsideContent?/*#__PURE__*/c.createElement(m,{scope:n,isRootMenu:!1,open:w,onOpenChange:D,onOpenToggle:g},/*#__PURE__*/c.createElement(o.Sub,u({},i,{open:w,onOpenChange:D}),r)):/*#__PURE__*/c.createElement(f,u({},e,{open:w,onOpenChange:D,onOpenToggle:g}),r)};/*#__PURE__*/const f=n=>{const{__scopeDropdownMenu:r,children:t,dir:p,open:d,onOpenChange:a,onOpenToggle:s,modal:i=!0}=n,w=l(r),f=c.useRef(null);/*#__PURE__*/return c.createElement(m,{scope:r,isRootMenu:!0,triggerId:e(),triggerRef:f,contentId:e(),open:d,onOpenChange:a,onOpenToggle:s,modal:i},/*#__PURE__*/c.createElement(o.Root,u({},w,{open:d,onOpenChange:a,dir:p,modal:i}),t))};export const DropdownMenuTrigger=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,disabled:p=!1,...s}=e,i=w("DropdownMenuTrigger",t),m=l(t);return i.isRootMenu?/*#__PURE__*/c.createElement(o.Anchor,u({asChild:!0},m),/*#__PURE__*/c.createElement(r.button,u({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":!!i.open||void 0,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":p?"":void 0,disabled:p},s,{ref:d(n,i.triggerRef),onPointerDown:a(e.onPointerDown,(e=>{p||0!==e.button||!1!==e.ctrlKey||(i.open||e.preventDefault(),i.onOpenToggle())})),onKeyDown:a(e.onKeyDown,(e=>{p||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault())}))}))):null}));/*#__PURE__*/const[D,M]=s("DropdownMenuContent",{isInsideContent:!1});export const DropdownMenuContent=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=w("DropdownMenuContent",r),d=l(r),a={...t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};/*#__PURE__*/return c.createElement(D,{scope:r,isInsideContent:!0},p.isRootMenu?/*#__PURE__*/c.createElement(g,u({__scopeDropdownMenu:r},a,{ref:n})):/*#__PURE__*/c.createElement(o.Content,u({},d,a,{ref:n})))}));/*#__PURE__*/const g=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,portalled:t=!0,...p}=e,d=w("DropdownMenuContent",r),s=l(r),i=c.useRef(!1);return d.isRootMenu?/*#__PURE__*/c.createElement(o.Content,u({id:d.contentId,"aria-labelledby":d.triggerId},s,p,{ref:n,portalled:t,onCloseAutoFocus:a(e.onCloseAutoFocus,(e=>{var o;i.current||null===(o=d.triggerRef.current)||void 0===o||o.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:a(e.onInteractOutside,(e=>{const o=e.detail.originalEvent,n=0===o.button&&!0===o.ctrlKey,r=2===o.button||n;d.modal&&!r||(i.current=!0)}))})):null}));export const DropdownMenuGroup=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.Group,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuLabel=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.Label,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuItem=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.Item,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuTriggerItem=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.SubTrigger,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuCheckboxItem=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.CheckboxItem,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuRadioGroup=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.RadioGroup,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuRadioItem=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.RadioItem,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuItemIndicator=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.ItemIndicator,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuSeparator=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.Separator,u({},p,t,{ref:n}))}));/*#__PURE__*/export const DropdownMenuArrow=/*#__PURE__*/c.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);/*#__PURE__*/return c.createElement(o.Arrow,u({},p,t,{ref:n}))}));/*#__PURE__*/export const Root=DropdownMenu;export const Trigger=DropdownMenuTrigger;export const Content=DropdownMenuContent;export const Group=DropdownMenuGroup;export const Label=DropdownMenuLabel;export const Item=DropdownMenuItem;export const TriggerItem=DropdownMenuTriggerItem;export const CheckboxItem=DropdownMenuCheckboxItem;export const RadioGroup=DropdownMenuRadioGroup;export const RadioItem=DropdownMenuRadioItem;export const ItemIndicator=DropdownMenuItemIndicator;export const Separator=DropdownMenuSeparator;export const Arrow=DropdownMenuArrow;
1
+ import $9kmUS$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";
2
+ import {useRef as $9kmUS$useRef, createElement as $9kmUS$createElement, useCallback as $9kmUS$useCallback, forwardRef as $9kmUS$forwardRef} from "react";
3
+ import {composeEventHandlers as $9kmUS$composeEventHandlers} from "@radix-ui/primitive";
4
+ import {composeRefs as $9kmUS$composeRefs} from "@radix-ui/react-compose-refs";
5
+ import {createContextScope as $9kmUS$createContextScope} from "@radix-ui/react-context";
6
+ import {useControllableState as $9kmUS$useControllableState} from "@radix-ui/react-use-controllable-state";
7
+ import {Primitive as $9kmUS$Primitive} from "@radix-ui/react-primitive";
8
+ import {createMenuScope as $9kmUS$createMenuScope, Root as $9kmUS$Root, Anchor as $9kmUS$Anchor, Content as $9kmUS$Content, Group as $9kmUS$Group, Label as $9kmUS$Label, Item as $9kmUS$Item, CheckboxItem as $9kmUS$CheckboxItem, RadioGroup as $9kmUS$RadioGroup, RadioItem as $9kmUS$RadioItem, ItemIndicator as $9kmUS$ItemIndicator, Separator as $9kmUS$Separator, Arrow as $9kmUS$Arrow, Sub as $9kmUS$Sub, SubTrigger as $9kmUS$SubTrigger, SubContent as $9kmUS$SubContent} from "@radix-ui/react-menu";
9
+ import {useId as $9kmUS$useId} from "@radix-ui/react-id";
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+ var $d08ef79370b62062$exports = {};
15
+
16
+ $parcel$export($d08ef79370b62062$exports, "createDropdownMenuScope", () => $d08ef79370b62062$export$c0623cd925aeb687);
17
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenu", () => $d08ef79370b62062$export$e44a253a59704894);
18
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuTrigger", () => $d08ef79370b62062$export$d2469213b3befba9);
19
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuContent", () => $d08ef79370b62062$export$6e76d93a37c01248);
20
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuGroup", () => $d08ef79370b62062$export$246bebaba3a2f70e);
21
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuLabel", () => $d08ef79370b62062$export$76e48c5b57f24495);
22
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuItem", () => $d08ef79370b62062$export$ed97964d1871885d);
23
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuCheckboxItem", () => $d08ef79370b62062$export$53a69729da201fa9);
24
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuRadioGroup", () => $d08ef79370b62062$export$3323ad73d55f587e);
25
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuRadioItem", () => $d08ef79370b62062$export$e4f69b41b1637536);
26
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuItemIndicator", () => $d08ef79370b62062$export$42355ae145153fb6);
27
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuSeparator", () => $d08ef79370b62062$export$da160178fd3bc7e9);
28
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuArrow", () => $d08ef79370b62062$export$34b8980744021ec5);
29
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuSub", () => $d08ef79370b62062$export$2f307d81a64f5442);
30
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuSubTrigger", () => $d08ef79370b62062$export$21dcb7ec56f874cf);
31
+ $parcel$export($d08ef79370b62062$exports, "DropdownMenuSubContent", () => $d08ef79370b62062$export$f34ec8bc2482cc5f);
32
+ $parcel$export($d08ef79370b62062$exports, "Root", () => $d08ef79370b62062$export$be92b6f5f03c0fe9);
33
+ $parcel$export($d08ef79370b62062$exports, "Trigger", () => $d08ef79370b62062$export$41fb9f06171c75f4);
34
+ $parcel$export($d08ef79370b62062$exports, "Content", () => $d08ef79370b62062$export$7c6e2c02157bb7d2);
35
+ $parcel$export($d08ef79370b62062$exports, "Group", () => $d08ef79370b62062$export$eb2fcfdbd7ba97d4);
36
+ $parcel$export($d08ef79370b62062$exports, "Label", () => $d08ef79370b62062$export$b04be29aa201d4f5);
37
+ $parcel$export($d08ef79370b62062$exports, "Item", () => $d08ef79370b62062$export$6d08773d2e66f8f2);
38
+ $parcel$export($d08ef79370b62062$exports, "CheckboxItem", () => $d08ef79370b62062$export$16ce288f89fa631c);
39
+ $parcel$export($d08ef79370b62062$exports, "RadioGroup", () => $d08ef79370b62062$export$a98f0dcb43a68a25);
40
+ $parcel$export($d08ef79370b62062$exports, "RadioItem", () => $d08ef79370b62062$export$371ab307eab489c0);
41
+ $parcel$export($d08ef79370b62062$exports, "ItemIndicator", () => $d08ef79370b62062$export$c3468e2714d175fa);
42
+ $parcel$export($d08ef79370b62062$exports, "Separator", () => $d08ef79370b62062$export$1ff3c3f08ae963c0);
43
+ $parcel$export($d08ef79370b62062$exports, "Arrow", () => $d08ef79370b62062$export$21b07c8f274aebd5);
44
+ $parcel$export($d08ef79370b62062$exports, "Sub", () => $d08ef79370b62062$export$d7a01e11500dfb6f);
45
+ $parcel$export($d08ef79370b62062$exports, "SubTrigger", () => $d08ef79370b62062$export$2ea8a7a591ac5eac);
46
+ $parcel$export($d08ef79370b62062$exports, "SubContent", () => $d08ef79370b62062$export$6d4de93b380beddf);
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+ /* -------------------------------------------------------------------------------------------------
58
+ * DropdownMenu
59
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$DROPDOWN_MENU_NAME = 'DropdownMenu';
60
+ const [$d08ef79370b62062$var$createDropdownMenuContext, $d08ef79370b62062$export$c0623cd925aeb687] = $9kmUS$createContextScope($d08ef79370b62062$var$DROPDOWN_MENU_NAME, [
61
+ $9kmUS$createMenuScope
62
+ ]);
63
+ const $d08ef79370b62062$var$useMenuScope = $9kmUS$createMenuScope();
64
+ const [$d08ef79370b62062$var$DropdownMenuProvider, $d08ef79370b62062$var$useDropdownMenuContext] = $d08ef79370b62062$var$createDropdownMenuContext($d08ef79370b62062$var$DROPDOWN_MENU_NAME);
65
+ const $d08ef79370b62062$export$e44a253a59704894 = (props)=>{
66
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true , allowPinchZoom: allowPinchZoom } = props;
67
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
68
+ const triggerRef = $9kmUS$useRef(null);
69
+ const [open = false, setOpen] = $9kmUS$useControllableState({
70
+ prop: openProp,
71
+ defaultProp: defaultOpen,
72
+ onChange: onOpenChange
73
+ });
74
+ return /*#__PURE__*/ $9kmUS$createElement($d08ef79370b62062$var$DropdownMenuProvider, {
75
+ scope: __scopeDropdownMenu,
76
+ triggerId: $9kmUS$useId(),
77
+ triggerRef: triggerRef,
78
+ contentId: $9kmUS$useId(),
79
+ open: open,
80
+ onOpenChange: setOpen,
81
+ onOpenToggle: $9kmUS$useCallback(()=>setOpen((prevOpen)=>!prevOpen
82
+ )
83
+ , [
84
+ setOpen
85
+ ]),
86
+ modal: modal
87
+ }, /*#__PURE__*/ $9kmUS$createElement($9kmUS$Root, $9kmUS$babelruntimehelpersesmextends({}, menuScope, {
88
+ open: open,
89
+ onOpenChange: setOpen,
90
+ dir: dir,
91
+ modal: modal,
92
+ allowPinchZoom: allowPinchZoom
93
+ }), children));
94
+ };
95
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$e44a253a59704894, {
96
+ displayName: $d08ef79370b62062$var$DROPDOWN_MENU_NAME
97
+ });
98
+ /* -------------------------------------------------------------------------------------------------
99
+ * DropdownMenuTrigger
100
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$TRIGGER_NAME = 'DropdownMenuTrigger';
101
+ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
102
+ const { __scopeDropdownMenu: __scopeDropdownMenu , disabled: disabled = false , ...triggerProps } = props;
103
+ const context = $d08ef79370b62062$var$useDropdownMenuContext($d08ef79370b62062$var$TRIGGER_NAME, __scopeDropdownMenu);
104
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
105
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Anchor, $9kmUS$babelruntimehelpersesmextends({
106
+ asChild: true
107
+ }, menuScope), /*#__PURE__*/ $9kmUS$createElement($9kmUS$Primitive.button, $9kmUS$babelruntimehelpersesmextends({
108
+ type: "button",
109
+ id: context.triggerId,
110
+ "aria-haspopup": "menu",
111
+ "aria-expanded": context.open ? true : undefined,
112
+ "aria-controls": context.open ? context.contentId : undefined,
113
+ "data-state": context.open ? 'open' : 'closed',
114
+ "data-disabled": disabled ? '' : undefined,
115
+ disabled: disabled
116
+ }, triggerProps, {
117
+ ref: $9kmUS$composeRefs(forwardedRef, context.triggerRef),
118
+ onPointerDown: $9kmUS$composeEventHandlers(props.onPointerDown, (event)=>{
119
+ // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
120
+ // but not when the control key is pressed (avoiding MacOS right click)
121
+ if (!disabled && event.button === 0 && event.ctrlKey === false) {
122
+ context.onOpenToggle(); // prevent trigger focusing when opening
123
+ // this allows the content to be given focus without competition
124
+ if (!context.open) event.preventDefault();
125
+ }
126
+ }),
127
+ onKeyDown: $9kmUS$composeEventHandlers(props.onKeyDown, (event)=>{
128
+ if (disabled) return;
129
+ if ([
130
+ 'Enter',
131
+ ' '
132
+ ].includes(event.key)) context.onOpenToggle();
133
+ if (event.key === 'ArrowDown') context.onOpenChange(true); // prevent keypresses from scrolling window
134
+ if ([
135
+ ' ',
136
+ 'ArrowDown'
137
+ ].includes(event.key)) event.preventDefault();
138
+ })
139
+ })));
140
+ });
141
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$d2469213b3befba9, {
142
+ displayName: $d08ef79370b62062$var$TRIGGER_NAME
143
+ });
144
+ /* -------------------------------------------------------------------------------------------------
145
+ * DropdownMenuContent
146
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$CONTENT_NAME = 'DropdownMenuContent';
147
+ const $d08ef79370b62062$export$6e76d93a37c01248 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
148
+ const { __scopeDropdownMenu: __scopeDropdownMenu , portalled: portalled = true , ...contentProps } = props;
149
+ const context = $d08ef79370b62062$var$useDropdownMenuContext($d08ef79370b62062$var$CONTENT_NAME, __scopeDropdownMenu);
150
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
151
+ const hasInteractedOutsideRef = $9kmUS$useRef(false);
152
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Content, $9kmUS$babelruntimehelpersesmextends({
153
+ id: context.contentId,
154
+ "aria-labelledby": context.triggerId
155
+ }, menuScope, contentProps, {
156
+ ref: forwardedRef,
157
+ portalled: portalled,
158
+ onCloseAutoFocus: $9kmUS$composeEventHandlers(props.onCloseAutoFocus, (event)=>{
159
+ var _context$triggerRef$c;
160
+ if (!hasInteractedOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
161
+ hasInteractedOutsideRef.current = false; // Always prevent auto focus because we either focus manually or want user agent focus
162
+ event.preventDefault();
163
+ }),
164
+ onInteractOutside: $9kmUS$composeEventHandlers(props.onInteractOutside, (event)=>{
165
+ const originalEvent = event.detail.originalEvent;
166
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
167
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
168
+ if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
169
+ }),
170
+ style: {
171
+ ...props.style,
172
+ // re-namespace exposed content custom property
173
+ ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
174
+ }
175
+ }));
176
+ });
177
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$6e76d93a37c01248, {
178
+ displayName: $d08ef79370b62062$var$CONTENT_NAME
179
+ });
180
+ /* -------------------------------------------------------------------------------------------------
181
+ * DropdownMenuGroup
182
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$GROUP_NAME = 'DropdownMenuGroup';
183
+ const $d08ef79370b62062$export$246bebaba3a2f70e = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
184
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...groupProps } = props;
185
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
186
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Group, $9kmUS$babelruntimehelpersesmextends({}, menuScope, groupProps, {
187
+ ref: forwardedRef
188
+ }));
189
+ });
190
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$246bebaba3a2f70e, {
191
+ displayName: $d08ef79370b62062$var$GROUP_NAME
192
+ });
193
+ /* -------------------------------------------------------------------------------------------------
194
+ * DropdownMenuLabel
195
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$LABEL_NAME = 'DropdownMenuLabel';
196
+ const $d08ef79370b62062$export$76e48c5b57f24495 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
197
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...labelProps } = props;
198
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
199
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Label, $9kmUS$babelruntimehelpersesmextends({}, menuScope, labelProps, {
200
+ ref: forwardedRef
201
+ }));
202
+ });
203
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$76e48c5b57f24495, {
204
+ displayName: $d08ef79370b62062$var$LABEL_NAME
205
+ });
206
+ /* -------------------------------------------------------------------------------------------------
207
+ * DropdownMenuItem
208
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$ITEM_NAME = 'DropdownMenuItem';
209
+ const $d08ef79370b62062$export$ed97964d1871885d = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
210
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...itemProps } = props;
211
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
212
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Item, $9kmUS$babelruntimehelpersesmextends({}, menuScope, itemProps, {
213
+ ref: forwardedRef
214
+ }));
215
+ });
216
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$ed97964d1871885d, {
217
+ displayName: $d08ef79370b62062$var$ITEM_NAME
218
+ });
219
+ /* -------------------------------------------------------------------------------------------------
220
+ * DropdownMenuCheckboxItem
221
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';
222
+ const $d08ef79370b62062$export$53a69729da201fa9 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
223
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...checkboxItemProps } = props;
224
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
225
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$CheckboxItem, $9kmUS$babelruntimehelpersesmextends({}, menuScope, checkboxItemProps, {
226
+ ref: forwardedRef
227
+ }));
228
+ });
229
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$53a69729da201fa9, {
230
+ displayName: $d08ef79370b62062$var$CHECKBOX_ITEM_NAME
231
+ });
232
+ /* -------------------------------------------------------------------------------------------------
233
+ * DropdownMenuRadioGroup
234
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';
235
+ const $d08ef79370b62062$export$3323ad73d55f587e = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
236
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...radioGroupProps } = props;
237
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
238
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$RadioGroup, $9kmUS$babelruntimehelpersesmextends({}, menuScope, radioGroupProps, {
239
+ ref: forwardedRef
240
+ }));
241
+ });
242
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$3323ad73d55f587e, {
243
+ displayName: $d08ef79370b62062$var$RADIO_GROUP_NAME
244
+ });
245
+ /* -------------------------------------------------------------------------------------------------
246
+ * DropdownMenuRadioItem
247
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$RADIO_ITEM_NAME = 'DropdownMenuRadioItem';
248
+ const $d08ef79370b62062$export$e4f69b41b1637536 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
249
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...radioItemProps } = props;
250
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
251
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$RadioItem, $9kmUS$babelruntimehelpersesmextends({}, menuScope, radioItemProps, {
252
+ ref: forwardedRef
253
+ }));
254
+ });
255
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$e4f69b41b1637536, {
256
+ displayName: $d08ef79370b62062$var$RADIO_ITEM_NAME
257
+ });
258
+ /* -------------------------------------------------------------------------------------------------
259
+ * DropdownMenuItemIndicator
260
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$INDICATOR_NAME = 'DropdownMenuItemIndicator';
261
+ const $d08ef79370b62062$export$42355ae145153fb6 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
262
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...itemIndicatorProps } = props;
263
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
264
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$ItemIndicator, $9kmUS$babelruntimehelpersesmextends({}, menuScope, itemIndicatorProps, {
265
+ ref: forwardedRef
266
+ }));
267
+ });
268
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$42355ae145153fb6, {
269
+ displayName: $d08ef79370b62062$var$INDICATOR_NAME
270
+ });
271
+ /* -------------------------------------------------------------------------------------------------
272
+ * DropdownMenuSeparator
273
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$SEPARATOR_NAME = 'DropdownMenuSeparator';
274
+ const $d08ef79370b62062$export$da160178fd3bc7e9 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
275
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...separatorProps } = props;
276
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
277
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Separator, $9kmUS$babelruntimehelpersesmextends({}, menuScope, separatorProps, {
278
+ ref: forwardedRef
279
+ }));
280
+ });
281
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$da160178fd3bc7e9, {
282
+ displayName: $d08ef79370b62062$var$SEPARATOR_NAME
283
+ });
284
+ /* -------------------------------------------------------------------------------------------------
285
+ * DropdownMenuArrow
286
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$ARROW_NAME = 'DropdownMenuArrow';
287
+ const $d08ef79370b62062$export$34b8980744021ec5 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
288
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...arrowProps } = props;
289
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
290
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Arrow, $9kmUS$babelruntimehelpersesmextends({}, menuScope, arrowProps, {
291
+ ref: forwardedRef
292
+ }));
293
+ });
294
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$34b8980744021ec5, {
295
+ displayName: $d08ef79370b62062$var$ARROW_NAME
296
+ });
297
+ /* -------------------------------------------------------------------------------------------------
298
+ * DropdownMenuSub
299
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$export$2f307d81a64f5442 = (props)=>{
300
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , open: openProp , onOpenChange: onOpenChange , defaultOpen: defaultOpen } = props;
301
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
302
+ const [open = false, setOpen] = $9kmUS$useControllableState({
303
+ prop: openProp,
304
+ defaultProp: defaultOpen,
305
+ onChange: onOpenChange
306
+ });
307
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Sub, $9kmUS$babelruntimehelpersesmextends({}, menuScope, {
308
+ open: open,
309
+ onOpenChange: setOpen
310
+ }), children);
311
+ };
312
+ /* -------------------------------------------------------------------------------------------------
313
+ * DropdownMenuSubTrigger
314
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';
315
+ const $d08ef79370b62062$export$21dcb7ec56f874cf = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
316
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subTriggerProps } = props;
317
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
318
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$SubTrigger, $9kmUS$babelruntimehelpersesmextends({}, menuScope, subTriggerProps, {
319
+ ref: forwardedRef
320
+ }));
321
+ });
322
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$21dcb7ec56f874cf, {
323
+ displayName: $d08ef79370b62062$var$SUB_TRIGGER_NAME
324
+ });
325
+ /* -------------------------------------------------------------------------------------------------
326
+ * DropdownMenuSubContent
327
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$SUB_CONTENT_NAME = 'DropdownMenuSubContent';
328
+ const $d08ef79370b62062$export$f34ec8bc2482cc5f = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
329
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subContentProps } = props;
330
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
331
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$SubContent, $9kmUS$babelruntimehelpersesmextends({}, menuScope, subContentProps, {
332
+ ref: forwardedRef,
333
+ style: {
334
+ ...props.style,
335
+ // re-namespace exposed content custom property
336
+ ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
337
+ }
338
+ }));
339
+ });
340
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$f34ec8bc2482cc5f, {
341
+ displayName: $d08ef79370b62062$var$SUB_CONTENT_NAME
342
+ });
343
+ /* -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$export$be92b6f5f03c0fe9 = $d08ef79370b62062$export$e44a253a59704894;
344
+ const $d08ef79370b62062$export$41fb9f06171c75f4 = $d08ef79370b62062$export$d2469213b3befba9;
345
+ const $d08ef79370b62062$export$7c6e2c02157bb7d2 = $d08ef79370b62062$export$6e76d93a37c01248;
346
+ const $d08ef79370b62062$export$eb2fcfdbd7ba97d4 = $d08ef79370b62062$export$246bebaba3a2f70e;
347
+ const $d08ef79370b62062$export$b04be29aa201d4f5 = $d08ef79370b62062$export$76e48c5b57f24495;
348
+ const $d08ef79370b62062$export$6d08773d2e66f8f2 = $d08ef79370b62062$export$ed97964d1871885d;
349
+ const $d08ef79370b62062$export$16ce288f89fa631c = $d08ef79370b62062$export$53a69729da201fa9;
350
+ const $d08ef79370b62062$export$a98f0dcb43a68a25 = $d08ef79370b62062$export$3323ad73d55f587e;
351
+ const $d08ef79370b62062$export$371ab307eab489c0 = $d08ef79370b62062$export$e4f69b41b1637536;
352
+ const $d08ef79370b62062$export$c3468e2714d175fa = $d08ef79370b62062$export$42355ae145153fb6;
353
+ const $d08ef79370b62062$export$1ff3c3f08ae963c0 = $d08ef79370b62062$export$da160178fd3bc7e9;
354
+ const $d08ef79370b62062$export$21b07c8f274aebd5 = $d08ef79370b62062$export$34b8980744021ec5;
355
+ const $d08ef79370b62062$export$d7a01e11500dfb6f = $d08ef79370b62062$export$2f307d81a64f5442;
356
+ const $d08ef79370b62062$export$2ea8a7a591ac5eac = $d08ef79370b62062$export$21dcb7ec56f874cf;
357
+ const $d08ef79370b62062$export$6d4de93b380beddf = $d08ef79370b62062$export$f34ec8bc2482cc5f;
358
+
359
+
360
+
361
+
362
+ export {$d08ef79370b62062$export$c0623cd925aeb687 as createDropdownMenuScope, $d08ef79370b62062$export$e44a253a59704894 as DropdownMenu, $d08ef79370b62062$export$d2469213b3befba9 as DropdownMenuTrigger, $d08ef79370b62062$export$6e76d93a37c01248 as DropdownMenuContent, $d08ef79370b62062$export$246bebaba3a2f70e as DropdownMenuGroup, $d08ef79370b62062$export$76e48c5b57f24495 as DropdownMenuLabel, $d08ef79370b62062$export$ed97964d1871885d as DropdownMenuItem, $d08ef79370b62062$export$53a69729da201fa9 as DropdownMenuCheckboxItem, $d08ef79370b62062$export$3323ad73d55f587e as DropdownMenuRadioGroup, $d08ef79370b62062$export$e4f69b41b1637536 as DropdownMenuRadioItem, $d08ef79370b62062$export$42355ae145153fb6 as DropdownMenuItemIndicator, $d08ef79370b62062$export$da160178fd3bc7e9 as DropdownMenuSeparator, $d08ef79370b62062$export$34b8980744021ec5 as DropdownMenuArrow, $d08ef79370b62062$export$2f307d81a64f5442 as DropdownMenuSub, $d08ef79370b62062$export$21dcb7ec56f874cf as DropdownMenuSubTrigger, $d08ef79370b62062$export$f34ec8bc2482cc5f as DropdownMenuSubContent, $d08ef79370b62062$export$be92b6f5f03c0fe9 as Root, $d08ef79370b62062$export$41fb9f06171c75f4 as Trigger, $d08ef79370b62062$export$7c6e2c02157bb7d2 as Content, $d08ef79370b62062$export$eb2fcfdbd7ba97d4 as Group, $d08ef79370b62062$export$b04be29aa201d4f5 as Label, $d08ef79370b62062$export$6d08773d2e66f8f2 as Item, $d08ef79370b62062$export$16ce288f89fa631c as CheckboxItem, $d08ef79370b62062$export$a98f0dcb43a68a25 as RadioGroup, $d08ef79370b62062$export$371ab307eab489c0 as RadioItem, $d08ef79370b62062$export$c3468e2714d175fa as ItemIndicator, $d08ef79370b62062$export$1ff3c3f08ae963c0 as Separator, $d08ef79370b62062$export$21b07c8f274aebd5 as Arrow, $d08ef79370b62062$export$d7a01e11500dfb6f as Sub, $d08ef79370b62062$export$2ea8a7a591ac5eac as SubTrigger, $d08ef79370b62062$export$6d4de93b380beddf as SubContent};
2
363
  //# sourceMappingURL=index.module.js.map
@@ -1 +1 @@
1
- {"mappings":"0gBAmBA,MAGOA,EAA2BC,GAA2BC,EAHlC,eAKzB,CAACC,yCAEH,MAAMC,EAAeD,KAoBdE,EAAsBC,GAA0BN,EA3B5B,uBAwC3B,MAAMO,aAA6CC,IACjD,MAAMC,oBAAEA,EAAFC,SAAuBA,EAAUC,KAAMC,EAAvCC,YAAiDA,EAAjDC,aAA8DA,GAAiBN,EAC/EO,EAAiBC,EA1CE,eA0CoCP,GACvDQ,EAAYb,EAAaK,IACxBE,GAAO,EAAOO,GAAWC,EAAqB,CACnDC,KAAMR,EACNS,YAAaR,EACbS,SAAUR,IAGNS,EAAmBC,EAAMC,aAAY,IAAMP,GAASQ,IAAcA,KAAW,CAACR,IAEpF,OAAOH,EAAeY,6BACpBC,EAAAC,cAACC,EAAD,CACEC,MAAOtB,EACPuB,YAAY,EACZrB,KAAMA,EACNG,aAAcI,EACde,aAAcV,gBAEdK,EAAAC,cAACK,EAAcC,IAAfC,EAAA,GAAuBnB,EAAvB,CAAkCN,KAAMA,EAAMG,aAAcI,IACzDR,iBAILkB,EAAAC,cAACQ,EAADD,EAAA,GAAsB5B,EAAtB,CAA6BG,KAAMA,EAAMG,aAAcI,EAASe,aAAcV,IAC3Eb,iBAkBP,MAAM4B,EACJ9B,IAEA,MAAMC,oBACJA,EADIC,SAEJA,EAFI6B,IAGJA,EAHI5B,KAIJA,EAJIG,aAKJA,EALImB,aAMJA,EANIO,MAOJA,GAAQ,GACNhC,EACES,EAAYb,EAAaK,GACzBgC,EAAajB,EAAMkB,OAA0B,mBACnD,OACEd,EAAAC,cAACC,EAAD,CACEC,MAAOtB,EACPuB,YAAY,EAC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AAMK,MAAQF","sources":["./packages/react/dropdown-menu/src/DropdownMenu.tsx"],"sourcesContent":["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useId } from '@radix-ui/react-id';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps<P> = P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuRootContextValue = {\n isRootMenu: true;\n triggerId: string;\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\ntype DropdownMenuSubContextValue = {\n isRootMenu: false;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext<\n DropdownMenuRootContextValue | DropdownMenuSubContextValue\n>(DROPDOWN_MENU_NAME);\n\ninterface DropdownMenuProps {\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n children?: React.ReactNode;\n}\n\nconst DropdownMenu: React.FC<DropdownMenuProps> = (props: ScopedProps<DropdownMenuProps>) => {\n const { __scopeDropdownMenu, children, open: openProp, defaultOpen, onOpenChange } = props;\n const contentContext = useContentContext(DROPDOWN_MENU_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const handleOpenToggle = React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]);\n\n return contentContext.isInsideContent ? (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n isRootMenu={false}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={handleOpenToggle}\n >\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n </DropdownMenuProvider>\n ) : (\n <DropdownMenuRoot {...props} open={open} onOpenChange={setOpen} onOpenToggle={handleOpenToggle}>\n {children}\n </DropdownMenuRoot>\n );\n};\n\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ninterface DropdownMenuRootProps {\n dir?: Direction;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal?: boolean;\n children?: React.ReactNode;\n}\n\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (\n props: ScopedProps<DropdownMenuRootProps>\n) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open,\n onOpenChange,\n onOpenToggle,\n modal = true,\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n return (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n isRootMenu={true}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n open={open}\n onOpenChange={onOpenChange}\n onOpenToggle={onOpenToggle}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={onOpenChange}\n dir={dir}\n modal={modal}\n >\n {children}\n </MenuPrimitive.Root>\n </DropdownMenuProvider>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n (props: ScopedProps<DropdownMenuTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return context.isRootMenu ? (\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n id={context.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={context.open ? true : undefined}\n aria-controls={context.open ? context.contentId : undefined}\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composeRefs(forwardedRef, context.triggerRef)}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) event.preventDefault();\n context.onOpenToggle();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onOpenToggle();\n if (event.key === 'ArrowDown') context.onOpenChange(true);\n // prevent keypresses from scrolling window\n if ([' ', 'ArrowDown'].includes(event.key)) event.preventDefault();\n })}\n />\n </MenuPrimitive.Anchor>\n ) : null;\n }\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\nconst [ContentProvider, useContentContext] = createDropdownMenuContext(CONTENT_NAME, {\n isInsideContent: false,\n});\n\ntype DropdownMenuContentElement =\n | DropdownMenuRootContentElement\n | React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface DropdownMenuContentProps extends DropdownMenuRootContentProps, MenuContentProps {}\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props: ScopedProps<DropdownMenuContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const commonProps = {\n ...contentProps,\n style: {\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-dropdown-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n },\n };\n\n return (\n <ContentProvider scope={__scopeDropdownMenu} isInsideContent={true}>\n {context.isRootMenu ? (\n <DropdownMenuRootContent\n __scopeDropdownMenu={__scopeDropdownMenu}\n {...commonProps}\n ref={forwardedRef}\n />\n ) : (\n <MenuPrimitive.Content {...menuScope} {...commonProps} ref={forwardedRef} />\n )}\n </ContentProvider>\n );\n }\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype DropdownMenuRootContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ninterface DropdownMenuRootContentProps extends ScopedProps<MenuContentProps> {}\n\nconst DropdownMenuRootContent = React.forwardRef<\n DropdownMenuRootContentElement,\n DropdownMenuRootContentProps\n>((props, forwardedRef) => {\n const { __scopeDropdownMenu, portalled = true, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return context.isRootMenu ? (\n <MenuPrimitive.Content\n id={context.contentId}\n aria-labelledby={context.triggerId}\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n portalled={portalled}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n })}\n />\n ) : null;\n});\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n (props: ScopedProps<DropdownMenuGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n (props: ScopedProps<DropdownMenuLabelProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props: ScopedProps<DropdownMenuItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTriggerItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_ITEM_NAME = 'DropdownMenuTriggerItem';\n\ntype DropdownMenuTriggerItemElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface DropdownMenuTriggerItemProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuTriggerItem = React.forwardRef<\n DropdownMenuTriggerItemElement,\n DropdownMenuTriggerItemProps\n>((props: ScopedProps<DropdownMenuTriggerItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...triggerItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...triggerItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuTriggerItem.displayName = TRIGGER_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props: ScopedProps<DropdownMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>((props: ScopedProps<DropdownMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props: ScopedProps<DropdownMenuRadioItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = React.forwardRef<\n DropdownMenuItemIndicatorElement,\n DropdownMenuItemIndicatorProps\n>((props: ScopedProps<DropdownMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>((props: ScopedProps<DropdownMenuSeparatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = React.forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n (props: ScopedProps<DropdownMenuArrowProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = DropdownMenu;\nconst Trigger = DropdownMenuTrigger;\nconst Content = DropdownMenuContent;\nconst Group = DropdownMenuGroup;\nconst Label = DropdownMenuLabel;\nconst Item = DropdownMenuItem;\nconst TriggerItem = DropdownMenuTriggerItem;\nconst CheckboxItem = DropdownMenuCheckboxItem;\nconst RadioGroup = DropdownMenuRadioGroup;\nconst RadioItem = DropdownMenuRadioItem;\nconst ItemIndicator = DropdownMenuItemIndicator;\nconst Separator = DropdownMenuSeparator;\nconst Arrow = DropdownMenuArrow;\n\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuTriggerItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\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 DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuTriggerItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n};\n"],"names":["createDropdownMenuContext","createDropdownMenuScope","createContextScope","createMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","open","openProp","defaultOpen","onOpenChange","contentContext","useContentContext","menuScope","setOpen","useControllableState","prop","defaultProp","onChange","handleOpenToggle","React","useCallback","prevOpen","isInsideContent","_react","createElement","$c7ff2201b6eec7866a95d2679b05981$var$DropdownMenuProvider","scope","isRootMenu","onOpenToggle","_radixUiReactMenu","Sub","_babelRuntimeHelpersEsmExtends","$c7ff2201b6eec7866a95d2679b05981$var$DropdownMenuRoot","DropdownMenuRoot","dir","modal","triggerRef","useRef","triggerId","useId","contentId","Root","DropdownMenuTrigger","forwardRef","forwardedRef","disabled","triggerProps","context","Anchor","asChild","Primitive","button","type","id","undefined","ref","composeRefs","onPointerDown","composeEventHandlers","event","ctrlKey","preventDefault","onKeyDown","includes","key","ContentProvider","DropdownMenuContent","contentProps","commonProps","style","$c7ff2201b6eec7866a95d2679b05981$var$ContentProvider","$c7ff2201b6eec7866a95d2679b05981$var$DropdownMenuRootContent","Content","DropdownMenuRootContent","portalled","hasInteractedOutsideRef","onCloseAutoFocus","_context$triggerRef$c","current","focus","onInteractOutside","originalEvent","detail","ctrlLeftClick","isRightClick","DropdownMenuGroup","groupProps","Group","DropdownMenuLabel","labelProps","Label","DropdownMenuItem","itemProps","Item","DropdownMenuTriggerItem","triggerItemProps","SubTrigger","DropdownMenuCheckboxItem","checkboxItemProps","CheckboxItem","DropdownMenuRadioGroup","radioGroupProps","RadioGroup","DropdownMenuRadioItem","radioItemProps","RadioItem","DropdownMenuItemIndicator","itemIndicatorProps","ItemIndicator","DropdownMenuSeparator","separatorProps","Separator","DropdownMenuArrow","arrowProps","Arrow","Trigger","TriggerItem"],"version":3,"file":"index.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A;;;;;;;;;;ACeA;;oGAEA,CAEA,MAAMS,wCAAkB,GAAG,cAA3B,AAAA;AAGA,MAAM,CAACC,+CAAD,EAA4BC,yCAA5B,CAAA,GAAuDR,yBAAkB,CAC7EM,wCAD6E,EAE7E;IAACF,sBAAD;CAF6E,CAA/E,AAAA;AAIA,MAAMK,kCAAY,GAAGL,sBAAe,EAApC,AAAA;AAYA,MAAM,CAACM,0CAAD,EAAuBC,4CAAvB,CAAA,GACJJ,+CAAyB,CAA2BD,wCAA3B,CAD3B,AAAA;AAiBA,MAAMM,yCAAyC,GAAIC,CAAAA,KAAD,GAA2C;IAC3F,MAAM,E,qBACJC,mBADI,CAAA,E,UAEJC,QAFI,CAAA,E,KA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AAhB,AAAA;AACA,MAAMoE,yCAAO,GAAGjD,yCAAhB,AAAA;AACA,MAAMkD,yCAAK,GAAGpC,yCAAd,AAAA;AACA,MAAMqC,yCAAK,GAAGlC,yCAAd,AAAA;AACA,MAAMmC,yCAAI,GAAGhC,yCAAb,AAAA;AACA,MAAMiC,yCAAY,GAAG9B,yCAArB,AAAA;AACA,MAAM+B,yCAAU,GAAG5B,yCAAnB,AAAA;AACA,MAAM6B,yCAAS,GAAG1B,yCAAlB,AAAA;AACA,MAAM2B,yCAAa,GAAGxB,yCAAtB,AAAA;AACA,MAAMyB,yCAAS,GAAGtB,yCAAlB,AAAA;AACA,MAAMuB,yCAAK,GAAGpB,yCAAd,AAAA;AACA,MAAMqB,yCAAG,GAAGnB,yCAAZ,AAAA;AACA,MAAMoB,yCAAU,GAAGlB,yCAAnB,AAAA;AACA,MAAMmB,yCAAU,GAAGhB,yCAAnB,AAAA;;ADzeA","sources":["packages/react/dropdown-menu/src/index.ts","packages/react/dropdown-menu/src/DropdownMenu.tsx"],"sourcesContent":["export * from './DropdownMenu';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { useId } from '@radix-ui/react-id';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps<P> = P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuContextValue = {\n triggerId: string;\n triggerRef: React.RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] =\n createDropdownMenuContext<DropdownMenuContextValue>(DROPDOWN_MENU_NAME);\n\ntype MenuRootProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Root>;\ninterface DropdownMenuProps {\n children?: React.ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: MenuRootProps['allowPinchZoom'];\n}\n\nconst DropdownMenu: React.FC<DropdownMenuProps> = (props: ScopedProps<DropdownMenuProps>) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n allowPinchZoom,\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={setOpen}\n dir={dir}\n modal={modal}\n allowPinchZoom={allowPinchZoom}\n >\n {children}\n </MenuPrimitive.Root>\n </DropdownMenuProvider>\n );\n};\n\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n (props: ScopedProps<DropdownMenuTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return (\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n id={context.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={context.open ? true : undefined}\n aria-controls={context.open ? context.contentId : undefined}\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composeRefs(forwardedRef, context.triggerRef)}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) event.preventDefault();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onOpenToggle();\n if (event.key === 'ArrowDown') context.onOpenChange(true);\n // prevent keypresses from scrolling window\n if ([' ', 'ArrowDown'].includes(event.key)) event.preventDefault();\n })}\n />\n </MenuPrimitive.Anchor>\n );\n }\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\ntype DropdownMenuContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface DropdownMenuContentProps extends MenuContentProps {}\n\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props: ScopedProps<DropdownMenuContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, portalled = true, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n <MenuPrimitive.Content\n id={context.contentId}\n aria-labelledby={context.triggerId}\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n portalled={portalled}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n })}\n style={{\n ...props.style,\n // re-namespace exposed content custom property\n ['--radix-dropdown-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n }\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n (props: ScopedProps<DropdownMenuGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n (props: ScopedProps<DropdownMenuLabelProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props: ScopedProps<DropdownMenuItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props: ScopedProps<DropdownMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>((props: ScopedProps<DropdownMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props: ScopedProps<DropdownMenuRadioItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n});\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = React.forwardRef<\n DropdownMenuItemIndicatorElement,\n DropdownMenuItemIndicatorProps\n>((props: ScopedProps<DropdownMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>((props: ScopedProps<DropdownMenuSeparatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n});\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = React.forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n (props: ScopedProps<DropdownMenuArrowProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\n }\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSub\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DropdownMenuSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = (\n props: ScopedProps<DropdownMenuSubProps>\n) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, 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\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props: ScopedProps<DropdownMenuSubTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...subTriggerProps} ref={forwardedRef} />;\n});\n\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'DropdownMenuSubContent';\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps extends MenuSubContentProps {}\n\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props: ScopedProps<DropdownMenuSubContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\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-dropdown-menu-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\n }}\n />\n );\n});\n\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = DropdownMenu;\nconst Trigger = DropdownMenuTrigger;\nconst Content = DropdownMenuContent;\nconst Group = DropdownMenuGroup;\nconst Label = DropdownMenuLabel;\nconst Item = DropdownMenuItem;\nconst CheckboxItem = DropdownMenuCheckboxItem;\nconst RadioGroup = DropdownMenuRadioGroup;\nconst RadioItem = DropdownMenuRadioItem;\nconst ItemIndicator = DropdownMenuItemIndicator;\nconst Separator = DropdownMenuSeparator;\nconst Arrow = DropdownMenuArrow;\nconst Sub = DropdownMenuSub;\nconst SubTrigger = DropdownMenuSubTrigger;\nconst SubContent = DropdownMenuSubContent;\n\nexport {\n createDropdownMenuScope,\n //\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuItemIndicator,\n DropdownMenuSeparator,\n DropdownMenuArrow,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n //\n Root,\n Trigger,\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 DropdownMenuProps,\n DropdownMenuTriggerProps,\n DropdownMenuContentProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n"],"names":["React","composeEventHandlers","composeRefs","createContextScope","useControllableState","Primitive","MenuPrimitive","createMenuScope","useId","DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","dir","open","openProp","defaultOpen","onOpenChange","modal","allowPinchZoom","menuScope","triggerRef","useRef","setOpen","prop","defaultProp","onChange","useCallback","prevOpen","TRIGGER_NAME","DropdownMenuTrigger","forwardRef","forwardedRef","disabled","triggerProps","context","triggerId","undefined","contentId","onPointerDown","event","button","ctrlKey","onOpenToggle","preventDefault","onKeyDown","includes","key","CONTENT_NAME","DropdownMenuContent","portalled","contentProps","hasInteractedOutsideRef","onCloseAutoFocus","current","focus","onInteractOutside","originalEvent","detail","ctrlLeftClick","isRightClick","style","GROUP_NAME","DropdownMenuGroup","groupProps","LABEL_NAME","DropdownMenuLabel","labelProps","ITEM_NAME","DropdownMenuItem","itemProps","CHECKBOX_ITEM_NAME","DropdownMenuCheckboxItem","checkboxItemProps","RADIO_GROUP_NAME","DropdownMenuRadioGroup","radioGroupProps","RADIO_ITEM_NAME","DropdownMenuRadioItem","radioItemProps","INDICATOR_NAME","DropdownMenuItemIndicator","itemIndicatorProps","SEPARATOR_NAME","DropdownMenuSeparator","separatorProps","ARROW_NAME","DropdownMenuArrow","arrowProps","DropdownMenuSub","SUB_TRIGGER_NAME","DropdownMenuSubTrigger","subTriggerProps","SUB_CONTENT_NAME","DropdownMenuSubContent","subContentProps","Root","Trigger","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent"],"version":3,"file":"index.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-dropdown-menu",
3
- "version": "0.1.7-rc.3",
3
+ "version": "0.1.7-rc.32",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -18,16 +18,16 @@
18
18
  "dependencies": {
19
19
  "@babel/runtime": "^7.13.10",
20
20
  "@radix-ui/primitive": "0.1.0",
21
- "@radix-ui/react-compose-refs": "0.1.0",
22
- "@radix-ui/react-context": "0.1.1",
23
- "@radix-ui/react-id": "0.1.5",
24
- "@radix-ui/react-menu": "0.1.7-rc.3",
25
- "@radix-ui/react-primitive": "0.1.4",
26
- "@radix-ui/react-use-controllable-state": "0.1.0"
21
+ "@radix-ui/react-compose-refs": "0.1.1-rc.29",
22
+ "@radix-ui/react-context": "0.1.2-rc.29",
23
+ "@radix-ui/react-id": "0.1.6-rc.29",
24
+ "@radix-ui/react-menu": "0.1.7-rc.32",
25
+ "@radix-ui/react-primitive": "0.1.5-rc.29",
26
+ "@radix-ui/react-use-controllable-state": "0.1.1-rc.29"
27
27
  },
28
28
  "peerDependencies": {
29
- "react": "^16.8 || ^17.0",
30
- "react-dom": "^16.8 || ^17.0"
29
+ "react": "^16.8 || ^17.0 || ^18.0",
30
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
31
31
  },
32
32
  "homepage": "https://radix-ui.com/primitives",
33
33
  "repository": {