{"version":3,"file":"DropdownMenu.Q_OCxjVZ.mjs","names":["useState","useRef","startTransition"],"sources":["https:/framerusercontent.com/modules/eOy1f7up6UDS9YKwtDBm/sfgo1PNwmbB1C6HTkLFe/DropdownMenu.js"],"sourcesContent":["// Dropdown menu for nav bar item click in Framer.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * Navbar Dropdown Menu for single nav item\n *\n * @framerIntrinsicWidth 180\n * @framerIntrinsicHeight 50\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function DropdownMenu(props){const{label,menuItems,background,textColor,dropdownBackground,dropdownTextColor,font,dropdownFont,borderRadius,shadow,style}=props;const[open,setOpen]=useState(false);const wrapperRef=useRef(null);const isStatic=useIsStaticRenderer();useEffect(()=>{if(!open)return;function handleClickOutside(event){if(wrapperRef.current&&!wrapperRef.current.contains(event.target)){startTransition(()=>setOpen(false));}}if(typeof window!==\"undefined\"){window.addEventListener(\"mousedown\",handleClickOutside);return()=>window.removeEventListener(\"mousedown\",handleClickOutside);}},[open]);function handleToggle(e){e.preventDefault();startTransition(()=>setOpen(v=>!v));}return /*#__PURE__*/_jsxs(\"div\",{ref:wrapperRef,style:{position:\"relative\",display:\"inline-block\",width:style?.width||180,...style},children:[/*#__PURE__*/_jsx(\"button\",{style:{background,color:textColor,border:\"none\",borderRadius,padding:\"14px 24px\",cursor:\"pointer\",boxShadow:shadow?\"0 2px 8px rgba(0,0,0,0.07)\":\"none\",minWidth:120,transition:\"background 0.18s, color 0.18s, box-shadow 0.18s\",...font},\"aria-haspopup\":\"menu\",\"aria-expanded\":open,tabIndex:0,onClick:isStatic?undefined:handleToggle,onMouseEnter:e=>{e.currentTarget.style.background=\"#F5F5F5\";e.currentTarget.style.color=textColor;e.currentTarget.style.boxShadow=\"0 3px 8px rgba(0,0,0,0.12)\";},onMouseLeave:e=>{e.currentTarget.style.background=background;e.currentTarget.style.color=textColor;e.currentTarget.style.boxShadow=shadow?\"0 2px 8px rgba(0,0,0,0.07)\":\"none\";},children:label}),/*#__PURE__*/_jsx(AnimatePresence,{children:open&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:{duration:.22,ease:\"easeOut\"},style:{minWidth:160,position:\"absolute\",top:\"100%\",left:0,background:dropdownBackground,color:dropdownTextColor,borderRadius,marginTop:4,boxShadow:shadow?\"0 2px 12px rgba(0,0,0,0.15)\":\"none\",overflow:\"hidden\",zIndex:1e3},role:\"menu\",children:menuItems.map((item,idx)=>item.link?/*#__PURE__*/_jsx(motion.a,{href:item.link,role:\"menuitem\",tabIndex:0,initial:{opacity:0,y:-12},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.18,ease:\"easeOut\",delay:idx*.05},whileHover:{x:8,color:\"#2d7af6\"},style:{textDecoration:\"none\",display:\"block\",padding:\"12px 20px\",cursor:\"pointer\",...dropdownFont,color:dropdownTextColor,background:dropdownBackground,borderBottom:idx!==menuItems.length-1?`1px solid rgba(0,0,0,0.03)`:\"none\",transition:\"color 0.14s cubic-bezier(.45,0,.55,1)\"},onClick:()=>startTransition(()=>setOpen(false)),onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){startTransition(()=>setOpen(false));}},children:item.label},idx):/*#__PURE__*/_jsx(motion.div,{role:\"menuitem\",tabIndex:0,initial:{opacity:0,y:-12},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.18,ease:\"easeOut\",delay:idx*.05},whileHover:{x:8,color:\"#2d7af6\"},style:{padding:\"12px 20px\",cursor:\"pointer\",...dropdownFont,color:dropdownTextColor,background:dropdownBackground,borderBottom:idx!==menuItems.length-1?`1px solid rgba(0,0,0,0.03)`:\"none\",transition:\"color 0.14s cubic-bezier(.45,0,.55,1)\"},onClick:()=>startTransition(()=>setOpen(false)),onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){startTransition(()=>setOpen(false));}},children:item.label},idx))})})]});}addPropertyControls(DropdownMenu,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Menu\"},menuItems:{type:ControlType.Array,title:\"Dropdown Items\",control:{type:ControlType.Object,controls:{label:{type:ControlType.String,title:\"Text\",defaultValue:\"Item\"},link:{type:ControlType.Link,title:\"Link\"}}},defaultValue:[{label:\"Item 1\",link:\"\"},{label:\"Item 2\",link:\"\"}],maxCount:6},background:{type:ControlType.Color,title:\"Nav BG\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Nav Text\",defaultValue:\"#000000\"},dropdownBackground:{type:ControlType.Color,title:\"Dropdown BG\",defaultValue:\"#FFFFFF\"},dropdownTextColor:{type:ControlType.Color,title:\"Dropdown Text\",defaultValue:\"#222222\"},font:{type:ControlType.Font,title:\"Nav Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},dropdownFont:{type:ControlType.Font,title:\"Dropdown Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:20},shadow:{type:ControlType.Boolean,title:\"Shadow\",enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DropdownMenu\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"180\",\"framerIntrinsicHeight\":\"50\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}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