@brightlocal/ui-components 3.4.0 → 3.5.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 (196) hide show
  1. package/AI_USAGE.md +22 -3
  2. package/README.md +177 -109
  3. package/component-meta.json +1061 -102
  4. package/dist/alert-dialog.cjs +1 -1
  5. package/dist/alert-dialog.d.ts +13 -2
  6. package/dist/alert-dialog.d.ts.map +1 -1
  7. package/dist/alert-dialog.js +4 -3
  8. package/dist/banner.cjs +1 -1
  9. package/dist/banner.d.ts +47 -11
  10. package/dist/banner.d.ts.map +1 -1
  11. package/dist/banner.js +156 -79
  12. package/dist/blocks/empty-state.cjs +1 -1
  13. package/dist/blocks/empty-state.d.ts +40 -5
  14. package/dist/blocks/empty-state.d.ts.map +1 -1
  15. package/dist/blocks/empty-state.js +59 -52
  16. package/dist/blocks/input-list.d.ts +1 -0
  17. package/dist/blocks/input-list.d.ts.map +1 -1
  18. package/dist/blocks/sidebar.cjs +1 -1
  19. package/dist/blocks/sidebar.d.ts +12 -6
  20. package/dist/blocks/sidebar.d.ts.map +1 -1
  21. package/dist/blocks/sidebar.js +64 -63
  22. package/dist/button.cjs +1 -1
  23. package/dist/button.d.ts.map +1 -1
  24. package/dist/button.js +47 -43
  25. package/dist/card.cjs +1 -1
  26. package/dist/card.d.ts +12 -0
  27. package/dist/card.d.ts.map +1 -1
  28. package/dist/card.js +115 -97
  29. package/dist/chart.cjs +6 -6
  30. package/dist/chart.d.ts +6 -10
  31. package/dist/chart.d.ts.map +1 -1
  32. package/dist/chart.js +281 -296
  33. package/dist/combobox.cjs +3 -3
  34. package/dist/combobox.d.ts.map +1 -1
  35. package/dist/combobox.js +430 -343
  36. package/dist/command.cjs +1 -1
  37. package/dist/command.d.ts +23 -2
  38. package/dist/command.d.ts.map +1 -1
  39. package/dist/command.js +212 -207
  40. package/dist/count-indicator.cjs +1 -0
  41. package/dist/count-indicator.d.ts +85 -0
  42. package/dist/count-indicator.d.ts.map +1 -0
  43. package/dist/count-indicator.js +72 -0
  44. package/dist/data-table.cjs +1 -1
  45. package/dist/data-table.d.ts +101 -11
  46. package/dist/data-table.d.ts.map +1 -1
  47. package/dist/data-table.js +593 -523
  48. package/dist/dialog.cjs +1 -1
  49. package/dist/dialog.d.ts +26 -3
  50. package/dist/dialog.d.ts.map +1 -1
  51. package/dist/dialog.js +62 -47
  52. package/dist/drawer.cjs +1 -1
  53. package/dist/drawer.d.ts +8 -4
  54. package/dist/drawer.d.ts.map +1 -1
  55. package/dist/drawer.js +37 -38
  56. package/dist/file-upload.cjs +1 -0
  57. package/dist/file-upload.d.ts +546 -0
  58. package/dist/file-upload.d.ts.map +1 -0
  59. package/dist/file-upload.js +1103 -0
  60. package/dist/global-layout.cjs +1 -1
  61. package/dist/global-layout.d.ts +7 -2
  62. package/dist/global-layout.d.ts.map +1 -1
  63. package/dist/global-layout.js +52 -52
  64. package/dist/hooks/use-file-dropzone.cjs +1 -0
  65. package/dist/hooks/use-file-dropzone.d.ts +75 -0
  66. package/dist/hooks/use-file-dropzone.d.ts.map +1 -0
  67. package/dist/hooks/use-file-dropzone.js +133 -0
  68. package/dist/hover-card.cjs +1 -1
  69. package/dist/hover-card.d.ts +29 -16
  70. package/dist/hover-card.d.ts.map +1 -1
  71. package/dist/hover-card.js +153 -36
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.d.ts +3 -0
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +676 -640
  76. package/dist/input-chip.cjs +1 -1
  77. package/dist/input-chip.d.ts +30 -1
  78. package/dist/input-chip.d.ts.map +1 -1
  79. package/dist/input-chip.js +131 -115
  80. package/dist/input-group.cjs +1 -1
  81. package/dist/input-group.d.ts +37 -2
  82. package/dist/input-group.d.ts.map +1 -1
  83. package/dist/input-group.js +131 -114
  84. package/dist/input-password.cjs +1 -1
  85. package/dist/input-password.js +6 -6
  86. package/dist/lib/empty-canvas.cjs +1 -1
  87. package/dist/lib/empty-canvas.d.ts +27 -1
  88. package/dist/lib/empty-canvas.d.ts.map +1 -1
  89. package/dist/lib/empty-canvas.js +27 -23
  90. package/dist/lib/empty-chip.cjs +1 -1
  91. package/dist/lib/empty-chip.d.ts +19 -2
  92. package/dist/lib/empty-chip.d.ts.map +1 -1
  93. package/dist/lib/empty-chip.js +14 -9
  94. package/dist/lib/field-aria.cjs +1 -1
  95. package/dist/lib/field-aria.d.ts +4 -4
  96. package/dist/lib/field-aria.d.ts.map +1 -1
  97. package/dist/lib/field-aria.js +7 -5
  98. package/dist/lib/media-viewer-content.cjs +1 -1
  99. package/dist/lib/media-viewer-content.js +1 -1
  100. package/dist/lib/table-internal.cjs +1 -1
  101. package/dist/lib/table-internal.d.ts +19 -0
  102. package/dist/lib/table-internal.d.ts.map +1 -1
  103. package/dist/lib/table-internal.js +22 -7
  104. package/dist/list.cjs +1 -1
  105. package/dist/list.d.ts +13 -0
  106. package/dist/list.d.ts.map +1 -1
  107. package/dist/list.js +103 -82
  108. package/dist/logo-mark.cjs +1 -1
  109. package/dist/logo-mark.d.ts +18 -2
  110. package/dist/logo-mark.d.ts.map +1 -1
  111. package/dist/logo-mark.js +159 -79
  112. package/dist/media-empty.cjs +1 -1
  113. package/dist/media-empty.d.ts +50 -7
  114. package/dist/media-empty.d.ts.map +1 -1
  115. package/dist/media-empty.js +14 -13
  116. package/dist/media-viewer.cjs +1 -1
  117. package/dist/media-viewer.js +6 -6
  118. package/dist/multi-select-filter.cjs +1 -1
  119. package/dist/multi-select-filter.d.ts.map +1 -1
  120. package/dist/multi-select-filter.js +92 -101
  121. package/dist/pagination.cjs +1 -1
  122. package/dist/pagination.d.ts +11 -0
  123. package/dist/pagination.d.ts.map +1 -1
  124. package/dist/pagination.js +17 -17
  125. package/dist/relative-date.d.ts +6 -0
  126. package/dist/relative-date.d.ts.map +1 -1
  127. package/dist/resizable.d.ts +1 -1
  128. package/dist/result-count.cjs +1 -1
  129. package/dist/result-count.d.ts +13 -16
  130. package/dist/result-count.d.ts.map +1 -1
  131. package/dist/result-count.js +24 -33
  132. package/dist/sheet.cjs +1 -1
  133. package/dist/sheet.d.ts +22 -3
  134. package/dist/sheet.d.ts.map +1 -1
  135. package/dist/sheet.js +152 -125
  136. package/dist/single-select-filter.cjs +1 -1
  137. package/dist/single-select-filter.d.ts.map +1 -1
  138. package/dist/single-select-filter.js +67 -76
  139. package/dist/table.cjs +1 -1
  140. package/dist/table.d.ts.map +1 -1
  141. package/dist/table.js +77 -76
  142. package/dist/tabs.cjs +1 -1
  143. package/dist/tabs.d.ts +39 -3
  144. package/dist/tabs.d.ts.map +1 -1
  145. package/dist/tabs.js +127 -76
  146. package/dist/textarea.cjs +1 -1
  147. package/dist/textarea.d.ts +34 -0
  148. package/dist/textarea.d.ts.map +1 -1
  149. package/dist/textarea.js +115 -19
  150. package/dist/tooltip.cjs +1 -1
  151. package/dist/tooltip.d.ts.map +1 -1
  152. package/dist/tooltip.js +137 -131
  153. package/dist/typography-text.cjs +1 -1
  154. package/dist/typography-text.d.ts +6 -2
  155. package/dist/typography-text.d.ts.map +1 -1
  156. package/dist/typography-text.js +14 -13
  157. package/package.json +3 -4
  158. package/src/blocks/empty-state.tsx +108 -48
  159. package/src/blocks/input-list.tsx +1 -0
  160. package/src/blocks/sidebar.tsx +39 -16
  161. package/src/components/alert-dialog.tsx +18 -2
  162. package/src/components/banner.tsx +247 -68
  163. package/src/components/button.tsx +27 -10
  164. package/src/components/card.tsx +89 -7
  165. package/src/components/chart.tsx +47 -67
  166. package/src/components/combobox.tsx +221 -12
  167. package/src/components/command.tsx +83 -37
  168. package/src/components/count-indicator.tsx +188 -0
  169. package/src/components/data-table.tsx +506 -159
  170. package/src/components/dialog.tsx +74 -5
  171. package/src/components/drawer.tsx +52 -32
  172. package/src/components/file-upload.tsx +2574 -0
  173. package/src/components/global-layout.tsx +18 -5
  174. package/src/components/hover-card.tsx +395 -65
  175. package/src/components/input-chip.tsx +67 -2
  176. package/src/components/input-group.tsx +89 -6
  177. package/src/components/list.tsx +40 -3
  178. package/src/components/logo-mark.tsx +109 -25
  179. package/src/components/media-empty.tsx +62 -7
  180. package/src/components/multi-select-filter.tsx +9 -16
  181. package/src/components/pagination.tsx +15 -2
  182. package/src/components/relative-date.tsx +6 -0
  183. package/src/components/result-count.tsx +27 -54
  184. package/src/components/sheet.tsx +86 -8
  185. package/src/components/single-select-filter.tsx +9 -16
  186. package/src/components/table.tsx +16 -1
  187. package/src/components/tabs.tsx +223 -41
  188. package/src/components/textarea.tsx +271 -4
  189. package/src/components/tooltip.tsx +29 -2
  190. package/src/components/typography-text.tsx +7 -2
  191. package/src/hooks/use-file-dropzone.ts +325 -0
  192. package/src/index.ts +3 -0
  193. package/src/lib/empty-canvas.tsx +47 -20
  194. package/src/lib/empty-chip.tsx +38 -3
  195. package/src/lib/field-aria.tsx +11 -6
  196. package/src/lib/table-internal.ts +38 -0
package/dist/tooltip.js CHANGED
@@ -1,169 +1,175 @@
1
1
  "use client";
2
- import { composeEventHandlers as s } from "./lib/compose-event-handlers.js";
2
+ import { composeEventHandlers as u } from "./lib/compose-event-handlers.js";
3
3
  import * as e from "react";
4
- import { FLOATING_CONTENT_ANIMATION as j, cn as G } from "@brightlocal/ui-components/lib/utils";
5
- import { jsx as T, jsxs as V } from "react/jsx-runtime";
6
- import { Slot as z } from "@radix-ui/react-slot";
7
- import * as y from "@radix-ui/react-popover";
4
+ import { FLOATING_CONTENT_ANIMATION as V, cn as z } from "@brightlocal/ui-components/lib/utils";
5
+ import { jsx as b, jsxs as U } from "react/jsx-runtime";
6
+ import { Slot as q } from "@radix-ui/react-slot";
7
+ import * as D from "@radix-ui/react-popover";
8
8
  var _ = e.createContext({
9
9
  delayDuration: 0,
10
10
  skipDelayDuration: 0
11
11
  });
12
- function Y({ delayDuration: c = 0, skipDelayDuration: u = 0, children: p }) {
13
- const d = e.useMemo(() => ({
14
- delayDuration: c,
15
- skipDelayDuration: u
16
- }), [c, u]);
17
- return /* @__PURE__ */ T(_.Provider, {
18
- value: d,
19
- children: p
12
+ function $({ delayDuration: i = 0, skipDelayDuration: f = 0, children: g }) {
13
+ const C = e.useMemo(() => ({
14
+ delayDuration: i,
15
+ skipDelayDuration: f
16
+ }), [i, f]);
17
+ return /* @__PURE__ */ b(_.Provider, {
18
+ value: C,
19
+ children: g
20
20
  });
21
21
  }
22
- var U = 200, H = e.createContext(null);
22
+ var J = 200, H = e.createContext(null);
23
23
  function M() {
24
- const c = e.useContext(H);
25
- if (!c) throw new Error("Tooltip components must be used within <Tooltip>");
26
- return c;
24
+ const i = e.useContext(H);
25
+ if (!i) throw new Error("Tooltip components must be used within <Tooltip>");
26
+ return i;
27
27
  }
28
- function Z({ open: c, defaultOpen: u = !1, onOpenChange: p, children: d }) {
29
- const { delayDuration: m } = e.useContext(_), [k, x] = e.useState(u ?? !1), v = c !== void 0, i = v ? c : k, f = e.useRef(void 0), g = e.useRef(void 0), h = e.useRef(null), l = e.useRef("hover"), r = e.useRef(null), P = e.useId(), n = e.useCallback((t) => {
30
- t || (l.current = "hover"), v || x(t), p?.(t);
31
- }, [v, p]), o = e.useCallback(() => {
32
- f.current !== void 0 && (clearTimeout(f.current), f.current = void 0), g.current !== void 0 && (clearTimeout(g.current), g.current = void 0);
28
+ function ee({ open: i, defaultOpen: f = !1, onOpenChange: g, children: C }) {
29
+ const { delayDuration: P } = e.useContext(_), [R, w] = e.useState(f ?? !1), p = i !== void 0, n = p ? i : R, [k, E] = e.useState(!1), T = e.useRef(void 0), m = e.useRef(void 0), a = e.useRef(null), d = e.useRef("hover"), l = e.useRef(null), h = e.useId(), r = e.useCallback((t) => {
30
+ t || (d.current = "hover"), p || w(t), g?.(t);
31
+ }, [p, g]), o = e.useCallback(() => {
32
+ T.current !== void 0 && (clearTimeout(T.current), T.current = void 0), m.current !== void 0 && (clearTimeout(m.current), m.current = void 0);
33
33
  }, []);
34
34
  e.useEffect(() => o, [o]);
35
- const a = e.useCallback(() => {
36
- if (o(), l.current === "touch") {
37
- if (i) return;
38
- l.current = "hover";
35
+ const v = e.useCallback(() => {
36
+ if (o(), d.current === "touch") {
37
+ if (n) return;
38
+ d.current = "hover";
39
39
  }
40
- m > 0 ? g.current = setTimeout(() => n(!0), m) : n(!0);
40
+ P > 0 ? m.current = setTimeout(() => r(!0), P) : r(!0);
41
41
  }, [
42
42
  o,
43
- m,
44
- i,
45
- n
46
- ]), C = e.useCallback(() => {
47
- o(), !(l.current === "touch" && i) && (f.current = setTimeout(() => n(!1), U));
43
+ P,
44
+ n,
45
+ r
46
+ ]), s = e.useCallback(() => {
47
+ o(), !(d.current === "touch" && n) && (T.current = setTimeout(() => r(!1), J));
48
48
  }, [
49
49
  o,
50
- i,
51
- n
52
- ]), w = e.useCallback((t) => {
53
- t.pointerType !== "touch" && a();
54
- }, [a]), R = e.useCallback((t) => {
55
- t.pointerType !== "touch" && (r.current = null, C());
56
- }, [C]), E = e.useCallback((t) => {
57
- r.current = t.pointerType === "touch" ? "touch" : "mouse";
58
- }, []), O = e.useCallback(() => {
59
- r.current = null;
50
+ n,
51
+ r
52
+ ]), c = e.useCallback((t) => {
53
+ t.pointerType !== "touch" && v();
54
+ }, [v]), y = e.useCallback((t) => {
55
+ t.pointerType !== "touch" && (l.current = null, s());
56
+ }, [s]), O = e.useCallback((t) => {
57
+ l.current = t.pointerType === "touch" ? "touch" : "mouse";
60
58
  }, []), I = e.useCallback(() => {
61
- const t = r.current;
62
- r.current = null, t === "touch" && (o(), i ? n(!1) : (l.current = "touch", n(!0)));
59
+ l.current = null;
60
+ }, []), L = e.useCallback(() => {
61
+ const t = l.current;
62
+ l.current = null, t === "touch" && (o(), n ? r(!1) : (d.current = "touch", r(!0)));
63
63
  }, [
64
64
  o,
65
- i,
66
- n
65
+ n,
66
+ r
67
67
  ]), N = e.useCallback(() => {
68
- r.current || a();
69
- }, [a]), A = e.useCallback(() => {
70
- C();
71
- }, [C]), b = e.useCallback(() => {
68
+ l.current || v();
69
+ }, [v]), x = e.useCallback(() => {
70
+ s();
71
+ }, [s]), A = e.useCallback(() => {
72
72
  o();
73
- }, [o]), F = e.useCallback((t) => {
74
- t.pointerType !== "touch" && C();
75
- }, [C]), L = e.useCallback((t) => {
76
- const D = t.target;
77
- D instanceof Node && h.current?.contains(D) && t.preventDefault();
78
- }, []), S = e.useCallback((t) => {
79
- t || (o(), n(!1));
80
- }, [o, n]), B = e.useMemo(() => ({
81
- open: i,
82
- tooltipId: P,
83
- triggerRef: h,
84
- onTriggerPointerEnter: w,
85
- onTriggerPointerLeave: R,
86
- onTriggerPointerDown: E,
87
- onTriggerPointerCancel: O,
88
- onTriggerClick: I,
73
+ }, [o]), B = e.useCallback((t) => {
74
+ t.pointerType !== "touch" && s();
75
+ }, [s]), F = e.useCallback((t) => {
76
+ const S = t.target;
77
+ S instanceof Node && a.current?.contains(S) && t.preventDefault();
78
+ }, []), j = e.useCallback((t) => {
79
+ t || (o(), r(!1));
80
+ }, [o, r]), G = e.useMemo(() => ({
81
+ open: n,
82
+ tooltipId: h,
83
+ triggerRef: a,
84
+ suppressDescribedBy: k,
85
+ setSuppressDescribedBy: E,
86
+ onTriggerPointerEnter: c,
87
+ onTriggerPointerLeave: y,
88
+ onTriggerPointerDown: O,
89
+ onTriggerPointerCancel: I,
90
+ onTriggerClick: L,
89
91
  onTriggerFocus: N,
90
- onTriggerBlur: A,
91
- onContentPointerEnter: b,
92
- onContentPointerLeave: F,
93
- onContentInteractOutside: L
92
+ onTriggerBlur: x,
93
+ onContentPointerEnter: A,
94
+ onContentPointerLeave: B,
95
+ onContentInteractOutside: F
94
96
  }), [
95
- i,
96
- P,
97
- w,
98
- R,
99
- E,
97
+ n,
98
+ h,
99
+ k,
100
+ c,
101
+ y,
100
102
  O,
101
103
  I,
104
+ L,
102
105
  N,
106
+ x,
103
107
  A,
104
- b,
105
- F,
106
- L
108
+ B,
109
+ F
107
110
  ]);
108
- return /* @__PURE__ */ T(H.Provider, {
109
- value: B,
110
- children: /* @__PURE__ */ T(y.Root, {
111
- open: i,
112
- onOpenChange: S,
113
- children: d
111
+ return /* @__PURE__ */ b(H.Provider, {
112
+ value: G,
113
+ children: /* @__PURE__ */ b(D.Root, {
114
+ open: n,
115
+ onOpenChange: j,
116
+ children: C
114
117
  })
115
118
  });
116
119
  }
117
- var q = e.forwardRef(({ dataHook: c, trackingEl: u, trackingLabel: p, asChild: d, children: m, onBlur: k, onClick: x, onFocus: v, onPointerCancel: i, onPointerDown: f, onPointerEnter: g, onPointerLeave: h, ...l }, r) => {
118
- const { open: P, tooltipId: n, triggerRef: o, onTriggerPointerEnter: a, onTriggerPointerLeave: C, onTriggerPointerDown: w, onTriggerPointerCancel: R, onTriggerClick: E, onTriggerFocus: O, onTriggerBlur: I } = M(), N = e.useCallback((b) => {
119
- o.current = b, typeof r == "function" ? r(b) : r && (r.current = b);
120
- }, [r, o]), A = d ? z : "button";
121
- return /* @__PURE__ */ T(y.Anchor, {
120
+ var K = e.forwardRef(({ dataHook: i, trackingEl: f, trackingLabel: g, asChild: C, children: P, onBlur: R, onClick: w, onFocus: p, onPointerCancel: n, onPointerDown: k, onPointerEnter: E, onPointerLeave: T, ...m }, a) => {
121
+ const { open: d, tooltipId: l, triggerRef: h, suppressDescribedBy: r, onTriggerPointerEnter: o, onTriggerPointerLeave: v, onTriggerPointerDown: s, onTriggerPointerCancel: c, onTriggerClick: y, onTriggerFocus: O, onTriggerBlur: I } = M(), L = e.useCallback((x) => {
122
+ h.current = x, typeof a == "function" ? a(x) : a && (a.current = x);
123
+ }, [a, h]), N = C ? q : "button";
124
+ return /* @__PURE__ */ b(D.Anchor, {
122
125
  asChild: !0,
123
- children: /* @__PURE__ */ T(A, {
124
- ref: N,
126
+ children: /* @__PURE__ */ b(N, {
127
+ ref: L,
125
128
  "data-slot": "tooltip-trigger",
126
- ...l,
127
- "aria-describedby": P ? n : void 0,
128
- "data-hook": c,
129
- "data-tracking-el": u,
130
- "data-tracking-label": p,
131
- type: d ? void 0 : "button",
132
- onBlur: s(k, I),
133
- onClick: s(x, E),
134
- onFocus: s(v, O),
135
- onPointerCancel: s(i, R),
136
- onPointerDown: s(f, w),
137
- onPointerEnter: s(g, a),
138
- onPointerLeave: s(h, C),
139
- children: m
129
+ ...m,
130
+ "aria-describedby": d && !r ? l : void 0,
131
+ "data-hook": i,
132
+ "data-tracking-el": f,
133
+ "data-tracking-label": g,
134
+ type: C ? void 0 : "button",
135
+ onBlur: u(R, I),
136
+ onClick: u(w, y),
137
+ onFocus: u(p, O),
138
+ onPointerCancel: u(n, c),
139
+ onPointerDown: u(k, s),
140
+ onPointerEnter: u(E, o),
141
+ onPointerLeave: u(T, v),
142
+ children: P
140
143
  })
141
144
  });
142
145
  });
143
- q.displayName = "TooltipTrigger";
144
- var J = e.forwardRef(({ className: c, side: u = "top", sideOffset: p = 0, dataHook: d, trackingEl: m, trackingLabel: k, hideArrow: x = !1, children: v, onInteractOutside: i, onPointerEnter: f, onPointerLeave: g, ...h }, l) => {
145
- const { tooltipId: r, onContentPointerEnter: P, onContentPointerLeave: n, onContentInteractOutside: o } = M();
146
- return /* @__PURE__ */ T(y.Portal, { children: /* @__PURE__ */ V(y.Content, {
147
- ref: l,
148
- className: G("bg-secondary text-secondary-foreground text-body-xs z-50 w-max max-w-sm rounded-md px-3 py-1.5", j, "**:data-[slot=tooltip-arrow]:-translate-y-px", c),
149
- "data-hook": d,
146
+ K.displayName = "TooltipTrigger";
147
+ var Q = e.forwardRef(({ className: i, side: f = "top", sideOffset: g = 0, dataHook: C, trackingEl: P, trackingLabel: R, hideArrow: w = !1, children: p, onInteractOutside: n, onPointerEnter: k, onPointerLeave: E, ...T }, m) => {
148
+ const { tooltipId: a, triggerRef: d, suppressDescribedBy: l, setSuppressDescribedBy: h, onContentPointerEnter: r, onContentPointerLeave: o, onContentInteractOutside: v } = M(), s = typeof p == "string" ? p.trim() : null;
149
+ return e.useLayoutEffect(() => {
150
+ const c = d.current?.getAttribute("aria-label") ?? null, y = s !== null && c !== null && s === c.trim();
151
+ h(y);
152
+ }), /* @__PURE__ */ b(D.Portal, { children: /* @__PURE__ */ U(D.Content, {
153
+ ref: m,
154
+ className: z("bg-secondary text-secondary-foreground text-body-xs z-50 w-max max-w-sm rounded-md px-3 py-1.5", V, "**:data-[slot=tooltip-arrow]:-translate-y-px", i),
155
+ "data-hook": C,
150
156
  "data-slot": "tooltip-content",
151
- "data-tracking-el": m,
152
- "data-tracking-label": k,
153
- side: u,
154
- sideOffset: p,
155
- onCloseAutoFocus: (a) => a.preventDefault(),
156
- onOpenAutoFocus: (a) => a.preventDefault(),
157
- ...h,
157
+ "data-tracking-el": P,
158
+ "data-tracking-label": R,
159
+ side: f,
160
+ sideOffset: g,
161
+ onCloseAutoFocus: (c) => c.preventDefault(),
162
+ onOpenAutoFocus: (c) => c.preventDefault(),
163
+ ...T,
158
164
  role: "none",
159
- onInteractOutside: s(i, o),
160
- onPointerEnter: s(f, P),
161
- onPointerLeave: s(g, n),
162
- children: [/* @__PURE__ */ T("span", {
163
- id: r,
165
+ onInteractOutside: u(n, v),
166
+ onPointerEnter: u(k, r),
167
+ onPointerLeave: u(E, o),
168
+ children: [/* @__PURE__ */ b("span", {
169
+ id: l ? void 0 : a,
164
170
  role: "tooltip",
165
- children: v
166
- }), !x && /* @__PURE__ */ T(y.Arrow, {
171
+ children: p
172
+ }), !w && /* @__PURE__ */ b(D.Arrow, {
167
173
  className: "fill-secondary",
168
174
  "data-slot": "tooltip-arrow",
169
175
  height: 7,
@@ -171,10 +177,10 @@ var J = e.forwardRef(({ className: c, side: u = "top", sideOffset: p = 0, dataHo
171
177
  })]
172
178
  }) });
173
179
  });
174
- J.displayName = "TooltipContent";
180
+ Q.displayName = "TooltipContent";
175
181
  export {
176
- Z as Tooltip,
177
- J as TooltipContent,
178
- Y as TooltipProvider,
179
- q as TooltipTrigger
182
+ ee as Tooltip,
183
+ Q as TooltipContent,
184
+ $ as TooltipProvider,
185
+ K as TooltipTrigger
180
186
  };
@@ -1 +1 @@
1
- const b=require("./_virtual/_rolldown/runtime.cjs");let e=require("react");e=b.__toESM(e,1);let m=require("@brightlocal/ui-components/lib/utils"),_=require("react/jsx-runtime"),f=require("@radix-ui/react-slot"),g=require("class-variance-authority");var h=(0,g.cva)("",{variants:{variant:{body:"text-body","body-sm":"text-body-sm","body-xs":"text-body-xs",metric:"text-metric",code:"text-code"},color:{default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive-foreground"},tabular:{true:"tabular-nums",false:"proportional-nums"},align:{left:"text-left",center:"text-center",right:"text-right"},truncate:{true:"block truncate"}},defaultVariants:{variant:"body",color:"default"}}),v={body:"p","body-sm":"p","body-xs":"p",metric:"span",code:"code"},r=e.forwardRef(({className:a,variant:t="body",color:o="default",tabular:l,align:d,truncate:u=!1,asChild:i=!1,dataHook:c,trackingEl:s,trackingLabel:n,...y},x)=>{const p=i?f.Slot:v[t];return(0,_.jsx)(p,{ref:x,className:(0,m.cn)(h({variant:t,color:o,tabular:l,align:d,truncate:u}),a),"data-hook":c,"data-slot":"typography-text","data-tracking-el":s||`typography-text-${t}`,"data-tracking-label":n,...y})});r.displayName="TypographyText";exports.TypographyText=r;
1
+ const b=require("./_virtual/_rolldown/runtime.cjs");let e=require("react");e=b.__toESM(e,1);let m=require("@brightlocal/ui-components/lib/utils"),g=require("react/jsx-runtime"),_=require("@radix-ui/react-slot"),f=require("class-variance-authority");var h=(0,f.cva)("",{variants:{variant:{body:"text-body","body-sm":"text-body-sm","body-xs":"text-body-xs",metric:"text-metric",code:"text-code"},color:{default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive-foreground",success:"text-score-strong-ink"},tabular:{true:"tabular-nums",false:"proportional-nums"},align:{left:"text-left",center:"text-center",right:"text-right"},truncate:{true:"block truncate"}},defaultVariants:{variant:"body",color:"default"}}),v={body:"p","body-sm":"p","body-xs":"p",metric:"span",code:"code"},r=e.forwardRef(({className:a,variant:t="body",color:o="default",tabular:l,align:s,truncate:u=!1,asChild:d=!1,dataHook:i,trackingEl:c,trackingLabel:n,...y},x)=>{const p=d?_.Slot:v[t];return(0,g.jsx)(p,{ref:x,className:(0,m.cn)(h({variant:t,color:o,tabular:l,align:s,truncate:u}),a),"data-hook":i,"data-slot":"typography-text","data-tracking-el":c||`typography-text-${t}`,"data-tracking-label":n,...y})});r.displayName="TypographyText";exports.TypographyText=r;
@@ -26,8 +26,10 @@ type TypographyTextAlign = "left" | "center" | "right";
26
26
  * - `muted` — de-emphasis by color only; same size and weight.
27
27
  * - `destructive` — error/critical text; pair with an icon or wording, never
28
28
  * color alone.
29
+ * - `success` — positive/success text (e.g. sync confirmations, accepted
30
+ * states). Same family as Alert's success tokens.
29
31
  */
30
- type TypographyTextColor = "default" | "muted" | "destructive";
32
+ type TypographyTextColor = "default" | "muted" | "destructive" | "success";
31
33
  /**
32
34
  * Props for the TypographyText component.
33
35
  * Extends native element props with design system tracking attributes.
@@ -43,7 +45,9 @@ interface TypographyTextProps extends React.HTMLAttributes<HTMLElement> {
43
45
  * Color role: `muted` de-emphasises with color only (text-muted-foreground) —
44
46
  * the scale never de-emphasises via lighter weight or smaller size;
45
47
  * `destructive` is for error/critical text and must be paired with an icon
46
- * or wording (color is never the only indicator).
48
+ * or wording (color is never the only indicator);
49
+ * `success` is for positive/success text (e.g. sync confirmations, accepted
50
+ * states) — same family as Alert's success tokens.
47
51
  * @default "default"
48
52
  */
49
53
  color?: TypographyTextColor;
@@ -1 +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;;;;;;;;;;;;;;;GAeG;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;AAgE/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;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;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,yFA8CnB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
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;;;;;;;;;;;;;;;GAeG;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;;;;;;;;GAQG;AACH,KAAK,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;AAiE3E;;;GAGG;AACH,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACrE;;;;OAIG;IACH,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;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,yFA8CnB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC"}
@@ -1,6 +1,6 @@
1
- import * as i from "react";
2
- import { cn as u } from "@brightlocal/ui-components/lib/utils";
3
- import { jsx as x } from "react/jsx-runtime";
1
+ import * as u from "react";
2
+ import { cn as x } from "@brightlocal/ui-components/lib/utils";
3
+ import { jsx as y } from "react/jsx-runtime";
4
4
  import { Slot as f } from "@radix-ui/react-slot";
5
5
  import { cva as b } from "class-variance-authority";
6
6
  var g = b("", {
@@ -15,7 +15,8 @@ var g = b("", {
15
15
  color: {
16
16
  default: "text-foreground",
17
17
  muted: "text-muted-foreground",
18
- destructive: "text-destructive-foreground"
18
+ destructive: "text-destructive-foreground",
19
+ success: "text-score-strong-ink"
19
20
  },
20
21
  tabular: {
21
22
  true: "tabular-nums",
@@ -38,22 +39,22 @@ var g = b("", {
38
39
  "body-xs": "p",
39
40
  metric: "span",
40
41
  code: "code"
41
- }, v = i.forwardRef(({ className: e, variant: t = "body", color: r = "default", tabular: o, align: a, truncate: d = !1, asChild: l = !1, dataHook: m, trackingEl: p, trackingLabel: s, ...c }, n) => {
42
- const y = l ? f : h[t];
43
- return /* @__PURE__ */ x(y, {
44
- ref: n,
45
- className: u(g({
42
+ }, v = u.forwardRef(({ className: e, variant: t = "body", color: r = "default", tabular: o, align: a, truncate: d = !1, asChild: s = !1, dataHook: c, trackingEl: l, trackingLabel: m, ...n }, p) => {
43
+ const i = s ? f : h[t];
44
+ return /* @__PURE__ */ y(i, {
45
+ ref: p,
46
+ className: x(g({
46
47
  variant: t,
47
48
  color: r,
48
49
  tabular: o,
49
50
  align: a,
50
51
  truncate: d
51
52
  }), e),
52
- "data-hook": m,
53
+ "data-hook": c,
53
54
  "data-slot": "typography-text",
54
- "data-tracking-el": p || `typography-text-${t}`,
55
- "data-tracking-label": s,
56
- ...c
55
+ "data-tracking-el": l || `typography-text-${t}`,
56
+ "data-tracking-label": m,
57
+ ...n
57
58
  });
58
59
  });
59
60
  v.displayName = "TypographyText";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -195,7 +195,6 @@
195
195
  "@radix-ui/react-context-menu": "^2.4.1",
196
196
  "@radix-ui/react-dialog": "^1.3.1",
197
197
  "@radix-ui/react-dropdown-menu": "^2.2.1",
198
- "@radix-ui/react-hover-card": "^1.2.1",
199
198
  "@radix-ui/react-label": "^2.1.17",
200
199
  "@radix-ui/react-menubar": "^1.2.1",
201
200
  "@radix-ui/react-navigation-menu": "^1.4.1",
@@ -227,8 +226,8 @@
227
226
  "sonner": "^2.0.8",
228
227
  "tailwind-merge": "^3.7.0",
229
228
  "vaul": "^1.1.2",
230
- "@brightlocal/illustrations": "0.7.0",
231
- "@brightlocal/icons": "2.5.0"
229
+ "@brightlocal/icons": "2.6.0",
230
+ "@brightlocal/illustrations": "0.7.0"
232
231
  },
233
232
  "size-limit": [
234
233
  {