{"version":3,"file":"ProjectColor.BAouk5co.mjs","names":["useId","__esmMin","init_npm_react_18_3_1","ie","c","init_jsx_runtime","ce","init_framer_B1b760uK","addPropertyControls","ControlType","logoRules","LOGOS","url","hash","mask","MAIN","css","pageBg","pageInk","footBg","footInk","BG","INVERSE","FOOTER","ProjectColor","MATCH","id","pageCombo","page","CREAM","color","BURGUNDY","COMBOS","footerCombo","footer","style","OLIVE","CHARTREUSE","CHARCOAL","LAVENDER","BABY_BLUE","NAMES","init_ProjectColor","r","p"],"sources":["https:/framerusercontent.com/modules/aNJtpK0zDwmvQbrCnnKj/nqalAF2p2sJUvhTzji4g/ProjectColor.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useId}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Same color styles the whole site is built on: Home Main Color (ink), Background, Inverse Surface.\nexport const MAIN=\"--token-66c2eeca-6d1b-4d69-991e-55004b209eb7\";export const BG=\"--token-e33c3ba9-31c2-46b2-a046-e687109c3532\";export const INVERSE=\"--token-9b3d97a0-8815-43be-9e0a-ef3be9f6d25f\";// Studio Mila's extended palette, read from the Palette color styles so editing a style updates\n// every combination that uses it.\nconst BURGUNDY=\"var(--token-835bb168-d7df-4d5f-8935-845209815814, #61191C)\";const OLIVE=\"var(--token-4737a625-655c-4cd3-9b52-eae910b2f5d0, #514713)\";const CHARTREUSE=\"var(--token-38816da3-0871-4d05-ad75-f252ed5edad4, #A9BE20)\";const CHARCOAL=\"var(--token-b8de7dc2-3f49-4cf6-9b88-91f4597c67c9, #1C1C1C)\";const CREAM=\"var(--token-28f77b63-6ac8-42a3-ac62-8aff4f957272, #F7F5F3)\";const LAVENDER=\"var(--token-a2278799-9edf-4ce7-ad95-9571d947fb55, #E5D2E8)\";const BABY_BLUE=\"var(--token-21857a88-5ea4-4b5c-b021-c74b91013b43, #C3DAEE)\";// Background / foreground pairs. All clear 6:1 contrast or better.\nexport const COMBOS={\"Cream / Burgundy\":[CREAM,BURGUNDY],\"Cream / Charcoal\":[CREAM,CHARCOAL],\"Cream / Olive\":[CREAM,OLIVE],\"Burgundy / Cream\":[BURGUNDY,CREAM],\"Burgundy / Chartreuse\":[BURGUNDY,CHARTREUSE],\"Burgundy / Baby Blue\":[BURGUNDY,BABY_BLUE],\"Olive / Cream\":[OLIVE,CREAM],\"Olive / Lavender\":[OLIVE,LAVENDER],\"Olive / Baby Blue\":[OLIVE,BABY_BLUE],\"Charcoal / Cream\":[CHARCOAL,CREAM],\"Charcoal / Lavender\":[CHARCOAL,LAVENDER],\"Charcoal / Baby Blue\":[CHARCOAL,BABY_BLUE],\"Lavender / Burgundy\":[LAVENDER,BURGUNDY],\"Baby Blue / Burgundy\":[BABY_BLUE,BURGUNDY],\"Baby Blue / Charcoal\":[BABY_BLUE,CHARCOAL],\"Chartreuse / Charcoal\":[CHARTREUSE,CHARCOAL]};const NAMES=Object.keys(COMBOS);const MATCH=\"Inverse of page\";// Burgundy logo PNGs. They're redrawn as a mask filled with the current ink.\nconst LOGOS=[\"a92isQi8xeNFK8iynelSWiCNSwk\",\"lVkihheuqvB5zgsnmcbHQUNz2iM\",\"WfK6IW9TWO0a0eZwBRlh7lsA06I\",\"RAwp30QMZX99GeFJFDHt712XNgU\",\"geLIX8sHT1w65iSA2kPyLXilwU4\",\"wgEnci2u3bIyTD7QFGkwfRM\",\"09NVitZ8PwxTQdPcnYzca5XKCGY\",\"B0sqr9nBEIrDsLriHNOniYmx4\",\"OzAzIfloAFcX1avAu3ceLukqDg\",\"rYVOUiteb1c4N2z0SkssZItPZE\",\"aKiNTU3lfjYrqn97OaLikHhPcAM\"];function logoRules(){return LOGOS.map(hash=>{const url=`url(\"https://framerusercontent.com/images/${hash}.png\")`;const mask=`-webkit-mask: ${url} center / 100% 100% no-repeat; mask: ${url} center / 100% 100% no-repeat; background-color: var(${MAIN}) !important;`;return`html body :has(> img[src*=\"${hash}\"]) { ${mask} }\nhtml body img[src*=\"${hash}\"] { opacity: 0 !important; }\nhtml body [style*=\"${hash}\"] { background-image: none !important; ${mask} }`;}).join(\"\\n\");}// The footer paints its background with Main and its type with Background, so re-scoping those two\n// tokens on the footer alone recolors it without touching its layout or markup. The second selector\n// is how the footer can appear on the Framer canvas. Tokens are set on every element, not just the\n// page, because components on the canvas carry their own copies of the color styles.\nconst FOOTER_ROOTS=[`html body footer[name=\"Site Footer\"]`,`html body [data-framer-name=\"Site Footer\"]`];const FOOTER=FOOTER_ROOTS.flatMap(r=>[r,`${r} *`]).join(\", \");function css([pageBg,pageInk],[footBg,footInk]){return`\nhtml body, html body * { ${BG}: ${pageBg} !important; ${MAIN}: ${pageInk} !important; ${INVERSE}: ${pageInk} !important; }\n${FOOTER} { ${MAIN}: ${footBg} !important; ${BG}: ${footInk} !important; }\nhtml body svg [fill=\"#61191C\" i] { fill: var(${MAIN}); }\nhtml body svg [stroke=\"#61191C\" i] { stroke: var(${MAIN}); }\n${logoRules()}\n`;}/**\n * Sets this page's color combination and its footer's, from Studio Mila's palette. Works on the\n * Framer canvas too, so a combination can be tried straight on the artboard. \"Custom\" uses one\n * color as the ink on cream, with a footer in that color.\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ProjectColor({page=\"Cream / Burgundy\",footer=MATCH,color}){const id=\"sm-colors-\"+useId().replace(/[^a-zA-Z0-9-]/g,\"\");const pageCombo=page===\"Custom\"?[CREAM,color||BURGUNDY]:COMBOS[page]||COMBOS[\"Cream / Burgundy\"];const footerCombo=COMBOS[footer]||[pageCombo[1],pageCombo[0]];useEffect(()=>{const style=document.createElement(\"style\");style.id=id;style.textContent=css(pageCombo,footerCombo);document.head.appendChild(style);return()=>style.remove();},[page,footer,color]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{width:1,height:1}});}addPropertyControls(ProjectColor,{page:{type:ControlType.Enum,title:\"Page\",options:[...NAMES,\"Custom\"],defaultValue:\"Cream / Burgundy\"},color:{type:ControlType.Color,title:\"Ink\",defaultValue:\"rgb(97, 25, 28)\",hidden:p=>p.page!==\"Custom\"},footer:{type:ControlType.Enum,title:\"Footer\",options:[MATCH,...NAMES],defaultValue:MATCH}});\nexport const __FramerMetadata__ = {\"exports\":{\"MAIN\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectColor\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"COMBOS\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"BG\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"INVERSE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectColor.map"],"mappings":"A,iLAKgV,SAASU,GAAW,CAAC,OAAOC,EAAM,IAAI,GAAM,CAAC,IAAMC,EAAI,6CAA6CC,EAAK,QAAcC,EAAK,iBAAiBF,EAAI,uCAAuCA,EAAI,uDAAuDG,EAAK,eAAe,MAAM,8BAA8BF,EAAK,QAAQC,EAAK;sBACvnBD,EAAK;qBACNA,EAAK,0CAA0CC,EAAK,GAAI,CAAC,CAAC,CAAC,KAAK;CAAI,CAAE,CAI4E,SAASE,EAAI,CAACC,EAAOC,GAAS,CAACC,EAAOC,GAAS,CAAC,MAAM;2BAClMC,EAAG,IAAIJ,EAAO,eAAeF,EAAK,IAAIG,EAAQ,eAAeI,EAAQ,IAAIJ,EAAQ;EAC1GK,EAAO,KAAKR,EAAK,IAAII,EAAO,eAAeE,EAAG,IAAID,EAAQ;+CACbL,EAAK;mDACDA,EAAK;EACtDL,EAAU,EAAE;CACZ,CAOC,SAAwBc,EAAa,CAAC,OAAK,mBAAmB,SAAOC,EAAM,SAAO,CAAC,IAAMC,EAAG,aAAa1B,EAAM,CAAC,CAAC,QAAQ,iBAA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