{"version":3,"file":"CopyBox.BCe2VcxK.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/9uq9yeWfa7QBq7Lzbtab/YuXydCFjYuODI9zsujWI/CopyBox.js"],"sourcesContent":["// Copy Box with adjustable text\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Copy Box\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 140\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function CopyBox(props){const{title,text,textFont,textColor,background,borderRadius,buttonLabel,buttonFont,buttonColor,buttonTextColor,style}=props;const[copied,setCopied]=useState(false);function handleCopy(){if(typeof window!==\"undefined\"){navigator.clipboard.writeText(text);startTransition(()=>setCopied(true));setTimeout(()=>startTransition(()=>setCopied(false)),1200);}}return /*#__PURE__*/_jsxs(\"div\",{style:{...style,background,borderRadius,padding:20,display:\"flex\",flexDirection:\"column\",gap:12,boxShadow:\"0 2px 8px rgba(0,0,0,0.06)\",position:\"relative\",minWidth:220,minHeight:100},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:600,fontSize:16,marginBottom:2},children:title}),/*#__PURE__*/_jsx(\"div\",{style:{...textFont,color:textColor,background:\"#F5F5F5\",borderRadius:6,padding:\"10px 14px\",wordBreak:\"break-all\",marginBottom:6},children:text}),/*#__PURE__*/_jsx(\"button\",{style:{...buttonFont,background:buttonColor,color:buttonTextColor,border:\"none\",borderRadius:6,padding:\"8px 18px\",cursor:\"pointer\",fontWeight:500,fontSize:15,alignSelf:\"flex-end\",minWidth:80,transition:\"background 0.15s\"},onClick:handleCopy,\"aria-label\":\"Copy text\",children:copied?\"Copied!\":buttonLabel})]});}addPropertyControls(CopyBox,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Copy this text\"},text:{type:ControlType.String,title:\"Text\",defaultValue:\"Paste your text here to copy.\",displayTextArea:true},textFont:{type:ControlType.Font,title:\"Text Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Copy\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#111111\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CopyBox\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"400\",\"framerIntrinsicHeight\":\"140\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CopyBox.map"],"mappings":"wMASG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,OAAK,WAAS,YAAU,aAAW,eAAa,cAAY,aAAW,cAAY,kBAAgB,SAAO,EAAW,CAAC,EAAO,GAAWA,EAAS,EAAK,EAAE,SAAS,GAAY,CAAW,IAAS,SAAa,EAAU,UAAU,UAAU,CAAI,EAAE,MAAoB,EAAU,EAAI,CAAC,EAAE,eAAeC,MAAoB,EAAU,EAAK,CAAC,EAAE,IAAI,EAAG,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,aAA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