beez-ui 0.4.2 → 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 (51) hide show
  1. package/CHANGELOG.md +31 -27
  2. package/README.md +22 -2
  3. package/dist/adapters/unpic-image.js +92 -14
  4. package/dist/components/alert-dialog.js +444 -26
  5. package/dist/components/alert.js +153 -18
  6. package/dist/components/animated-theme-toggler.js +215 -76
  7. package/dist/components/avatar.js +247 -15
  8. package/dist/components/badge.js +18 -16
  9. package/dist/components/button.js +85 -28
  10. package/dist/components/calendar.js +327 -68
  11. package/dist/components/card.js +39 -9
  12. package/dist/components/carousel.js +454 -84
  13. package/dist/components/checkbox.js +50 -3
  14. package/dist/components/data-table.js +827 -583
  15. package/dist/components/dialog.js +363 -22
  16. package/dist/components/dropdown-menu.js +543 -32
  17. package/dist/components/filter-query-bar.js +809 -468
  18. package/dist/components/filter-query-grammar.js +781 -736
  19. package/dist/components/form.js +305 -43
  20. package/dist/components/highlighter.js +142 -87
  21. package/dist/components/hover-card.js +97 -7
  22. package/dist/components/input-group.js +261 -41
  23. package/dist/components/input.js +8 -2
  24. package/dist/components/label.js +38 -3
  25. package/dist/components/link.js +45 -7
  26. package/dist/components/pagination.js +332 -16
  27. package/dist/components/popover.js +222 -16
  28. package/dist/components/radio-group.js +85 -5
  29. package/dist/components/select.js +451 -22
  30. package/dist/components/separator.js +43 -3
  31. package/dist/components/sheet.js +345 -22
  32. package/dist/components/sidebar.js +1385 -193
  33. package/dist/components/skeleton.js +6 -2
  34. package/dist/components/svgs/whatsappIcon.js +11 -1
  35. package/dist/components/switch.js +55 -3
  36. package/dist/components/table.js +288 -18
  37. package/dist/components/tabs.js +161 -18
  38. package/dist/components/textarea.js +7 -2
  39. package/dist/components/themed-toaster.js +63 -20
  40. package/dist/components/tooltip.js +128 -9
  41. package/dist/components/typing-animation.js +335 -150
  42. package/dist/constants/sidebar.js +1 -4
  43. package/dist/hooks/use-mobile.js +8 -8
  44. package/dist/hooks/use-sidebar-persistence.js +27 -27
  45. package/dist/lib/image-dimensions.js +2 -2
  46. package/dist/lib/year-month-filter.js +38 -40
  47. package/dist/next.js +69 -17
  48. package/dist/providers/beez-ui-provider.js +48 -7
  49. package/dist/providers/native-provider.js +40 -6
  50. package/dist/tanstack.js +35 -23
  51. package/package.json +4 -1
@@ -1,37 +1,378 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import * as React from "react";
3
4
  import { Dialog as DialogPrimitive } from "radix-ui";
4
5
  import { cn } from "../lib/utils.js";
5
6
  import { Button } from "./button.js";
6
7
  import { XIcon } from "lucide-react";
7
- function Dialog({ ...props }) {
8
- return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ function Dialog(t0) {
10
+ const $ = _c(4);
11
+ let props;
12
+ if ($[0] !== t0) {
13
+ ({...props} = t0);
14
+ $[0] = t0;
15
+ $[1] = props;
16
+ } else {
17
+ props = $[1];
18
+ }
19
+ let t1;
20
+ if ($[2] !== props) {
21
+ t1 = /* @__PURE__ */ _jsx(DialogPrimitive.Root, {
22
+ "data-slot": "dialog",
23
+ ...props
24
+ });
25
+ $[2] = props;
26
+ $[3] = t1;
27
+ } else {
28
+ t1 = $[3];
29
+ }
30
+ return t1;
9
31
  }
10
- function DialogTrigger({ ...props }) {
11
- return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
32
+ function DialogTrigger(t0) {
33
+ const $ = _c(4);
34
+ let props;
35
+ if ($[0] !== t0) {
36
+ ({...props} = t0);
37
+ $[0] = t0;
38
+ $[1] = props;
39
+ } else {
40
+ props = $[1];
41
+ }
42
+ let t1;
43
+ if ($[2] !== props) {
44
+ t1 = /* @__PURE__ */ _jsx(DialogPrimitive.Trigger, {
45
+ "data-slot": "dialog-trigger",
46
+ ...props
47
+ });
48
+ $[2] = props;
49
+ $[3] = t1;
50
+ } else {
51
+ t1 = $[3];
52
+ }
53
+ return t1;
12
54
  }
13
- function DialogPortal({ ...props }) {
14
- return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
55
+ function DialogPortal(t0) {
56
+ const $ = _c(4);
57
+ let props;
58
+ if ($[0] !== t0) {
59
+ ({...props} = t0);
60
+ $[0] = t0;
61
+ $[1] = props;
62
+ } else {
63
+ props = $[1];
64
+ }
65
+ let t1;
66
+ if ($[2] !== props) {
67
+ t1 = /* @__PURE__ */ _jsx(DialogPrimitive.Portal, {
68
+ "data-slot": "dialog-portal",
69
+ ...props
70
+ });
71
+ $[2] = props;
72
+ $[3] = t1;
73
+ } else {
74
+ t1 = $[3];
75
+ }
76
+ return t1;
15
77
  }
16
- function DialogClose({ ...props }) {
17
- return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
78
+ function DialogClose(t0) {
79
+ const $ = _c(4);
80
+ let props;
81
+ if ($[0] !== t0) {
82
+ ({...props} = t0);
83
+ $[0] = t0;
84
+ $[1] = props;
85
+ } else {
86
+ props = $[1];
87
+ }
88
+ let t1;
89
+ if ($[2] !== props) {
90
+ t1 = /* @__PURE__ */ _jsx(DialogPrimitive.Close, {
91
+ "data-slot": "dialog-close",
92
+ ...props
93
+ });
94
+ $[2] = props;
95
+ $[3] = t1;
96
+ } else {
97
+ t1 = $[3];
98
+ }
99
+ return t1;
18
100
  }
19
- function DialogOverlay({ className, ...props }) {
20
- return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-md data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className), ...props }));
101
+ function DialogOverlay(t0) {
102
+ const $ = _c(8);
103
+ let className;
104
+ let props;
105
+ if ($[0] !== t0) {
106
+ ({className, ...props} = t0);
107
+ $[0] = t0;
108
+ $[1] = className;
109
+ $[2] = props;
110
+ } else {
111
+ className = $[1];
112
+ props = $[2];
113
+ }
114
+ let t1;
115
+ if ($[3] !== className) {
116
+ t1 = cn("fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-md data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className);
117
+ $[3] = className;
118
+ $[4] = t1;
119
+ } else {
120
+ t1 = $[4];
121
+ }
122
+ let t2;
123
+ if ($[5] !== props || $[6] !== t1) {
124
+ t2 = /* @__PURE__ */ _jsx(DialogPrimitive.Overlay, {
125
+ "data-slot": "dialog-overlay",
126
+ className: t1,
127
+ ...props
128
+ });
129
+ $[5] = props;
130
+ $[6] = t1;
131
+ $[7] = t2;
132
+ } else {
133
+ t2 = $[7];
134
+ }
135
+ return t2;
21
136
  }
22
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
23
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] max-h-[calc(100svh-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", asChild: true, children: _jsxs(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Cerrar" })] }) }))] })] }));
137
+ function DialogContent(t0) {
138
+ const $ = _c(15);
139
+ let children;
140
+ let className;
141
+ let props;
142
+ let t1;
143
+ if ($[0] !== t0) {
144
+ ({className, children, showCloseButton: t1, ...props} = t0);
145
+ $[0] = t0;
146
+ $[1] = children;
147
+ $[2] = className;
148
+ $[3] = props;
149
+ $[4] = t1;
150
+ } else {
151
+ children = $[1];
152
+ className = $[2];
153
+ props = $[3];
154
+ t1 = $[4];
155
+ }
156
+ const showCloseButton = t1 === undefined ? true : t1;
157
+ let t2;
158
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
159
+ t2 = /* @__PURE__ */ _jsx(DialogOverlay, {});
160
+ $[5] = t2;
161
+ } else {
162
+ t2 = $[5];
163
+ }
164
+ let t3;
165
+ if ($[6] !== className) {
166
+ t3 = cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] max-h-[calc(100svh-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className);
167
+ $[6] = className;
168
+ $[7] = t3;
169
+ } else {
170
+ t3 = $[7];
171
+ }
172
+ let t4;
173
+ if ($[8] !== showCloseButton) {
174
+ t4 = showCloseButton && /* @__PURE__ */ _jsx(DialogPrimitive.Close, {
175
+ "data-slot": "dialog-close",
176
+ asChild: true,
177
+ children: /* @__PURE__ */ _jsxs(Button, {
178
+ variant: "ghost",
179
+ className: "absolute top-4 right-4",
180
+ size: "icon-sm",
181
+ children: [/* @__PURE__ */ _jsx(XIcon, {}), /* @__PURE__ */ _jsx("span", {
182
+ className: "sr-only",
183
+ children: "Cerrar"
184
+ })]
185
+ })
186
+ });
187
+ $[8] = showCloseButton;
188
+ $[9] = t4;
189
+ } else {
190
+ t4 = $[9];
191
+ }
192
+ let t5;
193
+ if ($[10] !== children || $[11] !== props || $[12] !== t3 || $[13] !== t4) {
194
+ t5 = /* @__PURE__ */ _jsxs(DialogPortal, { children: [t2, /* @__PURE__ */ _jsxs(DialogPrimitive.Content, {
195
+ "data-slot": "dialog-content",
196
+ className: t3,
197
+ ...props,
198
+ children: [children, t4]
199
+ })] });
200
+ $[10] = children;
201
+ $[11] = props;
202
+ $[12] = t3;
203
+ $[13] = t4;
204
+ $[14] = t5;
205
+ } else {
206
+ t5 = $[14];
207
+ }
208
+ return t5;
24
209
  }
25
- function DialogHeader({ className, ...props }) {
26
- return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2", className), ...props }));
210
+ function DialogHeader(t0) {
211
+ const $ = _c(8);
212
+ let className;
213
+ let props;
214
+ if ($[0] !== t0) {
215
+ ({className, ...props} = t0);
216
+ $[0] = t0;
217
+ $[1] = className;
218
+ $[2] = props;
219
+ } else {
220
+ className = $[1];
221
+ props = $[2];
222
+ }
223
+ let t1;
224
+ if ($[3] !== className) {
225
+ t1 = cn("flex flex-col gap-2", className);
226
+ $[3] = className;
227
+ $[4] = t1;
228
+ } else {
229
+ t1 = $[4];
230
+ }
231
+ let t2;
232
+ if ($[5] !== props || $[6] !== t1) {
233
+ t2 = /* @__PURE__ */ _jsx("div", {
234
+ "data-slot": "dialog-header",
235
+ className: t1,
236
+ ...props
237
+ });
238
+ $[5] = props;
239
+ $[6] = t1;
240
+ $[7] = t2;
241
+ } else {
242
+ t2 = $[7];
243
+ }
244
+ return t2;
27
245
  }
28
- function DialogFooter({ className, showCloseButton = false, children, ...props }) {
29
- return (_jsxs("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cerrar" }) }))] }));
246
+ function DialogFooter(t0) {
247
+ const $ = _c(14);
248
+ let children;
249
+ let className;
250
+ let props;
251
+ let t1;
252
+ if ($[0] !== t0) {
253
+ ({className, showCloseButton: t1, children, ...props} = t0);
254
+ $[0] = t0;
255
+ $[1] = children;
256
+ $[2] = className;
257
+ $[3] = props;
258
+ $[4] = t1;
259
+ } else {
260
+ children = $[1];
261
+ className = $[2];
262
+ props = $[3];
263
+ t1 = $[4];
264
+ }
265
+ const showCloseButton = t1 === undefined ? false : t1;
266
+ let t2;
267
+ if ($[5] !== className) {
268
+ t2 = cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className);
269
+ $[5] = className;
270
+ $[6] = t2;
271
+ } else {
272
+ t2 = $[6];
273
+ }
274
+ let t3;
275
+ if ($[7] !== showCloseButton) {
276
+ t3 = showCloseButton && /* @__PURE__ */ _jsx(DialogPrimitive.Close, {
277
+ asChild: true,
278
+ children: /* @__PURE__ */ _jsx(Button, {
279
+ variant: "outline",
280
+ children: "Cerrar"
281
+ })
282
+ });
283
+ $[7] = showCloseButton;
284
+ $[8] = t3;
285
+ } else {
286
+ t3 = $[8];
287
+ }
288
+ let t4;
289
+ if ($[9] !== children || $[10] !== props || $[11] !== t2 || $[12] !== t3) {
290
+ t4 = /* @__PURE__ */ _jsxs("div", {
291
+ "data-slot": "dialog-footer",
292
+ className: t2,
293
+ ...props,
294
+ children: [children, t3]
295
+ });
296
+ $[9] = children;
297
+ $[10] = props;
298
+ $[11] = t2;
299
+ $[12] = t3;
300
+ $[13] = t4;
301
+ } else {
302
+ t4 = $[13];
303
+ }
304
+ return t4;
30
305
  }
31
- function DialogTitle({ className, ...props }) {
32
- return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("font-heading leading-none font-medium", className), ...props }));
306
+ function DialogTitle(t0) {
307
+ const $ = _c(8);
308
+ let className;
309
+ let props;
310
+ if ($[0] !== t0) {
311
+ ({className, ...props} = t0);
312
+ $[0] = t0;
313
+ $[1] = className;
314
+ $[2] = props;
315
+ } else {
316
+ className = $[1];
317
+ props = $[2];
318
+ }
319
+ let t1;
320
+ if ($[3] !== className) {
321
+ t1 = cn("font-heading leading-none font-medium", className);
322
+ $[3] = className;
323
+ $[4] = t1;
324
+ } else {
325
+ t1 = $[4];
326
+ }
327
+ let t2;
328
+ if ($[5] !== props || $[6] !== t1) {
329
+ t2 = /* @__PURE__ */ _jsx(DialogPrimitive.Title, {
330
+ "data-slot": "dialog-title",
331
+ className: t1,
332
+ ...props
333
+ });
334
+ $[5] = props;
335
+ $[6] = t1;
336
+ $[7] = t2;
337
+ } else {
338
+ t2 = $[7];
339
+ }
340
+ return t2;
33
341
  }
34
- function DialogDescription({ className, ...props }) {
35
- return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className), ...props }));
342
+ function DialogDescription(t0) {
343
+ const $ = _c(8);
344
+ let className;
345
+ let props;
346
+ if ($[0] !== t0) {
347
+ ({className, ...props} = t0);
348
+ $[0] = t0;
349
+ $[1] = className;
350
+ $[2] = props;
351
+ } else {
352
+ className = $[1];
353
+ props = $[2];
354
+ }
355
+ let t1;
356
+ if ($[3] !== className) {
357
+ t1 = cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className);
358
+ $[3] = className;
359
+ $[4] = t1;
360
+ } else {
361
+ t1 = $[4];
362
+ }
363
+ let t2;
364
+ if ($[5] !== props || $[6] !== t1) {
365
+ t2 = /* @__PURE__ */ _jsx(DialogPrimitive.Description, {
366
+ "data-slot": "dialog-description",
367
+ className: t1,
368
+ ...props
369
+ });
370
+ $[5] = props;
371
+ $[6] = t1;
372
+ $[7] = t2;
373
+ } else {
374
+ t2 = $[7];
375
+ }
376
+ return t2;
36
377
  }
37
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
378
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };