{"version":3,"file":"TestimonialBubble.C69ISevF.mjs","names":["useState"],"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\":{\"fram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