@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
@@ -1,66 +1,66 @@
1
- import { jsxs as T, jsx as o } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as H } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { EyeOff as H, Eye as L } from "@brightlocal/icons";
4
- import { Progress as F } from "@brightlocal/ui-components/progress";
3
+ import { EyeOff as L, Eye as R } from "@brightlocal/icons";
4
+ import { Progress as j } from "@brightlocal/ui-components/progress";
5
5
  import { cn as x } from "@brightlocal/ui-components/lib/utils";
6
- import { InputGroup as j, InputGroupInput as M, InputGroupAddon as O, InputGroupButton as V } from "@brightlocal/ui-components/input-group";
7
- const Z = {
6
+ import { InputGroup as M, InputGroupInput as O, InputGroupAddon as Z, InputGroupButton as V } from "@brightlocal/ui-components/input-group";
7
+ const _ = {
8
8
  meter: { label: "Meter", value: 0, color: "bg-green-500" },
9
9
  weak: { label: "Weak", value: 25, color: "bg-green-500" },
10
10
  ok: { label: "Ok", value: 50, color: "bg-green-500" },
11
11
  good: { label: "Good", value: 75, color: "bg-green-500" },
12
12
  great: { label: "Great", value: 100, color: "bg-green-500" }
13
13
  };
14
- function _(t) {
15
- if (!t || t.length === 0)
14
+ function B(e) {
15
+ if (!e || e.length === 0)
16
16
  return "meter";
17
- if (t.length < 12)
17
+ if (e.length < 12)
18
18
  return "weak";
19
- let e = 0;
20
- return t.length >= 16 && (e += 1), /[a-z]/.test(t) && (e += 1), /[A-Z]/.test(t) && (e += 1), /[0-9]/.test(t) && (e += 1), /[^a-zA-Z0-9]/.test(t) && (e += 1), e <= 1 ? "ok" : e <= 3 ? "good" : "great";
19
+ let t = 0;
20
+ return e.length >= 16 && (t += 1), /[a-z]/.test(e) && (t += 1), /[A-Z]/.test(e) && (t += 1), /[0-9]/.test(e) && (t += 1), /[^a-zA-Z0-9]/.test(e) && (t += 1), t <= 1 ? "ok" : t <= 3 ? "good" : "great";
21
21
  }
22
22
  const A = s.createContext(null);
23
23
  function S() {
24
- const t = s.useContext(A);
25
- if (!t)
24
+ const e = s.useContext(A);
25
+ if (!e)
26
26
  throw new Error(
27
- "InputPassword compound components must be used within InputPasswordRoot"
27
+ "InputPassword compound components must be used within InputPassword"
28
28
  );
29
- return t;
29
+ return e;
30
30
  }
31
- function B({
32
- children: t,
33
- dataHook: e,
34
- trackingEl: a,
31
+ function $({
32
+ children: e,
33
+ dataHook: t,
34
+ trackingEl: n,
35
35
  trackingLabel: d,
36
36
  disabled: l,
37
37
  value: r,
38
- onChange: n,
38
+ onChange: a,
39
39
  onStrengthChange: i,
40
40
  strengthLevels: g,
41
41
  calculateStrength: p,
42
42
  error: c,
43
43
  id: h,
44
- className: m
44
+ className: w
45
45
  }) {
46
- const [w, f] = s.useState(!1), [P, v] = s.useState(""), [k, b] = s.useState("meter"), $ = s.useId(), y = h || $, I = r !== void 0 ? r : P, N = g ?? Z, C = p ?? _, E = s.useCallback(
46
+ const [m, f] = s.useState(!1), [P, v] = s.useState(""), [k, b] = s.useState("meter"), z = s.useId(), y = h || z, I = r !== void 0 ? r : P, N = g ?? _, C = p ?? B, E = s.useCallback(
47
47
  (u) => {
48
- r === void 0 && v(u), n?.(u);
48
+ r === void 0 && v(u), a?.(u);
49
49
  },
50
- [r, n]
50
+ [r, a]
51
51
  ), G = s.useCallback(() => {
52
52
  f((u) => !u);
53
53
  }, []);
54
54
  s.useEffect(() => {
55
55
  const u = setTimeout(() => {
56
- const R = C(I);
57
- b(R), i?.(R);
56
+ const T = C(I);
57
+ b(T), i?.(T);
58
58
  }, 180);
59
59
  return () => clearTimeout(u);
60
60
  }, [I, C, i]);
61
- const z = s.useMemo(
61
+ const F = s.useMemo(
62
62
  () => ({
63
- showPassword: w,
63
+ showPassword: m,
64
64
  setShowPassword: f,
65
65
  toggleVisibility: G,
66
66
  password: I,
@@ -68,80 +68,80 @@ function B({
68
68
  strength: k,
69
69
  strengthLevels: N,
70
70
  disabled: l,
71
- dataHook: e,
72
- trackingEl: a,
71
+ dataHook: t,
72
+ trackingEl: n,
73
73
  trackingLabel: d,
74
74
  inputId: y,
75
75
  error: c
76
76
  }),
77
77
  [
78
- w,
78
+ m,
79
79
  G,
80
80
  I,
81
81
  E,
82
82
  k,
83
83
  N,
84
84
  l,
85
- e,
86
- a,
85
+ t,
86
+ n,
87
87
  d,
88
88
  y,
89
89
  c
90
90
  ]
91
91
  );
92
- return /* @__PURE__ */ o(A.Provider, { value: z, children: /* @__PURE__ */ o(
92
+ return /* @__PURE__ */ o(A.Provider, { value: F, children: /* @__PURE__ */ o(
93
93
  "div",
94
94
  {
95
- className: x("w-full", m),
96
- "data-hook": e,
95
+ className: x("w-full", w),
96
+ "data-hook": t,
97
97
  "data-slot": "input-password",
98
- children: t
98
+ children: e
99
99
  }
100
100
  ) });
101
101
  }
102
- B.displayName = "InputPasswordRoot";
103
- const D = s.forwardRef(
104
- ({ className: t, groupClassName: e, onChange: a, showLabel: d, hideLabel: l, ...r }, n) => {
102
+ $.displayName = "InputPassword";
103
+ const Y = $, D = s.forwardRef(
104
+ ({ className: e, groupClassName: t, onChange: n, showLabel: d, hideLabel: l, ...r }, a) => {
105
105
  const {
106
106
  showPassword: i,
107
107
  toggleVisibility: g,
108
108
  password: p,
109
109
  setPassword: c,
110
110
  disabled: h,
111
- dataHook: m,
112
- trackingEl: w,
111
+ dataHook: w,
112
+ trackingEl: m,
113
113
  trackingLabel: f,
114
114
  inputId: P,
115
115
  error: v
116
116
  } = S();
117
- return /* @__PURE__ */ T(j, { className: e, dataHook: m, error: v, children: [
117
+ return /* @__PURE__ */ H(M, { className: t, dataHook: w, error: v, children: [
118
118
  /* @__PURE__ */ o(
119
- M,
119
+ O,
120
120
  {
121
- ref: n,
122
- className: t,
121
+ ref: a,
122
+ className: e,
123
123
  disabled: h,
124
124
  id: P,
125
- trackingEl: w,
125
+ trackingEl: m,
126
126
  trackingLabel: f,
127
127
  type: i ? "text" : "password",
128
128
  value: p,
129
129
  onChange: (b) => {
130
- c(b.target.value), a?.(b);
130
+ c(b.target.value), n?.(b);
131
131
  },
132
132
  ...r
133
133
  }
134
134
  ),
135
- /* @__PURE__ */ o(O, { align: "inline-end", children: /* @__PURE__ */ o(
135
+ /* @__PURE__ */ o(Z, { align: "inline-end", children: /* @__PURE__ */ o(
136
136
  V,
137
137
  {
138
138
  "aria-label": i ? l ?? "Hide password" : d ?? "Show password",
139
- "data-hook": `${m}-toggle`,
139
+ "data-hook": `${w}-toggle`,
140
140
  disabled: h,
141
141
  size: "icon-sm",
142
142
  variant: "ghost",
143
143
  onClick: g,
144
- children: i ? /* @__PURE__ */ o(H, {}) : /* @__PURE__ */ o(L, {})
144
+ children: i ? /* @__PURE__ */ o(L, {}) : /* @__PURE__ */ o(R, {})
145
145
  }
146
146
  ) })
147
147
  ] });
@@ -150,67 +150,68 @@ const D = s.forwardRef(
150
150
  D.displayName = "InputPasswordField";
151
151
  const U = s.forwardRef(
152
152
  ({
153
- className: t,
154
- showLabel: e,
155
- hideLabel: a,
153
+ className: e,
154
+ showLabel: t,
155
+ hideLabel: n,
156
156
  size: d = "icon",
157
157
  variant: l = "ghost",
158
158
  ...r
159
- }, n) => {
159
+ }, a) => {
160
160
  const { showPassword: i, toggleVisibility: g, disabled: p, dataHook: c } = S();
161
161
  return /* @__PURE__ */ o(
162
162
  V,
163
163
  {
164
- ref: n,
165
- "aria-label": i ? a ?? "Hide password" : e ?? "Show password",
166
- className: t,
164
+ ref: a,
165
+ "aria-label": i ? n ?? "Hide password" : t ?? "Show password",
166
+ className: e,
167
167
  "data-hook": `${c}-toggle`,
168
168
  disabled: p,
169
169
  size: d,
170
170
  variant: l,
171
171
  onClick: g,
172
172
  ...r,
173
- children: i ? /* @__PURE__ */ o(H, {}) : /* @__PURE__ */ o(L, {})
173
+ children: i ? /* @__PURE__ */ o(L, {}) : /* @__PURE__ */ o(R, {})
174
174
  }
175
175
  );
176
176
  }
177
177
  );
178
178
  U.displayName = "InputPasswordToggle";
179
179
  function W({
180
- className: t,
181
- showLabel: e = !0
180
+ className: e,
181
+ showLabel: t = !0
182
182
  }) {
183
- const { strength: a, strengthLevels: d, dataHook: l, disabled: r } = S(), n = d[a] ?? {
184
- label: a,
183
+ const { strength: n, strengthLevels: d, dataHook: l, disabled: r } = S(), a = d[n] ?? {
184
+ label: n,
185
185
  value: 0,
186
186
  color: "bg-muted"
187
187
  };
188
- return /* @__PURE__ */ o("div", { className: x("mt-1 space-y-2", t), children: /* @__PURE__ */ T("div", { className: x("flex items-center gap-2", r && "opacity-50"), children: [
188
+ return /* @__PURE__ */ o("div", { className: x("mt-1 space-y-2", e), children: /* @__PURE__ */ H("div", { className: x("flex items-center gap-2", r && "opacity-50"), children: [
189
189
  /* @__PURE__ */ o(
190
- F,
190
+ j,
191
191
  {
192
192
  className: "h-2 flex-1",
193
193
  dataHook: `${l}-strength-progress`,
194
- indicatorClassName: n.color,
195
- value: n.value
194
+ indicatorClassName: a.color,
195
+ value: a.value
196
196
  }
197
197
  ),
198
- e && /* @__PURE__ */ o(
198
+ t && /* @__PURE__ */ o(
199
199
  "span",
200
200
  {
201
- className: "text-foreground w-10 shrink-0 text-right text-sm font-medium whitespace-nowrap",
201
+ className: "text-foreground text-label w-10 shrink-0 text-right whitespace-nowrap",
202
202
  "data-hook": `${l}-strength-label`,
203
- children: n.label
203
+ children: a.label
204
204
  }
205
205
  )
206
206
  ] }) });
207
207
  }
208
208
  W.displayName = "InputPasswordStrength";
209
209
  export {
210
- Z as DEFAULT_STRENGTH_LEVELS,
210
+ _ as DEFAULT_STRENGTH_LEVELS,
211
+ $ as InputPassword,
211
212
  D as InputPasswordField,
212
- B as InputPasswordRoot,
213
+ Y as InputPasswordRoot,
213
214
  W as InputPasswordStrength,
214
215
  U as InputPasswordToggle,
215
- _ as calculatePasswordStrength
216
+ B as calculatePasswordStrength
216
217
  };
package/dist/input.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),b=require("react"),p=require("class-variance-authority"),v=require("@brightlocal/ui-components/lib/utils");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=g(b),n=p.cva(["flex w-full min-w-0 h-9","border border-input bg-background rounded-sm","outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out","text-base font-sans","text-foreground","overflow-hidden text-ellipsis","focus-visible:outline-none focus-visible:border-ring focus-visible:bg-background","focus-visible:shadow-default","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-muted-foreground","placeholder:overflow-hidden placeholder:text-ellipsis","items-center px-3","[&::-webkit-calendar-picker-indicator]:hidden"],{variants:{hasIcon:{true:"pl-9",false:""},hasSecondaryIcon:{true:"pr-9",false:""}},defaultVariants:{hasIcon:!1,hasSecondaryIcon:!1}}),s=h.forwardRef(({className:e,hasIcon:r=!1,hasSecondaryIcon:t=!1,dataHook:a,error:l,trackingEl:c,trackingLabel:d,...o},u)=>{const i=l||o["aria-invalid"]===!0||o["aria-invalid"]==="true";return f.jsx("input",{ref:u,"aria-invalid":i?"true":void 0,className:v.cn(n({hasIcon:r,hasSecondaryIcon:t}),i&&"border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",e),"data-hook":a,"data-slot":"input","data-tracking-el":c,"data-tracking-label":d,...o})});s.displayName="Input";exports.Input=s;exports.inputVariants=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),b=require("react"),p=require("class-variance-authority"),v=require("@brightlocal/ui-components/lib/utils");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=g(b),n=p.cva(["flex w-full min-w-0 h-9","border border-input bg-background rounded-sm","outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out","text-body","text-foreground","overflow-hidden text-ellipsis","focus-visible:outline-none focus-visible:border-ring focus-visible:bg-background","focus-visible:shadow-default","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-muted-foreground","placeholder:overflow-hidden placeholder:text-ellipsis","items-center px-3","[&::-webkit-calendar-picker-indicator]:hidden"],{variants:{hasIcon:{true:"pl-9",false:""},hasSecondaryIcon:{true:"pr-9",false:""}},defaultVariants:{hasIcon:!1,hasSecondaryIcon:!1}}),s=h.forwardRef(({className:e,hasIcon:r=!1,hasSecondaryIcon:t=!1,dataHook:a,error:l,trackingEl:c,trackingLabel:d,...o},u)=>{const i=l||o["aria-invalid"]===!0||o["aria-invalid"]==="true";return f.jsx("input",{ref:u,"aria-invalid":i?"true":void 0,className:v.cn(n({hasIcon:r,hasSecondaryIcon:t}),i&&"border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",e),"data-hook":a,"data-slot":"input","data-tracking-el":c,"data-tracking-label":d,...o})});s.displayName="Input";exports.Input=s;exports.inputVariants=n;
package/dist/input.js CHANGED
@@ -10,7 +10,7 @@ const p = f(
10
10
  "border border-input bg-background rounded-sm",
11
11
  "outline-none transition-[border-color,box-shadow,background-color] duration-fast ease-out",
12
12
  // Typography
13
- "text-base font-sans",
13
+ "text-body",
14
14
  "text-foreground",
15
15
  "overflow-hidden text-ellipsis",
16
16
  // States - Focus
@@ -43,29 +43,29 @@ const p = f(
43
43
  }
44
44
  ), v = u.forwardRef(
45
45
  ({
46
- className: o,
46
+ className: a,
47
47
  hasIcon: r = !1,
48
48
  hasSecondaryIcon: t = !1,
49
49
  dataHook: i,
50
- error: s,
51
- trackingEl: d,
50
+ error: d,
51
+ trackingEl: s,
52
52
  trackingLabel: n,
53
53
  ...e
54
54
  }, l) => {
55
- const a = s || e["aria-invalid"] === !0 || e["aria-invalid"] === "true";
55
+ const o = d || e["aria-invalid"] === !0 || e["aria-invalid"] === "true";
56
56
  return /* @__PURE__ */ c(
57
57
  "input",
58
58
  {
59
59
  ref: l,
60
- "aria-invalid": a ? "true" : void 0,
60
+ "aria-invalid": o ? "true" : void 0,
61
61
  className: b(
62
62
  p({ hasIcon: r, hasSecondaryIcon: t }),
63
- a && "border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",
64
- o
63
+ o && "border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",
64
+ a
65
65
  ),
66
66
  "data-hook": i,
67
67
  "data-slot": "input",
68
- "data-tracking-el": d,
68
+ "data-tracking-el": s,
69
69
  "data-tracking-label": n,
70
70
  ...e
71
71
  }
package/dist/label.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),f=require("react"),p=require("@radix-ui/react-label"),m=require("class-variance-authority"),g=require("@brightlocal/ui-components/lib/utils");function n(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const y=n(f),j=n(p),o=m.cva(["text-sm font-medium leading-none","text-foreground"],{variants:{optional:{true:"after:ml-1 after:content-['(optional)']"},srOnly:{true:"sr-only"}},defaultVariants:{}}),l=y.forwardRef(({className:e,optional:a,srOnly:t,dataHook:r,trackingEl:i,trackingLabel:s,children:c,...u},d)=>b.jsx(j.Root,{ref:d,className:g.cn("flex items-center select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",o({optional:a,srOnly:t}),e),"data-hook":r,"data-slot":"label","data-tracking-el":i||"label","data-tracking-label":s,...u,children:c}));l.displayName="Label";exports.Label=l;exports.labelVariants=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),p=require("react"),f=require("@radix-ui/react-label"),m=require("class-variance-authority"),g=require("@brightlocal/ui-components/lib/utils");function n(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const y=n(p),j=n(f),o=m.cva(["text-label","text-foreground"],{variants:{optional:{true:"after:ml-1 after:content-['(optional)']"},srOnly:{true:"sr-only"}},defaultVariants:{}}),l=y.forwardRef(({className:e,optional:a,srOnly:t,dataHook:r,trackingEl:i,trackingLabel:s,children:c,...u},d)=>b.jsx(j.Root,{ref:d,className:g.cn("flex items-center select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",o({optional:a,srOnly:t}),e),"data-hook":r,"data-slot":"label","data-tracking-el":i||"label","data-tracking-label":s,...u,children:c}));l.displayName="Label";exports.Label=l;exports.labelVariants=o;
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,aAAa;;;8EAalB,CAAC;AAEF,UAAU,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,qFAgCV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAEhC,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,aAAa;;;8EAUjB,CAAC;AAEH,UAAU,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,qFAgCV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAEhC,YAAY,EAAE,UAAU,EAAE,CAAC"}
package/dist/label.js CHANGED
@@ -1,51 +1,48 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import * as p from "@radix-ui/react-label";
2
+ import * as p from "react";
3
+ import * as m from "@radix-ui/react-label";
4
4
  import { cva as c } from "class-variance-authority";
5
- import { cn as f } from "@brightlocal/ui-components/lib/utils";
6
- const b = c(
7
- ["text-sm font-medium leading-none", "text-foreground"],
8
- {
9
- variants: {
10
- optional: {
11
- true: "after:ml-1 after:content-['(optional)']"
12
- },
13
- srOnly: {
14
- true: "sr-only"
15
- }
5
+ import { cn as b } from "@brightlocal/ui-components/lib/utils";
6
+ const f = c(["text-label", "text-foreground"], {
7
+ variants: {
8
+ optional: {
9
+ true: "after:ml-1 after:content-['(optional)']"
16
10
  },
17
- defaultVariants: {}
18
- }
19
- ), u = m.forwardRef(
11
+ srOnly: {
12
+ true: "sr-only"
13
+ }
14
+ },
15
+ defaultVariants: {}
16
+ }), u = p.forwardRef(
20
17
  ({
21
18
  className: a,
22
19
  optional: e,
23
20
  srOnly: t,
24
- dataHook: o,
25
- trackingEl: r,
21
+ dataHook: r,
22
+ trackingEl: o,
26
23
  trackingLabel: l,
27
- children: n,
28
- ...i
24
+ children: i,
25
+ ...n
29
26
  }, s) => /* @__PURE__ */ d(
30
- p.Root,
27
+ m.Root,
31
28
  {
32
29
  ref: s,
33
- className: f(
30
+ className: b(
34
31
  "flex items-center select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
35
- b({ optional: e, srOnly: t }),
32
+ f({ optional: e, srOnly: t }),
36
33
  a
37
34
  ),
38
- "data-hook": o,
35
+ "data-hook": r,
39
36
  "data-slot": "label",
40
- "data-tracking-el": r || "label",
37
+ "data-tracking-el": o || "label",
41
38
  "data-tracking-label": l,
42
- ...i,
43
- children: n
39
+ ...n,
40
+ children: i
44
41
  }
45
42
  )
46
43
  );
47
44
  u.displayName = "Label";
48
45
  export {
49
46
  u as Label,
50
- b as labelVariants
47
+ f as labelVariants
51
48
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react");function a(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const l=a(c),u=130;function s({children:t,size:e,slot:n}){const o=l.isValidElement(t)&&typeof t.type=="function"?l.cloneElement(t,{size:e}):t;return r.jsx("div",{className:"flex shrink-0 items-center justify-center [&>*]:h-auto [&>*]:max-h-full [&>*]:max-w-full","data-slot":n,style:{width:e,height:e},children:o})}exports.BLOCK_ILLUSTRATION_SIZE=u;exports.BlockIllustration=s;
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ /**
3
+ * The size the design specifies for a page-scope illustration, shared by every
4
+ * block that draws one — `ProgressState` and `EmptyState` at page scope — so the
5
+ * artwork never resizes as one of those screens becomes the other.
6
+ *
7
+ * The artwork is the title's companion, not the subject of the screen: much
8
+ * larger and it outweighs the 24px heading under it, and the eye lands on the
9
+ * drawing instead of the words that say what to do next.
10
+ */
11
+ declare const BLOCK_ILLUSTRATION_SIZE = 130;
12
+ /**
13
+ * Props for the internal BlockIllustration wrapper.
14
+ */
15
+ interface BlockIllustrationProps {
16
+ /** The illustration element, exactly as the consumer passed it. */
17
+ children: React.ReactNode;
18
+ /** Rendered width and height in pixels. */
19
+ size: number;
20
+ /** The owning block's slot name, e.g. `"empty-screen-illustration"`. */
21
+ slot: string;
22
+ }
23
+ /**
24
+ * Renders a consumer-supplied illustration at the block's own size.
25
+ */
26
+ declare function BlockIllustration({ children, size, slot }: BlockIllustrationProps): import("react/jsx-runtime").JSX.Element;
27
+ export { BlockIllustration, BLOCK_ILLUSTRATION_SIZE };
28
+ //# sourceMappingURL=block-illustration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-illustration.d.ts","sourceRoot":"","sources":["../../src/lib/block-illustration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgC/B;;;;;;;;GAQG;AACH,QAAA,MAAM,uBAAuB,MAAM,CAAC;AAEpC;;GAEG;AACH,UAAU,sBAAsB;IAC9B,mEAAmE;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,sBAAsB,2CA2B1E;AAED,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ const i = 130;
4
+ function m({ children: t, size: e, slot: l }) {
5
+ const n = o.isValidElement(t) && typeof t.type == "function" ? o.cloneElement(t, {
6
+ size: e
7
+ }) : t;
8
+ return /* @__PURE__ */ s(
9
+ "div",
10
+ {
11
+ className: "flex shrink-0 items-center justify-center [&>*]:h-auto [&>*]:max-h-full [&>*]:max-w-full",
12
+ "data-slot": l,
13
+ style: { width: e, height: e },
14
+ children: n
15
+ }
16
+ );
17
+ }
18
+ export {
19
+ i as BLOCK_ILLUSTRATION_SIZE,
20
+ m as BlockIllustration
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),g=require("react"),p=require("@brightlocal/ui-components/lib/utils"),f=require("../typography-text.cjs");function y(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const s=y(g),b=32,i=s.forwardRef(({className:t,dataHook:a,icon:e,message:r,slot:n,trackingEl:o,trackingLabel:l,...d},u)=>{const m=s.isValidElement(e)&&typeof e.type!="string"&&e.type!==s.Fragment?s.cloneElement(e,{size:b}):e;return c.jsxs("div",{ref:u,className:p.cn("bg-muted flex flex-col items-center justify-center gap-2 text-center",t),"data-hook":a,"data-slot":n,"data-tracking-el":o??n,"data-tracking-label":l,...d,children:[c.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground flex items-center justify-center [&_svg:not([class*='size-'])]:size-8","data-hook":`${a}-icon`,"data-slot":`${n}-icon`,children:m}),c.jsx(f.TypographyText,{align:"center",color:"muted","data-slot":`${n}-message`,dataHook:`${a}-message`,variant:"body-sm",children:r})]})});i.displayName="EmptyCanvas";exports.EmptyCanvas=i;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Props for the internal EmptyCanvas body.
4
+ */
5
+ interface EmptyCanvasProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children" | "title"> {
6
+ /** Required data-hook; the parts derive `-icon` and `-message` from it. */
7
+ dataHook: string;
8
+ /**
9
+ * The decorative glyph. This component owns its size — whatever the element
10
+ * carries is overridden — so no call site has a number to get wrong.
11
+ */
12
+ icon: React.ReactNode;
13
+ /** The one line under the glyph. */
14
+ message: string;
15
+ /** The calling component's slot name, e.g. `"chart-empty"`. */
16
+ slot: string;
17
+ /** Tracking element identifier for analytics. */
18
+ trackingEl?: string;
19
+ /** Tracking label for analytics context. */
20
+ trackingLabel?: string;
21
+ }
22
+ /**
23
+ * Renders the muted canvas surface with its glyph and line.
24
+ */
25
+ declare const EmptyCanvas: React.ForwardRefExoticComponent<EmptyCanvasProps & React.RefAttributes<HTMLDivElement>>;
26
+ export { EmptyCanvas };
27
+ //# sourceMappingURL=empty-canvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-canvas.d.ts","sourceRoot":"","sources":["../../src/lib/empty-canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmC/B;;GAEG;AACH,UAAU,gBAAiB,SAAQ,IAAI,CACrC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,UAAU,GAAG,OAAO,CACrB;IACC,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,QAAA,MAAM,WAAW,yFA6DhB,CAAC;AAIF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,62 @@
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import { cn as f } from "@brightlocal/ui-components/lib/utils";
4
+ import { TypographyText as g } from "../typography-text.js";
5
+ const y = 32, x = a.forwardRef(
6
+ ({
7
+ className: n,
8
+ dataHook: r,
9
+ icon: e,
10
+ message: i,
11
+ slot: t,
12
+ trackingEl: m,
13
+ trackingLabel: o,
14
+ ...d
15
+ }, c) => {
16
+ const l = a.isValidElement(e) && typeof e.type != "string" && e.type !== a.Fragment ? a.cloneElement(e, {
17
+ size: y
18
+ }) : e;
19
+ return /* @__PURE__ */ p(
20
+ "div",
21
+ {
22
+ ref: c,
23
+ className: f(
24
+ "bg-muted flex flex-col items-center justify-center gap-2 text-center",
25
+ n
26
+ ),
27
+ "data-hook": r,
28
+ "data-slot": t,
29
+ "data-tracking-el": m ?? t,
30
+ "data-tracking-label": o,
31
+ ...d,
32
+ children: [
33
+ /* @__PURE__ */ s(
34
+ "span",
35
+ {
36
+ "aria-hidden": "true",
37
+ className: "text-muted-foreground flex items-center justify-center [&_svg:not([class*='size-'])]:size-8",
38
+ "data-hook": `${r}-icon`,
39
+ "data-slot": `${t}-icon`,
40
+ children: l
41
+ }
42
+ ),
43
+ /* @__PURE__ */ s(
44
+ g,
45
+ {
46
+ align: "center",
47
+ color: "muted",
48
+ "data-slot": `${t}-message`,
49
+ dataHook: `${r}-message`,
50
+ variant: "body-sm",
51
+ children: i
52
+ }
53
+ )
54
+ ]
55
+ }
56
+ );
57
+ }
58
+ );
59
+ x.displayName = "EmptyCanvas";
60
+ export {
61
+ x as EmptyCanvas
62
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),t=e.cva("bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full",{variants:{align:{center:"",left:"shrink-0"}},defaultVariants:{align:"center"}});exports.emptyChipStyles=t;
@@ -0,0 +1,4 @@
1
+ export declare const emptyChipStyles: (props?: ({
2
+ align?: "center" | "left" | null | undefined;
3
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
4
+ //# sourceMappingURL=empty-chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-chip.d.ts","sourceRoot":"","sources":["../../src/lib/empty-chip.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,eAAe;;8EAQ3B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { cva as e } from "class-variance-authority";
2
+ const r = e(
3
+ "bg-muted text-muted-foreground flex size-10 items-center justify-center rounded-full",
4
+ {
5
+ variants: {
6
+ align: { center: "", left: "shrink-0" }
7
+ },
8
+ defaultVariants: { align: "center" }
9
+ }
10
+ );
11
+ export {
12
+ r as emptyChipStyles
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");function r({children:t}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{"aria-hidden":"true",className:"flex-1"}),t,e.jsx("div",{"aria-hidden":"true",className:"flex-[1.6]"})]})}exports.OpticalCenter=r;
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ interface OpticalCenterProps {
3
+ /** The content to hold at the optical centre. */
4
+ children: React.ReactNode;
5
+ }
6
+ /**
7
+ * Two flexible spacers in a 38/62 ratio around the children. The parent must
8
+ * be a `flex flex-1 flex-col` box for the ratio to have room to work.
9
+ */
10
+ declare function OpticalCenter({ children }: OpticalCenterProps): import("react/jsx-runtime").JSX.Element;
11
+ export { OpticalCenter };
12
+ //# sourceMappingURL=optical-center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optical-center.d.ts","sourceRoot":"","sources":["../../src/lib/optical-center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,UAAU,kBAAkB;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAQtD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}