Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-dropdown-menu

Package Overview
Dependencies
Maintainers
5
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-dropdown-menu - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

dist/index.js

@@ -1,2 +0,2 @@

var e=c({},require("@radix-ui/react-menu")),r=require("@radix-ui/utils").getSelector,o=require("@radix-ui/react-primitive").Primitive,t=require("@radix-ui/react-utils"),n=t.composeEventHandlers,a=t.createContext,i=t.extendComponent,u=t.useComposedRefs,p=t.useControlledState,d=t.useId,s=c({},require("react"));function c(e,r){return Object.keys(r).forEach((function(o){"default"!==o&&"__esModule"!==o&&Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[o]}})})),e}function l(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,t)}return o}function f(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?l(Object(o),!0).forEach((function(r){v(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function v(e,r,o){return r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function w(){return(w=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e}).apply(this,arguments)}function b(e,r){if(null==e)return{};var o,t,n=function(e,r){if(null==e)return{};var o,t,n={},a=Object.keys(e);for(t=0;t<a.length;t++)o=a[t],r.indexOf(o)>=0||(n[o]=e[o]);return n}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var o=[],t=!0,n=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(o.push(i.value),!r||o.length!==r);t=!0);}catch(e){n=!0,a=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw a}}return o}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return y(e,r);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return y(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,r){(null==r||r>e.length)&&(r=e.length);for(var o=0,t=new Array(r);o<r;o++)t[o]=e[o];return t}var O=m(a("DropdownMenuContext","DropdownMenu"),2),g=O[0],D=O[1],x=function(e){var r=e.children,o=e.id,t=e.open,n=e.defaultOpen,a=e.onOpenChange,i=s.useRef(null),u=d(),c=o||"dropdown-menu-".concat(u),l=m(p({prop:t,defaultProp:n,onChange:a}),2),f=l[0],v=void 0!==f&&f,w=l[1],b=s.useMemo((function(){return{triggerRef:i,id:c,open:v,setOpen:w}}),[c,v,w]);return s.createElement(g.Provider,{value:b},r)};exports.DropdownMenu=x,x.displayName="DropdownMenu";var M=s.forwardRef((function(e,t){var a=e.as,i=void 0===a?"button":a,p=e.selector,d=void 0===p?r("DropdownMenuTrigger"):p,c=b(e,["as","selector"]),l=D("DropdownMenuTrigger"),f=u(t,l.triggerRef);return s.createElement(o,w({type:"button","aria-haspopup":"menu","aria-expanded":!!l.open||void 0,"aria-controls":l.open?l.id:void 0},c,{as:i,selector:d,ref:f,onMouseDown:n(e.onMouseDown,(function(e){0===e.button&&!1===e.ctrlKey&&l.setOpen((function(e){return!e}))})),onKeyDown:n(e.onKeyDown,(function(e){[" ","Enter","ArrowUp","ArrowDown"].includes(e.key)&&(e.preventDefault(),l.setOpen(!0))}))}))}));exports.DropdownMenuTrigger=M,M.displayName="DropdownMenuTrigger";var h=s.forwardRef((function(o,t){var a=o.selector,i=void 0===a?r("DropdownMenuContent"):a,u=o.disableOutsidePointerEvents,p=void 0===u||u,d=o.disableOutsideScroll,c=void 0===d||d,l=o.portalled,m=void 0===l||l,y=b(o,["selector","disableOutsidePointerEvents","disableOutsideScroll","portalled"]),O=D("DropdownMenuContent");return s.createElement(e.Root,w({},y,{selector:i,ref:t,id:O.id,disableOutsidePointerEvents:p,disableOutsideScroll:c,portalled:m,style:f(f({},o.style),{},v({},"--radix-dropdown-menu-content-transform-origin","var(--radix-popper-transform-origin)")),open:O.open,onOpenChange:O.setOpen,anchorRef:o.anchorRef||O.triggerRef,trapFocus:!0,onCloseAutoFocus:function(e){var r;e.preventDefault(),null===(r=O.triggerRef.current)||void 0===r||r.focus()},onPointerDownOutside:n(o.onPointerDownOutside,(function(e){var r;(null===(r=O.triggerRef.current)||void 0===r?void 0:r.contains(e.target))&&e.preventDefault()}),{checkForDefaultPrevented:!1}),onDismiss:function(){return O.setOpen(!1)}}))}));exports.DropdownMenuContent=h,h.displayName="DropdownMenuContent";var I=i(e.Group,"DropdownMenuGroup");exports.DropdownMenuGroup=I;var j=i(e.Label,"DropdownMenuLabel");exports.DropdownMenuLabel=j;var P=i(e.Item,"DropdownMenuItem");exports.DropdownMenuItem=P;var R=i(e.CheckboxItem,"DropdownMenuCheckboxItem");exports.DropdownMenuCheckboxItem=R;var C=i(e.RadioGroup,"DropdownMenuRadioGroup");exports.DropdownMenuRadioGroup=C;var S=i(e.RadioItem,"DropdownMenuRadioItem");exports.DropdownMenuRadioItem=S;var A=i(e.ItemIndicator,"DropdownMenuItemIndicator");exports.DropdownMenuItemIndicator=A;var E=i(e.Separator,"DropdownMenuSeparator");exports.DropdownMenuSeparator=E;var k=i(e.Arrow,"DropdownMenuArrow");exports.DropdownMenuArrow=k;var G=x;exports.Root=G;var T=M;exports.Trigger=T;var q=h;exports.Content=q;var L=I;exports.Group=L;var F=j;exports.Label=F;var K=P;exports.Item=K;var N=R;exports.CheckboxItem=N;var U=C;exports.RadioGroup=U;var _=S;exports.RadioItem=_;var H=A;exports.ItemIndicator=H;var $=E;exports.Separator=$;var z=k;exports.Arrow=z;
var e=c({},require("@radix-ui/react-menu")),r=require("@radix-ui/utils").getSelector,o=require("@radix-ui/react-primitive").Primitive,t=require("@radix-ui/react-utils"),n=t.composeEventHandlers,a=t.createContext,i=t.extendComponent,u=t.useComposedRefs,p=t.useControlledState,d=t.useId,s=c({},require("react"));function c(e,r){return Object.keys(r).forEach((function(o){"default"!==o&&"__esModule"!==o&&Object.defineProperty(e,o,{enumerable:!0,get:function(){return r[o]}})})),e}function l(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,t)}return o}function f(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?l(Object(o),!0).forEach((function(r){v(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function v(e,r,o){return r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function w(){return(w=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e}).apply(this,arguments)}function b(e,r){if(null==e)return{};var o,t,n=function(e,r){if(null==e)return{};var o,t,n={},a=Object.keys(e);for(t=0;t<a.length;t++)o=a[t],r.indexOf(o)>=0||(n[o]=e[o]);return n}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)o=a[t],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var o=[],t=!0,n=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(o.push(i.value),!r||o.length!==r);t=!0);}catch(e){n=!0,a=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw a}}return o}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return y(e,r);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return y(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,r){(null==r||r>e.length)&&(r=e.length);for(var o=0,t=new Array(r);o<r;o++)t[o]=e[o];return t}var O=m(a("DropdownMenuContext","DropdownMenu"),2),g=O[0],D=O[1],x=function(e){var r=e.children,o=e.id,t=e.open,n=e.defaultOpen,a=e.onOpenChange,i=s.useRef(null),u=d(),c=o||"dropdown-menu-".concat(u),l=m(p({prop:t,defaultProp:n,onChange:a}),2),f=l[0],v=void 0!==f&&f,w=l[1],b=s.useMemo((function(){return{triggerRef:i,id:c,open:v,setOpen:w}}),[c,v,w]);return s.createElement(g.Provider,{value:b},r)};exports.DropdownMenu=x,x.displayName="DropdownMenu";var M=s.forwardRef((function(e,t){var a=e.as,i=void 0===a?"button":a,p=e.selector,d=void 0===p?r("DropdownMenuTrigger"):p,c=b(e,["as","selector"]),l=D("DropdownMenuTrigger"),f=u(t,l.triggerRef);return s.createElement(o,w({type:"button","aria-haspopup":"menu","aria-expanded":!!l.open||void 0,"aria-controls":l.open?l.id:void 0,"data-state":l.open?"open":"closed"},c,{as:i,selector:d,ref:f,onMouseDown:n(e.onMouseDown,(function(e){0===e.button&&!1===e.ctrlKey&&l.setOpen((function(e){return!e}))})),onKeyDown:n(e.onKeyDown,(function(e){[" ","Enter","ArrowUp","ArrowDown"].includes(e.key)&&(e.preventDefault(),l.setOpen(!0))}))}))}));exports.DropdownMenuTrigger=M,M.displayName="DropdownMenuTrigger";var h=s.forwardRef((function(o,t){var a=o.selector,i=void 0===a?r("DropdownMenuContent"):a,u=o.disableOutsidePointerEvents,p=void 0===u||u,d=o.disableOutsideScroll,c=void 0===d||d,l=o.portalled,m=void 0===l||l,y=b(o,["selector","disableOutsidePointerEvents","disableOutsideScroll","portalled"]),O=D("DropdownMenuContent");return s.createElement(e.Root,w({},y,{selector:i,ref:t,id:O.id,disableOutsidePointerEvents:p,disableOutsideScroll:c,portalled:m,style:f(f({},o.style),{},v({},"--radix-dropdown-menu-content-transform-origin","var(--radix-popper-transform-origin)")),open:O.open,onOpenChange:O.setOpen,anchorRef:o.anchorRef||O.triggerRef,trapFocus:!0,onCloseAutoFocus:function(e){var r;e.preventDefault(),null===(r=O.triggerRef.current)||void 0===r||r.focus()},onPointerDownOutside:n(o.onPointerDownOutside,(function(e){var r;(null===(r=O.triggerRef.current)||void 0===r?void 0:r.contains(e.target))&&e.preventDefault()}),{checkForDefaultPrevented:!1}),onDismiss:function(){return O.setOpen(!1)}}))}));exports.DropdownMenuContent=h,h.displayName="DropdownMenuContent";var I=i(e.Group,"DropdownMenuGroup");exports.DropdownMenuGroup=I;var j=i(e.Label,"DropdownMenuLabel");exports.DropdownMenuLabel=j;var P=i(e.Item,"DropdownMenuItem");exports.DropdownMenuItem=P;var R=i(e.CheckboxItem,"DropdownMenuCheckboxItem");exports.DropdownMenuCheckboxItem=R;var C=i(e.RadioGroup,"DropdownMenuRadioGroup");exports.DropdownMenuRadioGroup=C;var S=i(e.RadioItem,"DropdownMenuRadioItem");exports.DropdownMenuRadioItem=S;var A=i(e.ItemIndicator,"DropdownMenuItemIndicator");exports.DropdownMenuItemIndicator=A;var E=i(e.Separator,"DropdownMenuSeparator");exports.DropdownMenuSeparator=E;var k=i(e.Arrow,"DropdownMenuArrow");exports.DropdownMenuArrow=k;var G=x;exports.Root=G;var T=M;exports.Trigger=T;var q=h;exports.Content=q;var L=I;exports.Group=L;var F=j;exports.Label=F;var K=P;exports.Item=K;var N=R;exports.CheckboxItem=N;var U=C;exports.RadioGroup=U;var _=S;exports.RadioItem=_;var H=A;exports.ItemIndicator=H;var $=E;exports.Separator=$;var z=k;exports.Arrow=z;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import*as e from"@radix-ui/react-menu";import{getSelector as o}from"@radix-ui/utils";import{Primitive as r}from"@radix-ui/react-primitive";import{composeEventHandlers as n,createContext as t,extendComponent as p,useComposedRefs as u,useControlledState as i,useId as a}from"@radix-ui/react-utils";import*as d from"react";function c(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?c(Object(r),!0).forEach((function(o){l(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))}))}return e}function l(e,o,r){return o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}function w(){return(w=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function D(e,o){if(null==e)return{};var r,n,t=function(e,o){if(null==e)return{};var r,n,t={},p=Object.keys(e);for(n=0;n<p.length;n++)r=p[n],o.indexOf(r)>=0||(t[r]=e[r]);return t}(e,o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(n=0;n<p.length;n++)r=p[n],o.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}const[f,m]=t("DropdownMenuContext","DropdownMenu");export const DropdownMenu=e=>{const{children:o,id:r,open:n,defaultOpen:t,onOpenChange:p}=e,u=d.useRef(null),c=a(),s=r||"dropdown-menu-".concat(c),[l=!1,w]=i({prop:n,defaultProp:t,onChange:p}),D=d.useMemo((()=>({triggerRef:u,id:s,open:l,setOpen:w})),[s,l,w]);return d.createElement(f.Provider,{value:D},o)};DropdownMenu.displayName="DropdownMenu";const b="DropdownMenuTrigger",O="button";export const DropdownMenuTrigger=d.forwardRef(((e,t)=>{const{as:p=O,selector:i=o(b)}=e,a=D(e,["as","selector"]),c=m(b),s=u(t,c.triggerRef);return d.createElement(r,w({type:"button","aria-haspopup":"menu","aria-expanded":!!c.open||void 0,"aria-controls":c.open?c.id:void 0},a,{as:p,selector:i,ref:s,onMouseDown:n(e.onMouseDown,(e=>{0===e.button&&!1===e.ctrlKey&&c.setOpen((e=>!e))})),onKeyDown:n(e.onKeyDown,(e=>{[" ","Enter","ArrowUp","ArrowDown"].includes(e.key)&&(e.preventDefault(),c.setOpen(!0))}))}))}));DropdownMenuTrigger.displayName=b;const M="DropdownMenuContent";export const DropdownMenuContent=d.forwardRef(((r,t)=>{const{selector:p=o(M),disableOutsidePointerEvents:u=!0,disableOutsideScroll:i=!0,portalled:a=!0}=r,c=D(r,["selector","disableOutsidePointerEvents","disableOutsideScroll","portalled"]),l=m(M);return d.createElement(e.Root,w({},c,{selector:p,ref:t,id:l.id,disableOutsidePointerEvents:u,disableOutsideScroll:i,portalled:a,style:s(s({},r.style),{},{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}),open:l.open,onOpenChange:l.setOpen,anchorRef:r.anchorRef||l.triggerRef,trapFocus:!0,onCloseAutoFocus:e=>{var o;e.preventDefault(),null===(o=l.triggerRef.current)||void 0===o||o.focus()},onPointerDownOutside:n(r.onPointerDownOutside,(e=>{var o;(null===(o=l.triggerRef.current)||void 0===o?void 0:o.contains(e.target))&&e.preventDefault()}),{checkForDefaultPrevented:!1}),onDismiss:()=>l.setOpen(!1)}))}));DropdownMenuContent.displayName=M;export const DropdownMenuGroup=p(e.Group,"DropdownMenuGroup");export const DropdownMenuLabel=p(e.Label,"DropdownMenuLabel");export const DropdownMenuItem=p(e.Item,"DropdownMenuItem");export const DropdownMenuCheckboxItem=p(e.CheckboxItem,"DropdownMenuCheckboxItem");export const DropdownMenuRadioGroup=p(e.RadioGroup,"DropdownMenuRadioGroup");export const DropdownMenuRadioItem=p(e.RadioItem,"DropdownMenuRadioItem");export const DropdownMenuItemIndicator=p(e.ItemIndicator,"DropdownMenuItemIndicator");export const DropdownMenuSeparator=p(e.Separator,"DropdownMenuSeparator");export const DropdownMenuArrow=p(e.Arrow,"DropdownMenuArrow");export const Root=DropdownMenu;export const Trigger=DropdownMenuTrigger;export const Content=DropdownMenuContent;export const Group=DropdownMenuGroup;export const Label=DropdownMenuLabel;export const Item=DropdownMenuItem;export const CheckboxItem=DropdownMenuCheckboxItem;export const RadioGroup=DropdownMenuRadioGroup;export const RadioItem=DropdownMenuRadioItem;export const ItemIndicator=DropdownMenuItemIndicator;export const Separator=DropdownMenuSeparator;export const Arrow=DropdownMenuArrow;
import*as e from"@radix-ui/react-menu";import{getSelector as o}from"@radix-ui/utils";import{Primitive as r}from"@radix-ui/react-primitive";import{composeEventHandlers as n,createContext as t,extendComponent as p,useComposedRefs as u,useControlledState as a,useId as i}from"@radix-ui/react-utils";import*as d from"react";function c(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?c(Object(r),!0).forEach((function(o){l(e,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))}))}return e}function l(e,o,r){return o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}function w(){return(w=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function D(e,o){if(null==e)return{};var r,n,t=function(e,o){if(null==e)return{};var r,n,t={},p=Object.keys(e);for(n=0;n<p.length;n++)r=p[n],o.indexOf(r)>=0||(t[r]=e[r]);return t}(e,o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(n=0;n<p.length;n++)r=p[n],o.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}const[f,m]=t("DropdownMenuContext","DropdownMenu");export const DropdownMenu=e=>{const{children:o,id:r,open:n,defaultOpen:t,onOpenChange:p}=e,u=d.useRef(null),c=i(),s=r||"dropdown-menu-".concat(c),[l=!1,w]=a({prop:n,defaultProp:t,onChange:p}),D=d.useMemo((()=>({triggerRef:u,id:s,open:l,setOpen:w})),[s,l,w]);return d.createElement(f.Provider,{value:D},o)};DropdownMenu.displayName="DropdownMenu";const b="DropdownMenuTrigger",O="button";export const DropdownMenuTrigger=d.forwardRef(((e,t)=>{const{as:p=O,selector:a=o(b)}=e,i=D(e,["as","selector"]),c=m(b),s=u(t,c.triggerRef);return d.createElement(r,w({type:"button","aria-haspopup":"menu","aria-expanded":!!c.open||void 0,"aria-controls":c.open?c.id:void 0,"data-state":c.open?"open":"closed"},i,{as:p,selector:a,ref:s,onMouseDown:n(e.onMouseDown,(e=>{0===e.button&&!1===e.ctrlKey&&c.setOpen((e=>!e))})),onKeyDown:n(e.onKeyDown,(e=>{[" ","Enter","ArrowUp","ArrowDown"].includes(e.key)&&(e.preventDefault(),c.setOpen(!0))}))}))}));DropdownMenuTrigger.displayName=b;const M="DropdownMenuContent";export const DropdownMenuContent=d.forwardRef(((r,t)=>{const{selector:p=o(M),disableOutsidePointerEvents:u=!0,disableOutsideScroll:a=!0,portalled:i=!0}=r,c=D(r,["selector","disableOutsidePointerEvents","disableOutsideScroll","portalled"]),l=m(M);return d.createElement(e.Root,w({},c,{selector:p,ref:t,id:l.id,disableOutsidePointerEvents:u,disableOutsideScroll:a,portalled:i,style:s(s({},r.style),{},{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}),open:l.open,onOpenChange:l.setOpen,anchorRef:r.anchorRef||l.triggerRef,trapFocus:!0,onCloseAutoFocus:e=>{var o;e.preventDefault(),null===(o=l.triggerRef.current)||void 0===o||o.focus()},onPointerDownOutside:n(r.onPointerDownOutside,(e=>{var o;(null===(o=l.triggerRef.current)||void 0===o?void 0:o.contains(e.target))&&e.preventDefault()}),{checkForDefaultPrevented:!1}),onDismiss:()=>l.setOpen(!1)}))}));DropdownMenuContent.displayName=M;export const DropdownMenuGroup=p(e.Group,"DropdownMenuGroup");export const DropdownMenuLabel=p(e.Label,"DropdownMenuLabel");export const DropdownMenuItem=p(e.Item,"DropdownMenuItem");export const DropdownMenuCheckboxItem=p(e.CheckboxItem,"DropdownMenuCheckboxItem");export const DropdownMenuRadioGroup=p(e.RadioGroup,"DropdownMenuRadioGroup");export const DropdownMenuRadioItem=p(e.RadioItem,"DropdownMenuRadioItem");export const DropdownMenuItemIndicator=p(e.ItemIndicator,"DropdownMenuItemIndicator");export const DropdownMenuSeparator=p(e.Separator,"DropdownMenuSeparator");export const DropdownMenuArrow=p(e.Arrow,"DropdownMenuArrow");export const Root=DropdownMenu;export const Trigger=DropdownMenuTrigger;export const Content=DropdownMenuContent;export const Group=DropdownMenuGroup;export const Label=DropdownMenuLabel;export const Item=DropdownMenuItem;export const CheckboxItem=DropdownMenuCheckboxItem;export const RadioGroup=DropdownMenuRadioGroup;export const RadioItem=DropdownMenuRadioItem;export const ItemIndicator=DropdownMenuItemIndicator;export const Separator=DropdownMenuSeparator;export const Arrow=DropdownMenuArrow;
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-dropdown-menu",
"version": "0.0.6",
"version": "0.0.7",
"license": "MIT",

@@ -19,6 +19,6 @@ "source": "src/index.ts",

"dependencies": {
"@radix-ui/react-menu": "0.0.6",
"@radix-ui/react-polymorphic": "0.0.4",
"@radix-ui/react-primitive": "0.0.3",
"@radix-ui/react-utils": "0.0.4",
"@radix-ui/react-menu": "0.0.7",
"@radix-ui/react-polymorphic": "0.0.5",
"@radix-ui/react-primitive": "0.0.4",
"@radix-ui/react-utils": "0.0.5",
"@radix-ui/utils": "0.0.3"

@@ -25,0 +25,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc