{"version":3,"file":"StatsBentoGrid.DIjbeP9I.mjs","names":["React.useRef","React.useId","p"],"sources":["https:/framerusercontent.com/modules/hf9ICN8VxTtvi0urUUri/Exwlph0IsgUvi8xMuQVu/StatsBentoGrid.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useInView}from\"framer-motion\";/**\n * STATS BENTO GRID\n *\n * Адаптивная сетка карточек со статистикой (большая цифра + подпись).\n * Контент масштабируется внутри карточки через CSS container queries,\n * так что при Fill и любом сжатии текст всегда влезает.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 280\n */export default function StatsBentoGrid(props){const{items,columnsDesktop,columnsTablet,gap,radius,padding,minCardHeight,background,borderColor,borderWidth,valueColor,labelColor,valueFont,labelFont,animate,staggerDelay,hoverLift,font}=props;const ref=React.useRef(null);const inView=useInView(ref,{once:true,amount:.25});// На canvas Framer IntersectionObserver не срабатывает надёжно — карточки\n// оставались бы с opacity: 0. Рендерим финальное состояние без анимации.\nconst target=RenderTarget.current();const skipAnimation=target===RenderTarget.canvas||target===RenderTarget.thumbnail;const shouldAnimate=animate&&!skipAnimation;const containerVariants={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:staggerDelay,delayChildren:.05}}};const itemVariants={hidden:{opacity:0,y:24,scale:.98},visible:{opacity:1,y:0,scale:1,transition:{type:\"spring\",stiffness:120,damping:16,mass:.6}}};const uid=React.useId().replace(/:/g,\"\");const scopeClass=`stats-bento-${uid}`;const sectionMotion=shouldAnimate?{variants:containerVariants,initial:\"hidden\",animate:inView?\"visible\":\"hidden\"}:{};const itemMotion=shouldAnimate?{variants:itemVariants}:{};// Адаптивные размеры через container queries — масштабируются по\n// ширине карточки, а не viewport. clamp(min, preferred, max):\n//   max = заданный пользователем размер,\n//   preferred = доля ширины карточки (cqi),\n//   min = пол, чтобы текст оставался читаемым на крошечной карточке.\nconst valueSize=`clamp(${(valueFont.size*.4).toFixed(1)}px, 22cqi, ${valueFont.size}px)`;const labelSize=`clamp(${(labelFont.size*.75).toFixed(1)}px, 5.5cqi, ${labelFont.size}px)`;const cardPadding=`clamp(${(padding*.4).toFixed(1)}px, 7cqi, ${padding}px)`;return /*#__PURE__*/_jsxs(motion.section,{ref:ref,className:scopeClass,style:{width:\"100%\",height:\"100%\",...font},...sectionMotion,children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .${scopeClass} { --cols: ${columnsDesktop}; }\n                @media (max-width: 1024px) {\n                    .${scopeClass} { --cols: ${columnsTablet}; }\n                }\n                @media (max-width: 600px) {\n                    .${scopeClass} { --cols: 1; }\n                }\n                .${scopeClass} .sbg-grid {\n                    display: grid;\n                    width: 100%;\n                    height: 100%;\n                    gap: ${gap}px;\n                    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));\n                    grid-auto-rows: minmax(0, 1fr);\n                }\n                .${scopeClass} .sbg-card {\n                    container-type: inline-size;\n                    min-width: 0;\n                    min-height: 0;\n                    overflow: hidden;\n                    will-change: transform;\n                    transition:\n                        transform 280ms cubic-bezier(.2,.7,.2,1),\n                        border-color 280ms ease,\n                        box-shadow 280ms ease,\n                        background 280ms ease;\n                }\n                .${scopeClass} .sbg-card:hover {\n                    transform: translateY(${hoverLift?\"-4px\":\"0\"});\n                    border-color: rgba(0,0,0,0.22);\n                    box-shadow: 0 12px 32px -16px rgba(0,0,0,0.18);\n                }\n                .${scopeClass} .sbg-value {\n                    display: inline-block;\n                    transition: transform 380ms cubic-bezier(.2,.7,.2,1);\n                }\n                .${scopeClass} .sbg-card:hover .sbg-value {\n                    transform: translateY(-2px);\n                }\n                .${scopeClass} .sbg-label {\n                    overflow-wrap: anywhere;\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{className:\"sbg-grid\",children:items.map((it,i)=>/*#__PURE__*/_jsxs(motion.div,{className:\"sbg-card\",...itemMotion,style:{background,border:`${borderWidth}px solid ${borderColor}`,borderRadius:radius,padding:cardPadding,minHeight:minCardHeight,display:\"flex\",flexDirection:\"column\",justifyContent:\"space-between\",gap:\"min(12px, 2cqi)\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"span\",{className:\"sbg-value\",style:{color:valueColor,fontSize:valueSize,fontWeight:valueFont.weight,letterSpacing:valueFont.letterSpacing,lineHeight:1,whiteSpace:\"nowrap\"},children:it.value}),/*#__PURE__*/_jsx(\"span\",{className:\"sbg-label\",style:{color:labelColor,fontSize:labelSize,fontWeight:labelFont.weight,letterSpacing:labelFont.letterSpacing,lineHeight:1.35},children:it.label})]},i))})]});}StatsBentoGrid.defaultProps={items:[{value:\"8\",label:\"Dataset categories\"},{value:\"48h\",label:\"Max time to delivery\"},{value:\"100%\",label:\"Expert-validated\"},{value:\"Custom\",label:\"Expand any dataset\"}],columnsDesktop:2,columnsTablet:2,gap:1,radius:0,padding:24,minCardHeight:140,background:\"rgba(255,255,255,0.5)\",borderColor:\"rgba(0,0,0,0.12)\",borderWidth:1,valueColor:\"#111111\",labelColor:\"#555555\",valueFont:{size:56,weight:500,letterSpacing:-1.5},labelFont:{size:16,weight:400,letterSpacing:0},animate:true,staggerDelay:.12,hoverLift:true};addPropertyControls(StatsBentoGrid,{items:{type:ControlType.Array,title:\"Cards\",control:{type:ControlType.Object,controls:{value:{type:ControlType.String,title:\"Value\",defaultValue:\"8\",placeholder:\"e.g. 48h\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Dataset categories\",displayTextArea:true}}},defaultValue:[{value:\"8\",label:\"Dataset categories\"},{value:\"48h\",label:\"Max time to delivery\"},{value:\"100%\",label:\"Expert-validated\"},{value:\"Custom\",label:\"Expand any dataset\"}]},columnsDesktop:{type:ControlType.Number,title:\"Cols (desktop)\",min:1,max:6,step:1,displayStepper:true,defaultValue:2},columnsTablet:{type:ControlType.Number,title:\"Cols (tablet)\",min:1,max:4,step:1,displayStepper:true,defaultValue:2},gap:{type:ControlType.Number,title:\"Gap\",min:0,max:64,step:1,defaultValue:1},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:40,step:1,defaultValue:0},padding:{type:ControlType.Number,title:\"Card padding\",min:8,max:80,step:1,defaultValue:24},minCardHeight:{type:ControlType.Number,title:\"Min height\",min:0,max:400,step:4,defaultValue:140},background:{type:ControlType.Color,title:\"Card bg\",defaultValue:\"rgba(255,255,255,0.5)\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(0,0,0,0.12)\"},borderWidth:{type:ControlType.Number,title:\"Border width\",min:0,max:4,step:1,defaultValue:1},valueColor:{type:ControlType.Color,title:\"Value color\",defaultValue:\"#111111\"},labelColor:{type:ControlType.Color,title:\"Label color\",defaultValue:\"#555555\"},valueFont:{type:ControlType.Object,title:\"Value font\",controls:{size:{type:ControlType.Number,title:\"Size\",min:16,max:200,step:1,defaultValue:56},weight:{type:ControlType.Enum,title:\"Weight\",options:[300,400,500,600,700,800],optionTitles:[\"Light\",\"Regular\",\"Medium\",\"SemiBold\",\"Bold\",\"Heavy\"],defaultValue:500},letterSpacing:{type:ControlType.Number,title:\"Tracking\",min:-6,max:6,step:.1,defaultValue:-1.5}}},labelFont:{type:ControlType.Object,title:\"Label font\",controls:{size:{type:ControlType.Number,title:\"Size\",min:10,max:48,step:1,defaultValue:16},weight:{type:ControlType.Enum,title:\"Weight\",options:[300,400,500,600,700],optionTitles:[\"Light\",\"Regular\",\"Medium\",\"SemiBold\",\"Bold\"],defaultValue:400},letterSpacing:{type:ControlType.Number,title:\"Tracking\",min:-2,max:4,step:.05,defaultValue:0}}},animate:{type:ControlType.Boolean,title:\"Animate in\",defaultValue:true},staggerDelay:{type:ControlType.Number,title:\"Stagger\",min:0,max:.5,step:.01,defaultValue:.12,hidden:p=>!p.animate},hoverLift:{type:ControlType.Boolean,title:\"Hover lift\",defaultValue:true},font:{type:ControlType.Font,title:\"Typeface\",controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StatsBentoGrid\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"1200\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"280\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StatsBentoGrid.map"],"mappings":"wPAWG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,QAAM,iBAAe,gBAAc,MAAI,SAAO,UAAQ,gBAAc,aAAW,cAAY,cAAY,aAAW,aAAW,YAAU,YAAU,UAAQ,eAAa,YAAU,QAAM,EAAY,EAAIA,EAAa,KAAK,CAAO,EAAO,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,IAAI,CAAC,CAE5T,EAAO,EAAa,SAAS,CAAO,EAAc,IAAS,EAAa,QAAQ,IAAS,EAAa,UAAgB,EAAc,GAAS,CAAC,EAAoB,EAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,gBAAgB,EAAa,cAAc,IAAI,CAAC,CAAC,CAAO,EAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,KAAK,SAAS,UAAU,IAAI,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC,CAAgD,EAAW,eAAhDC,GAAa,CAAC,QAAQ,KAAK,GAAG,GAA6C,EAAc,EAAc,CAAC,SAAS,EAAkB,QAAQ,SAAS,QAAQ,EAAO,UAAU,SAAS,CAAC,EAAE,CAAO,EAAW,EAAc,CAAC,SAAS,EAAa,CAAC,EAAE,CAKzqB,EAAU,UAAU,EAAU,KAAK,IAAI,QAAQ,EAAE,CAAC,aAAa,EAAU,KAAK,KAAW,EAAU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