{"version":3,"file":"Notes.B61QDQ8U.mjs","names":["React.useMemo"],"sources":["https:/framerusercontent.com/modules/e3x4jPb1EG4euVPWc4mR/DcqkjAY8EPVJ6ETf0Jqb/Notes.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget,Color}from\"framer\";import{defaultEvents,fontStack}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";const colors={blue:\"#0099FF\",darkBlue:\"#0066FF\",purple:\"#8855FF\",red:\"#FF5588\",green:\"#22CC66\",yellow:\"#FFBB00\"};/**\n * STICKY\n *\n * @framerIntrinsicWidth 180\n * @framerIntrinsicHeight 180\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export function Notes(props){const{note=\"\",shadow,color,preview,alignment,smallFont,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,useScriptFont}=props;const[baseColorString,backgroundColorString]=React.useMemo(()=>{const baseColor=Color(colors[color]);const hslColor=Color.toHsl(baseColor);hslColor.l=0.95;const baseColorString=Color(colors[color]).toValue();const backgroundColorString=Color(hslColor).toValue();return[baseColorString,backgroundColorString];},[color]);const centerAligned=alignment===\"center\";const hasContent=note.length>0;return(/*#__PURE__*/ _jsxs(\"div\",{style:{flex:1,width:\"100%\",height:\"100%\",display:\"flex\",alignItems:centerAligned?\"center\":\"flex-start\",backgroundColor:backgroundColorString,overflow:\"hidden\",paddingLeft:smallFont?15:18,paddingTop:useScriptFont?12:14,paddingBottom:useScriptFont?12:14,paddingRight:smallFont?15:18,borderRadius:8,visibility:RenderTarget.current()===RenderTarget.preview&&!preview?\"hidden\":\"visible\",fontFamily:useScriptFont?\"Nanum Pen Script\":fontStack,//@ts-ignore\nfontDisplay:\"fallback\",boxShadow:shadow?\"0 4px 10px rgba(0,0,0,0.08)\":\"none\"},onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,children:[/*#__PURE__*/ _jsx(\"link\",{href:\"https://fonts.googleapis.com/css?family=Nanum+Pen+Script&display=swap\",rel:\"stylesheet\"}),/*#__PURE__*/ _jsx(\"p\",{style:{width:\"max-content\",wordBreak:\"break-word\",overflowWrap:\"break-word\",overflow:\"hidden\",whiteSpace:\"pre-wrap\",margin:0,fontSize:smallFont?useScriptFont?18:12:useScriptFont?32:24,lineHeight:smallFont?useScriptFont?1.15:1.4:useScriptFont?1.08:1.3,textAlign:alignment,color:baseColorString,display:\"-webkit-box\",opacity:hasContent?1:0.5,// lineClamp: 7,\nWebkitBoxOrient:\"vertical\"},children:hasContent?note:\"Write something...\"})]}));}Notes.defaultProps={useScriptFont:false,color:\"blue\",width:180,height:180,shadow:false};addPropertyControls(Notes,{note:{type:ControlType.String,displayTextArea:true,placeholder:`Write something… \\n\\n\\n`},color:{type:ControlType.Enum,defaultValue:\"blue\",options:Object.keys(colors),optionTitles:Object.keys(colors).map(c=>c.replace(/^\\w/,c=>c.toUpperCase()))},alignment:{title:\"Text Align\",type:ControlType.Enum,displaySegmentedControl:true,optionTitles:[\"Left\",\"Center\",\"Right\"],options:[\"left\",\"center\",\"right\"]},useScriptFont:{type:ControlType.Boolean,disabledTitle:\"Default\",enabledTitle:\"Script\",title:\"Font\"},smallFont:{type:ControlType.Boolean,disabledTitle:\"Big\",enabledTitle:\"Small\",title:\"Text Size\"},preview:{type:ControlType.Boolean,defaultValue:true,title:\"In Preview\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},shadow:{type:ControlType.Boolean,defaultValue:Notes.defaultProps.shadow,title:\"Shadow\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},...defaultEvents});Notes.displayName=\"Sticky Note\";\nexport const __FramerMetadata__ = {\"exports\":{\"Notes\":{\"type\":\"reactComponent\",\"name\":\"Notes\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"180\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicHeight\":\"180\",\"framerSupportedLayoutWidth\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