@brightlocal/ui-components 0.4.0 → 0.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 (150) hide show
  1. package/README.md +2 -1
  2. package/dist/accordion.cjs +1 -1
  3. package/dist/accordion.js +2 -2
  4. package/dist/alert.cjs +1 -1
  5. package/dist/alert.js +64 -64
  6. package/dist/blocks/data-table.cjs +1 -1
  7. package/dist/blocks/data-table.js +47 -47
  8. package/dist/blocks/sidebar.cjs +1 -1
  9. package/dist/blocks/sidebar.d.ts.map +1 -1
  10. package/dist/blocks/sidebar.js +27 -26
  11. package/dist/breadcrumb.cjs +1 -1
  12. package/dist/breadcrumb.js +34 -34
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.d.ts.map +1 -1
  15. package/dist/button.js +58 -57
  16. package/dist/calendar.cjs +1 -1
  17. package/dist/calendar.d.ts.map +1 -1
  18. package/dist/calendar.js +19 -37
  19. package/dist/card.cjs +1 -1
  20. package/dist/card.d.ts +5 -0
  21. package/dist/card.d.ts.map +1 -1
  22. package/dist/card.js +49 -36
  23. package/dist/centred-layout.cjs +1 -1
  24. package/dist/centred-layout.d.ts +3 -8
  25. package/dist/centred-layout.d.ts.map +1 -1
  26. package/dist/centred-layout.js +33 -48
  27. package/dist/chart.cjs +2 -2
  28. package/dist/chart.d.ts +3 -1
  29. package/dist/chart.d.ts.map +1 -1
  30. package/dist/chart.js +21 -21
  31. package/dist/checkbox.cjs +1 -1
  32. package/dist/checkbox.js +9 -9
  33. package/dist/combobox.cjs +1 -1
  34. package/dist/combobox.d.ts +6 -1
  35. package/dist/combobox.d.ts.map +1 -1
  36. package/dist/combobox.js +126 -116
  37. package/dist/command.cjs +1 -1
  38. package/dist/command.js +35 -35
  39. package/dist/context-menu.cjs +1 -1
  40. package/dist/context-menu.js +3 -3
  41. package/dist/date-picker.cjs +1 -1
  42. package/dist/date-picker.js +7 -7
  43. package/dist/dialog.cjs +1 -1
  44. package/dist/dialog.js +22 -22
  45. package/dist/dropdown-menu.cjs +1 -1
  46. package/dist/dropdown-menu.d.ts.map +1 -1
  47. package/dist/dropdown-menu.js +47 -52
  48. package/dist/field.cjs +1 -1
  49. package/dist/field.d.ts.map +1 -1
  50. package/dist/field.js +50 -49
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +334 -319
  55. package/dist/input-chip.d.ts.map +1 -1
  56. package/dist/input-chip.js +18 -25
  57. package/dist/input-group.cjs +1 -1
  58. package/dist/input-group.js +10 -10
  59. package/dist/input-otp.cjs +1 -1
  60. package/dist/input-otp.js +6 -6
  61. package/dist/input-password.cjs +1 -1
  62. package/dist/input-password.d.ts.map +1 -1
  63. package/dist/input-password.js +56 -56
  64. package/dist/input.cjs +1 -1
  65. package/dist/input.js +9 -9
  66. package/dist/label.cjs +1 -1
  67. package/dist/label.js +1 -1
  68. package/dist/link.cjs +1 -1
  69. package/dist/link.d.ts.map +1 -1
  70. package/dist/link.js +1 -8
  71. package/dist/logo.cjs +1 -1
  72. package/dist/logo.d.ts.map +1 -1
  73. package/dist/logo.js +30 -17
  74. package/dist/menubar.cjs +1 -1
  75. package/dist/menubar.js +13 -13
  76. package/dist/navigation-menu.cjs +1 -1
  77. package/dist/navigation-menu.d.ts.map +1 -1
  78. package/dist/navigation-menu.js +2 -1
  79. package/dist/pagination.cjs +1 -1
  80. package/dist/pagination.d.ts.map +1 -1
  81. package/dist/pagination.js +28 -28
  82. package/dist/radio-group.cjs +1 -1
  83. package/dist/radio-group.js +3 -3
  84. package/dist/rating.cjs +1 -1
  85. package/dist/rating.js +8 -8
  86. package/dist/resizable.cjs +1 -1
  87. package/dist/resizable.d.ts +1 -1
  88. package/dist/resizable.js +1 -1
  89. package/dist/select.cjs +1 -1
  90. package/dist/select.d.ts +1 -1
  91. package/dist/select.d.ts.map +1 -1
  92. package/dist/select.js +40 -44
  93. package/dist/sheet.cjs +1 -1
  94. package/dist/sheet.d.ts +1 -1
  95. package/dist/sheet.d.ts.map +1 -1
  96. package/dist/sheet.js +19 -19
  97. package/dist/sonner.cjs +1 -1
  98. package/dist/sonner.js +1 -1
  99. package/dist/switch.cjs +1 -1
  100. package/dist/switch.js +28 -28
  101. package/dist/tabs.cjs +1 -1
  102. package/dist/tabs.d.ts.map +1 -1
  103. package/dist/tabs.js +10 -12
  104. package/dist/toggle.cjs +1 -1
  105. package/dist/toggle.js +9 -9
  106. package/dist/typography.cjs +1 -0
  107. package/dist/typography.d.ts +176 -0
  108. package/dist/typography.d.ts.map +1 -0
  109. package/dist/typography.js +331 -0
  110. package/package.json +2 -2
  111. package/src/blocks/data-table.tsx +10 -10
  112. package/src/blocks/sidebar.tsx +16 -15
  113. package/src/components/accordion.tsx +2 -2
  114. package/src/components/alert.tsx +10 -10
  115. package/src/components/breadcrumb.tsx +3 -3
  116. package/src/components/button.tsx +7 -7
  117. package/src/components/calendar.tsx +4 -19
  118. package/src/components/card.tsx +24 -1
  119. package/src/components/centred-layout.tsx +6 -29
  120. package/src/components/chart.tsx +5 -5
  121. package/src/components/checkbox.tsx +3 -3
  122. package/src/components/combobox.tsx +20 -8
  123. package/src/components/command.tsx +5 -5
  124. package/src/components/context-menu.tsx +3 -3
  125. package/src/components/date-picker.tsx +1 -1
  126. package/src/components/dialog.tsx +3 -3
  127. package/src/components/dropdown-menu.tsx +7 -12
  128. package/src/components/field.tsx +36 -33
  129. package/src/components/input-chip.tsx +1 -4
  130. package/src/components/input-group.tsx +1 -1
  131. package/src/components/input-otp.tsx +3 -3
  132. package/src/components/input-password.tsx +2 -10
  133. package/src/components/input.tsx +1 -1
  134. package/src/components/label.tsx +1 -1
  135. package/src/components/link.tsx +1 -5
  136. package/src/components/logo.tsx +16 -9
  137. package/src/components/menubar.tsx +3 -3
  138. package/src/components/navigation-menu.tsx +2 -1
  139. package/src/components/pagination.tsx +4 -8
  140. package/src/components/radio-group.tsx +2 -2
  141. package/src/components/rating.tsx +2 -2
  142. package/src/components/resizable.tsx +1 -1
  143. package/src/components/select.tsx +8 -12
  144. package/src/components/sheet.tsx +5 -5
  145. package/src/components/sonner.tsx +1 -1
  146. package/src/components/switch.tsx +1 -1
  147. package/src/components/tabs.tsx +0 -2
  148. package/src/components/toggle.tsx +1 -1
  149. package/src/components/typography.tsx +678 -0
  150. package/src/index.ts +1 -0
package/dist/combobox.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as n, jsxs as I, Fragment as j } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as I, Fragment as j } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- import { CheckIcon as z, LoaderIcon as P, ChevronsUpDownIcon as M } from "@brightlocal/icons";
3
+ import { Check as P, ChevronsUpDown as M } from "@brightlocal/icons";
4
4
  import { cva as G } from "class-variance-authority";
5
- import { cn as w } from "@brightlocal/ui-components/lib/utils";
5
+ import { cn as f } from "@brightlocal/ui-components/lib/utils";
6
6
  import { Popover as U, PopoverContent as _, PopoverTrigger as $ } from "@brightlocal/ui-components/popover";
7
- import { Command as F, CommandEmpty as O, CommandGroup as D, CommandInput as H, CommandItem as V, CommandList as q, CommandSeparator as A } from "@brightlocal/ui-components/command";
7
+ import { Command as F, CommandEmpty as O, CommandGroup as z, CommandInput as D, CommandItem as H, CommandList as V, CommandSeparator as q } from "@brightlocal/ui-components/command";
8
8
  const E = t.createContext(null);
9
9
  function y() {
10
10
  const o = t.useContext(E);
@@ -12,58 +12,58 @@ function y() {
12
12
  throw new Error("Combobox components must be used within a <Combobox>");
13
13
  return o;
14
14
  }
15
- function io({
15
+ function so({
16
16
  value: o,
17
17
  onValueChange: e,
18
- open: a,
18
+ open: n,
19
19
  onOpenChange: r,
20
20
  shouldFilter: s = !0,
21
- disabled: i = !1,
22
- children: d
21
+ disabled: d = !1,
22
+ children: i
23
23
  }) {
24
- const [f, m] = t.useState(""), [b, x] = t.useState(!1), [u, l] = t.useState(
24
+ const [x, c] = t.useState(""), [l, g] = t.useState(!1), [u, b] = t.useState(
25
25
  () => /* @__PURE__ */ new Map()
26
- ), g = o !== void 0, p = a !== void 0, C = g ? o : f, v = p ? a : b, h = t.useCallback(
27
- (c) => {
28
- p || x(c), r?.(c);
26
+ ), C = o !== void 0, p = n !== void 0, v = C ? o : x, h = p ? n : l, w = t.useCallback(
27
+ (m) => {
28
+ p || g(m), r?.(m);
29
29
  },
30
30
  [p, r]
31
31
  ), N = t.useCallback(
32
- (c) => {
33
- g || m(c), e?.(c);
32
+ (m) => {
33
+ C || c(m), e?.(m);
34
34
  },
35
- [g, e]
36
- ), R = t.useCallback((c, S) => {
37
- l((k) => {
38
- if (k.get(c) === S) return k;
35
+ [C, e]
36
+ ), R = t.useCallback((m, S) => {
37
+ b((k) => {
38
+ if (k.get(m) === S) return k;
39
39
  const L = new Map(k);
40
- return L.set(c, S), L;
40
+ return L.set(m, S), L;
41
41
  });
42
42
  }, []), T = t.useMemo(
43
43
  () => ({
44
- open: v,
45
- setOpen: h,
46
- value: C,
44
+ open: h,
45
+ setOpen: w,
46
+ value: v,
47
47
  onValueChange: N,
48
48
  shouldFilter: s,
49
- disabled: i,
49
+ disabled: d,
50
50
  itemLabels: u,
51
51
  registerItem: R
52
52
  }),
53
53
  [
54
- v,
55
54
  h,
56
- C,
55
+ w,
56
+ v,
57
57
  N,
58
58
  s,
59
- i,
59
+ d,
60
60
  u,
61
61
  R
62
62
  ]
63
63
  );
64
- return /* @__PURE__ */ n(E.Provider, { value: T, children: /* @__PURE__ */ n(U, { open: v, onOpenChange: h, children: d }) });
64
+ return /* @__PURE__ */ a(E.Provider, { value: T, children: /* @__PURE__ */ a(U, { open: h, onOpenChange: w, children: i }) });
65
65
  }
66
- const B = G(
66
+ const A = G(
67
67
  [
68
68
  // Base layout
69
69
  "relative flex w-full items-center justify-between gap-2",
@@ -89,8 +89,7 @@ const B = G(
89
89
  // Transitions
90
90
  "transition-[background-color,border-color,box-shadow] duration-200 ease-out",
91
91
  // Icon styles
92
- "[&_svg]:pointer-events-none [&_svg]:shrink-0",
93
- "[&_svg:not([class*='size-'])]:size-4"
92
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0"
94
93
  ],
95
94
  {
96
95
  variants: {
@@ -102,42 +101,42 @@ const B = G(
102
101
  variant: "default"
103
102
  }
104
103
  }
105
- ), J = t.forwardRef(
104
+ ), B = t.forwardRef(
106
105
  ({
107
106
  className: o,
108
107
  variant: e,
109
- dataHook: a,
108
+ dataHook: n,
110
109
  trackingEl: r,
111
110
  trackingLabel: s,
112
- children: i,
113
- ...d
114
- }, f) => {
115
- const { open: m, disabled: b, value: x } = y(), u = t.useId(), l = !x;
116
- return /* @__PURE__ */ n($, { asChild: !0, children: /* @__PURE__ */ I(
111
+ children: d,
112
+ ...i
113
+ }, x) => {
114
+ const { open: c, disabled: l, value: g } = y(), u = t.useId(), b = !g;
115
+ return /* @__PURE__ */ a($, { asChild: !0, children: /* @__PURE__ */ I(
117
116
  "button",
118
117
  {
119
- ref: f,
120
- "aria-controls": m ? u : void 0,
121
- "aria-expanded": m,
118
+ ref: x,
119
+ "aria-controls": c ? u : void 0,
120
+ "aria-expanded": c,
122
121
  "aria-haspopup": "listbox",
123
- className: w(B({ variant: e }), o),
124
- "data-hook": a,
125
- "data-placeholder": l,
122
+ className: f(A({ variant: e }), o),
123
+ "data-hook": n,
124
+ "data-placeholder": b,
126
125
  "data-slot": "combobox-trigger",
127
- "data-state": m ? "open" : "closed",
126
+ "data-state": c ? "open" : "closed",
128
127
  "data-tracking-el": r || "combobox-trigger",
129
128
  "data-tracking-label": s,
130
- disabled: b || d.disabled,
129
+ disabled: l || i.disabled,
131
130
  role: "combobox",
132
131
  type: "button",
133
- ...d,
132
+ ...i,
134
133
  children: [
135
- i,
136
- /* @__PURE__ */ n(
134
+ d,
135
+ /* @__PURE__ */ a(
137
136
  M,
138
137
  {
139
138
  "aria-hidden": "true",
140
- className: "text-muted-foreground ml-auto size-4 shrink-0"
139
+ className: "text-muted-foreground ml-auto shrink-0"
141
140
  }
142
141
  )
143
142
  ]
@@ -145,13 +144,13 @@ const B = G(
145
144
  ) });
146
145
  }
147
146
  );
148
- J.displayName = "ComboboxTrigger";
149
- function co({ placeholder: o, className: e }) {
150
- const { value: a, itemLabels: r } = y(), s = a ? r.get(a) || a : o;
151
- return /* @__PURE__ */ n(
147
+ B.displayName = "ComboboxTrigger";
148
+ function io({ placeholder: o, className: e }) {
149
+ const { value: n, itemLabels: r } = y(), s = n ? r.get(n) || n : o;
150
+ return /* @__PURE__ */ a(
152
151
  "span",
153
152
  {
154
- className: w(
153
+ className: f(
155
154
  "text-foreground overflow-hidden text-sm leading-normal font-medium text-ellipsis whitespace-nowrap",
156
155
  e
157
156
  ),
@@ -163,89 +162,94 @@ function co({ placeholder: o, className: e }) {
163
162
  function mo({
164
163
  dataHook: o,
165
164
  className: e,
166
- children: a,
167
- align: r = "start"
165
+ children: n,
166
+ align: r = "start",
167
+ hideList: s = !1
168
168
  }) {
169
- const { shouldFilter: s } = y();
170
- return /* @__PURE__ */ n(
169
+ const { shouldFilter: d } = y();
170
+ return /* @__PURE__ */ a(
171
171
  _,
172
172
  {
173
173
  align: r,
174
- className: w("w-[var(--radix-popover-trigger-width)] p-0", e),
174
+ className: f("w-[var(--radix-popover-trigger-width)] p-0", e),
175
175
  "data-slot": "combobox-popover",
176
- children: /* @__PURE__ */ n(
176
+ side: "bottom",
177
+ children: /* @__PURE__ */ a(
177
178
  F,
178
179
  {
179
- className: "border-0 shadow-none",
180
+ className: f(
181
+ "border-0 shadow-none",
182
+ s && "[&_[data-slot='command-input-wrapper']]:border-b-0"
183
+ ),
180
184
  "data-slot": "combobox-command",
181
185
  dataHook: o || "combobox-command",
182
- shouldFilter: s,
183
- children: a
186
+ shouldFilter: d,
187
+ children: n
184
188
  }
185
189
  )
186
190
  }
187
191
  );
188
192
  }
189
- const K = t.forwardRef((o, e) => /* @__PURE__ */ n(H, { ref: e, "data-slot": "combobox-input", ...o }));
190
- K.displayName = "ComboboxInput";
191
- const Q = t.forwardRef((o, e) => /* @__PURE__ */ n(q, { ref: e, "data-slot": "combobox-list", ...o }));
192
- Q.displayName = "ComboboxList";
193
- const W = t.forwardRef((o, e) => /* @__PURE__ */ n(O, { ref: e, "data-slot": "combobox-empty", ...o }));
194
- W.displayName = "ComboboxEmpty";
195
- const X = t.forwardRef((o, e) => /* @__PURE__ */ n(D, { ref: e, "data-slot": "combobox-group", ...o }));
196
- X.displayName = "ComboboxGroup";
197
- function Y(o, e, a) {
193
+ const J = t.forwardRef((o, e) => /* @__PURE__ */ a(D, { ref: e, "data-slot": "combobox-input", ...o }));
194
+ J.displayName = "ComboboxInput";
195
+ const K = t.forwardRef((o, e) => /* @__PURE__ */ a(V, { ref: e, "data-slot": "combobox-list", ...o }));
196
+ K.displayName = "ComboboxList";
197
+ const Q = t.forwardRef((o, e) => /* @__PURE__ */ a(O, { ref: e, "data-slot": "combobox-empty", ...o }));
198
+ Q.displayName = "ComboboxEmpty";
199
+ const W = t.forwardRef((o, e) => /* @__PURE__ */ a(z, { ref: e, "data-slot": "combobox-group", ...o }));
200
+ W.displayName = "ComboboxGroup";
201
+ function X(o, e, n) {
198
202
  if (!e || !e.trim())
199
203
  return o;
200
204
  const r = new RegExp(
201
205
  `(${e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`,
202
206
  "gi"
203
207
  ), s = o.split(r);
204
- return /* @__PURE__ */ n("span", { children: s.map(
205
- (i, d) => d % 2 === 1 ? /* @__PURE__ */ n("span", { className: a, children: i }, d) : /* @__PURE__ */ n(t.Fragment, { children: i }, d)
208
+ return /* @__PURE__ */ a("span", { children: s.map(
209
+ (d, i) => i % 2 === 1 ? /* @__PURE__ */ a("span", { className: n, children: d }, i) : /* @__PURE__ */ a(t.Fragment, { children: d }, i)
206
210
  ) });
207
211
  }
208
- const Z = t.forwardRef(
212
+ const Y = t.forwardRef(
209
213
  ({
210
214
  value: o,
211
215
  label: e,
212
- dataHook: a,
216
+ dataHook: n,
213
217
  children: r,
214
218
  className: s,
215
- highlight: i,
216
- highlightClassName: d,
217
- ...f
218
- }, m) => {
219
- const { value: b, onValueChange: x, setOpen: u, registerItem: l } = y(), g = b === o, p = t.useMemo(() => e || (typeof r == "string" ? r : typeof r == "number" ? String(r) : o), [e, r, o]), C = t.useRef(l);
219
+ highlight: d,
220
+ highlightClassName: i,
221
+ ...x
222
+ }, c) => {
223
+ const { value: l, onValueChange: g, setOpen: u, registerItem: b } = y(), C = l === o, p = t.useMemo(() => e || (typeof r == "string" ? r : typeof r == "number" ? String(r) : o), [e, r, o]), v = t.useRef(b);
220
224
  t.useEffect(() => {
221
- C.current = l;
222
- }, [l]), t.useEffect(() => {
223
- C.current(o, p);
225
+ v.current = b;
226
+ }, [b]), t.useEffect(() => {
227
+ v.current(o, p);
224
228
  }, [o, p]);
225
- const v = () => {
226
- x(o === b ? "" : o), u(!1);
227
- }, h = () => i && typeof r == "string" ? Y(
229
+ const h = () => {
230
+ g(o === l ? "" : o), u(!1);
231
+ }, w = () => d && typeof r == "string" ? X(
228
232
  r,
229
- i,
230
- d || "text-sm leading-normal font-semibold"
233
+ d,
234
+ i || "text-sm leading-normal font-semibold"
231
235
  ) : r;
232
236
  return /* @__PURE__ */ I(
233
- V,
237
+ H,
234
238
  {
235
- ref: m,
236
- className: w("justify-between", s),
239
+ ref: c,
240
+ className: f("justify-between", s),
237
241
  "data-slot": "combobox-item",
238
- dataHook: a,
242
+ dataHook: n,
239
243
  value: o,
240
- onSelect: v,
241
- ...f,
244
+ onSelect: h,
245
+ ...x,
242
246
  children: [
243
- h(),
244
- g && /* @__PURE__ */ n(
245
- z,
247
+ w(),
248
+ C && /* @__PURE__ */ a(
249
+ P,
246
250
  {
247
251
  "aria-hidden": "true",
248
- className: "text-muted-foreground size-4 shrink-0"
252
+ className: "text-muted-foreground shrink-0"
249
253
  }
250
254
  )
251
255
  ]
@@ -253,35 +257,41 @@ const Z = t.forwardRef(
253
257
  );
254
258
  }
255
259
  );
256
- Z.displayName = "ComboboxItem";
257
- const oo = t.forwardRef((o, e) => /* @__PURE__ */ n(A, { ref: e, "data-slot": "combobox-separator", ...o }));
258
- oo.displayName = "ComboboxSeparator";
259
- function lo({ className: o, children: e }) {
260
- return /* @__PURE__ */ n(
260
+ Y.displayName = "ComboboxItem";
261
+ const Z = t.forwardRef((o, e) => /* @__PURE__ */ a(q, { ref: e, "data-slot": "combobox-separator", ...o }));
262
+ Z.displayName = "ComboboxSeparator";
263
+ function co({ className: o, children: e }) {
264
+ return /* @__PURE__ */ a(
261
265
  "div",
262
266
  {
263
- className: w(
267
+ className: f(
264
268
  "text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",
265
269
  o
266
270
  ),
267
271
  "data-slot": "combobox-loading",
268
272
  children: e || /* @__PURE__ */ I(j, { children: [
269
- /* @__PURE__ */ n(P, { "aria-hidden": "true", className: "size-4 animate-spin" }),
273
+ /* @__PURE__ */ a(
274
+ "div",
275
+ {
276
+ "aria-hidden": "true",
277
+ className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent [animation-duration:0.6s]"
278
+ }
279
+ ),
270
280
  "Loading..."
271
281
  ] })
272
282
  }
273
283
  );
274
284
  }
275
285
  export {
276
- io as Combobox,
286
+ so as Combobox,
277
287
  mo as ComboboxContent,
278
- W as ComboboxEmpty,
279
- X as ComboboxGroup,
280
- K as ComboboxInput,
281
- Z as ComboboxItem,
282
- Q as ComboboxList,
283
- lo as ComboboxLoading,
284
- oo as ComboboxSeparator,
285
- J as ComboboxTrigger,
286
- co as ComboboxValue
288
+ Q as ComboboxEmpty,
289
+ W as ComboboxGroup,
290
+ J as ComboboxInput,
291
+ Y as ComboboxItem,
292
+ K as ComboboxList,
293
+ co as ComboboxLoading,
294
+ Z as ComboboxSeparator,
295
+ B as ComboboxTrigger,
296
+ io as ComboboxValue
287
297
  };
package/dist/command.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),z=require("react"),m=require("cmdk"),f=require("@brightlocal/icons"),O=require("@brightlocal/ui-components/button"),c=require("@brightlocal/ui-components/lib/utils");function E(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const d=E(z),C=d.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:o,...r},s)=>n.jsx(m.Command,{ref:s,className:c.cn("bg-popover text-popover-foreground flex w-full flex-col overflow-hidden rounded-lg border shadow-md",e),"data-hook":t,"data-slot":"command","data-tracking-el":a,"data-tracking-label":o,...r}));C.displayName="Command";const b=d.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:o,value:r,onValueChange:s,onClear:l,...i},S)=>{const u=d.useRef(null),[I,g]=d.useState("");d.useImperativeHandle(S,()=>u.current,[]);const p=r!==void 0,x=p?r:I,R=String(x).length>0,_=h=>{p||g(h),s?.(h)},q=()=>{p||g(""),s?.(""),l?.(),u.current?.focus()};return n.jsxs("div",{className:"border-base-border flex h-12 items-center gap-2 self-stretch border-b px-3","data-hook":t,"data-slot":"command-input-wrapper",children:[n.jsx(f.SearchIcon,{className:"size-4 shrink-0 opacity-50"}),n.jsx(m.Command.Input,{ref:u,className:c.cn("placeholder:text-muted-foreground flex w-full bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),"data-slot":"command-input","data-tracking-el":a,"data-tracking-label":o,value:x,onValueChange:_,...i}),R&&n.jsx(O.Button,{"aria-label":"Clear search",className:"text-muted-foreground hover:text-foreground",dataHook:"command-input-clear",variant:"ghost",onClick:q,children:n.jsx(f.XIcon,{className:"size-4"})})]})});b.displayName="CommandInput";const k=d.forwardRef(({className:e,dataHook:t,...a},o)=>n.jsx(m.Command.List,{ref:o,className:c.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),"data-hook":t,"data-slot":"command-list",...a}));k.displayName="CommandList";const y=d.forwardRef(({dataHook:e,...t},a)=>n.jsx(m.Command.Empty,{ref:a,className:"py-6 text-center text-sm","data-hook":e,"data-slot":"command-empty",...t}));y.displayName="CommandEmpty";const v=d.forwardRef(({className:e,dataHook:t,...a},o)=>n.jsx(m.Command.Group,{ref:o,className:c.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),"data-hook":t,"data-slot":"command-group",...a}));v.displayName="CommandGroup";const N=d.forwardRef(({className:e,dataHook:t,...a},o)=>n.jsx(m.Command.Separator,{ref:o,className:c.cn("bg-border -mx-1 h-px",e),"data-hook":t,"data-slot":"command-separator",...a}));N.displayName="CommandSeparator";const j=d.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:o,selected:r,children:s,...l},i)=>n.jsxs(m.Command.Item,{ref:i,className:c.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),"data-hook":t,"data-selected-item":r||void 0,"data-slot":"command-item","data-tracking-el":a,"data-tracking-label":o,...l,children:[s,r&&n.jsx(f.CheckIcon,{className:"text-foreground ml-auto size-4"})]}));j.displayName="CommandItem";const w=d.forwardRef(({className:e,dataHook:t,trackingEl:a,trackingLabel:o,...r},s)=>n.jsx("span",{ref:s,className:c.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),"data-hook":t,"data-slot":"command-shortcut","data-tracking-el":a,"data-tracking-label":o,...r}));w.displayName="CommandShortcut";exports.Command=C;exports.CommandEmpty=y;exports.CommandGroup=v;exports.CommandInput=b;exports.CommandItem=j;exports.CommandList=k;exports.CommandSeparator=N;exports.CommandShortcut=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),O=require("react"),s=require("cmdk"),f=require("@brightlocal/icons"),E=require("@brightlocal/ui-components/button"),c=require("@brightlocal/ui-components/lib/utils");function G(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const d=G(O),C=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,...r},m)=>n.jsx(s.Command,{ref:m,className:c.cn("bg-popover text-popover-foreground flex w-full flex-col overflow-hidden rounded-lg border shadow-md",a),"data-hook":t,"data-slot":"command","data-tracking-el":e,"data-tracking-label":o,...r}));C.displayName="Command";const b=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,value:r,onValueChange:m,onClear:l,...i},S)=>{const u=d.useRef(null),[R,g]=d.useState("");d.useImperativeHandle(S,()=>u.current,[]);const p=r!==void 0,x=p?r:R,I=String(x).length>0,_=h=>{p||g(h),m?.(h)},q=()=>{p||g(""),m?.(""),l?.(),u.current?.focus()};return n.jsxs("div",{className:"border-base-border flex h-12 items-center gap-2 self-stretch border-b px-3","data-hook":t,"data-slot":"command-input-wrapper",children:[n.jsx(f.Search,{className:"shrink-0 opacity-50"}),n.jsx(s.Command.Input,{ref:u,className:c.cn("placeholder:text-muted-foreground flex w-full bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",a),"data-slot":"command-input","data-tracking-el":e,"data-tracking-label":o,value:x,onValueChange:_,...i}),I&&n.jsx(E.Button,{"aria-label":"Clear search",className:"text-muted-foreground hover:text-foreground",dataHook:"command-input-clear",variant:"ghost",onClick:q,children:n.jsx(f.X,{})})]})});b.displayName="CommandInput";const k=d.forwardRef(({className:a,dataHook:t,...e},o)=>n.jsx(s.Command.List,{ref:o,className:c.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",a),"data-hook":t,"data-slot":"command-list",...e}));k.displayName="CommandList";const y=d.forwardRef(({dataHook:a,...t},e)=>n.jsx(s.Command.Empty,{ref:e,className:"py-6 text-center text-sm","data-hook":a,"data-slot":"command-empty",...t}));y.displayName="CommandEmpty";const v=d.forwardRef(({className:a,dataHook:t,...e},o)=>n.jsx(s.Command.Group,{ref:o,className:c.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",a),"data-hook":t,"data-slot":"command-group",...e}));v.displayName="CommandGroup";const N=d.forwardRef(({className:a,dataHook:t,...e},o)=>n.jsx(s.Command.Separator,{ref:o,className:c.cn("bg-border -mx-1 h-px",a),"data-hook":t,"data-slot":"command-separator",...e}));N.displayName="CommandSeparator";const j=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,selected:r,children:m,...l},i)=>n.jsxs(s.Command.Item,{ref:i,className:c.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",a),"data-hook":t,"data-selected-item":r||void 0,"data-slot":"command-item","data-tracking-el":e,"data-tracking-label":o,...l,children:[m,r&&n.jsx(f.Check,{className:"text-foreground ml-auto"})]}));j.displayName="CommandItem";const w=d.forwardRef(({className:a,dataHook:t,trackingEl:e,trackingLabel:o,...r},m)=>n.jsx("span",{ref:m,className:c.cn("text-muted-foreground ml-auto text-xs tracking-widest",a),"data-hook":t,"data-slot":"command-shortcut","data-tracking-el":e,"data-tracking-label":o,...r}));w.displayName="CommandShortcut";exports.Command=C;exports.CommandEmpty=y;exports.CommandGroup=v;exports.CommandInput=b;exports.CommandItem=j;exports.CommandList=k;exports.CommandSeparator=N;exports.CommandShortcut=w;
package/dist/command.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx as d, jsxs as x } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import { Command as s } from "cmdk";
4
- import { SearchIcon as N, XIcon as w, CheckIcon as I } from "@brightlocal/icons";
5
- import { Button as R } from "@brightlocal/ui-components/button";
4
+ import { Search as v, X as w, Check as R } from "@brightlocal/icons";
5
+ import { Button as I } from "@brightlocal/ui-components/button";
6
6
  import { cn as l } from "@brightlocal/ui-components/lib/utils";
7
- const _ = r.forwardRef(({ className: a, dataHook: e, trackingEl: t, trackingLabel: o, ...n }, m) => /* @__PURE__ */ d(
7
+ const S = r.forwardRef(({ className: a, dataHook: e, trackingEl: t, trackingLabel: o, ...n }, m) => /* @__PURE__ */ d(
8
8
  s,
9
9
  {
10
10
  ref: m,
@@ -19,8 +19,8 @@ const _ = r.forwardRef(({ className: a, dataHook: e, trackingEl: t, trackingLabe
19
19
  ...n
20
20
  }
21
21
  ));
22
- _.displayName = "Command";
23
- const S = r.forwardRef(
22
+ S.displayName = "Command";
23
+ const _ = r.forwardRef(
24
24
  ({
25
25
  className: a,
26
26
  dataHook: e,
@@ -33,9 +33,9 @@ const S = r.forwardRef(
33
33
  }, k) => {
34
34
  const p = r.useRef(null), [C, f] = r.useState("");
35
35
  r.useImperativeHandle(k, () => p.current, []);
36
- const u = n !== void 0, g = u ? n : C, b = String(g).length > 0, v = (h) => {
36
+ const u = n !== void 0, g = u ? n : C, b = String(g).length > 0, y = (h) => {
37
37
  u || f(h), m?.(h);
38
- }, y = () => {
38
+ }, N = () => {
39
39
  u || f(""), m?.(""), c?.(), p.current?.focus();
40
40
  };
41
41
  return /* @__PURE__ */ x(
@@ -45,7 +45,7 @@ const S = r.forwardRef(
45
45
  "data-hook": e,
46
46
  "data-slot": "command-input-wrapper",
47
47
  children: [
48
- /* @__PURE__ */ d(N, { className: "size-4 shrink-0 opacity-50" }),
48
+ /* @__PURE__ */ d(v, { className: "shrink-0 opacity-50" }),
49
49
  /* @__PURE__ */ d(
50
50
  s.Input,
51
51
  {
@@ -58,19 +58,19 @@ const S = r.forwardRef(
58
58
  "data-tracking-el": t,
59
59
  "data-tracking-label": o,
60
60
  value: g,
61
- onValueChange: v,
61
+ onValueChange: y,
62
62
  ...i
63
63
  }
64
64
  ),
65
65
  b && /* @__PURE__ */ d(
66
- R,
66
+ I,
67
67
  {
68
68
  "aria-label": "Clear search",
69
69
  className: "text-muted-foreground hover:text-foreground",
70
70
  dataHook: "command-input-clear",
71
71
  variant: "ghost",
72
- onClick: y,
73
- children: /* @__PURE__ */ d(w, { className: "size-4" })
72
+ onClick: N,
73
+ children: /* @__PURE__ */ d(w, {})
74
74
  }
75
75
  )
76
76
  ]
@@ -78,8 +78,8 @@ const S = r.forwardRef(
78
78
  );
79
79
  }
80
80
  );
81
- S.displayName = "CommandInput";
82
- const z = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
81
+ _.displayName = "CommandInput";
82
+ const E = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
83
83
  s.List,
84
84
  {
85
85
  ref: o,
@@ -92,8 +92,8 @@ const z = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__
92
92
  ...t
93
93
  }
94
94
  ));
95
- z.displayName = "CommandList";
96
- const E = r.forwardRef(({ dataHook: a, ...e }, t) => /* @__PURE__ */ d(
95
+ E.displayName = "CommandList";
96
+ const G = r.forwardRef(({ dataHook: a, ...e }, t) => /* @__PURE__ */ d(
97
97
  s.Empty,
98
98
  {
99
99
  ref: t,
@@ -103,8 +103,8 @@ const E = r.forwardRef(({ dataHook: a, ...e }, t) => /* @__PURE__ */ d(
103
103
  ...e
104
104
  }
105
105
  ));
106
- E.displayName = "CommandEmpty";
107
- const G = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
106
+ G.displayName = "CommandEmpty";
107
+ const L = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
108
108
  s.Group,
109
109
  {
110
110
  ref: o,
@@ -117,8 +117,8 @@ const G = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__
117
117
  ...t
118
118
  }
119
119
  ));
120
- G.displayName = "CommandGroup";
121
- const L = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
120
+ L.displayName = "CommandGroup";
121
+ const j = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__ */ d(
122
122
  s.Separator,
123
123
  {
124
124
  ref: o,
@@ -128,8 +128,8 @@ const L = r.forwardRef(({ className: a, dataHook: e, ...t }, o) => /* @__PURE__
128
128
  ...t
129
129
  }
130
130
  ));
131
- L.displayName = "CommandSeparator";
132
- const j = r.forwardRef(
131
+ j.displayName = "CommandSeparator";
132
+ const B = r.forwardRef(
133
133
  ({
134
134
  className: a,
135
135
  dataHook: e,
@@ -143,7 +143,7 @@ const j = r.forwardRef(
143
143
  {
144
144
  ref: i,
145
145
  className: l(
146
- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
146
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-3 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
147
147
  a
148
148
  ),
149
149
  "data-hook": e,
@@ -154,13 +154,13 @@ const j = r.forwardRef(
154
154
  ...c,
155
155
  children: [
156
156
  m,
157
- n && /* @__PURE__ */ d(I, { className: "text-foreground ml-auto size-4" })
157
+ n && /* @__PURE__ */ d(R, { className: "text-foreground ml-auto" })
158
158
  ]
159
159
  }
160
160
  )
161
161
  );
162
- j.displayName = "CommandItem";
163
- const B = r.forwardRef(
162
+ B.displayName = "CommandItem";
163
+ const H = r.forwardRef(
164
164
  ({ className: a, dataHook: e, trackingEl: t, trackingLabel: o, ...n }, m) => /* @__PURE__ */ d(
165
165
  "span",
166
166
  {
@@ -177,14 +177,14 @@ const B = r.forwardRef(
177
177
  }
178
178
  )
179
179
  );
180
- B.displayName = "CommandShortcut";
180
+ H.displayName = "CommandShortcut";
181
181
  export {
182
- _ as Command,
183
- E as CommandEmpty,
184
- G as CommandGroup,
185
- S as CommandInput,
186
- j as CommandItem,
187
- z as CommandList,
188
- L as CommandSeparator,
189
- B as CommandShortcut
182
+ S as Command,
183
+ G as CommandEmpty,
184
+ L as CommandGroup,
185
+ _ as CommandInput,
186
+ B as CommandItem,
187
+ E as CommandList,
188
+ j as CommandSeparator,
189
+ H as CommandShortcut
190
190
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),I=require("react"),z=require("@radix-ui/react-context-menu"),m=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils");function x(e){const n=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(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=x(I),a=x(z);function p({...e}){return o.jsx(a.Root,{"data-slot":"context-menu",...e})}p.displayName="ContextMenu";const f=s.forwardRef(({dataHook:e,...n},t)=>o.jsx(a.Trigger,{ref:t,"data-hook":e,"data-slot":"context-menu-trigger",...n}));f.displayName="ContextMenuTrigger";function b({...e}){return o.jsx(a.Group,{"data-slot":"context-menu-group",...e})}b.displayName="ContextMenuGroup";function g({...e}){return o.jsx(a.Portal,{"data-slot":"context-menu-portal",...e})}g.displayName="ContextMenuPortal";function C({...e}){return o.jsx(a.Sub,{"data-slot":"context-menu-sub",...e})}C.displayName="ContextMenuSub";function M({...e}){return o.jsx(a.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}M.displayName="ContextMenuRadioGroup";const h=s.forwardRef(({className:e,inset:n,children:t,dataHook:r,trackingEl:u,trackingLabel:i,...c},l)=>o.jsxs(a.SubTrigger,{ref:l,className:d.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none",n&&"pl-8",e),"data-hook":r,"data-slot":"context-menu-sub-trigger","data-tracking-el":u,"data-tracking-label":i,...c,children:[t,o.jsx(m.ChevronRight,{className:"ml-auto size-4"})]}));h.displayName="ContextMenuSubTrigger";const j=s.forwardRef(({className:e,...n},t)=>o.jsx(a.SubContent,{ref:t,className:d.cn("border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),"data-slot":"context-menu-sub-content",...n}));j.displayName="ContextMenuSubContent";const y=s.forwardRef(({className:e,...n},t)=>o.jsx(a.Portal,{children:o.jsx(a.Content,{ref:t,className:d.cn("border-border bg-popover text-popover-foreground animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),"data-slot":"context-menu-content",...n})}));y.displayName="ContextMenuContent";const N=s.forwardRef(({className:e,inset:n,dataHook:t,trackingEl:r,trackingLabel:u,...i},c)=>o.jsx(a.Item,{ref:c,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),"data-hook":t,"data-slot":"context-menu-item","data-tracking-el":r,"data-tracking-label":u,...i}));N.displayName="ContextMenuItem";const R=s.forwardRef(({className:e,children:n,checked:t,dataHook:r,trackingEl:u,trackingLabel:i,...c},l)=>o.jsxs(a.CheckboxItem,{ref:l,checked:t,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-hook":r,"data-slot":"context-menu-checkbox-item","data-tracking-el":u,"data-tracking-label":i,...c,children:[o.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(a.ItemIndicator,{children:o.jsx(m.Check,{className:"size-4"})})}),n]}));R.displayName="ContextMenuCheckboxItem";const S=s.forwardRef(({className:e,children:n,dataHook:t,trackingEl:r,trackingLabel:u,...i},c)=>o.jsxs(a.RadioItem,{ref:c,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-hook":t,"data-slot":"context-menu-radio-item","data-tracking-el":r,"data-tracking-label":u,...i,children:[o.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(a.ItemIndicator,{children:o.jsx(m.Circle,{className:"size-2 fill-current"})})}),n]}));S.displayName="ContextMenuRadioItem";const k=s.forwardRef(({className:e,inset:n,...t},r)=>o.jsx(a.Label,{ref:r,className:d.cn("text-foreground px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),"data-slot":"context-menu-label",...t}));k.displayName="ContextMenuLabel";const w=s.forwardRef(({className:e,...n},t)=>o.jsx(a.Separator,{ref:t,className:d.cn("bg-border -mx-1 my-1 h-px",e),"data-slot":"context-menu-separator",...n}));w.displayName="ContextMenuSeparator";const v=s.forwardRef(({className:e,...n},t)=>o.jsx("span",{ref:t,className:d.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),"data-slot":"context-menu-shortcut",...n}));v.displayName="ContextMenuShortcut";exports.ContextMenu=p;exports.ContextMenuCheckboxItem=R;exports.ContextMenuContent=y;exports.ContextMenuGroup=b;exports.ContextMenuItem=N;exports.ContextMenuLabel=k;exports.ContextMenuPortal=g;exports.ContextMenuRadioGroup=M;exports.ContextMenuRadioItem=S;exports.ContextMenuSeparator=w;exports.ContextMenuShortcut=v;exports.ContextMenuSub=C;exports.ContextMenuSubContent=j;exports.ContextMenuSubTrigger=h;exports.ContextMenuTrigger=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),I=require("react"),z=require("@radix-ui/react-context-menu"),m=require("@brightlocal/icons"),d=require("@brightlocal/ui-components/lib/utils");function x(e){const n=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(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=x(I),a=x(z);function p({...e}){return o.jsx(a.Root,{"data-slot":"context-menu",...e})}p.displayName="ContextMenu";const f=s.forwardRef(({dataHook:e,...n},t)=>o.jsx(a.Trigger,{ref:t,"data-hook":e,"data-slot":"context-menu-trigger",...n}));f.displayName="ContextMenuTrigger";function b({...e}){return o.jsx(a.Group,{"data-slot":"context-menu-group",...e})}b.displayName="ContextMenuGroup";function g({...e}){return o.jsx(a.Portal,{"data-slot":"context-menu-portal",...e})}g.displayName="ContextMenuPortal";function C({...e}){return o.jsx(a.Sub,{"data-slot":"context-menu-sub",...e})}C.displayName="ContextMenuSub";function M({...e}){return o.jsx(a.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}M.displayName="ContextMenuRadioGroup";const h=s.forwardRef(({className:e,inset:n,children:t,dataHook:r,trackingEl:u,trackingLabel:i,...c},l)=>o.jsxs(a.SubTrigger,{ref:l,className:d.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none",n&&"pl-8",e),"data-hook":r,"data-slot":"context-menu-sub-trigger","data-tracking-el":u,"data-tracking-label":i,...c,children:[t,o.jsx(m.ChevronRight,{className:"ml-auto"})]}));h.displayName="ContextMenuSubTrigger";const j=s.forwardRef(({className:e,...n},t)=>o.jsx(a.SubContent,{ref:t,className:d.cn("border-border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),"data-slot":"context-menu-sub-content",...n}));j.displayName="ContextMenuSubContent";const y=s.forwardRef(({className:e,...n},t)=>o.jsx(a.Portal,{children:o.jsx(a.Content,{ref:t,className:d.cn("border-border bg-popover text-popover-foreground animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",e),"data-slot":"context-menu-content",...n})}));y.displayName="ContextMenuContent";const N=s.forwardRef(({className:e,inset:n,dataHook:t,trackingEl:r,trackingLabel:u,...i},c)=>o.jsx(a.Item,{ref:c,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),"data-hook":t,"data-slot":"context-menu-item","data-tracking-el":r,"data-tracking-label":u,...i}));N.displayName="ContextMenuItem";const R=s.forwardRef(({className:e,children:n,checked:t,dataHook:r,trackingEl:u,trackingLabel:i,...c},l)=>o.jsxs(a.CheckboxItem,{ref:l,checked:t,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-hook":r,"data-slot":"context-menu-checkbox-item","data-tracking-el":u,"data-tracking-label":i,...c,children:[o.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(a.ItemIndicator,{children:o.jsx(m.Check,{})})}),n]}));R.displayName="ContextMenuCheckboxItem";const S=s.forwardRef(({className:e,children:n,dataHook:t,trackingEl:r,trackingLabel:u,...i},c)=>o.jsxs(a.RadioItem,{ref:c,className:d.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),"data-hook":t,"data-slot":"context-menu-radio-item","data-tracking-el":r,"data-tracking-label":u,...i,children:[o.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(a.ItemIndicator,{children:o.jsx(m.Circle,{className:"fill-current",size:8})})}),n]}));S.displayName="ContextMenuRadioItem";const k=s.forwardRef(({className:e,inset:n,...t},r)=>o.jsx(a.Label,{ref:r,className:d.cn("text-foreground px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),"data-slot":"context-menu-label",...t}));k.displayName="ContextMenuLabel";const w=s.forwardRef(({className:e,...n},t)=>o.jsx(a.Separator,{ref:t,className:d.cn("bg-border -mx-1 my-1 h-px",e),"data-slot":"context-menu-separator",...n}));w.displayName="ContextMenuSeparator";const v=s.forwardRef(({className:e,...n},t)=>o.jsx("span",{ref:t,className:d.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),"data-slot":"context-menu-shortcut",...n}));v.displayName="ContextMenuShortcut";exports.ContextMenu=p;exports.ContextMenuCheckboxItem=R;exports.ContextMenuContent=y;exports.ContextMenuGroup=b;exports.ContextMenuItem=N;exports.ContextMenuLabel=k;exports.ContextMenuPortal=g;exports.ContextMenuRadioGroup=M;exports.ContextMenuRadioItem=S;exports.ContextMenuSeparator=w;exports.ContextMenuShortcut=v;exports.ContextMenuSub=C;exports.ContextMenuSubContent=j;exports.ContextMenuSubTrigger=h;exports.ContextMenuTrigger=f;
@@ -64,7 +64,7 @@ const y = r.forwardRef(
64
64
  ...c,
65
65
  children: [
66
66
  o,
67
- /* @__PURE__ */ t(x, { className: "ml-auto size-4" })
67
+ /* @__PURE__ */ t(x, { className: "ml-auto" })
68
68
  ]
69
69
  }
70
70
  )
@@ -139,7 +139,7 @@ const v = r.forwardRef(
139
139
  "data-tracking-label": l,
140
140
  ...c,
141
141
  children: [
142
- /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(p, { className: "size-4" }) }) }),
142
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(p, {}) }) }),
143
143
  a
144
144
  ]
145
145
  }
@@ -161,7 +161,7 @@ const S = r.forwardRef(
161
161
  "data-tracking-label": i,
162
162
  ...l,
163
163
  children: [
164
- /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(f, { className: "size-2 fill-current" }) }) }),
164
+ /* @__PURE__ */ t("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(f, { className: "fill-current", size: 8 }) }) }),
165
165
  a
166
166
  ]
167
167
  }