{"version":3,"file":"Examples.DEPJMX7Q.mjs","names":["useRef","useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/djuYp1f4ruYRDwSnuBAN/EMmMMq0a3I5e5BSzN01u/Examples.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useMemo,useRef,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";// Learn more: https://www.framer.com/developers/overrides/\nfunction filterSitemapLinksByQuery(root,query){const normalizedQuery=query.trim().toLowerCase();const links=Array.from(root.querySelectorAll(\"a\"));const closestRow=anchor=>{const blockedContainerTags=new Set([\"SECTION\",\"MAIN\",\"NAV\",\"ARTICLE\",\"BODY\",\"HTML\"]);let current=anchor.parentElement;let depth=0;while(current&&depth<10){const tag=current.tagName;if(blockedContainerTags.has(tag))break;const anchorCount=current.querySelectorAll(\"a\").length;if(anchorCount===1){return current;}current=current.parentElement;depth+=1;}return anchor;};links.forEach(linkNode=>{const anchor=linkNode;const row=closestRow(anchor);const label=(anchor.textContent??\"\").trim().toLowerCase();const isVisible=normalizedQuery===\"\"||label.includes(normalizedQuery);row.style.display=isVisible?\"\":\"none\";});}export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[background,setBackground]=useState(\"#0099FF\");return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background},onClick:()=>{const nextColor=`hsl(${Math.floor(Math.random()*360)} 100% 50%)`;startTransition(()=>setBackground(nextColor));}});});}export function withRedNavUnderline(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isHovered,setIsHovered]=useState(false);const handleMouseEnter=useCallback(event=>{startTransition(()=>setIsHovered(true));props.onMouseEnter?.(event);},[props]);const handleMouseLeave=useCallback(event=>{startTransition(()=>setIsHovered(false));props.onMouseLeave?.(event);},[props]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,style:{...props.style,display:\"inline-block\",textDecoration:\"none\",textDecorationLine:\"none\",borderBottom:\"none\",paddingBottom:\"6px\",backgroundImage:\"linear-gradient(#EC2027, #EC2027)\",backgroundRepeat:\"no-repeat\",backgroundPosition:\"left bottom\",backgroundSize:isHovered?\"108% 2px\":\"100% 2px\",transition:\"background-size 350ms ease-out\"}});});}export function CloseNavigationOnOutsideClick(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isStaticRenderer=useIsStaticRenderer();const setRefs=useCallback(node=>{elementRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useEffect(()=>{if(isStaticRenderer)return;if(typeof document===\"undefined\")return;const onPointerDown=event=>{const root=elementRef.current;const target=event.target;if(!root||!target)return;if(root.contains(target))return;const closeElement=document.querySelector('[aria-label=\"Close navigation menu\"]');closeElement?.click();};document.addEventListener(\"pointerdown\",onPointerDown);return()=>{document.removeEventListener(\"pointerdown\",onPointerDown);};},[isStaticRenderer]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}export function ResetNavigationOnOutsideClick(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const[remountKey,setRemountKey]=useState(0);const isStaticRenderer=useIsStaticRenderer();const setRefs=useCallback(node=>{elementRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useEffect(()=>{if(isStaticRenderer)return;if(typeof window===\"undefined\")return;if(typeof document===\"undefined\")return;const onPointerDown=event=>{const root=elementRef.current;const target=event.target;if(!root||!target)return;if(root.contains(target))return;startTransition(()=>{setRemountKey(value=>value+1);});};document.addEventListener(\"pointerdown\",onPointerDown);return()=>{document.removeEventListener(\"pointerdown\",onPointerDown);};},[isStaticRenderer]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props},remountKey);});}export function FilterSitemapByPageName(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{style,placeholder=\"Search pages by name…\",...restProps}=props;const[query,setQuery]=useState(\"\");const contentRef=useRef(null);const isStaticRenderer=useIsStaticRenderer();const normalizedQuery=useMemo(()=>query.trim().toLowerCase(),[query]);useEffect(()=>{if(isStaticRenderer)return;if(typeof window===\"undefined\")return;if(typeof document===\"undefined\")return;const root=contentRef.current;if(!root)return;filterSitemapLinksByQuery(root,normalizedQuery);},[isStaticRenderer,normalizedQuery]);const onChange=useCallback(event=>{const nextValue=event.target.value;startTransition(()=>setQuery(nextValue));},[]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",...style,display:\"flex\",flexDirection:\"column\",gap:12,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .framer-sitemap-filter-input::placeholder {\n                        color: #000000;\n                        opacity: 1;\n                    }\n                `}),/*#__PURE__*/_jsx(\"input\",{className:\"framer-sitemap-filter-input\",type:\"search\",value:query,onChange:onChange,placeholder:placeholder,\"aria-label\":placeholder,style:{flex:\"0 0 auto\",width:\"100%\",minHeight:52,border:\"1px solid #EEEEEE\",borderRadius:10,padding:\"16px\",background:\"#FFFFFF\",color:\"#000000\",fontFamily:\"Inter, inherit\",fontSize:16,lineHeight:1.2,outline:\"none\",boxSizing:\"border-box\"}}),/*#__PURE__*/_jsx(\"div\",{ref:contentRef,style:{position:\"relative\",width:\"100%\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...restProps})})]});});}addPropertyControls(FilterSitemapByPageName,{placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Search pages by name…\"}});export function FilterSitemapInput(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const isStaticRenderer=useIsStaticRenderer();const elementRef=useRef(null);const setRefs=useCallback(node=>{elementRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useEffect(()=>{if(isStaticRenderer)return;if(typeof window===\"undefined\")return;if(typeof document===\"undefined\")return;const host=elementRef.current;if(!host)return;const inputElement=host instanceof HTMLInputElement?host:host.querySelector(\"input\");if(!inputElement)return;const handleInput=event=>{const target=event.target;const query=target?.value??\"\";filterSitemapLinksByQuery(document,query);};inputElement.addEventListener(\"input\",handleInput);return()=>{inputElement.removeEventListener(\"input\",handleInput);};},[isStaticRenderer]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"FilterSitemapByPageName\":{\"type\":\"reactHoc\",\"name\":\"FilterSitemapByPageName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CloseNavigationOnOutsideClick\":{\"type\":\"reactHoc\",\"name\":\"CloseNavigationOnOutsideClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FilterSitemapInput\":{\"type\":\"reactHoc\",\"name\":\"FilterSitemapInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedNavUnderline\":{\"type\":\"reactHoc\",\"name\":\"withRedNavUnderline\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ResetNavigationOnOutsideClick\":{\"type\":\"reactHoc\",\"name\":\"ResetNavigationOnOutsideClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"iPACA,SAAS,EAA0B,EAAK,EAAM,CAAC,IAAM,EAAgB,EAAM,KAAK,CAA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