{"version":3,"file":"CollectionRow.JVKBVFFY.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/hacNZIq6KufwEbKiwjzS/3W0bRHc4b6GI1uVrLE4h/CollectionRow.js"],"sourcesContent":["// ============================================================\n// CollectionRow — Kiku Designed Elements\n// Full-width collection navigation row.\n// Hover reveals a background image with smooth crossfade.\n// All text, colours, sizes controllable per instance.\n// ============================================================\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useRef,useEffect}from\"react\";export default function CollectionRow({collectionName,vehicles,subtitle,price,link,bgColor,textColor,mutedColor,hoverImage,hoverBgColor,hoverOverlayColor,hoverTextColor,hoverMutedColor,fontFamily,nameSize,nameSizeMobile,metaSize,rowHeight,rowHeightMobile,paddingLeft,paddingRight,paddingLeftMobile,paddingRightMobile,showDivider,dividerColor,style}){const[hovered,setHovered]=useState(false);const[rowWidth,setRowWidth]=useState(900);const ref=useRef(null);useEffect(()=>{const el=ref.current;if(!el)return;const obs=new ResizeObserver(([entry])=>setRowWidth(entry.contentRect.width));obs.observe(el);return()=>obs.disconnect();},[]);const isMobile=rowWidth<600;const font=fontFamily||\"-apple-system, BlinkMacSystemFont, 'Inter', sans-serif\";const currentPaddingLeft=isMobile?paddingLeftMobile:paddingLeft;const currentPaddingRight=isMobile?paddingRightMobile:paddingRight;const currentHeight=isMobile?rowHeightMobile:rowHeight;const currentNameSize=isMobile?nameSizeMobile:nameSize;// isHovering is true whenever hovering — works for both colour and image hover\nconst isHovering=hovered;const currentTextColor=isHovering?hoverTextColor:textColor;const currentMutedColor=isHovering?hoverMutedColor:mutedColor;return /*#__PURE__*/_jsxs(\"a\",{ref:ref,href:link||\"#\",onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),style:{position:\"relative\",display:\"flex\",alignItems:\"center\",width:\"100%\",height:currentHeight,overflow:\"hidden\",textDecoration:\"none\",cursor:\"pointer\",background:hovered?hoverBgColor:bgColor,transition:\"background-color 0.5s ease\",borderBottom:showDivider?`0.5px solid ${dividerColor}`:\"none\",paddingLeft:currentPaddingLeft,paddingRight:currentPaddingRight,boxSizing:\"border-box\",...style},children:[hoverImage&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,backgroundImage:`url(${hoverImage})`,backgroundSize:\"cover\",backgroundPosition:\"center\",opacity:isHovering?1:0,transition:\"opacity 0.65s ease\",pointerEvents:\"none\"}}),hoverImage&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:hoverOverlayColor,opacity:isHovering?1:0,transition:\"opacity 0.65s ease\",pointerEvents:\"none\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:2,display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",width:\"100%\"},children:[/*#__PURE__*/_jsxs(\"div\",{children:[vehicles&&!isMobile&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:metaSize,letterSpacing:\"0.1em\",textTransform:\"uppercase\",color:currentMutedColor,margin:\"0 0 10px\",fontFamily:font,transition:\"color 0.4s ease\",fontWeight:400},children:vehicles}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:currentNameSize,fontWeight:500,color:currentTextColor,margin:0,fontFamily:font,letterSpacing:\"-0.025em\",lineHeight:1,transition:\"color 0.4s ease\"},children:collectionName})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:isMobile?16:40,flexShrink:0},children:[!isMobile&&/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"right\"},children:[subtitle&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:metaSize,color:currentMutedColor,margin:\"0 0 4px\",fontFamily:font,fontStyle:\"italic\",transition:\"color 0.4s ease\"},children:subtitle}),price&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:metaSize,color:currentMutedColor,margin:0,fontFamily:font,transition:\"color 0.4s ease\"},children:price})]}),/*#__PURE__*/_jsx(\"svg\",{width:isMobile?18:22,height:isMobile?18:22,viewBox:\"0 0 22 22\",fill:\"none\",style:{flexShrink:0,transform:hovered?\"translateX(6px)\":\"translateX(0)\",transition:\"transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease\",opacity:hovered?1:.35},children:/*#__PURE__*/_jsx(\"path\",{d:\"M3 11h16M13 5l6 6-6 6\",stroke:currentTextColor,strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{transition:\"stroke 0.4s ease\"}})})]})]})]});}addPropertyControls(CollectionRow,{// ── Content ────────────────────────────────────────────\ncollectionName:{type:ControlType.String,title:\"Collection Name\",defaultValue:\"Signature\"},vehicles:{type:ControlType.String,title:\"Vehicles\",defaultValue:\"Mercedes W177 \\xb7 BMW F-Series\",description:\"Shown above the name on desktop. Hidden on mobile.\"},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"Defined, focused\",description:\"Shown on the right side on desktop.\"},price:{type:ControlType.String,title:\"Price\",defaultValue:\"From \\xa3265\"},link:{type:ControlType.Link,title:\"Link To\"},// ── Default colours ────────────────────────────────────\nbgColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#f5f5f3\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#111111\"},mutedColor:{type:ControlType.Color,title:\"Muted Text Color\",defaultValue:\"#999999\",description:\"Vehicles, subtitle, price text\"},// ── Hover ──────────────────────────────────────────────\nhoverImage:{type:ControlType.Image,title:\"Hover Image\",description:\"Background image on hover. Optional — colour hover works without this.\"},hoverBgColor:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"#e8e8e6\",description:\"Background colour on hover. Used when no image is set, or behind an image.\"},hoverOverlayColor:{type:ControlType.Color,title:\"Hover Overlay\",defaultValue:\"rgba(0,0,0,0.45)\",description:\"Dark overlay on top of the hover image — adjust for text readability\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"#ffffff\"},hoverMutedColor:{type:ControlType.Color,title:\"Hover Muted Color\",defaultValue:\"rgba(255,255,255,0.55)\"},// ── Typography ─────────────────────────────────────────\nfontFamily:{type:ControlType.String,title:\"Font Family\",defaultValue:\"\",description:\"Leave blank for system font. Must match a font loaded in Framer.\"},nameSize:{type:ControlType.Number,title:\"Name Size Desktop (px)\",defaultValue:52,min:24,max:120,step:2,displayStepper:true},nameSizeMobile:{type:ControlType.Number,title:\"Name Size Mobile (px)\",defaultValue:32,min:18,max:72,step:2,displayStepper:true},metaSize:{type:ControlType.Number,title:\"Meta Text Size (px)\",defaultValue:12,min:10,max:18,step:1,displayStepper:true},// ── Layout ─────────────────────────────────────────────\nrowHeight:{type:ControlType.Number,title:\"Row Height Desktop (px)\",defaultValue:160,min:80,max:400,step:8,displayStepper:true},rowHeightMobile:{type:ControlType.Number,title:\"Row Height Mobile (px)\",defaultValue:100,min:60,max:200,step:4,displayStepper:true},paddingLeft:{type:ControlType.Number,title:\"Padding Left Desktop (px)\",defaultValue:32,min:0,max:160,step:4,displayStepper:true},paddingRight:{type:ControlType.Number,title:\"Padding Right Desktop (px)\",defaultValue:32,min:0,max:160,step:4,displayStepper:true},paddingLeftMobile:{type:ControlType.Number,title:\"Padding Left Mobile (px)\",defaultValue:16,min:0,max:60,step:4,displayStepper:true},paddingRightMobile:{type:ControlType.Number,title:\"Padding Right Mobile (px)\",defaultValue:16,min:0,max:60,step:4,displayStepper:true},showDivider:{type:ControlType.Boolean,title:\"Show Divider\",defaultValue:true,description:\"Thin line at the bottom of the row\"},dividerColor:{type:ControlType.Color,title:\"Divider Color\",defaultValue:\"#e0e0e0\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CollectionRow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CollectionRow.map"],"mappings":"+LAM0J,SAAwB,EAAc,CAAC,iBAAe,WAAS,WAAS,QAAM,OAAK,UAAQ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