{"version":3,"file":"BackButton.-LgdYDA7.mjs","names":["_Fragment","__esmMin","l","p","c","init_jsx_runtime","addPropertyControls","ControlType","init_framer_DymZktPS","TOKENS","BackButton","icon","variant","inner","CHEVRON","common","label","className","CSS","link","init_BackButton","init_SpectrumShared"],"sources":["https:/framerusercontent.com/modules/xjga9Ml5BLKBedwbmiTJ/KVb8TmOe2AwekVSddrx3/BackButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{TOKENS}from\"https://framerusercontent.com/modules/xXMBRP6xEscknKQvTMla/nOgwdkXu2Q8xTbSE9F29/SpectrumShared.js\";// Back: the site's one back button. Plain: the chevron (and \"Back\") in the text colour, no edge or fill at rest.\n// A tint of the text colour comes in on hover and deepens on press; keyboard focus gets the site's 2px ring.\n// Two variants: \"icon\" (a 44px circle, named \"Back\" for screen readers) and \"label\" (a 44px pill, chevron and \"Back\").\n// Used by ProjectHeader (/projects/<project>) and MiniCaseStudy (the player and its no-JS cover). It only draws\n// the button: what Back does stays with whoever passes onClick or link (BackNav, history.back, Esc).\n// className goes on a wrapper, so the caller can position it without touching the look.\n// The colour is the caller's --fg when it has one (ProjectHeader and the player do), else the site's text colour.\nconst CSS=`.bwb { display: inline-flex; flex: none; }\n.bwb-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 44px; min-width: 44px;\n  border-radius: 999px; cursor: pointer; color: var(--fg, ${TOKENS.textPrimary}); font: 500 14px/1 \"Inter\", \"Inter Placeholder\", sans-serif; text-decoration: none;\n  -webkit-tap-highlight-color: transparent; transition: background-color .2s, transform .28s cubic-bezier(.25, 1, .5, 1); }\n.bwb-btn[data-variant=\"label\"] { padding: 0 14px 0 6px; }\n.bwb-btn svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.bwb-btn[data-variant=\"icon\"] svg { width: 22px; height: 22px; }\n.bwb-btn:hover { background-color: color-mix(in srgb, currentColor 10%, transparent); }\n.bwb-btn:active { background-color: color-mix(in srgb, currentColor 18%, transparent); transform: scale(.96); transition-duration: .08s; }\n/* Doubled class: outranks the player's \".mcs .pl :focus-visible\" so the ring keeps this shape and offset */\n.bwb .bwb-btn.bwb-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 999px; }\n@media (hover: none) { .bwb-btn:hover:not(:active) { background-color: transparent; } }\n@media (prefers-reduced-motion: reduce) { .bwb-btn:active { transform: none; } }\n@media (forced-colors: active) { .bwb .bwb-btn.bwb-btn:focus-visible { outline-color: Highlight; } }`;const CHEVRON=/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 6l-6 6 6 6\"})});/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function BackButton({variant=\"icon\",link,onClick,className,style,label}){const icon=variant===\"icon\";const inner=icon?CHEVRON:/*#__PURE__*/_jsxs(_Fragment,{children:[CHEVRON,/*#__PURE__*/_jsx(\"span\",{children:\"Back\"})]});const common={className:\"bwb-btn\",\"data-variant\":variant,\"aria-label\":icon?label||\"Back\":undefined,onClick:onClick};return /*#__PURE__*/_jsxs(\"span\",{className:`bwb${className?\" \"+className:\"\"}`,style:style,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),link?/*#__PURE__*/_jsx(\"a\",{...common,href:link,children:inner}):/*#__PURE__*/_jsx(\"button\",{...common,type:\"button\",children:inner})]});}addPropertyControls(BackButton,{variant:{type:ControlType.Enum,title:\"Variant\",defaultValue:\"icon\",options:[\"icon\",\"label\"],optionTitles:[\"Icon\",\"Icon and label\"],displaySegmentedControl:true},link:{type:ControlType.Link,title:\"Link\"},onClick:{type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackButton.map"],"mappings":"A,2NAuBG,SAAwBU,EAAW,CAAC,UAAQ,OAAO,OAAK,UAAQ,YAAU,QAAM,SAAO,CAAC,IAAMC,EAAKC,IAAU,OAAaC,EAAMF,EAAKG,EAAqB,gBAAMd,EAAU,CAAC,SAAS,CAACc,EAAqB,gBAAK,OAAO,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC,CAAC,EAAQC,EAAO,CAAC,UAAU,UAAU,eAAeH,EAAQ,aAAaD,EAAKK,GAAO,OAAO,IAAA,GAAkB,SAAO,EAAE,MAAoB,gBAAM,OAAO,CAAC,UAAU,MAAMC,EAAU,IAAIA,EAAU,KAAW,QAAM,SAAS,CAAc,gBAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAOC,CAAG,CAAC,CAAC,EAAEC,EAAkB,gBAAK,IAAI,CAAC,GAAGJ,EAAO,KAAKI,EAAK,SAASN,CAAK,CAAC,EAAe,gBAAK,SAAS,CAAC,GAAGE,EAAO,KAAK,SAAS,SAASF,CAAK,CAAC,CAAC,CAAC,CAAC,CAAE,C,kDAhB7oB,EAAI;;4DAEkDJ,EAAO,YAAY;;;;;;;;;;;sGAW6B,EAAqB,gBAAK,MAAM,CAAC,QAAQ,YAAY,cAAc,OAAO,SAAsB,gBAAK,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAGsaH,EAAoBI,EAAW,CAAC,QAAQ,CAAC,KAAKH,EAAY,KAAK,MAAM,UAAU,aAAa,OAAO,QAAQ,CAAC,OAAO,OAAO,EAAE,aAAa,CAAC,OAAO,gBAAgB,EAAE,wBAAwB,EAAI,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,MAAM,EAAE,QAAQ,CAAC,KAAKA,EAAY,YAAY,CAAC,CAAC,C"}