{"version":3,"file":"GGButton.jaTukAS1.mjs","names":["_Fragment","__esmMin","init_ssg_sandbox_shims","window","p","init_jsx_runtime","l","motion","useReducedMotion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BWFVvmND","useIsStaticRenderer","ControlType","Arrow","color","GGButton","props","isStatic","reduce","still","isPill","variant","large","size","typeStyle","customFont","font","SANS","lineH","t","EASE","rollVariants","fillVariants","arrowVariants","lineVariants","press","onScrollTo","scrollTo","behavior","el","isPath","href","link","isLink","Tag","newTab","style","fill","textColor","fillHover","label","textHover","arrow","init_GGButton"],"sources":["https:/framerusercontent.com/modules/QNw5VYQBBb8jHE9DMe9T/PaSlOopgAgh9EVFW5Phu/GGButton.js"],"sourcesContent":["// GG Button (Grove & Grain template)\n// Request: modular, well-labelled pill buttons and text links with\n// Awwwards-grade hover motion: the label rolls to a second copy, a fill rises\n// from the bottom like liquid, and the arrow passes through its box.\n// Goes to a Link, or use Go To for a section on this page: type the section's\n// layer name (for example \"04 Collection\") or \"top\". Go To also takes a path\n// such as /work#Seating, which opens that chapter of another page.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useReducedMotion}from\"framer-motion\";const SANS='\"Satoshi\", \"Satoshi Placeholder\", sans-serif';const EASE=[.16,1,.3,1];function Arrow({color}){return /*#__PURE__*/_jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 14 14\",fill:\"none\",\"aria-hidden\":\"true\",style:{display:\"block\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M1 7h11.2M7.6 2.4 12.2 7l-4.6 4.6\",stroke:color,strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function GGButton(props){const{label=\"See the work\",link=\"\",newTab=false,scrollTo=\"\",variant=\"pill\",size=\"regular\",arrow=true,fill=\"#4A4A2B\",fillHover=\"#36361E\",textColor=\"#F3EDE2\",textHover=\"#F3EDE2\",customFont=false,font={},style}=props;const isStatic=useIsStaticRenderer();const reduce=useReducedMotion();const still=isStatic||reduce;const isPill=variant===\"pill\";const large=size===\"large\";const typeStyle=customFont?{...font}:{fontFamily:SANS,fontWeight:500,fontSize:16,letterSpacing:\"0em\"};const lineH=\"1.25em\";const t={duration:.6,ease:EASE};const rollVariants={rest:{y:\"0%\"},hover:still?{y:\"0%\"}:{y:\"-50%\"}};const fillVariants={rest:{y:\"102%\",borderRadius:\"50% 50% 0 0 / 60% 60% 0 0\"},hover:still?{y:\"102%\"}:{y:\"0%\",borderRadius:\"0% 0% 0 0 / 0% 0% 0 0\"}};const arrowVariants={rest:{x:\"0%\"},hover:still?{x:\"0%\"}:{x:\"-50%\"}};const lineVariants={rest:{scaleX:0,originX:1},hover:{scaleX:1,originX:0}};const press=isPill&&!still?{scale:.97}:undefined;const onScrollTo=e=>{if(!scrollTo||typeof window===\"undefined\")return;e.preventDefault();const behavior=reduce?\"auto\":\"smooth\";if(scrollTo.toLowerCase()===\"top\"){window.scrollTo({top:0,behavior});return;}const el=document.querySelector(`[data-framer-name=\"${scrollTo.replace(/\"/g,'\\\\\"')}\"]`);if(el)el.scrollIntoView({behavior,block:\"start\"});};const isPath=/^(\\/|https?:|mailto:|tel:)/.test(scrollTo);const href=isPath?scrollTo:link;const isLink=!!href&&(isPath||!scrollTo);const Tag=isLink?motion.a:motion.button;const linkProps=isLink?{href,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined}:{type:\"button\",onClick:onScrollTo};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`.gg-btn:focus-visible{outline:2px solid currentColor;outline-offset:4px}`}),/*#__PURE__*/_jsxs(Tag,{...linkProps,className:\"gg-btn\",initial:\"rest\",animate:\"rest\",whileHover:\"hover\",whileFocus:\"hover\",whileTap:press,style:{...style,position:\"relative\",display:\"inline-flex\",alignItems:\"center\",gap:isPill?12:10,height:isPill?large?60:52:\"auto\",padding:isPill?large?\"0 32px\":\"0 26px\":\"4px 0\",borderRadius:isPill?999:0,background:isPill?fill:\"transparent\",border:\"none\",color:textColor,textDecoration:\"none\",whiteSpace:\"nowrap\",cursor:\"pointer\",overflow:\"hidden\",WebkitTapHighlightColor:\"transparent\",...typeStyle},children:[isPill&&/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":\"true\",variants:fillVariants,transition:{duration:.7,ease:EASE},style:{position:\"absolute\",inset:0,background:fillHover,pointerEvents:\"none\"}}),/*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline-block\",height:lineH,lineHeight:lineH,overflow:\"hidden\"},children:[/*#__PURE__*/_jsxs(motion.span,{variants:rollVariants,transition:t,style:{display:\"block\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",height:lineH,color:textColor},children:label}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"block\",height:lineH,color:textHover},children:label})]}),!isPill&&/*#__PURE__*/_jsx(motion.span,{\"aria-hidden\":\"true\",variants:lineVariants,transition:{duration:.5,ease:EASE},style:{position:\"absolute\",left:0,right:0,bottom:0,height:1,background:textHover}})]}),arrow&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:14,height:14,overflow:\"hidden\",flexShrink:0},children:/*#__PURE__*/_jsxs(motion.span,{variants:arrowVariants,transition:t,style:{display:\"flex\",width:28},children:[/*#__PURE__*/_jsx(\"span\",{style:{marginLeft:0},children:/*#__PURE__*/_jsx(Arrow,{color:textColor})}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",left:28},children:/*#__PURE__*/_jsx(Arrow,{color:textHover})})]})})]})]});}addPropertyControls(GGButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"See the work\"},link:{type:ControlType.Link,title:\"Link\"},newTab:{type:ControlType.Boolean,title:\"New Tab\",defaultValue:false},scrollTo:{type:ControlType.String,title:\"Go To\",defaultValue:\"\",placeholder:\"Section layer name, top, or /work#Seating\",description:\"Overrides Link. A section on this page, or a path to another page.\"},variant:{type:ControlType.Enum,title:\"Style\",options:[\"pill\",\"link\"],optionTitles:[\"Pill\",\"Text Link\"],defaultValue:\"pill\",displaySegmentedControl:true},size:{type:ControlType.Enum,title:\"Size\",options:[\"regular\",\"large\"],optionTitles:[\"Regular\",\"Large\"],defaultValue:\"regular\",displaySegmentedControl:true},arrow:{type:ControlType.Boolean,title:\"Arrow\",defaultValue:true},fill:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#4A4A2B\",hidden:p=>p.variant===\"link\"},fillHover:{type:ControlType.Color,title:\"Fill Hover\",defaultValue:\"#36361E\",hidden:p=>p.variant===\"link\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#F3EDE2\"},textHover:{type:ControlType.Color,title:\"Text Hover\",defaultValue:\"#F3EDE2\"},customFont:{type:ControlType.Boolean,title:\"Font\",enabledTitle:\"Custom\",disabledTitle:\"Brand\",defaultValue:false},font:{type:ControlType.Font,title:\"Custom Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"0em\",lineHeight:\"1.25em\"},hidden:p=>!p.customFont}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GGButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GGButton.map"],"mappings":"A,0PAO4R,SAASc,EAAM,CAAC,SAAO,CAAC,MAAoB,gBAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,cAAc,OAAO,MAAM,CAAC,QAAQ,OAAO,EAAE,SAAsB,gBAAK,OAA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