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.
- package/CHANGELOG.md +31 -27
- package/README.md +22 -2
- package/dist/adapters/unpic-image.js +92 -14
- package/dist/components/alert-dialog.js +444 -26
- package/dist/components/alert.js +153 -18
- package/dist/components/animated-theme-toggler.js +215 -76
- package/dist/components/avatar.js +247 -15
- package/dist/components/badge.js +18 -16
- package/dist/components/button.js +85 -28
- package/dist/components/calendar.js +327 -68
- package/dist/components/card.js +39 -9
- package/dist/components/carousel.js +454 -84
- package/dist/components/checkbox.js +50 -3
- package/dist/components/data-table.js +827 -583
- package/dist/components/dialog.js +363 -22
- package/dist/components/dropdown-menu.js +543 -32
- package/dist/components/filter-query-bar.js +809 -468
- package/dist/components/filter-query-grammar.js +781 -736
- package/dist/components/form.js +305 -43
- package/dist/components/highlighter.js +142 -87
- package/dist/components/hover-card.js +97 -7
- package/dist/components/input-group.js +261 -41
- package/dist/components/input.js +8 -2
- package/dist/components/label.js +38 -3
- package/dist/components/link.js +45 -7
- package/dist/components/pagination.js +332 -16
- package/dist/components/popover.js +222 -16
- package/dist/components/radio-group.js +85 -5
- package/dist/components/select.js +451 -22
- package/dist/components/separator.js +43 -3
- package/dist/components/sheet.js +345 -22
- package/dist/components/sidebar.js +1385 -193
- package/dist/components/skeleton.js +6 -2
- package/dist/components/svgs/whatsappIcon.js +11 -1
- package/dist/components/switch.js +55 -3
- package/dist/components/table.js +288 -18
- package/dist/components/tabs.js +161 -18
- package/dist/components/textarea.js +7 -2
- package/dist/components/themed-toaster.js +63 -20
- package/dist/components/tooltip.js +128 -9
- package/dist/components/typing-animation.js +335 -150
- package/dist/constants/sidebar.js +1 -4
- package/dist/hooks/use-mobile.js +8 -8
- package/dist/hooks/use-sidebar-persistence.js +27 -27
- package/dist/lib/image-dimensions.js +2 -2
- package/dist/lib/year-month-filter.js +38 -40
- package/dist/next.js +69 -17
- package/dist/providers/beez-ui-provider.js +48 -7
- package/dist/providers/native-provider.js +40 -6
- package/dist/tanstack.js +35 -23
- package/package.json +4 -1
|
@@ -1,27 +1,70 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import { Toaster as Sonner } from "sonner";
|
|
4
4
|
import { useTheme } from "next-themes";
|
|
5
5
|
import { CircleCheck, Info, TriangleAlert, OctagonAlert, Loader } from "lucide-react";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
/** Renders shared notification styling using the consumer's resolved theme. */
|
|
7
|
-
const ThemedToaster = (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
const ThemedToaster = (t0) => {
|
|
9
|
+
const $ = _c(9);
|
|
10
|
+
let props;
|
|
11
|
+
let theme;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({theme, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = props;
|
|
16
|
+
$[2] = theme;
|
|
17
|
+
} else {
|
|
18
|
+
props = $[1];
|
|
19
|
+
theme = $[2];
|
|
20
|
+
}
|
|
21
|
+
const { resolvedTheme } = useTheme();
|
|
22
|
+
const activeTheme = theme ?? (resolvedTheme === "dark" ? "dark" : "light");
|
|
23
|
+
let t1;
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
26
|
+
t1 = {
|
|
27
|
+
success: /* @__PURE__ */ _jsx(CircleCheck, { className: "size-4" }),
|
|
28
|
+
info: /* @__PURE__ */ _jsx(Info, { className: "size-4" }),
|
|
29
|
+
warning: /* @__PURE__ */ _jsx(TriangleAlert, { className: "size-4" }),
|
|
30
|
+
error: /* @__PURE__ */ _jsx(OctagonAlert, { className: "size-4" }),
|
|
31
|
+
loading: /* @__PURE__ */ _jsx(Loader, { className: "size-4 animate-spin" })
|
|
32
|
+
};
|
|
33
|
+
t2 = {
|
|
34
|
+
"--normal-bg": "var(--popover)",
|
|
35
|
+
"--normal-text": "var(--popover-foreground)",
|
|
36
|
+
"--normal-border": "var(--border)",
|
|
37
|
+
"--border-radius": "var(--radius)"
|
|
38
|
+
};
|
|
39
|
+
$[3] = t1;
|
|
40
|
+
$[4] = t2;
|
|
41
|
+
} else {
|
|
42
|
+
t1 = $[3];
|
|
43
|
+
t2 = $[4];
|
|
44
|
+
}
|
|
45
|
+
let t3;
|
|
46
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
47
|
+
t3 = { classNames: { toast: "cn-toast" } };
|
|
48
|
+
$[5] = t3;
|
|
49
|
+
} else {
|
|
50
|
+
t3 = $[5];
|
|
51
|
+
}
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[6] !== activeTheme || $[7] !== props) {
|
|
54
|
+
t4 = /* @__PURE__ */ _jsx(Sonner, {
|
|
55
|
+
theme: activeTheme,
|
|
56
|
+
className: "toaster group",
|
|
57
|
+
icons: t1,
|
|
58
|
+
style: t2,
|
|
59
|
+
toastOptions: t3,
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
$[6] = activeTheme;
|
|
63
|
+
$[7] = props;
|
|
64
|
+
$[8] = t4;
|
|
65
|
+
} else {
|
|
66
|
+
t4 = $[8];
|
|
67
|
+
}
|
|
68
|
+
return t4;
|
|
26
69
|
};
|
|
27
70
|
export { ThemedToaster };
|
|
@@ -1,17 +1,136 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
4
5
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
function TooltipProvider(t0) {
|
|
8
|
+
const $ = _c(6);
|
|
9
|
+
let props;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({delayDuration: t1, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = props;
|
|
15
|
+
$[2] = t1;
|
|
16
|
+
} else {
|
|
17
|
+
props = $[1];
|
|
18
|
+
t1 = $[2];
|
|
19
|
+
}
|
|
20
|
+
const delayDuration = t1 === undefined ? 0 : t1;
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[3] !== delayDuration || $[4] !== props) {
|
|
23
|
+
t2 = /* @__PURE__ */ _jsx(TooltipPrimitive.Provider, {
|
|
24
|
+
"data-slot": "tooltip-provider",
|
|
25
|
+
delayDuration,
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
$[3] = delayDuration;
|
|
29
|
+
$[4] = props;
|
|
30
|
+
$[5] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
t2 = $[5];
|
|
33
|
+
}
|
|
34
|
+
return t2;
|
|
7
35
|
}
|
|
8
|
-
function Tooltip(
|
|
9
|
-
|
|
36
|
+
function Tooltip(t0) {
|
|
37
|
+
const $ = _c(4);
|
|
38
|
+
let props;
|
|
39
|
+
if ($[0] !== t0) {
|
|
40
|
+
({...props} = t0);
|
|
41
|
+
$[0] = t0;
|
|
42
|
+
$[1] = props;
|
|
43
|
+
} else {
|
|
44
|
+
props = $[1];
|
|
45
|
+
}
|
|
46
|
+
let t1;
|
|
47
|
+
if ($[2] !== props) {
|
|
48
|
+
t1 = /* @__PURE__ */ _jsx(TooltipPrimitive.Root, {
|
|
49
|
+
"data-slot": "tooltip",
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
$[2] = props;
|
|
53
|
+
$[3] = t1;
|
|
54
|
+
} else {
|
|
55
|
+
t1 = $[3];
|
|
56
|
+
}
|
|
57
|
+
return t1;
|
|
10
58
|
}
|
|
11
|
-
function TooltipTrigger(
|
|
12
|
-
|
|
59
|
+
function TooltipTrigger(t0) {
|
|
60
|
+
const $ = _c(4);
|
|
61
|
+
let props;
|
|
62
|
+
if ($[0] !== t0) {
|
|
63
|
+
({...props} = t0);
|
|
64
|
+
$[0] = t0;
|
|
65
|
+
$[1] = props;
|
|
66
|
+
} else {
|
|
67
|
+
props = $[1];
|
|
68
|
+
}
|
|
69
|
+
let t1;
|
|
70
|
+
if ($[2] !== props) {
|
|
71
|
+
t1 = /* @__PURE__ */ _jsx(TooltipPrimitive.Trigger, {
|
|
72
|
+
"data-slot": "tooltip-trigger",
|
|
73
|
+
...props
|
|
74
|
+
});
|
|
75
|
+
$[2] = props;
|
|
76
|
+
$[3] = t1;
|
|
77
|
+
} else {
|
|
78
|
+
t1 = $[3];
|
|
79
|
+
}
|
|
80
|
+
return t1;
|
|
13
81
|
}
|
|
14
|
-
function TooltipContent(
|
|
15
|
-
|
|
82
|
+
function TooltipContent(t0) {
|
|
83
|
+
const $ = _c(13);
|
|
84
|
+
let children;
|
|
85
|
+
let className;
|
|
86
|
+
let props;
|
|
87
|
+
let t1;
|
|
88
|
+
if ($[0] !== t0) {
|
|
89
|
+
({className, sideOffset: t1, children, ...props} = t0);
|
|
90
|
+
$[0] = t0;
|
|
91
|
+
$[1] = children;
|
|
92
|
+
$[2] = className;
|
|
93
|
+
$[3] = props;
|
|
94
|
+
$[4] = t1;
|
|
95
|
+
} else {
|
|
96
|
+
children = $[1];
|
|
97
|
+
className = $[2];
|
|
98
|
+
props = $[3];
|
|
99
|
+
t1 = $[4];
|
|
100
|
+
}
|
|
101
|
+
const sideOffset = t1 === undefined ? 0 : t1;
|
|
102
|
+
let t2;
|
|
103
|
+
if ($[5] !== className) {
|
|
104
|
+
t2 = cn("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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);
|
|
105
|
+
$[5] = className;
|
|
106
|
+
$[6] = t2;
|
|
107
|
+
} else {
|
|
108
|
+
t2 = $[6];
|
|
109
|
+
}
|
|
110
|
+
let t3;
|
|
111
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
|
+
t3 = /* @__PURE__ */ _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" });
|
|
113
|
+
$[7] = t3;
|
|
114
|
+
} else {
|
|
115
|
+
t3 = $[7];
|
|
116
|
+
}
|
|
117
|
+
let t4;
|
|
118
|
+
if ($[8] !== children || $[9] !== props || $[10] !== sideOffset || $[11] !== t2) {
|
|
119
|
+
t4 = /* @__PURE__ */ _jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ _jsxs(TooltipPrimitive.Content, {
|
|
120
|
+
"data-slot": "tooltip-content",
|
|
121
|
+
sideOffset,
|
|
122
|
+
className: t2,
|
|
123
|
+
...props,
|
|
124
|
+
children: [children, t3]
|
|
125
|
+
}) });
|
|
126
|
+
$[8] = children;
|
|
127
|
+
$[9] = props;
|
|
128
|
+
$[10] = sideOffset;
|
|
129
|
+
$[11] = t2;
|
|
130
|
+
$[12] = t4;
|
|
131
|
+
} else {
|
|
132
|
+
t4 = $[12];
|
|
133
|
+
}
|
|
134
|
+
return t4;
|
|
16
135
|
}
|
|
17
136
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|