@radix-ui/react-dropdown-menu 0.1.7-rc.21 → 0.1.7-rc.22

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,11 +2,7 @@ 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;
11
7
  export interface DropdownMenuProps {
12
8
  children?: React.ReactNode;
@@ -22,11 +18,9 @@ export interface DropdownMenuTriggerProps extends PrimitiveButtonProps {
22
18
  }
23
19
  export const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
24
20
  type MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
25
- export interface DropdownMenuContentProps extends DropdownMenuRootContentProps, MenuContentProps {
21
+ export interface DropdownMenuContentProps extends MenuContentProps {
26
22
  }
27
23
  export const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
28
- interface DropdownMenuRootContentProps extends ScopedProps<MenuContentProps> {
29
- }
30
24
  type MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
31
25
  export interface DropdownMenuGroupProps extends MenuGroupProps {
32
26
  }
@@ -39,10 +33,6 @@ type MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
39
33
  export interface DropdownMenuItemProps extends MenuItemProps {
40
34
  }
41
35
  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
36
  type MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
47
37
  export interface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {
48
38
  }
@@ -67,18 +57,35 @@ type MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>
67
57
  export interface DropdownMenuArrowProps extends MenuArrowProps {
68
58
  }
69
59
  export const DropdownMenuArrow: React.ForwardRefExoticComponent<DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
60
+ export interface DropdownMenuSubProps {
61
+ children?: React.ReactNode;
62
+ open?: boolean;
63
+ defaultOpen?: boolean;
64
+ onOpenChange?(open: boolean): void;
65
+ }
66
+ export const DropdownMenuSub: React.FC<DropdownMenuSubProps>;
67
+ type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
68
+ export interface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {
69
+ }
70
+ export const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
71
+ type MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
72
+ export interface DropdownMenuSubContentProps extends MenuSubContentProps {
73
+ }
74
+ export const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
70
75
  export const Root: React.FC<DropdownMenuProps>;
71
76
  export const Trigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
72
77
  export const Content: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
73
78
  export const Group: React.ForwardRefExoticComponent<DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
74
79
  export const Label: React.ForwardRefExoticComponent<DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>>;
75
80
  export const Item: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
76
- export const TriggerItem: React.ForwardRefExoticComponent<DropdownMenuTriggerItemProps & React.RefAttributes<HTMLDivElement>>;
77
81
  export const CheckboxItem: React.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
78
82
  export const RadioGroup: React.ForwardRefExoticComponent<DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
79
83
  export const RadioItem: React.ForwardRefExoticComponent<DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
80
84
  export const ItemIndicator: React.ForwardRefExoticComponent<DropdownMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
81
85
  export const Separator: React.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
82
86
  export const Arrow: React.ForwardRefExoticComponent<DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
87
+ export const Sub: React.FC<DropdownMenuSubProps>;
88
+ export const SubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
89
+ export const SubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
83
90
 
84
91
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;;;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,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;I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AG;AAExE,OAAA,MAAM,8HAOJ,CAAC;AAWH,2BAA2B,MAAM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,4CAAsC,SAAQ,mBAAmB;CAAG;AAEpE,OAAA,MAAM,0HAOJ,CAAC;AAWH,0BAA0B,MAAM,wBAAwB,CAAC,OAAO,cAAc,SAAS,CAAC,CAAC;AACzF,2CAAqC,SAAQ,kBAAkB;CAAG;AAElE,OAAA,MAAM,wHAOJ,CAAC;AAWH,8BAA8B,MAAM,wBAAwB,CAAC,OAAO,cAAc,aAAa,CAAC,CAAC;AACjG,+CAAyC,SAAQ,sBAAsB;CAAG;AAE1E,OAAA,MAAM,iIAOJ,CAAC;AAWH,0BAA0B,MAAM,wBAAwB,CAAC,OAAO,cAAc,SAAS,CAAC,CAAC;AACzF,2CAAqC,SAAQ,kBAAkB;CAAG;AAElE,OAAA,MAAM,wHAOJ,CAAC;AAWH,sBAAsB,MAAM,wBAAwB,CAAC,OAAO,cAAc,KAAK,CAAC,CAAC;AACjF,uCAAiC,SAAQ,cAAc;CAAG;AAE1D,OAAA,MAAM,+GAML,CAAC;AAMF,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,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","packages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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
@@ -39,26 +39,30 @@ $parcel$export($d1bf075a6b218014$exports, "DropdownMenuContent", () => $d1bf075a
39
39
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuGroup", () => $d1bf075a6b218014$export$246bebaba3a2f70e);
40
40
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuLabel", () => $d1bf075a6b218014$export$76e48c5b57f24495);
41
41
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuItem", () => $d1bf075a6b218014$export$ed97964d1871885d);
42
- $parcel$export($d1bf075a6b218014$exports, "DropdownMenuTriggerItem", () => $d1bf075a6b218014$export$eb7a5647860df79a);
43
42
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuCheckboxItem", () => $d1bf075a6b218014$export$53a69729da201fa9);
44
43
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuRadioGroup", () => $d1bf075a6b218014$export$3323ad73d55f587e);
45
44
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuRadioItem", () => $d1bf075a6b218014$export$e4f69b41b1637536);
46
45
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuItemIndicator", () => $d1bf075a6b218014$export$42355ae145153fb6);
47
46
  $parcel$export($d1bf075a6b218014$exports, "DropdownMenuSeparator", () => $d1bf075a6b218014$export$da160178fd3bc7e9);
48
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);
49
51
  $parcel$export($d1bf075a6b218014$exports, "Root", () => $d1bf075a6b218014$export$be92b6f5f03c0fe9);
50
52
  $parcel$export($d1bf075a6b218014$exports, "Trigger", () => $d1bf075a6b218014$export$41fb9f06171c75f4);
51
53
  $parcel$export($d1bf075a6b218014$exports, "Content", () => $d1bf075a6b218014$export$7c6e2c02157bb7d2);
52
54
  $parcel$export($d1bf075a6b218014$exports, "Group", () => $d1bf075a6b218014$export$eb2fcfdbd7ba97d4);
53
55
  $parcel$export($d1bf075a6b218014$exports, "Label", () => $d1bf075a6b218014$export$b04be29aa201d4f5);
54
56
  $parcel$export($d1bf075a6b218014$exports, "Item", () => $d1bf075a6b218014$export$6d08773d2e66f8f2);
55
- $parcel$export($d1bf075a6b218014$exports, "TriggerItem", () => $d1bf075a6b218014$export$6d0911d397e3b965);
56
57
  $parcel$export($d1bf075a6b218014$exports, "CheckboxItem", () => $d1bf075a6b218014$export$16ce288f89fa631c);
57
58
  $parcel$export($d1bf075a6b218014$exports, "RadioGroup", () => $d1bf075a6b218014$export$a98f0dcb43a68a25);
58
59
  $parcel$export($d1bf075a6b218014$exports, "RadioItem", () => $d1bf075a6b218014$export$371ab307eab489c0);
59
60
  $parcel$export($d1bf075a6b218014$exports, "ItemIndicator", () => $d1bf075a6b218014$export$c3468e2714d175fa);
60
61
  $parcel$export($d1bf075a6b218014$exports, "Separator", () => $d1bf075a6b218014$export$1ff3c3f08ae963c0);
61
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);
62
66
 
63
67
 
64
68
 
@@ -78,58 +82,37 @@ const [$d1bf075a6b218014$var$createDropdownMenuContext, $d1bf075a6b218014$export
78
82
  const $d1bf075a6b218014$var$useMenuScope = $7dQ7Q$radixuireactmenu.createMenuScope();
79
83
  const [$d1bf075a6b218014$var$DropdownMenuProvider, $d1bf075a6b218014$var$useDropdownMenuContext] = $d1bf075a6b218014$var$createDropdownMenuContext($d1bf075a6b218014$var$DROPDOWN_MENU_NAME);
80
84
  const $d1bf075a6b218014$export$e44a253a59704894 = (props)=>{
81
- const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange } = props;
82
- const contentContext = $d1bf075a6b218014$var$useContentContext($d1bf075a6b218014$var$DROPDOWN_MENU_NAME, __scopeDropdownMenu);
85
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;
83
86
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
87
+ const triggerRef = $7dQ7Q$react.useRef(null);
84
88
  const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
85
89
  prop: openProp,
86
90
  defaultProp: defaultOpen,
87
91
  onChange: onOpenChange
88
92
  });
89
- const handleOpenToggle = $7dQ7Q$react.useCallback(()=>setOpen((prevOpen)=>!prevOpen
90
- )
91
- , [
92
- setOpen
93
- ]);
94
- return contentContext.isInsideContent ? /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuProvider, {
95
- scope: __scopeDropdownMenu,
96
- isRootMenu: false,
97
- open: open,
98
- onOpenChange: setOpen,
99
- onOpenToggle: handleOpenToggle
100
- }, /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Sub, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, {
101
- open: open,
102
- onOpenChange: setOpen
103
- }), children)) : /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuRoot, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, props, {
104
- open: open,
105
- onOpenChange: setOpen,
106
- onOpenToggle: handleOpenToggle
107
- }), children);
108
- };
109
- /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$e44a253a59704894, {
110
- displayName: $d1bf075a6b218014$var$DROPDOWN_MENU_NAME
111
- });
112
- /* ---------------------------------------------------------------------------------------------- */ const $d1bf075a6b218014$var$DropdownMenuRoot = (props)=>{
113
- const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: open , onOpenChange: onOpenChange , onOpenToggle: onOpenToggle , modal: modal = true } = props;
114
- const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
115
- const triggerRef = $7dQ7Q$react.useRef(null);
116
93
  return /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuProvider, {
117
94
  scope: __scopeDropdownMenu,
118
- isRootMenu: true,
119
95
  triggerId: $7dQ7Q$radixuireactid.useId(),
120
96
  triggerRef: triggerRef,
121
97
  contentId: $7dQ7Q$radixuireactid.useId(),
122
98
  open: open,
123
- onOpenChange: onOpenChange,
124
- onOpenToggle: onOpenToggle,
99
+ onOpenChange: setOpen,
100
+ onOpenToggle: $7dQ7Q$react.useCallback(()=>setOpen((prevOpen)=>!prevOpen
101
+ )
102
+ , [
103
+ setOpen
104
+ ]),
125
105
  modal: modal
126
106
  }, /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Root, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, {
127
107
  open: open,
128
- onOpenChange: onOpenChange,
108
+ onOpenChange: setOpen,
129
109
  dir: dir,
130
110
  modal: modal
131
111
  }), children));
132
112
  };
113
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$e44a253a59704894, {
114
+ displayName: $d1bf075a6b218014$var$DROPDOWN_MENU_NAME
115
+ });
133
116
  /* -------------------------------------------------------------------------------------------------
134
117
  * DropdownMenuTrigger
135
118
  * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$TRIGGER_NAME = 'DropdownMenuTrigger';
@@ -137,7 +120,7 @@ const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/ $7dQ7Q$react.for
137
120
  const { __scopeDropdownMenu: __scopeDropdownMenu , disabled: disabled = false , ...triggerProps } = props;
138
121
  const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$TRIGGER_NAME, __scopeDropdownMenu);
139
122
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
140
- return context.isRootMenu ? /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Anchor, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
123
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Anchor, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
141
124
  asChild: true
142
125
  }, menuScope), /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactprimitive.Primitive.button, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
143
126
  type: "button",
@@ -154,10 +137,9 @@ const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/ $7dQ7Q$react.for
154
137
  // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
155
138
  // but not when the control key is pressed (avoiding MacOS right click)
156
139
  if (!disabled && event.button === 0 && event.ctrlKey === false) {
157
- // prevent trigger focusing when opening
140
+ context.onOpenToggle(); // prevent trigger focusing when opening
158
141
  // this allows the content to be given focus without competition
159
142
  if (!context.open) event.preventDefault();
160
- context.onOpenToggle();
161
143
  }
162
144
  }),
163
145
  onKeyDown: $7dQ7Q$radixuiprimitive.composeEventHandlers(props.onKeyDown, (event)=>{
@@ -172,7 +154,7 @@ const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/ $7dQ7Q$react.for
172
154
  'ArrowDown'
173
155
  ].includes(event.key)) event.preventDefault();
174
156
  })
175
- }))) : null;
157
+ })));
176
158
  });
177
159
  /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$d2469213b3befba9, {
178
160
  displayName: $d1bf075a6b218014$var$TRIGGER_NAME
@@ -180,41 +162,12 @@ const $d1bf075a6b218014$export$d2469213b3befba9 = /*#__PURE__*/ $7dQ7Q$react.for
180
162
  /* -------------------------------------------------------------------------------------------------
181
163
  * DropdownMenuContent
182
164
  * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$CONTENT_NAME = 'DropdownMenuContent';
183
- const [$d1bf075a6b218014$var$ContentProvider, $d1bf075a6b218014$var$useContentContext] = $d1bf075a6b218014$var$createDropdownMenuContext($d1bf075a6b218014$var$CONTENT_NAME, {
184
- isInsideContent: false
185
- });
186
165
  const $d1bf075a6b218014$export$6e76d93a37c01248 = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
187
- const { __scopeDropdownMenu: __scopeDropdownMenu , ...contentProps } = props;
188
- const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$CONTENT_NAME, __scopeDropdownMenu);
189
- const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
190
- const commonProps = {
191
- ...contentProps,
192
- style: {
193
- ...props.style,
194
- // re-namespace exposed content custom property
195
- ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
196
- }
197
- };
198
- return /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$ContentProvider, {
199
- scope: __scopeDropdownMenu,
200
- isInsideContent: true
201
- }, context.isRootMenu ? /*#__PURE__*/ $7dQ7Q$react.createElement($d1bf075a6b218014$var$DropdownMenuRootContent, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
202
- __scopeDropdownMenu: __scopeDropdownMenu
203
- }, commonProps, {
204
- ref: forwardedRef
205
- })) : /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Content, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, commonProps, {
206
- ref: forwardedRef
207
- })));
208
- });
209
- /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$6e76d93a37c01248, {
210
- displayName: $d1bf075a6b218014$var$CONTENT_NAME
211
- });
212
- /* ---------------------------------------------------------------------------------------------- */ const $d1bf075a6b218014$var$DropdownMenuRootContent = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
213
166
  const { __scopeDropdownMenu: __scopeDropdownMenu , portalled: portalled = true , ...contentProps } = props;
214
167
  const context = $d1bf075a6b218014$var$useDropdownMenuContext($d1bf075a6b218014$var$CONTENT_NAME, __scopeDropdownMenu);
215
168
  const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
216
169
  const hasInteractedOutsideRef = $7dQ7Q$react.useRef(false);
217
- return context.isRootMenu ? /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Content, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
170
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Content, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({
218
171
  id: context.contentId,
219
172
  "aria-labelledby": context.triggerId
220
173
  }, menuScope, contentProps, {
@@ -231,8 +184,16 @@ const $d1bf075a6b218014$export$6e76d93a37c01248 = /*#__PURE__*/ $7dQ7Q$react.for
231
184
  const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
232
185
  const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
233
186
  if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
234
- })
235
- })) : null;
187
+ }),
188
+ style: {
189
+ ...props.style,
190
+ // re-namespace exposed content custom property
191
+ ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
192
+ }
193
+ }));
194
+ });
195
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$6e76d93a37c01248, {
196
+ displayName: $d1bf075a6b218014$var$CONTENT_NAME
236
197
  });
237
198
  /* -------------------------------------------------------------------------------------------------
238
199
  * DropdownMenuGroup
@@ -273,19 +234,6 @@ const $d1bf075a6b218014$export$ed97964d1871885d = /*#__PURE__*/ $7dQ7Q$react.for
273
234
  /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$ed97964d1871885d, {
274
235
  displayName: $d1bf075a6b218014$var$ITEM_NAME
275
236
  });
276
- /* -------------------------------------------------------------------------------------------------
277
- * DropdownMenuTriggerItem
278
- * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$TRIGGER_ITEM_NAME = 'DropdownMenuTriggerItem';
279
- const $d1bf075a6b218014$export$eb7a5647860df79a = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
280
- const { __scopeDropdownMenu: __scopeDropdownMenu , ...triggerItemProps } = props;
281
- const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
282
- return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubTrigger, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, triggerItemProps, {
283
- ref: forwardedRef
284
- }));
285
- });
286
- /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$eb7a5647860df79a, {
287
- displayName: $d1bf075a6b218014$var$TRIGGER_ITEM_NAME
288
- });
289
237
  /* -------------------------------------------------------------------------------------------------
290
238
  * DropdownMenuCheckboxItem
291
239
  * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';
@@ -364,19 +312,67 @@ const $d1bf075a6b218014$export$34b8980744021ec5 = /*#__PURE__*/ $7dQ7Q$react.for
364
312
  /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$34b8980744021ec5, {
365
313
  displayName: $d1bf075a6b218014$var$ARROW_NAME
366
314
  });
315
+ /* -------------------------------------------------------------------------------------------------
316
+ * DropdownMenuSub
317
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$export$2f307d81a64f5442 = (props)=>{
318
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , open: openProp , onOpenChange: onOpenChange , defaultOpen: defaultOpen } = props;
319
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
320
+ const [open = false, setOpen] = $7dQ7Q$radixuireactusecontrollablestate.useControllableState({
321
+ prop: openProp,
322
+ defaultProp: defaultOpen,
323
+ onChange: onOpenChange
324
+ });
325
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.Sub, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, {
326
+ open: open,
327
+ onOpenChange: setOpen
328
+ }), children);
329
+ };
330
+ /* -------------------------------------------------------------------------------------------------
331
+ * DropdownMenuSubTrigger
332
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';
333
+ const $d1bf075a6b218014$export$21dcb7ec56f874cf = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
334
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subTriggerProps } = props;
335
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
336
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubTrigger, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, subTriggerProps, {
337
+ ref: forwardedRef
338
+ }));
339
+ });
340
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$21dcb7ec56f874cf, {
341
+ displayName: $d1bf075a6b218014$var$SUB_TRIGGER_NAME
342
+ });
343
+ /* -------------------------------------------------------------------------------------------------
344
+ * DropdownMenuSubContent
345
+ * -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$var$SUB_CONTENT_NAME = 'DropdownMenuSubContent';
346
+ const $d1bf075a6b218014$export$f34ec8bc2482cc5f = /*#__PURE__*/ $7dQ7Q$react.forwardRef((props, forwardedRef)=>{
347
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subContentProps } = props;
348
+ const menuScope = $d1bf075a6b218014$var$useMenuScope(__scopeDropdownMenu);
349
+ return /*#__PURE__*/ $7dQ7Q$react.createElement($7dQ7Q$radixuireactmenu.SubContent, ($parcel$interopDefault($7dQ7Q$babelruntimehelpersextends))({}, menuScope, subContentProps, {
350
+ ref: forwardedRef,
351
+ style: {
352
+ ...props.style,
353
+ // re-namespace exposed content custom property
354
+ ['--radix-dropdown-menu-sub-content-transform-origin']: 'var(--radix-popper-transform-origin)'
355
+ }
356
+ }));
357
+ });
358
+ /*#__PURE__*/ Object.assign($d1bf075a6b218014$export$f34ec8bc2482cc5f, {
359
+ displayName: $d1bf075a6b218014$var$SUB_CONTENT_NAME
360
+ });
367
361
  /* -----------------------------------------------------------------------------------------------*/ const $d1bf075a6b218014$export$be92b6f5f03c0fe9 = $d1bf075a6b218014$export$e44a253a59704894;
368
362
  const $d1bf075a6b218014$export$41fb9f06171c75f4 = $d1bf075a6b218014$export$d2469213b3befba9;
369
363
  const $d1bf075a6b218014$export$7c6e2c02157bb7d2 = $d1bf075a6b218014$export$6e76d93a37c01248;
370
364
  const $d1bf075a6b218014$export$eb2fcfdbd7ba97d4 = $d1bf075a6b218014$export$246bebaba3a2f70e;
371
365
  const $d1bf075a6b218014$export$b04be29aa201d4f5 = $d1bf075a6b218014$export$76e48c5b57f24495;
372
366
  const $d1bf075a6b218014$export$6d08773d2e66f8f2 = $d1bf075a6b218014$export$ed97964d1871885d;
373
- const $d1bf075a6b218014$export$6d0911d397e3b965 = $d1bf075a6b218014$export$eb7a5647860df79a;
374
367
  const $d1bf075a6b218014$export$16ce288f89fa631c = $d1bf075a6b218014$export$53a69729da201fa9;
375
368
  const $d1bf075a6b218014$export$a98f0dcb43a68a25 = $d1bf075a6b218014$export$3323ad73d55f587e;
376
369
  const $d1bf075a6b218014$export$371ab307eab489c0 = $d1bf075a6b218014$export$e4f69b41b1637536;
377
370
  const $d1bf075a6b218014$export$c3468e2714d175fa = $d1bf075a6b218014$export$42355ae145153fb6;
378
371
  const $d1bf075a6b218014$export$1ff3c3f08ae963c0 = $d1bf075a6b218014$export$da160178fd3bc7e9;
379
372
  const $d1bf075a6b218014$export$21b07c8f274aebd5 = $d1bf075a6b218014$export$34b8980744021ec5;
373
+ const $d1bf075a6b218014$export$d7a01e11500dfb6f = $d1bf075a6b218014$export$2f307d81a64f5442;
374
+ const $d1bf075a6b218014$export$2ea8a7a591ac5eac = $d1bf075a6b218014$export$21dcb7ec56f874cf;
375
+ const $d1bf075a6b218014$export$6d4de93b380beddf = $d1bf075a6b218014$export$f34ec8bc2482cc5f;
380
376
 
381
377
 
382
378
  $parcel$exportWildcard(module.exports, $d1bf075a6b218014$exports);
package/dist/index.js.map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EAAA,gCAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAM+D,yCAAI,GAAG3F,yCAAb,AAAA;AACA,MAAM4F,yCAAO,GAAGlE,yCAAhB,AAAA;AACA,MAAMmE,yCAAO,GAAG/C,yCAAhB,AAAA;AACA,MAAMgD,yCAAK,GAAGhC,yCAAd,AAAA;AACA,MAAMiC,yCAAK,GAAG9B,yCAAd,AAAA;AACA,MAAM+B,yCAAI,GAAG5B,yCAAb,AAAA;AACA,MAAM6B,yCAAW,GAAG1B,yCAApB,AAAA;AACA,MAAM2B,yCAAY,GAAGxB,yCAArB,AAAA;AACA,MAAMyB,yCAAU,GAAGtB,yCAAnB,AAAA;AACA,MAAMuB,yCAAS,GAAGpB,yCAAlB,AAAA;AACA,MAAMqB,yCAAa,GAAGlB,yCAAtB,AAAA;AACA,MAAMmB,yCAAS,GAAGhB,yCAAlB,AAAA;AACA,MAAMiB,yCAAK,GAAGd,yCAAd,AAAA;;ADrfA","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 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 children?: React.ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\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 children?: React.ReactNode;\n dir?: Direction;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal?: boolean;\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":["React","composeEventHandlers","composeRefs","createContextScope","useControllableState","Primitive","MenuPrimitive","createMenuScope","useId","DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","open","openProp","defaultOpen","onOpenChange","contentContext","useContentContext","menuScope","setOpen","prop","defaultProp","onChange","handleOpenToggle","useCallback","prevOpen","isInsideContent","DropdownMenuRoot","dir","onOpenToggle","modal","triggerRef","useRef","TRIGGER_NAME","DropdownMenuTrigger","forwardRef","forwardedRef","disabled","triggerProps","context","isRootMenu","triggerId","undefined","contentId","onPointerDown","event","button","ctrlKey","preventDefault","onKeyDown","includes","key","CONTENT_NAME","ContentProvider","DropdownMenuContent","contentProps","commonProps","style","DropdownMenuRootContent","portalled","hasInteractedOutsideRef","onCloseAutoFocus","current","focus","onInteractOutside","originalEvent","detail","ctrlLeftClick","isRightClick","GROUP_NAME","DropdownMenuGroup","groupProps","LABEL_NAME","DropdownMenuLabel","labelProps","ITEM_NAME","DropdownMenuItem","itemProps","TRIGGER_ITEM_NAME","DropdownMenuTriggerItem","triggerItemProps","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","Root","Trigger","Content","Group","Label","Item","TriggerItem","Checkbo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-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\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\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 } = 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 {...menuScope} open={open} onOpenChange={setOpen} dir={dir} modal={modal}>\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-sub-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","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,11 +1,11 @@
1
1
  import $9kmUS$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";
2
- import {useCallback as $9kmUS$useCallback, createElement as $9kmUS$createElement, useRef as $9kmUS$useRef, forwardRef as $9kmUS$forwardRef} from "react";
2
+ import {useRef as $9kmUS$useRef, createElement as $9kmUS$createElement, useCallback as $9kmUS$useCallback, forwardRef as $9kmUS$forwardRef} from "react";
3
3
  import {composeEventHandlers as $9kmUS$composeEventHandlers} from "@radix-ui/primitive";
4
4
  import {composeRefs as $9kmUS$composeRefs} from "@radix-ui/react-compose-refs";
5
5
  import {createContextScope as $9kmUS$createContextScope} from "@radix-ui/react-context";
6
6
  import {useControllableState as $9kmUS$useControllableState} from "@radix-ui/react-use-controllable-state";
7
7
  import {Primitive as $9kmUS$Primitive} from "@radix-ui/react-primitive";
8
- import {createMenuScope as $9kmUS$createMenuScope, Sub as $9kmUS$Sub, Root as $9kmUS$Root, Anchor as $9kmUS$Anchor, Content as $9kmUS$Content, Group as $9kmUS$Group, Label as $9kmUS$Label, Item as $9kmUS$Item, SubTrigger as $9kmUS$SubTrigger, CheckboxItem as $9kmUS$CheckboxItem, RadioGroup as $9kmUS$RadioGroup, RadioItem as $9kmUS$RadioItem, ItemIndicator as $9kmUS$ItemIndicator, Separator as $9kmUS$Separator, Arrow as $9kmUS$Arrow} from "@radix-ui/react-menu";
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
9
  import {useId as $9kmUS$useId} from "@radix-ui/react-id";
10
10
 
11
11
  function $parcel$export(e, n, v, s) {
@@ -20,26 +20,30 @@ $parcel$export($d08ef79370b62062$exports, "DropdownMenuContent", () => $d08ef793
20
20
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuGroup", () => $d08ef79370b62062$export$246bebaba3a2f70e);
21
21
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuLabel", () => $d08ef79370b62062$export$76e48c5b57f24495);
22
22
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuItem", () => $d08ef79370b62062$export$ed97964d1871885d);
23
- $parcel$export($d08ef79370b62062$exports, "DropdownMenuTriggerItem", () => $d08ef79370b62062$export$eb7a5647860df79a);
24
23
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuCheckboxItem", () => $d08ef79370b62062$export$53a69729da201fa9);
25
24
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuRadioGroup", () => $d08ef79370b62062$export$3323ad73d55f587e);
26
25
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuRadioItem", () => $d08ef79370b62062$export$e4f69b41b1637536);
27
26
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuItemIndicator", () => $d08ef79370b62062$export$42355ae145153fb6);
28
27
  $parcel$export($d08ef79370b62062$exports, "DropdownMenuSeparator", () => $d08ef79370b62062$export$da160178fd3bc7e9);
29
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);
30
32
  $parcel$export($d08ef79370b62062$exports, "Root", () => $d08ef79370b62062$export$be92b6f5f03c0fe9);
31
33
  $parcel$export($d08ef79370b62062$exports, "Trigger", () => $d08ef79370b62062$export$41fb9f06171c75f4);
32
34
  $parcel$export($d08ef79370b62062$exports, "Content", () => $d08ef79370b62062$export$7c6e2c02157bb7d2);
33
35
  $parcel$export($d08ef79370b62062$exports, "Group", () => $d08ef79370b62062$export$eb2fcfdbd7ba97d4);
34
36
  $parcel$export($d08ef79370b62062$exports, "Label", () => $d08ef79370b62062$export$b04be29aa201d4f5);
35
37
  $parcel$export($d08ef79370b62062$exports, "Item", () => $d08ef79370b62062$export$6d08773d2e66f8f2);
36
- $parcel$export($d08ef79370b62062$exports, "TriggerItem", () => $d08ef79370b62062$export$6d0911d397e3b965);
37
38
  $parcel$export($d08ef79370b62062$exports, "CheckboxItem", () => $d08ef79370b62062$export$16ce288f89fa631c);
38
39
  $parcel$export($d08ef79370b62062$exports, "RadioGroup", () => $d08ef79370b62062$export$a98f0dcb43a68a25);
39
40
  $parcel$export($d08ef79370b62062$exports, "RadioItem", () => $d08ef79370b62062$export$371ab307eab489c0);
40
41
  $parcel$export($d08ef79370b62062$exports, "ItemIndicator", () => $d08ef79370b62062$export$c3468e2714d175fa);
41
42
  $parcel$export($d08ef79370b62062$exports, "Separator", () => $d08ef79370b62062$export$1ff3c3f08ae963c0);
42
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);
43
47
 
44
48
 
45
49
 
@@ -59,58 +63,37 @@ const [$d08ef79370b62062$var$createDropdownMenuContext, $d08ef79370b62062$export
59
63
  const $d08ef79370b62062$var$useMenuScope = $9kmUS$createMenuScope();
60
64
  const [$d08ef79370b62062$var$DropdownMenuProvider, $d08ef79370b62062$var$useDropdownMenuContext] = $d08ef79370b62062$var$createDropdownMenuContext($d08ef79370b62062$var$DROPDOWN_MENU_NAME);
61
65
  const $d08ef79370b62062$export$e44a253a59704894 = (props)=>{
62
- const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange } = props;
63
- const contentContext = $d08ef79370b62062$var$useContentContext($d08ef79370b62062$var$DROPDOWN_MENU_NAME, __scopeDropdownMenu);
66
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;
64
67
  const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
68
+ const triggerRef = $9kmUS$useRef(null);
65
69
  const [open = false, setOpen] = $9kmUS$useControllableState({
66
70
  prop: openProp,
67
71
  defaultProp: defaultOpen,
68
72
  onChange: onOpenChange
69
73
  });
70
- const handleOpenToggle = $9kmUS$useCallback(()=>setOpen((prevOpen)=>!prevOpen
71
- )
72
- , [
73
- setOpen
74
- ]);
75
- return contentContext.isInsideContent ? /*#__PURE__*/ $9kmUS$createElement($d08ef79370b62062$var$DropdownMenuProvider, {
76
- scope: __scopeDropdownMenu,
77
- isRootMenu: false,
78
- open: open,
79
- onOpenChange: setOpen,
80
- onOpenToggle: handleOpenToggle
81
- }, /*#__PURE__*/ $9kmUS$createElement($9kmUS$Sub, $9kmUS$babelruntimehelpersesmextends({}, menuScope, {
82
- open: open,
83
- onOpenChange: setOpen
84
- }), children)) : /*#__PURE__*/ $9kmUS$createElement($d08ef79370b62062$var$DropdownMenuRoot, $9kmUS$babelruntimehelpersesmextends({}, props, {
85
- open: open,
86
- onOpenChange: setOpen,
87
- onOpenToggle: handleOpenToggle
88
- }), children);
89
- };
90
- /*#__PURE__*/ Object.assign($d08ef79370b62062$export$e44a253a59704894, {
91
- displayName: $d08ef79370b62062$var$DROPDOWN_MENU_NAME
92
- });
93
- /* ---------------------------------------------------------------------------------------------- */ const $d08ef79370b62062$var$DropdownMenuRoot = (props)=>{
94
- const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , dir: dir , open: open , onOpenChange: onOpenChange , onOpenToggle: onOpenToggle , modal: modal = true } = props;
95
- const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
96
- const triggerRef = $9kmUS$useRef(null);
97
74
  return /*#__PURE__*/ $9kmUS$createElement($d08ef79370b62062$var$DropdownMenuProvider, {
98
75
  scope: __scopeDropdownMenu,
99
- isRootMenu: true,
100
76
  triggerId: $9kmUS$useId(),
101
77
  triggerRef: triggerRef,
102
78
  contentId: $9kmUS$useId(),
103
79
  open: open,
104
- onOpenChange: onOpenChange,
105
- onOpenToggle: onOpenToggle,
80
+ onOpenChange: setOpen,
81
+ onOpenToggle: $9kmUS$useCallback(()=>setOpen((prevOpen)=>!prevOpen
82
+ )
83
+ , [
84
+ setOpen
85
+ ]),
106
86
  modal: modal
107
87
  }, /*#__PURE__*/ $9kmUS$createElement($9kmUS$Root, $9kmUS$babelruntimehelpersesmextends({}, menuScope, {
108
88
  open: open,
109
- onOpenChange: onOpenChange,
89
+ onOpenChange: setOpen,
110
90
  dir: dir,
111
91
  modal: modal
112
92
  }), children));
113
93
  };
94
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$e44a253a59704894, {
95
+ displayName: $d08ef79370b62062$var$DROPDOWN_MENU_NAME
96
+ });
114
97
  /* -------------------------------------------------------------------------------------------------
115
98
  * DropdownMenuTrigger
116
99
  * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$TRIGGER_NAME = 'DropdownMenuTrigger';
@@ -118,7 +101,7 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ $9kmUS$forwardRe
118
101
  const { __scopeDropdownMenu: __scopeDropdownMenu , disabled: disabled = false , ...triggerProps } = props;
119
102
  const context = $d08ef79370b62062$var$useDropdownMenuContext($d08ef79370b62062$var$TRIGGER_NAME, __scopeDropdownMenu);
120
103
  const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
121
- return context.isRootMenu ? /*#__PURE__*/ $9kmUS$createElement($9kmUS$Anchor, $9kmUS$babelruntimehelpersesmextends({
104
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Anchor, $9kmUS$babelruntimehelpersesmextends({
122
105
  asChild: true
123
106
  }, menuScope), /*#__PURE__*/ $9kmUS$createElement($9kmUS$Primitive.button, $9kmUS$babelruntimehelpersesmextends({
124
107
  type: "button",
@@ -135,10 +118,9 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ $9kmUS$forwardRe
135
118
  // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
136
119
  // but not when the control key is pressed (avoiding MacOS right click)
137
120
  if (!disabled && event.button === 0 && event.ctrlKey === false) {
138
- // prevent trigger focusing when opening
121
+ context.onOpenToggle(); // prevent trigger focusing when opening
139
122
  // this allows the content to be given focus without competition
140
123
  if (!context.open) event.preventDefault();
141
- context.onOpenToggle();
142
124
  }
143
125
  }),
144
126
  onKeyDown: $9kmUS$composeEventHandlers(props.onKeyDown, (event)=>{
@@ -153,7 +135,7 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ $9kmUS$forwardRe
153
135
  'ArrowDown'
154
136
  ].includes(event.key)) event.preventDefault();
155
137
  })
156
- }))) : null;
138
+ })));
157
139
  });
158
140
  /*#__PURE__*/ Object.assign($d08ef79370b62062$export$d2469213b3befba9, {
159
141
  displayName: $d08ef79370b62062$var$TRIGGER_NAME
@@ -161,41 +143,12 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ $9kmUS$forwardRe
161
143
  /* -------------------------------------------------------------------------------------------------
162
144
  * DropdownMenuContent
163
145
  * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$CONTENT_NAME = 'DropdownMenuContent';
164
- const [$d08ef79370b62062$var$ContentProvider, $d08ef79370b62062$var$useContentContext] = $d08ef79370b62062$var$createDropdownMenuContext($d08ef79370b62062$var$CONTENT_NAME, {
165
- isInsideContent: false
166
- });
167
146
  const $d08ef79370b62062$export$6e76d93a37c01248 = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
168
- const { __scopeDropdownMenu: __scopeDropdownMenu , ...contentProps } = props;
169
- const context = $d08ef79370b62062$var$useDropdownMenuContext($d08ef79370b62062$var$CONTENT_NAME, __scopeDropdownMenu);
170
- const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
171
- const commonProps = {
172
- ...contentProps,
173
- style: {
174
- ...props.style,
175
- // re-namespace exposed content custom property
176
- ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
177
- }
178
- };
179
- return /*#__PURE__*/ $9kmUS$createElement($d08ef79370b62062$var$ContentProvider, {
180
- scope: __scopeDropdownMenu,
181
- isInsideContent: true
182
- }, context.isRootMenu ? /*#__PURE__*/ $9kmUS$createElement($d08ef79370b62062$var$DropdownMenuRootContent, $9kmUS$babelruntimehelpersesmextends({
183
- __scopeDropdownMenu: __scopeDropdownMenu
184
- }, commonProps, {
185
- ref: forwardedRef
186
- })) : /*#__PURE__*/ $9kmUS$createElement($9kmUS$Content, $9kmUS$babelruntimehelpersesmextends({}, menuScope, commonProps, {
187
- ref: forwardedRef
188
- })));
189
- });
190
- /*#__PURE__*/ Object.assign($d08ef79370b62062$export$6e76d93a37c01248, {
191
- displayName: $d08ef79370b62062$var$CONTENT_NAME
192
- });
193
- /* ---------------------------------------------------------------------------------------------- */ const $d08ef79370b62062$var$DropdownMenuRootContent = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
194
147
  const { __scopeDropdownMenu: __scopeDropdownMenu , portalled: portalled = true , ...contentProps } = props;
195
148
  const context = $d08ef79370b62062$var$useDropdownMenuContext($d08ef79370b62062$var$CONTENT_NAME, __scopeDropdownMenu);
196
149
  const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
197
150
  const hasInteractedOutsideRef = $9kmUS$useRef(false);
198
- return context.isRootMenu ? /*#__PURE__*/ $9kmUS$createElement($9kmUS$Content, $9kmUS$babelruntimehelpersesmextends({
151
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Content, $9kmUS$babelruntimehelpersesmextends({
199
152
  id: context.contentId,
200
153
  "aria-labelledby": context.triggerId
201
154
  }, menuScope, contentProps, {
@@ -212,8 +165,16 @@ const $d08ef79370b62062$export$6e76d93a37c01248 = /*#__PURE__*/ $9kmUS$forwardRe
212
165
  const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
213
166
  const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
214
167
  if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
215
- })
216
- })) : null;
168
+ }),
169
+ style: {
170
+ ...props.style,
171
+ // re-namespace exposed content custom property
172
+ ['--radix-dropdown-menu-content-transform-origin']: 'var(--radix-popper-transform-origin)'
173
+ }
174
+ }));
175
+ });
176
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$6e76d93a37c01248, {
177
+ displayName: $d08ef79370b62062$var$CONTENT_NAME
217
178
  });
218
179
  /* -------------------------------------------------------------------------------------------------
219
180
  * DropdownMenuGroup
@@ -254,19 +215,6 @@ const $d08ef79370b62062$export$ed97964d1871885d = /*#__PURE__*/ $9kmUS$forwardRe
254
215
  /*#__PURE__*/ Object.assign($d08ef79370b62062$export$ed97964d1871885d, {
255
216
  displayName: $d08ef79370b62062$var$ITEM_NAME
256
217
  });
257
- /* -------------------------------------------------------------------------------------------------
258
- * DropdownMenuTriggerItem
259
- * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$TRIGGER_ITEM_NAME = 'DropdownMenuTriggerItem';
260
- const $d08ef79370b62062$export$eb7a5647860df79a = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
261
- const { __scopeDropdownMenu: __scopeDropdownMenu , ...triggerItemProps } = props;
262
- const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
263
- return /*#__PURE__*/ $9kmUS$createElement($9kmUS$SubTrigger, $9kmUS$babelruntimehelpersesmextends({}, menuScope, triggerItemProps, {
264
- ref: forwardedRef
265
- }));
266
- });
267
- /*#__PURE__*/ Object.assign($d08ef79370b62062$export$eb7a5647860df79a, {
268
- displayName: $d08ef79370b62062$var$TRIGGER_ITEM_NAME
269
- });
270
218
  /* -------------------------------------------------------------------------------------------------
271
219
  * DropdownMenuCheckboxItem
272
220
  * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';
@@ -345,22 +293,70 @@ const $d08ef79370b62062$export$34b8980744021ec5 = /*#__PURE__*/ $9kmUS$forwardRe
345
293
  /*#__PURE__*/ Object.assign($d08ef79370b62062$export$34b8980744021ec5, {
346
294
  displayName: $d08ef79370b62062$var$ARROW_NAME
347
295
  });
296
+ /* -------------------------------------------------------------------------------------------------
297
+ * DropdownMenuSub
298
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$export$2f307d81a64f5442 = (props)=>{
299
+ const { __scopeDropdownMenu: __scopeDropdownMenu , children: children , open: openProp , onOpenChange: onOpenChange , defaultOpen: defaultOpen } = props;
300
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
301
+ const [open = false, setOpen] = $9kmUS$useControllableState({
302
+ prop: openProp,
303
+ defaultProp: defaultOpen,
304
+ onChange: onOpenChange
305
+ });
306
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$Sub, $9kmUS$babelruntimehelpersesmextends({}, menuScope, {
307
+ open: open,
308
+ onOpenChange: setOpen
309
+ }), children);
310
+ };
311
+ /* -------------------------------------------------------------------------------------------------
312
+ * DropdownMenuSubTrigger
313
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';
314
+ const $d08ef79370b62062$export$21dcb7ec56f874cf = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
315
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subTriggerProps } = props;
316
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
317
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$SubTrigger, $9kmUS$babelruntimehelpersesmextends({}, menuScope, subTriggerProps, {
318
+ ref: forwardedRef
319
+ }));
320
+ });
321
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$21dcb7ec56f874cf, {
322
+ displayName: $d08ef79370b62062$var$SUB_TRIGGER_NAME
323
+ });
324
+ /* -------------------------------------------------------------------------------------------------
325
+ * DropdownMenuSubContent
326
+ * -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$var$SUB_CONTENT_NAME = 'DropdownMenuSubContent';
327
+ const $d08ef79370b62062$export$f34ec8bc2482cc5f = /*#__PURE__*/ $9kmUS$forwardRef((props, forwardedRef)=>{
328
+ const { __scopeDropdownMenu: __scopeDropdownMenu , ...subContentProps } = props;
329
+ const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
330
+ return /*#__PURE__*/ $9kmUS$createElement($9kmUS$SubContent, $9kmUS$babelruntimehelpersesmextends({}, menuScope, subContentProps, {
331
+ ref: forwardedRef,
332
+ style: {
333
+ ...props.style,
334
+ // re-namespace exposed content custom property
335
+ ['--radix-dropdown-menu-sub-content-transform-origin']: 'var(--radix-popper-transform-origin)'
336
+ }
337
+ }));
338
+ });
339
+ /*#__PURE__*/ Object.assign($d08ef79370b62062$export$f34ec8bc2482cc5f, {
340
+ displayName: $d08ef79370b62062$var$SUB_CONTENT_NAME
341
+ });
348
342
  /* -----------------------------------------------------------------------------------------------*/ const $d08ef79370b62062$export$be92b6f5f03c0fe9 = $d08ef79370b62062$export$e44a253a59704894;
349
343
  const $d08ef79370b62062$export$41fb9f06171c75f4 = $d08ef79370b62062$export$d2469213b3befba9;
350
344
  const $d08ef79370b62062$export$7c6e2c02157bb7d2 = $d08ef79370b62062$export$6e76d93a37c01248;
351
345
  const $d08ef79370b62062$export$eb2fcfdbd7ba97d4 = $d08ef79370b62062$export$246bebaba3a2f70e;
352
346
  const $d08ef79370b62062$export$b04be29aa201d4f5 = $d08ef79370b62062$export$76e48c5b57f24495;
353
347
  const $d08ef79370b62062$export$6d08773d2e66f8f2 = $d08ef79370b62062$export$ed97964d1871885d;
354
- const $d08ef79370b62062$export$6d0911d397e3b965 = $d08ef79370b62062$export$eb7a5647860df79a;
355
348
  const $d08ef79370b62062$export$16ce288f89fa631c = $d08ef79370b62062$export$53a69729da201fa9;
356
349
  const $d08ef79370b62062$export$a98f0dcb43a68a25 = $d08ef79370b62062$export$3323ad73d55f587e;
357
350
  const $d08ef79370b62062$export$371ab307eab489c0 = $d08ef79370b62062$export$e4f69b41b1637536;
358
351
  const $d08ef79370b62062$export$c3468e2714d175fa = $d08ef79370b62062$export$42355ae145153fb6;
359
352
  const $d08ef79370b62062$export$1ff3c3f08ae963c0 = $d08ef79370b62062$export$da160178fd3bc7e9;
360
353
  const $d08ef79370b62062$export$21b07c8f274aebd5 = $d08ef79370b62062$export$34b8980744021ec5;
354
+ const $d08ef79370b62062$export$d7a01e11500dfb6f = $d08ef79370b62062$export$2f307d81a64f5442;
355
+ const $d08ef79370b62062$export$2ea8a7a591ac5eac = $d08ef79370b62062$export$21dcb7ec56f874cf;
356
+ const $d08ef79370b62062$export$6d4de93b380beddf = $d08ef79370b62062$export$f34ec8bc2482cc5f;
361
357
 
362
358
 
363
359
 
364
360
 
365
- 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$eb7a5647860df79a as DropdownMenuTriggerItem, $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$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$6d0911d397e3b965 as TriggerItem, $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};
361
+ 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};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AA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAM+D,yCAAI,GAAG3F,yCAAb,AAAA;AACA,MAAM4F,yCAAO,GAAGlE,yCAAhB,AAAA;AACA,MAAMmE,yCAAO,GAAG/C,yCAAhB,AAAA;AACA,MAAMgD,yCAAK,GAAGhC,yCAAd,AAAA;AACA,MAAMiC,yCAAK,GAAG9B,yCAAd,AAAA;AACA,MAAM+B,yCAAI,GAAG5B,yCAAb,AAAA;AACA,MAAM6B,yCAAW,GAAG1B,yCAApB,AAAA;AACA,MAAM2B,yCAAY,GAAGxB,yCAArB,AAAA;AACA,MAAMyB,yCAAU,GAAGtB,yCAAnB,AAAA;AACA,MAAMuB,yCAAS,GAAGpB,yCAAlB,AAAA;AACA,MAAMqB,yCAAa,GAAGlB,yCAAtB,AAAA;AACA,MAAMmB,yCAAS,GAAGhB,yCAAlB,AAAA;AACA,MAAMiB,yCAAK,GAAGd,yCAAd,AAAA;;ADrfA","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 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 children?: React.ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\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 children?: React.ReactNode;\n dir?: Direction;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal?: boolean;\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":["React","composeEventHandlers","composeRefs","createContextScope","useControllableState","Primitive","MenuPrimitive","createMenuScope","useId","DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","open","openProp","defaultOpen","onOpenChange","contentContext","useContentContext","menuScope","setOpen","prop","defaultProp","onChange","handleOpenToggle","useCallback","prevOpen","isInsideContent","DropdownMenuRoot","dir","onOpenToggle","modal","triggerRef","useRef","TRIGGER_NAME","DropdownMenuTrigger","forwardRef","forwardedRef","disabled","triggerProps","context","isRootMenu","triggerId","undefined","contentId","onPointerDown","event","button","ctrlKey","preventDefault","onKeyDown","includes","key","CONTENT_NAME","ContentProvider","DropdownMenuContent","contentProps","commonProps","style","DropdownMenuRootContent","portalled","hasInteractedOutsideRef","onCloseAutoFocus","current","focus","onInteractOutside","originalEvent","detail","ctrlLeftClick","isRightClick","GROUP_NAME","DropdownMenuGroup","groupProps","LABEL_NAME","DropdownMenuLabel","labelProps","ITEM_NAME","DropdownMenuItem","itemProps","TRIGGER_ITEM_NAME","DropdownMenuTriggerItem","triggerItemProps","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","Root","Trigger","Content","Group","Label","Item","TriggerItem","CheckboxItem","RadioGroup","Rad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uB,GAAGmF,eAAH,EAAvB,GAA8CpF,KAApD,AAAM;IACN,MAAMS,SAAS,GAAGb,kCAAY,CAACK,mBAAD,CAA9B,AAAA;IAEA,OAAA,aACE,CAAA,oBAAA,CAAC,iBAAD,EAAA,oCAAA,CAAA,EAAA,EACMQ,SADN,EAEM2E,eAFN,EADF;QAII,GAAG,EAAE/D,YAHP;QAIE,KAAK,EAAE;YACL,GAAGrB,KAAK,CAACkD,KADJ;YAEL,+CAAA;YACA,CAAC,oDAAD,CAAA,EACE,sCADF;SAHK;KAJT,CAAA,CADF,CACE;CAR2B,CAA/B,AAoBC;AAED,aAAA,CAAA,MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,sCAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA,MAAMmC,yCAAI,GAAGtF,yCAAb,AAAA;AACA,MAAMuF,yCAAO,GAAGnE,yCAAhB,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;;AD5dA","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\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\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 } = 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 {...menuScope} open={open} onOpenChange={setOpen} dir={dir} modal={modal}>\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-sub-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","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.21",
3
+ "version": "0.1.7-rc.22",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -18,12 +18,12 @@
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.1-rc.18",
22
- "@radix-ui/react-context": "0.1.2-rc.18",
23
- "@radix-ui/react-id": "0.1.6-rc.18",
24
- "@radix-ui/react-menu": "0.1.7-rc.21",
25
- "@radix-ui/react-primitive": "0.1.5-rc.18",
26
- "@radix-ui/react-use-controllable-state": "0.1.1-rc.18"
21
+ "@radix-ui/react-compose-refs": "0.1.1-rc.19",
22
+ "@radix-ui/react-context": "0.1.2-rc.19",
23
+ "@radix-ui/react-id": "0.1.6-rc.19",
24
+ "@radix-ui/react-menu": "0.1.7-rc.22",
25
+ "@radix-ui/react-primitive": "0.1.5-rc.19",
26
+ "@radix-ui/react-use-controllable-state": "0.1.1-rc.19"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "^16.8 || ^17.0 || ^18.0",