beez-ui 2.6.1 → 2.6.2

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Todos los cambios relevantes de beez-ui se documentan en este archivo con el for
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [2.6.2] - 2026-10-16
8
+
9
+ ### Fixed
10
+
11
+ - El `Toaster` exportado por beez-ui (desde `beez-ui` y `beez-ui/sonner`) también responde al click y al teclado (Alt+T) mientras hay un `Dialog`, `AlertDialog` o `Sheet` abierto, y devuelve el foco al modal cuando se cierra el toast enfocado, sin cambiar su aspecto ni sus props.
12
+
7
13
  ## [2.6.1] - 2026-10-16
8
14
 
9
15
  ### Fixed
package/README.md CHANGED
@@ -187,7 +187,7 @@ Next y TanStack Router son peers opcionales aislados en sus entrypoints. El prov
187
187
 
188
188
  La tabla conserva agrupación estable, columnas configurables, memoización, exclusiones y sincronización de qualifiers por identificadores. La barra conserva navegación por teclado, autocompletado y filtros de texto, rangos, fechas, presencia y carpetas. `Calendar` usa español por defecto y acepta otra locale. Los textos y configuraciones de filtros se pueden personalizar por props.
189
189
 
190
- Los componentes compartidos conservan el tema de LaTribu. Se incorporaron atributos `data-variant`/`data-size` del botón, scroll para paneles largos y persistencia opcional del sidebar. `Button` sigue la API de Arc: `variant` `primary`, `secondary`, `ghost` o `danger`, `size` `sm`, `md` o `lg` y `loading`; renderiza un `<button>` nativo con `type="button"` por defecto y no admite `asChild`: un link con aspecto de botón se estiliza como link. Se mantienen los estados deshabilitados y los skeletons deterministas. `AvatarImage` delega carga y fallback a Base UI; conserva carga diferida y recuperación al cambiar `src`. El export original `Toaster` permanece disponible; `ThemedToaster` agrega los estilos e iconos compartidos.
190
+ Los componentes compartidos conservan el tema de LaTribu. Se incorporaron atributos `data-variant`/`data-size` del botón, scroll para paneles largos y persistencia opcional del sidebar. `Button` sigue la API de Arc: `variant` `primary`, `secondary`, `ghost` o `danger`, `size` `sm`, `md` o `lg` y `loading`; renderiza un `<button>` nativo con `type="button"` por defecto y no admite `asChild`: un link con aspecto de botón se estiliza como link. Se mantienen los estados deshabilitados y los skeletons deterministas. `AvatarImage` delega carga y fallback a Base UI; conserva carga diferida y recuperación al cambiar `src`. El export `Toaster` conserva el aspecto y las props de Sonner, y sus toasts responden al click y al teclado (Alt+T) con un `Dialog`, `AlertDialog` o `Sheet` abierto; `ThemedToaster` se apoya en él y agrega los estilos e iconos compartidos.
191
191
 
192
192
  ## Componentes de producto reutilizables
193
193
 
@@ -1,8 +1,7 @@
1
- import { type ToasterProps } from "sonner";
1
+ import type { ToasterProps } from "sonner";
2
2
  /**
3
- * Renders shared notification styling using the consumer's resolved theme. Toasts take pointer input even while a
4
- * modal overlay (which disables pointer events on the page) is open, and Sonner's hotkey moves keyboard focus into
5
- * them past the modal's focus trap, so their actions stay usable from a dialog.
3
+ * Renders shared notification styling using the consumer's resolved theme, on top of beez-ui's `Toaster`, so its
4
+ * toasts stay usable from an open `Dialog`, `AlertDialog` or `Sheet`.
6
5
  */
7
6
  declare const ThemedToaster: ({ theme, className, ...props }: ToasterProps) => import("react").JSX.Element;
8
7
  export { ThemedToaster };
@@ -2,19 +2,16 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import { MotionSlot } from "../motion/motion-slot.js";
4
4
  import { cn } from "../lib/utils.js";
5
- import { letFocusReachToastLayer } from "../lib/toast-layer.js";
6
- import { useEffect } from "react";
7
- import { Toaster as Sonner } from "sonner";
5
+ import { Toaster } from "./toaster.js";
8
6
  import { useTheme } from "next-themes";
9
7
  import { CircleCheck, Info, TriangleAlert, OctagonAlert, Loader } from "lucide-react";
10
8
  import { jsx as _jsx } from "react/jsx-runtime";
11
9
  /**
12
- * Renders shared notification styling using the consumer's resolved theme. Toasts take pointer input even while a
13
- * modal overlay (which disables pointer events on the page) is open, and Sonner's hotkey moves keyboard focus into
14
- * them past the modal's focus trap, so their actions stay usable from a dialog.
10
+ * Renders shared notification styling using the consumer's resolved theme, on top of beez-ui's `Toaster`, so its
11
+ * toasts stay usable from an open `Dialog`, `AlertDialog` or `Sheet`.
15
12
  */
16
13
  const ThemedToaster = (t0) => {
17
- const $ = _c(17);
14
+ const $ = _c(16);
18
15
  let className;
19
16
  let props;
20
17
  let theme;
@@ -32,17 +29,19 @@ const ThemedToaster = (t0) => {
32
29
  const { resolvedTheme } = useTheme();
33
30
  const activeTheme = theme ?? (resolvedTheme === "dark" ? "dark" : "light");
34
31
  let t1;
35
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
36
- t1 = [];
37
- $[4] = t1;
32
+ if ($[4] !== className) {
33
+ t1 = cn("toaster group", className);
34
+ $[4] = className;
35
+ $[5] = t1;
38
36
  } else {
39
- t1 = $[4];
37
+ t1 = $[5];
40
38
  }
41
- useEffect(_temp, t1);
42
39
  let t2;
43
- if ($[5] !== className) {
44
- t2 = cn("toaster group pointer-events-auto", className);
45
- $[5] = className;
40
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
42
+ kind: "selection",
43
+ children: /* @__PURE__ */ _jsx(CircleCheck, { className: "size-4" })
44
+ });
46
45
  $[6] = t2;
47
46
  } else {
48
47
  t2 = $[6];
@@ -51,7 +50,7 @@ const ThemedToaster = (t0) => {
51
50
  if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
52
51
  t3 = /* @__PURE__ */ _jsx(MotionSlot, {
53
52
  kind: "selection",
54
- children: /* @__PURE__ */ _jsx(CircleCheck, { className: "size-4" })
53
+ children: /* @__PURE__ */ _jsx(Info, { className: "size-4" })
55
54
  });
56
55
  $[7] = t3;
57
56
  } else {
@@ -61,74 +60,61 @@ const ThemedToaster = (t0) => {
61
60
  if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
62
61
  t4 = /* @__PURE__ */ _jsx(MotionSlot, {
63
62
  kind: "selection",
64
- children: /* @__PURE__ */ _jsx(Info, { className: "size-4" })
63
+ children: /* @__PURE__ */ _jsx(TriangleAlert, { className: "size-4" })
65
64
  });
66
65
  $[8] = t4;
67
66
  } else {
68
67
  t4 = $[8];
69
68
  }
70
69
  let t5;
71
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
72
- t5 = /* @__PURE__ */ _jsx(MotionSlot, {
73
- kind: "selection",
74
- children: /* @__PURE__ */ _jsx(TriangleAlert, { className: "size-4" })
75
- });
76
- $[9] = t5;
77
- } else {
78
- t5 = $[9];
79
- }
80
70
  let t6;
81
- let t7;
82
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
83
- t6 = {
84
- success: t3,
85
- info: t4,
86
- warning: t5,
71
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
72
+ t5 = {
73
+ success: t2,
74
+ info: t3,
75
+ warning: t4,
87
76
  error: /* @__PURE__ */ _jsx(MotionSlot, {
88
77
  kind: "selection",
89
78
  children: /* @__PURE__ */ _jsx(OctagonAlert, { className: "size-4" })
90
79
  }),
91
80
  loading: /* @__PURE__ */ _jsx(Loader, { className: "size-4 animate-spin" })
92
81
  };
93
- t7 = {
82
+ t6 = {
94
83
  "--normal-bg": "var(--popover)",
95
84
  "--normal-text": "var(--popover-foreground)",
96
85
  "--normal-border": "var(--border)",
97
86
  "--border-radius": "var(--radius)"
98
87
  };
88
+ $[9] = t5;
99
89
  $[10] = t6;
100
- $[11] = t7;
101
90
  } else {
91
+ t5 = $[9];
102
92
  t6 = $[10];
103
- t7 = $[11];
104
93
  }
105
- let t8;
106
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
107
- t8 = { classNames: { toast: "cn-toast" } };
108
- $[12] = t8;
94
+ let t7;
95
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
96
+ t7 = { classNames: { toast: "cn-toast" } };
97
+ $[11] = t7;
109
98
  } else {
110
- t8 = $[12];
99
+ t7 = $[11];
111
100
  }
112
- let t9;
113
- if ($[13] !== activeTheme || $[14] !== props || $[15] !== t2) {
114
- t9 = /* @__PURE__ */ _jsx(Sonner, {
101
+ let t8;
102
+ if ($[12] !== activeTheme || $[13] !== props || $[14] !== t1) {
103
+ t8 = /* @__PURE__ */ _jsx(Toaster, {
115
104
  theme: activeTheme,
116
- className: t2,
117
- icons: t6,
118
- style: t7,
119
- toastOptions: t8,
105
+ className: t1,
106
+ icons: t5,
107
+ style: t6,
108
+ toastOptions: t7,
120
109
  ...props
121
110
  });
122
- $[13] = activeTheme;
123
- $[14] = props;
124
- $[15] = t2;
125
- $[16] = t9;
111
+ $[12] = activeTheme;
112
+ $[13] = props;
113
+ $[14] = t1;
114
+ $[15] = t8;
126
115
  } else {
127
- t9 = $[16];
116
+ t8 = $[15];
128
117
  }
129
- return t9;
118
+ return t8;
130
119
  };
131
120
  export { ThemedToaster };
132
- function _temp() {
133
- return letFocusReachToastLayer(document);
134
- }
@@ -0,0 +1,12 @@
1
+ import { type ComponentProps } from "react";
2
+ import { Toaster as SonnerToaster } from "sonner";
3
+ /**
4
+ * Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog`, `AlertDialog` or
5
+ * `Sheet` is open: the toast layer takes pointer input even though the modal disables pointer events on the page,
6
+ * and Sonner's hotkey moves keyboard focus into the toasts past the modal's focus trap (focus returns to the modal
7
+ * when the focused toast goes away). Accepts every Sonner prop, including `ref`, and keeps the consumer's `className`.
8
+ * @param props - Sonner's toaster props.
9
+ * @returns The toast layer.
10
+ */
11
+ declare const Toaster: ({ className, ...props }: ComponentProps<typeof SonnerToaster>) => import("react").JSX.Element;
12
+ export { Toaster };
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { letFocusReachToastLayer } from "../lib/toast-layer.js";
5
+ import { useEffect } from "react";
6
+ import { Toaster as SonnerToaster } from "sonner";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ /**
9
+ * Renders Sonner's toaster unchanged in look, but keeps its toasts usable while a modal `Dialog`, `AlertDialog` or
10
+ * `Sheet` is open: the toast layer takes pointer input even though the modal disables pointer events on the page,
11
+ * and Sonner's hotkey moves keyboard focus into the toasts past the modal's focus trap (focus returns to the modal
12
+ * when the focused toast goes away). Accepts every Sonner prop, including `ref`, and keeps the consumer's `className`.
13
+ * @param props - Sonner's toaster props.
14
+ * @returns The toast layer.
15
+ */
16
+ const Toaster = (t0) => {
17
+ const $ = _c(9);
18
+ let className;
19
+ let props;
20
+ if ($[0] !== t0) {
21
+ ({className, ...props} = t0);
22
+ $[0] = t0;
23
+ $[1] = className;
24
+ $[2] = props;
25
+ } else {
26
+ className = $[1];
27
+ props = $[2];
28
+ }
29
+ let t1;
30
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
31
+ t1 = [];
32
+ $[3] = t1;
33
+ } else {
34
+ t1 = $[3];
35
+ }
36
+ useEffect(_temp, t1);
37
+ let t2;
38
+ if ($[4] !== className) {
39
+ t2 = cn("pointer-events-auto", className);
40
+ $[4] = className;
41
+ $[5] = t2;
42
+ } else {
43
+ t2 = $[5];
44
+ }
45
+ let t3;
46
+ if ($[6] !== props || $[7] !== t2) {
47
+ t3 = /* @__PURE__ */ _jsx(SonnerToaster, {
48
+ className: t2,
49
+ ...props
50
+ });
51
+ $[6] = props;
52
+ $[7] = t2;
53
+ $[8] = t3;
54
+ } else {
55
+ t3 = $[8];
56
+ }
57
+ return t3;
58
+ };
59
+ export { Toaster };
60
+ function _temp() {
61
+ return letFocusReachToastLayer(document);
62
+ }
package/dist/sonner.d.ts CHANGED
@@ -1,2 +1,7 @@
1
- /** Exposes the shared notification implementation and its public types. */
1
+ /**
2
+ * Exposes the shared notification implementation and its public types. `Toaster` is beez-ui's own, which keeps
3
+ * Sonner's look and props but lets toasts work while a modal is open; this local export takes precedence over the
4
+ * one `export *` would bring from Sonner.
5
+ */
2
6
  export * from "sonner";
7
+ export { Toaster } from "./components/toaster.js";
package/dist/sonner.js CHANGED
@@ -1,3 +1,8 @@
1
1
  "use client";
2
- /** Exposes the shared notification implementation and its public types. */
2
+ /**
3
+ * Exposes the shared notification implementation and its public types. `Toaster` is beez-ui's own, which keeps
4
+ * Sonner's look and props but lets toasts work while a modal is open; this local export takes precedence over the
5
+ * one `export *` would bring from Sonner.
6
+ */
3
7
  export * from "sonner";
8
+ export { Toaster } from "./components/toaster.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beez-ui",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Shared UI components with the customizations extracted from TuTribu.",
5
5
  "type": "module",
6
6
  "sideEffects": [