{"version":3,"file":"AnimatedCheckbox_2.CU66N6OB.mjs","names":["React.useState","useState","useId","useMemo"],"sources":["https:/framerusercontent.com/modules/ye5OYlIRvQJX8Ou0CIdg/J02WOj12WdR2OoDJXd4q/Passwordset.js","https:/framerusercontent.com/modules/GHmX4LiPiP5owbKYlr4a/FKqCYwJ9BvGfpoDfa5Zz/AnimatedCheckbox_2.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function PasswordPage({correctPassword,children}){const[entered,setEntered]=React.useState(false);const[password,setPassword]=React.useState(\"\");React.useEffect(()=>{if(sessionStorage.getItem(\"pageUnlocked\")===\"true\"){setEntered(true);}},[]);const handleSubmit=e=>{e.preventDefault();if(password===correctPassword){sessionStorage.setItem(\"pageUnlocked\",\"true\");setEntered(true);}else{alert(\"Incorrect password\");setPassword(\"\");}};if(entered){return /*#__PURE__*/_jsx(\"div\",{children:children});}return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",marginTop:\"25px\",padding:\"50px\",backgroundColor:\"#f5f5f5\",borderRadius:\"12px\",boxShadow:\"0 4px 20px rgba(0,0,0,0.15)\"},children:[/*#__PURE__*/_jsx(\"h2\",{children:\"Enter Password to View Page\"}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:{display:\"flex\",flexDirection:\"column\",gap:\"10px\",width:\"300px\",marginTop:\"25px\",fontWeight:\"normal\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:password,onChange:e=>setPassword(e.target.value),placeholder:\"Password\",style:{padding:\"10px\",fontSize:\"16px\",borderRadius:\"8px\",border:\"1px solid #ddd\"}}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:{padding:\"10px\",fontSize:\"16px\",cursor:\"pointer\",color:\"white\",backgroundColor:\"teal\",borderRadius:\"100px\",borderWidth:\"0px\"},children:\"Enter\"})]})]});}addPropertyControls(PasswordPage,{correctPassword:{type:ControlType.String,title:\"Password\",defaultValue:\"MySecret123\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"PasswordPage\":{\"type\":\"reactComponent\",\"name\":\"PasswordPage\",\"slots\":[\"children\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Passwordset.map","// Animated Checkbox component with animated SVG checkmark, property controls for label font, color, border, and more\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useMemo,useId,useEffect}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";/**\n * Animated Checkbox\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function AnimatedCheckbox(props){const{label,checked:checkedProp,onChange,labelFont,labelColor,boxColor,checkedBoxColor,iconColor,borderColor,focusBorderColor,borderRadius,borderWidth,gap,required,errorColor,name,value,style}=props;const isStatic=useIsStaticRenderer();const[checked,setChecked]=useState(checkedProp);const[validationError,setValidationError]=useState(false);const[isFocused,setIsFocused]=useState(false);const id=useId();// SVG checkmark path\nconst checkPath=\"M 0 2.75 L 2.75 5.5 L 8.25 0\";const pathLength=11.667261123657227;// Sync with prop changes\nuseEffect(()=>{startTransition(()=>setChecked(checkedProp));},[checkedProp]);function handleToggle(){const newChecked=!checked;startTransition(()=>setChecked(newChecked));if(onChange)onChange(newChecked);// Clear validation error when checked\nif(newChecked&&validationError){startTransition(()=>setValidationError(false));}}function handleInvalid(e){e.preventDefault();startTransition(()=>setValidationError(true));}function handleFocus(){startTransition(()=>setIsFocused(true));}function handleBlur(){startTransition(()=>setIsFocused(false));}// Determine border color based on required state\nconst activeBorderColor=useMemo(()=>{if(isFocused)return focusBorderColor;if(validationError)return errorColor;return borderColor;},[isFocused,focusBorderColor,validationError,errorColor,borderColor]);const boxHeight=20;const boxStyles={height:boxHeight,aspectRatio:\"1 / 1\",border:`${borderWidth}px solid ${activeBorderColor}`,borderRadius,background:checked?checkedBoxColor:boxColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"border-color 0.15s, background 0.15s\",boxSizing:\"border-box\",flexShrink:0,cursor:\"pointer\",position:\"relative\"};const labelStyles={color:labelColor,...labelFont,userSelect:\"none\",minWidth:0,width:\"max-content\",whiteSpace:\"pre-line\",overflow:\"hidden\",textOverflow:\"ellipsis\"};return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",width:\"100%\",...style},children:/*#__PURE__*/_jsxs(\"label\",{htmlFor:id,style:{display:\"flex\",gap,width:\"100%\",position:\"relative\",cursor:\"pointer\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"input\",{id:id,type:\"checkbox\",checked:checked,onChange:()=>handleToggle(),onInvalid:handleInvalid,onFocus:handleFocus,onBlur:handleBlur,required:required,name:name,value:value,style:{position:\"absolute\",opacity:0}}),/*#__PURE__*/_jsx(\"span\",{style:boxStyles,\"aria-hidden\":\"true\",children:(!isStatic||checked)&&/*#__PURE__*/_jsx(motion.svg,{width:\"50%\",height:\"100%\",viewBox:\"0 0 8.25 5.5\",fill:\"none\",stroke:iconColor,strokeLinecap:\"square\",strokeLinejoin:\"round\",strokeWidth:1,style:{display:\"block\",overflow:\"visible\"},children:/*#__PURE__*/_jsx(motion.path,{d:checkPath,strokeDasharray:pathLength,animate:{strokeDashoffset:checked?0:pathLength,opacity:checked?1:0},transition:{duration:.3,delay:.1,ease:[.12,.23,.5,1],opacity:{duration:checked?.15:0,delay:.1}}})})}),label&&/*#__PURE__*/_jsx(\"span\",{style:labelStyles,children:label})]})});}addPropertyControls(AnimatedCheckbox,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Checkbox label\"},name:{type:ControlType.String,title:\"Name\",defaultValue:\"\",placeholder:\"checkbox-name\"},value:{type:ControlType.String,title:\"Value\",defaultValue:\"\",placeholder:\"checkbox-value\"},checked:{type:ControlType.Boolean,title:\"Checked\",defaultValue:false},required:{type:ControlType.Boolean,title:\"Required\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#fff\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:4,min:0},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:0,min:0},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:4},boxColor:{type:ControlType.Color,title:\"Box Color\",defaultValue:\"rgba(187, 187, 187, 0.15)\"},checkedBoxColor:{type:ControlType.Color,title:\"Checked Box Color\",defaultValue:\"#fff\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#000\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"rgba(204, 204, 204, 0)\"},focusBorderColor:{type:ControlType.Color,title:\"Focus Border Color\",defaultValue:\"#fff\"},errorColor:{type:ControlType.Color,title:\"Error Border Color\",defaultValue:\"#FF5588\"}});AnimatedCheckbox.displayName=\"013 Checkbox\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedCheckbox\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedCheckbox_2.map"],"mappings":"sQAAyI,SAAgB,EAAa,CAAC,kBAAgB,YAAU,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAe,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAe,GAAG,CAAgW,OAA/V,MAAoB,CAAI,eAAe,QAAQ,eAAe,GAAG,QAAQ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