-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontext-menu-stories.71bc37c0.iframe.bundle.js
1 lines (1 loc) · 24.3 KB
/
context-menu-stories.71bc37c0.iframe.bundle.js
1
"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[729],{"./lib/utils.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{cn:()=>cn});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/clsx/dist/clsx.m.js"),tailwind_merge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/tailwind-merge/dist/lib/tw-merge.mjs");__webpack_require__("../../node_modules/process/browser.js");function cn(){for(var _len=arguments.length,inputs=new Array(_len),_key=0;_key<_len;_key++)inputs[_key]=arguments[_key];return(0,tailwind_merge__WEBPACK_IMPORTED_MODULE_0__.m)((0,clsx__WEBPACK_IMPORTED_MODULE_1__.W)(inputs))}},"./registry/stories/context-menu.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Base:()=>Base,default:()=>context_menu_stories});var defineProperty=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),react=__webpack_require__("../../node_modules/react/index.js"),esm_extends=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/extends.js"),objectWithoutProperties=__webpack_require__("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),dist=__webpack_require__("../../node_modules/@radix-ui/primitive/dist/index.mjs"),react_context_dist=__webpack_require__("../../node_modules/@radix-ui/react-context/dist/index.mjs"),react_primitive_dist=__webpack_require__("../../node_modules/@radix-ui/react-primitive/dist/index.mjs"),react_menu_dist=__webpack_require__("../../node_modules/@radix-ui/react-menu/dist/index.mjs"),react_use_callback_ref_dist=__webpack_require__("../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"),react_use_controllable_state_dist=__webpack_require__("../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs");const[$1b0217ee4a91d156$var$createContextMenuContext,$1b0217ee4a91d156$export$1059331f43ddcc82]=(0,react_context_dist.b)("ContextMenu",[react_menu_dist.Wf]),$1b0217ee4a91d156$var$useMenuScope=(0,react_menu_dist.Wf)(),[$1b0217ee4a91d156$var$ContextMenuProvider,$1b0217ee4a91d156$var$useContextMenuContext]=$1b0217ee4a91d156$var$createContextMenuContext("ContextMenu"),$1b0217ee4a91d156$export$8dc6765e8be191c7=props=>{const{__scopeContextMenu,children,onOpenChange,dir,modal=!0}=props,[open1,setOpen]=(0,react.useState)(!1),menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu),handleOpenChangeProp=(0,react_use_callback_ref_dist.W)(onOpenChange),handleOpenChange=(0,react.useCallback)((open=>{setOpen(open),handleOpenChangeProp(open)}),[handleOpenChangeProp]);return(0,react.createElement)($1b0217ee4a91d156$var$ContextMenuProvider,{scope:__scopeContextMenu,open:open1,onOpenChange:handleOpenChange,modal},(0,react.createElement)(react_menu_dist.fC,(0,esm_extends.Z)({},menuScope,{dir,open:open1,onOpenChange:handleOpenChange,modal}),children))},$1b0217ee4a91d156$export$be6fc7b1d5b0beb9=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,disabled=!1,...triggerProps}=props,context=$1b0217ee4a91d156$var$useContextMenuContext("ContextMenuTrigger",__scopeContextMenu),menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu),pointRef=(0,react.useRef)({x:0,y:0}),virtualRef=(0,react.useRef)({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...pointRef.current})}),longPressTimerRef=(0,react.useRef)(0),clearLongPress=(0,react.useCallback)((()=>window.clearTimeout(longPressTimerRef.current)),[]),handleOpen=event=>{pointRef.current={x:event.clientX,y:event.clientY},context.onOpenChange(!0)};return(0,react.useEffect)((()=>clearLongPress),[clearLongPress]),(0,react.useEffect)((()=>{disabled&&clearLongPress()}),[disabled,clearLongPress]),(0,react.createElement)(react.Fragment,null,(0,react.createElement)(react_menu_dist.ee,(0,esm_extends.Z)({},menuScope,{virtualRef})),(0,react.createElement)(react_primitive_dist.WV.span,(0,esm_extends.Z)({"data-state":context.open?"open":"closed","data-disabled":disabled?"":void 0},triggerProps,{ref:forwardedRef,style:{WebkitTouchCallout:"none",...props.style},onContextMenu:disabled?props.onContextMenu:(0,dist.M)(props.onContextMenu,(event=>{clearLongPress(),handleOpen(event),event.preventDefault()})),onPointerDown:disabled?props.onPointerDown:(0,dist.M)(props.onPointerDown,$1b0217ee4a91d156$var$whenTouchOrPen((event=>{clearLongPress(),longPressTimerRef.current=window.setTimeout((()=>handleOpen(event)),700)}))),onPointerMove:disabled?props.onPointerMove:(0,dist.M)(props.onPointerMove,$1b0217ee4a91d156$var$whenTouchOrPen(clearLongPress)),onPointerCancel:disabled?props.onPointerCancel:(0,dist.M)(props.onPointerCancel,$1b0217ee4a91d156$var$whenTouchOrPen(clearLongPress)),onPointerUp:disabled?props.onPointerUp:(0,dist.M)(props.onPointerUp,$1b0217ee4a91d156$var$whenTouchOrPen(clearLongPress))})))})),$1b0217ee4a91d156$export$14afd0be83e45060=props=>{const{__scopeContextMenu,...portalProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.h_,(0,esm_extends.Z)({},menuScope,portalProps))},$1b0217ee4a91d156$export$572205900c9369e=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...contentProps}=props,context=$1b0217ee4a91d156$var$useContextMenuContext("ContextMenuContent",__scopeContextMenu),menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu),hasInteractedOutsideRef=(0,react.useRef)(!1);return(0,react.createElement)(react_menu_dist.VY,(0,esm_extends.Z)({},menuScope,contentProps,{ref:forwardedRef,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:event=>{var _props$onCloseAutoFoc;null===(_props$onCloseAutoFoc=props.onCloseAutoFocus)||void 0===_props$onCloseAutoFoc||_props$onCloseAutoFoc.call(props,event),!event.defaultPrevented&&hasInteractedOutsideRef.current&&event.preventDefault(),hasInteractedOutsideRef.current=!1},onInteractOutside:event=>{var _props$onInteractOuts;null===(_props$onInteractOuts=props.onInteractOutside)||void 0===_props$onInteractOuts||_props$onInteractOuts.call(props,event),event.defaultPrevented||context.modal||(hasInteractedOutsideRef.current=!0)},style:{...props.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),$1b0217ee4a91d156$export$d4b9d3b609a10742=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...labelProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.__,(0,esm_extends.Z)({},menuScope,labelProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$16a26dc176a49100=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...itemProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.ck,(0,esm_extends.Z)({},menuScope,itemProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$b6adbe51d5d8b7ec=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...checkboxItemProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.oC,(0,esm_extends.Z)({},menuScope,checkboxItemProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$db5c89af5ed9aa07=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...radioGroupProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.Ee,(0,esm_extends.Z)({},menuScope,radioGroupProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$8a727d09a7d9bfc2=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...radioItemProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.Rk,(0,esm_extends.Z)({},menuScope,radioItemProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$9ed8194dee42d94b=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...itemIndicatorProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.wU,(0,esm_extends.Z)({},menuScope,itemIndicatorProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$8d6b009fadfe1207=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...separatorProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.Z0,(0,esm_extends.Z)({},menuScope,separatorProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$5bc21d1c00c4b201=props=>{const{__scopeContextMenu,children,onOpenChange,open:openProp,defaultOpen}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu),[open,setOpen]=(0,react_use_controllable_state_dist.T)({prop:openProp,defaultProp:defaultOpen,onChange:onOpenChange});return(0,react.createElement)(react_menu_dist.Tr,(0,esm_extends.Z)({},menuScope,{open,onOpenChange:setOpen}),children)},$1b0217ee4a91d156$export$30b2b5c64556d316=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...triggerItemProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.fF,(0,esm_extends.Z)({},menuScope,triggerItemProps,{ref:forwardedRef}))})),$1b0217ee4a91d156$export$2c967063bd2dc512=(0,react.forwardRef)(((props,forwardedRef)=>{const{__scopeContextMenu,...subContentProps}=props,menuScope=$1b0217ee4a91d156$var$useMenuScope(__scopeContextMenu);return(0,react.createElement)(react_menu_dist.tu,(0,esm_extends.Z)({},menuScope,subContentProps,{ref:forwardedRef,style:{...props.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}));function $1b0217ee4a91d156$var$whenTouchOrPen(handler){return event=>"mouse"!==event.pointerType?handler(event):void 0}const $1b0217ee4a91d156$export$be92b6f5f03c0fe9=$1b0217ee4a91d156$export$8dc6765e8be191c7,$1b0217ee4a91d156$export$41fb9f06171c75f4=$1b0217ee4a91d156$export$be6fc7b1d5b0beb9,$1b0217ee4a91d156$export$602eac185826482c=$1b0217ee4a91d156$export$14afd0be83e45060,$1b0217ee4a91d156$export$7c6e2c02157bb7d2=$1b0217ee4a91d156$export$572205900c9369e,$1b0217ee4a91d156$export$b04be29aa201d4f5=$1b0217ee4a91d156$export$d4b9d3b609a10742,$1b0217ee4a91d156$export$6d08773d2e66f8f2=$1b0217ee4a91d156$export$16a26dc176a49100,$1b0217ee4a91d156$export$16ce288f89fa631c=$1b0217ee4a91d156$export$b6adbe51d5d8b7ec,$1b0217ee4a91d156$export$a98f0dcb43a68a25=$1b0217ee4a91d156$export$db5c89af5ed9aa07,$1b0217ee4a91d156$export$371ab307eab489c0=$1b0217ee4a91d156$export$8a727d09a7d9bfc2,$1b0217ee4a91d156$export$c3468e2714d175fa=$1b0217ee4a91d156$export$9ed8194dee42d94b,$1b0217ee4a91d156$export$1ff3c3f08ae963c0=$1b0217ee4a91d156$export$8d6b009fadfe1207,$1b0217ee4a91d156$export$d7a01e11500dfb6f=$1b0217ee4a91d156$export$5bc21d1c00c4b201,$1b0217ee4a91d156$export$2ea8a7a591ac5eac=$1b0217ee4a91d156$export$30b2b5c64556d316,$1b0217ee4a91d156$export$6d4de93b380beddf=$1b0217ee4a91d156$export$2c967063bd2dc512;var chevron_right=__webpack_require__("../../node_modules/lucide-react/dist/esm/icons/chevron-right.js"),check=__webpack_require__("../../node_modules/lucide-react/dist/esm/icons/check.js"),circle=__webpack_require__("../../node_modules/lucide-react/dist/esm/icons/circle.js"),utils=__webpack_require__("./lib/utils.ts"),_excluded=["className","inset","children"],_excluded2=["className"],_excluded3=["className"],_excluded4=["className","inset"],_excluded5=["className","children","checked"],_excluded6=["className","children"],_excluded7=["className","inset"],_excluded8=["className"],_excluded9=["className"],__jsx=react.createElement,ContextMenu=$1b0217ee4a91d156$export$be92b6f5f03c0fe9,ContextMenuTrigger=$1b0217ee4a91d156$export$41fb9f06171c75f4,ContextMenuSub=$1b0217ee4a91d156$export$d7a01e11500dfb6f,ContextMenuRadioGroup=$1b0217ee4a91d156$export$a98f0dcb43a68a25,ContextMenuSubTrigger=react.forwardRef((function(_ref,ref){var className=_ref.className,inset=_ref.inset,children=_ref.children,props=(0,objectWithoutProperties.Z)(_ref,_excluded);return __jsx($1b0217ee4a91d156$export$2ea8a7a591ac5eac,(0,esm_extends.Z)({ref,className:(0,utils.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",inset&&"pl-8",className)},props),children,__jsx(chevron_right.Z,{className:"ml-auto h-4 w-4"}))}));ContextMenuSubTrigger.displayName=$1b0217ee4a91d156$export$2ea8a7a591ac5eac.displayName;var ContextMenuSubContent=react.forwardRef((function(_ref2,ref){var className=_ref2.className,props=(0,objectWithoutProperties.Z)(_ref2,_excluded2);return __jsx($1b0217ee4a91d156$export$6d4de93b380beddf,(0,esm_extends.Z)({ref,className:(0,utils.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",className)},props))}));ContextMenuSubContent.displayName=$1b0217ee4a91d156$export$6d4de93b380beddf.displayName;var ContextMenuContent=react.forwardRef((function(_ref3,ref){var className=_ref3.className,props=(0,objectWithoutProperties.Z)(_ref3,_excluded3);return __jsx($1b0217ee4a91d156$export$602eac185826482c,null,__jsx($1b0217ee4a91d156$export$7c6e2c02157bb7d2,(0,esm_extends.Z)({ref,className:(0,utils.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",className)},props)))}));ContextMenuContent.displayName=$1b0217ee4a91d156$export$7c6e2c02157bb7d2.displayName;var ContextMenuItem=react.forwardRef((function(_ref4,ref){var className=_ref4.className,inset=_ref4.inset,props=(0,objectWithoutProperties.Z)(_ref4,_excluded4);return __jsx($1b0217ee4a91d156$export$6d08773d2e66f8f2,(0,esm_extends.Z)({ref,className:(0,utils.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",inset&&"pl-8",className)},props))}));ContextMenuItem.displayName=$1b0217ee4a91d156$export$6d08773d2e66f8f2.displayName;var ContextMenuCheckboxItem=react.forwardRef((function(_ref5,ref){var className=_ref5.className,children=_ref5.children,checked=_ref5.checked,props=(0,objectWithoutProperties.Z)(_ref5,_excluded5);return __jsx($1b0217ee4a91d156$export$16ce288f89fa631c,(0,esm_extends.Z)({ref,className:(0,utils.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",className),checked},props),__jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},__jsx($1b0217ee4a91d156$export$c3468e2714d175fa,null,__jsx(check.Z,{className:"h-4 w-4"}))),children)}));ContextMenuCheckboxItem.displayName=$1b0217ee4a91d156$export$16ce288f89fa631c.displayName;var ContextMenuRadioItem=react.forwardRef((function(_ref6,ref){var className=_ref6.className,children=_ref6.children,props=(0,objectWithoutProperties.Z)(_ref6,_excluded6);return __jsx($1b0217ee4a91d156$export$371ab307eab489c0,(0,esm_extends.Z)({ref,className:(0,utils.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",className)},props),__jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},__jsx($1b0217ee4a91d156$export$c3468e2714d175fa,null,__jsx(circle.Z,{className:"h-2 w-2 fill-current"}))),children)}));ContextMenuRadioItem.displayName=$1b0217ee4a91d156$export$371ab307eab489c0.displayName;var ContextMenuLabel=react.forwardRef((function(_ref7,ref){var className=_ref7.className,inset=_ref7.inset,props=(0,objectWithoutProperties.Z)(_ref7,_excluded7);return __jsx($1b0217ee4a91d156$export$b04be29aa201d4f5,(0,esm_extends.Z)({ref,className:(0,utils.cn)("px-2 py-1.5 text-sm font-semibold text-foreground",inset&&"pl-8",className)},props))}));ContextMenuLabel.displayName=$1b0217ee4a91d156$export$b04be29aa201d4f5.displayName;var ContextMenuSeparator=react.forwardRef((function(_ref8,ref){var className=_ref8.className,props=(0,objectWithoutProperties.Z)(_ref8,_excluded8);return __jsx($1b0217ee4a91d156$export$1ff3c3f08ae963c0,(0,esm_extends.Z)({ref,className:(0,utils.cn)("-mx-1 my-1 h-px bg-border",className)},props))}));ContextMenuSeparator.displayName=$1b0217ee4a91d156$export$1ff3c3f08ae963c0.displayName;var _Base$parameters,_Base$parameters2,ContextMenuShortcut=function ContextMenuShortcut(_ref9){var className=_ref9.className,props=(0,objectWithoutProperties.Z)(_ref9,_excluded9);return __jsx("span",(0,esm_extends.Z)({className:(0,utils.cn)("ml-auto text-xs tracking-widest text-muted-foreground",className)},props))};ContextMenuShortcut.displayName="ContextMenuShortcut",ContextMenuShortcut.displayName="ContextMenuShortcut",ContextMenuContent.__docgenInfo={description:"",methods:[]},ContextMenuItem.__docgenInfo={description:"",methods:[]},ContextMenuCheckboxItem.__docgenInfo={description:"",methods:[]},ContextMenuRadioItem.__docgenInfo={description:"",methods:[]},ContextMenuLabel.__docgenInfo={description:"",methods:[]},ContextMenuSeparator.__docgenInfo={description:"",methods:[]},ContextMenuShortcut.__docgenInfo={description:"",methods:[],displayName:"ContextMenuShortcut"},ContextMenuSubContent.__docgenInfo={description:"",methods:[]},ContextMenuSubTrigger.__docgenInfo={description:"",methods:[]};try{ContextMenuShortcut.displayName="ContextMenuShortcut",ContextMenuShortcut.__docgenInfo={description:"",displayName:"ContextMenuShortcut",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["registry/default/ui/context-menu.tsx#ContextMenuShortcut"]={docgenInfo:ContextMenuShortcut.__docgenInfo,name:"ContextMenuShortcut",path:"registry/default/ui/context-menu.tsx#ContextMenuShortcut"})}catch(__react_docgen_typescript_loader_error){}var context_menu_stories_jsx=react.createElement;function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){(0,defineProperty.Z)(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}const context_menu_stories={title:"ui/ContextMenu",component:ContextMenu,tags:["autodocs"],argTypes:{}};var Base={render:function render(args){return context_menu_stories_jsx(ContextMenu,null,context_menu_stories_jsx(ContextMenuTrigger,{className:"flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed border-slate-200 text-sm dark:border-slate-700"},"Right click here"),context_menu_stories_jsx(ContextMenuContent,{className:"w-64"},context_menu_stories_jsx(ContextMenuItem,{inset:!0},"Back",context_menu_stories_jsx(ContextMenuShortcut,null,"⌘[")),context_menu_stories_jsx(ContextMenuItem,{inset:!0,disabled:!0},"Forward",context_menu_stories_jsx(ContextMenuShortcut,null,"⌘]")),context_menu_stories_jsx(ContextMenuItem,{inset:!0},"Reload",context_menu_stories_jsx(ContextMenuShortcut,null,"⌘R")),context_menu_stories_jsx(ContextMenuSub,null,context_menu_stories_jsx(ContextMenuSubTrigger,{inset:!0},"More Tools"),context_menu_stories_jsx(ContextMenuSubContent,{className:"w-48"},context_menu_stories_jsx(ContextMenuItem,null,"Save Page As...",context_menu_stories_jsx(ContextMenuShortcut,null,"⇧⌘S")),context_menu_stories_jsx(ContextMenuItem,null,"Create Shortcut..."),context_menu_stories_jsx(ContextMenuItem,null,"Name Window..."),context_menu_stories_jsx(ContextMenuSeparator,null),context_menu_stories_jsx(ContextMenuItem,null,"Developer Tools"))),context_menu_stories_jsx(ContextMenuSeparator,null),context_menu_stories_jsx(ContextMenuCheckboxItem,{checked:!0},"Show Bookmarks Bar",context_menu_stories_jsx(ContextMenuShortcut,null,"⌘⇧B")),context_menu_stories_jsx(ContextMenuCheckboxItem,null,"Show Full URLs"),context_menu_stories_jsx(ContextMenuSeparator,null),context_menu_stories_jsx(ContextMenuRadioGroup,{value:"pedro"},context_menu_stories_jsx(ContextMenuLabel,{inset:!0},"People"),context_menu_stories_jsx(ContextMenuSeparator,null),context_menu_stories_jsx(ContextMenuRadioItem,{value:"pedro"},"Pedro Duarte"),context_menu_stories_jsx(ContextMenuRadioItem,{value:"colm"},"Colm Tuite"))))},args:{}};Base.parameters=_objectSpread(_objectSpread({},Base.parameters),{},{docs:_objectSpread(_objectSpread({},null===(_Base$parameters=Base.parameters)||void 0===_Base$parameters?void 0:_Base$parameters.docs),{},{source:_objectSpread({originalSource:'{\n render: args => <ContextMenu>\n <ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed border-slate-200 text-sm dark:border-slate-700">\n Right click here\n </ContextMenuTrigger>\n <ContextMenuContent className="w-64">\n <ContextMenuItem inset>\n Back\n <ContextMenuShortcut>⌘[</ContextMenuShortcut>\n </ContextMenuItem>\n <ContextMenuItem inset disabled>\n Forward\n <ContextMenuShortcut>⌘]</ContextMenuShortcut>\n </ContextMenuItem>\n <ContextMenuItem inset>\n Reload\n <ContextMenuShortcut>⌘R</ContextMenuShortcut>\n </ContextMenuItem>\n <ContextMenuSub>\n <ContextMenuSubTrigger inset>More Tools</ContextMenuSubTrigger>\n <ContextMenuSubContent className="w-48">\n <ContextMenuItem>\n Save Page As...\n <ContextMenuShortcut>⇧⌘S</ContextMenuShortcut>\n </ContextMenuItem>\n <ContextMenuItem>Create Shortcut...</ContextMenuItem>\n <ContextMenuItem>Name Window...</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem>Developer Tools</ContextMenuItem>\n </ContextMenuSubContent>\n </ContextMenuSub>\n <ContextMenuSeparator />\n <ContextMenuCheckboxItem checked>\n Show Bookmarks Bar\n <ContextMenuShortcut>⌘⇧B</ContextMenuShortcut>\n </ContextMenuCheckboxItem>\n <ContextMenuCheckboxItem>Show Full URLs</ContextMenuCheckboxItem>\n <ContextMenuSeparator />\n <ContextMenuRadioGroup value="pedro">\n <ContextMenuLabel inset>People</ContextMenuLabel>\n <ContextMenuSeparator />\n <ContextMenuRadioItem value="pedro">\n Pedro Duarte\n </ContextMenuRadioItem>\n <ContextMenuRadioItem value="colm">Colm Tuite</ContextMenuRadioItem>\n </ContextMenuRadioGroup>\n </ContextMenuContent>\n </ContextMenu>,\n args: {}\n}'},null===(_Base$parameters2=Base.parameters)||void 0===_Base$parameters2||null===(_Base$parameters2=_Base$parameters2.docs)||void 0===_Base$parameters2?void 0:_Base$parameters2.source)})})}}]);