@brightlocal/ui-components 2.15.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/map.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),D=require("react"),O=require("class-variance-authority"),y=require("@brightlocal/icons"),k=require("@brightlocal/illustrations"),M=require("@brightlocal/ui-components/button"),h=require("@brightlocal/ui-components/card"),p=require("@brightlocal/ui-components/lib/utils"),x=require("@brightlocal/ui-components/popover");function q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const c=q(D),B={ROADMAP:"roadmap",SATELLITE:"satellite"},z=["water","landscape","road","poi","transit"];function _(e,t){return[...z.map(a=>({featureType:a,elementType:"geometry",stylers:[{saturation:e,lightness:t}]})),{elementType:"labels.text.fill",stylers:[{saturation:e,lightness:t-10}]},{elementType:"labels.icon",stylers:[{saturation:e,lightness:t}]}]}const v=[{elementType:"geometry",stylers:[{color:"#444444"}]},{elementType:"labels.text.fill",stylers:[{color:"#aaaaaa"}]},{elementType:"labels.text.stroke",stylers:[{color:"#323232"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#30405a"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#4b4b4b"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#5c5c5c"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#3e3e3e"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#525252"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#505050"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]}],w={default:{light:[],dark:v},muted:{light:_(-40,20),dark:v}};function j(){const[e,t]=c.useState(()=>typeof document<"u"&&document.body.classList.contains("dark"));return c.useEffect(()=>{const a=new MutationObserver(()=>{t(document.body.classList.contains("dark"))});return a.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>a.disconnect()},[]),e}function G(e="default"){const t=j();return w[e][t?"dark":"light"]}const N={primary:"strong",secondary:"moderate",warning:"moderate",destructive:"unranked",outline:"unranked"};function F(e){return e in N}function V(e){return F(e)?N[e]:e}const g={strong:"bg-primary dark:bg-green-400",moderate:"bg-chart-4",weak:"bg-orange-400",unranked:"bg-red-600",error:"bg-warning-background dark:bg-orange-200"},$=O.cva("inline-flex items-center justify-center rounded-full font-sans text-sm font-semibold text-foreground dark:text-neutral-900 border-2 border-white shadow-sm transition-shadow duration-200 ease-out hover:shadow-md",{variants:{variant:{strong:`${g.strong}`,moderate:`${g.moderate}`,weak:`${g.weak}`,unranked:`${g.unranked} text-white dark:text-white`,error:`${g.error}`}},defaultVariants:{variant:"strong"}}),b=c.forwardRef(({value:e,variant:t="strong",loading:a=!1,pulse:n,dataHook:s,className:l,trackingEl:o,trackingLabel:i,style:d,...u},m)=>{const f=V(t);return r.jsx("div",{ref:m,className:p.cn(a?"border-border bg-accent rounded-full border":$({variant:f}),"size-8 p-0",l),"data-hook":s,"data-slot":"map-grid-pin","data-state":a?"loading":void 0,"data-tracking-el":o||"map-grid-pin","data-tracking-label":i,style:d,...u,children:f==="error"&&!a?r.jsx(y.TriangleAlert,{"aria-hidden":"true",className:"text-warning-foreground",size:14}):String(e)})});b.displayName="MapGridPin";const P=c.forwardRef(({icon:e,animateIn:t=!1,value:a,variant:n,pulse:s,dataHook:l,className:o,trackingEl:i,trackingLabel:d,ariaLabel:u,...m},f)=>a!==void 0||n!==void 0||s!==void 0?r.jsx(b,{ref:f,className:o,dataHook:l,pulse:s,trackingEl:i,trackingLabel:d,value:a??1,variant:n,...m}):r.jsx("div",{ref:f,"aria-label":u??"Location",className:p.cn("relative inline-flex h-[46px] w-[38px] items-start justify-center",o),"data-hook":l,"data-slot":"map-location-pin","data-tracking-el":i||"map-location-pin","data-tracking-label":d,role:"img",...m,children:r.jsxs("span",{"aria-hidden":"true",className:p.cn("relative flex size-full",t&&"animate-pop-in origin-bottom will-change-transform motion-reduce:animate-none"),children:[r.jsxs("svg",{"aria-hidden":"true",className:"size-full overflow-visible drop-shadow-sm",fill:"none",viewBox:"0 0 38 46",children:[r.jsx("path",{className:"fill-white",d:"M38 19.15C38 29.21 29.4 35.77 20.38 44.63C19.61 45.39 18.37 45.41 17.58 44.67C8.01 35.79 0 29.23 0 19.15C0 8.57 8.51 0 19 0C29.49 0 38 8.57 38 19.15Z"}),r.jsx("circle",{className:"fill-sky-500",cx:"19",cy:"19",r:"16"})]}),r.jsx("span",{className:"absolute top-[19px] left-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-white",children:e??r.jsx(y.Store,{size:16})})]})}));P.displayName="MapLocationPin";const T=c.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:n,children:s,iconOnly:l=!0,...o},i)=>{const d=j();return r.jsx(M.Button,{ref:i,className:e,"data-slot":"map-control-button",dataHook:t,iconOnly:l,trackingEl:a||"map-control-button",trackingLabel:n,variant:d?"secondary":"outline",...o,children:s})});T.displayName="MapControlButton";const C=c.forwardRef(({className:e,children:t,dataHook:a,trackingEl:n,trackingLabel:s,ariaLabel:l,...o},i)=>r.jsxs("div",{ref:i,"aria-label":l??"Loading map",className:p.cn("border-border relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border",e),"data-hook":a,"data-slot":"map-loading-state","data-tracking-el":n||"map-loading-state","data-tracking-label":s,role:"status",...o,children:[r.jsx(S,{}),t&&r.jsx("div",{className:"relative",children:t})]}));C.displayName="MapLoadingState";const S=c.memo(function({rounded:t}){return r.jsx(k.MapBackground,{"aria-hidden":"true",className:p.cn("absolute inset-0 h-full w-full object-cover",t&&"rounded-[inherit]"),mode:"auto"})}),L=c.forwardRef(({className:e,title:t="We couldn't load your map rankings.",message:a="Reloading usually fixes it, and it won't use any credits",onRetry:n,retryLoading:s=!1,retryLabel:l="Reload",dataHook:o,trackingEl:i,trackingLabel:d,...u},m)=>r.jsxs("div",{ref:m,className:p.cn("border-border relative flex h-full w-full flex-col items-center justify-center gap-4 rounded-lg border p-4 text-center sm:gap-6 sm:p-8",e),"data-hook":o,"data-slot":"map-error-state","data-tracking-el":i||"map-error-state","data-tracking-label":d,role:"alert",...u,children:[r.jsx(S,{rounded:!0}),r.jsxs("div",{className:"relative flex flex-col items-center gap-4 sm:gap-6",children:[r.jsx("div",{"aria-hidden":"true",className:"flex items-center justify-center","data-slot":"map-error-illustration",children:r.jsx(k.GlobeyFixingFault,{className:"h-auto w-full max-w-41"})}),r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx("h3",{className:"text-foreground text-lg font-medium","data-slot":"map-error-title",children:t}),a&&r.jsx("p",{className:"text-muted-foreground text-sm","data-slot":"map-error-message",children:a})]}),n&&r.jsxs(M.Button,{className:"mt-1",dataHook:`${o}-retry`,loading:s,size:"sm",variant:"primary",onClick:n,children:[!s&&r.jsx(y.RefreshCw,{"aria-hidden":"true"}),l]})]})]}));L.displayName="MapErrorState";const A=c.forwardRef(({variant:e,color:t,dataHook:a,className:n,children:s,...l},o)=>{const i=e?g[e]:t;return r.jsxs("span",{ref:o,className:p.cn("text-foreground flex items-center gap-1 font-sans text-xs",n),"data-hook":a,"data-slot":"map-legend-item",...l,children:[r.jsx("span",{"aria-hidden":"true",className:p.cn("inline-block size-2 shrink-0 rounded-full",i)}),s]})});A.displayName="MapLegendItem";const R=c.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:n,ariaLabel:s,children:l,...o},i)=>r.jsx(h.Card,{ref:i,"aria-label":s??"Map legend",className:p.cn("inline-flex w-auto flex-row items-center bg-white font-sans dark:bg-neutral-800",e),"data-slot":"map-legend",dataHook:t,density:"condensed",maxWidth:"none",role:"group",trackingEl:a||"map-legend",trackingLabel:n,variant:"border",...o,children:r.jsx(h.CardContent,{className:"flex items-center gap-3",children:l})}));R.displayName="MapLegend";function W(e){const{hoverWhenOpen:t=!1}=e??{},[a,n]=c.useState(null),[s,l]=c.useState(null),o=c.useCallback(u=>{l(u),n(u)},[]),i=c.useCallback(()=>{n(null)},[]),d=c.useCallback(u=>{const m={onClick:()=>o(u)};return t&&(m.onPointerEnter=f=>{f.pointerType==="mouse"&&a!=null&&o(u)}),m},[t,o,a]);return{activeItem:a,anchorItem:s,showItem:o,close:i,getInteractionProps:d}}const Y=x.Popover,E=x.PopoverAnchor;E.displayName="MapPopoverAnchor";const I=c.forwardRef(({className:e,side:t="top",sideOffset:a=4,dataHook:n,trackingEl:s,trackingLabel:l,...o},i)=>r.jsx(x.PopoverContent,{ref:i,className:p.cn("w-auto max-w-68.25 p-3 data-[state=closed]:animate-none data-[state=closed]:opacity-0",e),"data-slot":"map-popover-content","data-tracking-el":s||"map-popover","data-tracking-label":l,dataHook:n,side:t,sideOffset:a,onCloseAutoFocus:d=>d.preventDefault(),onOpenAutoFocus:d=>d.preventDefault(),...o}));I.displayName="MapPopoverContent";exports.MAP_STYLES=w;exports.MapControlButton=T;exports.MapErrorState=L;exports.MapGridPin=b;exports.MapLegend=R;exports.MapLegendItem=A;exports.MapLoadingState=C;exports.MapLocationPin=P;exports.MapPopover=Y;exports.MapPopoverAnchor=E;exports.MapPopoverContent=I;exports.MapTypeId=B;exports.mapGridPinColorMap=g;exports.useMapPopoverClick=W;exports.useMapStyles=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),ae=require("react"),ne=require("class-variance-authority"),P=require("@brightlocal/icons"),R=require("@brightlocal/illustrations"),L=require("@brightlocal/ui-components/button"),T=require("@brightlocal/ui-components/card"),g=require("@brightlocal/ui-components/lib/utils"),j=require("@brightlocal/ui-components/popover");function oe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const p=oe(ae),se={ROADMAP:"roadmap",SATELLITE:"satellite"},le=["water","landscape","road","poi","transit"];function ie(e,t){return[...le.map(a=>({featureType:a,elementType:"geometry",stylers:[{saturation:e,lightness:t}]})),{elementType:"labels.text.fill",stylers:[{saturation:e,lightness:t-10}]},{elementType:"labels.icon",stylers:[{saturation:e,lightness:t}]}]}const E=[{elementType:"geometry",stylers:[{color:"#444444"}]},{elementType:"labels.text.fill",stylers:[{color:"#aaaaaa"}]},{elementType:"labels.text.stroke",stylers:[{color:"#323232"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#30405a"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#4b4b4b"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#5c5c5c"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#3e3e3e"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#525252"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#505050"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]}],A={default:{light:[],dark:E},muted:{light:ie(-40,20),dark:E}},k=new Set;let w=typeof document<"u"&&document.body.classList.contains("dark"),O=!1;function ce(){if(O||typeof document>"u")return;O=!0,new MutationObserver(()=>{const t=document.body.classList.contains("dark");if(t!==w){w=t;for(const a of k)a()}}).observe(document.body,{attributes:!0,attributeFilter:["class"]})}function de(e){return k.add(e),ce(),()=>{k.delete(e)}}function ue(){return w}function pe(){return!1}function I(){return p.useSyncExternalStore(de,ue,pe)}function me(e="default"){const t=I();return A[e][t?"dark":"light"]}const _={primary:"strong",secondary:"moderate",warning:"moderate",destructive:"unranked",outline:"unranked"};function fe(e){return e in _}function ge(e){return fe(e)?_[e]:e}const h={strong:{className:"bg-primary dark:bg-green-400",cssVar:"--ds-tailwind-colors-green-400",fallback:"#2ae855"},moderate:{className:"bg-chart-4",cssVar:"--ds-tailwind-colors-yellow-400",fallback:"#facc15"},weak:{className:"bg-orange-400",cssVar:"--ds-tailwind-colors-orange-400",fallback:"#fb923c"},unranked:{className:"bg-red-600",cssVar:"--ds-tailwind-colors-red-600",fallback:"#dc2626"},error:{className:"bg-warning-background dark:bg-orange-200",cssVar:"--ds-tailwind-colors-orange-200",fallback:"#fed7aa"}},y=Object.fromEntries(Object.entries(h).map(([e,t])=>[e,t.className])),ye=ne.cva("inline-flex items-center justify-center rounded-full font-sans text-sm font-semibold text-foreground dark:text-neutral-900 border-2 border-white shadow-sm transition-shadow duration-200 ease-out hover:shadow-md",{variants:{variant:{strong:`${y.strong}`,moderate:`${y.moderate}`,weak:`${y.weak}`,unranked:`${y.unranked} text-white dark:text-white`,error:`${y.error}`}},defaultVariants:{variant:"strong"}}),C=p.forwardRef(({value:e,variant:t="strong",loading:a=!1,pulse:n,dataHook:s,className:o,trackingEl:r,trackingLabel:c,style:i,...d},m)=>{const u=ge(t);return l.jsx("div",{ref:m,className:g.cn(a?"border-border bg-accent rounded-full border":ye({variant:u}),"size-8 p-0",o),"data-hook":s,"data-slot":"map-grid-pin","data-state":a?"loading":void 0,"data-tracking-el":r||"map-grid-pin","data-tracking-label":c,style:i,...d,children:u==="error"&&!a?l.jsx(P.TriangleAlert,{"aria-hidden":"true",className:"text-warning-foreground",size:14}):String(e)})});C.displayName="MapGridPin";function D(){const t={colors:Object.fromEntries(Object.entries(h).map(([n,s])=>[n,s.fallback])),fontFamily:"Inter, system-ui, sans-serif",textColor:"#111412"};if(typeof document>"u")return t;const a=getComputedStyle(document.documentElement);return{colors:Object.fromEntries(Object.entries(h).map(([n,{cssVar:s,fallback:o}])=>[n,a.getPropertyValue(s).trim()||o])),fontFamily:a.getPropertyValue("--ds-font-font-sans").trim()||t.fontFamily,textColor:a.getPropertyValue("--ds-tailwind-colors-neutral-950").trim()||t.textColor}}function xe(){return D().colors}const be=Object.fromEntries(Object.entries(h).map(([e,t])=>[e,t.fallback])),M=["strong","moderate","weak","unranked","error"];function N(e,t){const{colors:a,fontFamily:n,textColor:s}=D(),o=40,r=o/2,c=2,i=r-c,d=i*.55,u=[...e].sort((f,x)=>M.indexOf(f.variant)-M.indexOf(x.variant)).filter(f=>f.count>0),W=u.reduce((f,x)=>f+x.count,0)||1,Z=Math.max(Number(t)||0,1);let b;const S=u[0];if(u.length<=1){const f=S?a[S.variant]:"#e5e7eb";b=`<circle cx="${r}" cy="${r}" r="${i}" fill="${f}"/>`}else{b="";let f=-Math.PI/2;for(const x of u){const $=x.count/W*Math.PI*2,v=f+$,Q=r+i*Math.cos(f),X=r+i*Math.sin(f),ee=r+i*Math.cos(v),te=r+i*Math.sin(v),re=$>Math.PI?1:0;b+=`<path d="M${r},${r}L${Q.toFixed(2)},${X.toFixed(2)}A${i},${i} 0 ${re} 1 ${ee.toFixed(2)},${te.toFixed(2)}Z" fill="${a[x.variant]}"/>`,f=v}}const J=Math.round(o*.3);return[`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${o}" viewBox="0 0 ${o} ${o}" style="filter:drop-shadow(0 1px 2px rgba(0,0,0,.15))">`,`<circle cx="${r}" cy="${r}" r="${r}" fill="white"/>`,b,`<circle cx="${r}" cy="${r}" r="${i}" fill="none" stroke="white" stroke-width="${c}"/>`,`<circle cx="${r}" cy="${r}" r="${d}" fill="white"/>`,`<text x="${r}" y="${r}" text-anchor="middle" dominant-baseline="central" font-family="${n}" font-size="${J}" font-weight="600" fill="${s}">${Z}</text>`,"</svg>"].join("")}function he(e){if(typeof DOMParser>"u")throw new Error("createClusterPinElement requires a browser environment (DOMParser). Use createClusterPinSvg for SSR.");const{markers:t,count:a,getVariant:n}=e,s=new Map;for(const m of t){const u=n(m);s.set(u,(s.get(u)??0)+1)}const o=[];for(const m of M){const u=s.get(m);u&&o.push({variant:m,count:u})}const r=N(o,a),d=new DOMParser().parseFromString(r,"image/svg+xml").documentElement;if(!(d instanceof SVGElement))throw new Error("createClusterPinElement: failed to parse SVG");return d}const V=p.forwardRef(({segments:e,count:t,dataHook:a,className:n,trackingEl:s,trackingLabel:o,...r},c)=>{const i=JSON.stringify(e),d=p.useMemo(()=>N(e,t),[i,t]);return l.jsx("div",{dangerouslySetInnerHTML:{__html:d},ref:c,className:g.cn("inline-flex items-center justify-center",n),"data-hook":a,"data-slot":"map-cluster-pin","data-tracking-el":s||"map-cluster-pin","data-tracking-label":o,...r})});V.displayName="MapClusterPin";const F=p.forwardRef(({icon:e,animateIn:t=!1,value:a,variant:n,pulse:s,dataHook:o,className:r,trackingEl:c,trackingLabel:i,ariaLabel:d,...m},u)=>a!==void 0||n!==void 0||s!==void 0?l.jsx(C,{ref:u,className:r,dataHook:o,pulse:s,trackingEl:c,trackingLabel:i,value:a??1,variant:n,...m}):l.jsx("div",{ref:u,"aria-label":d??"Location",className:g.cn("relative inline-flex h-[46px] w-[38px] items-start justify-center",r),"data-hook":o,"data-slot":"map-location-pin","data-tracking-el":c||"map-location-pin","data-tracking-label":i,role:"img",...m,children:l.jsxs("span",{"aria-hidden":"true",className:g.cn("relative flex size-full",t&&"animate-pop-in origin-bottom will-change-transform motion-reduce:animate-none"),children:[l.jsxs("svg",{"aria-hidden":"true",className:"size-full overflow-visible drop-shadow-sm",fill:"none",viewBox:"0 0 38 46",children:[l.jsx("path",{className:"fill-white",d:"M38 19.15C38 29.21 29.4 35.77 20.38 44.63C19.61 45.39 18.37 45.41 17.58 44.67C8.01 35.79 0 29.23 0 19.15C0 8.57 8.51 0 19 0C29.49 0 38 8.57 38 19.15Z"}),l.jsx("circle",{className:"fill-sky-500",cx:"19",cy:"19",r:"16"})]}),l.jsx("span",{className:"absolute top-[19px] left-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center text-white",children:e??l.jsx(P.Store,{size:16})})]})}));F.displayName="MapLocationPin";const z=p.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:n,children:s,iconOnly:o=!0,...r},c)=>{const i=I();return l.jsx(L.Button,{ref:c,className:e,"data-slot":"map-control-button",dataHook:t,iconOnly:o,trackingEl:a||"map-control-button",trackingLabel:n,variant:i?"secondary":"outline",...r,children:s})});z.displayName="MapControlButton";const q=p.forwardRef(({className:e,children:t,dataHook:a,trackingEl:n,trackingLabel:s,ariaLabel:o,...r},c)=>l.jsxs("div",{ref:c,"aria-label":o??"Loading map",className:g.cn("border-border relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border",e),"data-hook":a,"data-slot":"map-loading-state","data-tracking-el":n||"map-loading-state","data-tracking-label":s,role:"status",...r,children:[l.jsx(B,{}),t&&l.jsx("div",{className:"relative",children:t})]}));q.displayName="MapLoadingState";const B=p.memo(function({rounded:t}){return l.jsx(R.MapBackground,{"aria-hidden":"true",className:g.cn("absolute inset-0 h-full w-full object-cover",t&&"rounded-[inherit]"),mode:"auto"})}),G=p.forwardRef(({className:e,title:t="We couldn't load your map rankings.",message:a="Reloading usually fixes it, and it won't use any credits",onRetry:n,retryLoading:s=!1,retryLabel:o="Reload",dataHook:r,trackingEl:c,trackingLabel:i,...d},m)=>l.jsxs("div",{ref:m,className:g.cn("border-border relative flex h-full w-full flex-col items-center justify-center gap-4 rounded-lg border p-4 text-center sm:gap-6 sm:p-8",e),"data-hook":r,"data-slot":"map-error-state","data-tracking-el":c||"map-error-state","data-tracking-label":i,role:"alert",...d,children:[l.jsx(B,{rounded:!0}),l.jsxs("div",{className:"relative flex flex-col items-center gap-4 sm:gap-6",children:[l.jsx("div",{"aria-hidden":"true",className:"flex items-center justify-center","data-slot":"map-error-illustration",children:l.jsx(R.GlobeyFixingFault,{className:"h-auto w-full max-w-41"})}),l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("h3",{className:"text-foreground text-lg font-medium","data-slot":"map-error-title",children:t}),a&&l.jsx("p",{className:"text-muted-foreground text-sm","data-slot":"map-error-message",children:a})]}),n&&l.jsxs(L.Button,{className:"mt-1",dataHook:`${r}-retry`,loading:s,size:"sm",variant:"primary",onClick:n,children:[!s&&l.jsx(P.RefreshCw,{"aria-hidden":"true"}),o]})]})]}));G.displayName="MapErrorState";const K=p.forwardRef(({variant:e,color:t,dataHook:a,className:n,children:s,...o},r)=>{const c=e?y[e]:t;return l.jsxs("span",{ref:r,className:g.cn("text-foreground flex items-center gap-1 font-sans text-xs",n),"data-hook":a,"data-slot":"map-legend-item",...o,children:[l.jsx("span",{"aria-hidden":"true",className:g.cn("inline-block size-2 shrink-0 rounded-full",c)}),s]})});K.displayName="MapLegendItem";const Y=p.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:n,ariaLabel:s,children:o,...r},c)=>l.jsx(T.Card,{ref:c,"aria-label":s??"Map legend",className:g.cn("inline-flex w-auto max-w-none flex-row items-center bg-white font-sans dark:bg-neutral-800",e),"data-slot":"map-legend",dataHook:t,density:"condensed",role:"group",trackingEl:a||"map-legend",trackingLabel:n,variant:"border",...r,children:l.jsx(T.CardContent,{className:"flex items-center gap-3",children:o})}));Y.displayName="MapLegend";function ve(e){const{hoverWhenOpen:t=!1}=e??{},[a,n]=p.useState(null),[s,o]=p.useState(null),r=p.useCallback(d=>{o(d),n(d)},[]),c=p.useCallback(()=>{n(null)},[]),i=p.useCallback(d=>{const m={onClick:()=>r(d)};return t&&(m.onPointerEnter=u=>{u.pointerType==="mouse"&&a!=null&&r(d)}),m},[t,r,a]);return{activeItem:a,anchorItem:s,showItem:r,close:c,getInteractionProps:i}}const ke=j.Popover,H=j.PopoverAnchor;H.displayName="MapPopoverAnchor";const U=p.forwardRef(({className:e,side:t="top",sideOffset:a=4,dataHook:n,trackingEl:s,trackingLabel:o,...r},c)=>l.jsx(j.PopoverContent,{ref:c,className:g.cn("w-auto max-w-68.25 p-3 data-[state=closed]:animate-none data-[state=closed]:opacity-0",e),"data-slot":"map-popover-content","data-tracking-el":s||"map-popover","data-tracking-label":o,dataHook:n,side:t,sideOffset:a,onCloseAutoFocus:i=>i.preventDefault(),onOpenAutoFocus:i=>i.preventDefault(),...r}));U.displayName="MapPopoverContent";exports.MAP_STYLES=A;exports.MapClusterPin=V;exports.MapControlButton=z;exports.MapErrorState=G;exports.MapGridPin=C;exports.MapLegend=Y;exports.MapLegendItem=K;exports.MapLoadingState=q;exports.MapLocationPin=F;exports.MapPopover=ke;exports.MapPopoverAnchor=H;exports.MapPopoverContent=U;exports.MapTypeId=se;exports.clusterPinHexColors=be;exports.createClusterPinElement=he;exports.createClusterPinSvg=N;exports.mapGridPinColorMap=y;exports.resolveClusterPinColors=xe;exports.useMapPopoverClick=ve;exports.useMapStyles=me;
package/dist/map.d.ts CHANGED
@@ -70,8 +70,7 @@ type LegacyVariant = "primary" | "secondary" | "destructive" | "outline" | "warn
70
70
  type MapGridPinVariant = ResolvedVariant | LegacyVariant;
71
71
  /**
72
72
  * Background color classes for each ranking variant.
73
- * Shared by MapGridPin (CVA) and MapLegendItem so the pin and legend
74
- * colors stay in sync from a single source of truth.
73
+ * Derived from {@link RANKING_COLORS} — used by MapGridPin (CVA) and MapLegendItem.
75
74
  */
76
75
  declare const mapGridPinColorMap: Record<ResolvedVariant, string>;
77
76
  /**
@@ -102,6 +101,150 @@ interface MapGridPinProps extends Omit<React.ComponentProps<"div">, "children">
102
101
  * to apply based on the value.
103
102
  */
104
103
  declare const MapGridPin: React.ForwardRefExoticComponent<Omit<MapGridPinProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
104
+ declare function resolveClusterPinColors(): Record<ResolvedVariant, string>;
105
+ /**
106
+ * Resolved hex color values for each ranking variant.
107
+ * Reads from CSS custom properties at runtime so colors stay in sync
108
+ * with the design-token pipeline. Falls back to hardcoded hex for SSR.
109
+ *
110
+ * @deprecated Prefer calling {@link resolveClusterPinColors} directly
111
+ * for guaranteed up-to-date values. This static snapshot is kept for
112
+ * backward compatibility.
113
+ */
114
+ declare const clusterPinHexColors: Record<ResolvedVariant, string>;
115
+ /** A single segment in a cluster pin pie chart. */
116
+ interface ClusterPinSegment {
117
+ /** Ranking variant that determines this segment's color */
118
+ variant: ResolvedVariant;
119
+ /** Number of pins with this variant */
120
+ count: number;
121
+ }
122
+ /**
123
+ * Generates an SVG string for a cluster pie-chart pin.
124
+ *
125
+ * The SVG is a circle divided into colored sectors proportional to each
126
+ * segment's count, with a white inner circle displaying the total count.
127
+ * Colors are resolved from design-token CSS custom properties at runtime
128
+ * via {@link resolveClusterPinColors} and match the {@link MapGridPin}
129
+ * ranking palette.
130
+ *
131
+ * @param segments - Ranking variant distribution for the cluster
132
+ * @param total - Total count displayed in the center
133
+ *
134
+ * @example
135
+ * ```tsx
136
+ * // Generate SVG for a cluster with mixed rankings
137
+ * const svg = createClusterPinSvg(
138
+ * [
139
+ * { variant: "strong", count: 5 },
140
+ * { variant: "moderate", count: 3 },
141
+ * { variant: "weak", count: 1 },
142
+ * ],
143
+ * 9
144
+ * );
145
+ * ```
146
+ *
147
+ * @example
148
+ * ```tsx
149
+ * // Wire up with @googlemaps/markerclusterer
150
+ * import { createClusterPinElement } from "./map";
151
+ *
152
+ * new MarkerClusterer({
153
+ * map,
154
+ * markers,
155
+ * renderer: {
156
+ * render(cluster) {
157
+ * const el = createClusterPinElement({
158
+ * markers: cluster.markers,
159
+ * count: cluster.count,
160
+ * getVariant: (m) => dataMap.get(m)?.variant ?? "unranked",
161
+ * });
162
+ * return new google.maps.marker.AdvancedMarkerElement({
163
+ * position: cluster.position,
164
+ * content: el,
165
+ * zIndex: 1000 + cluster.count,
166
+ * });
167
+ * },
168
+ * },
169
+ * });
170
+ * ```
171
+ */
172
+ declare function createClusterPinSvg(segments: ClusterPinSegment[], total: number): string;
173
+ /**
174
+ * Options for {@link createClusterPinElement}.
175
+ */
176
+ interface CreateClusterPinElementOptions {
177
+ /** Markers grouped in this cluster. Each is passed to `getVariant`. */
178
+ markers: unknown[];
179
+ /** Total marker count for the cluster label. */
180
+ count: number;
181
+ /**
182
+ * Extracts the ranking variant from a single marker.
183
+ * Called once per marker; unknown markers should return `"unranked"`.
184
+ */
185
+ getVariant: (marker: unknown) => ResolvedVariant;
186
+ }
187
+ /**
188
+ * Creates an SVG DOM element for a cluster pin, ready to be used as
189
+ * `content` for a Google Maps `AdvancedMarkerElement`.
190
+ *
191
+ * Tallies the ranking variants across all markers in the cluster,
192
+ * generates a pie-chart SVG via {@link createClusterPinSvg}, and
193
+ * returns the parsed `SVGElement`.
194
+ *
195
+ * @example
196
+ * ```tsx
197
+ * import { createClusterPinElement } from "./map";
198
+ * import { MarkerClusterer } from "@googlemaps/markerclusterer";
199
+ *
200
+ * // Store per-marker data in a WeakMap
201
+ * const pinData = new WeakMap<google.maps.marker.AdvancedMarkerElement, { variant: "strong" | "moderate" | "weak" | "unranked" }>();
202
+ *
203
+ * new MarkerClusterer({
204
+ * map,
205
+ * markers,
206
+ * renderer: {
207
+ * render(cluster) {
208
+ * const el = createClusterPinElement({
209
+ * markers: cluster.markers,
210
+ * count: cluster.count,
211
+ * getVariant: (m) => pinData.get(m)?.variant ?? "unranked",
212
+ * });
213
+ * return new google.maps.marker.AdvancedMarkerElement({
214
+ * position: cluster.position,
215
+ * content: el,
216
+ * zIndex: 1000 + cluster.count,
217
+ * });
218
+ * },
219
+ * },
220
+ * });
221
+ * ```
222
+ */
223
+ declare function createClusterPinElement(options: CreateClusterPinElementOptions): SVGElement;
224
+ /**
225
+ * Props for the MapClusterPin component.
226
+ */
227
+ interface MapClusterPinProps extends Omit<React.ComponentProps<"div">, "children"> {
228
+ /** Distribution of ranking variants to display as pie sectors */
229
+ segments: ClusterPinSegment[];
230
+ /** Total count displayed in the center */
231
+ count: number;
232
+ /** Required test hook identifier */
233
+ dataHook: string;
234
+ /** Analytics element identifier */
235
+ trackingEl?: string;
236
+ /** Analytics label */
237
+ trackingLabel?: string;
238
+ }
239
+ /**
240
+ * A cluster pin that visualises the ranking distribution of grouped map pins
241
+ * as a pie chart. Each colored sector is proportional to the number of pins
242
+ * with that ranking variant; the total count is displayed in the center.
243
+ *
244
+ * Use as a standalone React component in stories or documentation.
245
+ * For Google Maps integration, use {@link createClusterPinElement} instead.
246
+ */
247
+ declare const MapClusterPin: React.ForwardRefExoticComponent<Omit<MapClusterPinProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
105
248
  /**
106
249
  * Props for the MapLocationPin component.
107
250
  */
@@ -415,6 +558,6 @@ interface MapPopoverContentProps extends PopoverContentProps {
415
558
  * with `MapPopoverAnchor` and {@link useMapPopoverClick}.
416
559
  */
417
560
  declare const MapPopoverContent: React.ForwardRefExoticComponent<Omit<MapPopoverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
418
- export { MAP_STYLES, MapTypeId, MapLocationPin, MapGridPin, mapGridPinColorMap, MapControlButton, MapLoadingState, MapErrorState, MapLegend, MapLegendItem, MapPopover, MapPopoverAnchor, MapPopoverContent, useMapStyles, useMapPopoverClick, };
419
- export type { MapStyleVariant, MapStyleRule, MapTypeIdValue, ResolvedVariant as MapPinVariant, MapLocationPinProps, MapGridPinProps, MapGridPinVariant, MapControlButtonProps, MapLoadingStateProps, MapErrorStateProps, MapLegendProps, MapLegendItemProps, MapPopoverProps, MapPopoverAnchorProps, MapPopoverContentProps, UseMapPopoverClickOptions, UseMapPopoverClickReturn, MapPinInteractionProps, };
561
+ export { MAP_STYLES, MapTypeId, MapLocationPin, MapGridPin, MapClusterPin, mapGridPinColorMap, clusterPinHexColors, resolveClusterPinColors, createClusterPinSvg, createClusterPinElement, MapControlButton, MapLoadingState, MapErrorState, MapLegend, MapLegendItem, MapPopover, MapPopoverAnchor, MapPopoverContent, useMapStyles, useMapPopoverClick, };
562
+ export type { MapStyleVariant, MapStyleRule, MapTypeIdValue, ResolvedVariant as MapPinVariant, MapLocationPinProps, MapGridPinProps, MapGridPinVariant, MapClusterPinProps, ClusterPinSegment, CreateClusterPinElementOptions, MapControlButtonProps, MapLoadingStateProps, MapErrorStateProps, MapLegendProps, MapLegendItemProps, MapPopoverProps, MapPopoverAnchorProps, MapPopoverContentProps, UseMapPopoverClickOptions, UseMapPopoverClickReturn, MapPinInteractionProps, };
420
563
  //# sourceMappingURL=map.d.ts.map
package/dist/map.d.ts.map CHANGED
@@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