beez-ui 0.4.2 → 0.5.1
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 +35 -27
- package/README.md +28 -5
- 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.d.ts +1 -0
- package/dist/components/dropdown-menu.js +544 -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/styles.css +1 -1
- package/dist/tanstack.js +35 -23
- package/package.json +4 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
function Skeleton({ className, ...props }) {
|
|
4
|
-
|
|
4
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
5
|
+
"data-slot": "skeleton",
|
|
6
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
5
9
|
}
|
|
6
10
|
export { Skeleton };
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const WhatsappIcon = (props) =>
|
|
2
|
+
const WhatsappIcon = (props) => /* @__PURE__ */ _jsx("svg", {
|
|
3
|
+
...props,
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 360 362",
|
|
6
|
+
children: /* @__PURE__ */ _jsx("path", {
|
|
7
|
+
fill: "#25D366",
|
|
8
|
+
fillRule: "evenodd",
|
|
9
|
+
d: "M307.546 52.566C273.709 18.684 228.706.017 180.756 0 81.951 0 1.538 80.404 1.504 179.235c-.017 31.594 8.242 62.432 23.928 89.609L0 361.736l95.024-24.925c26.179 14.285 55.659 21.805 85.655 21.814h.077c98.788 0 179.21-80.413 179.244-179.244.017-47.898-18.608-92.926-52.454-126.807v-.008Zm-126.79 275.788h-.06c-26.73-.008-52.952-7.194-75.831-20.765l-5.44-3.231-56.391 14.791 15.05-54.981-3.542-5.638c-14.912-23.721-22.793-51.139-22.776-79.286.035-82.14 66.867-148.973 149.051-148.973 39.793.017 77.198 15.53 105.328 43.695 28.131 28.157 43.61 65.596 43.593 105.398-.035 82.149-66.867 148.982-148.982 148.982v.008Zm81.719-111.577c-4.478-2.243-26.497-13.073-30.606-14.568-4.108-1.496-7.09-2.243-10.073 2.243-2.982 4.487-11.568 14.577-14.181 17.559-2.613 2.991-5.226 3.361-9.704 1.117-4.477-2.243-18.908-6.97-36.02-22.226-13.313-11.878-22.304-26.54-24.916-31.027-2.613-4.486-.275-6.91 1.959-9.136 2.011-2.011 4.478-5.234 6.721-7.847 2.244-2.613 2.983-4.486 4.478-7.469 1.496-2.991.748-5.603-.369-7.847-1.118-2.243-10.073-24.289-13.812-33.253-3.636-8.732-7.331-7.546-10.073-7.692-2.613-.13-5.595-.155-8.586-.155-2.991 0-7.839 1.118-11.947 5.604-4.108 4.486-15.677 15.324-15.677 37.361s16.047 43.344 18.29 46.335c2.243 2.991 31.585 48.225 76.51 67.632 10.684 4.615 19.029 7.374 25.535 9.437 10.727 3.412 20.49 2.931 28.208 1.779 8.604-1.289 26.498-10.838 30.228-21.298 3.73-10.46 3.73-19.433 2.613-21.298-1.117-1.865-4.108-2.991-8.586-5.234l.008-.017Z",
|
|
10
|
+
clipRule: "evenodd"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
3
13
|
export { WhatsappIcon };
|
|
@@ -1,8 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
4
5
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
function Switch(t0) {
|
|
8
|
+
const $ = _c(11);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({className, size: t1, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = props;
|
|
17
|
+
$[3] = t1;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
t1 = $[3];
|
|
22
|
+
}
|
|
23
|
+
const size = t1 === undefined ? "default" : t1;
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[4] !== className) {
|
|
26
|
+
t2 = cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className);
|
|
27
|
+
$[4] = className;
|
|
28
|
+
$[5] = t2;
|
|
29
|
+
} else {
|
|
30
|
+
t2 = $[5];
|
|
31
|
+
}
|
|
32
|
+
let t3;
|
|
33
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
+
t3 = /* @__PURE__ */ _jsx(SwitchPrimitive.Thumb, {
|
|
35
|
+
"data-slot": "switch-thumb",
|
|
36
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
37
|
+
});
|
|
38
|
+
$[6] = t3;
|
|
39
|
+
} else {
|
|
40
|
+
t3 = $[6];
|
|
41
|
+
}
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[7] !== props || $[8] !== size || $[9] !== t2) {
|
|
44
|
+
t4 = /* @__PURE__ */ _jsx(SwitchPrimitive.Root, {
|
|
45
|
+
"data-slot": "switch",
|
|
46
|
+
"data-size": size,
|
|
47
|
+
className: t2,
|
|
48
|
+
...props,
|
|
49
|
+
children: t3
|
|
50
|
+
});
|
|
51
|
+
$[7] = props;
|
|
52
|
+
$[8] = size;
|
|
53
|
+
$[9] = t2;
|
|
54
|
+
$[10] = t4;
|
|
55
|
+
} else {
|
|
56
|
+
t4 = $[10];
|
|
57
|
+
}
|
|
58
|
+
return t4;
|
|
7
59
|
}
|
|
8
60
|
export { Switch };
|
package/dist/components/table.js
CHANGED
|
@@ -1,28 +1,298 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
function Table(t0) {
|
|
7
|
+
const $ = _c(8);
|
|
8
|
+
let className;
|
|
9
|
+
let props;
|
|
10
|
+
if ($[0] !== t0) {
|
|
11
|
+
({className, ...props} = t0);
|
|
12
|
+
$[0] = t0;
|
|
13
|
+
$[1] = className;
|
|
14
|
+
$[2] = props;
|
|
15
|
+
} else {
|
|
16
|
+
className = $[1];
|
|
17
|
+
props = $[2];
|
|
18
|
+
}
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[3] !== className) {
|
|
21
|
+
t1 = cn("w-full caption-bottom text-sm", className);
|
|
22
|
+
$[3] = className;
|
|
23
|
+
$[4] = t1;
|
|
24
|
+
} else {
|
|
25
|
+
t1 = $[4];
|
|
26
|
+
}
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
29
|
+
t2 = /* @__PURE__ */ _jsx("div", {
|
|
30
|
+
"data-slot": "table-container",
|
|
31
|
+
className: "relative w-full overflow-x-auto",
|
|
32
|
+
children: /* @__PURE__ */ _jsx("table", {
|
|
33
|
+
"data-slot": "table",
|
|
34
|
+
className: t1,
|
|
35
|
+
...props
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
$[5] = props;
|
|
39
|
+
$[6] = t1;
|
|
40
|
+
$[7] = t2;
|
|
41
|
+
} else {
|
|
42
|
+
t2 = $[7];
|
|
43
|
+
}
|
|
44
|
+
return t2;
|
|
6
45
|
}
|
|
7
|
-
function TableHeader(
|
|
8
|
-
|
|
46
|
+
function TableHeader(t0) {
|
|
47
|
+
const $ = _c(8);
|
|
48
|
+
let className;
|
|
49
|
+
let props;
|
|
50
|
+
if ($[0] !== t0) {
|
|
51
|
+
({className, ...props} = t0);
|
|
52
|
+
$[0] = t0;
|
|
53
|
+
$[1] = className;
|
|
54
|
+
$[2] = props;
|
|
55
|
+
} else {
|
|
56
|
+
className = $[1];
|
|
57
|
+
props = $[2];
|
|
58
|
+
}
|
|
59
|
+
let t1;
|
|
60
|
+
if ($[3] !== className) {
|
|
61
|
+
t1 = cn("[&_tr]:border-b", className);
|
|
62
|
+
$[3] = className;
|
|
63
|
+
$[4] = t1;
|
|
64
|
+
} else {
|
|
65
|
+
t1 = $[4];
|
|
66
|
+
}
|
|
67
|
+
let t2;
|
|
68
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
69
|
+
t2 = /* @__PURE__ */ _jsx("thead", {
|
|
70
|
+
"data-slot": "table-header",
|
|
71
|
+
className: t1,
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
$[5] = props;
|
|
75
|
+
$[6] = t1;
|
|
76
|
+
$[7] = t2;
|
|
77
|
+
} else {
|
|
78
|
+
t2 = $[7];
|
|
79
|
+
}
|
|
80
|
+
return t2;
|
|
9
81
|
}
|
|
10
|
-
function TableBody(
|
|
11
|
-
|
|
82
|
+
function TableBody(t0) {
|
|
83
|
+
const $ = _c(8);
|
|
84
|
+
let className;
|
|
85
|
+
let props;
|
|
86
|
+
if ($[0] !== t0) {
|
|
87
|
+
({className, ...props} = t0);
|
|
88
|
+
$[0] = t0;
|
|
89
|
+
$[1] = className;
|
|
90
|
+
$[2] = props;
|
|
91
|
+
} else {
|
|
92
|
+
className = $[1];
|
|
93
|
+
props = $[2];
|
|
94
|
+
}
|
|
95
|
+
let t1;
|
|
96
|
+
if ($[3] !== className) {
|
|
97
|
+
t1 = cn("[&_tr:last-child]:border-0", className);
|
|
98
|
+
$[3] = className;
|
|
99
|
+
$[4] = t1;
|
|
100
|
+
} else {
|
|
101
|
+
t1 = $[4];
|
|
102
|
+
}
|
|
103
|
+
let t2;
|
|
104
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
105
|
+
t2 = /* @__PURE__ */ _jsx("tbody", {
|
|
106
|
+
"data-slot": "table-body",
|
|
107
|
+
className: t1,
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
$[5] = props;
|
|
111
|
+
$[6] = t1;
|
|
112
|
+
$[7] = t2;
|
|
113
|
+
} else {
|
|
114
|
+
t2 = $[7];
|
|
115
|
+
}
|
|
116
|
+
return t2;
|
|
12
117
|
}
|
|
13
|
-
function TableFooter(
|
|
14
|
-
|
|
118
|
+
function TableFooter(t0) {
|
|
119
|
+
const $ = _c(8);
|
|
120
|
+
let className;
|
|
121
|
+
let props;
|
|
122
|
+
if ($[0] !== t0) {
|
|
123
|
+
({className, ...props} = t0);
|
|
124
|
+
$[0] = t0;
|
|
125
|
+
$[1] = className;
|
|
126
|
+
$[2] = props;
|
|
127
|
+
} else {
|
|
128
|
+
className = $[1];
|
|
129
|
+
props = $[2];
|
|
130
|
+
}
|
|
131
|
+
let t1;
|
|
132
|
+
if ($[3] !== className) {
|
|
133
|
+
t1 = cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className);
|
|
134
|
+
$[3] = className;
|
|
135
|
+
$[4] = t1;
|
|
136
|
+
} else {
|
|
137
|
+
t1 = $[4];
|
|
138
|
+
}
|
|
139
|
+
let t2;
|
|
140
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
141
|
+
t2 = /* @__PURE__ */ _jsx("tfoot", {
|
|
142
|
+
"data-slot": "table-footer",
|
|
143
|
+
className: t1,
|
|
144
|
+
...props
|
|
145
|
+
});
|
|
146
|
+
$[5] = props;
|
|
147
|
+
$[6] = t1;
|
|
148
|
+
$[7] = t2;
|
|
149
|
+
} else {
|
|
150
|
+
t2 = $[7];
|
|
151
|
+
}
|
|
152
|
+
return t2;
|
|
15
153
|
}
|
|
16
|
-
function TableRow(
|
|
17
|
-
|
|
154
|
+
function TableRow(t0) {
|
|
155
|
+
const $ = _c(8);
|
|
156
|
+
let className;
|
|
157
|
+
let props;
|
|
158
|
+
if ($[0] !== t0) {
|
|
159
|
+
({className, ...props} = t0);
|
|
160
|
+
$[0] = t0;
|
|
161
|
+
$[1] = className;
|
|
162
|
+
$[2] = props;
|
|
163
|
+
} else {
|
|
164
|
+
className = $[1];
|
|
165
|
+
props = $[2];
|
|
166
|
+
}
|
|
167
|
+
let t1;
|
|
168
|
+
if ($[3] !== className) {
|
|
169
|
+
t1 = cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className);
|
|
170
|
+
$[3] = className;
|
|
171
|
+
$[4] = t1;
|
|
172
|
+
} else {
|
|
173
|
+
t1 = $[4];
|
|
174
|
+
}
|
|
175
|
+
let t2;
|
|
176
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
177
|
+
t2 = /* @__PURE__ */ _jsx("tr", {
|
|
178
|
+
"data-slot": "table-row",
|
|
179
|
+
className: t1,
|
|
180
|
+
...props
|
|
181
|
+
});
|
|
182
|
+
$[5] = props;
|
|
183
|
+
$[6] = t1;
|
|
184
|
+
$[7] = t2;
|
|
185
|
+
} else {
|
|
186
|
+
t2 = $[7];
|
|
187
|
+
}
|
|
188
|
+
return t2;
|
|
18
189
|
}
|
|
19
|
-
function TableHead(
|
|
20
|
-
|
|
190
|
+
function TableHead(t0) {
|
|
191
|
+
const $ = _c(8);
|
|
192
|
+
let className;
|
|
193
|
+
let props;
|
|
194
|
+
if ($[0] !== t0) {
|
|
195
|
+
({className, ...props} = t0);
|
|
196
|
+
$[0] = t0;
|
|
197
|
+
$[1] = className;
|
|
198
|
+
$[2] = props;
|
|
199
|
+
} else {
|
|
200
|
+
className = $[1];
|
|
201
|
+
props = $[2];
|
|
202
|
+
}
|
|
203
|
+
let t1;
|
|
204
|
+
if ($[3] !== className) {
|
|
205
|
+
t1 = cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className);
|
|
206
|
+
$[3] = className;
|
|
207
|
+
$[4] = t1;
|
|
208
|
+
} else {
|
|
209
|
+
t1 = $[4];
|
|
210
|
+
}
|
|
211
|
+
let t2;
|
|
212
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
213
|
+
t2 = /* @__PURE__ */ _jsx("th", {
|
|
214
|
+
"data-slot": "table-head",
|
|
215
|
+
className: t1,
|
|
216
|
+
...props
|
|
217
|
+
});
|
|
218
|
+
$[5] = props;
|
|
219
|
+
$[6] = t1;
|
|
220
|
+
$[7] = t2;
|
|
221
|
+
} else {
|
|
222
|
+
t2 = $[7];
|
|
223
|
+
}
|
|
224
|
+
return t2;
|
|
21
225
|
}
|
|
22
|
-
function TableCell(
|
|
23
|
-
|
|
226
|
+
function TableCell(t0) {
|
|
227
|
+
const $ = _c(8);
|
|
228
|
+
let className;
|
|
229
|
+
let props;
|
|
230
|
+
if ($[0] !== t0) {
|
|
231
|
+
({className, ...props} = t0);
|
|
232
|
+
$[0] = t0;
|
|
233
|
+
$[1] = className;
|
|
234
|
+
$[2] = props;
|
|
235
|
+
} else {
|
|
236
|
+
className = $[1];
|
|
237
|
+
props = $[2];
|
|
238
|
+
}
|
|
239
|
+
let t1;
|
|
240
|
+
if ($[3] !== className) {
|
|
241
|
+
t1 = cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className);
|
|
242
|
+
$[3] = className;
|
|
243
|
+
$[4] = t1;
|
|
244
|
+
} else {
|
|
245
|
+
t1 = $[4];
|
|
246
|
+
}
|
|
247
|
+
let t2;
|
|
248
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
249
|
+
t2 = /* @__PURE__ */ _jsx("td", {
|
|
250
|
+
"data-slot": "table-cell",
|
|
251
|
+
className: t1,
|
|
252
|
+
...props
|
|
253
|
+
});
|
|
254
|
+
$[5] = props;
|
|
255
|
+
$[6] = t1;
|
|
256
|
+
$[7] = t2;
|
|
257
|
+
} else {
|
|
258
|
+
t2 = $[7];
|
|
259
|
+
}
|
|
260
|
+
return t2;
|
|
24
261
|
}
|
|
25
|
-
function TableCaption(
|
|
26
|
-
|
|
262
|
+
function TableCaption(t0) {
|
|
263
|
+
const $ = _c(8);
|
|
264
|
+
let className;
|
|
265
|
+
let props;
|
|
266
|
+
if ($[0] !== t0) {
|
|
267
|
+
({className, ...props} = t0);
|
|
268
|
+
$[0] = t0;
|
|
269
|
+
$[1] = className;
|
|
270
|
+
$[2] = props;
|
|
271
|
+
} else {
|
|
272
|
+
className = $[1];
|
|
273
|
+
props = $[2];
|
|
274
|
+
}
|
|
275
|
+
let t1;
|
|
276
|
+
if ($[3] !== className) {
|
|
277
|
+
t1 = cn("mt-4 text-sm text-muted-foreground", className);
|
|
278
|
+
$[3] = className;
|
|
279
|
+
$[4] = t1;
|
|
280
|
+
} else {
|
|
281
|
+
t1 = $[4];
|
|
282
|
+
}
|
|
283
|
+
let t2;
|
|
284
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
285
|
+
t2 = /* @__PURE__ */ _jsx("caption", {
|
|
286
|
+
"data-slot": "table-caption",
|
|
287
|
+
className: t1,
|
|
288
|
+
...props
|
|
289
|
+
});
|
|
290
|
+
$[5] = props;
|
|
291
|
+
$[6] = t1;
|
|
292
|
+
$[7] = t2;
|
|
293
|
+
} else {
|
|
294
|
+
t2 = $[7];
|
|
295
|
+
}
|
|
296
|
+
return t2;
|
|
27
297
|
}
|
|
28
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption
|
|
298
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,29 +1,172 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
5
6
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
function Tabs(t0) {
|
|
9
|
+
const $ = _c(10);
|
|
10
|
+
let className;
|
|
11
|
+
let props;
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== t0) {
|
|
14
|
+
({className, orientation: t1, ...props} = t0);
|
|
15
|
+
$[0] = t0;
|
|
16
|
+
$[1] = className;
|
|
17
|
+
$[2] = props;
|
|
18
|
+
$[3] = t1;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
props = $[2];
|
|
22
|
+
t1 = $[3];
|
|
23
|
+
}
|
|
24
|
+
const orientation = t1 === undefined ? "horizontal" : t1;
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[4] !== className) {
|
|
27
|
+
t2 = cn("group/tabs flex gap-2 data-horizontal:flex-col", className);
|
|
28
|
+
$[4] = className;
|
|
29
|
+
$[5] = t2;
|
|
30
|
+
} else {
|
|
31
|
+
t2 = $[5];
|
|
32
|
+
}
|
|
33
|
+
let t3;
|
|
34
|
+
if ($[6] !== orientation || $[7] !== props || $[8] !== t2) {
|
|
35
|
+
t3 = /* @__PURE__ */ _jsx(TabsPrimitive.Root, {
|
|
36
|
+
"data-slot": "tabs",
|
|
37
|
+
"data-orientation": orientation,
|
|
38
|
+
className: t2,
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
$[6] = orientation;
|
|
42
|
+
$[7] = props;
|
|
43
|
+
$[8] = t2;
|
|
44
|
+
$[9] = t3;
|
|
45
|
+
} else {
|
|
46
|
+
t3 = $[9];
|
|
47
|
+
}
|
|
48
|
+
return t3;
|
|
8
49
|
}
|
|
9
50
|
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
51
|
+
variants: { variant: {
|
|
52
|
+
default: "bg-muted",
|
|
53
|
+
line: "gap-1 bg-transparent"
|
|
54
|
+
} },
|
|
55
|
+
defaultVariants: { variant: "default" }
|
|
19
56
|
});
|
|
20
|
-
function TabsList(
|
|
21
|
-
|
|
57
|
+
function TabsList(t0) {
|
|
58
|
+
const $ = _c(11);
|
|
59
|
+
let className;
|
|
60
|
+
let props;
|
|
61
|
+
let t1;
|
|
62
|
+
if ($[0] !== t0) {
|
|
63
|
+
({className, variant: t1, ...props} = t0);
|
|
64
|
+
$[0] = t0;
|
|
65
|
+
$[1] = className;
|
|
66
|
+
$[2] = props;
|
|
67
|
+
$[3] = t1;
|
|
68
|
+
} else {
|
|
69
|
+
className = $[1];
|
|
70
|
+
props = $[2];
|
|
71
|
+
t1 = $[3];
|
|
72
|
+
}
|
|
73
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
74
|
+
let t2;
|
|
75
|
+
if ($[4] !== className || $[5] !== variant) {
|
|
76
|
+
t2 = cn(tabsListVariants({ variant }), className);
|
|
77
|
+
$[4] = className;
|
|
78
|
+
$[5] = variant;
|
|
79
|
+
$[6] = t2;
|
|
80
|
+
} else {
|
|
81
|
+
t2 = $[6];
|
|
82
|
+
}
|
|
83
|
+
let t3;
|
|
84
|
+
if ($[7] !== props || $[8] !== t2 || $[9] !== variant) {
|
|
85
|
+
t3 = /* @__PURE__ */ _jsx(TabsPrimitive.List, {
|
|
86
|
+
"data-slot": "tabs-list",
|
|
87
|
+
"data-variant": variant,
|
|
88
|
+
className: t2,
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
$[7] = props;
|
|
92
|
+
$[8] = t2;
|
|
93
|
+
$[9] = variant;
|
|
94
|
+
$[10] = t3;
|
|
95
|
+
} else {
|
|
96
|
+
t3 = $[10];
|
|
97
|
+
}
|
|
98
|
+
return t3;
|
|
22
99
|
}
|
|
23
|
-
function TabsTrigger(
|
|
24
|
-
|
|
100
|
+
function TabsTrigger(t0) {
|
|
101
|
+
const $ = _c(8);
|
|
102
|
+
let className;
|
|
103
|
+
let props;
|
|
104
|
+
if ($[0] !== t0) {
|
|
105
|
+
({className, ...props} = t0);
|
|
106
|
+
$[0] = t0;
|
|
107
|
+
$[1] = className;
|
|
108
|
+
$[2] = props;
|
|
109
|
+
} else {
|
|
110
|
+
className = $[1];
|
|
111
|
+
props = $[2];
|
|
112
|
+
}
|
|
113
|
+
let t1;
|
|
114
|
+
if ($[3] !== className) {
|
|
115
|
+
t1 = cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className);
|
|
116
|
+
$[3] = className;
|
|
117
|
+
$[4] = t1;
|
|
118
|
+
} else {
|
|
119
|
+
t1 = $[4];
|
|
120
|
+
}
|
|
121
|
+
let t2;
|
|
122
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
123
|
+
t2 = /* @__PURE__ */ _jsx(TabsPrimitive.Trigger, {
|
|
124
|
+
"data-slot": "tabs-trigger",
|
|
125
|
+
className: t1,
|
|
126
|
+
...props
|
|
127
|
+
});
|
|
128
|
+
$[5] = props;
|
|
129
|
+
$[6] = t1;
|
|
130
|
+
$[7] = t2;
|
|
131
|
+
} else {
|
|
132
|
+
t2 = $[7];
|
|
133
|
+
}
|
|
134
|
+
return t2;
|
|
25
135
|
}
|
|
26
|
-
function TabsContent(
|
|
27
|
-
|
|
136
|
+
function TabsContent(t0) {
|
|
137
|
+
const $ = _c(8);
|
|
138
|
+
let className;
|
|
139
|
+
let props;
|
|
140
|
+
if ($[0] !== t0) {
|
|
141
|
+
({className, ...props} = t0);
|
|
142
|
+
$[0] = t0;
|
|
143
|
+
$[1] = className;
|
|
144
|
+
$[2] = props;
|
|
145
|
+
} else {
|
|
146
|
+
className = $[1];
|
|
147
|
+
props = $[2];
|
|
148
|
+
}
|
|
149
|
+
let t1;
|
|
150
|
+
if ($[3] !== className) {
|
|
151
|
+
t1 = cn("flex-1 text-sm outline-none", className);
|
|
152
|
+
$[3] = className;
|
|
153
|
+
$[4] = t1;
|
|
154
|
+
} else {
|
|
155
|
+
t1 = $[4];
|
|
156
|
+
}
|
|
157
|
+
let t2;
|
|
158
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
159
|
+
t2 = /* @__PURE__ */ _jsx(TabsPrimitive.Content, {
|
|
160
|
+
"data-slot": "tabs-content",
|
|
161
|
+
className: t1,
|
|
162
|
+
...props
|
|
163
|
+
});
|
|
164
|
+
$[5] = props;
|
|
165
|
+
$[6] = t1;
|
|
166
|
+
$[7] = t2;
|
|
167
|
+
} else {
|
|
168
|
+
t2 = $[7];
|
|
169
|
+
}
|
|
170
|
+
return t2;
|
|
28
171
|
}
|
|
29
172
|
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
function Textarea({ className, ...props }) {
|
|
4
|
-
|
|
5
|
+
return /* @__PURE__ */ _jsx("textarea", {
|
|
6
|
+
"data-slot": "textarea",
|
|
7
|
+
className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
5
10
|
}
|
|
6
11
|
export { Textarea };
|