{"version":3,"file":"ScrollFadeMask.4feWCruO.mjs","names":["React.forwardRef","useRef","useState","useCallback"],"sources":["https:/framerusercontent.com/modules/wbL0GysLpUpZOLelXsKU/7IhRlKXIvqCTv7OUjGRe/q95pf4lLL.js","https:/framerusercontent.com/modules/cf2gwUABAejr7HCTl9Cj/ZVDPwU4b55CAf9D9SzAY/ScrollFadeMask.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 1.5 16.5 C 0.672 16.5 0 15.828 0 15 L 0 1.5 C 0 0.672 0.672 0 1.5 0 L 15 0 C 15.828 0 16.5 0.672 16.5 1.5 L 16.5 15 C 16.5 15.828 15.828 16.5 15 16.5 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"16.5px\" id=\"LjE0Ycn76\" transform=\"translate(3.75 3.75)\" width=\"16.5px\"/><path d=\"M 13.5 0 L 0 13.5\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"13.5px\" id=\"oSDwjLCvX\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(5.25 5.25)\" width=\"13.5px\"/><path d=\"M 13.5 13.5 L 0 0\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"13.5px\" id=\"H9XwXWiXU\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(5.25 5.25)\" width=\"13.5px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"2202960551\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-AhL2C\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-AhL2C { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"X\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-AhL2C\");Icon.displayName=\"X\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerImmutableVariables\":\"true\",\"framerDisableUnlink\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"X\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"24\",\"framerIntrinsicHeight\":\"24\",\"framerContractVersion\":\"1\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useEffect,useState,useCallback}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ScrollFadeMask({children,maskColor=\"#f0eeff\",maskSize=80,threshold=20,style,width=\"100%\",height=400}){const scrollRef=useRef(null);const[showTop,setShowTop]=useState(false);const[showBottom,setShowBottom]=useState(false);const updateMasks=useCallback(()=>{const el=scrollRef.current;if(!el)return;const{scrollTop,scrollHeight,clientHeight}=el;const canScrollUp=scrollTop>threshold;const canScrollDown=scrollTop+clientHeight<scrollHeight-threshold;setShowTop(canScrollUp);setShowBottom(canScrollDown);},[threshold]);useEffect(()=>{const el=scrollRef.current;if(!el)return;const timer=setTimeout(updateMasks,50);el.addEventListener(\"scroll\",updateMasks,{passive:true});const ro=new ResizeObserver(updateMasks);ro.observe(el);return()=>{clearTimeout(timer);el.removeEventListener(\"scroll\",updateMasks);ro.disconnect();};},[updateMasks]);const maskBase={position:\"absolute\",left:0,right:0,height:maskSize,pointerEvents:\"none\",zIndex:10,transition:\"opacity 0.3s ease\"};return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width,height,overflow:\"hidden\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{...maskBase,top:0,background:`linear-gradient(to bottom, ${maskColor} 0%, transparent 100%)`,opacity:showTop?1:0}}),/*#__PURE__*/_jsxs(\"div\",{ref:scrollRef,style:{overflowY:\"auto\",height:\"100%\",scrollbarWidth:\"none\",msOverflowStyle:\"none\",overscrollBehavior:\"none\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`div::-webkit-scrollbar { display: none; }`}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\"},children:children})]}),/*#__PURE__*/_jsx(\"div\",{style:{...maskBase,bottom:0,background:`linear-gradient(to top, ${maskColor} 0%, transparent 100%)`,opacity:showBottom?1:0}})]});}ScrollFadeMask.displayName=\"ScrollFadeMask\";addPropertyControls(ScrollFadeMask,{maskColor:{type:ControlType.Color,title:\"Mask Color\",defaultValue:\"#f0eeff\"},maskSize:{type:ControlType.Number,title:\"Mask Size\",defaultValue:80,min:20,max:200,step:4,unit:\"px\"},threshold:{type:ControlType.Number,title:\"Threshold\",defaultValue:20,min:0,max:100,step:1,unit:\"px\"},height:{type:ControlType.Number,title:\"Height\",defaultValue:400,min:100,max:1200,step:8,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":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