{"version":3,"file":"PlatformPill.BPnHmsg6.mjs","names":["p","React.useId","React.useState","_Fragment","__esmMin","ie","init_npm_react_18_3_1","ce","_e","init_jsx_runtime","l","addPropertyControls","init_framer_D6uXRwWs","ControlType","PlatformPill","p$1","isLarge","size","className","src","srcOf","logo","failed","setFailed","content","srcSetOf","label","arrow","css","large","link","ICON","ICON_MAX_WIDTH","BLUE","LARGE_ICON","LARGE_ICON_MAX_WIDTH","init_PlatformPill","image","p"],"sources":["https:/framerusercontent.com/modules/niFzC3uxvHzAG8bQClhu/fjNkfvE4G3ClR8MA1jyY/PlatformPill.js"],"sourcesContent":["// Platform pill under \"Works with\" on a party page. The export of the Integrations template\n// (scripts/lib/sales-template.mjs) places one per platform slot and binds it to the item's\n// \"Platform N label\", \"Platform N href\" and \"Platform N icon\"; do not edit it in Framer.\n// The whole pill is one link: the platform's icon, its name and a small arrow. The icon and the\n// arrow are decorative; the name is the link text. The grey pill, its type and its shape are the\n// ones the template had; hover gives a light blue background, keyboard focus a visible ring.\n// Without an icon the pill shows the name and the arrow only.\n// The large size is the homepage's platform strip (scripts/lib/home.mjs): a taller white pill with a\n// bigger icon and name, and no arrow unless `arrow` is on (the context pills under a solution's hero,\n// docs/releases/solutions.md §7). The regular size, the party pages' one, is exactly as it was.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const srcOf=image=>(typeof image===\"string\"?image:image?.src)||\"\";const srcSetOf=image=>(typeof image===\"string\"?undefined:image?.srcSet)||undefined;const ICON=16;const ICON_MAX_WIDTH=24;const BLUE=\"rgb(0, 119, 255)\";const css=p=>`.${p}{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:rgba(0,0,0,.05);color:rgba(0,0,0,.8);font-family:\"Inter\",\"Inter Placeholder\",sans-serif;font-size:14px;font-weight:400;line-height:1.2em;letter-spacing:0;text-decoration:none;white-space:nowrap;box-sizing:border-box;transition:background-color .15s ease}\n.${p}:hover{background:rgba(0,119,255,.1)}\n.${p}:focus{outline:none}\n.${p}:focus-visible{outline:2px solid ${BLUE};outline-offset:2px}\n.${p} .icon{flex:none;display:flex;align-items:center;justify-content:center;height:${ICON}px;max-width:${ICON_MAX_WIDTH}px}\n.${p} .icon img{display:block;height:${ICON}px;width:auto;max-width:${ICON_MAX_WIDTH}px;object-fit:contain;mix-blend-mode:multiply}\n.${p} .arrow{flex:none;display:block;opacity:.5}\n@media(prefers-reduced-motion:reduce){.${p}{transition:none}}`;const LARGE_ICON=24;const LARGE_ICON_MAX_WIDTH=48;const large=p=>`\n.${p}.lg{gap:8px;min-height:50px;padding:0 16px;border:1px solid rgba(0,0,0,.06);background:#fff;color:rgba(0,0,0,.85);font-size:16px;font-weight:500}\n.${p}.lg:hover{background:rgb(230,241,255)}\n.${p}.lg .icon{height:${LARGE_ICON}px;max-width:${LARGE_ICON_MAX_WIDTH}px}\n.${p}.lg .icon img{height:${LARGE_ICON}px;max-width:${LARGE_ICON_MAX_WIDTH}px}\n.${p}.lg .arrow{width:14px;height:14px}`;/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PlatformPill({label,link,logo,size,arrow}){const p=\"pp\"+React.useId().replace(/[^a-zA-Z0-9]/g,\"\");const isLarge=String(size||\"\").toLowerCase()===\"large\";const className=isLarge?`${p} lg`:p;const src=srcOf(logo);const[failed,setFailed]=React.useState(false);React.useEffect(()=>setFailed(false),[src]);const content=/*#__PURE__*/_jsxs(_Fragment,{children:[src&&!failed?/*#__PURE__*/_jsx(\"span\",{className:\"icon\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"img\",{src:src,srcSet:srcSetOf(logo),alt:\"\",decoding:\"async\",draggable:false,onError:()=>setFailed(true)})}):null,/*#__PURE__*/_jsx(\"span\",{children:label||\"\"}),isLarge&&!arrow?null:/*#__PURE__*/_jsx(\"svg\",{className:\"arrow\",width:\"12\",height:\"12\",viewBox:\"0 0 16 16\",\"aria-hidden\":\"true\",focusable:\"false\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M3 8h10M9 4l4 4-4 4\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.6\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})]});return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:isLarge?css(p)+large(p):css(p)}),link?/*#__PURE__*/_jsx(\"a\",{className:className,href:link,children:content}):/*#__PURE__*/_jsx(\"span\",{className:className,children:content})]});}addPropertyControls(PlatformPill,{label:{type:ControlType.String,title:\"Label\",description:\"The platform's name: the link text. Bind it to Platform N label.\"},link:{type:ControlType.Link,title:\"Link\",description:\"The supplier and platform combination page. Bind it to Platform N href.\"},// Titled Logo, not Icon: Framer keys a control by its title, and does not bind a CMS image to a\n// control keyed icon (tested on a preview branch).\nlogo:{type:ControlType.ResponsiveImage,title:\"Logo\",description:\"The platform's official icon. Bind it to Platform N icon.\"},size:{type:ControlType.Enum,title:\"Size\",options:[\"regular\",\"large\"],optionTitles:[\"Regular\",\"Large\"],defaultValue:\"regular\",description:\"Large is the homepage's platform strip; party pages use Regular.\"},arrow:{type:ControlType.Boolean,title:\"Arrow\",defaultValue:false,hidden:p=>String(p.size||\"\").toLowerCase()!==\"large\",description:\"Large only: show the arrow, as on the context pills of a solution page. Regular always shows it.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PlatformPill\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PlatformPill.map"],"mappings":"A,sMAyBG,SAAwBc,EAAa,CAAC,QAAM,OAAK,OAAK,OAAK,SAAO,CAAC,IAAMd,EAAE,KAAKC,EAAY,CAAC,CAAC,QAAQ,gBAAgB,EAAE,EAA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