{"version":3,"file":"TestimonialBubble.C02KdfOS.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","p","_e","init_framer_DKtAEkcX","addPropertyControls","ControlType","Star","size","filled","color","TestimonialBubble","defaultTestimonials","props","expanded","setExpanded","handleExpand","idx","style","testimonials","isExpanded","i","shortText","t","longText","bubbleColor","textColor","nameFont","starColor","starSize","testimonialFont","init_TestimonialBubble"],"sources":["https:/framerusercontent.com/modules/lKuP4H50He3ctxxd4k6g/KRz2Fo7oMCs6aVzkj7CU/TestimonialBubble.js"],"sourcesContent":["// Testimonial message bubbles with name, star rating, and testimonial text\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";const defaultTestimonials=[{name:\"Jane Doe\",image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Jane Doe\"},rating:5,testimonial:\"This product changed my life! Highly recommended to everyone.\"},{name:\"John Smith\",image:{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"John Smith\"},rating:4,testimonial:\"Great value and excellent support. Will buy again!\"}];function Star({filled,color,size}){return /*#__PURE__*/_jsx(\"svg\",{width:size,height:size,viewBox:\"0 0 20 20\",fill:filled?color:\"none\",stroke:color,strokeWidth:\"1.5\",style:{display:\"inline-block\",verticalAlign:\"middle\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"polygon\",{points:\"10,2 12.59,7.36 18.51,7.97 14,12.14 15.18,18.02 10,15.1 4.82,18.02 6,12.14 1.49,7.97 7.41,7.36\"})});}/**\n * Testimonial Bubbles\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function TestimonialBubble(props){const{testimonials=defaultTestimonials,bubbleColor,textColor,nameFont,testimonialFont,starColor,starSize,gap,style}=props;const[expanded,setExpanded]=useState(-1);function handleExpand(idx){setExpanded(expanded===idx?-1:idx);}return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",display:\"flex\",flexDirection:\"column\",gap,alignItems:\"flex-start\"},children:testimonials.map((t,i)=>{const isExpanded=expanded===i;const shortText=t.testimonial.length>120&&!isExpanded?t.testimonial.slice(0,120)+\"…\":t.testimonial;const longText=t.longTestimonial||t.testimonial;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:i%2===0?\"row\":\"row-reverse\",alignItems:\"flex-start\",gap:16,width:\"100%\",justifyContent:i%2===0?\"flex-start\":\"flex-end\",cursor:\"pointer\"},tabIndex:0,role:\"button\",\"aria-expanded\":isExpanded,onClick:()=>handleExpand(i),onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \")handleExpand(i);},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:48,height:48,borderRadius:\"50%\",overflow:\"hidden\",flexShrink:0,background:\"#eee\",border:\"2px solid #fff\",boxShadow:\"0 1px 4px rgba(0,0,0,0.06)\",marginTop:8},children:/*#__PURE__*/_jsx(\"img\",{src:t.image?.src||\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:t.image?.alt||t.name,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}})}),/*#__PURE__*/_jsxs(\"div\",{style:{background:bubbleColor,color:textColor,borderRadius:16,padding:\"20px 24px 16px 24px\",boxShadow:\"0 2px 8px rgba(0,0,0,0.06)\",maxWidth:420,minWidth:220,alignSelf:i%2===0?\"flex-start\":\"flex-end\",position:\"relative\",transition:\"box-shadow 0.2s, background 0.2s\",outline:isExpanded?\"2px solid #0099FF\":\"none\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{...nameFont,marginBottom:4},children:t.name}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",marginBottom:8},children:Array.from({length:5}).map((_,idx)=>/*#__PURE__*/_jsx(Star,{filled:idx<t.rating,color:starColor,size:starSize},idx))}),/*#__PURE__*/_jsxs(\"div\",{style:{...testimonialFont},children:[isExpanded?longText:shortText,t.longTestimonial&&!isExpanded&&/*#__PURE__*/_jsx(\"span\",{style:{color:\"#A8A7A7\",marginLeft:6,fontWeight:500,cursor:\"pointer\"},children:\"Read more\"})]}),isExpanded&&t.longTestimonial&&/*#__PURE__*/_jsx(\"div\",{style:{marginTop:12,color:textColor,fontSize:14,opacity:.8},children:t.moreDetails})]})]},i);})});}addPropertyControls(TestimonialBubble,{testimonials:{type:ControlType.Array,title:\"Testimonials\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Name\",defaultValue:\"Jane Doe\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},rating:{type:ControlType.Number,title:\"Stars\",min:1,max:5,step:1,defaultValue:5,displayStepper:true},testimonial:{type:ControlType.String,title:\"Testimonial\",defaultValue:\"This product changed my life! Highly recommended to everyone.\",displayTextArea:true},longTestimonial:{type:ControlType.String,title:\"Long Version\",defaultValue:\"This product changed my life! Highly recommended to everyone. I was skeptical at first, but after using it for a few weeks, I saw real results. The customer support was also fantastic and answered all my questions.\",displayTextArea:true},moreDetails:{type:ControlType.String,title:\"More Details\",defaultValue:\"Verified purchase. Reviewed on 2024-06-01.\"}}},defaultValue:defaultTestimonials,maxCount:6},bubbleColor:{type:ControlType.Color,title:\"Bubble Color\",defaultValue:\"#F5F5F5\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#222222\"},nameFont:{type:ControlType.Font,title:\"Name Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.1em\"}},testimonialFont:{type:ControlType.Font,title:\"Testimonial Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},starColor:{type:ControlType.Color,title:\"Star Color\",defaultValue:\"#FFBB00\"},starSize:{type:ControlType.Number,title:\"Star Size\",defaultValue:20,min:12,max:40,step:1,unit:\"px\"},gap:{type:ControlType.Number,title:\"Bubble Gap\",defaultValue:24,min:8,max:64,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TestimonialBubble\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TestimonialBubble.map"],"mappings":"A,iLAC4iB,SAASU,EAAK,CAAC,SAAO,QAAM,QAAM,CAAC,MAAoB,gBAAK,MAAM,CAAC,MAAMC,EAAK,OAAOA,EAAK,QAAQ,YAAY,KAAKC,EAAOC,EAAM,OAAO,OAAOA,EAAM,YAAY,MAAM,MAAM,CAAC,QAAQ,eAAe,cAAc,QAAQ,EAAE,cAAc,OAAO,SAAsB,gBAAK,UAAU,CAAC,OAAO,gGAAgG,CAAC,CAAC,CAAC,CAAE,CAK56B,SAAwBC,EAAkB,EAAM,CAAC,GAAK,CAAC,eAAaC,EAAoB,cAAY,YAAU,WAAS,kBAAgB,YAAU,WAAS,MAAI,SAAOC,EAAW,CAACC,EAASC,GAAalB,EAAS,EAAE,EAAE,SAASmB,EAAa,EAAI,CAACD,EAAYD,IAAWG,EAAI,GAAGA,CAAG,CAAE,CAAC,MAAoB,gBAAK,MAAM,CAAC,MAAM,CAAC,GAAGC,EAAM,MAAM,OAAO,QAAQ,OAAO,cAAc,SAAS,MAAI,WAAW,YAAY,EAAE,SAASC,EAAa,KAAK,EAAE,IAAI,CAAC,IAAMC,EAAWN,IAAWO,EAAQC,EAAUC,EAAE,YAAY,OAAO,KAAK,CAACH,EAAWG,EAAE,YAAY,MAAM,EAAE,GAAG,EAAE,IAAIA,EAAE,YAAkBC,EAASD,EAAE,iBAAiBA,EAAE,YAAY,MAAoB,gBAAM,MAAM,CAAC,M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