{"version":3,"file":"ArrowNavigation.DNMkRs0O.mjs","names":[],"sources":["https:/framerusercontent.com/modules/iukiqRbVkghG2jcaFePu/QEVNwGzeHkQsKkLydEGf/ArrowNavigation.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function ArrowNavigation(props){const scrollCarousel=direction=>{const carousel=document.querySelector(`[data-carousel-id=\"${props.targetId}\"]`);if(!carousel)return;const firstCard=carousel.children[0];const cardWidth=firstCard?.offsetWidth||330;const styles=window.getComputedStyle(carousel);const gap=parseFloat(styles.gap||\"24\");carousel.scrollBy({left:direction===\"next\"?cardWidth+gap:-(cardWidth+gap),behavior:\"smooth\"});};const buttonStyle={width:props.size,height:props.size,background:props.backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",boxSizing:\"border-box\",transition:\"background 0.25s ease\",padding:0};return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",width:props.size*2,height:props.size},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"前へ\",style:{...buttonStyle,border:`${props.strokeWidth}px solid ${props.borderColorLeft}`,borderRight:\"none\"},onClick:()=>scrollCarousel(\"prev\"),onMouseEnter:e=>{e.currentTarget.style.background=props.hoverBackgroundColor;},onMouseLeave:e=>{e.currentTarget.style.background=props.backgroundColor;},children:/*#__PURE__*/_jsx(\"svg\",{width:props.size*.42,height:props.size*.42,viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 5L8 12L15 19\",stroke:props.arrowColor,strokeWidth:1.6,strokeLinecap:\"square\",strokeLinejoin:\"miter\"})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"次へ\",style:{...buttonStyle,border:`${props.strokeWidth}px solid ${props.borderColorRight}`},onClick:()=>scrollCarousel(\"next\"),onMouseEnter:e=>{e.currentTarget.style.background=props.hoverBackgroundColor;},onMouseLeave:e=>{e.currentTarget.style.background=props.backgroundColor;},children:/*#__PURE__*/_jsx(\"svg\",{width:props.size*.42,height:props.size*.42,viewBox:\"0 0 24 24\",fill:\"none\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 5L16 12L9 19\",stroke:props.arrowColor,strokeWidth:1.6,strokeLinecap:\"square\",strokeLinejoin:\"miter\"})})})]});}ArrowNavigation.defaultProps={targetId:\"works-carousel\",size:36,borderColorLeft:\"#D9D4CC\",borderColorRight:\"#111111\",arrowColor:\"#111111\",backgroundColor:\"#FFFFFF\",hoverBackgroundColor:\"#F7F4EF\",strokeWidth:1};addPropertyControls(ArrowNavigation,{targetId:{type:ControlType.String,title:\"連携ID\"},size:{type:ControlType.Number,title:\"サイズ\",min:28,max:56,step:1},borderColorLeft:{type:ControlType.Color,title:\"左枠線\"},borderColorRight:{type:ControlType.Color,title:\"右枠線\"},arrowColor:{type:ControlType.Color,title:\"矢印色\"},backgroundColor:{type:ControlType.Color,title:\"背景色\"},hoverBackgroundColor:{type:ControlType.Color,title:\"ホバー背景\"},strokeWidth:{type:ControlType.Number,title:\"線の太さ\",min:1,max:3,step:.5}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArrowNavigation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArrowNavigation.map"],"mappings":"iLAA6G,SAAwB,EAAgB,EAAM,CAAC,IAAM,EAAe,GAAW,CAAC,IAAM,EAAS,SAAS,cAAc,sBAAsB,EAAM,SAAS,GAAG,EAAE,GAAG,CAAC,EAAS,OAA4C,IAAM,EAA3B,EAAS,SAAS,EAA4B,EAAE,aAAa,IAAU,EAAO,EAAO,iBAAiB,CAAQ,EAAQ,EAAI,WAAW,EAAO,KAAK,IAAI,EAAE,EAAS,SAAS,CAAC,KAAK,IAAY,OAAO,EAAU,EAAI,EAAE,EAAU,GAAK,S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