@brightlocal/ui-components 2.19.0 → 2.21.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 (92) hide show
  1. package/AI_USAGE.md +2 -0
  2. package/README.md +27 -14
  3. package/component-meta.json +27 -11
  4. package/dist/alert-dialog.cjs +1 -1
  5. package/dist/alert-dialog.d.ts.map +1 -1
  6. package/dist/alert-dialog.js +34 -33
  7. package/dist/blocks/data-table.cjs +1 -1
  8. package/dist/blocks/data-table.d.ts.map +1 -1
  9. package/dist/blocks/data-table.js +14 -16
  10. package/dist/blocks/sidebar.cjs +1 -1
  11. package/dist/blocks/sidebar.d.ts +20 -2
  12. package/dist/blocks/sidebar.d.ts.map +1 -1
  13. package/dist/blocks/sidebar.js +99 -89
  14. package/dist/breadcrumb.cjs +1 -1
  15. package/dist/breadcrumb.d.ts +1 -1
  16. package/dist/breadcrumb.d.ts.map +1 -1
  17. package/dist/breadcrumb.js +9 -6
  18. package/dist/browser-entry.d.ts +2 -0
  19. package/dist/browser-entry.d.ts.map +1 -1
  20. package/dist/button.cjs +1 -1
  21. package/dist/button.d.ts.map +1 -1
  22. package/dist/button.js +12 -12
  23. package/dist/context-menu.cjs +1 -1
  24. package/dist/context-menu.d.ts.map +1 -1
  25. package/dist/context-menu.js +47 -46
  26. package/dist/dialog.cjs +1 -1
  27. package/dist/dialog.d.ts.map +1 -1
  28. package/dist/dialog.js +35 -34
  29. package/dist/dropdown-menu.cjs +1 -1
  30. package/dist/dropdown-menu.d.ts.map +1 -1
  31. package/dist/dropdown-menu.js +48 -47
  32. package/dist/hooks/use-overlay-pointer-lock.cjs +1 -0
  33. package/dist/hooks/use-overlay-pointer-lock.d.ts +20 -0
  34. package/dist/hooks/use-overlay-pointer-lock.d.ts.map +1 -0
  35. package/dist/hooks/use-overlay-pointer-lock.js +39 -0
  36. package/dist/index.cjs +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +88 -86
  40. package/dist/logo.cjs +1 -1
  41. package/dist/logo.d.ts +1 -1
  42. package/dist/logo.js +2 -2
  43. package/dist/navigation-menu.cjs +1 -1
  44. package/dist/navigation-menu.d.ts +19 -0
  45. package/dist/navigation-menu.d.ts.map +1 -1
  46. package/dist/navigation-menu.js +134 -96
  47. package/dist/pagination.cjs +1 -1
  48. package/dist/pagination.d.ts +12 -8
  49. package/dist/pagination.d.ts.map +1 -1
  50. package/dist/pagination.js +117 -113
  51. package/dist/popover.cjs +1 -1
  52. package/dist/popover.d.ts.map +1 -1
  53. package/dist/popover.js +21 -20
  54. package/dist/progress.cjs +1 -1
  55. package/dist/progress.d.ts +28 -2
  56. package/dist/progress.d.ts.map +1 -1
  57. package/dist/progress.js +90 -49
  58. package/dist/select.cjs +1 -1
  59. package/dist/select.d.ts.map +1 -1
  60. package/dist/select.js +25 -23
  61. package/dist/separator.cjs +1 -1
  62. package/dist/separator.d.ts +14 -0
  63. package/dist/separator.d.ts.map +1 -1
  64. package/dist/separator.js +90 -44
  65. package/dist/sheet.cjs +1 -1
  66. package/dist/sheet.d.ts.map +1 -1
  67. package/dist/sheet.js +29 -28
  68. package/dist/skeleton.cjs +1 -1
  69. package/dist/skeleton.js +1 -1
  70. package/dist/sonner.d.ts +1 -1
  71. package/package.json +5 -1
  72. package/src/blocks/data-table.tsx +0 -2
  73. package/src/blocks/sidebar.tsx +40 -13
  74. package/src/browser-entry.ts +10 -0
  75. package/src/components/alert-dialog.tsx +20 -14
  76. package/src/components/breadcrumb.tsx +6 -3
  77. package/src/components/button.tsx +7 -1
  78. package/src/components/context-menu.tsx +19 -13
  79. package/src/components/dialog.tsx +4 -0
  80. package/src/components/dropdown-menu.tsx +4 -0
  81. package/src/components/logo.tsx +3 -3
  82. package/src/components/navigation-menu.tsx +134 -32
  83. package/src/components/pagination.tsx +47 -67
  84. package/src/components/popover.tsx +22 -16
  85. package/src/components/progress.tsx +118 -14
  86. package/src/components/select.tsx +4 -0
  87. package/src/components/separator.tsx +91 -23
  88. package/src/components/sheet.tsx +4 -0
  89. package/src/components/skeleton.tsx +1 -1
  90. package/src/components/sonner.tsx +1 -1
  91. package/src/hooks/use-overlay-pointer-lock.ts +128 -0
  92. package/src/index.ts +1 -0
@@ -1,24 +1,24 @@
1
- import { jsx as a, jsxs as b, Fragment as D } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as u, Fragment as M } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import { createPortal as q } from "react-dom";
4
- import { Slot as y } from "@radix-ui/react-slot";
4
+ import { Slot as S } from "@radix-ui/react-slot";
5
5
  import { cva as O } from "class-variance-authority";
6
6
  import { ChevronRight as E, Ellipsis as X, Minus as V, Plus as _, ChevronsUpDown as Y, ChevronDown as z, Menu as Z, PanelLeft as J } from "@brightlocal/icons";
7
7
  import { cn as l } from "@brightlocal/ui-components/lib/utils";
8
- import { Button as B } from "../button.js";
8
+ import { Button as H } from "../button.js";
9
9
  import { Input as Q } from "../input.js";
10
- import { Separator as H } from "../separator.js";
10
+ import { Separator as P } from "../separator.js";
11
11
  import { DropdownMenu as ee, DropdownMenuTrigger as ae, DropdownMenuContent as te, DropdownMenuLabel as re, DropdownMenuSeparator as oe, DropdownMenuItem as se } from "../dropdown-menu.js";
12
12
  import { Popover as ne, PopoverTrigger as ie, PopoverContent as de } from "../popover.js";
13
13
  import { Sheet as le, SheetContent as ce, SheetTitle as ue, SheetDescription as be } from "../sheet.js";
14
14
  import { Accordion as pe, AccordionItem as fe, AccordionContent as me } from "../accordion.js";
15
15
  import * as he from "@radix-ui/react-accordion";
16
16
  import { ScrollArea as ge } from "../scroll-area.js";
17
- import { Skeleton as L } from "../skeleton.js";
17
+ import { Skeleton as B } from "../skeleton.js";
18
18
  import { Tooltip as xe, TooltipTrigger as ve, TooltipContent as we, TooltipProvider as Ne } from "../tooltip.js";
19
19
  import { useIsBelowBreakpoint as ke } from "../hooks/use-breakpoint.js";
20
20
  const w = "focus-visible:[box-shadow:0_0_0_1px_color-mix(in_srgb,var(--color-sidebar-ring)_50%,transparent),0_0_0_3px_rgba(0,0,0,0.1)]";
21
- var Se = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(Se || {}), ye = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(ye || {}), Ce = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(Ce || {}), Re = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(Re || {}), Me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(Me || {}), Ie = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(Ie || {}), De = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(De || {}), Ee = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(Ee || {}), Ae = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(Ae || {}), Oe = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(Oe || {});
21
+ var ye = /* @__PURE__ */ ((e) => (e.LEFT = "left", e))(ye || {}), Se = /* @__PURE__ */ ((e) => (e.SIDEBAR = "sidebar", e))(Se || {}), Ce = /* @__PURE__ */ ((e) => (e.OFFCANVAS = "offcanvas", e.ICON = "icon", e.NONE = "none", e))(Ce || {}), Re = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.XS = "xs", e))(Re || {}), Me = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.COLLAPSIBLE = "collapsible", e.ACTION = "action", e))(Me || {}), Ie = /* @__PURE__ */ ((e) => (e.SIMPLE = "simple", e.COLLAPSIBLE = "collapsible", e.DROPDOWN = "dropdown", e.BADGE = "badge", e.BIG_ICON = "bigIcon", e.CHECKBOX = "checkbox", e))(Ie || {}), De = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SM = "sm", e.LG = "lg", e))(De || {}), Ee = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.BORDER = "border", e.INDENT = "indent", e))(Ee || {}), Ae = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e))(Ae || {}), Oe = /* @__PURE__ */ ((e) => (e.CARET = "caret", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e.UP_DOWN = "upDown", e.PLUS_MINUS = "plusMinus", e.DOTS = "dots", e))(Oe || {});
22
22
  const _e = "sidebar:state", ze = 3600 * 24 * 7, Pe = "224px", Te = "336px", Le = "48px", Be = "b", F = i.createContext(null);
23
23
  function k() {
24
24
  const e = i.useContext(F);
@@ -35,16 +35,16 @@ const He = i.forwardRef(
35
35
  open: s,
36
36
  onOpenChange: n,
37
37
  className: d,
38
- style: u,
38
+ style: b,
39
39
  children: m,
40
40
  ...h
41
41
  }, f) => {
42
- const p = ke("lg"), [c, x] = i.useState(!1), [g, M] = i.useState(null), [I, K] = i.useState(o), S = s ?? I, C = i.useCallback(
42
+ const p = ke("lg"), [c, x] = i.useState(!1), [g, I] = i.useState(null), [D, K] = i.useState(o), y = s ?? D, C = i.useCallback(
43
43
  (v) => {
44
- const N = typeof v == "function" ? v(S) : v;
44
+ const N = typeof v == "function" ? v(y) : v;
45
45
  n ? n(N) : K(N), document.cookie = `${_e}=${N}; path=/; max-age=${ze}`;
46
46
  },
47
- [n, S]
47
+ [n, y]
48
48
  ), R = i.useCallback(() => p ? x((v) => !v) : C((v) => !v), [p, C, x]);
49
49
  i.useEffect(() => {
50
50
  const v = (N) => {
@@ -52,21 +52,21 @@ const He = i.forwardRef(
52
52
  };
53
53
  return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
54
54
  }, [R]);
55
- const T = S ? "expanded" : "collapsed", W = i.useMemo(
55
+ const L = y ? "expanded" : "collapsed", W = i.useMemo(
56
56
  () => ({
57
- state: T,
58
- open: S,
57
+ state: L,
58
+ open: y,
59
59
  setOpen: C,
60
60
  isMobile: p,
61
61
  openMobile: c,
62
62
  setOpenMobile: x,
63
63
  toggleSidebar: R,
64
64
  footerPortalEl: g,
65
- setFooterPortalEl: M
65
+ setFooterPortalEl: I
66
66
  }),
67
67
  [
68
- T,
69
- S,
68
+ L,
69
+ y,
70
70
  C,
71
71
  p,
72
72
  c,
@@ -90,7 +90,7 @@ const He = i.forwardRef(
90
90
  style: {
91
91
  "--sidebar-width": Pe,
92
92
  "--sidebar-width-icon": Le,
93
- ...u
93
+ ...b
94
94
  },
95
95
  ...h,
96
96
  children: m
@@ -109,13 +109,13 @@ const Fe = i.forwardRef(
109
109
  collapsible: n = "offcanvas",
110
110
  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- accepted for backward compat
111
111
  embedded: d,
112
- mobileTitle: u,
112
+ mobileTitle: b,
113
113
  mobileDescription: m,
114
114
  className: h,
115
115
  children: f,
116
116
  ...p
117
117
  }, c) => {
118
- const { isMobile: x, state: g, openMobile: M, setOpenMobile: I } = k();
118
+ const { isMobile: x, state: g, openMobile: I, setOpenMobile: D } = k();
119
119
  return n === "none" ? /* @__PURE__ */ a(
120
120
  "div",
121
121
  {
@@ -131,7 +131,7 @@ const Fe = i.forwardRef(
131
131
  ...p,
132
132
  children: f
133
133
  }
134
- ) : x ? /* @__PURE__ */ a(le, { open: M, onOpenChange: I, children: /* @__PURE__ */ b(
134
+ ) : x ? /* @__PURE__ */ a(le, { open: I, onOpenChange: D, children: /* @__PURE__ */ u(
135
135
  ce,
136
136
  {
137
137
  className: "bg-sidebar-background text-sidebar-foreground w-(--sidebar-width) p-6",
@@ -143,7 +143,7 @@ const Fe = i.forwardRef(
143
143
  "--sidebar-width": `min(${Te}, calc(100vw - 40px))`
144
144
  },
145
145
  children: [
146
- /* @__PURE__ */ a(ue, { className: "sr-only", children: u ?? "Navigation" }),
146
+ /* @__PURE__ */ a(ue, { className: "sr-only", children: b ?? "Navigation" }),
147
147
  /* @__PURE__ */ a(be, { className: "sr-only", children: m ?? "Main navigation menu" }),
148
148
  /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: f })
149
149
  ]
@@ -183,20 +183,20 @@ const $ = i.forwardRef(
183
183
  children: s,
184
184
  ...n
185
185
  }, d) => {
186
- const { toggleSidebar: u } = k(), m = o ?? "Toggle Sidebar";
187
- return /* @__PURE__ */ b(
188
- B,
186
+ const { toggleSidebar: b } = k(), m = o ?? "Toggle sidebar";
187
+ return /* @__PURE__ */ u(
188
+ H,
189
189
  {
190
190
  ref: d,
191
191
  iconOnly: !0,
192
192
  "aria-label": m,
193
- className: l("h-7 w-7", e),
193
+ className: l("relative h-7 w-7", e),
194
194
  "data-slot": "sidebar-trigger",
195
195
  dataHook: r,
196
196
  size: "sm",
197
197
  variant: "ghost",
198
198
  onClick: (h) => {
199
- t?.(h), u();
199
+ t?.(h), b();
200
200
  },
201
201
  ...n,
202
202
  children: [
@@ -210,7 +210,7 @@ const $ = i.forwardRef(
210
210
  $.displayName = "SidebarTrigger";
211
211
  const $e = i.forwardRef(
212
212
  ({ className: e, toggleAriaLabel: t, ...r }, o) => {
213
- const { toggleSidebar: s } = k(), n = t ?? "Toggle Sidebar";
213
+ const { toggleSidebar: s } = k(), n = t ?? "Toggle sidebar";
214
214
  return /* @__PURE__ */ a(
215
215
  "button",
216
216
  {
@@ -284,23 +284,33 @@ const Ue = i.forwardRef(
284
284
  );
285
285
  Ue.displayName = "SidebarHeader";
286
286
  const Ke = i.forwardRef(
287
- ({ className: e, dataHook: t, ...r }, o) => {
288
- const { footerPortalEl: s } = k(), n = /* @__PURE__ */ a(
289
- "footer",
290
- {
291
- ref: o,
292
- className: l("flex shrink-0 flex-col gap-1 p-1", e),
293
- "data-hook": t,
294
- "data-slot": "sidebar-footer",
295
- ...r
296
- }
297
- );
298
- return s ? q(n, s) : n;
287
+ ({ className: e, dataHook: t, separator: r = !0, ...o }, s) => {
288
+ const { footerPortalEl: n } = k(), d = /* @__PURE__ */ u(M, { children: [
289
+ r && /* @__PURE__ */ a(
290
+ P,
291
+ {
292
+ className: "group-data-[collapsible=icon]:mx-0",
293
+ "data-slot": "sidebar-footer-separator",
294
+ spacing: "md"
295
+ }
296
+ ),
297
+ /* @__PURE__ */ a(
298
+ "footer",
299
+ {
300
+ ref: s,
301
+ className: l("flex shrink-0 flex-col gap-1 p-1", e),
302
+ "data-hook": t,
303
+ "data-slot": "sidebar-footer",
304
+ ...o
305
+ }
306
+ )
307
+ ] });
308
+ return n ? q(d, n) : d;
299
309
  }
300
310
  );
301
311
  Ke.displayName = "SidebarFooter";
302
312
  const We = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
303
- H,
313
+ P,
304
314
  {
305
315
  ref: r,
306
316
  className: l(
@@ -314,7 +324,7 @@ const We = i.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
314
324
  We.displayName = "SidebarSeparator";
315
325
  const qe = i.forwardRef(
316
326
  ({ className: e, dataHook: t, ariaLabel: r = "Sidebar", children: o, ...s }, n) => {
317
- const { isMobile: d, setFooterPortalEl: u } = k(), m = i.useRef(null), [h, f] = i.useState(!1), p = i.useCallback(
327
+ const { isMobile: d, setFooterPortalEl: b } = k(), m = i.useRef(null), [h, f] = i.useState(!1), p = i.useCallback(
318
328
  (c) => {
319
329
  const x = c?.querySelector(
320
330
  '[data-slot="scroll-area-viewport"]'
@@ -328,7 +338,7 @@ const qe = i.forwardRef(
328
338
  if (!c) return;
329
339
  const x = () => f(c.scrollHeight > c.clientHeight), g = new ResizeObserver(x);
330
340
  return g.observe(c), c.firstElementChild && g.observe(c.firstElementChild), () => g.disconnect();
331
- }, []), /* @__PURE__ */ b(
341
+ }, []), /* @__PURE__ */ u(
332
342
  ge,
333
343
  {
334
344
  ref: p,
@@ -349,7 +359,7 @@ const qe = i.forwardRef(
349
359
  children: o
350
360
  }
351
361
  ),
352
- /* @__PURE__ */ a("div", { ref: u, className: "mt-auto" })
362
+ /* @__PURE__ */ a("div", { ref: b, className: "mt-auto" })
353
363
  ]
354
364
  }
355
365
  );
@@ -401,16 +411,16 @@ const Ve = O(
401
411
  variant: s = "default",
402
412
  isOpen: n = !1,
403
413
  onToggle: d,
404
- onAction: u,
414
+ onAction: b,
405
415
  children: m,
406
416
  ...h
407
417
  }, f) => {
408
- const p = r ? y : "div", c = () => {
409
- s === "collapsible" && d ? d() : s === "action" && u && u();
418
+ const p = r ? S : "div", c = () => {
419
+ s === "collapsible" && d ? d() : s === "action" && b && b();
410
420
  }, x = (g) => {
411
421
  (g.key === "Enter" || g.key === " ") && (g.preventDefault(), c());
412
422
  };
413
- return /* @__PURE__ */ b(
423
+ return /* @__PURE__ */ u(
414
424
  p,
415
425
  {
416
426
  ref: f,
@@ -443,7 +453,7 @@ const Ve = O(
443
453
  );
444
454
  Ye.displayName = "SidebarGroupLabel";
445
455
  const Ze = i.forwardRef(({ className: e, asChild: t = !1, ...r }, o) => /* @__PURE__ */ a(
446
- t ? y : "button",
456
+ t ? S : "button",
447
457
  {
448
458
  ref: o,
449
459
  className: l(
@@ -562,7 +572,7 @@ const aa = O(
562
572
  size: "default"
563
573
  }
564
574
  }
565
- ), P = i.forwardRef(
575
+ ), T = i.forwardRef(
566
576
  ({
567
577
  asChild: e = !1,
568
578
  isActive: t = !1,
@@ -571,9 +581,9 @@ const aa = O(
571
581
  tooltip: s,
572
582
  className: n,
573
583
  dataHook: d,
574
- ...u
584
+ ...b
575
585
  }, m) => {
576
- const h = e ? y : "button", { isMobile: f, state: p } = k(), c = /* @__PURE__ */ a(
586
+ const h = e ? S : "button", { isMobile: f, state: p } = k(), c = /* @__PURE__ */ a(
577
587
  h,
578
588
  {
579
589
  ref: m,
@@ -583,13 +593,13 @@ const aa = O(
583
593
  "data-size": o,
584
594
  "data-slot": "sidebar-menu-button",
585
595
  "data-variant": r,
586
- ...u
596
+ ...b
587
597
  }
588
598
  );
589
599
  return s ? (typeof s == "string" && (s = {
590
600
  children: s,
591
601
  dataHook: "sidebar-menu-button-tooltip"
592
- }), /* @__PURE__ */ b(xe, { children: [
602
+ }), /* @__PURE__ */ u(xe, { children: [
593
603
  /* @__PURE__ */ a(ve, { asChild: !0, children: c }),
594
604
  /* @__PURE__ */ a(
595
605
  we,
@@ -609,9 +619,9 @@ const aa = O(
609
619
  ] })) : c;
610
620
  }
611
621
  );
612
- P.displayName = "SidebarMenuButton";
622
+ T.displayName = "SidebarMenuButton";
613
623
  const ta = i.forwardRef(({ className: e, asChild: t = !1, showOnHover: r = !1, ...o }, s) => /* @__PURE__ */ a(
614
- t ? y : "button",
624
+ t ? S : "button",
615
625
  {
616
626
  ref: s,
617
627
  className: l(
@@ -650,11 +660,11 @@ ra.displayName = "SidebarMenuBadge";
650
660
  const oa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
651
661
  const s = i.useId(), n = i.useMemo(() => {
652
662
  let d = 0;
653
- for (let u = 0; u < s.length; u++)
654
- d = (d << 5) - d + s.charCodeAt(u), d |= 0;
663
+ for (let b = 0; b < s.length; b++)
664
+ d = (d << 5) - d + s.charCodeAt(b), d |= 0;
655
665
  return `${Math.abs(d) % 40 + 50}%`;
656
666
  }, [s]);
657
- return /* @__PURE__ */ b(
667
+ return /* @__PURE__ */ u(
658
668
  "div",
659
669
  {
660
670
  ref: o,
@@ -663,14 +673,14 @@ const oa = i.forwardRef(({ className: e, showIcon: t = !1, ...r }, o) => {
663
673
  ...r,
664
674
  children: [
665
675
  t && /* @__PURE__ */ a(
666
- L,
676
+ B,
667
677
  {
668
678
  className: "size-4 rounded-md",
669
679
  "data-slot": "sidebar-menu-skeleton-icon"
670
680
  }
671
681
  ),
672
682
  /* @__PURE__ */ a(
673
- L,
683
+ B,
674
684
  {
675
685
  className: "h-4 max-w-[--skeleton-width] flex-1",
676
686
  "data-slot": "sidebar-menu-skeleton-text",
@@ -730,7 +740,7 @@ const ia = i.forwardRef(
730
740
  dataHook: s,
731
741
  ...n
732
742
  }, d) => /* @__PURE__ */ a(
733
- e ? y : "a",
743
+ e ? S : "a",
734
744
  {
735
745
  ref: d,
736
746
  className: l(
@@ -774,8 +784,8 @@ function da({
774
784
  ) });
775
785
  }
776
786
  da.displayName = "SidebarMenuCollapsible";
777
- const la = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__ */ a(he.Trigger, { asChild: !0, children: /* @__PURE__ */ b(
778
- P,
787
+ const la = i.forwardRef(({ children: e, className: t, ...r }, o) => /* @__PURE__ */ a(he.Trigger, { asChild: !0, children: /* @__PURE__ */ u(
788
+ T,
779
789
  {
780
790
  ref: o,
781
791
  className: t,
@@ -823,7 +833,7 @@ const ua = i.forwardRef(
823
833
  ua.displayName = "SidebarDrawer";
824
834
  const ba = i.forwardRef(
825
835
  ({ className: e, dataHook: t = "sidebar-header-button", children: r, ...o }, s) => /* @__PURE__ */ a(
826
- B,
836
+ H,
827
837
  {
828
838
  ref: s,
829
839
  ...o,
@@ -850,7 +860,7 @@ const U = i.forwardRef(
850
860
  triggerAriaLabel: o,
851
861
  children: s,
852
862
  ...n
853
- }, d) => /* @__PURE__ */ b(
863
+ }, d) => /* @__PURE__ */ u(
854
864
  "button",
855
865
  {
856
866
  ref: d,
@@ -873,7 +883,7 @@ const U = i.forwardRef(
873
883
  )
874
884
  );
875
885
  U.displayName = "SidebarPopoverTrigger";
876
- const A = i.forwardRef(({ className: e, dataHook: t, icon: r, shortcut: o, children: s, ...n }, d) => /* @__PURE__ */ b(
886
+ const A = i.forwardRef(({ className: e, dataHook: t, icon: r, shortcut: o, children: s, ...n }, d) => /* @__PURE__ */ u(
877
887
  "button",
878
888
  {
879
889
  ref: d,
@@ -903,7 +913,7 @@ const pa = i.forwardRef(
903
913
  addActionLabel: s,
904
914
  addActionIcon: n,
905
915
  onAddAction: d,
906
- children: u,
916
+ children: b,
907
917
  ...m
908
918
  }, h) => /* @__PURE__ */ a(
909
919
  "div",
@@ -913,8 +923,8 @@ const pa = i.forwardRef(
913
923
  "data-hook": t,
914
924
  "data-slot": "sidebar-popover-menu",
915
925
  ...m,
916
- children: u || /* @__PURE__ */ b(D, { children: [
917
- /* @__PURE__ */ b("div", { className: "flex flex-col items-start p-1", children: [
926
+ children: b || /* @__PURE__ */ u(M, { children: [
927
+ /* @__PURE__ */ u("div", { className: "flex flex-col items-start p-1", children: [
918
928
  r && /* @__PURE__ */ a("div", { className: "flex w-full items-center px-2 py-1.5", children: /* @__PURE__ */ a("span", { className: "text-muted-foreground flex-1 text-xs font-medium", children: r }) }),
919
929
  o?.map((f, p) => /* @__PURE__ */ a(
920
930
  A,
@@ -927,8 +937,8 @@ const pa = i.forwardRef(
927
937
  p
928
938
  ))
929
939
  ] }),
930
- d && /* @__PURE__ */ b(D, { children: [
931
- /* @__PURE__ */ a(H, {}),
940
+ d && /* @__PURE__ */ u(M, { children: [
941
+ /* @__PURE__ */ a(P, {}),
932
942
  /* @__PURE__ */ a("div", { className: "flex flex-col items-start p-1", children: /* @__PURE__ */ a(
933
943
  A,
934
944
  {
@@ -951,7 +961,7 @@ function fa({
951
961
  triggerClassName: s,
952
962
  children: n
953
963
  }) {
954
- return /* @__PURE__ */ b(ne, { children: [
964
+ return /* @__PURE__ */ u(ne, { children: [
955
965
  /* @__PURE__ */ a(ie, { asChild: !0, children: /* @__PURE__ */ a(
956
966
  U,
957
967
  {
@@ -984,12 +994,12 @@ function ma({
984
994
  menuGroups: s,
985
995
  triggerAriaLabel: n,
986
996
  align: d = "end",
987
- side: u = "top",
997
+ side: b = "top",
988
998
  children: m
989
999
  }) {
990
- return /* @__PURE__ */ b(ee, { children: [
991
- /* @__PURE__ */ a(ae, { asChild: !0, children: /* @__PURE__ */ b(
992
- P,
1000
+ return /* @__PURE__ */ u(ee, { children: [
1001
+ /* @__PURE__ */ a(ae, { asChild: !0, children: /* @__PURE__ */ u(
1002
+ T,
993
1003
  {
994
1004
  "aria-label": n ?? "Account menu",
995
1005
  className: "h-auto py-1.5",
@@ -997,7 +1007,7 @@ function ma({
997
1007
  size: "lg",
998
1008
  children: [
999
1009
  o,
1000
- /* @__PURE__ */ b("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
1010
+ /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
1001
1011
  /* @__PURE__ */ a("span", { className: "truncate text-sm font-semibold", children: t }),
1002
1012
  /* @__PURE__ */ a("span", { className: "truncate text-xs font-normal", children: r })
1003
1013
  ] })
@@ -1010,19 +1020,19 @@ function ma({
1010
1020
  align: d,
1011
1021
  className: "w-56",
1012
1022
  dataHook: `${e}-content`,
1013
- side: u,
1023
+ side: b,
1014
1024
  sideOffset: 4,
1015
- children: m || /* @__PURE__ */ b(D, { children: [
1016
- /* @__PURE__ */ b(re, { className: "flex items-center gap-2 px-1 py-1.5", children: [
1025
+ children: m || /* @__PURE__ */ u(M, { children: [
1026
+ /* @__PURE__ */ u(re, { className: "flex items-center gap-2 px-1 py-1.5", children: [
1017
1027
  o,
1018
- /* @__PURE__ */ b("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
1028
+ /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-none", children: [
1019
1029
  /* @__PURE__ */ a("span", { className: "truncate text-sm font-semibold", children: t }),
1020
1030
  /* @__PURE__ */ a("span", { className: "truncate text-xs font-normal", children: r })
1021
1031
  ] })
1022
1032
  ] }),
1023
- s?.map((h, f) => /* @__PURE__ */ b(i.Fragment, { children: [
1033
+ s?.map((h, f) => /* @__PURE__ */ u(i.Fragment, { children: [
1024
1034
  /* @__PURE__ */ a(oe, {}),
1025
- h.map((p, c) => /* @__PURE__ */ b(se, { onClick: p.onClick, children: [
1035
+ h.map((p, c) => /* @__PURE__ */ u(se, { onClick: p.onClick, children: [
1026
1036
  p.icon,
1027
1037
  p.label
1028
1038
  ] }, c))
@@ -1042,10 +1052,10 @@ const ha = i.forwardRef(
1042
1052
  description: s,
1043
1053
  timestamp: n,
1044
1054
  ...d
1045
- }, u) => /* @__PURE__ */ b(
1055
+ }, b) => /* @__PURE__ */ u(
1046
1056
  "button",
1047
1057
  {
1048
- ref: u,
1058
+ ref: b,
1049
1059
  className: l(
1050
1060
  "border-sidebar-border text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent flex w-full flex-col gap-2 border-b p-4 text-left transition-colors duration-150 ease-in-out outline-none",
1051
1061
  w,
@@ -1056,7 +1066,7 @@ const ha = i.forwardRef(
1056
1066
  type: "button",
1057
1067
  ...d,
1058
1068
  children: [
1059
- /* @__PURE__ */ b("div", { className: "flex w-full items-center justify-between text-sm", children: [
1069
+ /* @__PURE__ */ u("div", { className: "flex w-full items-center justify-between text-sm", children: [
1060
1070
  /* @__PURE__ */ a("span", { children: r }),
1061
1071
  n && /* @__PURE__ */ a("span", { children: n })
1062
1072
  ] }),
@@ -1090,7 +1100,7 @@ export {
1090
1100
  Qe as SidebarMenu,
1091
1101
  ta as SidebarMenuAction,
1092
1102
  ra as SidebarMenuBadge,
1093
- P as SidebarMenuButton,
1103
+ T as SidebarMenuButton,
1094
1104
  De as SidebarMenuButtonSize,
1095
1105
  Ie as SidebarMenuButtonVariant,
1096
1106
  da as SidebarMenuCollapsible,
@@ -1109,9 +1119,9 @@ export {
1109
1119
  He as SidebarProvider,
1110
1120
  $e as SidebarRail,
1111
1121
  We as SidebarSeparator,
1112
- Se as SidebarSide,
1122
+ ye as SidebarSide,
1113
1123
  fa as SidebarSwitcher,
1114
1124
  $ as SidebarTrigger,
1115
- ye as SidebarVariant,
1125
+ Se as SidebarVariant,
1116
1126
  k as useSidebar
1117
1127
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),B=require("react"),x=require("@radix-ui/react-slot"),d=require("@brightlocal/icons"),o=require("@brightlocal/ui-components/lib/utils");function j(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const c=j(B),i=c.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:r,ariaLabel:t,...n},g)=>s.jsx("nav",{ref:g,"aria-label":t??"breadcrumb","data-hook":e,"data-slot":"breadcrumb","data-tracking-el":a,"data-tracking-label":r,...n}));i.displayName="Breadcrumb";const l=c.forwardRef(({className:e,...a},r)=>s.jsx("ol",{ref:r,className:o.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),"data-slot":"breadcrumb-list",...a}));l.displayName="BreadcrumbList";const u=c.forwardRef(({className:e,...a},r)=>s.jsx("li",{ref:r,className:o.cn("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...a}));u.displayName="BreadcrumbItem";const m=c.forwardRef(({asChild:e,className:a,...r},t)=>{const n=e?x.Slot:"a";return s.jsx(n,{ref:t,className:o.cn("hover:text-foreground focus-visible:shadow-default rounded-sm transition-colors outline-none",a),"data-slot":"breadcrumb-link",...r})});m.displayName="BreadcrumbLink";const b=c.forwardRef(({className:e,...a},r)=>s.jsx("span",{ref:r,"aria-current":"page","aria-disabled":"true",className:o.cn("text-foreground font-normal",e),"data-slot":"breadcrumb-page",role:"link",...a}));b.displayName="BreadcrumbPage";const f=c.forwardRef(({children:e,className:a,...r},t)=>s.jsx("li",{ref:t,"aria-hidden":"true",className:a,"data-slot":"breadcrumb-separator",role:"presentation",...r,children:e??s.jsx(d.ChevronRight,{size:14})}));f.displayName="BreadcrumbSeparator";const p=c.forwardRef(({className:e,srLabel:a="More",...r},t)=>s.jsxs("span",{ref:t,"aria-hidden":"true",className:o.cn("flex size-9 items-center justify-center",e),"data-slot":"breadcrumb-ellipsis",role:"presentation",...r,children:[s.jsx(d.MoreHorizontal,{}),s.jsx("span",{className:"sr-only",children:a})]}));p.displayName="BreadcrumbEllipsis";exports.Breadcrumb=i;exports.BreadcrumbEllipsis=p;exports.BreadcrumbItem=u;exports.BreadcrumbLink=m;exports.BreadcrumbList=l;exports.BreadcrumbPage=b;exports.BreadcrumbSeparator=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),g=require("react"),x=require("@radix-ui/react-slot"),d=require("@brightlocal/icons"),o=require("@brightlocal/ui-components/lib/utils");function j(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const c=j(g),i=c.forwardRef(({dataHook:e,trackingEl:a,trackingLabel:r,ariaLabel:t,...n},B)=>s.jsx("nav",{ref:B,"aria-label":t??"Breadcrumb","data-hook":e,"data-slot":"breadcrumb","data-tracking-el":a,"data-tracking-label":r,...n}));i.displayName="Breadcrumb";const l=c.forwardRef(({className:e,...a},r)=>s.jsx("ol",{ref:r,className:o.cn("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),"data-slot":"breadcrumb-list",...a}));l.displayName="BreadcrumbList";const u=c.forwardRef(({className:e,...a},r)=>s.jsx("li",{ref:r,className:o.cn("inline-flex items-center gap-1.5",e),"data-slot":"breadcrumb-item",...a}));u.displayName="BreadcrumbItem";const m=c.forwardRef(({asChild:e,className:a,...r},t)=>{const n=e?x.Slot:"a";return s.jsx(n,{ref:t,className:o.cn("hover:text-foreground focus-visible:shadow-default rounded-sm transition-colors outline-none",a),"data-slot":"breadcrumb-link",...r})});m.displayName="BreadcrumbLink";const b=c.forwardRef(({className:e,...a},r)=>s.jsx("span",{ref:r,"aria-current":"page","aria-disabled":"true",className:o.cn("text-foreground font-normal",e),"data-slot":"breadcrumb-page",role:"link",...a}));b.displayName="BreadcrumbPage";const f=c.forwardRef(({children:e,className:a,...r},t)=>s.jsx("li",{ref:t,"aria-hidden":"true",className:a,"data-slot":"breadcrumb-separator",role:"presentation",...r,children:e??s.jsx(d.ChevronRight,{size:14})}));f.displayName="BreadcrumbSeparator";const p=c.forwardRef(({className:e,srLabel:a="More",...r},t)=>s.jsxs("span",{ref:t,"aria-hidden":"true",className:o.cn("relative flex size-9 items-center justify-center",e),"data-slot":"breadcrumb-ellipsis",role:"presentation",...r,children:[s.jsx(d.MoreHorizontal,{}),s.jsx("span",{className:"sr-only",children:a})]}));p.displayName="BreadcrumbEllipsis";exports.Breadcrumb=i;exports.BreadcrumbEllipsis=p;exports.BreadcrumbItem=u;exports.BreadcrumbLink=m;exports.BreadcrumbList=l;exports.BreadcrumbPage=b;exports.BreadcrumbSeparator=f;
@@ -17,7 +17,7 @@ interface BreadcrumbProps extends React.ComponentProps<"nav"> {
17
17
  trackingLabel?: string;
18
18
  /**
19
19
  * Accessible label for the breadcrumb navigation.
20
- * @default "breadcrumb"
20
+ * @default "Breadcrumb"
21
21
  */
22
22
  ariaLabel?: string;
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;GAEG;AACH,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC3D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;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AA,MAAM,UAAU,kGAcf,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,cAAc,2KAalB,CAAC;AAGH;;GAEG;AACH,QAAA,MAAM,cAAc,kKAUlB,CAAC;AAGH;;GAEG;AACH,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;IAC7D;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,QAAA,MAAM,cAAc,4GAgBnB,CAAC;AAGF;;;GAGG;AACH,QAAA,MAAM,cAAc,sKAalB,CAAC;AAGH;;;GAGG;AACH,QAAA,MAAM,mBAAmB,kKAcvB,CAAC;AAGH;;;GAGG;AACH,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IACpE;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,kBAAkB,8GAoBtB,CAAC;AAGH,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -1,14 +1,14 @@
1
- import { jsx as t, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import { Slot as n } from "@radix-ui/react-slot";
4
4
  import { MoreHorizontal as c, ChevronRight as u } from "@brightlocal/icons";
5
5
  import { cn as d } from "@brightlocal/ui-components/lib/utils";
6
6
  const b = s.forwardRef(
7
- ({ dataHook: r, trackingEl: a, trackingLabel: e, ariaLabel: o, ...i }, m) => /* @__PURE__ */ t(
7
+ ({ dataHook: r, trackingEl: a, trackingLabel: e, ariaLabel: o, ...i }, l) => /* @__PURE__ */ t(
8
8
  "nav",
9
9
  {
10
- ref: m,
11
- "aria-label": o ?? "breadcrumb",
10
+ ref: l,
11
+ "aria-label": o ?? "Breadcrumb",
12
12
  "data-hook": r,
13
13
  "data-slot": "breadcrumb",
14
14
  "data-tracking-el": a,
@@ -82,12 +82,15 @@ const N = s.forwardRef(({ children: r, className: a, ...e }, o) => /* @__PURE__
82
82
  }
83
83
  ));
84
84
  N.displayName = "BreadcrumbSeparator";
85
- const x = s.forwardRef(({ className: r, srLabel: a = "More", ...e }, o) => /* @__PURE__ */ l(
85
+ const x = s.forwardRef(({ className: r, srLabel: a = "More", ...e }, o) => /* @__PURE__ */ m(
86
86
  "span",
87
87
  {
88
88
  ref: o,
89
89
  "aria-hidden": "true",
90
- className: d("flex size-9 items-center justify-center", r),
90
+ className: d(
91
+ "relative flex size-9 items-center justify-center",
92
+ r
93
+ ),
91
94
  "data-slot": "breadcrumb-ellipsis",
92
95
  role: "presentation",
93
96
  ...e,
@@ -12,6 +12,8 @@ export declare const useContext: typeof React.useContext;
12
12
  export declare const useReducer: typeof React.useReducer;
13
13
  export declare const useLayoutEffect: typeof React.useLayoutEffect;
14
14
  export declare const Fragment: React.ExoticComponent<React.FragmentProps>;
15
+ export declare const version: string;
16
+ export declare const buildTime: string;
15
17
  export declare function mount(name: string, container: HTMLElement, props?: Record<string, unknown>): () => void;
16
18
  export declare function render(element: React.ReactNode, container: HTMLElement): () => void;
17
19
  //# sourceMappingURL=browser-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-entry.d.ts","sourceRoot":"","sources":["../src/browser-entry.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAKtC,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAE3B,eAAO,MAAM,CAAC,4BAAsB,CAAC;AACrC,eAAO,MAAM,QAAQ,uB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AAC;AAOvC,eAAO,MAAM,OAAO,QAC+C,CAAC;AACpE,eAAO,MAAM,SAAS,QAC0C,CAAC;AAmBjE,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,WAAW,EACtB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAClC,MAAM,IAAI,CA0BZ;AAED,wBAAgB,MAAM,CACpB,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,SAAS,EAAE,WAAW,GACrB,MAAM,IAAI,CAaZ"}
package/dist/button.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),_=require("@radix-ui/react-slot"),z=require("class-variance-authority"),q=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function B(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=B(O),P=16,b=z.cva(["rounded-full","inline-flex","font-semibold","items-center","justify-center","gap-2","whitespace-nowrap","transition-[color,background-color,border-color,box-shadow,opacity]","duration-150","ease-in-out","cursor-pointer","disabled:pointer-events-none","disabled:cursor-not-allowed","disabled:opacity-50","aria-disabled:opacity-50","[&_svg]:pointer-events-none","[&_svg]:shrink-0","shrink-0","outline-none","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive"],{variants:{variant:{primary:["bg-primary","dark:bg-green-400","text-primary-foreground","dark:text-[var(--ds-colors-primary-foreground-light)]","hover:bg-primary/90","focus-visible:shadow-default"],secondary:["bg-secondary","text-secondary-foreground","hover:bg-secondary/80","focus-visible:shadow-default"],warning:["bg-warning-background","hover:bg-warning-background/80","text-warning-foreground","focus-visible:shadow-default"],destructive:["bg-destructive","dark:bg-red-400/90","hover:bg-destructive/80","dark:hover:bg-red-400/90","text-destructive-foreground","dark:text-red-950","focus-visible:shadow-destructive"],outline:["border","border-border","border-solid","bg-background","hover:bg-accent","hover:text-accent-foreground","dark:bg-input/30","dark:border-input","dark:hover:bg-input/80","dark:hover:border-input","focus-visible:shadow-default","focus-visible:border-ring"],ghost:["bg-transparent","text-foreground","hover:bg-accent","data-[state=open]:bg-accent","focus-visible:shadow-default"]},size:{default:"px-4 py-2 h-9 text-sm",sm:"py-2 px-3 h-8 text-xs",lg:"py-2 px-8 h-10 text-sm [&_svg:not([class*='size-'])]:size-5"},state:{default:"",loading:"pointer-events-none",disabled:"pointer-events-none opacity-50"},fullWidth:{false:"",true:"w-full"}},defaultVariants:{variant:"primary",size:"default",state:"default",fullWidth:!1}}),k=c.forwardRef(({className:e,variant:t="primary",size:r="default",fullWidth:o=!1,asChild:l=!1,dataHook:f,trackingEl:g,trackingLabel:v,iconOnly:w=!1,loading:n=!1,ariaLabel:j,disabled:p=!1,children:a,...u},y)=>{const h=l?_.Slot:"button",m=p||n;let i=w;!i&&c.Children.count(a)===1&&c.isValidElement(a)&&(i=a.props?.children==null);const S=n&&!l;let s="default";n?s="loading":p&&(s="disabled");const N=j??(n?`Loading: ${a||"Please wait"}`:void 0);return l?d.jsx(h,{ref:y,className:x.cn(b({variant:t,size:r,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,...u,children:a}):d.jsxs(h,{ref:y,"aria-busy":n?"true":void 0,"aria-disabled":m?"true":void 0,"aria-label":N,className:x.cn(b({variant:t,size:r,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,disabled:m,type:u.type??"button",...u,children:[S&&d.jsx("div",{className:"pointer-events-none flex items-center justify-center","data-slot":"button-loading-icon",children:d.jsx(q.Loader2,{className:"animate-spin",size:P})}),a]})});k.displayName="Button";exports.Button=k;exports.ButtonVariants=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),O=require("react"),_=require("@radix-ui/react-slot"),z=require("class-variance-authority"),q=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function B(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 c=B(O),P=16,b=z.cva(["rounded-full","inline-flex","font-semibold","items-center","justify-center","gap-2","whitespace-nowrap","transition-[color,background-color,border-color,box-shadow,opacity]","duration-150","ease-in-out","cursor-pointer","disabled:pointer-events-none","disabled:cursor-not-allowed","disabled:opacity-50","aria-disabled:opacity-50","[&_svg]:pointer-events-none","[&_svg]:shrink-0","shrink-0","outline-none","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive"],{variants:{variant:{primary:["bg-primary","dark:bg-green-400","text-primary-foreground","dark:text-[var(--ds-colors-primary-foreground-light)]","hover:bg-primary/90","focus-visible:shadow-default"],secondary:["bg-secondary","text-secondary-foreground","hover:bg-secondary/80","focus-visible:shadow-default"],warning:["bg-warning-background","hover:bg-warning-background/80","text-warning-foreground","focus-visible:shadow-default"],destructive:["bg-destructive","dark:bg-red-400/90","hover:bg-destructive/80","dark:hover:bg-red-400/90","text-destructive-foreground","dark:text-red-950","focus-visible:shadow-destructive"],outline:["border","border-border","border-solid","bg-background","hover:bg-accent","hover:text-accent-foreground","dark:bg-input/30","dark:border-input","dark:hover:bg-input/80","dark:hover:border-input","focus-visible:shadow-default","focus-visible:border-ring"],ghost:["bg-transparent","text-foreground","hover:bg-accent","data-[state=open]:bg-accent","focus-visible:shadow-default"]},size:{default:"px-4 py-2 h-9 text-sm",sm:"py-2 px-3 h-8 text-xs",lg:"py-2 px-8 h-10 text-sm [&_svg:not([class*='size-'])]:size-5"},state:{default:"",loading:"pointer-events-none",disabled:"pointer-events-none opacity-50"},fullWidth:{false:"",true:"w-full"}},defaultVariants:{variant:"primary",size:"default",state:"default",fullWidth:!1}}),k=c.forwardRef(({className:e,variant:t="primary",size:a="default",fullWidth:o=!1,asChild:l=!1,dataHook:f,trackingEl:g,trackingLabel:v,iconOnly:w=!1,loading:n=!1,ariaLabel:j,disabled:p=!1,children:r,...u},y)=>{const h=l?_.Slot:"button",m=p||n;let i=w;!i&&c.Children.count(r)===1&&c.isValidElement(r)&&(i=r.props?.children==null);const S=n&&!l;let s="default";n?s="loading":p&&(s="disabled");const N=j??(n?typeof r=="string"||typeof r=="number"?`Loading: ${r}`:"Loading":void 0);return l?d.jsx(h,{ref:y,className:x.cn(b({variant:t,size:a,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,...u,children:r}):d.jsxs(h,{ref:y,"aria-busy":n?"true":void 0,"aria-disabled":m?"true":void 0,"aria-label":N,className:x.cn(b({variant:t,size:a,state:s,fullWidth:o}),i&&"size-9 p-0",e),"data-hook":f,"data-slot":"button","data-tracking-el":g||`button-${t}`,"data-tracking-label":v,disabled:m,type:u.type??"button",...u,children:[S&&d.jsx("div",{className:"pointer-events-none flex items-center justify-center","data-slot":"button-loading-icon",children:d.jsx(q.Loader2,{className:"animate-spin",size:P})}),r]})});k.displayName="Button";exports.Button=k;exports.ButtonVariants=b;
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;GAEG;AACH,KAAK,kBAAkB,GAAG;IACxB;;;OAGG;IACH,OAAO,CAAC,EACJ,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,CAAC;IACd;;;OAGG;IACH,IAAI,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