@brightlocal/ui-components 2.14.0 → 2.15.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/list.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("react"),w=require("@radix-ui/react-slot"),R=require("class-variance-authority"),r=require("@brightlocal/ui-components/lib/utils"),c=require("@brightlocal/ui-components/skeleton");function S(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const n=S(k),d=R.cva(["flex","items-center","gap-4","rounded-lg","py-2","pr-2","pl-4","transition-colors","duration-200","ease-out"],{variants:{variant:{default:[],filled:["bg-card"],outline:["bg-background","border","border-border"],loading:["flex-col","gap-2","px-0","pt-0","pb-3"]}},defaultVariants:{variant:"filled"}}),m=n.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:o,...i},l)=>s.jsx("ul",{ref:l,className:r.cn("flex flex-col gap-2",e),"data-hook":a,"data-slot":"list","data-tracking-el":t,"data-tracking-label":o,...i}));m.displayName="List";const f=n.forwardRef(({asChild:e=!1,className:a,variant:t,dataHook:o,trackingEl:i,trackingLabel:l,children:N,...j},y)=>{const h=e?w.Slot:"li";return s.jsx(h,{ref:y,className:r.cn(d({variant:t}),a),"data-hook":o,"data-slot":"item","data-tracking-el":i,"data-tracking-label":l,...j,children:t==="loading"?s.jsxs(s.Fragment,{children:[s.jsx(c.Skeleton,{className:"h-4 w-full"}),s.jsx(c.Skeleton,{className:"h-4 w-full"})]}):N})});f.displayName="Item";const u=n.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:r.cn("shrink-0",e),"data-slot":"item-media",...a}));u.displayName="ItemMedia";const p=n.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:r.cn("flex flex-1 flex-col gap-1",e),"data-slot":"item-content",...a}));p.displayName="ItemContent";const x=n.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:r.cn("text-foreground text-lg font-medium",e),"data-slot":"item-title",...a}));x.displayName="ItemTitle";const g=n.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:r.cn("text-muted-foreground text-base",e),"data-slot":"item-description",...a}));g.displayName="ItemDescription";const b=n.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:r.cn("text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",e),"data-slot":"item-actions",...a}));b.displayName="ItemActions";const I=n.forwardRef(({className:e,dataHook:a,...t},o)=>s.jsx("li",{ref:o,className:r.cn("text-muted-foreground flex items-center py-2 pr-2 pl-4 text-base leading-none font-medium",e),"data-hook":a,"data-slot":"item-subheader",...t}));I.displayName="ItemSubheader";exports.Item=f;exports.ItemActions=b;exports.ItemContent=p;exports.ItemDescription=g;exports.ItemMedia=u;exports.ItemSubheader=I;exports.ItemTitle=x;exports.List=m;exports.itemVariants=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("react"),w=require("@radix-ui/react-slot"),R=require("class-variance-authority"),o=require("@brightlocal/ui-components/lib/utils"),d=require("@brightlocal/ui-components/skeleton");function S(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=S(k),c=R.cva(["flex","items-center","gap-4","rounded-lg","py-2","pr-2","pl-4","transition-colors","duration-200","ease-out"],{variants:{variant:{default:[],filled:["bg-card"],outline:["bg-background","border","border-border"],loading:["flex-col","gap-2","px-0","pt-0","pb-3"]}},defaultVariants:{variant:"filled"}}),m=r.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:n,...i},l)=>s.jsx("ul",{ref:l,className:o.cn("flex flex-col gap-2",e),"data-hook":a,"data-slot":"list","data-tracking-el":t,"data-tracking-label":n,...i}));m.displayName="List";const f=r.forwardRef(({asChild:e=!1,className:a,variant:t,dataHook:n,trackingEl:i,trackingLabel:l,children:N,...j},y)=>{const h=e?w.Slot:"li";return s.jsx(h,{ref:y,className:o.cn(c({variant:t}),a),"data-hook":n,"data-slot":"item","data-tracking-el":i,"data-tracking-label":l,...j,children:t==="loading"?s.jsxs(s.Fragment,{children:[s.jsx(d.Skeleton,{className:"h-4 w-full"}),s.jsx(d.Skeleton,{className:"h-4 w-full"})]}):N})});f.displayName="Item";const u=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("shrink-0",e),"data-slot":"item-media",...a}));u.displayName="ItemMedia";const p=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("flex flex-1 flex-col gap-1",e),"data-slot":"item-content",...a}));p.displayName="ItemContent";const g=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-foreground text-base leading-normal font-medium",e),"data-slot":"item-title",...a}));g.displayName="ItemTitle";const x=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-muted-foreground text-sm leading-normal font-normal",e),"data-slot":"item-description",...a}));x.displayName="ItemDescription";const b=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",e),"data-slot":"item-actions",...a}));b.displayName="ItemActions";const I=r.forwardRef(({className:e,dataHook:a,...t},n)=>s.jsx("li",{ref:n,className:o.cn("text-muted-foreground flex items-center py-2 pr-2 pl-4 text-base leading-none font-medium",e),"data-hook":a,"data-slot":"item-subheader",...t}));I.displayName="ItemSubheader";exports.Item=f;exports.ItemActions=b;exports.ItemContent=p;exports.ItemDescription=x;exports.ItemMedia=u;exports.ItemSubheader=I;exports.ItemTitle=g;exports.List=m;exports.itemVariants=c;
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,QAAA,MAAM,YAAY;;8EA0BjB,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,iGAYT,CAAC;AAOF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,IAAI,8FAqCT,CAAC;AAOF,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,SAAS,mKASd,CAAC;AAOF,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;;GAGG;AACH,QAAA,MAAM,WAAW,mKAShB,CA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AAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,aAAa,uGAalB,CAAC;AAOF,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,GACb,CAAC"}
package/dist/list.js CHANGED
@@ -31,7 +31,7 @@ const N = x(
31
31
  }
32
32
  }
33
33
  ), b = l.forwardRef(
34
- ({ className: t, dataHook: a, trackingEl: e, trackingLabel: s, ...i }, d) => /* @__PURE__ */ o(
34
+ ({ className: t, dataHook: a, trackingEl: e, trackingLabel: i, ...s }, d) => /* @__PURE__ */ o(
35
35
  "ul",
36
36
  {
37
37
  ref: d,
@@ -39,8 +39,8 @@ const N = x(
39
39
  "data-hook": a,
40
40
  "data-slot": "list",
41
41
  "data-tracking-el": e,
42
- "data-tracking-label": s,
43
- ...i
42
+ "data-tracking-label": i,
43
+ ...s
44
44
  }
45
45
  )
46
46
  );
@@ -50,21 +50,21 @@ const I = l.forwardRef(
50
50
  asChild: t = !1,
51
51
  className: a,
52
52
  variant: e,
53
- dataHook: s,
54
- trackingEl: i,
53
+ dataHook: i,
54
+ trackingEl: s,
55
55
  trackingLabel: d,
56
56
  children: n,
57
- ...c
58
- }, f) => /* @__PURE__ */ o(
57
+ ...f
58
+ }, c) => /* @__PURE__ */ o(
59
59
  t ? g : "li",
60
60
  {
61
- ref: f,
61
+ ref: c,
62
62
  className: r(N({ variant: e }), a),
63
- "data-hook": s,
63
+ "data-hook": i,
64
64
  "data-slot": "item",
65
- "data-tracking-el": i,
65
+ "data-tracking-el": s,
66
66
  "data-tracking-label": d,
67
- ...c,
67
+ ...f,
68
68
  children: e === "loading" ? /* @__PURE__ */ p(u, { children: [
69
69
  /* @__PURE__ */ o(m, { className: "h-4 w-full" }),
70
70
  /* @__PURE__ */ o(m, { className: "h-4 w-full" })
@@ -102,7 +102,10 @@ const y = l.forwardRef(
102
102
  "div",
103
103
  {
104
104
  ref: e,
105
- className: r("text-foreground text-lg font-medium", t),
105
+ className: r(
106
+ "text-foreground text-base leading-normal font-medium",
107
+ t
108
+ ),
106
109
  "data-slot": "item-title",
107
110
  ...a
108
111
  }
@@ -114,7 +117,10 @@ const w = l.forwardRef(
114
117
  "div",
115
118
  {
116
119
  ref: e,
117
- className: r("text-muted-foreground text-base", t),
120
+ className: r(
121
+ "text-muted-foreground text-sm leading-normal font-normal",
122
+ t
123
+ ),
118
124
  "data-slot": "item-description",
119
125
  ...a
120
126
  }
@@ -137,10 +143,10 @@ const R = l.forwardRef(
137
143
  );
138
144
  R.displayName = "ItemActions";
139
145
  const v = l.forwardRef(
140
- ({ className: t, dataHook: a, ...e }, s) => /* @__PURE__ */ o(
146
+ ({ className: t, dataHook: a, ...e }, i) => /* @__PURE__ */ o(
141
147
  "li",
142
148
  {
143
- ref: s,
149
+ ref: i,
144
150
  className: r(
145
151
  "text-muted-foreground flex items-center py-2 pr-2 pl-4 text-base leading-none font-medium",
146
152
  t
package/dist/map.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),N=require("react"),w=require("@brightlocal/icons"),u=require("@brightlocal/ui-components/button"),v=require("@brightlocal/ui-components/card"),p=require("@brightlocal/ui-components/lib/utils"),m=require("@brightlocal/ui-components/popover");function k(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const c=k(N),C={ROADMAP:"roadmap",SATELLITE:"satellite"},S={primary:"var(--primary)",secondary:"var(--secondary)",destructive:"var(--destructive)",outline:"var(--muted)",warning:"var(--warning-background)"},g=c.forwardRef(({value:t,variant:a="primary",pulse:e=!1,dataHook:r,className:n,trackingEl:o,trackingLabel:i,...l},d)=>s.jsx(u.Button,{ref:d,className:p.cn("size-8 p-0",e&&"animate-grid-pin-pulse transition-none motion-reduce:animate-none",n),dataHook:r,size:"sm",style:e?{"--grid-pin-pulse-color":S[a]}:void 0,trackingEl:o||"map-grid-pin",trackingLabel:i,variant:a,...l,children:String(t)}));g.displayName="MapGridPin";const x=c.forwardRef(({value:t=1,dataHook:a,...e},r)=>s.jsx(g,{ref:r,dataHook:a,value:t,...e}));x.displayName="MapLocationPin";const M=c.forwardRef(({className:t,dataHook:a,trackingEl:e,trackingLabel:r,children:n,...o},i)=>s.jsx(u.Button,{ref:i,className:p.cn("rounded-lg shadow-sm",t),"data-slot":"map-control-button",dataHook:a,trackingEl:e||"map-control-button",trackingLabel:r,variant:"outline",...o,children:n}));M.displayName="MapControlButton";const y=c.forwardRef(({className:t,message:a="Loading map…",dataHook:e,trackingEl:r,trackingLabel:n,...o},i)=>s.jsxs("div",{ref:i,"aria-live":"polite",className:p.cn("text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",t),"data-hook":e,"data-slot":"map-loading-state","data-tracking-el":r||"map-loading-state","data-tracking-label":n,role:"status",...o,children:[s.jsx("div",{"aria-hidden":"true",className:"size-4 animate-spin rounded-full border-2 border-current border-t-transparent"}),a]}));y.displayName="MapLoadingState";const h=c.forwardRef(({className:t,title:a="Unable to load map",message:e="Something went wrong while loading the map. Please try again.",onRetry:r,dataHook:n,trackingEl:o,trackingLabel:i,...l},d)=>s.jsxs("div",{ref:d,className:p.cn("bg-muted/50 flex flex-col items-center justify-center gap-3 rounded-xl p-8 text-center",t),"data-hook":n,"data-slot":"map-error-state","data-tracking-el":o||"map-error-state","data-tracking-label":i,role:"alert",...l,children:[s.jsx(w.AlertCircle,{"aria-hidden":"true",className:"text-muted-foreground/60",size:40,strokeWidth:1.5}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-foreground text-sm font-semibold","data-slot":"map-error-title",children:a}),e&&s.jsx("p",{className:"text-muted-foreground max-w-xs text-xs","data-slot":"map-error-message",children:e})]}),r&&s.jsx(u.Button,{className:"mt-1",dataHook:`${n}-retry`,size:"sm",variant:"primary",onClick:r,children:"Try again"})]}));h.displayName="MapErrorState";const P=c.forwardRef(({className:t,dataHook:a,trackingEl:e,trackingLabel:r,children:n,...o},i)=>s.jsx(v.Card,{ref:i,className:p.cn("inline-flex w-auto flex-row items-center",t),"data-slot":"map-legend",dataHook:a,density:"condensed",maxWidth:"none",trackingEl:e||"map-legend",trackingLabel:r,variant:"filled",...o,children:s.jsx(v.CardContent,{className:"flex items-center gap-3",children:n})}));P.displayName="MapLegend";function L(t=150){const[a,e]=c.useState(null),[r,n]=c.useState(null),o=c.useRef(null),i=c.useCallback(f=>{o.current&&clearTimeout(o.current),n(f),e(f)},[]),l=c.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>e(null),t)},[t]),d=c.useCallback(()=>{o.current&&clearTimeout(o.current)},[]);return{activeItem:a,anchorItem:r,showItem:i,scheduleClose:l,cancelClose:d}}const R=m.Popover,b=m.PopoverAnchor;b.displayName="MapPopoverAnchor";const j=c.forwardRef(({className:t,side:a="top",sideOffset:e=4,dataHook:r,trackingEl:n,trackingLabel:o,...i},l)=>s.jsx(m.PopoverContent,{ref:l,className:p.cn("w-auto p-3 data-[state=closed]:animate-none data-[state=closed]:opacity-0",t),"data-slot":"map-popover-content","data-tracking-el":n||"map-popover","data-tracking-label":o,dataHook:r,side:a,sideOffset:e,onOpenAutoFocus:d=>d.preventDefault(),...i}));j.displayName="MapPopoverContent";exports.MapControlButton=M;exports.MapErrorState=h;exports.MapGridPin=g;exports.MapLegend=P;exports.MapLoadingState=y;exports.MapLocationPin=x;exports.MapPopover=R;exports.MapPopoverAnchor=b;exports.MapPopoverContent=j;exports.MapTypeId=C;exports.useMapPopoverHover=L;
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;
package/dist/map.d.ts CHANGED
@@ -8,23 +8,85 @@ import * as React from "react";
8
8
  declare const MapTypeId: {
9
9
  /** Default road map view */
10
10
  readonly ROADMAP: "roadmap";
11
- /** Satellite imagery */
11
+ /** @deprecated Satellite imagery — prefer cloud-based map styling via Map ID */
12
12
  readonly SATELLITE: "satellite";
13
13
  };
14
14
  /**
15
15
  * Union of all map type identifier values.
16
16
  */
17
17
  type MapTypeIdValue = (typeof MapTypeId)[keyof typeof MapTypeId];
18
- type MapGridPinVariant = "primary" | "secondary" | "destructive" | "outline" | "warning";
18
+ /**
19
+ * Visual variant for map styling.
20
+ * - `"default"` — Standard Google Maps appearance (no custom styles in light mode)
21
+ * - `"muted"` — Desaturated, softened map appearance so UI elements stand out
22
+ */
23
+ type MapStyleVariant = "default" | "muted";
24
+ /**
25
+ * A single Google Maps JSON style rule.
26
+ * Matches the `google.maps.MapTypeStyle` shape so values can be passed
27
+ * directly to the `styles` prop of `@vis.gl/react-google-maps` `<Map>`.
28
+ */
29
+ type MapStyleRule = {
30
+ featureType?: string;
31
+ elementType?: string;
32
+ stylers: Record<string, string | number>[];
33
+ };
34
+ /**
35
+ * Built-in map style presets keyed by `variant.theme`.
36
+ *
37
+ * - `default.light` — empty (uses native Google Maps styling)
38
+ * - `default.dark` — dark colour palette based on "Example 3 Dark"
39
+ * - `muted.light` — desaturated/lightened based on "Example 2" (`sat -40, light +20`)
40
+ * - `muted.dark` — same dark palette as `default.dark`
41
+ */
42
+ declare const MAP_STYLES: Record<MapStyleVariant, {
43
+ light: MapStyleRule[];
44
+ dark: MapStyleRule[];
45
+ }>;
46
+ /**
47
+ * Returns the appropriate `google.maps.MapTypeStyle[]` for the given variant
48
+ * and the current color scheme (light/dark). Pass the returned array to the
49
+ * `styles` prop of `@vis.gl/react-google-maps` `<Map>`.
50
+ *
51
+ * Dark mode is detected automatically via the `dark` class on `document.body`.
52
+ *
53
+ * > **Note:** JSON styling works with **raster maps only** (no `mapId` prop).
54
+ * > For vector maps use [Cloud-based Map Styling](https://developers.google.com/maps/documentation/javascript/cloud-based-map-styling).
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * import { useMapStyles } from "./map";
59
+ *
60
+ * function MyMap() {
61
+ * const styles = useMapStyles("muted");
62
+ * return <Map styles={styles} defaultCenter={center} defaultZoom={14} />;
63
+ * }
64
+ * ```
65
+ */
66
+ declare function useMapStyles(variant?: MapStyleVariant): MapStyleRule[];
67
+ type ResolvedVariant = "strong" | "moderate" | "weak" | "unranked" | "error";
68
+ /** @deprecated Legacy variant names kept for backward compatibility. */
69
+ type LegacyVariant = "primary" | "secondary" | "destructive" | "outline" | "warning";
70
+ type MapGridPinVariant = ResolvedVariant | LegacyVariant;
71
+ /**
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.
75
+ */
76
+ declare const mapGridPinColorMap: Record<ResolvedVariant, string>;
19
77
  /**
20
78
  * Props for the MapGridPin component.
21
79
  */
22
- interface MapGridPinProps extends Omit<React.ComponentProps<"button">, "children" | "type"> {
80
+ interface MapGridPinProps extends Omit<React.ComponentProps<"div">, "children"> {
23
81
  /** Value displayed inside the pin (number or short label) */
24
82
  value: number | string;
25
- /** Button variant — consumer controls this based on value thresholds */
83
+ /** Color variant — consumer controls this based on value thresholds */
26
84
  variant?: MapGridPinVariant;
27
- /** Enable infinite pulse animation radiating from the pin */
85
+ /** Show loading appearance (neutral styling, overrides variant colors) */
86
+ loading?: boolean;
87
+ /**
88
+ * @deprecated No longer rendered. Kept for backward compatibility.
89
+ */
28
90
  pulse?: boolean;
29
91
  /** Required test hook identifier */
30
92
  dataHook: string;
@@ -34,25 +96,62 @@ interface MapGridPinProps extends Omit<React.ComponentProps<"button">, "children
34
96
  trackingLabel?: string;
35
97
  }
36
98
  /**
37
- * A circular map pin button that displays a numeric value with a colored background.
38
- * Uses the Button component internally. Color is determined by the `variant` prop —
39
- * the consumer controls which variant to apply based on the value.
40
- * Supports an optional `pulse` animation for emphasis.
99
+ * A circular map pin that displays a numeric value with a colored background.
100
+ * Renders as a non-focusable `div` (compatible with Google Maps AdvancedMarkerElement).
101
+ * Color is determined by the `variant` prop — the consumer controls which variant
102
+ * to apply based on the value.
41
103
  */
42
- declare const MapGridPin: React.ForwardRefExoticComponent<Omit<MapGridPinProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
104
+ declare const MapGridPin: React.ForwardRefExoticComponent<Omit<MapGridPinProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
43
105
  /**
44
106
  * Props for the MapLocationPin component.
45
107
  */
46
- interface MapLocationPinProps extends Omit<MapGridPinProps, "value"> {
47
- /** Numeric value displayed inside the pin */
108
+ interface MapLocationPinProps extends Omit<React.ComponentProps<"div">, "children"> {
109
+ /** Icon rendered inside the pin marker @default Store icon */
110
+ icon?: React.ReactNode;
111
+ /** Play a one-time entrance — the pin springs into place from its anchor point when it mounts @default false */
112
+ animateIn?: boolean;
113
+ /** Required test hook identifier */
114
+ dataHook: string;
115
+ /** Analytics element identifier */
116
+ trackingEl?: string;
117
+ /** Analytics label */
118
+ trackingLabel?: string;
119
+ /**
120
+ * Accessible label for the pin marker.
121
+ * @default "Location"
122
+ */
123
+ ariaLabel?: string;
124
+ /**
125
+ * Numeric value displayed inside the pin.
126
+ * @deprecated Use {@link MapGridPin} for numbered pins. Provided only for
127
+ * backward compatibility — passing it renders the legacy numbered-circle marker.
128
+ */
48
129
  value?: number;
130
+ /**
131
+ * Colour variant for the legacy numbered pin.
132
+ * @deprecated Use {@link MapGridPin} for numbered pins. Provided only for
133
+ * backward compatibility — passing it renders the legacy numbered-circle marker.
134
+ */
135
+ variant?: MapGridPinVariant;
136
+ /**
137
+ * Enable the legacy pulse animation. Prefer {@link MapLocationPinProps.animateIn}
138
+ * for the teardrop entrance.
139
+ * @deprecated Use {@link MapGridPin} for numbered pins. Provided only for
140
+ * backward compatibility — passing it renders the legacy numbered-circle marker.
141
+ */
142
+ pulse?: boolean;
49
143
  }
50
144
  /**
51
- * A map location pin marker.
52
- * Thin wrapper around MapGridPin with a default value of 1.
145
+ * A teardrop-shaped map location pin with an icon inside.
146
+ * Renders an SVG pin marker with a circular icon area and drop shadow.
53
147
  * Designed to be placed inside any map marker component (e.g. AdvancedMarker).
148
+ *
149
+ * Backward compatibility: the previously published `MapLocationPin` was a thin
150
+ * wrapper around {@link MapGridPin} (a numbered circle). Passing any legacy prop
151
+ * (`value`, `variant`, or `pulse`) renders that original numbered-pin marker so
152
+ * existing consumers keep working; otherwise the new teardrop marker is rendered.
54
153
  */
55
- declare const MapLocationPin: React.ForwardRefExoticComponent<Omit<MapLocationPinProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
154
+ declare const MapLocationPin: React.ForwardRefExoticComponent<Omit<MapLocationPinProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
155
  /**
57
156
  * Props for the MapControlButton component.
58
157
  */
@@ -65,10 +164,14 @@ interface MapControlButtonProps extends Omit<React.ComponentProps<"button">, "ty
65
164
  trackingLabel?: string;
66
165
  /** Button type attribute */
67
166
  type?: "button" | "submit";
167
+ /** Render as compact icon-only button or with text @default true */
168
+ iconOnly?: boolean;
68
169
  }
69
170
  /**
70
171
  * A floating control button for map UIs.
71
- * Renders a square, shadowed button designed to overlay a map surface.
172
+ * Uses `outline` in light mode and `secondary` in dark mode.
173
+ * In icon-only mode (default) renders a circular icon button.
174
+ * With `iconOnly={false}` renders a pill-shaped button with text and icon.
72
175
  * Use for zoom, locate, layer toggles, and other map controls.
73
176
  */
74
177
  declare const MapControlButton: React.ForwardRefExoticComponent<Omit<MapControlButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -76,31 +179,56 @@ declare const MapControlButton: React.ForwardRefExoticComponent<Omit<MapControlB
76
179
  * Props for the MapLoadingState component.
77
180
  */
78
181
  interface MapLoadingStateProps extends React.ComponentProps<"div"> {
79
- /** Optional loading message */
80
- message?: string;
182
+ /** Content displayed centered over the map background */
183
+ children?: React.ReactNode;
81
184
  /** Required test hook identifier */
82
185
  dataHook: string;
83
186
  /** Analytics element identifier */
84
187
  trackingEl?: string;
85
188
  /** Analytics label */
86
189
  trackingLabel?: string;
190
+ /**
191
+ * Accessible label for the loading status region.
192
+ * @default "Loading map"
193
+ */
194
+ ariaLabel?: string;
87
195
  }
88
196
  /**
89
197
  * A loading placeholder for map containers.
90
- * Uses the same spinner pattern as ComboboxLoading.
91
- * Use as a fallback while the map provider is loading.
198
+ * Displays the map background image with consumer-provided content
199
+ * centered vertically and horizontally. Fills its parent container.
200
+ * Use as a fallback while the map provider is initialising.
92
201
  */
93
202
  declare const MapLoadingState: React.ForwardRefExoticComponent<Omit<MapLoadingStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
94
203
  /**
95
204
  * Props for the MapErrorState component.
96
205
  */
97
206
  interface MapErrorStateProps extends React.ComponentProps<"div"> {
98
- /** Error title */
207
+ /**
208
+ * Error title displayed as a heading.
209
+ * @default "We couldn't load your map rankings."
210
+ */
99
211
  title?: string;
100
- /** Error description */
212
+ /**
213
+ * Error description displayed below the title.
214
+ * @default "Reloading usually fixes it, and it won't use any credits"
215
+ */
101
216
  message?: string;
102
- /** Retry callback — renders a "Try again" button when provided */
217
+ /**
218
+ * Retry callback. When provided, renders a retry button.
219
+ * Omit to hide the retry button entirely.
220
+ */
103
221
  onRetry?: () => void;
222
+ /**
223
+ * Show the retry button in its loading state while the map reloads.
224
+ * @default false
225
+ */
226
+ retryLoading?: boolean;
227
+ /**
228
+ * Label for the retry button.
229
+ * @default "Reload"
230
+ */
231
+ retryLabel?: string;
104
232
  /** Required test hook identifier */
105
233
  dataHook: string;
106
234
  /** Analytics element identifier */
@@ -110,10 +238,33 @@ interface MapErrorStateProps extends React.ComponentProps<"div"> {
110
238
  }
111
239
  /**
112
240
  * An error state for map containers.
113
- * Displays an alert icon, title, message, and an optional retry button.
114
- * Use when the map provider fails to initialise or a network error occurs.
241
+ * Displays the Globey "fixing fault" illustration, title, and message.
242
+ * Pass `onRetry` to render a retry button; omit it to hide the button entirely.
115
243
  */
116
244
  declare const MapErrorState: React.ForwardRefExoticComponent<Omit<MapErrorStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
245
+ /**
246
+ * Props for the MapLegendItem component.
247
+ */
248
+ interface MapLegendItemProps extends React.ComponentProps<"span"> {
249
+ /**
250
+ * Pin ranking variant — resolves to the matching MapGridPin background color.
251
+ * Preferred over `color` so pin and legend stay in sync automatically.
252
+ */
253
+ variant?: ResolvedVariant;
254
+ /**
255
+ * Dot color as a Tailwind background class (e.g. "bg-primary").
256
+ * Use for non-ranking legends where no pin variant applies.
257
+ * Ignored when `variant` is provided.
258
+ */
259
+ color?: string;
260
+ /** Required test hook identifier */
261
+ dataHook: string;
262
+ }
263
+ /**
264
+ * A single legend entry: colored dot + label text.
265
+ * Pass `variant` to match MapGridPin colors automatically, or `color` for custom dots.
266
+ */
267
+ declare const MapLegendItem: React.ForwardRefExoticComponent<Omit<MapLegendItemProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
117
268
  /**
118
269
  * Props for the MapLegend component.
119
270
  */
@@ -124,6 +275,11 @@ interface MapLegendProps extends React.ComponentProps<"div"> {
124
275
  trackingEl?: string;
125
276
  /** Analytics label */
126
277
  trackingLabel?: string;
278
+ /**
279
+ * Accessible label for the legend group.
280
+ * @default "Map legend"
281
+ */
282
+ ariaLabel?: string;
127
283
  }
128
284
  /**
129
285
  * A flexible legend container for map UIs.
@@ -131,31 +287,84 @@ interface MapLegendProps extends React.ComponentProps<"div"> {
131
287
  */
132
288
  declare const MapLegend: React.ForwardRefExoticComponent<Omit<MapLegendProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
133
289
  /**
134
- * Return type of {@link useMapPopoverHover}.
290
+ * Options for {@link useMapPopoverClick}.
291
+ */
292
+ interface UseMapPopoverClickOptions {
293
+ /**
294
+ * When `true`, hovering a pin switches the popover to that pin
295
+ * after any pin has been clicked open (menubar-style interaction).
296
+ * Mouse-only — touch events are filtered out.
297
+ * @default false
298
+ */
299
+ hoverWhenOpen?: boolean;
300
+ }
301
+ /**
302
+ * Pointer interaction props returned by {@link UseMapPopoverClickReturn.getInteractionProps}.
303
+ */
304
+ interface MapPinInteractionProps {
305
+ onClick: () => void;
306
+ onPointerEnter?: (e: React.PointerEvent) => void;
307
+ }
308
+ /**
309
+ * Return type of {@link useMapPopoverClick}.
135
310
  */
136
- interface UseMapPopoverHoverReturn<T> {
137
- /** The item currently being hovered, or `null` when idle. Use for `open` prop. */
311
+ interface UseMapPopoverClickReturn<T> {
312
+ /** The item whose popover is open, or `null` when closed. */
138
313
  activeItem: T | null;
139
- /** Last non-null item — holds position stable during the close animation. Use for anchor positioning. */
314
+ /** Last non-null item — holds position stable during the close animation. */
140
315
  anchorItem: T | null;
141
- /** Set a new active item and cancel any pending close timer. */
316
+ /** Open the popover for the given item. If another item is active, switches instantly. */
142
317
  showItem: (item: T) => void;
143
- /** Start a delayed close (default 150 ms). Moving to another pin or the popover content cancels it. */
144
- scheduleClose: () => void;
145
- /** Cancel a pending close — call from `MapPopoverContent.onMouseEnter`. */
146
- cancelClose: () => void;
318
+ /** Close the popover. */
319
+ close: () => void;
320
+ /**
321
+ * Returns event handler props for a pin.
322
+ * Always includes `onClick`; includes `onPointerEnter` when `hoverWhenOpen` is enabled.
323
+ * Spread onto the marker element or pass individual handlers.
324
+ */
325
+ getInteractionProps: (item: T) => MapPinInteractionProps;
147
326
  }
148
327
  /**
149
- * Manages hover state for a single repositioning Popover on dense map grids.
328
+ * Manages click-to-open state for a single map popover.
150
329
  *
151
- * Wire the returned callbacks to `MapGridPin` mouse events and
152
- * `MapPopoverContent` mouse events. The 150 ms grace period prevents
153
- * flicker when the pointer travels between a pin and the popover content.
330
+ * Designed for use with Google Maps `AdvancedMarker` — register `onClick`
331
+ * on the `AdvancedMarker` component (not on child DOM elements) to avoid the
332
+ * "Focusable child elements in AdvancedMarkerElement are not supported" warning.
154
333
  *
155
- * @param delay - Close timer in ms.
156
- * @default 150
334
+ * Pass `{ hoverWhenOpen: true }` to enable menubar-style interaction:
335
+ * the first pin requires a click, but subsequent pins switch on hover.
336
+ * Only mouse pointers trigger hover — touch is filtered out.
337
+ *
338
+ * @example
339
+ * ```tsx
340
+ * const { activeItem, anchorItem, showItem, close } = useMapPopoverClick<Pin>();
341
+ *
342
+ * <Map onClick={close}>
343
+ * <AdvancedMarker position={pin} onClick={() => showItem(pin)}>
344
+ * <MapGridPin dataHook="pin" value={pin.rank} />
345
+ * </AdvancedMarker>
346
+ * </Map>
347
+ *
348
+ * <MapPopover open={!!activeItem}>
349
+ * <MapPopoverAnchor ... />
350
+ * <MapPopoverContent dataHook="popover" onEscapeKeyDown={close}>
351
+ * {activeItem && <p>{activeItem.rank}</p>}
352
+ * </MapPopoverContent>
353
+ * </MapPopover>
354
+ * ```
355
+ *
356
+ * @example
357
+ * ```tsx
358
+ * // With hoverWhenOpen — click first pin, then hover to switch
359
+ * const { activeItem, anchorItem, getInteractionProps, close } =
360
+ * useMapPopoverClick<Pin>({ hoverWhenOpen: true });
361
+ *
362
+ * <AdvancedMarker {...getInteractionProps(pin)}>
363
+ * <MapGridPin dataHook="pin" value={pin.rank} />
364
+ * </AdvancedMarker>
365
+ * ```
157
366
  */
158
- declare function useMapPopoverHover<T>(delay?: number): UseMapPopoverHoverReturn<T>;
367
+ declare function useMapPopoverClick<T>(options?: UseMapPopoverClickOptions): UseMapPopoverClickReturn<T>;
159
368
  /**
160
369
  * Controlled popover root for map UIs.
161
370
  * Re-exports `Popover` so consumers import everything from the map module.
@@ -195,13 +404,17 @@ interface MapPopoverContentProps extends PopoverContentProps {
195
404
  }
196
405
  /**
197
406
  * Popover content panel with map-specific defaults.
198
- * Compact sizing (`w-auto p-3`), top placement, and focus-prevention
199
- * for hover-activated popovers.
407
+ * Compact sizing (`w-auto max-w-68.25 p-3` — sizes to content, max 273px), top placement, and auto-focus prevention
408
+ * for click-activated map popovers.
409
+ *
410
+ * Both `onOpenAutoFocus` and `onCloseAutoFocus` are prevented by default
411
+ * to keep focus on the map surface. Override via props if standard
412
+ * focus-return behavior is needed.
200
413
  *
201
414
  * Use inside a controlled `<MapPopover open={!!activeItem}>` together
202
- * with `MapPopoverAnchor` and {@link useMapPopoverHover}.
415
+ * with `MapPopoverAnchor` and {@link useMapPopoverClick}.
203
416
  */
204
417
  declare const MapPopoverContent: React.ForwardRefExoticComponent<Omit<MapPopoverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
205
- export { MapTypeId, MapLocationPin, MapGridPin, MapControlButton, MapLoadingState, MapErrorState, MapLegend, MapPopover, MapPopoverAnchor, MapPopoverContent, useMapPopoverHover, };
206
- export type { MapTypeIdValue, MapLocationPinProps, MapGridPinProps, MapGridPinVariant, MapControlButtonProps, MapLoadingStateProps, MapErrorStateProps, MapLegendProps, MapPopoverProps, MapPopoverAnchorProps, MapPopoverContentProps, UseMapPopoverHoverReturn, };
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, };
207
420
  //# sourceMappingURL=map.d.ts.map
package/dist/map.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/components/map.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,OAAO,EAGP,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,oCAAoC,CAAC;AAM5C;;;;GAIG;AACH,QAAA,MAAM,SAAS;IACb,4BAA4B;;IAE5B,wBAAwB;;CAEhB,CAAC;AAEX;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAMjE,KAAK,iBAAiB,GAClB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,GACT,SAAS,CAAC;AAUd;;GAEG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAC9B,UAAU,GAAG,MAAM,CACpB;IACC,6DAA6D;IAC7D,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,wEAAwE;IACxE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB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BAAqB,GAAG,kBAAkB,CAAC;AAMhD;;GAEG;AACH,UAAU,sBAAuB,SAAQ,mBAAmB;IAC1D,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,iBAAiB,4GAgCtB,CAAC;AAQF,OAAO,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,CAAC"}
1
+ {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/components/map.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EACL,OAAO,EAGP,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,oCAAoC,CAAC;AAM5C;;;;GAIG;AACH,QAAA,MAAM,SAAS;IACb,4BAA4B;;IAE5B,gFAAgF;;CAExE,CAAC;AAEX;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAMjE;;;;GAIG;AACH,KAAK,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,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