{"version":3,"file":"BackButton.C2l0vLng.mjs","names":["_Fragment"],"sources":["https:/framerusercontent.com/modules/xjga9Ml5BLKBedwbmiTJ/uYxWckWzkizlVebTgu5A/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}){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?\"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\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"8NAuBG,SAAwB,EAAW,CAAC,UAAQ,OAAO,OAAK,UAAQ,YAAU,SAAO,CAAC,IAAM,EAAK,IAAU,OAAa,EAAM,EAAK,EAAqB,EAAMA,EAAU,CAAC,SAAS,CAAC,EAAqB,EAAK,OAAO,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC,CAAC,EAAQ,EAAO,CAAC,UAAU,UAAU,eAAe,EAAQ,aAAa,EAAK,OAAO,IAAA,GAAkB,SAAO,EAAE,OAAoB,EAAM,OAAO,CAAC,UAAU,MAAM,EAAU,IAAI,EAAU,KAAW,QAAM,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,CAAG,CAAC,CAAC,EAAE,EAAkB,EAAK,IAAI,CAAC,GAAG,EAAO,KAAK,EAAK,SAAS,CAAK,CAAC,EAAe,EAAK,SAAS,CAAC,GAAG,EAAO,KAAK,SAAS,SAAS,CAAK,CAAC,CAAC,CAAC,CAAC,CAAE,qBAvBxjB,IAAoD,IAAsH,EAOlP,EAAI;;4DAEkD,EAAO,YAAY;;;;;;;;;;;sGAW6B,EAAqB,EAAK,MAAM,CAAC,QAAQ,YAAY,cAAc,OAAO,SAAsB,EAAK,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAGyZ,EAAoB,EAAW,CAAC,QAAQ,CAAC,KAAK,EAAY,KAAK,MAAM,UAAU,aAAa,OAAO,QAAQ,CAAC,OAAO,OAAO,EAAE,aAAa,CAAC,OAAO,gBAAgB,EAAE,wBAAwB,EAAI,EAAE,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAY,YAAY,CAAC,CAAC"}