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,360 @@
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 SheetPrimitive } 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 Sheet({ ...props }) {
8
- return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ function Sheet(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(SheetPrimitive.Root, {
22
+ "data-slot": "sheet",
23
+ ...props
24
+ });
25
+ $[2] = props;
26
+ $[3] = t1;
27
+ } else {
28
+ t1 = $[3];
29
+ }
30
+ return t1;
9
31
  }
10
- function SheetTrigger({ ...props }) {
11
- return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
32
+ function SheetTrigger(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(SheetPrimitive.Trigger, {
45
+ "data-slot": "sheet-trigger",
46
+ ...props
47
+ });
48
+ $[2] = props;
49
+ $[3] = t1;
50
+ } else {
51
+ t1 = $[3];
52
+ }
53
+ return t1;
12
54
  }
13
- function SheetClose({ ...props }) {
14
- return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
55
+ function SheetClose(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(SheetPrimitive.Close, {
68
+ "data-slot": "sheet-close",
69
+ ...props
70
+ });
71
+ $[2] = props;
72
+ $[3] = t1;
73
+ } else {
74
+ t1 = $[3];
75
+ }
76
+ return t1;
15
77
  }
16
- function SheetPortal({ ...props }) {
17
- return _jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
78
+ function SheetPortal(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(SheetPrimitive.Portal, {
91
+ "data-slot": "sheet-portal",
92
+ ...props
93
+ });
94
+ $[2] = props;
95
+ $[3] = t1;
96
+ } else {
97
+ t1 = $[3];
98
+ }
99
+ return t1;
18
100
  }
19
- function SheetOverlay({ className, ...props }) {
20
- return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 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 SheetOverlay(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 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(SheetPrimitive.Overlay, {
125
+ "data-slot": "sheet-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 SheetContent({ className, children, side = "right", showCloseButton = true, ...props }) {
23
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", className), ...props, children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-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: "Close" })] }) }))] })] }));
137
+ function SheetContent(t0) {
138
+ const $ = _c(17);
139
+ let children;
140
+ let className;
141
+ let props;
142
+ let t1;
143
+ let t2;
144
+ if ($[0] !== t0) {
145
+ ({className, children, side: t1, showCloseButton: t2, ...props} = t0);
146
+ $[0] = t0;
147
+ $[1] = children;
148
+ $[2] = className;
149
+ $[3] = props;
150
+ $[4] = t1;
151
+ $[5] = t2;
152
+ } else {
153
+ children = $[1];
154
+ className = $[2];
155
+ props = $[3];
156
+ t1 = $[4];
157
+ t2 = $[5];
158
+ }
159
+ const side = t1 === undefined ? "right" : t1;
160
+ const showCloseButton = t2 === undefined ? true : t2;
161
+ let t3;
162
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
163
+ t3 = /* @__PURE__ */ _jsx(SheetOverlay, {});
164
+ $[6] = t3;
165
+ } else {
166
+ t3 = $[6];
167
+ }
168
+ let t4;
169
+ if ($[7] !== className) {
170
+ t4 = cn("fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", className);
171
+ $[7] = className;
172
+ $[8] = t4;
173
+ } else {
174
+ t4 = $[8];
175
+ }
176
+ let t5;
177
+ if ($[9] !== showCloseButton) {
178
+ t5 = showCloseButton && /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
179
+ "data-slot": "sheet-close",
180
+ asChild: true,
181
+ children: /* @__PURE__ */ _jsxs(Button, {
182
+ variant: "ghost",
183
+ className: "absolute top-4 right-4",
184
+ size: "icon-sm",
185
+ children: [/* @__PURE__ */ _jsx(XIcon, {}), /* @__PURE__ */ _jsx("span", {
186
+ className: "sr-only",
187
+ children: "Close"
188
+ })]
189
+ })
190
+ });
191
+ $[9] = showCloseButton;
192
+ $[10] = t5;
193
+ } else {
194
+ t5 = $[10];
195
+ }
196
+ let t6;
197
+ if ($[11] !== children || $[12] !== props || $[13] !== side || $[14] !== t4 || $[15] !== t5) {
198
+ t6 = /* @__PURE__ */ _jsxs(SheetPortal, { children: [t3, /* @__PURE__ */ _jsxs(SheetPrimitive.Content, {
199
+ "data-slot": "sheet-content",
200
+ "data-side": side,
201
+ className: t4,
202
+ ...props,
203
+ children: [children, t5]
204
+ })] });
205
+ $[11] = children;
206
+ $[12] = props;
207
+ $[13] = side;
208
+ $[14] = t4;
209
+ $[15] = t5;
210
+ $[16] = t6;
211
+ } else {
212
+ t6 = $[16];
213
+ }
214
+ return t6;
24
215
  }
25
- function SheetHeader({ className, ...props }) {
26
- return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props }));
216
+ function SheetHeader(t0) {
217
+ const $ = _c(8);
218
+ let className;
219
+ let props;
220
+ if ($[0] !== t0) {
221
+ ({className, ...props} = t0);
222
+ $[0] = t0;
223
+ $[1] = className;
224
+ $[2] = props;
225
+ } else {
226
+ className = $[1];
227
+ props = $[2];
228
+ }
229
+ let t1;
230
+ if ($[3] !== className) {
231
+ t1 = cn("flex flex-col gap-1.5 p-4", className);
232
+ $[3] = className;
233
+ $[4] = t1;
234
+ } else {
235
+ t1 = $[4];
236
+ }
237
+ let t2;
238
+ if ($[5] !== props || $[6] !== t1) {
239
+ t2 = /* @__PURE__ */ _jsx("div", {
240
+ "data-slot": "sheet-header",
241
+ className: t1,
242
+ ...props
243
+ });
244
+ $[5] = props;
245
+ $[6] = t1;
246
+ $[7] = t2;
247
+ } else {
248
+ t2 = $[7];
249
+ }
250
+ return t2;
27
251
  }
28
- function SheetFooter({ className, ...props }) {
29
- return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
252
+ function SheetFooter(t0) {
253
+ const $ = _c(8);
254
+ let className;
255
+ let props;
256
+ if ($[0] !== t0) {
257
+ ({className, ...props} = t0);
258
+ $[0] = t0;
259
+ $[1] = className;
260
+ $[2] = props;
261
+ } else {
262
+ className = $[1];
263
+ props = $[2];
264
+ }
265
+ let t1;
266
+ if ($[3] !== className) {
267
+ t1 = cn("mt-auto flex flex-col gap-2 p-4", className);
268
+ $[3] = className;
269
+ $[4] = t1;
270
+ } else {
271
+ t1 = $[4];
272
+ }
273
+ let t2;
274
+ if ($[5] !== props || $[6] !== t1) {
275
+ t2 = /* @__PURE__ */ _jsx("div", {
276
+ "data-slot": "sheet-footer",
277
+ className: t1,
278
+ ...props
279
+ });
280
+ $[5] = props;
281
+ $[6] = t1;
282
+ $[7] = t2;
283
+ } else {
284
+ t2 = $[7];
285
+ }
286
+ return t2;
30
287
  }
31
- function SheetTitle({ className, ...props }) {
32
- return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("font-heading font-medium text-foreground", className), ...props }));
288
+ function SheetTitle(t0) {
289
+ const $ = _c(8);
290
+ let className;
291
+ let props;
292
+ if ($[0] !== t0) {
293
+ ({className, ...props} = t0);
294
+ $[0] = t0;
295
+ $[1] = className;
296
+ $[2] = props;
297
+ } else {
298
+ className = $[1];
299
+ props = $[2];
300
+ }
301
+ let t1;
302
+ if ($[3] !== className) {
303
+ t1 = cn("font-heading font-medium text-foreground", className);
304
+ $[3] = className;
305
+ $[4] = t1;
306
+ } else {
307
+ t1 = $[4];
308
+ }
309
+ let t2;
310
+ if ($[5] !== props || $[6] !== t1) {
311
+ t2 = /* @__PURE__ */ _jsx(SheetPrimitive.Title, {
312
+ "data-slot": "sheet-title",
313
+ className: t1,
314
+ ...props
315
+ });
316
+ $[5] = props;
317
+ $[6] = t1;
318
+ $[7] = t2;
319
+ } else {
320
+ t2 = $[7];
321
+ }
322
+ return t2;
33
323
  }
34
- function SheetDescription({ className, ...props }) {
35
- return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
324
+ function SheetDescription(t0) {
325
+ const $ = _c(8);
326
+ let className;
327
+ let props;
328
+ if ($[0] !== t0) {
329
+ ({className, ...props} = t0);
330
+ $[0] = t0;
331
+ $[1] = className;
332
+ $[2] = props;
333
+ } else {
334
+ className = $[1];
335
+ props = $[2];
336
+ }
337
+ let t1;
338
+ if ($[3] !== className) {
339
+ t1 = cn("text-sm text-muted-foreground", className);
340
+ $[3] = className;
341
+ $[4] = t1;
342
+ } else {
343
+ t1 = $[4];
344
+ }
345
+ let t2;
346
+ if ($[5] !== props || $[6] !== t1) {
347
+ t2 = /* @__PURE__ */ _jsx(SheetPrimitive.Description, {
348
+ "data-slot": "sheet-description",
349
+ className: t1,
350
+ ...props
351
+ });
352
+ $[5] = props;
353
+ $[6] = t1;
354
+ $[7] = t2;
355
+ } else {
356
+ t2 = $[7];
357
+ }
358
+ return t2;
36
359
  }
37
- export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
360
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };