{"version":3,"file":"Clipboard.DnGMe2XR.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/Hj20QU19p80mpYsvesiZ/RfHh9MIwqlgi04HKZ3Qo/Clipboard.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{defaultEvents,usePadding,useRadius,useFontControls}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";/**\n * CLIPBOARD\n *\n * @framerIntrinsicWidth 90\n * @framerIntrinsicHeight 50\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function Clipboard(props){const{label,content,fill,color,style,onClick,font,hoverOptions,...rest}=props;const deprecatedFont=useFontControls({fontWeight:500,...rest});const borderRadius=useRadius(props);const paddingValue=usePadding(props);const handleClick=useCallback(()=>{var ref;(ref=navigator.clipboard)===null||ref===void 0?void 0:ref.writeText(content);onClick===null||onClick===void 0?void 0:onClick();},[onClick,content]);return /*#__PURE__*/ _jsx(motion.button,{style:{border:\"none\",outline:\"none\",resize:\"none\",width:\"max-content\",wordBreak:\"break-word\",overflowWrap:\"break-word\",WebkitTapHighlightColor:\"rgba(0, 0, 0, 0)\",letterSpacing:\"-0.2px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",background:fill,borderRadius,cursor:\"pointer\",padding:paddingValue,color,...deprecatedFont,...font,...style},onClick:handleClick,...rest,whileHover:hoverOptions,transition:hoverOptions===null||hoverOptions===void 0?void 0:hoverOptions.transition,children:label});};addPropertyControls(Clipboard,{content:{type:ControlType.String,title:\"Content\",displayTextArea:true,description:\"When clicked, this content will be copied to the clipboard.\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Copy to Clipboard\"},fill:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#06F\"},color:{type:ControlType.Color,title:\"Text\",defaultValue:\"#fff\"},font:{// @ts-ignore - Internal\ntype:ControlType.Font,controls:\"extended\",defaultValue:{fontSize:16}},hoverOptions:{type:ControlType.Object,title:\"Hover\",buttonTitle:\"Effect\",optional:true,controls:{scale:{type:ControlType.Number,title:\"Scale\",min:0,max:10,displayStepper:true,step:.01,defaultValue:1.1},backgroundColor:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#0088FF\",optional:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFF\",optional:true},transition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"spring\",stiffness:400,damping:30}}}},padding:{type:ControlType.FusedNumber,toggleKey:\"paddingPerSide\",toggleTitles:[\"Padding\",\"Padding per side\"],valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\",],valueLabels:[\"T\",\"R\",\"B\",\"L\"],min:0,title:\"Padding\",defaultValue:10},borderRadius:{title:\"Radius\",type:ControlType.FusedNumber,toggleKey:\"isMixedBorderRadius\",toggleTitles:[\"Radius\",\"Radius per corner\"],valueKeys:[\"topLeftRadius\",\"topRightRadius\",\"bottomRightRadius\",\"bottomLeftRadius\",],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0,defaultValue:50},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Clipboard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"50\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"90\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Clipboard.map"],"mappings":"whBAQI,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,UAAQ,OAAK,QAAM,QAAM,UAAQ,OAAK,eAAa,GAAG,GAAM,EAAY,EAAe,EAAgB,CAAC,WAAW,IAAI,GAAG,EAAK,CAAC,CAAO,EAAa,EAAU,EAAM,CAAO,EAAa,EAAW,EAAM,CAAO,EAAYA,MAAgB,CAAC,I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