{"version":3,"file":"Clickable_text.DUlHCBB-.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/VbZ0jJZ2NxTtynjTMmDl/HLi3dH9RpEPtfxWYgF2P/Clickable_text.js"],"sourcesContent":["// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Clickable_text(props){const{text,link,newTab,tag,font,fontSize,lineHeight,letterSpacing,align,wrap,maxWidth,textColor,hoverColor,activeColor,isActive,underline,underlineWeight,underlineOffset,underlineColor,hoverEffect,hoverScale,hoverShift,style}=props;const[hover,setHover]=useState(false);const color=isActive?activeColor:hover?hoverColor:textColor;const lineColor=underlineColor===\"auto\"?color:underlineColor;const showLine=underline===\"always\"||underline===\"hover\"&&hover||underline===\"hoverOut\"&&!hover;const Tag=tag===\"h1\"?motion.h1:tag===\"h2\"?motion.h2:tag===\"h3\"?motion.h3:motion.span;return /*#__PURE__*/_jsxs(motion.a,{href:link||undefined,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined,onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),style:{display:\"inline-block\",position:\"relative\",maxWidth:wrap?maxWidth:undefined,textDecoration:\"none\",cursor:link?\"pointer\":\"default\",...style},animate:{scale:hoverEffect===\"scale\"&&hover?hoverScale:1,x:hoverEffect===\"shift\"&&hover?hoverShift:0},whileTap:{scale:.98},transition:{type:\"spring\",stiffness:400,damping:24},children:[/*#__PURE__*/_jsx(Tag,{style:{...font,margin:0,color:color,fontSize:fontSize,lineHeight:lineHeight,letterSpacing:letterSpacing,textAlign:align,whiteSpace:wrap?\"normal\":\"nowrap\",display:\"block\",transition:\"color 0.2s ease\"},children:text}),underline!==\"none\"?/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",left:0,bottom:-underlineOffset,height:underlineWeight,backgroundColor:lineColor,transformOrigin:\"left center\",borderRadius:underlineWeight,pointerEvents:\"none\"},initial:false,animate:{width:\"100%\",scaleX:showLine?1:0,opacity:showLine?1:0},transition:{duration:.25,ease:\"easeOut\"}}):null]});}addPropertyControls(Clickable_text,{text:{title:\"Teks\",type:ControlType.String,defaultValue:\"Lihat semua project\",displayTextArea:true},link:{title:\"Link\",type:ControlType.Link},newTab:{title:\"Tab Baru\",type:ControlType.Boolean,defaultValue:false,enabledTitle:\"Ya\",disabledTitle:\"Tidak\"},tag:{title:\"Jenis Teks\",type:ControlType.Enum,defaultValue:\"span\",options:[\"span\",\"h1\",\"h2\",\"h3\"],optionTitles:[\"Body\",\"H1\",\"H2\",\"H3\"]},font:{title:\"Font\",type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\"},fontSize:{title:\"Ukuran\",type:ControlType.Number,defaultValue:17,min:8,max:120,step:1},lineHeight:{title:\"Tinggi Baris\",type:ControlType.Number,defaultValue:1.4,min:.8,max:3,step:.05},letterSpacing:{title:\"Jarak Huruf\",type:ControlType.Number,defaultValue:0,min:-3,max:10,step:.1,unit:\"px\"},align:{title:\"Perataan\",type:ControlType.Enum,defaultValue:\"left\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Kiri\",\"Tengah\",\"Kanan\"],displaySegmentedControl:true},wrap:{title:\"Bisa Turun Baris\",type:ControlType.Boolean,defaultValue:false,enabledTitle:\"Ya\",disabledTitle:\"Satu Baris\"},maxWidth:{title:\"Lebar Maks\",type:ControlType.Number,defaultValue:400,min:60,max:1200,step:10,unit:\"px\",hidden:props=>!props.wrap},isActive:{title:\"Halaman Aktif\",type:ControlType.Boolean,defaultValue:false,enabledTitle:\"Aktif\",disabledTitle:\"Normal\"},textColor:{title:\"Warna Normal\",type:ControlType.Color,defaultValue:\"#1B1C3A\"},hoverColor:{title:\"Warna Hover\",type:ControlType.Color,defaultValue:\"#C4707E\"},activeColor:{title:\"Warna Aktif\",type:ControlType.Color,defaultValue:\"#C4707E\"},underline:{title:\"Garis Bawah\",type:ControlType.Enum,defaultValue:\"hover\",options:[\"none\",\"always\",\"hover\",\"hoverOut\"],optionTitles:[\"Tidak Ada\",\"Selalu\",\"Saat Hover\",\"Hilang Saat Hover\"]},underlineWeight:{title:\"Tebal Garis\",type:ControlType.Number,defaultValue:2,min:.5,max:10,step:.5,hidden:props=>props.underline===\"none\"},underlineOffset:{title:\"Jarak Garis\",type:ControlType.Number,defaultValue:2,min:-4,max:20,step:1,hidden:props=>props.underline===\"none\"},underlineColor:{title:\"Warna Garis\",type:ControlType.Color,defaultValue:\"#C4707E\",hidden:props=>props.underline===\"none\"},hoverEffect:{title:\"Efek Hover\",type:ControlType.Enum,defaultValue:\"none\",options:[\"none\",\"scale\",\"shift\"],optionTitles:[\"Tidak Ada\",\"Membesar\",\"Geser\"]},hoverScale:{title:\"Skala Hover\",type:ControlType.Number,defaultValue:1.04,min:1,max:1.4,step:.01,hidden:props=>props.hoverEffect!==\"scale\"},hoverShift:{title:\"Geser Hover\",type:ControlType.Number,defaultValue:4,min:-20,max:20,step:1,unit:\"px\",hidden:props=>props.hoverEffect!==\"shift\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Clickable_text\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Clickable_text.map"],"mappings":"kOAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,SAAO,MAAI,OAAK,WAAS,aAAW,gBAAc,QAAM,OAAK,WAAS,YAAU,aAAW,cAAY,WAAS,YAAU,kBAAgB,kBAAgB,iBAAe,cAAY,aAAW,aAAW,SAAO,EAAW,CAAC,EAAM,GAAUA,EAAS,EAAK,EAAQ,EAAM,EAAS,EAAY,EAAM,EAAW,EAAg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