@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
@@ -0,0 +1,113 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Visual styles from the semantic type scale (DS-714).
4
+ * - `body` — Inter 500 · 16/24. The default; card copy, descriptions, input values.
5
+ * - `body-sm` — Inter 500 · 14/20. Table cells, dense lists, app chrome. Density, never hierarchy.
6
+ * - `body-xs` — Inter 500 · 12/16. Helper text, captions, timestamps; the 12px floor.
7
+ * - `metric` — Inter 600 · 24/28. Large numbers only: KPIs, stat cards,
8
+ * scores — a metric presented as the point of its card. Figures are
9
+ * proportional; add `tabular` where metrics sit in a column or the value
10
+ * updates in place.
11
+ * - `code` — Geist Mono 400 · 16/24. IDs, keys, coordinates a user copies verbatim.
12
+ * Inside a sentence use the `text-code-inline` utility on a `code` element instead
13
+ * (0.9em, inherits the line's height).
14
+ *
15
+ * There are no standalone label variants on purpose: the `text-label` /
16
+ * `text-label-sm` tokens are reserved for control-owning components
17
+ * (Label/Field, tabs, nav, badges, chips) to adopt in follow-up work.
18
+ */
19
+ type TypographyTextVariant = "body" | "body-sm" | "body-xs" | "metric" | "code";
20
+ /**
21
+ * Text alignment options.
22
+ */
23
+ type TypographyTextAlign = "left" | "center" | "right";
24
+ /**
25
+ * Color role from the scale.
26
+ * - `default` — regular foreground.
27
+ * - `muted` — de-emphasis by color only; same size and weight.
28
+ * - `destructive` — error/critical text; pair with an icon or wording, never
29
+ * color alone.
30
+ */
31
+ type TypographyTextColor = "default" | "muted" | "destructive";
32
+ /**
33
+ * Props for the TypographyText component.
34
+ * Extends native element props with design system tracking attributes.
35
+ */
36
+ interface TypographyTextProps extends React.HTMLAttributes<HTMLElement> {
37
+ /**
38
+ * Visual style from the semantic type scale. Pick the name that matches
39
+ * what the text is doing — never pick a size. When in doubt, it's "body".
40
+ * @default "body"
41
+ */
42
+ variant?: TypographyTextVariant;
43
+ /**
44
+ * Color role: `muted` de-emphasises with color only (text-muted-foreground) —
45
+ * the scale never de-emphasises via lighter weight or smaller size;
46
+ * `destructive` is for error/critical text and must be paired with an icon
47
+ * or wording (color is never the only indicator).
48
+ * @default "default"
49
+ */
50
+ color?: TypographyTextColor;
51
+ /**
52
+ * Tabular figures (fixed-width numerals) so columns align and live values
53
+ * don't jitter. Opt in with `true` for numbers outside a Table — timestamps,
54
+ * counters, metric columns. Inside Table/DataTable cells figures are already
55
+ * tabular (inherited from the Table root, DS-926) — no prop needed; pass an
56
+ * explicit `false` there to restore proportional figures for a prose-heavy
57
+ * column. When omitted, figures follow the surrounding context. Numbers
58
+ * only: never enable it on regular text/prose — it only affects digits, and
59
+ * digits inside prose should stay proportional.
60
+ */
61
+ tabular?: boolean;
62
+ /**
63
+ * Text alignment. When omitted, no alignment class is applied and
64
+ * text keeps the default (left) or inherited alignment.
65
+ * @example "center"
66
+ */
67
+ align?: TypographyTextAlign;
68
+ /**
69
+ * Render as a different element using Radix Slot pattern.
70
+ * When true, merges props onto the child element.
71
+ * @default false
72
+ */
73
+ asChild?: boolean;
74
+ /**
75
+ * Data hook for automated testing (REQUIRED).
76
+ * Used to identify component in tests and E2E automation.
77
+ * @example "card-description", "kpi-value"
78
+ */
79
+ dataHook: string;
80
+ /**
81
+ * Tracking element identifier for analytics.
82
+ * @default "typography-text-{variant}"
83
+ */
84
+ trackingEl?: string;
85
+ /**
86
+ * Tracking label for analytics context.
87
+ */
88
+ trackingLabel?: string;
89
+ }
90
+ /**
91
+ * Semantic text styled by the type scale (DS-714). The variant chooses
92
+ * family, size, line-height, weight and tracking together; the rendered
93
+ * element defaults per variant (p / span / code) and can be changed with
94
+ * `asChild` when a different tag carries the right meaning.
95
+ *
96
+ * @example
97
+ * <TypographyText variant="body-sm" color="muted" dataHook="card-hint">
98
+ * Biggest rank changes this week
99
+ * </TypographyText>
100
+ *
101
+ * @example
102
+ * // Inline emphasis is Figma 700 — a few words inside a paragraph, never a
103
+ * // heading or a whole block. The `text-emphasis` utility encodes the weight
104
+ * // (and the Figma→Web parity offset) so nothing inline ever needs a raw
105
+ * // font-* class.
106
+ * <TypographyText dataHook="alert-body">
107
+ * Two locations are <strong className="text-emphasis">missing</strong> a primary category
108
+ * </TypographyText>
109
+ */
110
+ declare const TypographyText: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<HTMLElement>>;
111
+ export { TypographyText };
112
+ export type { TypographyTextProps, TypographyTextVariant, TypographyTextAlign, TypographyTextColor, };
113
+ //# sourceMappingURL=typography-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography-text.d.ts","sourceRoot":"","sources":["../../src/components/typography-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhF;;GAEG;AACH,KAAK,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD;;;;;;GAMG;AACH,KAAK,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAsD/D;;;GAGG;AACH,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACrE;;;;OAIG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,cAAc,yFA6CnB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { Slot as x } from "@radix-ui/react-slot";
4
+ import { cva as f } from "class-variance-authority";
5
+ import { cn as u } from "@brightlocal/ui-components/lib/utils";
6
+ const b = f("", {
7
+ variants: {
8
+ variant: {
9
+ body: "text-body",
10
+ "body-sm": "text-body-sm",
11
+ "body-xs": "text-body-xs",
12
+ metric: "text-metric",
13
+ code: "text-code"
14
+ },
15
+ color: {
16
+ default: "text-foreground",
17
+ muted: "text-muted-foreground",
18
+ // destructive-foreground is the legible error-text color in both modes
19
+ // (text-destructive is the surface red used behind destructive fills)
20
+ destructive: "text-destructive-foreground"
21
+ },
22
+ // Tri-state on purpose: `undefined` (the default) emits no class so the
23
+ // text inherits its context — proportional everywhere except inside a
24
+ // Table root, which sets `tabular-nums` (DS-926). Explicit `false` must
25
+ // therefore emit `proportional-nums`, or opting out inside a Table would
26
+ // be a silent no-op.
27
+ tabular: {
28
+ true: "tabular-nums",
29
+ false: "proportional-nums"
30
+ },
31
+ align: {
32
+ left: "text-left",
33
+ center: "text-center",
34
+ right: "text-right"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ variant: "body",
39
+ color: "default"
40
+ }
41
+ }), g = {
42
+ body: "p",
43
+ "body-sm": "p",
44
+ "body-xs": "p",
45
+ metric: "span",
46
+ code: "code"
47
+ }, h = i.forwardRef(
48
+ ({
49
+ className: e,
50
+ variant: t = "body",
51
+ color: o = "default",
52
+ tabular: r,
53
+ align: a,
54
+ asChild: d = !1,
55
+ dataHook: s,
56
+ trackingEl: m,
57
+ trackingLabel: p,
58
+ ...c
59
+ }, l) => {
60
+ const n = d ? x : g[t];
61
+ return /* @__PURE__ */ y(
62
+ n,
63
+ {
64
+ ref: l,
65
+ className: u(
66
+ b({ variant: t, color: o, tabular: r, align: a }),
67
+ e
68
+ ),
69
+ "data-hook": s,
70
+ "data-slot": "typography-text",
71
+ "data-tracking-el": m || `typography-text-${t}`,
72
+ "data-tracking-label": p,
73
+ ...c
74
+ }
75
+ );
76
+ }
77
+ );
78
+ h.displayName = "TypographyText";
79
+ export {
80
+ h as TypographyText
81
+ };
@@ -52,6 +52,7 @@ interface TypographyH1Props extends React.ComponentProps<"h1">, TypographyBasePr
52
52
  * Main page heading component (h1).
53
53
  * Used for the primary title on a page. Uses the display font (Poppins) with
54
54
  * responsive sizing — 36px on mobile, 48px from the `md` breakpoint.
55
+ * @deprecated Use `<TypographyHeading level={1} variant="page">` (semantic type scale, DS-714). Note the scale's page title is 24px — the 48px look is `variant="display"`, reserved for brand moments.
55
56
  */
56
57
  declare const TypographyH1: React.ForwardRefExoticComponent<Omit<TypographyH1Props, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
57
58
  /**
@@ -63,6 +64,7 @@ interface TypographyH2Props extends React.ComponentProps<"h2">, TypographyBasePr
63
64
  /**
64
65
  * Section heading component (h2).
65
66
  * Used for major section titles within a page.
67
+ * @deprecated Use `<TypographyHeading level={2} variant="section">` (semantic type scale, DS-714).
66
68
  */
67
69
  declare const TypographyH2: React.ForwardRefExoticComponent<Omit<TypographyH2Props, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
68
70
  /**
@@ -74,6 +76,7 @@ interface TypographyH3Props extends React.ComponentProps<"h3">, TypographyBasePr
74
76
  /**
75
77
  * Subsection heading component (h3).
76
78
  * Used for subsections within a major section.
79
+ * @deprecated Use `<TypographyHeading level={3} variant="subsection">` (semantic type scale, DS-714).
77
80
  */
78
81
  declare const TypographyH3: React.ForwardRefExoticComponent<Omit<TypographyH3Props, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
79
82
  /**
@@ -85,6 +88,7 @@ interface TypographyH4Props extends React.ComponentProps<"h4">, TypographyBasePr
85
88
  /**
86
89
  * Minor heading component (h4).
87
90
  * Used for smaller section headings and card titles.
91
+ * @deprecated Use `<TypographyHeading level={4} variant="subsection">` (semantic type scale, DS-714).
88
92
  */
89
93
  declare const TypographyH4: React.ForwardRefExoticComponent<Omit<TypographyH4Props, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
90
94
  /**
@@ -96,6 +100,7 @@ interface TypographyPProps extends React.ComponentProps<"p">, TypographyBaseProp
96
100
  /**
97
101
  * Paragraph text component (p).
98
102
  * Used for body text and general content.
103
+ * @deprecated Use `<TypographyText>` (variant "body", semantic type scale, DS-714).
99
104
  */
100
105
  declare const TypographyP: React.ForwardRefExoticComponent<Omit<TypographyPProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
101
106
  /**
@@ -107,6 +112,7 @@ interface TypographyBlockquoteProps extends React.ComponentProps<"blockquote">,
107
112
  /**
108
113
  * Blockquote component for quoted content.
109
114
  * Displays with a left border accent for visual distinction.
115
+ * @deprecated Use `<TypographyText asChild>` with a `blockquote` child (semantic type scale, DS-714); the border/quote treatment is consumer layout.
110
116
  */
111
117
  declare const TypographyBlockquote: React.ForwardRefExoticComponent<Omit<TypographyBlockquoteProps, "ref"> & React.RefAttributes<HTMLQuoteElement>>;
112
118
  /**
@@ -118,6 +124,7 @@ interface TypographyListProps extends React.ComponentProps<"ul">, TypographyBase
118
124
  /**
119
125
  * Unordered list component (ul).
120
126
  * Used for bullet-point lists with consistent styling.
127
+ * @deprecated Use `<TypographyText asChild>` with a `ul` child (semantic type scale, DS-714); list markers and spacing are consumer layout.
121
128
  */
122
129
  declare const TypographyList: React.ForwardRefExoticComponent<Omit<TypographyListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
123
130
  /**
@@ -129,6 +136,7 @@ interface TypographyInlineCodeProps extends React.ComponentProps<"code">, Omit<T
129
136
  /**
130
137
  * Inline code component for code snippets within text.
131
138
  * Displays with monospace font and muted background.
139
+ * @deprecated Use `<code className="text-code-inline">` inside a sentence (0.9em, inherits the line's height — semantic type scale, DS-714).
132
140
  */
133
141
  declare const TypographyInlineCode: React.ForwardRefExoticComponent<Omit<TypographyInlineCodeProps, "ref"> & React.RefAttributes<HTMLElement>>;
134
142
  /**
@@ -140,6 +148,7 @@ interface TypographyCodeProps extends React.ComponentProps<"pre">, TypographyBas
140
148
  /**
141
149
  * Code block component for multi-line code snippets.
142
150
  * Displays with dark background, monospace font, and horizontal scroll.
151
+ * @deprecated Use `<TypographyText variant="code">` for copyable identifiers, or a `pre` styled with `text-code` for multi-line snippets (semantic type scale, DS-714).
143
152
  */
144
153
  declare const TypographyCode: React.ForwardRefExoticComponent<Omit<TypographyCodeProps, "ref"> & React.RefAttributes<HTMLPreElement>>;
145
154
  /**
@@ -151,6 +160,7 @@ interface TypographyLeadProps extends React.ComponentProps<"p">, TypographyBaseP
151
160
  /**
152
161
  * Lead paragraph component for introductory text.
153
162
  * Displays larger, muted text for page introductions and summaries.
163
+ * @deprecated Use `<TypographyText color="muted">` for an intro line (semantic type scale, DS-714).
154
164
  */
155
165
  declare const TypographyLead: React.ForwardRefExoticComponent<Omit<TypographyLeadProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
156
166
  /**
@@ -162,6 +172,7 @@ interface TypographyLargeProps extends React.ComponentProps<"div">, TypographyBa
162
172
  /**
163
173
  * Large text component for emphasized content.
164
174
  * Displays larger, semibold text for callouts and highlights.
175
+ * @deprecated Use `<TypographyHeading level={n} variant="subsection">` for a small heading or `<TypographyText>` for emphasised copy (DS-714).
165
176
  */
166
177
  declare const TypographyLarge: React.ForwardRefExoticComponent<Omit<TypographyLargeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
167
178
  /**
@@ -173,6 +184,7 @@ interface TypographySmallProps extends React.ComponentProps<"small">, Omit<Typog
173
184
  /**
174
185
  * Small text component for compact content.
175
186
  * Used for captions, labels, and supplementary information.
187
+ * @deprecated Use `<TypographyText variant="body-sm">` (semantic type scale, DS-714).
176
188
  */
177
189
  declare const TypographySmall: React.ForwardRefExoticComponent<Omit<TypographySmallProps, "ref"> & React.RefAttributes<HTMLElement>>;
178
190
  /**
@@ -184,6 +196,7 @@ interface TypographyMutedProps extends React.ComponentProps<"p">, TypographyBase
184
196
  /**
185
197
  * Muted text component for de-emphasized content.
186
198
  * Displays with reduced visual prominence for secondary information.
199
+ * @deprecated Use `<TypographyText variant="body-sm" color="muted">` (semantic type scale, DS-714).
187
200
  */
188
201
  declare const TypographyMuted: React.ForwardRefExoticComponent<Omit<TypographyMutedProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
189
202
  export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyList, TypographyInlineCode, TypographyCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, };
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/components/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;GAEG;AACH,KAAK,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAYnD;;;GAGG;AACH,UAAU,mBAAmB;IAC3B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAUD;;;GAGG;AACH,UAAU,iBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,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AC,EAAE,mBAAmB;CAAG;AAE7D;;;GAGG;AACH,QAAA,MAAM,cAAc,yGA2BnB,CAAC;AAUF;;;GAGG;AACH,UAAU,mBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,mBAAmB;CAAG;AAE3D;;;GAGG;AACH,QAAA,MAAM,cAAc,+GA6BnB,CAAC;AAUF;;;GAGG;AACH,UAAU,oBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,mBAAmB;CAAG;AAE7D;;;GAGG;AACH,QAAA,MAAM,eAAe,0GA0BpB,CAAC;AAUF;;;GAGG;AACH,UAAU,oBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC;CAAG;AAE9E;;;GAGG;AACH,QAAA,MAAM,eAAe,uGAyBpB,CAAC;AAUF;;;GAGG;AACH,UAAU,oBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,mBAAmB;CAAG;AAE3D;;;GAGG;AACH,QAAA,MAAM,eAAe,gHA6BpB,CAAC;AAMF,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,GAChB,CAAC;AAEF,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,CAAC"}
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/components/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;GAE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B,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,GAChB,CAAC;AAEF,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "2.26.0",
3
+ "version": "3.0.0",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -61,6 +61,33 @@
61
61
  "import": "./dist/lib/motion.js",
62
62
  "require": "./dist/lib/motion.cjs"
63
63
  },
64
+ "./empty-state": {
65
+ "source": {
66
+ "types": "./src/blocks/empty-state.tsx",
67
+ "import": "./src/blocks/empty-state.tsx"
68
+ },
69
+ "types": "./dist/blocks/empty-state.d.ts",
70
+ "import": "./dist/blocks/empty-state.js",
71
+ "require": "./dist/blocks/empty-state.cjs"
72
+ },
73
+ "./progress-state": {
74
+ "source": {
75
+ "types": "./src/blocks/progress-state.tsx",
76
+ "import": "./src/blocks/progress-state.tsx"
77
+ },
78
+ "types": "./dist/blocks/progress-state.d.ts",
79
+ "import": "./dist/blocks/progress-state.js",
80
+ "require": "./dist/blocks/progress-state.cjs"
81
+ },
82
+ "./progress-screen": {
83
+ "source": {
84
+ "types": "./src/blocks/progress-state.tsx",
85
+ "import": "./src/blocks/progress-state.tsx"
86
+ },
87
+ "types": "./dist/blocks/progress-state.d.ts",
88
+ "import": "./dist/blocks/progress-state.js",
89
+ "require": "./dist/blocks/progress-state.cjs"
90
+ },
64
91
  "./input-list": {
65
92
  "source": {
66
93
  "types": "./src/blocks/input-list.tsx",
@@ -109,6 +136,15 @@
109
136
  "lib/*": [
110
137
  "dist/lib/*"
111
138
  ],
139
+ "empty-state": [
140
+ "dist/blocks/empty-state"
141
+ ],
142
+ "progress-state": [
143
+ "dist/blocks/progress-state"
144
+ ],
145
+ "progress-screen": [
146
+ "dist/blocks/progress-state"
147
+ ],
112
148
  "input-list": [
113
149
  "dist/blocks/input-list"
114
150
  ],
@@ -192,7 +228,7 @@
192
228
  "sonner": "^2.0.7",
193
229
  "tailwind-merge": "^3.4.0",
194
230
  "vaul": "^1.1.2",
195
- "@brightlocal/icons": "2.3.1",
231
+ "@brightlocal/icons": "2.4.0",
196
232
  "@brightlocal/illustrations": "0.6.0"
197
233
  },
198
234
  "size-limit": [
@@ -228,6 +264,10 @@
228
264
  "token-drift:check": "node scripts/token-drift.mjs --check",
229
265
  "token-drift:update-baseline": "node scripts/token-drift.mjs --update-baseline",
230
266
  "token-drift:report": "node scripts/token-report.mjs",
267
+ "test": "node --test \"scripts/test/*.test.mjs\"",
268
+ "typography-drift": "node scripts/token-drift.mjs --only typography",
269
+ "typography-drift:check": "node scripts/token-drift.mjs --check --only typography",
270
+ "typography-drift:update-baseline": "node scripts/token-drift.mjs --update-baseline --only typography",
231
271
  "build:changelog": "node scripts/generate-changelog.js",
232
272
  "rel:patch": "node scripts/changeset-create.mjs patch",
233
273
  "rel:minor": "node scripts/changeset-create.mjs minor",