@brightlocal/ui-components 2.27.0 → 3.1.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 (289) hide show
  1. package/README.md +7 -1
  2. package/component-meta.json +568 -143
  3. package/deprecations.json +298 -1
  4. package/dist/accordion.cjs +1 -1
  5. package/dist/accordion.d.ts +36 -0
  6. package/dist/accordion.d.ts.map +1 -1
  7. package/dist/accordion.js +74 -61
  8. package/dist/alert-dialog.cjs +1 -1
  9. package/dist/alert-dialog.js +18 -18
  10. package/dist/alert.cjs +1 -1
  11. package/dist/alert.d.ts +11 -1
  12. package/dist/alert.d.ts.map +1 -1
  13. package/dist/alert.js +31 -28
  14. package/dist/avatar.cjs +1 -1
  15. package/dist/avatar.js +4 -4
  16. package/dist/badge.cjs +1 -1
  17. package/dist/badge.d.ts.map +1 -1
  18. package/dist/badge.js +15 -11
  19. package/dist/blocks/empty-state.cjs +1 -0
  20. package/dist/blocks/empty-state.d.ts +172 -0
  21. package/dist/blocks/empty-state.d.ts.map +1 -0
  22. package/dist/blocks/empty-state.js +147 -0
  23. package/dist/blocks/input-list.cjs +2 -2
  24. package/dist/blocks/input-list.d.ts.map +1 -1
  25. package/dist/blocks/input-list.js +124 -108
  26. package/dist/blocks/progress-state.cjs +1 -0
  27. package/dist/blocks/{progress-screen.d.ts → progress-state.d.ts} +30 -18
  28. package/dist/blocks/progress-state.d.ts.map +1 -0
  29. package/dist/blocks/{progress-screen.js → progress-state.js} +100 -71
  30. package/dist/blocks/sidebar.cjs +1 -1
  31. package/dist/blocks/sidebar.d.ts.map +1 -1
  32. package/dist/blocks/sidebar.js +160 -161
  33. package/dist/breadcrumb.cjs +1 -1
  34. package/dist/breadcrumb.js +1 -1
  35. package/dist/button-group.cjs +1 -0
  36. package/dist/button-group.d.ts +36 -0
  37. package/dist/button-group.d.ts.map +1 -0
  38. package/dist/button-group.js +47 -0
  39. package/dist/button.cjs +1 -1
  40. package/dist/button.js +12 -12
  41. package/dist/calendar.cjs +1 -1
  42. package/dist/calendar.d.ts.map +1 -1
  43. package/dist/calendar.js +37 -38
  44. package/dist/callout.cjs +1 -1
  45. package/dist/callout.d.ts +24 -2
  46. package/dist/callout.d.ts.map +1 -1
  47. package/dist/callout.js +57 -55
  48. package/dist/card.cjs +1 -1
  49. package/dist/card.d.ts +42 -3
  50. package/dist/card.d.ts.map +1 -1
  51. package/dist/card.js +102 -91
  52. package/dist/chart-empty.cjs +1 -0
  53. package/dist/chart-empty.d.ts +59 -0
  54. package/dist/chart-empty.d.ts.map +1 -0
  55. package/dist/chart-empty.js +29 -0
  56. package/dist/chart.cjs +6 -6
  57. package/dist/chart.d.ts +46 -13
  58. package/dist/chart.d.ts.map +1 -1
  59. package/dist/chart.js +172 -157
  60. package/dist/chip.cjs +1 -1
  61. package/dist/chip.d.ts +38 -4
  62. package/dist/chip.d.ts.map +1 -1
  63. package/dist/chip.js +100 -84
  64. package/dist/combobox.cjs +2 -2
  65. package/dist/combobox.d.ts.map +1 -1
  66. package/dist/combobox.js +81 -79
  67. package/dist/command.cjs +1 -1
  68. package/dist/command.d.ts +23 -1
  69. package/dist/command.d.ts.map +1 -1
  70. package/dist/command.js +248 -225
  71. package/dist/context-menu.cjs +1 -1
  72. package/dist/context-menu.d.ts.map +1 -1
  73. package/dist/context-menu.js +26 -29
  74. package/dist/data-table.cjs +1 -1
  75. package/dist/data-table.d.ts +75 -10
  76. package/dist/data-table.d.ts.map +1 -1
  77. package/dist/data-table.js +346 -334
  78. package/dist/date-picker.cjs +1 -1
  79. package/dist/date-picker.d.ts +13 -5
  80. package/dist/date-picker.d.ts.map +1 -1
  81. package/dist/date-picker.js +54 -53
  82. package/dist/description.cjs +1 -1
  83. package/dist/description.js +5 -5
  84. package/dist/dialog.cjs +1 -1
  85. package/dist/dialog.js +20 -20
  86. package/dist/drawer.cjs +1 -1
  87. package/dist/drawer.d.ts.map +1 -1
  88. package/dist/drawer.js +8 -11
  89. package/dist/dropdown-menu.cjs +1 -1
  90. package/dist/dropdown-menu.d.ts.map +1 -1
  91. package/dist/dropdown-menu.js +17 -20
  92. package/dist/field.cjs +1 -1
  93. package/dist/field.d.ts +8 -1
  94. package/dist/field.d.ts.map +1 -1
  95. package/dist/field.js +96 -65
  96. package/dist/global-layout.cjs +1 -1
  97. package/dist/global-layout.d.ts +130 -12
  98. package/dist/global-layout.d.ts.map +1 -1
  99. package/dist/global-layout.js +146 -127
  100. package/dist/grid.cjs +1 -0
  101. package/dist/grid.d.ts +56 -0
  102. package/dist/grid.d.ts.map +1 -0
  103. package/dist/grid.js +32 -0
  104. package/dist/header.d.ts +13 -0
  105. package/dist/header.d.ts.map +1 -1
  106. package/dist/hooks/use-delayed-pending.cjs +1 -0
  107. package/dist/hooks/use-delayed-pending.d.ts +34 -0
  108. package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
  109. package/dist/hooks/use-delayed-pending.js +17 -0
  110. package/dist/hooks/use-mobile.cjs +1 -0
  111. package/dist/hooks/use-mobile.js +8 -0
  112. package/dist/hover-card.cjs +1 -1
  113. package/dist/hover-card.js +13 -13
  114. package/dist/index.cjs +1 -1
  115. package/dist/index.d.ts +9 -1
  116. package/dist/index.d.ts.map +1 -1
  117. package/dist/index.js +554 -527
  118. package/dist/input-chip.cjs +1 -1
  119. package/dist/input-chip.js +25 -25
  120. package/dist/input-group.cjs +1 -1
  121. package/dist/input-group.js +9 -9
  122. package/dist/input-otp.cjs +1 -1
  123. package/dist/input-otp.js +9 -9
  124. package/dist/input-password.cjs +1 -1
  125. package/dist/input-password.d.ts +17 -9
  126. package/dist/input-password.d.ts.map +1 -1
  127. package/dist/input-password.js +73 -72
  128. package/dist/input.cjs +1 -1
  129. package/dist/input.js +9 -9
  130. package/dist/label.cjs +1 -1
  131. package/dist/label.d.ts.map +1 -1
  132. package/dist/label.js +25 -28
  133. package/dist/lib/block-illustration.cjs +1 -0
  134. package/dist/lib/block-illustration.d.ts +28 -0
  135. package/dist/lib/block-illustration.d.ts.map +1 -0
  136. package/dist/lib/block-illustration.js +21 -0
  137. package/dist/lib/empty-canvas.cjs +1 -0
  138. package/dist/lib/empty-canvas.d.ts +27 -0
  139. package/dist/lib/empty-canvas.d.ts.map +1 -0
  140. package/dist/lib/empty-canvas.js +62 -0
  141. package/dist/lib/empty-chip.cjs +1 -0
  142. package/dist/lib/empty-chip.d.ts +4 -0
  143. package/dist/lib/empty-chip.d.ts.map +1 -0
  144. package/dist/lib/empty-chip.js +13 -0
  145. package/dist/lib/optical-center.cjs +1 -0
  146. package/dist/lib/optical-center.d.ts +12 -0
  147. package/dist/lib/optical-center.d.ts.map +1 -0
  148. package/dist/lib/optical-center.js +11 -0
  149. package/dist/lib/utils.cjs +1 -1
  150. package/dist/lib/utils.d.ts.map +1 -1
  151. package/dist/lib/utils.js +28 -5
  152. package/dist/list.cjs +1 -1
  153. package/dist/list.d.ts.map +1 -1
  154. package/dist/list.js +62 -58
  155. package/dist/map.cjs +1 -1
  156. package/dist/map.d.ts +60 -2
  157. package/dist/map.d.ts.map +1 -1
  158. package/dist/map.js +187 -164
  159. package/dist/media-empty.cjs +1 -0
  160. package/dist/media-empty.d.ts +72 -0
  161. package/dist/media-empty.d.ts.map +1 -0
  162. package/dist/media-empty.js +45 -0
  163. package/dist/menubar.cjs +1 -1
  164. package/dist/menubar.d.ts.map +1 -1
  165. package/dist/menubar.js +17 -20
  166. package/dist/navigation-menu.cjs +1 -1
  167. package/dist/navigation-menu.js +7 -7
  168. package/dist/pagination.cjs +1 -1
  169. package/dist/pagination.d.ts +130 -1
  170. package/dist/pagination.d.ts.map +1 -1
  171. package/dist/pagination.js +193 -102
  172. package/dist/progress.cjs +1 -1
  173. package/dist/progress.d.ts +2 -26
  174. package/dist/progress.d.ts.map +1 -1
  175. package/dist/progress.js +79 -118
  176. package/dist/scroll-area.cjs +1 -1
  177. package/dist/scroll-area.d.ts +15 -6
  178. package/dist/scroll-area.d.ts.map +1 -1
  179. package/dist/scroll-area.js +38 -36
  180. package/dist/select.cjs +2 -2
  181. package/dist/select.d.ts +13 -2
  182. package/dist/select.d.ts.map +1 -1
  183. package/dist/select.js +92 -87
  184. package/dist/separator.cjs +1 -1
  185. package/dist/separator.js +8 -8
  186. package/dist/sheet.cjs +1 -1
  187. package/dist/sheet.js +2 -2
  188. package/dist/skeleton.cjs +1 -1
  189. package/dist/skeleton.d.ts +38 -3
  190. package/dist/skeleton.d.ts.map +1 -1
  191. package/dist/skeleton.js +43 -20
  192. package/dist/sonner.cjs +1 -1
  193. package/dist/sonner.js +26 -26
  194. package/dist/stepper.cjs +1 -1
  195. package/dist/stepper.js +40 -40
  196. package/dist/table.cjs +1 -1
  197. package/dist/table.d.ts.map +1 -1
  198. package/dist/table.js +31 -28
  199. package/dist/tabs.cjs +1 -1
  200. package/dist/tabs.js +1 -1
  201. package/dist/text-reveal-motion.d.ts +10 -0
  202. package/dist/text-reveal-motion.d.ts.map +1 -1
  203. package/dist/textarea.cjs +1 -1
  204. package/dist/textarea.js +11 -11
  205. package/dist/toggle.cjs +1 -1
  206. package/dist/toggle.js +8 -8
  207. package/dist/tooltip.cjs +1 -1
  208. package/dist/tooltip.js +8 -8
  209. package/dist/typography-heading.cjs +1 -0
  210. package/dist/typography-heading.d.ts +129 -0
  211. package/dist/typography-heading.d.ts.map +1 -0
  212. package/dist/typography-heading.js +95 -0
  213. package/dist/typography-text.cjs +1 -0
  214. package/dist/typography-text.d.ts +127 -0
  215. package/dist/typography-text.d.ts.map +1 -0
  216. package/dist/typography-text.js +92 -0
  217. package/dist/typography.d.ts +13 -0
  218. package/dist/typography.d.ts.map +1 -1
  219. package/package.json +35 -7
  220. package/src/blocks/empty-state.tsx +412 -0
  221. package/src/blocks/input-list.tsx +66 -36
  222. package/src/blocks/{progress-screen.tsx → progress-state.tsx} +154 -93
  223. package/src/blocks/sidebar.tsx +25 -26
  224. package/src/components/accordion.tsx +82 -27
  225. package/src/components/alert-dialog.tsx +2 -2
  226. package/src/components/alert.tsx +27 -13
  227. package/src/components/avatar.tsx +1 -1
  228. package/src/components/badge.tsx +8 -4
  229. package/src/components/breadcrumb.tsx +1 -1
  230. package/src/components/button-group.tsx +112 -0
  231. package/src/components/button.tsx +4 -4
  232. package/src/components/calendar.tsx +5 -6
  233. package/src/components/callout.tsx +48 -15
  234. package/src/components/card.tsx +89 -19
  235. package/src/components/chart-empty.tsx +116 -0
  236. package/src/components/chart.tsx +103 -32
  237. package/src/components/chip.tsx +88 -13
  238. package/src/components/combobox.tsx +12 -10
  239. package/src/components/command.tsx +64 -13
  240. package/src/components/context-menu.tsx +6 -9
  241. package/src/components/data-table.tsx +135 -20
  242. package/src/components/date-picker.tsx +18 -7
  243. package/src/components/description.tsx +1 -1
  244. package/src/components/dialog.tsx +2 -2
  245. package/src/components/drawer.tsx +2 -5
  246. package/src/components/dropdown-menu.tsx +8 -11
  247. package/src/components/field.tsx +89 -16
  248. package/src/components/global-layout.tsx +210 -39
  249. package/src/components/grid.tsx +130 -0
  250. package/src/components/header.tsx +13 -0
  251. package/src/components/hover-card.tsx +1 -1
  252. package/src/components/input-chip.tsx +1 -1
  253. package/src/components/input-group.tsx +1 -1
  254. package/src/components/input-otp.tsx +1 -1
  255. package/src/components/input-password.tsx +24 -12
  256. package/src/components/input.tsx +1 -1
  257. package/src/components/label.tsx +10 -13
  258. package/src/components/list.tsx +13 -9
  259. package/src/components/map.tsx +101 -5
  260. package/src/components/media-empty.tsx +156 -0
  261. package/src/components/menubar.tsx +7 -10
  262. package/src/components/navigation-menu.tsx +1 -1
  263. package/src/components/pagination.tsx +286 -1
  264. package/src/components/progress.tsx +35 -113
  265. package/src/components/scroll-area.tsx +23 -10
  266. package/src/components/select.tsx +35 -10
  267. package/src/components/separator.tsx +1 -1
  268. package/src/components/sheet.tsx +2 -2
  269. package/src/components/skeleton.tsx +78 -7
  270. package/src/components/sonner.tsx +2 -2
  271. package/src/components/stepper.tsx +3 -3
  272. package/src/components/table.tsx +6 -3
  273. package/src/components/tabs.tsx +1 -1
  274. package/src/components/text-reveal-motion.tsx +10 -0
  275. package/src/components/textarea.tsx +1 -1
  276. package/src/components/toggle.tsx +1 -1
  277. package/src/components/tooltip.tsx +1 -1
  278. package/src/components/typography-heading.tsx +253 -0
  279. package/src/components/typography-text.tsx +250 -0
  280. package/src/components/typography.tsx +13 -0
  281. package/src/hooks/use-delayed-pending.ts +60 -0
  282. package/src/index.ts +11 -1
  283. package/src/lib/block-illustration.tsx +88 -0
  284. package/src/lib/empty-canvas.tsx +128 -0
  285. package/src/lib/empty-chip.ts +24 -0
  286. package/src/lib/optical-center.tsx +45 -0
  287. package/src/lib/utils.ts +26 -0
  288. package/dist/blocks/progress-screen.cjs +0 -1
  289. package/dist/blocks/progress-screen.d.ts.map +0 -1
@@ -19,8 +19,8 @@ type ProgressColor = "green" | "red" | "orange" | "yellow";
19
19
 
20
20
  /**
21
21
  * Text size of the label and value.
22
- * - `sm` — 14px (`text-sm`), the default for metric rows in cards
23
- * - `md` — 16px (`text-base`) for roomier layouts
22
+ * - `sm` — 14px (`text-body-sm`), the default for metric rows in cards
23
+ * - `md` — 16px (`text-body`) for roomier layouts
24
24
  */
25
25
  type ProgressSize = "sm" | "md";
26
26
 
@@ -30,8 +30,8 @@ type ProgressSize = "sm" | "md";
30
30
  * Bar heights are the `h-2` / `h-3` tokens the Figma component binds too.
31
31
  */
32
32
  const SIZE_STYLES: Record<ProgressSize, { text: string; bar: string }> = {
33
- sm: { text: "text-sm", bar: "h-2" },
34
- md: { text: "text-base", bar: "h-3" },
33
+ sm: { text: "text-body-sm", bar: "h-2" },
34
+ md: { text: "text-body", bar: "h-3" },
35
35
  };
36
36
 
37
37
  /**
@@ -172,30 +172,6 @@ interface ProgressProps extends React.ComponentProps<
172
172
  * Use this to customize the color, e.g., "bg-chart-red"
173
173
  */
174
174
  indicatorClassName?: string;
175
- /**
176
- * A line describing what the run is doing right now — the step, not the
177
- * number. Renders on its own line above the bar's row, so `label` stays on
178
- * the left and the value on the right. It takes the row's `size`, so it reads
179
- * as a peer of the value rather than a second scale.
180
- *
181
- * It is a polite live region, and it never becomes the bar's accessible name
182
- * (`ariaLabel` still owns that) — which is what makes it the right slot for a
183
- * status that moves, where `label` is not.
184
- * @example "Scanning search results across your area"
185
- */
186
- statusDescription?: React.ReactNode;
187
- /**
188
- * Runs the bar as an indeterminate sweep: a short pill travelling the track
189
- * for "running, and we cannot say how far". Use when work is genuinely
190
- * underway but the backend reports no percentage — never as a stand-in for a
191
- * number you could have fetched.
192
- *
193
- * `value` is ignored while this is set, the numeric readout is suppressed
194
- * (there is nothing to report), and the bar drops `aria-valuenow` so assistive
195
- * technology announces it as indeterminate rather than as 0%.
196
- * @default false
197
- */
198
- indeterminate?: boolean;
199
175
  /**
200
176
  * Whether the progress is in a disabled state
201
177
  * When disabled, the component renders with 50% opacity
@@ -233,8 +209,6 @@ const Progress = React.forwardRef<
233
209
  showValue = false,
234
210
  unit = "%",
235
211
  indicatorClassName,
236
- statusDescription,
237
- indeterminate = false,
238
212
  disabled,
239
213
  ...props
240
214
  },
@@ -247,18 +221,11 @@ const Progress = React.forwardRef<
247
221
  const colorStyles = COLOR_STYLES[color] ?? COLOR_STYLES.green;
248
222
  const sizeStyles = SIZE_STYLES[size] ?? SIZE_STYLES.sm;
249
223
  const labelHugs = labelWidth === "auto";
250
- /* An indeterminate bar has no number to report, so the readout is dropped
251
- rather than left showing the `–` fallback. */
252
- const showsValue = showValue && !indeterminate;
253
- const hasStatus =
254
- statusDescription !== null &&
255
- statusDescription !== undefined &&
256
- statusDescription !== false;
257
224
  /* The bar only gets flex sizing when the row wrapper actually wraps it.
258
- Standalone — no label, no value, which `indeterminate` makes common —
259
- `flex-1` would grow it along a column parent's main axis and override the
260
- size's height, rendering an 8px bar at whatever the row is tall. */
261
- const inRow = hasVisibleLabel || showsValue;
225
+ Standalone — no label and no value — `flex-1` would grow it along a
226
+ column parent's main axis and override the size's height, rendering an
227
+ 8px bar at whatever the row is tall. */
228
+ const inRow = hasVisibleLabel || showValue;
262
229
  const percentage =
263
230
  max > 0 ? Math.min(100, Math.max(0, ((value ?? 0) / max) * 100)) : 0;
264
231
 
@@ -274,7 +241,7 @@ const Progress = React.forwardRef<
274
241
  inRow && "min-w-0 flex-1",
275
242
  sizeStyles.bar,
276
243
  colorStyles.track,
277
- !hasVisibleLabel && !showsValue && disabled && "opacity-50",
244
+ !hasVisibleLabel && !showValue && disabled && "opacity-50",
278
245
  className
279
246
  )}
280
247
  data-hook={dataHook}
@@ -282,65 +249,42 @@ const Progress = React.forwardRef<
282
249
  data-tracking-el={trackingEl}
283
250
  data-tracking-label={trackingLabel}
284
251
  max={max}
285
- /* null makes Radix mark the bar indeterminate and omit aria-valuenow,
286
- so `indeterminate` is the only route to it. A value-less bar is a
287
- placeholder row — it keeps the layout and shows "–" — and must stay
288
- determinate, or it would be announced as indeterminate while
289
- rendering an empty track with no sweep. */
290
- value={indeterminate ? null : (value ?? 0)}
252
+ /* Always a number, never null: null is how Radix marks a bar
253
+ indeterminate and drops aria-valuenow, and this bar is always
254
+ measuring something. A value-less bar is a placeholder row — it
255
+ keeps the layout and shows "–" — so it stays determinate rather
256
+ than being announced as indeterminate over an empty track. */
257
+ value={value ?? 0}
291
258
  {...props}
292
259
  >
293
- {indeterminate ? (
294
- /* A short pill travelling the track. Under reduced motion it rests
295
- mid-track instead: the global CSS reset would freeze the sweep on
296
- its last frame, which is off-screen, leaving an empty bar. */
297
- <ProgressPrimitive.Indicator asChild>
298
- <div
299
- className={cn(
300
- "h-full w-2/5 rounded-full",
301
- colorStyles.indicator,
302
- prefersReducedMotion
303
- ? "translate-x-[75%]"
304
- : "animate-ambient-sweep",
305
- indicatorClassName
306
- )}
307
- data-slot="progress-indicator"
308
- />
309
- </ProgressPrimitive.Indicator>
310
- ) : (
311
- <ProgressPrimitive.Indicator asChild>
312
- <motion.div
313
- animate={{
314
- transform: `translateX(-${100 - percentage}%)`,
315
- }}
316
- className={cn(
317
- "h-full w-full flex-1",
318
- colorStyles.indicator,
319
- indicatorClassName
320
- )}
321
- data-slot="progress-indicator"
322
- initial={false}
323
- transition={
324
- prefersReducedMotion ? { duration: 0 } : SPRING_GENTLE
325
- }
326
- />
327
- </ProgressPrimitive.Indicator>
328
- )}
260
+ <ProgressPrimitive.Indicator asChild>
261
+ <motion.div
262
+ animate={{
263
+ transform: `translateX(-${100 - percentage}%)`,
264
+ }}
265
+ className={cn(
266
+ "h-full w-full flex-1",
267
+ colorStyles.indicator,
268
+ indicatorClassName
269
+ )}
270
+ data-slot="progress-indicator"
271
+ initial={false}
272
+ transition={prefersReducedMotion ? { duration: 0 } : SPRING_GENTLE}
273
+ />
274
+ </ProgressPrimitive.Indicator>
329
275
  </ProgressPrimitive.Root>
330
276
  );
331
277
 
332
- if (!hasVisibleLabel && !showsValue && !hasStatus) {
278
+ if (!hasVisibleLabel && !showValue) {
333
279
  return progressBar;
334
280
  }
335
281
 
336
- /* The bar's own row is unchanged whether or not there is a status: label on
337
- the left, value on the right. The value stays put — it belongs to the bar,
338
- and moving it would make one prop change where a number lives. */
282
+ /* The bar's row: label on the left, bar in the middle, value on the right. */
339
283
  const inlineRow = (
340
284
  <div
341
285
  className={cn(
342
286
  "flex w-full items-center gap-2",
343
- !hasStatus && disabled && "opacity-50"
287
+ disabled && "opacity-50"
344
288
  )}
345
289
  data-slot="progress-wrapper"
346
290
  >
@@ -350,7 +294,7 @@ const Progress = React.forwardRef<
350
294
  // (`break-words` also splits a single overlong word) instead of
351
295
  // pushing the bar around.
352
296
  className={cn(
353
- "text-foreground shrink-0 font-medium break-words",
297
+ "text-foreground shrink-0 break-words",
354
298
  // `auto`: hug the text but never take more than 40% of the row,
355
299
  // so an overlong label still wraps instead of squeezing the bar.
356
300
  labelHugs && "max-w-2/5",
@@ -365,7 +309,7 @@ const Progress = React.forwardRef<
365
309
  </span>
366
310
  )}
367
311
  {progressBar}
368
- {showsValue && (
312
+ {showValue && (
369
313
  <span
370
314
  className={cn(
371
315
  "text-muted-foreground grid min-w-10 shrink-0 text-right tabular-nums",
@@ -398,28 +342,6 @@ const Progress = React.forwardRef<
398
342
  </div>
399
343
  );
400
344
 
401
- /* A status sits on its own line above that row. Keeping it out of the row is
402
- the point — inline it would shrink the bar and take over the bar's
403
- accessible name, which is what `label` does. It takes the row's size, so
404
- the status and the value read as one band rather than two scales. */
405
- if (hasStatus) {
406
- return (
407
- <div
408
- className={cn("flex w-full flex-col gap-2", disabled && "opacity-50")}
409
- data-slot="progress-status-wrapper"
410
- >
411
- <span
412
- aria-live="polite"
413
- className={cn("text-muted-foreground", sizeStyles.text)}
414
- data-slot="progress-status"
415
- >
416
- {statusDescription}
417
- </span>
418
- {inlineRow}
419
- </div>
420
- );
421
- }
422
-
423
345
  return inlineRow;
424
346
  }
425
347
  );
@@ -66,8 +66,10 @@ const ScrollArea = React.forwardRef<
66
66
  >
67
67
  {children}
68
68
  </ScrollAreaPrimitive.Viewport>
69
- <ScrollBar />
70
- {scrollOrientation === "both" && <ScrollBar orientation="horizontal" />}
69
+ <ScrollAreaScrollbar />
70
+ {scrollOrientation === "both" && (
71
+ <ScrollAreaScrollbar orientation="horizontal" />
72
+ )}
71
73
  <ScrollAreaPrimitive.Corner />
72
74
  </ScrollAreaPrimitive.Root>
73
75
  );
@@ -77,9 +79,9 @@ const ScrollArea = React.forwardRef<
77
79
  ScrollArea.displayName = "ScrollArea";
78
80
 
79
81
  /**
80
- * Props for the ScrollBar component.
82
+ * Props for the ScrollAreaScrollbar component.
81
83
  */
82
- interface ScrollBarProps extends React.ComponentProps<
84
+ interface ScrollAreaScrollbarProps extends React.ComponentProps<
83
85
  typeof ScrollAreaPrimitive.ScrollAreaScrollbar
84
86
  > {
85
87
  /**
@@ -102,11 +104,11 @@ interface ScrollBarProps extends React.ComponentProps<
102
104
  }
103
105
 
104
106
  /**
105
- * ScrollBar provides a styled scrollbar for ScrollArea.
107
+ * ScrollAreaScrollbar provides a styled scrollbar for ScrollArea.
106
108
  */
107
- const ScrollBar = React.forwardRef<
109
+ const ScrollAreaScrollbar = React.forwardRef<
108
110
  React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
109
- ScrollBarProps
111
+ ScrollAreaScrollbarProps
110
112
  >(
111
113
  (
112
114
  {
@@ -146,8 +148,19 @@ const ScrollBar = React.forwardRef<
146
148
  }
147
149
  );
148
150
 
149
- ScrollBar.displayName = "ScrollBar";
151
+ ScrollAreaScrollbar.displayName = "ScrollAreaScrollbar";
152
+
153
+ /**
154
+ * @deprecated Use `ScrollAreaScrollbar` instead — family parts carry the
155
+ * `ScrollArea` family prefix (DS-853).
156
+ */
157
+ const ScrollBar = ScrollAreaScrollbar;
158
+
159
+ /**
160
+ * @deprecated Use `ScrollAreaScrollbarProps` instead (DS-853).
161
+ */
162
+ type ScrollBarProps = ScrollAreaScrollbarProps;
150
163
 
151
- export { ScrollArea, ScrollBar };
164
+ export { ScrollArea, ScrollAreaScrollbar, ScrollBar };
152
165
 
153
- export type { ScrollAreaProps, ScrollBarProps };
166
+ export type { ScrollAreaProps, ScrollAreaScrollbarProps, ScrollBarProps };
@@ -184,8 +184,9 @@ const selectTriggerVariants = cva([
184
184
  "bg-neutral-50 border-neutral-300",
185
185
  "dark:bg-white/5 dark:border-white/15",
186
186
 
187
- // Typography
188
- "text-sm font-normal font-sans text-foreground",
187
+ // Typography — text-body (16px) per the Figma form-field example: the select
188
+ // sits beside inputs and both are values, so both are body (DS-921).
189
+ "text-body text-foreground",
189
190
 
190
191
  // Text truncation for long content (shadcn default behavior)
191
192
  "[&>span]:block [&>span]:truncate",
@@ -378,7 +379,7 @@ function SelectLabel({
378
379
  return (
379
380
  <SelectPrimitive.Label
380
381
  className={cn(
381
- "text-muted-foreground px-2 py-1.5 text-xs font-medium",
382
+ "text-muted-foreground text-label-sm px-2 py-1.5",
382
383
  className
383
384
  )}
384
385
  data-slot="select-label"
@@ -402,18 +403,28 @@ SelectLabel.displayName = "SelectLabel";
402
403
  * </div>
403
404
  * </SelectItem>
404
405
  */
405
- function SelectItem({
406
- className,
407
- children,
408
- ...props
409
- }: React.ComponentProps<typeof SelectPrimitive.Item>) {
406
+ /**
407
+ * Props for the SelectItem component.
408
+ */
409
+ interface SelectItemProps extends React.ComponentProps<
410
+ typeof SelectPrimitive.Item
411
+ > {
412
+ /**
413
+ * Secondary hint rendered after the item label (e.g. "Latest").
414
+ * Rendered outside the item's text value, so it shows in the open list
415
+ * but never leaks into the trigger's selected-value rendering.
416
+ */
417
+ hint?: React.ReactNode;
418
+ }
419
+
420
+ function SelectItem({ className, children, hint, ...props }: SelectItemProps) {
410
421
  const itemStyles = cn(
411
422
  // Base layout
412
423
  "relative flex w-full cursor-default select-none items-center gap-2",
413
424
  "rounded py-1.5 pl-2 pr-8",
414
425
 
415
426
  // Typography
416
- "text-sm font-normal leading-5 text-popover-foreground",
427
+ "text-label text-popover-foreground",
417
428
 
418
429
  // Interactive states
419
430
  "focus:bg-accent focus:text-accent-foreground",
@@ -440,6 +451,15 @@ function SelectItem({
440
451
  </span>
441
452
 
442
453
  <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
454
+
455
+ {hint != null && (
456
+ <span
457
+ className="text-label-sm text-muted-foreground ml-auto"
458
+ data-slot="select-item-hint"
459
+ >
460
+ {hint}
461
+ </span>
462
+ )}
443
463
  </SelectPrimitive.Item>
444
464
  );
445
465
  }
@@ -523,4 +543,9 @@ export {
523
543
  SelectValue,
524
544
  };
525
545
 
526
- export type { SelectContentProps, SelectProps, SelectTriggerProps };
546
+ export type {
547
+ SelectContentProps,
548
+ SelectItemProps,
549
+ SelectProps,
550
+ SelectTriggerProps,
551
+ };
@@ -197,7 +197,7 @@ const SeparatorWithText = React.forwardRef<
197
197
  data-tracking-label={trackingLabel}
198
198
  >
199
199
  <Separator className="flex-1" />
200
- <span className="text-muted-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap">
200
+ <span className="text-body-sm text-muted-foreground shrink-0 leading-none whitespace-nowrap">
201
201
  {children}
202
202
  </span>
203
203
  <Separator className="flex-1" />
@@ -392,7 +392,7 @@ const SheetTitle = React.forwardRef<
392
392
  <SheetPrimitive.Title
393
393
  ref={ref}
394
394
  className={cn(
395
- "text-foreground text-lg font-semibold",
395
+ "text-foreground text-heading-section",
396
396
  icon && "flex items-center gap-2",
397
397
  className
398
398
  )}
@@ -433,7 +433,7 @@ const SheetDescription = React.forwardRef<
433
433
  >(({ className, dataHook, ...props }, ref) => (
434
434
  <SheetPrimitive.Description
435
435
  ref={ref}
436
- className={cn("text-muted-foreground text-sm", className)}
436
+ className={cn("text-body-sm text-muted-foreground", className)}
437
437
  data-hook={dataHook}
438
438
  data-slot="sheet-description"
439
439
  {...props}
@@ -5,7 +5,29 @@ import { cn } from "@brightlocal/ui-components/lib/utils";
5
5
  /**
6
6
  * Props for the Skeleton component
7
7
  */
8
+ /**
9
+ * Entry delay for the skeleton's appearance. `false` (default) shows it
10
+ * immediately; "short" holds it back 300ms (the flash zone's upper edge —
11
+ * waits that resolve first never show it); "long" holds it 1000ms for
12
+ * below-the-fold or secondary surfaces; a number sets a measured per-surface
13
+ * value in milliseconds. The delayed skeleton still reserves its geometry —
14
+ * it is invisible, not unmounted.
15
+ */
16
+ type SkeletonDelay = "short" | "long" | number | false;
17
+
18
+ const SKELETON_DELAY_MS: Record<"short" | "long", number> = {
19
+ short: 300,
20
+ long: 1000,
21
+ };
22
+
8
23
  interface SkeletonProps extends React.ComponentProps<"div"> {
24
+ /**
25
+ * Delay before the skeleton becomes visible: `"short"` (300ms),
26
+ * `"long"` (1000ms), or a number of milliseconds. It keeps reserving its
27
+ * space while invisible.
28
+ * @default false
29
+ */
30
+ delay?: SkeletonDelay;
9
31
  /**
10
32
  * Data hook for automated testing (optional for Skeleton as it's purely presentational)
11
33
  */
@@ -20,33 +42,82 @@ interface SkeletonProps extends React.ComponentProps<"div"> {
20
42
  trackingLabel?: string;
21
43
  /**
22
44
  * Accessible label announced to screen readers during loading.
23
- * @default "Loading"
45
+ *
46
+ * Unset (the default) the skeleton is silent: `aria-hidden`, with no
47
+ * screen-reader text. A loading layout is many skeletons — a table page is
48
+ * a dozen rows of four — and one announcement per shape is the whole wait
49
+ * read out dozens of times. The region being loaded carries `aria-busy` and
50
+ * makes the single announcement instead.
51
+ *
52
+ * Pass it only for a skeleton that stands alone, where there is no owning
53
+ * region to do the announcing.
24
54
  */
25
55
  loadingLabel?: string;
26
56
  }
27
57
 
28
58
  /**
29
59
  * Skeleton component for loading placeholder states.
30
- * Displays a pulsing animation to indicate content is loading.
60
+ * Displays a travelling shimmer wave — one soft color wave (skeleton base to
61
+ * a lighter peak) moving left to right through every skeleton shape in the
62
+ * view, so composed layouts light up in position order with no per-shape
63
+ * setup. The skeleton appears instantly at full strength — deliberately no
64
+ * fade-in — and the wave animates color only, never the shape's opacity.
31
65
  * Use to represent text, images, avatars, or any other content while data is being fetched.
66
+ *
67
+ * Appears instantly at full strength — deliberately no fade-in: a skeleton
68
+ * is the page assembling, not a transition worth softening. Flicker on fast
69
+ * responses is prevented by not showing the skeleton at all (the `delay`
70
+ * prop, or `useDelayedPending`), never by easing it in. The exit is equally
71
+ * instant: unmounting is immediate, and fading a skeleton out over readable
72
+ * content is banned (a minimum display time by another name).
32
73
  */
33
74
  const Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(
34
75
  (
35
- { className, dataHook, trackingEl, trackingLabel, loadingLabel, ...props },
76
+ {
77
+ className,
78
+ dataHook,
79
+ delay = false,
80
+ style,
81
+ trackingEl,
82
+ trackingLabel,
83
+ loadingLabel,
84
+ ...props
85
+ },
36
86
  ref
37
87
  ) => {
88
+ const delayMs =
89
+ delay === false
90
+ ? 0
91
+ : typeof delay === "number"
92
+ ? delay
93
+ : SKELETON_DELAY_MS[delay];
94
+ /* Announce only when the caller asked for it by name. Silence is the
95
+ default because a skeleton is scaffolding, not information. */
96
+ const announces = loadingLabel !== undefined;
38
97
  return (
39
98
  <div
40
99
  ref={ref}
41
- aria-busy="true"
42
- className={cn("bg-accent relative animate-pulse rounded-md", className)}
100
+ aria-busy={announces ? "true" : undefined}
101
+ aria-hidden={announces ? undefined : "true"}
102
+ className={cn(
103
+ "bg-skeleton animate-status-shimmer relative rounded-md",
104
+ className
105
+ )}
43
106
  data-hook={dataHook}
44
107
  data-slot="skeleton"
45
108
  data-tracking-el={trackingEl}
46
109
  data-tracking-label={trackingLabel}
110
+ style={
111
+ delayMs
112
+ ? ({
113
+ "--skeleton-delay": `${delayMs}ms`,
114
+ ...style,
115
+ } as React.CSSProperties)
116
+ : style
117
+ }
47
118
  {...props}
48
119
  >
49
- <span className="sr-only">{loadingLabel ?? "Loading"}</span>
120
+ {announces ? <span className="sr-only">{loadingLabel}</span> : null}
50
121
  </div>
51
122
  );
52
123
  }
@@ -55,4 +126,4 @@ Skeleton.displayName = "Skeleton";
55
126
 
56
127
  export { Skeleton };
57
128
 
58
- export type { SkeletonProps };
129
+ export type { SkeletonDelay, SkeletonProps };
@@ -97,7 +97,7 @@ const CONTAINER_VARIANTS = cva(
97
97
  }
98
98
  );
99
99
 
100
- const TITLE_VARIANTS = cva("text-sm leading-normal font-medium", {
100
+ const TITLE_VARIANTS = cva("text-heading-compact", {
101
101
  variants: {
102
102
  colorSchema: {
103
103
  default: "text-foreground",
@@ -109,7 +109,7 @@ const TITLE_VARIANTS = cva("text-sm leading-normal font-medium", {
109
109
  },
110
110
  });
111
111
 
112
- const DESCRIPTION_VARIANTS = cva("text-sm leading-normal", {
112
+ const DESCRIPTION_VARIANTS = cva("text-body-sm", {
113
113
  variants: {
114
114
  colorSchema: {
115
115
  default: "text-muted-foreground",
@@ -446,7 +446,7 @@ StepperTrigger.displayName = "StepperTrigger";
446
446
 
447
447
  const stepperIndicatorStyles = cva(
448
448
  [
449
- "relative flex size-8 shrink-0 items-center justify-center rounded-full text-xs font-medium",
449
+ "relative flex size-8 shrink-0 items-center justify-center rounded-full text-label-sm",
450
450
  "transition-colors duration-fast ease-out",
451
451
  // Hover overlay (only visible when wrapped by an interactive trigger).
452
452
  "after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:bg-white/10 after:opacity-0 after:transition-opacity after:duration-fast after:ease-out",
@@ -668,7 +668,7 @@ const StepperTitle = React.forwardRef<
668
668
  <span
669
669
  ref={ref}
670
670
  className={cn(
671
- "text-foreground text-sm font-semibold",
671
+ "text-foreground text-heading-compact",
672
672
  "group-data-[state=inactive]/step:text-muted-foreground",
673
673
  "group-data-[disabled=true]/step:text-muted-foreground",
674
674
  className
@@ -688,7 +688,7 @@ const StepperDescription = React.forwardRef<
688
688
  >(({ className, ...props }, ref) => (
689
689
  <span
690
690
  ref={ref}
691
- className={cn("text-muted-foreground text-xs font-normal", className)}
691
+ className={cn("text-muted-foreground text-body-xs", className)}
692
692
  data-slot="stepper-description"
693
693
  {...props}
694
694
  />
@@ -10,7 +10,7 @@ import { cn } from "@brightlocal/ui-components/lib/utils";
10
10
  * -----------------------------------------------------------------------------------------------*/
11
11
 
12
12
  const tableCellVariants = cva(
13
- "align-middle bg-transparent text-foreground text-sm font-normal leading-normal break-words",
13
+ "align-middle bg-transparent text-body-sm text-foreground break-words",
14
14
  {
15
15
  variants: {
16
16
  size: {
@@ -34,7 +34,7 @@ const tableCellVariants = cva(
34
34
  const tableHeadVariants = cva(
35
35
  // bg-muted only for column headers inside <thead> — a <TableHead
36
36
  // scope="row"> in the body must not paint over its row's state tint.
37
- "[thead_&]:bg-muted h-12 p-2 align-middle text-muted-foreground text-sm font-medium leading-normal break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-fast ease-out",
37
+ "[thead_&]:bg-muted h-12 p-2 align-middle text-muted-foreground text-label font-semibold break-words outline-none focus-visible:shadow-default transition-[background-color,box-shadow] duration-fast ease-out",
38
38
  {
39
39
  variants: {
40
40
  align: {
@@ -126,7 +126,10 @@ const Table = React.forwardRef<HTMLTableElement, TableProps>(
126
126
  <table
127
127
  ref={ref}
128
128
  className={cn(
129
- "w-full caption-bottom text-sm",
129
+ // tabular-nums inherits into every cell (and into DataTable, which
130
+ // renders this root), so numeric columns align by default; a
131
+ // prose-heavy column can opt out with proportional-nums.
132
+ "text-body-sm w-full caption-bottom tabular-nums",
130
133
  layout === "fixed" && "table-fixed",
131
134
  className
132
135
  )}
@@ -199,7 +199,7 @@ function TabsTriggerInner<T extends string = string>(
199
199
  // Layout
200
200
  "inline-flex items-center justify-center gap-2 px-2 py-1",
201
201
  // Typography
202
- "text-sm font-medium whitespace-nowrap",
202
+ "text-label whitespace-nowrap",
203
203
  // Border radius
204
204
  "rounded-md",
205
205
  // Border
@@ -139,6 +139,11 @@ function rafDelay(ms: number, signal: { cancelled: boolean }): Promise<void> {
139
139
  * <TypographyP dataHook="w2">Processing</TypographyP>
140
140
  * </TextRevealMotion>
141
141
  * ```
142
+ *
143
+ * @deprecated Removal planned once product usage is gone (DS-907). Cycling
144
+ * phrases on a timer violates the Loading pattern's Honesty principle — the
145
+ * phrases are not stages the backend reported. Use a section skeleton, or a
146
+ * named-stages running screen driven by real stage data (Patterns / Loading).
142
147
  */
143
148
  export interface TextRevealMotionProps extends Omit<
144
149
  React.ComponentPropsWithoutRef<"div">,
@@ -205,6 +210,11 @@ export interface TextRevealMotionProps extends Omit<
205
210
  * The ball rolls across each child, revealing it via clip-path, holds,
206
211
  * then rolls back and cycles to the next child. Supports any Typography
207
212
  * component as children.
213
+ *
214
+ * @deprecated Removal planned once product usage is gone (DS-907). Cycling
215
+ * phrases on a timer violates the Loading pattern's Honesty principle — the
216
+ * phrases are not stages the backend reported. Use a section skeleton, or a
217
+ * named-stages running screen driven by real stage data (Patterns / Loading).
208
218
  */
209
219
  const TextRevealMotion = React.forwardRef<
210
220
  HTMLDivElement,
@@ -10,7 +10,7 @@ const textareaVariants = cva([
10
10
  "border border-input bg-background rounded-md",
11
11
  "outline-none transition-[border-color,background-color,box-shadow] duration-fast ease-out",
12
12
  // Typography
13
- "text-base leading-normal font-sans",
13
+ "text-body",
14
14
  "text-foreground",
15
15
  // Spacing
16
16
  "px-3 py-2",
@@ -7,7 +7,7 @@ import { cva, type VariantProps } from "class-variance-authority";
7
7
  import { cn } from "@brightlocal/ui-components/lib/utils";
8
8
 
9
9
  const toggleVariants = cva(
10
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 focus-visible:border-ring focus-visible:shadow-default outline-none transition-[color,box-shadow] duration-fast ease-out whitespace-nowrap",
10
+ "inline-flex items-center justify-center gap-2 rounded-md text-label hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 focus-visible:border-ring focus-visible:shadow-default outline-none transition-[color,box-shadow] duration-fast ease-out whitespace-nowrap",
11
11
  {
12
12
  variants: {
13
13
  variant: {