@brightlocal/ui-components 2.26.0 → 3.0.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.
Files changed (284) hide show
  1. package/README.md +9 -2
  2. package/component-meta.json +4010 -255
  3. package/deprecations.json +189 -2
  4. package/dist/accordion.cjs +1 -1
  5. package/dist/accordion.js +2 -2
  6. package/dist/alert-dialog.cjs +1 -1
  7. package/dist/alert-dialog.js +18 -18
  8. package/dist/alert.cjs +1 -1
  9. package/dist/alert.d.ts +11 -1
  10. package/dist/alert.d.ts.map +1 -1
  11. package/dist/alert.js +31 -28
  12. package/dist/avatar.cjs +1 -1
  13. package/dist/avatar.js +4 -4
  14. package/dist/badge.cjs +1 -1
  15. package/dist/badge.d.ts.map +1 -1
  16. package/dist/badge.js +15 -11
  17. package/dist/blocks/empty-state.cjs +1 -0
  18. package/dist/blocks/empty-state.d.ts +172 -0
  19. package/dist/blocks/empty-state.d.ts.map +1 -0
  20. package/dist/blocks/empty-state.js +155 -0
  21. package/dist/blocks/input-list.cjs +2 -2
  22. package/dist/blocks/input-list.d.ts.map +1 -1
  23. package/dist/blocks/input-list.js +124 -108
  24. package/dist/blocks/progress-state.cjs +1 -0
  25. package/dist/blocks/progress-state.d.ts +121 -0
  26. package/dist/blocks/progress-state.d.ts.map +1 -0
  27. package/dist/blocks/progress-state.js +368 -0
  28. package/dist/blocks/sidebar.cjs +1 -1
  29. package/dist/blocks/sidebar.d.ts.map +1 -1
  30. package/dist/blocks/sidebar.js +297 -296
  31. package/dist/brand-illustration-motif.d.ts +1 -1
  32. package/dist/breadcrumb.cjs +1 -1
  33. package/dist/breadcrumb.d.ts.map +1 -1
  34. package/dist/breadcrumb.js +44 -40
  35. package/dist/button.cjs +1 -1
  36. package/dist/button.d.ts.map +1 -1
  37. package/dist/button.js +23 -23
  38. package/dist/calendar.cjs +1 -1
  39. package/dist/calendar.d.ts.map +1 -1
  40. package/dist/calendar.js +37 -38
  41. package/dist/callout.cjs +1 -1
  42. package/dist/callout.d.ts +24 -2
  43. package/dist/callout.d.ts.map +1 -1
  44. package/dist/callout.js +57 -55
  45. package/dist/card.cjs +1 -1
  46. package/dist/card.d.ts +23 -2
  47. package/dist/card.d.ts.map +1 -1
  48. package/dist/card.js +94 -91
  49. package/dist/chart-empty.cjs +1 -0
  50. package/dist/chart-empty.d.ts +59 -0
  51. package/dist/chart-empty.d.ts.map +1 -0
  52. package/dist/chart-empty.js +29 -0
  53. package/dist/chart.cjs +6 -6
  54. package/dist/chart.d.ts +6 -1
  55. package/dist/chart.d.ts.map +1 -1
  56. package/dist/chart.js +183 -183
  57. package/dist/chip.cjs +1 -1
  58. package/dist/chip.d.ts +1 -1
  59. package/dist/chip.d.ts.map +1 -1
  60. package/dist/chip.js +47 -44
  61. package/dist/combobox.cjs +3 -3
  62. package/dist/combobox.d.ts +4 -2
  63. package/dist/combobox.d.ts.map +1 -1
  64. package/dist/combobox.js +143 -141
  65. package/dist/command.cjs +1 -1
  66. package/dist/command.d.ts.map +1 -1
  67. package/dist/command.js +74 -77
  68. package/dist/context-menu.cjs +1 -1
  69. package/dist/context-menu.d.ts.map +1 -1
  70. package/dist/context-menu.js +26 -29
  71. package/dist/data-table.cjs +1 -1
  72. package/dist/data-table.d.ts +182 -13
  73. package/dist/data-table.d.ts.map +1 -1
  74. package/dist/data-table.js +462 -314
  75. package/dist/description.cjs +1 -1
  76. package/dist/description.js +5 -5
  77. package/dist/dialog.cjs +1 -1
  78. package/dist/dialog.js +20 -20
  79. package/dist/drawer.cjs +1 -1
  80. package/dist/drawer.d.ts.map +1 -1
  81. package/dist/drawer.js +8 -11
  82. package/dist/dropdown-menu.cjs +1 -1
  83. package/dist/dropdown-menu.d.ts.map +1 -1
  84. package/dist/dropdown-menu.js +17 -20
  85. package/dist/field.cjs +1 -1
  86. package/dist/field.d.ts.map +1 -1
  87. package/dist/field.js +29 -25
  88. package/dist/global-layout.cjs +1 -1
  89. package/dist/global-layout.d.ts +58 -6
  90. package/dist/global-layout.d.ts.map +1 -1
  91. package/dist/global-layout.js +278 -194
  92. package/dist/grid.cjs +1 -0
  93. package/dist/grid.d.ts +56 -0
  94. package/dist/grid.d.ts.map +1 -0
  95. package/dist/grid.js +32 -0
  96. package/dist/header.d.ts +13 -0
  97. package/dist/header.d.ts.map +1 -1
  98. package/dist/hooks/use-delayed-pending.cjs +1 -0
  99. package/dist/hooks/use-delayed-pending.d.ts +34 -0
  100. package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
  101. package/dist/hooks/use-delayed-pending.js +17 -0
  102. package/dist/hover-card.cjs +1 -1
  103. package/dist/hover-card.js +13 -13
  104. package/dist/index.cjs +1 -1
  105. package/dist/index.d.ts +10 -0
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +523 -494
  108. package/dist/input-chip.cjs +1 -1
  109. package/dist/input-chip.js +25 -25
  110. package/dist/input-group.cjs +1 -1
  111. package/dist/input-group.js +9 -9
  112. package/dist/input-otp.cjs +1 -1
  113. package/dist/input-otp.js +9 -9
  114. package/dist/input-password.cjs +1 -1
  115. package/dist/input-password.js +51 -51
  116. package/dist/input.cjs +1 -1
  117. package/dist/input.js +9 -9
  118. package/dist/label.cjs +1 -1
  119. package/dist/label.d.ts.map +1 -1
  120. package/dist/label.js +25 -28
  121. package/dist/lib/block-illustration.cjs +1 -0
  122. package/dist/lib/block-illustration.d.ts +28 -0
  123. package/dist/lib/block-illustration.d.ts.map +1 -0
  124. package/dist/lib/block-illustration.js +21 -0
  125. package/dist/lib/empty-canvas.cjs +1 -0
  126. package/dist/lib/empty-canvas.d.ts +27 -0
  127. package/dist/lib/empty-canvas.d.ts.map +1 -0
  128. package/dist/lib/empty-canvas.js +62 -0
  129. package/dist/lib/motion.cjs +1 -1
  130. package/dist/lib/motion.js +10 -8
  131. package/dist/lib/optical-center.cjs +1 -0
  132. package/dist/lib/optical-center.d.ts +12 -0
  133. package/dist/lib/optical-center.d.ts.map +1 -0
  134. package/dist/lib/optical-center.js +11 -0
  135. package/dist/lib/utils.cjs +1 -1
  136. package/dist/lib/utils.d.ts.map +1 -1
  137. package/dist/lib/utils.js +28 -5
  138. package/dist/link.cjs +1 -1
  139. package/dist/link.d.ts +8 -6
  140. package/dist/link.d.ts.map +1 -1
  141. package/dist/link.js +52 -20
  142. package/dist/list.cjs +1 -1
  143. package/dist/list.d.ts.map +1 -1
  144. package/dist/list.js +87 -81
  145. package/dist/map.cjs +1 -1
  146. package/dist/map.d.ts +60 -2
  147. package/dist/map.d.ts.map +1 -1
  148. package/dist/map.js +187 -164
  149. package/dist/media-empty.cjs +1 -0
  150. package/dist/media-empty.d.ts +72 -0
  151. package/dist/media-empty.d.ts.map +1 -0
  152. package/dist/media-empty.js +45 -0
  153. package/dist/menubar.cjs +1 -1
  154. package/dist/menubar.d.ts.map +1 -1
  155. package/dist/menubar.js +17 -20
  156. package/dist/navigation-menu.cjs +1 -1
  157. package/dist/navigation-menu.js +7 -7
  158. package/dist/pagination.cjs +1 -1
  159. package/dist/pagination.d.ts +127 -1
  160. package/dist/pagination.d.ts.map +1 -1
  161. package/dist/pagination.js +189 -98
  162. package/dist/progress.cjs +1 -1
  163. package/dist/progress.d.ts +37 -3
  164. package/dist/progress.d.ts.map +1 -1
  165. package/dist/progress.js +102 -64
  166. package/dist/route-progress.cjs +1 -0
  167. package/dist/route-progress.d.ts +103 -0
  168. package/dist/route-progress.d.ts.map +1 -0
  169. package/dist/route-progress.js +106 -0
  170. package/dist/select.cjs +2 -2
  171. package/dist/select.d.ts.map +1 -1
  172. package/dist/select.js +19 -18
  173. package/dist/separator.cjs +1 -1
  174. package/dist/separator.js +8 -8
  175. package/dist/sheet.cjs +1 -1
  176. package/dist/sheet.d.ts +35 -2
  177. package/dist/sheet.d.ts.map +1 -1
  178. package/dist/sheet.js +103 -66
  179. package/dist/skeleton.cjs +1 -1
  180. package/dist/skeleton.d.ts +38 -3
  181. package/dist/skeleton.d.ts.map +1 -1
  182. package/dist/skeleton.js +43 -20
  183. package/dist/sonner.cjs +1 -1
  184. package/dist/sonner.d.ts.map +1 -1
  185. package/dist/sonner.js +32 -36
  186. package/dist/spinner.cjs +1 -0
  187. package/dist/spinner.d.ts +57 -0
  188. package/dist/spinner.d.ts.map +1 -0
  189. package/dist/spinner.js +35 -0
  190. package/dist/stepper.cjs +1 -1
  191. package/dist/stepper.d.ts.map +1 -1
  192. package/dist/stepper.js +23 -22
  193. package/dist/table.cjs +1 -1
  194. package/dist/table.d.ts +1 -1
  195. package/dist/table.d.ts.map +1 -1
  196. package/dist/table.js +36 -29
  197. package/dist/tabs.cjs +1 -1
  198. package/dist/tabs.js +1 -1
  199. package/dist/text-reveal-motion.d.ts +10 -0
  200. package/dist/text-reveal-motion.d.ts.map +1 -1
  201. package/dist/textarea.cjs +1 -1
  202. package/dist/textarea.js +11 -11
  203. package/dist/toggle.cjs +1 -1
  204. package/dist/toggle.js +8 -8
  205. package/dist/tooltip.cjs +1 -1
  206. package/dist/tooltip.js +8 -8
  207. package/dist/typography-heading.cjs +1 -0
  208. package/dist/typography-heading.d.ts +116 -0
  209. package/dist/typography-heading.d.ts.map +1 -0
  210. package/dist/typography-heading.js +84 -0
  211. package/dist/typography-text.cjs +1 -0
  212. package/dist/typography-text.d.ts +113 -0
  213. package/dist/typography-text.d.ts.map +1 -0
  214. package/dist/typography-text.js +81 -0
  215. package/dist/typography.d.ts +13 -0
  216. package/dist/typography.d.ts.map +1 -1
  217. package/package.json +42 -2
  218. package/src/blocks/empty-state.tsx +424 -0
  219. package/src/blocks/input-list.tsx +66 -36
  220. package/src/blocks/progress-state.tsx +542 -0
  221. package/src/blocks/sidebar.tsx +46 -40
  222. package/src/components/accordion.tsx +2 -2
  223. package/src/components/alert-dialog.tsx +2 -2
  224. package/src/components/alert.tsx +27 -13
  225. package/src/components/avatar.tsx +1 -1
  226. package/src/components/badge.tsx +8 -4
  227. package/src/components/breadcrumb.tsx +9 -4
  228. package/src/components/button.tsx +5 -8
  229. package/src/components/calendar.tsx +5 -6
  230. package/src/components/callout.tsx +48 -15
  231. package/src/components/card.tsx +52 -17
  232. package/src/components/chart-empty.tsx +116 -0
  233. package/src/components/chart.tsx +43 -17
  234. package/src/components/chip.tsx +9 -6
  235. package/src/components/combobox.tsx +21 -12
  236. package/src/components/command.tsx +9 -10
  237. package/src/components/context-menu.tsx +6 -9
  238. package/src/components/data-table.tsx +405 -31
  239. package/src/components/description.tsx +1 -1
  240. package/src/components/dialog.tsx +2 -2
  241. package/src/components/drawer.tsx +2 -5
  242. package/src/components/dropdown-menu.tsx +8 -11
  243. package/src/components/field.tsx +8 -4
  244. package/src/components/global-layout.tsx +264 -65
  245. package/src/components/grid.tsx +130 -0
  246. package/src/components/header.tsx +13 -0
  247. package/src/components/hover-card.tsx +1 -1
  248. package/src/components/input-chip.tsx +1 -1
  249. package/src/components/input-group.tsx +1 -1
  250. package/src/components/input-otp.tsx +1 -1
  251. package/src/components/input-password.tsx +1 -1
  252. package/src/components/input.tsx +1 -1
  253. package/src/components/label.tsx +10 -13
  254. package/src/components/link.tsx +39 -5
  255. package/src/components/list.tsx +18 -14
  256. package/src/components/map.tsx +101 -5
  257. package/src/components/media-empty.tsx +156 -0
  258. package/src/components/menubar.tsx +7 -10
  259. package/src/components/navigation-menu.tsx +1 -1
  260. package/src/components/pagination.tsx +279 -1
  261. package/src/components/progress.tsx +120 -11
  262. package/src/components/route-progress.tsx +354 -0
  263. package/src/components/select.tsx +5 -4
  264. package/src/components/separator.tsx +1 -1
  265. package/src/components/sheet.tsx +89 -7
  266. package/src/components/skeleton.tsx +78 -7
  267. package/src/components/sonner.tsx +5 -14
  268. package/src/components/spinner.tsx +94 -0
  269. package/src/components/stepper.tsx +6 -7
  270. package/src/components/table.tsx +11 -4
  271. package/src/components/tabs.tsx +1 -1
  272. package/src/components/text-reveal-motion.tsx +10 -0
  273. package/src/components/textarea.tsx +1 -1
  274. package/src/components/toggle.tsx +1 -1
  275. package/src/components/tooltip.tsx +1 -1
  276. package/src/components/typography-heading.tsx +229 -0
  277. package/src/components/typography-text.tsx +225 -0
  278. package/src/components/typography.tsx +13 -0
  279. package/src/hooks/use-delayed-pending.ts +60 -0
  280. package/src/index.ts +12 -0
  281. package/src/lib/block-illustration.tsx +88 -0
  282. package/src/lib/empty-canvas.tsx +128 -0
  283. package/src/lib/optical-center.tsx +45 -0
  284. package/src/lib/utils.ts +26 -0
package/dist/map.js CHANGED
@@ -1,22 +1,23 @@
1
1
  import { jsx as c, jsxs as y } from "react/jsx-runtime";
2
2
  import * as u from "react";
3
3
  import { cva as K } from "class-variance-authority";
4
- import { RefreshCw as U, TriangleAlert as W, Store as Y } from "@brightlocal/icons";
5
- import { GlobeyFixingFault as Z, MapBackground as q } from "@brightlocal/illustrations";
4
+ import { Map as W, RefreshCw as U, TriangleAlert as Y, Store as Z } from "@brightlocal/icons";
5
+ import { GlobeyFixingFault as q, MapBackground as H } from "@brightlocal/illustrations";
6
6
  import { Button as T } from "@brightlocal/ui-components/button";
7
- import { Card as H, CardContent as J } from "@brightlocal/ui-components/card";
7
+ import { Card as J, CardContent as Q } from "@brightlocal/ui-components/card";
8
8
  import { cn as g } from "@brightlocal/ui-components/lib/utils";
9
- import { Popover as Q, PopoverAnchor as X, PopoverContent as ee } from "@brightlocal/ui-components/popover";
10
- const Se = {
9
+ import { Popover as X, PopoverAnchor as ee, PopoverContent as te } from "@brightlocal/ui-components/popover";
10
+ import { EmptyCanvas as ae } from "./lib/empty-canvas.js";
11
+ const Oe = {
11
12
  /** Default road map view */
12
13
  ROADMAP: "roadmap",
13
14
  /** @deprecated Satellite imagery — prefer cloud-based map styling via Map ID */
14
15
  SATELLITE: "satellite"
15
- }, te = ["water", "landscape", "road", "poi", "transit"];
16
- function re(e, t) {
16
+ }, re = ["water", "landscape", "road", "poi", "transit"];
17
+ function oe(e, t) {
17
18
  return [
18
- ...te.map((a) => ({
19
- featureType: a,
19
+ ...re.map((r) => ({
20
+ featureType: r,
20
21
  elementType: "geometry",
21
22
  stylers: [{ saturation: e, lightness: t }]
22
23
  })),
@@ -30,7 +31,7 @@ function re(e, t) {
30
31
  }
31
32
  ];
32
33
  }
33
- const $ = [
34
+ const P = [
34
35
  { elementType: "geometry", stylers: [{ color: "#444444" }] },
35
36
  { elementType: "labels.text.fill", stylers: [{ color: "#aaaaaa" }] },
36
37
  { elementType: "labels.text.stroke", stylers: [{ color: "#323232" }] },
@@ -65,45 +66,45 @@ const $ = [
65
66
  stylers: [{ color: "#505050" }]
66
67
  },
67
68
  { elementType: "labels.icon", stylers: [{ visibility: "off" }] }
68
- ], ae = {
69
- default: { light: [], dark: $ },
70
- muted: { light: re(-40, 20), dark: $ }
69
+ ], ne = {
70
+ default: { light: [], dark: P },
71
+ muted: { light: oe(-40, 20), dark: P }
71
72
  }, w = /* @__PURE__ */ new Set();
72
73
  let M = typeof document < "u" && !!document.body && document.body.classList.contains("dark"), S = !1;
73
- function oe() {
74
+ function se() {
74
75
  if (S || typeof document > "u") return;
75
76
  S = !0, new MutationObserver(() => {
76
77
  const t = document.body.classList.contains("dark");
77
78
  if (t !== M) {
78
79
  M = t;
79
- for (const a of w) a();
80
+ for (const r of w) r();
80
81
  }
81
82
  }).observe(document.body, {
82
83
  attributes: !0,
83
84
  attributeFilter: ["class"]
84
85
  });
85
86
  }
86
- function ne(e) {
87
- return w.add(e), oe(), () => {
87
+ function le(e) {
88
+ return w.add(e), se(), () => {
88
89
  w.delete(e);
89
90
  };
90
91
  }
91
- function se() {
92
+ function ie() {
92
93
  return M;
93
94
  }
94
- function le() {
95
+ function ce() {
95
96
  return !1;
96
97
  }
97
98
  function E() {
98
99
  return u.useSyncExternalStore(
99
- ne,
100
- se,
101
- le
100
+ le,
101
+ ie,
102
+ ce
102
103
  );
103
104
  }
104
- function Te(e = "default") {
105
+ function je(e = "default") {
105
106
  const t = E();
106
- return ae[e][t ? "dark" : "light"];
107
+ return ne[e][t ? "dark" : "light"];
107
108
  }
108
109
  const R = {
109
110
  primary: "strong",
@@ -112,13 +113,13 @@ const R = {
112
113
  destructive: "unranked",
113
114
  outline: "unranked"
114
115
  };
115
- function ie(e) {
116
+ function de(e) {
116
117
  return e in R;
117
118
  }
118
- function ce(e) {
119
- return ie(e) ? R[e] : e;
119
+ function me(e) {
120
+ return de(e) ? R[e] : e;
120
121
  }
121
- const x = {
122
+ const v = {
122
123
  strong: {
123
124
  className: "bg-primary dark:bg-green-400",
124
125
  cssVar: "--ds-tailwind-colors-green-400",
@@ -145,9 +146,9 @@ const x = {
145
146
  fallback: "#fed7aa"
146
147
  }
147
148
  }, h = Object.fromEntries(
148
- Object.entries(x).map(([e, t]) => [e, t.className])
149
- ), de = K(
150
- "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-fast ease-out hover:shadow-md",
149
+ Object.entries(v).map(([e, t]) => [e, t.className])
150
+ ), ue = K(
151
+ "inline-flex items-center justify-center rounded-full text-label font-semibold text-foreground dark:text-neutral-900 border-2 border-white shadow-sm transition-shadow duration-fast ease-out hover:shadow-md",
151
152
  {
152
153
  variants: {
153
154
  variant: {
@@ -166,35 +167,35 @@ const x = {
166
167
  ({
167
168
  value: e,
168
169
  variant: t = "strong",
169
- loading: a = !1,
170
+ loading: r = !1,
170
171
  pulse: s,
171
172
  // eslint-disable-line @typescript-eslint/no-unused-vars -- absorbed from ...props to prevent DOM passthrough
172
173
  dataHook: n,
173
174
  className: o,
174
- trackingEl: r,
175
+ trackingEl: a,
175
176
  trackingLabel: i,
176
177
  style: l,
177
178
  ...d
178
- }, f) => {
179
- const m = ce(t);
179
+ }, p) => {
180
+ const m = me(t);
180
181
  return /* @__PURE__ */ c(
181
182
  "div",
182
183
  {
183
- ref: f,
184
+ ref: p,
184
185
  className: g(
185
- a ? "border-border bg-accent rounded-full border" : de({ variant: m }),
186
+ r ? "border-border bg-accent rounded-full border" : ue({ variant: m }),
186
187
  "size-8 p-0",
187
188
  o
188
189
  ),
189
190
  "data-hook": n,
190
191
  "data-slot": "map-grid-pin",
191
- "data-state": a ? "loading" : void 0,
192
- "data-tracking-el": r || "map-grid-pin",
192
+ "data-state": r ? "loading" : void 0,
193
+ "data-tracking-el": a || "map-grid-pin",
193
194
  "data-tracking-label": i,
194
195
  style: l,
195
196
  ...d,
196
- children: m === "error" && !a ? /* @__PURE__ */ c(
197
- W,
197
+ children: m === "error" && !r ? /* @__PURE__ */ c(
198
+ Y,
198
199
  {
199
200
  "aria-hidden": "true",
200
201
  className: "text-warning-foreground",
@@ -209,29 +210,29 @@ O.displayName = "MapGridPin";
209
210
  function j() {
210
211
  const t = {
211
212
  colors: Object.fromEntries(
212
- Object.entries(x).map(([s, n]) => [s, n.fallback])
213
+ Object.entries(v).map(([s, n]) => [s, n.fallback])
213
214
  ),
214
215
  fontFamily: "Inter, system-ui, sans-serif",
215
216
  textColor: "#111412"
216
217
  };
217
218
  if (typeof document > "u") return t;
218
- const a = getComputedStyle(document.documentElement);
219
+ const r = getComputedStyle(document.documentElement);
219
220
  return {
220
221
  colors: Object.fromEntries(
221
- Object.entries(x).map(([s, { cssVar: n, fallback: o }]) => [
222
+ Object.entries(v).map(([s, { cssVar: n, fallback: o }]) => [
222
223
  s,
223
- a.getPropertyValue(n).trim() || o
224
+ r.getPropertyValue(n).trim() || o
224
225
  ])
225
226
  ),
226
- fontFamily: a.getPropertyValue("--ds-font-font-sans").trim() || t.fontFamily,
227
- textColor: a.getPropertyValue("--ds-tailwind-colors-neutral-950").trim() || t.textColor
227
+ fontFamily: r.getPropertyValue("--ds-font-font-sans").trim() || t.fontFamily,
228
+ textColor: r.getPropertyValue("--ds-tailwind-colors-neutral-950").trim() || t.textColor
228
229
  };
229
230
  }
230
- function Ee() {
231
+ function Le() {
231
232
  return j().colors;
232
233
  }
233
- const Re = Object.fromEntries(
234
- Object.entries(x).map(([e, t]) => [e, t.fallback])
234
+ const Ae = Object.fromEntries(
235
+ Object.entries(v).map(([e, t]) => [e, t.fallback])
235
236
  ), N = [
236
237
  "strong",
237
238
  "moderate",
@@ -240,62 +241,62 @@ const Re = Object.fromEntries(
240
241
  "error"
241
242
  ];
242
243
  function L(e, t) {
243
- const { colors: a, fontFamily: s, textColor: n } = j(), o = 40, r = o / 2, i = 2, l = r - i, d = l * 0.55, m = [...e].sort(
244
- (p, b) => N.indexOf(p.variant) - N.indexOf(b.variant)
245
- ).filter((p) => p.count > 0), I = m.reduce((p, b) => p + b.count, 0) || 1, V = Math.max(Number(t) || 0, 1);
244
+ const { colors: r, fontFamily: s, textColor: n } = j(), o = 40, a = o / 2, i = 2, l = a - i, d = l * 0.55, m = [...e].sort(
245
+ (f, b) => N.indexOf(f.variant) - N.indexOf(b.variant)
246
+ ).filter((f) => f.count > 0), I = m.reduce((f, b) => f + b.count, 0) || 1, V = Math.max(Number(t) || 0, 1);
246
247
  let k;
247
248
  const C = m[0];
248
249
  if (m.length <= 1) {
249
- const p = C ? a[C.variant] : "#e5e7eb";
250
- k = `<circle cx="${r}" cy="${r}" r="${l}" fill="${p}"/>`;
250
+ const f = C ? r[C.variant] : "#e5e7eb";
251
+ k = `<circle cx="${a}" cy="${a}" r="${l}" fill="${f}"/>`;
251
252
  } else {
252
253
  k = "";
253
- let p = -Math.PI / 2;
254
+ let f = -Math.PI / 2;
254
255
  for (const b of m) {
255
- const P = b.count / I * Math.PI * 2, v = p + P, F = r + l * Math.cos(p), _ = r + l * Math.sin(p), z = r + l * Math.cos(v), B = r + l * Math.sin(v), G = P > Math.PI ? 1 : 0;
256
- k += `<path d="M${r},${r}L${F.toFixed(2)},${_.toFixed(2)}A${l},${l} 0 ${G} 1 ${z.toFixed(2)},${B.toFixed(2)}Z" fill="${a[b.variant]}"/>`, p = v;
256
+ const $ = b.count / I * Math.PI * 2, x = f + $, F = a + l * Math.cos(f), _ = a + l * Math.sin(f), z = a + l * Math.cos(x), B = a + l * Math.sin(x), G = $ > Math.PI ? 1 : 0;
257
+ k += `<path d="M${a},${a}L${F.toFixed(2)},${_.toFixed(2)}A${l},${l} 0 ${G} 1 ${z.toFixed(2)},${B.toFixed(2)}Z" fill="${r[b.variant]}"/>`, f = x;
257
258
  }
258
259
  }
259
260
  const D = Math.round(o * 0.3);
260
261
  return [
261
262
  `<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))">`,
262
- `<circle cx="${r}" cy="${r}" r="${r}" fill="white"/>`,
263
+ `<circle cx="${a}" cy="${a}" r="${a}" fill="white"/>`,
263
264
  k,
264
- `<circle cx="${r}" cy="${r}" r="${l}" fill="none" stroke="white" stroke-width="${i}"/>`,
265
- `<circle cx="${r}" cy="${r}" r="${d}" fill="white"/>`,
266
- `<text x="${r}" y="${r}" text-anchor="middle" dominant-baseline="central" font-family="${s}" font-size="${D}" font-weight="600" fill="${n}">${V}</text>`,
265
+ `<circle cx="${a}" cy="${a}" r="${l}" fill="none" stroke="white" stroke-width="${i}"/>`,
266
+ `<circle cx="${a}" cy="${a}" r="${d}" fill="white"/>`,
267
+ `<text x="${a}" y="${a}" text-anchor="middle" dominant-baseline="central" font-family="${s}" font-size="${D}" font-weight="600" fill="${n}">${V}</text>`,
267
268
  "</svg>"
268
269
  ].join("");
269
270
  }
270
- function Oe(e) {
271
+ function Ie(e) {
271
272
  if (typeof DOMParser > "u")
272
273
  throw new Error(
273
274
  "createClusterPinElement requires a browser environment (DOMParser). Use createClusterPinSvg for SSR."
274
275
  );
275
- const { markers: t, count: a, getVariant: s } = e, n = /* @__PURE__ */ new Map();
276
- for (const f of t) {
277
- const m = s(f);
276
+ const { markers: t, count: r, getVariant: s } = e, n = /* @__PURE__ */ new Map();
277
+ for (const p of t) {
278
+ const m = s(p);
278
279
  n.set(m, (n.get(m) ?? 0) + 1);
279
280
  }
280
281
  const o = [];
281
- for (const f of N) {
282
- const m = n.get(f);
283
- m && o.push({ variant: f, count: m });
282
+ for (const p of N) {
283
+ const m = n.get(p);
284
+ m && o.push({ variant: p, count: m });
284
285
  }
285
- const r = L(o, a), d = new DOMParser().parseFromString(r, "image/svg+xml").documentElement;
286
+ const a = L(o, r), d = new DOMParser().parseFromString(a, "image/svg+xml").documentElement;
286
287
  if (!(d instanceof SVGElement))
287
288
  throw new Error("createClusterPinElement: failed to parse SVG");
288
289
  return d;
289
290
  }
290
- const me = u.forwardRef(
291
+ const pe = u.forwardRef(
291
292
  ({
292
293
  segments: e,
293
294
  count: t,
294
- dataHook: a,
295
+ dataHook: r,
295
296
  className: s,
296
297
  trackingEl: n,
297
298
  trackingLabel: o,
298
- ...r
299
+ ...a
299
300
  }, i) => {
300
301
  const l = JSON.stringify(e), d = u.useMemo(
301
302
  () => L(e, t),
@@ -308,41 +309,41 @@ const me = u.forwardRef(
308
309
  dangerouslySetInnerHTML: { __html: d },
309
310
  ref: i,
310
311
  className: g("inline-flex items-center justify-center", s),
311
- "data-hook": a,
312
+ "data-hook": r,
312
313
  "data-slot": "map-cluster-pin",
313
314
  "data-tracking-el": n || "map-cluster-pin",
314
315
  "data-tracking-label": o,
315
- ...r
316
+ ...a
316
317
  }
317
318
  );
318
319
  }
319
320
  );
320
- me.displayName = "MapClusterPin";
321
- const ue = u.forwardRef(
321
+ pe.displayName = "MapClusterPin";
322
+ const fe = u.forwardRef(
322
323
  ({
323
324
  icon: e,
324
325
  animateIn: t = !1,
325
- value: a,
326
+ value: r,
326
327
  variant: s,
327
328
  pulse: n,
328
329
  dataHook: o,
329
- className: r,
330
+ className: a,
330
331
  trackingEl: i,
331
332
  trackingLabel: l,
332
333
  ariaLabel: d,
333
- ...f
334
- }, m) => a !== void 0 || s !== void 0 || n !== void 0 ? /* @__PURE__ */ c(
334
+ ...p
335
+ }, m) => r !== void 0 || s !== void 0 || n !== void 0 ? /* @__PURE__ */ c(
335
336
  O,
336
337
  {
337
338
  ref: m,
338
- className: r,
339
+ className: a,
339
340
  dataHook: o,
340
341
  pulse: n,
341
342
  trackingEl: i,
342
343
  trackingLabel: l,
343
- value: a ?? 1,
344
+ value: r ?? 1,
344
345
  variant: s,
345
- ...f
346
+ ...p
346
347
  }
347
348
  ) : /* @__PURE__ */ c(
348
349
  "div",
@@ -351,14 +352,14 @@ const ue = u.forwardRef(
351
352
  "aria-label": d ?? "Location",
352
353
  className: g(
353
354
  "relative inline-flex h-[46px] w-[38px] items-start justify-center",
354
- r
355
+ a
355
356
  ),
356
357
  "data-hook": o,
357
358
  "data-slot": "map-location-pin",
358
359
  "data-tracking-el": i || "map-location-pin",
359
360
  "data-tracking-label": l,
360
361
  role: "img",
361
- ...f,
362
+ ...p,
362
363
  children: /* @__PURE__ */ y(
363
364
  "span",
364
365
  {
@@ -387,23 +388,23 @@ const ue = u.forwardRef(
387
388
  ]
388
389
  }
389
390
  ),
390
- /* @__PURE__ */ c("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 ?? /* @__PURE__ */ c(Y, { size: 16 }) })
391
+ /* @__PURE__ */ c("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 ?? /* @__PURE__ */ c(Z, { size: 16 }) })
391
392
  ]
392
393
  }
393
394
  )
394
395
  }
395
396
  )
396
397
  );
397
- ue.displayName = "MapLocationPin";
398
- const fe = u.forwardRef(
398
+ fe.displayName = "MapLocationPin";
399
+ const ge = u.forwardRef(
399
400
  ({
400
401
  className: e,
401
402
  dataHook: t,
402
- trackingEl: a,
403
+ trackingEl: r,
403
404
  trackingLabel: s,
404
405
  children: n,
405
406
  iconOnly: o = !0,
406
- ...r
407
+ ...a
407
408
  }, i) => {
408
409
  const l = E();
409
410
  return /* @__PURE__ */ c(
@@ -414,25 +415,25 @@ const fe = u.forwardRef(
414
415
  "data-slot": "map-control-button",
415
416
  dataHook: t,
416
417
  iconOnly: o,
417
- trackingEl: a || "map-control-button",
418
+ trackingEl: r || "map-control-button",
418
419
  trackingLabel: s,
419
420
  variant: l ? "secondary" : "outline",
420
- ...r,
421
+ ...a,
421
422
  children: n
422
423
  }
423
424
  );
424
425
  }
425
426
  );
426
- fe.displayName = "MapControlButton";
427
- const pe = u.forwardRef(
427
+ ge.displayName = "MapControlButton";
428
+ const ye = u.forwardRef(
428
429
  ({
429
430
  className: e,
430
431
  children: t,
431
- dataHook: a,
432
+ dataHook: r,
432
433
  trackingEl: s,
433
434
  trackingLabel: n,
434
435
  ariaLabel: o,
435
- ...r
436
+ ...a
436
437
  }, i) => /* @__PURE__ */ y(
437
438
  "div",
438
439
  {
@@ -442,12 +443,12 @@ const pe = u.forwardRef(
442
443
  "border-border relative flex h-full w-full items-center justify-center overflow-hidden rounded-lg border",
443
444
  e
444
445
  ),
445
- "data-hook": a,
446
+ "data-hook": r,
446
447
  "data-slot": "map-loading-state",
447
448
  "data-tracking-el": s || "map-loading-state",
448
449
  "data-tracking-label": n,
449
450
  role: "status",
450
- ...r,
451
+ ...a,
451
452
  children: [
452
453
  /* @__PURE__ */ c(A, {}),
453
454
  t && /* @__PURE__ */ c("div", { className: "relative", children: t })
@@ -455,12 +456,12 @@ const pe = u.forwardRef(
455
456
  }
456
457
  )
457
458
  );
458
- pe.displayName = "MapLoadingState";
459
+ ye.displayName = "MapLoadingState";
459
460
  const A = u.memo(function({
460
461
  rounded: t
461
462
  }) {
462
463
  return /* @__PURE__ */ c(
463
- q,
464
+ H,
464
465
  {
465
466
  "aria-hidden": "true",
466
467
  className: g(
@@ -470,27 +471,27 @@ const A = u.memo(function({
470
471
  mode: "auto"
471
472
  }
472
473
  );
473
- }), ge = u.forwardRef(
474
+ }), be = u.forwardRef(
474
475
  ({
475
476
  className: e,
476
477
  title: t = "We couldn't load your map rankings.",
477
- message: a = "Reloading usually fixes it, and it won't use any credits",
478
+ message: r = "Reloading usually fixes it, and it won't use any credits",
478
479
  onRetry: s,
479
480
  retryLoading: n = !1,
480
481
  retryLabel: o = "Reload",
481
- dataHook: r,
482
+ dataHook: a,
482
483
  trackingEl: i,
483
484
  trackingLabel: l,
484
485
  ...d
485
- }, f) => /* @__PURE__ */ y(
486
+ }, p) => /* @__PURE__ */ y(
486
487
  "div",
487
488
  {
488
- ref: f,
489
+ ref: p,
489
490
  className: g(
490
491
  "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",
491
492
  e
492
493
  ),
493
- "data-hook": r,
494
+ "data-hook": a,
494
495
  "data-slot": "map-error-state",
495
496
  "data-tracking-el": i || "map-error-state",
496
497
  "data-tracking-label": l,
@@ -505,24 +506,24 @@ const A = u.memo(function({
505
506
  "aria-hidden": "true",
506
507
  className: "flex items-center justify-center",
507
508
  "data-slot": "map-error-illustration",
508
- children: /* @__PURE__ */ c(Z, { className: "h-auto w-full max-w-41" })
509
+ children: /* @__PURE__ */ c(q, { className: "h-auto w-full max-w-41" })
509
510
  }
510
511
  ),
511
512
  /* @__PURE__ */ y("div", { className: "flex flex-col gap-2", children: [
512
513
  /* @__PURE__ */ c(
513
514
  "h3",
514
515
  {
515
- className: "text-foreground text-lg font-medium",
516
+ className: "text-foreground text-heading-subsection",
516
517
  "data-slot": "map-error-title",
517
518
  children: t
518
519
  }
519
520
  ),
520
- a && /* @__PURE__ */ c(
521
+ r && /* @__PURE__ */ c(
521
522
  "p",
522
523
  {
523
- className: "text-muted-foreground text-sm",
524
+ className: "text-muted-foreground text-body-sm",
524
525
  "data-slot": "map-error-message",
525
- children: a
526
+ children: r
526
527
  }
527
528
  )
528
529
  ] }),
@@ -530,7 +531,7 @@ const A = u.memo(function({
530
531
  T,
531
532
  {
532
533
  className: "mt-1",
533
- dataHook: `${r}-retry`,
534
+ dataHook: `${a}-retry`,
534
535
  loading: n,
535
536
  size: "sm",
536
537
  variant: "primary",
@@ -546,19 +547,40 @@ const A = u.memo(function({
546
547
  }
547
548
  )
548
549
  );
549
- ge.displayName = "MapErrorState";
550
- const ye = u.forwardRef(
551
- ({ variant: e, color: t, dataHook: a, className: s, children: n, ...o }, r) => {
550
+ be.displayName = "MapErrorState";
551
+ const he = u.forwardRef(
552
+ ({ className: e, dataHook: t, icon: r, message: s, trackingEl: n, trackingLabel: o, ...a }, i) => (
553
+ /* `h-full w-full`, matching MapLoadingState: a map is always given its box
554
+ by the consumer, and this fills it so nothing reflows when runs arrive. */
555
+ /* @__PURE__ */ c(
556
+ ae,
557
+ {
558
+ ref: i,
559
+ className: g("h-full w-full rounded-lg", e),
560
+ dataHook: t,
561
+ icon: r ?? /* @__PURE__ */ c(W, { strokeWidth: 2 }),
562
+ message: s ?? "No data yet",
563
+ slot: "map-empty",
564
+ trackingEl: n,
565
+ trackingLabel: o,
566
+ ...a
567
+ }
568
+ )
569
+ )
570
+ );
571
+ he.displayName = "MapEmpty";
572
+ const ke = u.forwardRef(
573
+ ({ variant: e, color: t, dataHook: r, className: s, children: n, ...o }, a) => {
552
574
  const i = e ? h[e] : t;
553
575
  return /* @__PURE__ */ y(
554
576
  "span",
555
577
  {
556
- ref: r,
578
+ ref: a,
557
579
  className: g(
558
- "text-foreground flex items-center gap-1 font-sans text-xs",
580
+ "text-foreground text-body-xs flex items-center gap-1",
559
581
  s
560
582
  ),
561
- "data-hook": a,
583
+ "data-hook": r,
562
584
  "data-slot": "map-legend-item",
563
585
  ...o,
564
586
  children: [
@@ -575,18 +597,18 @@ const ye = u.forwardRef(
575
597
  );
576
598
  }
577
599
  );
578
- ye.displayName = "MapLegendItem";
579
- const be = u.forwardRef(
600
+ ke.displayName = "MapLegendItem";
601
+ const ve = u.forwardRef(
580
602
  ({
581
603
  className: e,
582
604
  dataHook: t,
583
- trackingEl: a,
605
+ trackingEl: r,
584
606
  trackingLabel: s,
585
607
  ariaLabel: n,
586
608
  children: o,
587
- ...r
609
+ ...a
588
610
  }, i) => /* @__PURE__ */ c(
589
- H,
611
+ J,
590
612
  {
591
613
  ref: i,
592
614
  "aria-label": n ?? "Map legend",
@@ -598,52 +620,52 @@ const be = u.forwardRef(
598
620
  dataHook: t,
599
621
  density: "condensed",
600
622
  role: "group",
601
- trackingEl: a || "map-legend",
623
+ trackingEl: r || "map-legend",
602
624
  trackingLabel: s,
603
625
  variant: "border",
604
- ...r,
605
- children: /* @__PURE__ */ c(J, { className: "flex items-center gap-3", children: o })
626
+ ...a,
627
+ children: /* @__PURE__ */ c(Q, { className: "flex items-center gap-3", children: o })
606
628
  }
607
629
  )
608
630
  );
609
- be.displayName = "MapLegend";
610
- function je(e) {
611
- const { hoverWhenOpen: t = !1 } = e ?? {}, [a, s] = u.useState(null), [n, o] = u.useState(null), r = u.useCallback((d) => {
631
+ ve.displayName = "MapLegend";
632
+ function Ve(e) {
633
+ const { hoverWhenOpen: t = !1 } = e ?? {}, [r, s] = u.useState(null), [n, o] = u.useState(null), a = u.useCallback((d) => {
612
634
  o(d), s(d);
613
635
  }, []), i = u.useCallback(() => {
614
636
  s(null);
615
637
  }, []), l = u.useCallback(
616
638
  (d) => {
617
- const f = {
618
- onClick: () => r(d)
639
+ const p = {
640
+ onClick: () => a(d)
619
641
  };
620
- return t && (f.onPointerEnter = (m) => {
621
- m.pointerType === "mouse" && a != null && r(d);
622
- }), f;
642
+ return t && (p.onPointerEnter = (m) => {
643
+ m.pointerType === "mouse" && r != null && a(d);
644
+ }), p;
623
645
  },
624
- [t, r, a]
646
+ [t, a, r]
625
647
  );
626
648
  return {
627
- activeItem: a,
649
+ activeItem: r,
628
650
  anchorItem: n,
629
- showItem: r,
651
+ showItem: a,
630
652
  close: i,
631
653
  getInteractionProps: l
632
654
  };
633
655
  }
634
- const Le = Q, he = X;
635
- he.displayName = "MapPopoverAnchor";
636
- const ke = u.forwardRef(
656
+ const De = X, xe = ee;
657
+ xe.displayName = "MapPopoverAnchor";
658
+ const we = u.forwardRef(
637
659
  ({
638
660
  className: e,
639
661
  side: t = "top",
640
- sideOffset: a = 4,
662
+ sideOffset: r = 4,
641
663
  dataHook: s,
642
664
  trackingEl: n,
643
665
  trackingLabel: o,
644
- ...r
666
+ ...a
645
667
  }, i) => /* @__PURE__ */ c(
646
- ee,
668
+ te,
647
669
  {
648
670
  ref: i,
649
671
  className: g(
@@ -655,33 +677,34 @@ const ke = u.forwardRef(
655
677
  "data-tracking-label": o,
656
678
  dataHook: s,
657
679
  side: t,
658
- sideOffset: a,
680
+ sideOffset: r,
659
681
  onCloseAutoFocus: (l) => l.preventDefault(),
660
682
  onOpenAutoFocus: (l) => l.preventDefault(),
661
- ...r
683
+ ...a
662
684
  }
663
685
  )
664
686
  );
665
- ke.displayName = "MapPopoverContent";
687
+ we.displayName = "MapPopoverContent";
666
688
  export {
667
- ae as MAP_STYLES,
668
- me as MapClusterPin,
669
- fe as MapControlButton,
670
- ge as MapErrorState,
689
+ ne as MAP_STYLES,
690
+ pe as MapClusterPin,
691
+ ge as MapControlButton,
692
+ he as MapEmpty,
693
+ be as MapErrorState,
671
694
  O as MapGridPin,
672
- be as MapLegend,
673
- ye as MapLegendItem,
674
- pe as MapLoadingState,
675
- ue as MapLocationPin,
676
- Le as MapPopover,
677
- he as MapPopoverAnchor,
678
- ke as MapPopoverContent,
679
- Se as MapTypeId,
680
- Re as clusterPinHexColors,
681
- Oe as createClusterPinElement,
695
+ ve as MapLegend,
696
+ ke as MapLegendItem,
697
+ ye as MapLoadingState,
698
+ fe as MapLocationPin,
699
+ De as MapPopover,
700
+ xe as MapPopoverAnchor,
701
+ we as MapPopoverContent,
702
+ Oe as MapTypeId,
703
+ Ae as clusterPinHexColors,
704
+ Ie as createClusterPinElement,
682
705
  L as createClusterPinSvg,
683
706
  h as mapGridPinColorMap,
684
- Ee as resolveClusterPinColors,
685
- je as useMapPopoverClick,
686
- Te as useMapStyles
707
+ Le as resolveClusterPinColors,
708
+ Ve as useMapPopoverClick,
709
+ je as useMapStyles
687
710
  };