{"version":3,"file":"StarRating.B7OF_fpv.mjs","names":[],"sources":["https:/framerusercontent.com/modules/M9bNxcIKR83hE6P3XPiH/945OexJU3AVEjNnRsHYm/StarRating.js"],"sourcesContent":["// 5 Star Review Component with customizable total stars, filled stars, star color, and background color\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * 5 Star Review\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StarRating({count=5,value=4.5,color,starColor=\"#FFFFFF\",gap=0,size=24,showBorder=false,borderColor=\"#E0E0E0\",borderWidth=1,style,rounded=false}){return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:gap+\"px\",width:\"fit-content\",...style},children:Array.from({length:count}).map((_,i)=>{const index=i+1;let fill=0;if(value>=index)fill=1;else if(value>i&&value<index)fill=value-i;// SVG paths\nconst normalPath=\"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\";const roundedPath=\"M9.15323 5.408C10.4202 3.136 11.0532 2 12.0002 2C12.9472 2 13.5802 3.136 14.8472 5.408L15.1752 5.996C15.5352 6.642 15.7152 6.965 15.9952 7.178C16.2752 7.391 16.6252 7.47 17.3252 7.628L17.9612 7.772C20.4212 8.329 21.6502 8.607 21.9432 9.548C22.2352 10.488 21.3972 11.469 19.7202 13.43L19.2862 13.937C18.8102 14.494 18.5712 14.773 18.4642 15.117C18.3572 15.462 18.3932 15.834 18.4652 16.577L18.5312 17.254C18.7842 19.871 18.9112 21.179 18.1452 21.76C17.3792 22.341 16.2272 21.811 13.9252 20.751L13.3282 20.477C12.6742 20.175 12.3472 20.025 12.0002 20.025C11.6532 20.025 11.3262 20.175 10.6722 20.477L10.0762 20.751C7.77323 21.811 6.62124 22.341 5.85624 21.761C5.08924 21.179 5.21623 19.871 5.46923 17.254L5.53523 16.578C5.60723 15.834 5.64323 15.462 5.53523 15.118C5.42923 14.773 5.19024 14.494 4.71424 13.938L4.28024 13.43C2.60324 11.47 1.76523 10.489 2.05723 9.548C2.34923 8.607 3.58024 8.328 6.04024 7.772L6.67624 7.628C7.37524 7.47 7.72424 7.391 8.00524 7.178C8.28624 6.965 8.46523 6.642 8.82523 5.996L9.15323 5.408Z\";const path=rounded?roundedPath:normalPath;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:size,height:size,display:\"block\",flex:\"none\"},children:[/*#__PURE__*/_jsx(\"svg\",{width:size,height:size,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-label\":\"star-empty\",style:{position:\"absolute\",top:0,left:0,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"path\",{d:path,fill:starColor||\"#E0E0E0\",stroke:showBorder?borderColor||starColor||\"#E0E0E0\":\"none\",strokeWidth:showBorder?borderWidth:0})}),fill>0&&/*#__PURE__*/_jsx(\"div\",{style:{width:`${fill*100}%`,height:\"100%\",overflow:\"hidden\",position:\"absolute\",top:0,left:0,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"svg\",{width:size,height:size,viewBox:\"0 0 24 24\",fill:\"none\",\"aria-label\":\"star-fill\",style:{display:\"block\"},children:/*#__PURE__*/_jsx(\"path\",{d:path,fill:color||\"none\",stroke:showBorder?borderColor||color:\"none\",strokeWidth:showBorder?borderWidth:0})})})]},i);})});}addPropertyControls(StarRating,{size:{type:ControlType.Number,title:\"Size\",defaultValue:24,min:1,max:100,step:1,unit:\"px\",displayStepper:true},count:{type:ControlType.Number,title:\"Stars\",defaultValue:5,min:1,max:100,step:1,displayStepper:true},value:{type:ControlType.Number,title:\"Filled\",defaultValue:4.5,min:0,max:100,step:.5,displayStepper:true},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:0,min:0,max:1e3,step:1,unit:\"px\",displayStepper:true},color:{type:ControlType.Color,title:\"Fill Color\",defaultValue:\"#FFD600\",optional:true},starColor:{type:ControlType.Color,title:\"Star Color\",defaultValue:\"#D6D6D6\",optional:true,description:\"Empty stars\"},showBorder:{type:ControlType.Boolean,title:\"Border\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#E0E0E0\",optional:true,hidden:({showBorder})=>!showBorder},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:4,step:.5,unit:\"px\",displayStepper:true,hidden:({showBorder})=>!showBorder},rounded:{type:ControlType.Boolean,title:\"Rounded\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Follow the creator on [Twitter](https://x.com/Muhammad_maass)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StarRating\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StarRating.map"],"mappings":"oKAMG,SAAwB,EAAW,CAAC,QAAM,EAAE,QAAM,IAAI,QAAM,YAAU,UAAU,MAAI,EAAE,OAAK,GAAG,aAAW,GAAM,cAAY,UAAU,cAAY,EAAE,QAAM,UAAQ,IAAO,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,IAAI,EAAI,KAAK,MAAM,cAAc,GAAG,EAAM,CAAC,SAAS,MAAM,KAAK,CAAC,OAAO,EAAM,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,IAAM,EAAM,EAAE,EAAM,EAAK,EAAK,GAAO,EAAM,EAAK,EAAU,EAAM,GAAG,EAAM,IAAM,EAAK,EAAM,GACgtB,IAAM,EAAK,EAAxgC,6/BAA7G,2FAAopC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAK,OAAO,EAAK,QAAQ,QA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