@handled-ai/design-system 0.1.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/README.md +169 -0
- package/dist/index.d.ts +360 -0
- package/dist/index.js +2371 -0
- package/dist/index.js.map +1 -0
- package/package.json +93 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2371 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import * as React21 from 'react';
|
|
4
|
+
import { AlertCircle, Phone, Mail, MessageSquare, ArrowRight, ChevronDown, ArrowLeft, ThumbsUp, ThumbsDown, ChevronUp, XIcon, CheckIcon, CircleIcon, ChevronRightIcon, ExternalLink, Info, ArrowDown, ArrowUp, ChevronDownIcon, ChevronUpIcon, PanelLeftIcon, Activity, Heart, Scale } from 'lucide-react';
|
|
5
|
+
import { format } from 'date-fns';
|
|
6
|
+
import { Avatar as Avatar$1, Slot, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Tooltip, Tabs as Tabs$1 } from 'radix-ui';
|
|
7
|
+
import { cva } from 'class-variance-authority';
|
|
8
|
+
import { Slot as Slot$1 } from '@radix-ui/react-slot';
|
|
9
|
+
import * as RechartsPrimitive from 'recharts';
|
|
10
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
+
var __spreadValues = (a, b) => {
|
|
18
|
+
for (var prop in b || (b = {}))
|
|
19
|
+
if (__hasOwnProp.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
if (__getOwnPropSymbols)
|
|
22
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
+
if (__propIsEnum.call(b, prop))
|
|
24
|
+
__defNormalProp(a, prop, b[prop]);
|
|
25
|
+
}
|
|
26
|
+
return a;
|
|
27
|
+
};
|
|
28
|
+
var __objRest = (source, exclude) => {
|
|
29
|
+
var target = {};
|
|
30
|
+
for (var prop in source)
|
|
31
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
if (source != null && __getOwnPropSymbols)
|
|
34
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
35
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
36
|
+
target[prop] = source[prop];
|
|
37
|
+
}
|
|
38
|
+
return target;
|
|
39
|
+
};
|
|
40
|
+
function cn(...inputs) {
|
|
41
|
+
return twMerge(clsx(inputs));
|
|
42
|
+
}
|
|
43
|
+
var MOBILE_BREAKPOINT = 768;
|
|
44
|
+
function useIsMobile() {
|
|
45
|
+
const [isMobile, setIsMobile] = React21.useState(
|
|
46
|
+
void 0
|
|
47
|
+
);
|
|
48
|
+
React21.useEffect(() => {
|
|
49
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
50
|
+
const onChange = () => {
|
|
51
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
52
|
+
};
|
|
53
|
+
mql.addEventListener("change", onChange);
|
|
54
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
55
|
+
return () => mql.removeEventListener("change", onChange);
|
|
56
|
+
}, []);
|
|
57
|
+
return !!isMobile;
|
|
58
|
+
}
|
|
59
|
+
var getIcon = (type) => {
|
|
60
|
+
switch (type) {
|
|
61
|
+
case "workout":
|
|
62
|
+
return /* @__PURE__ */ React21.createElement(Activity, { size: 16, className: "text-orange-500" });
|
|
63
|
+
case "weighin":
|
|
64
|
+
return /* @__PURE__ */ React21.createElement(Scale, { size: 16, className: "text-blue-500" });
|
|
65
|
+
case "biometric":
|
|
66
|
+
return /* @__PURE__ */ React21.createElement(Heart, { size: 16, className: "text-rose-500" });
|
|
67
|
+
case "checkin":
|
|
68
|
+
return /* @__PURE__ */ React21.createElement(MessageSquare, { size: 16, className: "text-indigo-500" });
|
|
69
|
+
default:
|
|
70
|
+
return /* @__PURE__ */ React21.createElement(Activity, { size: 16, className: "text-gray-500" });
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
function ActivityRow({ item }) {
|
|
74
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-4 py-3 border-b border-gray-100 last:border-0 hover:bg-gray-50 px-2 -mx-2 rounded-md transition-colors group" }, /* @__PURE__ */ React21.createElement("div", { className: "flex-shrink-0 w-8 h-8 rounded-full bg-gray-50 border border-gray-200 flex items-center justify-center" }, getIcon(item.type)), /* @__PURE__ */ React21.createElement("div", { className: "flex-1 min-w-0 flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2" }, /* @__PURE__ */ React21.createElement("span", { className: "font-medium text-sm text-gray-900" }, item.title), /* @__PURE__ */ React21.createElement("span", { className: "hidden sm:inline text-gray-300" }, "\u2022"), /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-gray-500 truncate" }, item.details), item.type === "checkin" && /* @__PURE__ */ React21.createElement("button", { className: "ml-auto sm:ml-2 text-xs text-indigo-600 hover:text-indigo-800 font-medium flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity" }, "view ", /* @__PURE__ */ React21.createElement(ArrowRight, { size: 10 }))), /* @__PURE__ */ React21.createElement("div", { className: "text-right flex-shrink-0" }, /* @__PURE__ */ React21.createElement("div", { className: "text-xs text-gray-500" }, format(new Date(item.date), "MMM d")), /* @__PURE__ */ React21.createElement("div", { className: "text-[10px] text-gray-400" }, item.time)));
|
|
75
|
+
}
|
|
76
|
+
function ActivityLog({ items, title = "Recent Activity", initialLimit = 5 }) {
|
|
77
|
+
const [limit, setLimit] = React21.useState(initialLimit);
|
|
78
|
+
const displayedLogs = items.slice(0, limit);
|
|
79
|
+
const hasMore = limit < items.length;
|
|
80
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "bg-white rounded-xl border border-gray-200 p-6 shadow-sm" }, /* @__PURE__ */ React21.createElement("h2", { className: "text-lg font-semibold text-gray-900 mb-4" }, title), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col" }, displayedLogs.map((item) => /* @__PURE__ */ React21.createElement(ActivityRow, { key: item.id, item }))), hasMore && /* @__PURE__ */ React21.createElement(
|
|
81
|
+
"button",
|
|
82
|
+
{
|
|
83
|
+
onClick: () => setLimit((prev) => prev + 5),
|
|
84
|
+
className: "w-full mt-4 py-2 flex items-center justify-center gap-2 text-sm text-gray-500 hover:text-gray-900 hover:bg-gray-50 rounded-md transition-colors border border-dashed border-gray-200"
|
|
85
|
+
},
|
|
86
|
+
/* @__PURE__ */ React21.createElement(ChevronDown, { size: 14 }),
|
|
87
|
+
"Show more"
|
|
88
|
+
));
|
|
89
|
+
}
|
|
90
|
+
function Avatar(_a) {
|
|
91
|
+
var _b = _a, {
|
|
92
|
+
className,
|
|
93
|
+
size = "default"
|
|
94
|
+
} = _b, props = __objRest(_b, [
|
|
95
|
+
"className",
|
|
96
|
+
"size"
|
|
97
|
+
]);
|
|
98
|
+
return /* @__PURE__ */ React21.createElement(
|
|
99
|
+
Avatar$1.Root,
|
|
100
|
+
__spreadValues({
|
|
101
|
+
"data-slot": "avatar",
|
|
102
|
+
"data-size": size,
|
|
103
|
+
className: cn(
|
|
104
|
+
"group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
105
|
+
className
|
|
106
|
+
)
|
|
107
|
+
}, props)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
function AvatarImage(_a) {
|
|
111
|
+
var _b = _a, {
|
|
112
|
+
className
|
|
113
|
+
} = _b, props = __objRest(_b, [
|
|
114
|
+
"className"
|
|
115
|
+
]);
|
|
116
|
+
return /* @__PURE__ */ React21.createElement(
|
|
117
|
+
Avatar$1.Image,
|
|
118
|
+
__spreadValues({
|
|
119
|
+
"data-slot": "avatar-image",
|
|
120
|
+
className: cn("aspect-square size-full", className)
|
|
121
|
+
}, props)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function AvatarFallback(_a) {
|
|
125
|
+
var _b = _a, {
|
|
126
|
+
className
|
|
127
|
+
} = _b, props = __objRest(_b, [
|
|
128
|
+
"className"
|
|
129
|
+
]);
|
|
130
|
+
return /* @__PURE__ */ React21.createElement(
|
|
131
|
+
Avatar$1.Fallback,
|
|
132
|
+
__spreadValues({
|
|
133
|
+
"data-slot": "avatar-fallback",
|
|
134
|
+
className: cn(
|
|
135
|
+
"bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",
|
|
136
|
+
className
|
|
137
|
+
)
|
|
138
|
+
}, props)
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function AvatarBadge(_a) {
|
|
142
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
143
|
+
return /* @__PURE__ */ React21.createElement(
|
|
144
|
+
"span",
|
|
145
|
+
__spreadValues({
|
|
146
|
+
"data-slot": "avatar-badge",
|
|
147
|
+
className: cn(
|
|
148
|
+
"bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none",
|
|
149
|
+
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
150
|
+
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
151
|
+
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
152
|
+
className
|
|
153
|
+
)
|
|
154
|
+
}, props)
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function AvatarGroup(_a) {
|
|
158
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
159
|
+
return /* @__PURE__ */ React21.createElement(
|
|
160
|
+
"div",
|
|
161
|
+
__spreadValues({
|
|
162
|
+
"data-slot": "avatar-group",
|
|
163
|
+
className: cn(
|
|
164
|
+
"*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2",
|
|
165
|
+
className
|
|
166
|
+
)
|
|
167
|
+
}, props)
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
function AvatarGroupCount(_a) {
|
|
171
|
+
var _b = _a, {
|
|
172
|
+
className
|
|
173
|
+
} = _b, props = __objRest(_b, [
|
|
174
|
+
"className"
|
|
175
|
+
]);
|
|
176
|
+
return /* @__PURE__ */ React21.createElement(
|
|
177
|
+
"div",
|
|
178
|
+
__spreadValues({
|
|
179
|
+
"data-slot": "avatar-group-count",
|
|
180
|
+
className: cn(
|
|
181
|
+
"bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
182
|
+
className
|
|
183
|
+
)
|
|
184
|
+
}, props)
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
var badgeVariants = cva(
|
|
188
|
+
"inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
189
|
+
{
|
|
190
|
+
variants: {
|
|
191
|
+
variant: {
|
|
192
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
193
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
194
|
+
destructive: "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
195
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
196
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
197
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
defaultVariants: {
|
|
201
|
+
variant: "default"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
function Badge(_a) {
|
|
206
|
+
var _b = _a, {
|
|
207
|
+
className,
|
|
208
|
+
variant = "default",
|
|
209
|
+
asChild = false
|
|
210
|
+
} = _b, props = __objRest(_b, [
|
|
211
|
+
"className",
|
|
212
|
+
"variant",
|
|
213
|
+
"asChild"
|
|
214
|
+
]);
|
|
215
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
216
|
+
return /* @__PURE__ */ React21.createElement(
|
|
217
|
+
Comp,
|
|
218
|
+
__spreadValues({
|
|
219
|
+
"data-slot": "badge",
|
|
220
|
+
"data-variant": variant,
|
|
221
|
+
className: cn(badgeVariants({ variant }), className)
|
|
222
|
+
}, props)
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
var buttonVariants = cva(
|
|
226
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
227
|
+
{
|
|
228
|
+
variants: {
|
|
229
|
+
variant: {
|
|
230
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
231
|
+
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
232
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
233
|
+
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
234
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
235
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
236
|
+
},
|
|
237
|
+
size: {
|
|
238
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
239
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
240
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
241
|
+
icon: "size-9"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
defaultVariants: {
|
|
245
|
+
variant: "default",
|
|
246
|
+
size: "default"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
function Button(_a) {
|
|
251
|
+
var _b = _a, {
|
|
252
|
+
className,
|
|
253
|
+
variant,
|
|
254
|
+
size,
|
|
255
|
+
asChild = false
|
|
256
|
+
} = _b, props = __objRest(_b, [
|
|
257
|
+
"className",
|
|
258
|
+
"variant",
|
|
259
|
+
"size",
|
|
260
|
+
"asChild"
|
|
261
|
+
]);
|
|
262
|
+
const Comp = asChild ? Slot$1 : "button";
|
|
263
|
+
return /* @__PURE__ */ React21.createElement(
|
|
264
|
+
Comp,
|
|
265
|
+
__spreadValues({
|
|
266
|
+
"data-slot": "button",
|
|
267
|
+
className: cn(buttonVariants({ variant, size, className }))
|
|
268
|
+
}, props)
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
function Card(_a) {
|
|
272
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
273
|
+
return /* @__PURE__ */ React21.createElement(
|
|
274
|
+
"div",
|
|
275
|
+
__spreadValues({
|
|
276
|
+
"data-slot": "card",
|
|
277
|
+
className: cn(
|
|
278
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
279
|
+
className
|
|
280
|
+
)
|
|
281
|
+
}, props)
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
function CardHeader(_a) {
|
|
285
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
286
|
+
return /* @__PURE__ */ React21.createElement(
|
|
287
|
+
"div",
|
|
288
|
+
__spreadValues({
|
|
289
|
+
"data-slot": "card-header",
|
|
290
|
+
className: cn(
|
|
291
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
292
|
+
className
|
|
293
|
+
)
|
|
294
|
+
}, props)
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
function CardTitle(_a) {
|
|
298
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
299
|
+
return /* @__PURE__ */ React21.createElement(
|
|
300
|
+
"div",
|
|
301
|
+
__spreadValues({
|
|
302
|
+
"data-slot": "card-title",
|
|
303
|
+
className: cn("leading-none font-semibold", className)
|
|
304
|
+
}, props)
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
function CardDescription(_a) {
|
|
308
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
309
|
+
return /* @__PURE__ */ React21.createElement(
|
|
310
|
+
"div",
|
|
311
|
+
__spreadValues({
|
|
312
|
+
"data-slot": "card-description",
|
|
313
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
314
|
+
}, props)
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
function CardAction(_a) {
|
|
318
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
319
|
+
return /* @__PURE__ */ React21.createElement(
|
|
320
|
+
"div",
|
|
321
|
+
__spreadValues({
|
|
322
|
+
"data-slot": "card-action",
|
|
323
|
+
className: cn(
|
|
324
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
325
|
+
className
|
|
326
|
+
)
|
|
327
|
+
}, props)
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
function CardContent(_a) {
|
|
331
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
332
|
+
return /* @__PURE__ */ React21.createElement(
|
|
333
|
+
"div",
|
|
334
|
+
__spreadValues({
|
|
335
|
+
"data-slot": "card-content",
|
|
336
|
+
className: cn("px-6", className)
|
|
337
|
+
}, props)
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
function CardFooter(_a) {
|
|
341
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
342
|
+
return /* @__PURE__ */ React21.createElement(
|
|
343
|
+
"div",
|
|
344
|
+
__spreadValues({
|
|
345
|
+
"data-slot": "card-footer",
|
|
346
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className)
|
|
347
|
+
}, props)
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
351
|
+
var ChartContext = React21.createContext(null);
|
|
352
|
+
function useChart() {
|
|
353
|
+
const context = React21.useContext(ChartContext);
|
|
354
|
+
if (!context) {
|
|
355
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
356
|
+
}
|
|
357
|
+
return context;
|
|
358
|
+
}
|
|
359
|
+
function ChartContainer(_a) {
|
|
360
|
+
var _b = _a, {
|
|
361
|
+
id,
|
|
362
|
+
className,
|
|
363
|
+
children,
|
|
364
|
+
config
|
|
365
|
+
} = _b, props = __objRest(_b, [
|
|
366
|
+
"id",
|
|
367
|
+
"className",
|
|
368
|
+
"children",
|
|
369
|
+
"config"
|
|
370
|
+
]);
|
|
371
|
+
const uniqueId = React21.useId();
|
|
372
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
373
|
+
return /* @__PURE__ */ React21.createElement(ChartContext.Provider, { value: { config } }, /* @__PURE__ */ React21.createElement(
|
|
374
|
+
"div",
|
|
375
|
+
__spreadValues({
|
|
376
|
+
"data-slot": "chart",
|
|
377
|
+
"data-chart": chartId,
|
|
378
|
+
className: cn(
|
|
379
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
380
|
+
className
|
|
381
|
+
)
|
|
382
|
+
}, props),
|
|
383
|
+
/* @__PURE__ */ React21.createElement(ChartStyle, { id: chartId, config }),
|
|
384
|
+
/* @__PURE__ */ React21.createElement(RechartsPrimitive.ResponsiveContainer, null, children)
|
|
385
|
+
));
|
|
386
|
+
}
|
|
387
|
+
var ChartStyle = ({ id, config }) => {
|
|
388
|
+
const colorConfig = Object.entries(config).filter(
|
|
389
|
+
([, config2]) => config2.theme || config2.color
|
|
390
|
+
);
|
|
391
|
+
if (!colorConfig.length) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
return /* @__PURE__ */ React21.createElement(
|
|
395
|
+
"style",
|
|
396
|
+
{
|
|
397
|
+
dangerouslySetInnerHTML: {
|
|
398
|
+
__html: Object.entries(THEMES).map(
|
|
399
|
+
([theme, prefix]) => `
|
|
400
|
+
${prefix} [data-chart=${id}] {
|
|
401
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
402
|
+
var _a;
|
|
403
|
+
const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
|
|
404
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
405
|
+
}).join("\n")}
|
|
406
|
+
}
|
|
407
|
+
`
|
|
408
|
+
).join("\n")
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
};
|
|
413
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
414
|
+
function ChartTooltipContent({
|
|
415
|
+
active,
|
|
416
|
+
payload,
|
|
417
|
+
className,
|
|
418
|
+
indicator = "dot",
|
|
419
|
+
hideLabel = false,
|
|
420
|
+
hideIndicator = false,
|
|
421
|
+
label,
|
|
422
|
+
labelFormatter,
|
|
423
|
+
labelClassName,
|
|
424
|
+
formatter,
|
|
425
|
+
color,
|
|
426
|
+
nameKey,
|
|
427
|
+
labelKey
|
|
428
|
+
}) {
|
|
429
|
+
const { config } = useChart();
|
|
430
|
+
const tooltipLabel = React21.useMemo(() => {
|
|
431
|
+
var _a;
|
|
432
|
+
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
const [item] = payload;
|
|
436
|
+
const key = `${labelKey || (item == null ? void 0 : item.dataKey) || (item == null ? void 0 : item.name) || "value"}`;
|
|
437
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
438
|
+
const value = !labelKey && typeof label === "string" ? ((_a = config[label]) == null ? void 0 : _a.label) || label : itemConfig == null ? void 0 : itemConfig.label;
|
|
439
|
+
if (labelFormatter) {
|
|
440
|
+
return /* @__PURE__ */ React21.createElement("div", { className: cn("font-medium", labelClassName) }, labelFormatter(value, payload));
|
|
441
|
+
}
|
|
442
|
+
if (!value) {
|
|
443
|
+
return null;
|
|
444
|
+
}
|
|
445
|
+
return /* @__PURE__ */ React21.createElement("div", { className: cn("font-medium", labelClassName) }, value);
|
|
446
|
+
}, [
|
|
447
|
+
label,
|
|
448
|
+
labelFormatter,
|
|
449
|
+
payload,
|
|
450
|
+
hideLabel,
|
|
451
|
+
labelClassName,
|
|
452
|
+
config,
|
|
453
|
+
labelKey
|
|
454
|
+
]);
|
|
455
|
+
if (!active || !(payload == null ? void 0 : payload.length)) {
|
|
456
|
+
return null;
|
|
457
|
+
}
|
|
458
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
459
|
+
return /* @__PURE__ */ React21.createElement(
|
|
460
|
+
"div",
|
|
461
|
+
{
|
|
462
|
+
className: cn(
|
|
463
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
464
|
+
className
|
|
465
|
+
)
|
|
466
|
+
},
|
|
467
|
+
!nestLabel ? tooltipLabel : null,
|
|
468
|
+
/* @__PURE__ */ React21.createElement("div", { className: "grid gap-1.5" }, payload.map((item, index) => {
|
|
469
|
+
var _a, _b;
|
|
470
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
471
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
472
|
+
const indicatorColor = color || ((_a = item.payload) == null ? void 0 : _a.fill) || item.color;
|
|
473
|
+
return /* @__PURE__ */ React21.createElement(
|
|
474
|
+
"div",
|
|
475
|
+
{
|
|
476
|
+
key: item.dataKey,
|
|
477
|
+
className: cn(
|
|
478
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
479
|
+
indicator === "dot" && "items-center"
|
|
480
|
+
)
|
|
481
|
+
},
|
|
482
|
+
formatter && (item == null ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, (_b = item.payload) != null ? _b : {}) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, (itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ React21.createElement(itemConfig.icon, null) : !hideIndicator && /* @__PURE__ */ React21.createElement(
|
|
483
|
+
"div",
|
|
484
|
+
{
|
|
485
|
+
className: cn(
|
|
486
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
487
|
+
{
|
|
488
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
489
|
+
"w-1": indicator === "line",
|
|
490
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
491
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
492
|
+
}
|
|
493
|
+
),
|
|
494
|
+
style: {
|
|
495
|
+
"--color-bg": indicatorColor,
|
|
496
|
+
"--color-border": indicatorColor
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
), /* @__PURE__ */ React21.createElement(
|
|
500
|
+
"div",
|
|
501
|
+
{
|
|
502
|
+
className: cn(
|
|
503
|
+
"flex flex-1 justify-between leading-none",
|
|
504
|
+
nestLabel ? "items-end" : "items-center"
|
|
505
|
+
)
|
|
506
|
+
},
|
|
507
|
+
/* @__PURE__ */ React21.createElement("div", { className: "grid gap-1.5" }, nestLabel ? tooltipLabel : null, /* @__PURE__ */ React21.createElement("span", { className: "text-muted-foreground" }, (itemConfig == null ? void 0 : itemConfig.label) || item.name)),
|
|
508
|
+
item.value && /* @__PURE__ */ React21.createElement("span", { className: "text-foreground font-mono font-medium tabular-nums" }, item.value.toLocaleString())
|
|
509
|
+
))
|
|
510
|
+
);
|
|
511
|
+
}))
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
515
|
+
function ChartLegendContent({
|
|
516
|
+
className,
|
|
517
|
+
hideIcon = false,
|
|
518
|
+
payload,
|
|
519
|
+
verticalAlign = "bottom",
|
|
520
|
+
nameKey
|
|
521
|
+
}) {
|
|
522
|
+
const { config } = useChart();
|
|
523
|
+
if (!(payload == null ? void 0 : payload.length)) {
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
return /* @__PURE__ */ React21.createElement(
|
|
527
|
+
"div",
|
|
528
|
+
{
|
|
529
|
+
className: cn(
|
|
530
|
+
"flex items-center justify-center gap-4",
|
|
531
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
532
|
+
className
|
|
533
|
+
)
|
|
534
|
+
},
|
|
535
|
+
payload.map((item) => {
|
|
536
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
537
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
538
|
+
return /* @__PURE__ */ React21.createElement(
|
|
539
|
+
"div",
|
|
540
|
+
{
|
|
541
|
+
key: item.value,
|
|
542
|
+
className: cn(
|
|
543
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
544
|
+
)
|
|
545
|
+
},
|
|
546
|
+
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ React21.createElement(itemConfig.icon, null) : /* @__PURE__ */ React21.createElement(
|
|
547
|
+
"div",
|
|
548
|
+
{
|
|
549
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
550
|
+
style: {
|
|
551
|
+
backgroundColor: item.color
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
),
|
|
555
|
+
itemConfig == null ? void 0 : itemConfig.label
|
|
556
|
+
);
|
|
557
|
+
})
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
561
|
+
if (typeof payload !== "object" || payload === null) {
|
|
562
|
+
return void 0;
|
|
563
|
+
}
|
|
564
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
565
|
+
let configLabelKey = key;
|
|
566
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
567
|
+
configLabelKey = payload[key];
|
|
568
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
569
|
+
configLabelKey = payloadPayload[key];
|
|
570
|
+
}
|
|
571
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
572
|
+
}
|
|
573
|
+
function DetailViewHeader({
|
|
574
|
+
title,
|
|
575
|
+
breadcrumbs,
|
|
576
|
+
badges,
|
|
577
|
+
onBack
|
|
578
|
+
}) {
|
|
579
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-4 mb-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 text-sm text-muted-foreground" }, onBack && /* @__PURE__ */ React21.createElement(
|
|
580
|
+
Button,
|
|
581
|
+
{
|
|
582
|
+
variant: "ghost",
|
|
583
|
+
size: "sm",
|
|
584
|
+
className: "h-6 px-2 text-muted-foreground hover:text-foreground -ml-2",
|
|
585
|
+
onClick: onBack
|
|
586
|
+
},
|
|
587
|
+
/* @__PURE__ */ React21.createElement(ArrowLeft, { className: "w-4 h-4 mr-1" }),
|
|
588
|
+
"Back"
|
|
589
|
+
), /* @__PURE__ */ React21.createElement("span", { className: "text-muted-foreground/50" }, "\xB7"), breadcrumbs), /* @__PURE__ */ React21.createElement("h1", { className: "text-2xl font-bold tracking-tight text-foreground" }, title), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-wrap items-center gap-2" }, badges));
|
|
590
|
+
}
|
|
591
|
+
function DetailViewSummary({
|
|
592
|
+
title = "Here's what I found",
|
|
593
|
+
children,
|
|
594
|
+
sources
|
|
595
|
+
}) {
|
|
596
|
+
const [showSources, setShowSources] = React21.useState(false);
|
|
597
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "relative pl-4 mb-8" }, /* @__PURE__ */ React21.createElement("div", { className: "absolute left-0 top-1 bottom-1 w-1 bg-brand-purple rounded-full" }), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React21.createElement("h2", { className: "text-base font-semibold text-foreground" }, title), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React21.createElement(Button, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground" }, /* @__PURE__ */ React21.createElement(ThumbsUp, { className: "w-3.5 h-3.5" })), /* @__PURE__ */ React21.createElement(Button, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground" }, /* @__PURE__ */ React21.createElement(ThumbsDown, { className: "w-3.5 h-3.5" })))), /* @__PURE__ */ React21.createElement("div", { className: "space-y-3 text-sm text-foreground/90" }, children), sources && /* @__PURE__ */ React21.createElement("div", { className: "mt-4" }, /* @__PURE__ */ React21.createElement(
|
|
598
|
+
Button,
|
|
599
|
+
{
|
|
600
|
+
variant: "ghost",
|
|
601
|
+
size: "sm",
|
|
602
|
+
onClick: () => setShowSources(!showSources),
|
|
603
|
+
className: "h-6 px-0 text-xs font-semibold text-muted-foreground hover:text-foreground uppercase tracking-wider bg-transparent"
|
|
604
|
+
},
|
|
605
|
+
"SOURCES",
|
|
606
|
+
showSources ? /* @__PURE__ */ React21.createElement(ChevronUp, { className: "w-3.5 h-3.5 ml-1" }) : /* @__PURE__ */ React21.createElement(ChevronDown, { className: "w-3.5 h-3.5 ml-1" })
|
|
607
|
+
), showSources && /* @__PURE__ */ React21.createElement("div", { className: "mt-2 text-sm text-muted-foreground" }, sources)));
|
|
608
|
+
}
|
|
609
|
+
function Citation({ number }) {
|
|
610
|
+
return /* @__PURE__ */ React21.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-muted border border-border text-[9px] font-medium text-muted-foreground ml-1 align-middle cursor-pointer hover:bg-muted/80" }, number);
|
|
611
|
+
}
|
|
612
|
+
function DetailViewThread({
|
|
613
|
+
title,
|
|
614
|
+
actionCount,
|
|
615
|
+
children
|
|
616
|
+
}) {
|
|
617
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "mt-8 border-t border-border pt-8" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React21.createElement("h3", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider" }, title), actionCount !== void 0 && /* @__PURE__ */ React21.createElement("span", { className: "text-sm text-muted-foreground" }, actionCount, " actions")), /* @__PURE__ */ React21.createElement("div", { className: "rounded-xl border border-border bg-card overflow-hidden shadow-sm" }, children));
|
|
618
|
+
}
|
|
619
|
+
function ThreadMessage({
|
|
620
|
+
icon,
|
|
621
|
+
subject,
|
|
622
|
+
time,
|
|
623
|
+
messageCount,
|
|
624
|
+
threadLink,
|
|
625
|
+
sender,
|
|
626
|
+
senderTime,
|
|
627
|
+
children,
|
|
628
|
+
isExpanded = true
|
|
629
|
+
}) {
|
|
630
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between p-4 border-b border-border bg-card hover:bg-muted/30 cursor-pointer" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3" }, icon || /* @__PURE__ */ React21.createElement(MessageSquare, { className: "w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ React21.createElement("span", { className: "font-semibold text-sm" }, subject)), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-3 text-xs text-muted-foreground" }, time, /* @__PURE__ */ React21.createElement(ChevronUp, { className: "w-4 h-4" }))), messageCount !== void 0 && /* @__PURE__ */ React21.createElement("div", { className: "px-4 py-2 bg-muted/20 border-b border-border text-xs text-muted-foreground flex items-center gap-2" }, messageCount, " messages in this thread \xB7", threadLink && /* @__PURE__ */ React21.createElement("a", { href: threadLink, className: "underline hover:text-foreground" }, "View thread")), isExpanded && /* @__PURE__ */ React21.createElement("div", { className: "p-4" }, sender && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center justify-between mb-2" }, /* @__PURE__ */ React21.createElement("span", { className: "font-semibold text-sm" }, sender), senderTime && /* @__PURE__ */ React21.createElement("span", { className: "text-xs text-muted-foreground" }, senderTime)), /* @__PURE__ */ React21.createElement("div", { className: "text-sm text-foreground/90 space-y-4 leading-relaxed" }, children)));
|
|
631
|
+
}
|
|
632
|
+
function Dialog(_a) {
|
|
633
|
+
var props = __objRest(_a, []);
|
|
634
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Root, __spreadValues({ "data-slot": "dialog" }, props));
|
|
635
|
+
}
|
|
636
|
+
function DialogTrigger(_a) {
|
|
637
|
+
var props = __objRest(_a, []);
|
|
638
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
|
|
639
|
+
}
|
|
640
|
+
function DialogPortal(_a) {
|
|
641
|
+
var props = __objRest(_a, []);
|
|
642
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
|
|
643
|
+
}
|
|
644
|
+
function DialogClose(_a) {
|
|
645
|
+
var props = __objRest(_a, []);
|
|
646
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
|
|
647
|
+
}
|
|
648
|
+
function DialogOverlay(_a) {
|
|
649
|
+
var _b = _a, {
|
|
650
|
+
className
|
|
651
|
+
} = _b, props = __objRest(_b, [
|
|
652
|
+
"className"
|
|
653
|
+
]);
|
|
654
|
+
return /* @__PURE__ */ React21.createElement(
|
|
655
|
+
Dialog$1.Overlay,
|
|
656
|
+
__spreadValues({
|
|
657
|
+
"data-slot": "dialog-overlay",
|
|
658
|
+
className: cn(
|
|
659
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
660
|
+
className
|
|
661
|
+
)
|
|
662
|
+
}, props)
|
|
663
|
+
);
|
|
664
|
+
}
|
|
665
|
+
function DialogContent(_a) {
|
|
666
|
+
var _b = _a, {
|
|
667
|
+
className,
|
|
668
|
+
children,
|
|
669
|
+
showCloseButton = true
|
|
670
|
+
} = _b, props = __objRest(_b, [
|
|
671
|
+
"className",
|
|
672
|
+
"children",
|
|
673
|
+
"showCloseButton"
|
|
674
|
+
]);
|
|
675
|
+
return /* @__PURE__ */ React21.createElement(DialogPortal, { "data-slot": "dialog-portal" }, /* @__PURE__ */ React21.createElement(DialogOverlay, null), /* @__PURE__ */ React21.createElement(
|
|
676
|
+
Dialog$1.Content,
|
|
677
|
+
__spreadValues({
|
|
678
|
+
"data-slot": "dialog-content",
|
|
679
|
+
className: cn(
|
|
680
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
|
|
681
|
+
className
|
|
682
|
+
)
|
|
683
|
+
}, props),
|
|
684
|
+
children,
|
|
685
|
+
showCloseButton && /* @__PURE__ */ React21.createElement(
|
|
686
|
+
Dialog$1.Close,
|
|
687
|
+
{
|
|
688
|
+
"data-slot": "dialog-close",
|
|
689
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
690
|
+
},
|
|
691
|
+
/* @__PURE__ */ React21.createElement(XIcon, null),
|
|
692
|
+
/* @__PURE__ */ React21.createElement("span", { className: "sr-only" }, "Close")
|
|
693
|
+
)
|
|
694
|
+
));
|
|
695
|
+
}
|
|
696
|
+
function DialogHeader(_a) {
|
|
697
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
698
|
+
return /* @__PURE__ */ React21.createElement(
|
|
699
|
+
"div",
|
|
700
|
+
__spreadValues({
|
|
701
|
+
"data-slot": "dialog-header",
|
|
702
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className)
|
|
703
|
+
}, props)
|
|
704
|
+
);
|
|
705
|
+
}
|
|
706
|
+
function DialogFooter(_a) {
|
|
707
|
+
var _b = _a, {
|
|
708
|
+
className,
|
|
709
|
+
showCloseButton = false,
|
|
710
|
+
children
|
|
711
|
+
} = _b, props = __objRest(_b, [
|
|
712
|
+
"className",
|
|
713
|
+
"showCloseButton",
|
|
714
|
+
"children"
|
|
715
|
+
]);
|
|
716
|
+
return /* @__PURE__ */ React21.createElement(
|
|
717
|
+
"div",
|
|
718
|
+
__spreadValues({
|
|
719
|
+
"data-slot": "dialog-footer",
|
|
720
|
+
className: cn(
|
|
721
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
722
|
+
className
|
|
723
|
+
)
|
|
724
|
+
}, props),
|
|
725
|
+
children,
|
|
726
|
+
showCloseButton && /* @__PURE__ */ React21.createElement(Dialog$1.Close, { asChild: true }, /* @__PURE__ */ React21.createElement(Button, { variant: "outline" }, "Close"))
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
function DialogTitle(_a) {
|
|
730
|
+
var _b = _a, {
|
|
731
|
+
className
|
|
732
|
+
} = _b, props = __objRest(_b, [
|
|
733
|
+
"className"
|
|
734
|
+
]);
|
|
735
|
+
return /* @__PURE__ */ React21.createElement(
|
|
736
|
+
Dialog$1.Title,
|
|
737
|
+
__spreadValues({
|
|
738
|
+
"data-slot": "dialog-title",
|
|
739
|
+
className: cn("text-lg leading-none font-semibold", className)
|
|
740
|
+
}, props)
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
function DialogDescription(_a) {
|
|
744
|
+
var _b = _a, {
|
|
745
|
+
className
|
|
746
|
+
} = _b, props = __objRest(_b, [
|
|
747
|
+
"className"
|
|
748
|
+
]);
|
|
749
|
+
return /* @__PURE__ */ React21.createElement(
|
|
750
|
+
Dialog$1.Description,
|
|
751
|
+
__spreadValues({
|
|
752
|
+
"data-slot": "dialog-description",
|
|
753
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
754
|
+
}, props)
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
function DropdownMenu(_a) {
|
|
758
|
+
var props = __objRest(_a, []);
|
|
759
|
+
return /* @__PURE__ */ React21.createElement(DropdownMenu$1.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
|
|
760
|
+
}
|
|
761
|
+
function DropdownMenuPortal(_a) {
|
|
762
|
+
var props = __objRest(_a, []);
|
|
763
|
+
return /* @__PURE__ */ React21.createElement(DropdownMenu$1.Portal, __spreadValues({ "data-slot": "dropdown-menu-portal" }, props));
|
|
764
|
+
}
|
|
765
|
+
function DropdownMenuTrigger(_a) {
|
|
766
|
+
var props = __objRest(_a, []);
|
|
767
|
+
return /* @__PURE__ */ React21.createElement(
|
|
768
|
+
DropdownMenu$1.Trigger,
|
|
769
|
+
__spreadValues({
|
|
770
|
+
"data-slot": "dropdown-menu-trigger"
|
|
771
|
+
}, props)
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
function DropdownMenuContent(_a) {
|
|
775
|
+
var _b = _a, {
|
|
776
|
+
className,
|
|
777
|
+
sideOffset = 4
|
|
778
|
+
} = _b, props = __objRest(_b, [
|
|
779
|
+
"className",
|
|
780
|
+
"sideOffset"
|
|
781
|
+
]);
|
|
782
|
+
return /* @__PURE__ */ React21.createElement(DropdownMenu$1.Portal, null, /* @__PURE__ */ React21.createElement(
|
|
783
|
+
DropdownMenu$1.Content,
|
|
784
|
+
__spreadValues({
|
|
785
|
+
"data-slot": "dropdown-menu-content",
|
|
786
|
+
sideOffset,
|
|
787
|
+
className: cn(
|
|
788
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
789
|
+
className
|
|
790
|
+
)
|
|
791
|
+
}, props)
|
|
792
|
+
));
|
|
793
|
+
}
|
|
794
|
+
function DropdownMenuGroup(_a) {
|
|
795
|
+
var props = __objRest(_a, []);
|
|
796
|
+
return /* @__PURE__ */ React21.createElement(DropdownMenu$1.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
797
|
+
}
|
|
798
|
+
function DropdownMenuItem(_a) {
|
|
799
|
+
var _b = _a, {
|
|
800
|
+
className,
|
|
801
|
+
inset,
|
|
802
|
+
variant = "default"
|
|
803
|
+
} = _b, props = __objRest(_b, [
|
|
804
|
+
"className",
|
|
805
|
+
"inset",
|
|
806
|
+
"variant"
|
|
807
|
+
]);
|
|
808
|
+
return /* @__PURE__ */ React21.createElement(
|
|
809
|
+
DropdownMenu$1.Item,
|
|
810
|
+
__spreadValues({
|
|
811
|
+
"data-slot": "dropdown-menu-item",
|
|
812
|
+
"data-inset": inset,
|
|
813
|
+
"data-variant": variant,
|
|
814
|
+
className: cn(
|
|
815
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
816
|
+
className
|
|
817
|
+
)
|
|
818
|
+
}, props)
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
function DropdownMenuCheckboxItem(_a) {
|
|
822
|
+
var _b = _a, {
|
|
823
|
+
className,
|
|
824
|
+
children,
|
|
825
|
+
checked
|
|
826
|
+
} = _b, props = __objRest(_b, [
|
|
827
|
+
"className",
|
|
828
|
+
"children",
|
|
829
|
+
"checked"
|
|
830
|
+
]);
|
|
831
|
+
return /* @__PURE__ */ React21.createElement(
|
|
832
|
+
DropdownMenu$1.CheckboxItem,
|
|
833
|
+
__spreadValues({
|
|
834
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
835
|
+
className: cn(
|
|
836
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
837
|
+
className
|
|
838
|
+
),
|
|
839
|
+
checked
|
|
840
|
+
}, props),
|
|
841
|
+
/* @__PURE__ */ React21.createElement("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, /* @__PURE__ */ React21.createElement(DropdownMenu$1.ItemIndicator, null, /* @__PURE__ */ React21.createElement(CheckIcon, { className: "size-4" }))),
|
|
842
|
+
children
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
function DropdownMenuRadioGroup(_a) {
|
|
846
|
+
var props = __objRest(_a, []);
|
|
847
|
+
return /* @__PURE__ */ React21.createElement(
|
|
848
|
+
DropdownMenu$1.RadioGroup,
|
|
849
|
+
__spreadValues({
|
|
850
|
+
"data-slot": "dropdown-menu-radio-group"
|
|
851
|
+
}, props)
|
|
852
|
+
);
|
|
853
|
+
}
|
|
854
|
+
function DropdownMenuRadioItem(_a) {
|
|
855
|
+
var _b = _a, {
|
|
856
|
+
className,
|
|
857
|
+
children
|
|
858
|
+
} = _b, props = __objRest(_b, [
|
|
859
|
+
"className",
|
|
860
|
+
"children"
|
|
861
|
+
]);
|
|
862
|
+
return /* @__PURE__ */ React21.createElement(
|
|
863
|
+
DropdownMenu$1.RadioItem,
|
|
864
|
+
__spreadValues({
|
|
865
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
866
|
+
className: cn(
|
|
867
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
868
|
+
className
|
|
869
|
+
)
|
|
870
|
+
}, props),
|
|
871
|
+
/* @__PURE__ */ React21.createElement("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center" }, /* @__PURE__ */ React21.createElement(DropdownMenu$1.ItemIndicator, null, /* @__PURE__ */ React21.createElement(CircleIcon, { className: "size-2 fill-current" }))),
|
|
872
|
+
children
|
|
873
|
+
);
|
|
874
|
+
}
|
|
875
|
+
function DropdownMenuLabel(_a) {
|
|
876
|
+
var _b = _a, {
|
|
877
|
+
className,
|
|
878
|
+
inset
|
|
879
|
+
} = _b, props = __objRest(_b, [
|
|
880
|
+
"className",
|
|
881
|
+
"inset"
|
|
882
|
+
]);
|
|
883
|
+
return /* @__PURE__ */ React21.createElement(
|
|
884
|
+
DropdownMenu$1.Label,
|
|
885
|
+
__spreadValues({
|
|
886
|
+
"data-slot": "dropdown-menu-label",
|
|
887
|
+
"data-inset": inset,
|
|
888
|
+
className: cn(
|
|
889
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
890
|
+
className
|
|
891
|
+
)
|
|
892
|
+
}, props)
|
|
893
|
+
);
|
|
894
|
+
}
|
|
895
|
+
function DropdownMenuSeparator(_a) {
|
|
896
|
+
var _b = _a, {
|
|
897
|
+
className
|
|
898
|
+
} = _b, props = __objRest(_b, [
|
|
899
|
+
"className"
|
|
900
|
+
]);
|
|
901
|
+
return /* @__PURE__ */ React21.createElement(
|
|
902
|
+
DropdownMenu$1.Separator,
|
|
903
|
+
__spreadValues({
|
|
904
|
+
"data-slot": "dropdown-menu-separator",
|
|
905
|
+
className: cn("bg-border -mx-1 my-1 h-px", className)
|
|
906
|
+
}, props)
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
function DropdownMenuShortcut(_a) {
|
|
910
|
+
var _b = _a, {
|
|
911
|
+
className
|
|
912
|
+
} = _b, props = __objRest(_b, [
|
|
913
|
+
"className"
|
|
914
|
+
]);
|
|
915
|
+
return /* @__PURE__ */ React21.createElement(
|
|
916
|
+
"span",
|
|
917
|
+
__spreadValues({
|
|
918
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
919
|
+
className: cn(
|
|
920
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
921
|
+
className
|
|
922
|
+
)
|
|
923
|
+
}, props)
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
function DropdownMenuSub(_a) {
|
|
927
|
+
var props = __objRest(_a, []);
|
|
928
|
+
return /* @__PURE__ */ React21.createElement(DropdownMenu$1.Sub, __spreadValues({ "data-slot": "dropdown-menu-sub" }, props));
|
|
929
|
+
}
|
|
930
|
+
function DropdownMenuSubTrigger(_a) {
|
|
931
|
+
var _b = _a, {
|
|
932
|
+
className,
|
|
933
|
+
inset,
|
|
934
|
+
children
|
|
935
|
+
} = _b, props = __objRest(_b, [
|
|
936
|
+
"className",
|
|
937
|
+
"inset",
|
|
938
|
+
"children"
|
|
939
|
+
]);
|
|
940
|
+
return /* @__PURE__ */ React21.createElement(
|
|
941
|
+
DropdownMenu$1.SubTrigger,
|
|
942
|
+
__spreadValues({
|
|
943
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
944
|
+
"data-inset": inset,
|
|
945
|
+
className: cn(
|
|
946
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
947
|
+
className
|
|
948
|
+
)
|
|
949
|
+
}, props),
|
|
950
|
+
children,
|
|
951
|
+
/* @__PURE__ */ React21.createElement(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
952
|
+
);
|
|
953
|
+
}
|
|
954
|
+
function DropdownMenuSubContent(_a) {
|
|
955
|
+
var _b = _a, {
|
|
956
|
+
className
|
|
957
|
+
} = _b, props = __objRest(_b, [
|
|
958
|
+
"className"
|
|
959
|
+
]);
|
|
960
|
+
return /* @__PURE__ */ React21.createElement(
|
|
961
|
+
DropdownMenu$1.SubContent,
|
|
962
|
+
__spreadValues({
|
|
963
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
964
|
+
className: cn(
|
|
965
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
966
|
+
className
|
|
967
|
+
)
|
|
968
|
+
}, props)
|
|
969
|
+
);
|
|
970
|
+
}
|
|
971
|
+
var InboxRow = React21.forwardRef(
|
|
972
|
+
(_a, ref) => {
|
|
973
|
+
var _b = _a, {
|
|
974
|
+
className,
|
|
975
|
+
itemId,
|
|
976
|
+
statusColor,
|
|
977
|
+
primaryText,
|
|
978
|
+
secondaryText,
|
|
979
|
+
tertiaryText,
|
|
980
|
+
isAtRisk = false,
|
|
981
|
+
contactMethods = { phone: true, email: true, message: true },
|
|
982
|
+
interactionCount,
|
|
983
|
+
assignee,
|
|
984
|
+
status,
|
|
985
|
+
time
|
|
986
|
+
} = _b, props = __objRest(_b, [
|
|
987
|
+
"className",
|
|
988
|
+
"itemId",
|
|
989
|
+
"statusColor",
|
|
990
|
+
"primaryText",
|
|
991
|
+
"secondaryText",
|
|
992
|
+
"tertiaryText",
|
|
993
|
+
"isAtRisk",
|
|
994
|
+
"contactMethods",
|
|
995
|
+
"interactionCount",
|
|
996
|
+
"assignee",
|
|
997
|
+
"status",
|
|
998
|
+
"time"
|
|
999
|
+
]);
|
|
1000
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1001
|
+
"div",
|
|
1002
|
+
__spreadValues({
|
|
1003
|
+
ref,
|
|
1004
|
+
className: cn(
|
|
1005
|
+
"group flex items-center gap-4 py-3 px-4 border-b border-border hover:bg-muted/50 cursor-pointer bg-background transition-colors text-sm",
|
|
1006
|
+
className
|
|
1007
|
+
)
|
|
1008
|
+
}, props),
|
|
1009
|
+
/* @__PURE__ */ React21.createElement("div", { className: "w-24 shrink-0 text-muted-foreground font-medium text-[13px]" }, itemId),
|
|
1010
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex-1 min-w-0 flex items-center gap-3" }, /* @__PURE__ */ React21.createElement(
|
|
1011
|
+
"div",
|
|
1012
|
+
{
|
|
1013
|
+
className: cn("w-2 h-2 rounded-full shrink-0", {
|
|
1014
|
+
"bg-red-500": statusColor === "red",
|
|
1015
|
+
"bg-orange-500": statusColor === "orange",
|
|
1016
|
+
"bg-gray-300": statusColor === "gray"
|
|
1017
|
+
})
|
|
1018
|
+
}
|
|
1019
|
+
), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 truncate" }, /* @__PURE__ */ React21.createElement("span", { className: "font-semibold text-foreground" }, primaryText), /* @__PURE__ */ React21.createElement("span", { className: "text-muted-foreground" }, "via ", secondaryText), /* @__PURE__ */ React21.createElement("span", { className: "text-muted-foreground" }, "\u2192"), /* @__PURE__ */ React21.createElement("span", { className: "text-muted-foreground" }, tertiaryText))),
|
|
1020
|
+
/* @__PURE__ */ React21.createElement("div", { className: "w-24 shrink-0 flex items-center justify-end px-2" }, isAtRisk && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1 text-red-600 bg-red-50 px-2 py-0.5 rounded-md text-[11px] font-medium border border-red-100" }, /* @__PURE__ */ React21.createElement(AlertCircle, { className: "w-3 h-3" }), "At Risk")),
|
|
1021
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 text-muted-foreground/40 shrink-0 w-20 justify-center" }, /* @__PURE__ */ React21.createElement(Phone, { className: cn("w-3.5 h-3.5", contactMethods.phone && "text-muted-foreground/80") }), /* @__PURE__ */ React21.createElement(Mail, { className: cn("w-3.5 h-3.5", contactMethods.email && "text-muted-foreground/80") }), /* @__PURE__ */ React21.createElement(MessageSquare, { className: cn("w-3.5 h-3.5", contactMethods.message && "text-muted-foreground/80") })),
|
|
1022
|
+
/* @__PURE__ */ React21.createElement("div", { className: "w-12 shrink-0 flex items-center justify-center" }, /* @__PURE__ */ React21.createElement(
|
|
1023
|
+
"div",
|
|
1024
|
+
{
|
|
1025
|
+
className: cn(
|
|
1026
|
+
"text-[11px] font-medium px-1.5 py-0.5 rounded border",
|
|
1027
|
+
typeof interactionCount === "string" && interactionCount.includes("+") ? "bg-red-50 border-red-200 text-red-700" : Number(interactionCount) > 2 ? "bg-yellow-50 border-yellow-200 text-yellow-700" : "bg-muted border-border text-foreground"
|
|
1028
|
+
)
|
|
1029
|
+
},
|
|
1030
|
+
interactionCount
|
|
1031
|
+
)),
|
|
1032
|
+
/* @__PURE__ */ React21.createElement("div", { className: "w-32 shrink-0 text-[13px] font-medium text-foreground truncate" }, assignee),
|
|
1033
|
+
/* @__PURE__ */ React21.createElement("div", { className: "w-28 shrink-0" }, /* @__PURE__ */ React21.createElement("div", { className: "inline-flex items-center bg-muted/80 px-2 py-0.5 rounded text-[11px] font-medium text-muted-foreground" }, status)),
|
|
1034
|
+
/* @__PURE__ */ React21.createElement("div", { className: "w-24 shrink-0 text-right text-[12px] text-muted-foreground" }, time)
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
);
|
|
1038
|
+
InboxRow.displayName = "InboxRow";
|
|
1039
|
+
function InboxGroupHeader({ title, count }) {
|
|
1040
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-2 py-2 px-4 bg-muted/30 border-b border-border text-[11px] font-bold text-muted-foreground uppercase tracking-wider" }, /* @__PURE__ */ React21.createElement(ChevronDown, { className: "w-3.5 h-3.5" }), title, /* @__PURE__ */ React21.createElement("span", { className: "bg-background border border-border px-1.5 py-0.5 rounded text-[10px]" }, count));
|
|
1041
|
+
}
|
|
1042
|
+
function Input(_a) {
|
|
1043
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
1044
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1045
|
+
"input",
|
|
1046
|
+
__spreadValues({
|
|
1047
|
+
type,
|
|
1048
|
+
"data-slot": "input",
|
|
1049
|
+
className: cn(
|
|
1050
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1051
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
1052
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1053
|
+
className
|
|
1054
|
+
)
|
|
1055
|
+
}, props)
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
function Label(_a) {
|
|
1059
|
+
var _b = _a, {
|
|
1060
|
+
className
|
|
1061
|
+
} = _b, props = __objRest(_b, [
|
|
1062
|
+
"className"
|
|
1063
|
+
]);
|
|
1064
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1065
|
+
LabelPrimitive.Root,
|
|
1066
|
+
__spreadValues({
|
|
1067
|
+
"data-slot": "label",
|
|
1068
|
+
className: cn(
|
|
1069
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
1070
|
+
className
|
|
1071
|
+
)
|
|
1072
|
+
}, props)
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
function MetricCard({
|
|
1076
|
+
title,
|
|
1077
|
+
value,
|
|
1078
|
+
unit,
|
|
1079
|
+
subtitle,
|
|
1080
|
+
change,
|
|
1081
|
+
footerText,
|
|
1082
|
+
dataPoints,
|
|
1083
|
+
showExternalLink,
|
|
1084
|
+
showInfo = true
|
|
1085
|
+
}) {
|
|
1086
|
+
const renderDonut = () => {
|
|
1087
|
+
if (!dataPoints || dataPoints.length === 0 || value === void 0) return null;
|
|
1088
|
+
const size = 80;
|
|
1089
|
+
const strokeWidth = 12;
|
|
1090
|
+
const radius = (size - strokeWidth) / 2;
|
|
1091
|
+
const circumference = 2 * Math.PI * radius;
|
|
1092
|
+
const total = dataPoints.reduce((sum, dp) => sum + (typeof dp.value === "number" ? dp.value : 0), 0);
|
|
1093
|
+
let currentOffset = 0;
|
|
1094
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "relative", style: { width: size, height: size } }, /* @__PURE__ */ React21.createElement("svg", { width: size, height: size, className: "transform -rotate-90" }, dataPoints.map((dp, i) => {
|
|
1095
|
+
const val = typeof dp.value === "number" ? dp.value : 0;
|
|
1096
|
+
const percentage = val / total;
|
|
1097
|
+
const strokeLength = percentage * circumference;
|
|
1098
|
+
const offset = currentOffset;
|
|
1099
|
+
currentOffset += strokeLength;
|
|
1100
|
+
const colors = ["#166534", "#22c55e", "#6ee7b7", "#ccfbf1", "#f1f5f9"];
|
|
1101
|
+
const color = dp.color || colors[i % colors.length];
|
|
1102
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1103
|
+
"circle",
|
|
1104
|
+
{
|
|
1105
|
+
key: dp.label,
|
|
1106
|
+
cx: size / 2,
|
|
1107
|
+
cy: size / 2,
|
|
1108
|
+
r: radius,
|
|
1109
|
+
fill: "none",
|
|
1110
|
+
stroke: color,
|
|
1111
|
+
strokeWidth,
|
|
1112
|
+
strokeDasharray: `${Math.max(strokeLength - 2, 0)} ${circumference}`,
|
|
1113
|
+
strokeDashoffset: -offset,
|
|
1114
|
+
className: "transition-all duration-300"
|
|
1115
|
+
}
|
|
1116
|
+
);
|
|
1117
|
+
})), /* @__PURE__ */ React21.createElement("div", { className: "absolute inset-0 flex items-center justify-center flex-col" }, /* @__PURE__ */ React21.createElement("span", { className: "text-xl font-bold text-foreground leading-none" }, value)));
|
|
1118
|
+
};
|
|
1119
|
+
return /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col rounded-xl border border-border bg-card p-5 shadow-sm h-full w-full" }, /* @__PURE__ */ React21.createElement("div", { className: cn("flex justify-between items-start", title ? "mb-4" : "mb-4") }, title ? /* @__PURE__ */ React21.createElement("h3", { className: "font-semibold text-sm text-foreground/80" }, title) : /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-baseline gap-1" }, /* @__PURE__ */ React21.createElement("span", { className: "text-3xl font-bold tracking-tight text-foreground" }, value), unit && /* @__PURE__ */ React21.createElement("span", { className: "text-2xl font-bold tracking-tight text-foreground" }, unit)), subtitle && /* @__PURE__ */ React21.createElement("p", { className: "text-sm font-medium text-muted-foreground mt-2" }, subtitle)), /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 text-muted-foreground shrink-0 mt-0.5" }, showExternalLink && /* @__PURE__ */ React21.createElement(ExternalLink, { className: "w-3.5 h-3.5 cursor-pointer hover:text-foreground transition-colors" }), showInfo && /* @__PURE__ */ React21.createElement(Info, { className: "w-3.5 h-3.5 cursor-pointer hover:text-foreground transition-colors" }))), /* @__PURE__ */ React21.createElement("div", { className: "flex-1 flex flex-col min-w-0" }, dataPoints && dataPoints.length > 0 ? (
|
|
1120
|
+
// Donut Chart Variant
|
|
1121
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-4 mt-2 mb-6" }, /* @__PURE__ */ React21.createElement("div", { className: "shrink-0" }, renderDonut()), /* @__PURE__ */ React21.createElement("div", { className: "flex flex-col gap-2 flex-1 min-w-0" }, dataPoints.slice(0, 5).map((dp, i) => {
|
|
1122
|
+
const colors = ["bg-[#166534]", "bg-[#22c55e]", "bg-[#6ee7b7]", "bg-[#ccfbf1]", "bg-[#f1f5f9]"];
|
|
1123
|
+
return /* @__PURE__ */ React21.createElement("div", { key: dp.label, className: "flex items-center justify-between gap-2 text-[11px] font-medium min-w-0" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1.5 text-muted-foreground min-w-0" }, /* @__PURE__ */ React21.createElement("div", { className: cn("w-1.5 h-1.5 rounded-full shrink-0", dp.color ? "" : colors[i % colors.length]), style: dp.color ? { backgroundColor: dp.color } : {} }), /* @__PURE__ */ React21.createElement("span", { className: "truncate" }, dp.label)), /* @__PURE__ */ React21.createElement("span", { className: "text-foreground font-semibold shrink-0" }, dp.value));
|
|
1124
|
+
})))
|
|
1125
|
+
) : title && // Standard Big Number Variant (only if title exists)
|
|
1126
|
+
/* @__PURE__ */ React21.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React21.createElement("div", { className: "flex items-baseline gap-1" }, /* @__PURE__ */ React21.createElement("span", { className: "text-4xl font-bold tracking-tight text-foreground" }, value), unit && /* @__PURE__ */ React21.createElement("span", { className: "text-2xl font-bold tracking-tight text-foreground" }, unit)), subtitle && /* @__PURE__ */ React21.createElement("p", { className: "text-sm font-medium text-muted-foreground mt-1" }, subtitle)), /* @__PURE__ */ React21.createElement("div", { className: "mt-auto flex flex-col gap-1.5" }, change && /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-1" }, (() => {
|
|
1127
|
+
const isGoodDirection = change.isGood !== void 0 ? change.isGood : change.direction === "up";
|
|
1128
|
+
const colorClass = isGoodDirection ? "text-emerald-600" : "text-red-600";
|
|
1129
|
+
const Icon = change.direction === "down" ? ArrowDown : ArrowUp;
|
|
1130
|
+
return /* @__PURE__ */ React21.createElement("span", { className: cn("text-xs font-semibold flex items-center gap-0.5", colorClass) }, /* @__PURE__ */ React21.createElement(Icon, { className: "w-3 h-3 stroke-[3]" }), change.value);
|
|
1131
|
+
})()), footerText && /* @__PURE__ */ React21.createElement("span", { className: "text-[11px] text-muted-foreground font-medium" }, footerText))));
|
|
1132
|
+
}
|
|
1133
|
+
function ScrollArea(_a) {
|
|
1134
|
+
var _b = _a, {
|
|
1135
|
+
className,
|
|
1136
|
+
children
|
|
1137
|
+
} = _b, props = __objRest(_b, [
|
|
1138
|
+
"className",
|
|
1139
|
+
"children"
|
|
1140
|
+
]);
|
|
1141
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1142
|
+
ScrollArea$1.Root,
|
|
1143
|
+
__spreadValues({
|
|
1144
|
+
"data-slot": "scroll-area",
|
|
1145
|
+
className: cn("relative", className)
|
|
1146
|
+
}, props),
|
|
1147
|
+
/* @__PURE__ */ React21.createElement(
|
|
1148
|
+
ScrollArea$1.Viewport,
|
|
1149
|
+
{
|
|
1150
|
+
"data-slot": "scroll-area-viewport",
|
|
1151
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
1152
|
+
},
|
|
1153
|
+
children
|
|
1154
|
+
),
|
|
1155
|
+
/* @__PURE__ */ React21.createElement(ScrollBar, null),
|
|
1156
|
+
/* @__PURE__ */ React21.createElement(ScrollArea$1.Corner, null)
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
function ScrollBar(_a) {
|
|
1160
|
+
var _b = _a, {
|
|
1161
|
+
className,
|
|
1162
|
+
orientation = "vertical"
|
|
1163
|
+
} = _b, props = __objRest(_b, [
|
|
1164
|
+
"className",
|
|
1165
|
+
"orientation"
|
|
1166
|
+
]);
|
|
1167
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1168
|
+
ScrollArea$1.ScrollAreaScrollbar,
|
|
1169
|
+
__spreadValues({
|
|
1170
|
+
"data-slot": "scroll-area-scrollbar",
|
|
1171
|
+
orientation,
|
|
1172
|
+
className: cn(
|
|
1173
|
+
"flex touch-none p-px transition-colors select-none",
|
|
1174
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
1175
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
1176
|
+
className
|
|
1177
|
+
)
|
|
1178
|
+
}, props),
|
|
1179
|
+
/* @__PURE__ */ React21.createElement(
|
|
1180
|
+
ScrollArea$1.ScrollAreaThumb,
|
|
1181
|
+
{
|
|
1182
|
+
"data-slot": "scroll-area-thumb",
|
|
1183
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
1184
|
+
}
|
|
1185
|
+
)
|
|
1186
|
+
);
|
|
1187
|
+
}
|
|
1188
|
+
function Select(_a) {
|
|
1189
|
+
var props = __objRest(_a, []);
|
|
1190
|
+
return /* @__PURE__ */ React21.createElement(Select$1.Root, __spreadValues({ "data-slot": "select" }, props));
|
|
1191
|
+
}
|
|
1192
|
+
function SelectGroup(_a) {
|
|
1193
|
+
var props = __objRest(_a, []);
|
|
1194
|
+
return /* @__PURE__ */ React21.createElement(Select$1.Group, __spreadValues({ "data-slot": "select-group" }, props));
|
|
1195
|
+
}
|
|
1196
|
+
function SelectValue(_a) {
|
|
1197
|
+
var props = __objRest(_a, []);
|
|
1198
|
+
return /* @__PURE__ */ React21.createElement(Select$1.Value, __spreadValues({ "data-slot": "select-value" }, props));
|
|
1199
|
+
}
|
|
1200
|
+
function SelectTrigger(_a) {
|
|
1201
|
+
var _b = _a, {
|
|
1202
|
+
className,
|
|
1203
|
+
size = "default",
|
|
1204
|
+
children
|
|
1205
|
+
} = _b, props = __objRest(_b, [
|
|
1206
|
+
"className",
|
|
1207
|
+
"size",
|
|
1208
|
+
"children"
|
|
1209
|
+
]);
|
|
1210
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1211
|
+
Select$1.Trigger,
|
|
1212
|
+
__spreadValues({
|
|
1213
|
+
"data-slot": "select-trigger",
|
|
1214
|
+
"data-size": size,
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1217
|
+
className
|
|
1218
|
+
)
|
|
1219
|
+
}, props),
|
|
1220
|
+
children,
|
|
1221
|
+
/* @__PURE__ */ React21.createElement(Select$1.Icon, { asChild: true }, /* @__PURE__ */ React21.createElement(ChevronDownIcon, { className: "size-4 opacity-50" }))
|
|
1222
|
+
);
|
|
1223
|
+
}
|
|
1224
|
+
function SelectContent(_a) {
|
|
1225
|
+
var _b = _a, {
|
|
1226
|
+
className,
|
|
1227
|
+
children,
|
|
1228
|
+
position = "item-aligned",
|
|
1229
|
+
align = "center"
|
|
1230
|
+
} = _b, props = __objRest(_b, [
|
|
1231
|
+
"className",
|
|
1232
|
+
"children",
|
|
1233
|
+
"position",
|
|
1234
|
+
"align"
|
|
1235
|
+
]);
|
|
1236
|
+
return /* @__PURE__ */ React21.createElement(Select$1.Portal, null, /* @__PURE__ */ React21.createElement(
|
|
1237
|
+
Select$1.Content,
|
|
1238
|
+
__spreadValues({
|
|
1239
|
+
"data-slot": "select-content",
|
|
1240
|
+
className: cn(
|
|
1241
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
1242
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1243
|
+
className
|
|
1244
|
+
),
|
|
1245
|
+
position,
|
|
1246
|
+
align
|
|
1247
|
+
}, props),
|
|
1248
|
+
/* @__PURE__ */ React21.createElement(SelectScrollUpButton, null),
|
|
1249
|
+
/* @__PURE__ */ React21.createElement(
|
|
1250
|
+
Select$1.Viewport,
|
|
1251
|
+
{
|
|
1252
|
+
className: cn(
|
|
1253
|
+
"p-1",
|
|
1254
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
1255
|
+
)
|
|
1256
|
+
},
|
|
1257
|
+
children
|
|
1258
|
+
),
|
|
1259
|
+
/* @__PURE__ */ React21.createElement(SelectScrollDownButton, null)
|
|
1260
|
+
));
|
|
1261
|
+
}
|
|
1262
|
+
function SelectLabel(_a) {
|
|
1263
|
+
var _b = _a, {
|
|
1264
|
+
className
|
|
1265
|
+
} = _b, props = __objRest(_b, [
|
|
1266
|
+
"className"
|
|
1267
|
+
]);
|
|
1268
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1269
|
+
Select$1.Label,
|
|
1270
|
+
__spreadValues({
|
|
1271
|
+
"data-slot": "select-label",
|
|
1272
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className)
|
|
1273
|
+
}, props)
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
function SelectItem(_a) {
|
|
1277
|
+
var _b = _a, {
|
|
1278
|
+
className,
|
|
1279
|
+
children
|
|
1280
|
+
} = _b, props = __objRest(_b, [
|
|
1281
|
+
"className",
|
|
1282
|
+
"children"
|
|
1283
|
+
]);
|
|
1284
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1285
|
+
Select$1.Item,
|
|
1286
|
+
__spreadValues({
|
|
1287
|
+
"data-slot": "select-item",
|
|
1288
|
+
className: cn(
|
|
1289
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1290
|
+
className
|
|
1291
|
+
)
|
|
1292
|
+
}, props),
|
|
1293
|
+
/* @__PURE__ */ React21.createElement(
|
|
1294
|
+
"span",
|
|
1295
|
+
{
|
|
1296
|
+
"data-slot": "select-item-indicator",
|
|
1297
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center"
|
|
1298
|
+
},
|
|
1299
|
+
/* @__PURE__ */ React21.createElement(Select$1.ItemIndicator, null, /* @__PURE__ */ React21.createElement(CheckIcon, { className: "size-4" }))
|
|
1300
|
+
),
|
|
1301
|
+
/* @__PURE__ */ React21.createElement(Select$1.ItemText, null, children)
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
function SelectSeparator(_a) {
|
|
1305
|
+
var _b = _a, {
|
|
1306
|
+
className
|
|
1307
|
+
} = _b, props = __objRest(_b, [
|
|
1308
|
+
"className"
|
|
1309
|
+
]);
|
|
1310
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1311
|
+
Select$1.Separator,
|
|
1312
|
+
__spreadValues({
|
|
1313
|
+
"data-slot": "select-separator",
|
|
1314
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)
|
|
1315
|
+
}, props)
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
function SelectScrollUpButton(_a) {
|
|
1319
|
+
var _b = _a, {
|
|
1320
|
+
className
|
|
1321
|
+
} = _b, props = __objRest(_b, [
|
|
1322
|
+
"className"
|
|
1323
|
+
]);
|
|
1324
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1325
|
+
Select$1.ScrollUpButton,
|
|
1326
|
+
__spreadValues({
|
|
1327
|
+
"data-slot": "select-scroll-up-button",
|
|
1328
|
+
className: cn(
|
|
1329
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1330
|
+
className
|
|
1331
|
+
)
|
|
1332
|
+
}, props),
|
|
1333
|
+
/* @__PURE__ */ React21.createElement(ChevronUpIcon, { className: "size-4" })
|
|
1334
|
+
);
|
|
1335
|
+
}
|
|
1336
|
+
function SelectScrollDownButton(_a) {
|
|
1337
|
+
var _b = _a, {
|
|
1338
|
+
className
|
|
1339
|
+
} = _b, props = __objRest(_b, [
|
|
1340
|
+
"className"
|
|
1341
|
+
]);
|
|
1342
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1343
|
+
Select$1.ScrollDownButton,
|
|
1344
|
+
__spreadValues({
|
|
1345
|
+
"data-slot": "select-scroll-down-button",
|
|
1346
|
+
className: cn(
|
|
1347
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1348
|
+
className
|
|
1349
|
+
)
|
|
1350
|
+
}, props),
|
|
1351
|
+
/* @__PURE__ */ React21.createElement(ChevronDownIcon, { className: "size-4" })
|
|
1352
|
+
);
|
|
1353
|
+
}
|
|
1354
|
+
function Separator(_a) {
|
|
1355
|
+
var _b = _a, {
|
|
1356
|
+
className,
|
|
1357
|
+
orientation = "horizontal",
|
|
1358
|
+
decorative = true
|
|
1359
|
+
} = _b, props = __objRest(_b, [
|
|
1360
|
+
"className",
|
|
1361
|
+
"orientation",
|
|
1362
|
+
"decorative"
|
|
1363
|
+
]);
|
|
1364
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1365
|
+
Separator$1.Root,
|
|
1366
|
+
__spreadValues({
|
|
1367
|
+
"data-slot": "separator",
|
|
1368
|
+
decorative,
|
|
1369
|
+
orientation,
|
|
1370
|
+
className: cn(
|
|
1371
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
1372
|
+
className
|
|
1373
|
+
)
|
|
1374
|
+
}, props)
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
function Sheet(_a) {
|
|
1378
|
+
var props = __objRest(_a, []);
|
|
1379
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
1380
|
+
}
|
|
1381
|
+
function SheetTrigger(_a) {
|
|
1382
|
+
var props = __objRest(_a, []);
|
|
1383
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Trigger, __spreadValues({ "data-slot": "sheet-trigger" }, props));
|
|
1384
|
+
}
|
|
1385
|
+
function SheetClose(_a) {
|
|
1386
|
+
var props = __objRest(_a, []);
|
|
1387
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Close, __spreadValues({ "data-slot": "sheet-close" }, props));
|
|
1388
|
+
}
|
|
1389
|
+
function SheetPortal(_a) {
|
|
1390
|
+
var props = __objRest(_a, []);
|
|
1391
|
+
return /* @__PURE__ */ React21.createElement(Dialog$1.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
1392
|
+
}
|
|
1393
|
+
function SheetOverlay(_a) {
|
|
1394
|
+
var _b = _a, {
|
|
1395
|
+
className
|
|
1396
|
+
} = _b, props = __objRest(_b, [
|
|
1397
|
+
"className"
|
|
1398
|
+
]);
|
|
1399
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1400
|
+
Dialog$1.Overlay,
|
|
1401
|
+
__spreadValues({
|
|
1402
|
+
"data-slot": "sheet-overlay",
|
|
1403
|
+
className: cn(
|
|
1404
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1405
|
+
className
|
|
1406
|
+
)
|
|
1407
|
+
}, props)
|
|
1408
|
+
);
|
|
1409
|
+
}
|
|
1410
|
+
function SheetContent(_a) {
|
|
1411
|
+
var _b = _a, {
|
|
1412
|
+
className,
|
|
1413
|
+
children,
|
|
1414
|
+
side = "right",
|
|
1415
|
+
showCloseButton = true
|
|
1416
|
+
} = _b, props = __objRest(_b, [
|
|
1417
|
+
"className",
|
|
1418
|
+
"children",
|
|
1419
|
+
"side",
|
|
1420
|
+
"showCloseButton"
|
|
1421
|
+
]);
|
|
1422
|
+
return /* @__PURE__ */ React21.createElement(SheetPortal, null, /* @__PURE__ */ React21.createElement(SheetOverlay, null), /* @__PURE__ */ React21.createElement(
|
|
1423
|
+
Dialog$1.Content,
|
|
1424
|
+
__spreadValues({
|
|
1425
|
+
"data-slot": "sheet-content",
|
|
1426
|
+
className: cn(
|
|
1427
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1428
|
+
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
1429
|
+
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
1430
|
+
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
1431
|
+
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
1432
|
+
className
|
|
1433
|
+
)
|
|
1434
|
+
}, props),
|
|
1435
|
+
children,
|
|
1436
|
+
showCloseButton && /* @__PURE__ */ React21.createElement(Dialog$1.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none" }, /* @__PURE__ */ React21.createElement(XIcon, { className: "size-4" }), /* @__PURE__ */ React21.createElement("span", { className: "sr-only" }, "Close"))
|
|
1437
|
+
));
|
|
1438
|
+
}
|
|
1439
|
+
function SheetHeader(_a) {
|
|
1440
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1441
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1442
|
+
"div",
|
|
1443
|
+
__spreadValues({
|
|
1444
|
+
"data-slot": "sheet-header",
|
|
1445
|
+
className: cn("flex flex-col gap-1.5 p-4", className)
|
|
1446
|
+
}, props)
|
|
1447
|
+
);
|
|
1448
|
+
}
|
|
1449
|
+
function SheetFooter(_a) {
|
|
1450
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1451
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1452
|
+
"div",
|
|
1453
|
+
__spreadValues({
|
|
1454
|
+
"data-slot": "sheet-footer",
|
|
1455
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className)
|
|
1456
|
+
}, props)
|
|
1457
|
+
);
|
|
1458
|
+
}
|
|
1459
|
+
function SheetTitle(_a) {
|
|
1460
|
+
var _b = _a, {
|
|
1461
|
+
className
|
|
1462
|
+
} = _b, props = __objRest(_b, [
|
|
1463
|
+
"className"
|
|
1464
|
+
]);
|
|
1465
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1466
|
+
Dialog$1.Title,
|
|
1467
|
+
__spreadValues({
|
|
1468
|
+
"data-slot": "sheet-title",
|
|
1469
|
+
className: cn("text-foreground font-semibold", className)
|
|
1470
|
+
}, props)
|
|
1471
|
+
);
|
|
1472
|
+
}
|
|
1473
|
+
function SheetDescription(_a) {
|
|
1474
|
+
var _b = _a, {
|
|
1475
|
+
className
|
|
1476
|
+
} = _b, props = __objRest(_b, [
|
|
1477
|
+
"className"
|
|
1478
|
+
]);
|
|
1479
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1480
|
+
Dialog$1.Description,
|
|
1481
|
+
__spreadValues({
|
|
1482
|
+
"data-slot": "sheet-description",
|
|
1483
|
+
className: cn("text-muted-foreground text-sm", className)
|
|
1484
|
+
}, props)
|
|
1485
|
+
);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// registry/new-york/ui/skeleton.tsx
|
|
1489
|
+
function Skeleton(_a) {
|
|
1490
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1491
|
+
return /* @__PURE__ */ React.createElement(
|
|
1492
|
+
"div",
|
|
1493
|
+
__spreadValues({
|
|
1494
|
+
"data-slot": "skeleton",
|
|
1495
|
+
className: cn("bg-accent animate-pulse rounded-md", className)
|
|
1496
|
+
}, props)
|
|
1497
|
+
);
|
|
1498
|
+
}
|
|
1499
|
+
function TooltipProvider(_a) {
|
|
1500
|
+
var _b = _a, {
|
|
1501
|
+
delayDuration = 0
|
|
1502
|
+
} = _b, props = __objRest(_b, [
|
|
1503
|
+
"delayDuration"
|
|
1504
|
+
]);
|
|
1505
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1506
|
+
Tooltip.Provider,
|
|
1507
|
+
__spreadValues({
|
|
1508
|
+
"data-slot": "tooltip-provider",
|
|
1509
|
+
delayDuration
|
|
1510
|
+
}, props)
|
|
1511
|
+
);
|
|
1512
|
+
}
|
|
1513
|
+
function Tooltip2(_a) {
|
|
1514
|
+
var props = __objRest(_a, []);
|
|
1515
|
+
return /* @__PURE__ */ React21.createElement(Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
|
|
1516
|
+
}
|
|
1517
|
+
function TooltipTrigger(_a) {
|
|
1518
|
+
var props = __objRest(_a, []);
|
|
1519
|
+
return /* @__PURE__ */ React21.createElement(Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
1520
|
+
}
|
|
1521
|
+
function TooltipContent(_a) {
|
|
1522
|
+
var _b = _a, {
|
|
1523
|
+
className,
|
|
1524
|
+
sideOffset = 0,
|
|
1525
|
+
children
|
|
1526
|
+
} = _b, props = __objRest(_b, [
|
|
1527
|
+
"className",
|
|
1528
|
+
"sideOffset",
|
|
1529
|
+
"children"
|
|
1530
|
+
]);
|
|
1531
|
+
return /* @__PURE__ */ React21.createElement(Tooltip.Portal, null, /* @__PURE__ */ React21.createElement(
|
|
1532
|
+
Tooltip.Content,
|
|
1533
|
+
__spreadValues({
|
|
1534
|
+
"data-slot": "tooltip-content",
|
|
1535
|
+
sideOffset,
|
|
1536
|
+
className: cn(
|
|
1537
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
1538
|
+
className
|
|
1539
|
+
)
|
|
1540
|
+
}, props),
|
|
1541
|
+
children,
|
|
1542
|
+
/* @__PURE__ */ React21.createElement(Tooltip.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
1543
|
+
));
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// registry/new-york/ui/sidebar.tsx
|
|
1547
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1548
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1549
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
1550
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1551
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1552
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1553
|
+
var SidebarContext = React21.createContext(null);
|
|
1554
|
+
function useSidebar() {
|
|
1555
|
+
const context = React21.useContext(SidebarContext);
|
|
1556
|
+
if (!context) {
|
|
1557
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1558
|
+
}
|
|
1559
|
+
return context;
|
|
1560
|
+
}
|
|
1561
|
+
function SidebarProvider(_a) {
|
|
1562
|
+
var _b = _a, {
|
|
1563
|
+
defaultOpen = true,
|
|
1564
|
+
open: openProp,
|
|
1565
|
+
onOpenChange: setOpenProp,
|
|
1566
|
+
className,
|
|
1567
|
+
style,
|
|
1568
|
+
children
|
|
1569
|
+
} = _b, props = __objRest(_b, [
|
|
1570
|
+
"defaultOpen",
|
|
1571
|
+
"open",
|
|
1572
|
+
"onOpenChange",
|
|
1573
|
+
"className",
|
|
1574
|
+
"style",
|
|
1575
|
+
"children"
|
|
1576
|
+
]);
|
|
1577
|
+
const isMobile = useIsMobile();
|
|
1578
|
+
const [openMobile, setOpenMobile] = React21.useState(false);
|
|
1579
|
+
const [_open, _setOpen] = React21.useState(defaultOpen);
|
|
1580
|
+
const open = openProp != null ? openProp : _open;
|
|
1581
|
+
const setOpen = React21.useCallback(
|
|
1582
|
+
(value) => {
|
|
1583
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
1584
|
+
if (setOpenProp) {
|
|
1585
|
+
setOpenProp(openState);
|
|
1586
|
+
} else {
|
|
1587
|
+
_setOpen(openState);
|
|
1588
|
+
}
|
|
1589
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
1590
|
+
},
|
|
1591
|
+
[setOpenProp, open]
|
|
1592
|
+
);
|
|
1593
|
+
const toggleSidebar = React21.useCallback(() => {
|
|
1594
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1595
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
1596
|
+
React21.useEffect(() => {
|
|
1597
|
+
const handleKeyDown = (event) => {
|
|
1598
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1599
|
+
event.preventDefault();
|
|
1600
|
+
toggleSidebar();
|
|
1601
|
+
}
|
|
1602
|
+
};
|
|
1603
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
1604
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1605
|
+
}, [toggleSidebar]);
|
|
1606
|
+
const state = open ? "expanded" : "collapsed";
|
|
1607
|
+
const contextValue = React21.useMemo(
|
|
1608
|
+
() => ({
|
|
1609
|
+
state,
|
|
1610
|
+
open,
|
|
1611
|
+
setOpen,
|
|
1612
|
+
isMobile,
|
|
1613
|
+
openMobile,
|
|
1614
|
+
setOpenMobile,
|
|
1615
|
+
toggleSidebar
|
|
1616
|
+
}),
|
|
1617
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
1618
|
+
);
|
|
1619
|
+
return /* @__PURE__ */ React21.createElement(SidebarContext.Provider, { value: contextValue }, /* @__PURE__ */ React21.createElement(TooltipProvider, { delayDuration: 0 }, /* @__PURE__ */ React21.createElement(
|
|
1620
|
+
"div",
|
|
1621
|
+
__spreadValues({
|
|
1622
|
+
"data-slot": "sidebar-wrapper",
|
|
1623
|
+
style: __spreadValues({
|
|
1624
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
1625
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON
|
|
1626
|
+
}, style),
|
|
1627
|
+
className: cn(
|
|
1628
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
1629
|
+
className
|
|
1630
|
+
)
|
|
1631
|
+
}, props),
|
|
1632
|
+
children
|
|
1633
|
+
)));
|
|
1634
|
+
}
|
|
1635
|
+
function Sidebar(_a) {
|
|
1636
|
+
var _b = _a, {
|
|
1637
|
+
side = "left",
|
|
1638
|
+
variant = "sidebar",
|
|
1639
|
+
collapsible = "offcanvas",
|
|
1640
|
+
className,
|
|
1641
|
+
children
|
|
1642
|
+
} = _b, props = __objRest(_b, [
|
|
1643
|
+
"side",
|
|
1644
|
+
"variant",
|
|
1645
|
+
"collapsible",
|
|
1646
|
+
"className",
|
|
1647
|
+
"children"
|
|
1648
|
+
]);
|
|
1649
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1650
|
+
if (collapsible === "none") {
|
|
1651
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1652
|
+
"div",
|
|
1653
|
+
__spreadValues({
|
|
1654
|
+
"data-slot": "sidebar",
|
|
1655
|
+
className: cn(
|
|
1656
|
+
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
1657
|
+
className
|
|
1658
|
+
)
|
|
1659
|
+
}, props),
|
|
1660
|
+
children
|
|
1661
|
+
);
|
|
1662
|
+
}
|
|
1663
|
+
if (isMobile) {
|
|
1664
|
+
return /* @__PURE__ */ React21.createElement(Sheet, __spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), /* @__PURE__ */ React21.createElement(
|
|
1665
|
+
SheetContent,
|
|
1666
|
+
{
|
|
1667
|
+
"data-sidebar": "sidebar",
|
|
1668
|
+
"data-slot": "sidebar",
|
|
1669
|
+
"data-mobile": "true",
|
|
1670
|
+
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
1671
|
+
style: {
|
|
1672
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1673
|
+
},
|
|
1674
|
+
side
|
|
1675
|
+
},
|
|
1676
|
+
/* @__PURE__ */ React21.createElement(SheetHeader, { className: "sr-only" }, /* @__PURE__ */ React21.createElement(SheetTitle, null, "Sidebar"), /* @__PURE__ */ React21.createElement(SheetDescription, null, "Displays the mobile sidebar.")),
|
|
1677
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex h-full w-full flex-col" }, children)
|
|
1678
|
+
));
|
|
1679
|
+
}
|
|
1680
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1681
|
+
"div",
|
|
1682
|
+
{
|
|
1683
|
+
className: "group peer text-sidebar-foreground hidden md:block",
|
|
1684
|
+
"data-state": state,
|
|
1685
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1686
|
+
"data-variant": variant,
|
|
1687
|
+
"data-side": side,
|
|
1688
|
+
"data-slot": "sidebar"
|
|
1689
|
+
},
|
|
1690
|
+
/* @__PURE__ */ React21.createElement(
|
|
1691
|
+
"div",
|
|
1692
|
+
{
|
|
1693
|
+
"data-slot": "sidebar-gap",
|
|
1694
|
+
className: cn(
|
|
1695
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
1696
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
1697
|
+
"group-data-[side=right]:rotate-180",
|
|
1698
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
1699
|
+
)
|
|
1700
|
+
}
|
|
1701
|
+
),
|
|
1702
|
+
/* @__PURE__ */ React21.createElement(
|
|
1703
|
+
"div",
|
|
1704
|
+
__spreadValues({
|
|
1705
|
+
"data-slot": "sidebar-container",
|
|
1706
|
+
className: cn(
|
|
1707
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
1708
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
1709
|
+
// Adjust the padding for floating and inset variants.
|
|
1710
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
1711
|
+
className
|
|
1712
|
+
)
|
|
1713
|
+
}, props),
|
|
1714
|
+
/* @__PURE__ */ React21.createElement(
|
|
1715
|
+
"div",
|
|
1716
|
+
{
|
|
1717
|
+
"data-sidebar": "sidebar",
|
|
1718
|
+
"data-slot": "sidebar-inner",
|
|
1719
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
|
1720
|
+
},
|
|
1721
|
+
children
|
|
1722
|
+
)
|
|
1723
|
+
)
|
|
1724
|
+
);
|
|
1725
|
+
}
|
|
1726
|
+
function SidebarTrigger(_a) {
|
|
1727
|
+
var _b = _a, {
|
|
1728
|
+
className,
|
|
1729
|
+
onClick
|
|
1730
|
+
} = _b, props = __objRest(_b, [
|
|
1731
|
+
"className",
|
|
1732
|
+
"onClick"
|
|
1733
|
+
]);
|
|
1734
|
+
const { toggleSidebar } = useSidebar();
|
|
1735
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1736
|
+
Button,
|
|
1737
|
+
__spreadValues({
|
|
1738
|
+
"data-sidebar": "trigger",
|
|
1739
|
+
"data-slot": "sidebar-trigger",
|
|
1740
|
+
variant: "ghost",
|
|
1741
|
+
size: "icon",
|
|
1742
|
+
className: cn("size-7", className),
|
|
1743
|
+
onClick: (event) => {
|
|
1744
|
+
onClick == null ? void 0 : onClick(event);
|
|
1745
|
+
toggleSidebar();
|
|
1746
|
+
}
|
|
1747
|
+
}, props),
|
|
1748
|
+
/* @__PURE__ */ React21.createElement(PanelLeftIcon, null),
|
|
1749
|
+
/* @__PURE__ */ React21.createElement("span", { className: "sr-only" }, "Toggle Sidebar")
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
function SidebarRail(_a) {
|
|
1753
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1754
|
+
const { toggleSidebar } = useSidebar();
|
|
1755
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1756
|
+
"button",
|
|
1757
|
+
__spreadValues({
|
|
1758
|
+
"data-sidebar": "rail",
|
|
1759
|
+
"data-slot": "sidebar-rail",
|
|
1760
|
+
"aria-label": "Toggle Sidebar",
|
|
1761
|
+
tabIndex: -1,
|
|
1762
|
+
onClick: toggleSidebar,
|
|
1763
|
+
title: "Toggle Sidebar",
|
|
1764
|
+
className: cn(
|
|
1765
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
1766
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
1767
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1768
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
1769
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1770
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1771
|
+
className
|
|
1772
|
+
)
|
|
1773
|
+
}, props)
|
|
1774
|
+
);
|
|
1775
|
+
}
|
|
1776
|
+
function SidebarInset(_a) {
|
|
1777
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1778
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1779
|
+
"main",
|
|
1780
|
+
__spreadValues({
|
|
1781
|
+
"data-slot": "sidebar-inset",
|
|
1782
|
+
className: cn(
|
|
1783
|
+
"bg-background relative flex w-full flex-1 flex-col",
|
|
1784
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
1785
|
+
className
|
|
1786
|
+
)
|
|
1787
|
+
}, props)
|
|
1788
|
+
);
|
|
1789
|
+
}
|
|
1790
|
+
function SidebarInput(_a) {
|
|
1791
|
+
var _b = _a, {
|
|
1792
|
+
className
|
|
1793
|
+
} = _b, props = __objRest(_b, [
|
|
1794
|
+
"className"
|
|
1795
|
+
]);
|
|
1796
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1797
|
+
Input,
|
|
1798
|
+
__spreadValues({
|
|
1799
|
+
"data-slot": "sidebar-input",
|
|
1800
|
+
"data-sidebar": "input",
|
|
1801
|
+
className: cn("bg-background h-8 w-full shadow-none", className)
|
|
1802
|
+
}, props)
|
|
1803
|
+
);
|
|
1804
|
+
}
|
|
1805
|
+
function SidebarHeader(_a) {
|
|
1806
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1807
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1808
|
+
"div",
|
|
1809
|
+
__spreadValues({
|
|
1810
|
+
"data-slot": "sidebar-header",
|
|
1811
|
+
"data-sidebar": "header",
|
|
1812
|
+
className: cn("flex flex-col gap-2 p-2", className)
|
|
1813
|
+
}, props)
|
|
1814
|
+
);
|
|
1815
|
+
}
|
|
1816
|
+
function SidebarFooter(_a) {
|
|
1817
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1818
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1819
|
+
"div",
|
|
1820
|
+
__spreadValues({
|
|
1821
|
+
"data-slot": "sidebar-footer",
|
|
1822
|
+
"data-sidebar": "footer",
|
|
1823
|
+
className: cn("flex flex-col gap-2 p-2", className)
|
|
1824
|
+
}, props)
|
|
1825
|
+
);
|
|
1826
|
+
}
|
|
1827
|
+
function SidebarSeparator(_a) {
|
|
1828
|
+
var _b = _a, {
|
|
1829
|
+
className
|
|
1830
|
+
} = _b, props = __objRest(_b, [
|
|
1831
|
+
"className"
|
|
1832
|
+
]);
|
|
1833
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1834
|
+
Separator,
|
|
1835
|
+
__spreadValues({
|
|
1836
|
+
"data-slot": "sidebar-separator",
|
|
1837
|
+
"data-sidebar": "separator",
|
|
1838
|
+
className: cn("bg-sidebar-border mx-2 w-auto", className)
|
|
1839
|
+
}, props)
|
|
1840
|
+
);
|
|
1841
|
+
}
|
|
1842
|
+
function SidebarContent(_a) {
|
|
1843
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1844
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1845
|
+
"div",
|
|
1846
|
+
__spreadValues({
|
|
1847
|
+
"data-slot": "sidebar-content",
|
|
1848
|
+
"data-sidebar": "content",
|
|
1849
|
+
className: cn(
|
|
1850
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
1851
|
+
className
|
|
1852
|
+
)
|
|
1853
|
+
}, props)
|
|
1854
|
+
);
|
|
1855
|
+
}
|
|
1856
|
+
function SidebarGroup(_a) {
|
|
1857
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1858
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1859
|
+
"div",
|
|
1860
|
+
__spreadValues({
|
|
1861
|
+
"data-slot": "sidebar-group",
|
|
1862
|
+
"data-sidebar": "group",
|
|
1863
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className)
|
|
1864
|
+
}, props)
|
|
1865
|
+
);
|
|
1866
|
+
}
|
|
1867
|
+
function SidebarGroupLabel(_a) {
|
|
1868
|
+
var _b = _a, {
|
|
1869
|
+
className,
|
|
1870
|
+
asChild = false
|
|
1871
|
+
} = _b, props = __objRest(_b, [
|
|
1872
|
+
"className",
|
|
1873
|
+
"asChild"
|
|
1874
|
+
]);
|
|
1875
|
+
const Comp = asChild ? Slot$1 : "div";
|
|
1876
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1877
|
+
Comp,
|
|
1878
|
+
__spreadValues({
|
|
1879
|
+
"data-slot": "sidebar-group-label",
|
|
1880
|
+
"data-sidebar": "group-label",
|
|
1881
|
+
className: cn(
|
|
1882
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1883
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
1884
|
+
className
|
|
1885
|
+
)
|
|
1886
|
+
}, props)
|
|
1887
|
+
);
|
|
1888
|
+
}
|
|
1889
|
+
function SidebarGroupAction(_a) {
|
|
1890
|
+
var _b = _a, {
|
|
1891
|
+
className,
|
|
1892
|
+
asChild = false
|
|
1893
|
+
} = _b, props = __objRest(_b, [
|
|
1894
|
+
"className",
|
|
1895
|
+
"asChild"
|
|
1896
|
+
]);
|
|
1897
|
+
const Comp = asChild ? Slot$1 : "button";
|
|
1898
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1899
|
+
Comp,
|
|
1900
|
+
__spreadValues({
|
|
1901
|
+
"data-slot": "sidebar-group-action",
|
|
1902
|
+
"data-sidebar": "group-action",
|
|
1903
|
+
className: cn(
|
|
1904
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1905
|
+
// Increases the hit area of the button on mobile.
|
|
1906
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
1907
|
+
"group-data-[collapsible=icon]:hidden",
|
|
1908
|
+
className
|
|
1909
|
+
)
|
|
1910
|
+
}, props)
|
|
1911
|
+
);
|
|
1912
|
+
}
|
|
1913
|
+
function SidebarGroupContent(_a) {
|
|
1914
|
+
var _b = _a, {
|
|
1915
|
+
className
|
|
1916
|
+
} = _b, props = __objRest(_b, [
|
|
1917
|
+
"className"
|
|
1918
|
+
]);
|
|
1919
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1920
|
+
"div",
|
|
1921
|
+
__spreadValues({
|
|
1922
|
+
"data-slot": "sidebar-group-content",
|
|
1923
|
+
"data-sidebar": "group-content",
|
|
1924
|
+
className: cn("w-full text-sm", className)
|
|
1925
|
+
}, props)
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
function SidebarMenu(_a) {
|
|
1929
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1930
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1931
|
+
"ul",
|
|
1932
|
+
__spreadValues({
|
|
1933
|
+
"data-slot": "sidebar-menu",
|
|
1934
|
+
"data-sidebar": "menu",
|
|
1935
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className)
|
|
1936
|
+
}, props)
|
|
1937
|
+
);
|
|
1938
|
+
}
|
|
1939
|
+
function SidebarMenuItem(_a) {
|
|
1940
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1941
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1942
|
+
"li",
|
|
1943
|
+
__spreadValues({
|
|
1944
|
+
"data-slot": "sidebar-menu-item",
|
|
1945
|
+
"data-sidebar": "menu-item",
|
|
1946
|
+
className: cn("group/menu-item relative", className)
|
|
1947
|
+
}, props)
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
var sidebarMenuButtonVariants = cva(
|
|
1951
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1952
|
+
{
|
|
1953
|
+
variants: {
|
|
1954
|
+
variant: {
|
|
1955
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1956
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
1957
|
+
},
|
|
1958
|
+
size: {
|
|
1959
|
+
default: "h-8 text-sm",
|
|
1960
|
+
sm: "h-7 text-xs",
|
|
1961
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
1962
|
+
}
|
|
1963
|
+
},
|
|
1964
|
+
defaultVariants: {
|
|
1965
|
+
variant: "default",
|
|
1966
|
+
size: "default"
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
);
|
|
1970
|
+
function SidebarMenuButton(_a) {
|
|
1971
|
+
var _b = _a, {
|
|
1972
|
+
asChild = false,
|
|
1973
|
+
isActive = false,
|
|
1974
|
+
variant = "default",
|
|
1975
|
+
size = "default",
|
|
1976
|
+
tooltip,
|
|
1977
|
+
className
|
|
1978
|
+
} = _b, props = __objRest(_b, [
|
|
1979
|
+
"asChild",
|
|
1980
|
+
"isActive",
|
|
1981
|
+
"variant",
|
|
1982
|
+
"size",
|
|
1983
|
+
"tooltip",
|
|
1984
|
+
"className"
|
|
1985
|
+
]);
|
|
1986
|
+
const Comp = asChild ? Slot$1 : "button";
|
|
1987
|
+
const { isMobile, state } = useSidebar();
|
|
1988
|
+
const button = /* @__PURE__ */ React21.createElement(
|
|
1989
|
+
Comp,
|
|
1990
|
+
__spreadValues({
|
|
1991
|
+
"data-slot": "sidebar-menu-button",
|
|
1992
|
+
"data-sidebar": "menu-button",
|
|
1993
|
+
"data-size": size,
|
|
1994
|
+
"data-active": isActive,
|
|
1995
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className)
|
|
1996
|
+
}, props)
|
|
1997
|
+
);
|
|
1998
|
+
if (!tooltip) {
|
|
1999
|
+
return button;
|
|
2000
|
+
}
|
|
2001
|
+
if (typeof tooltip === "string") {
|
|
2002
|
+
tooltip = {
|
|
2003
|
+
children: tooltip
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
return /* @__PURE__ */ React21.createElement(Tooltip2, null, /* @__PURE__ */ React21.createElement(TooltipTrigger, { asChild: true }, button), /* @__PURE__ */ React21.createElement(
|
|
2007
|
+
TooltipContent,
|
|
2008
|
+
__spreadValues({
|
|
2009
|
+
side: "right",
|
|
2010
|
+
align: "center",
|
|
2011
|
+
hidden: state !== "collapsed" || isMobile
|
|
2012
|
+
}, tooltip)
|
|
2013
|
+
));
|
|
2014
|
+
}
|
|
2015
|
+
function SidebarMenuAction(_a) {
|
|
2016
|
+
var _b = _a, {
|
|
2017
|
+
className,
|
|
2018
|
+
asChild = false,
|
|
2019
|
+
showOnHover = false
|
|
2020
|
+
} = _b, props = __objRest(_b, [
|
|
2021
|
+
"className",
|
|
2022
|
+
"asChild",
|
|
2023
|
+
"showOnHover"
|
|
2024
|
+
]);
|
|
2025
|
+
const Comp = asChild ? Slot$1 : "button";
|
|
2026
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2027
|
+
Comp,
|
|
2028
|
+
__spreadValues({
|
|
2029
|
+
"data-slot": "sidebar-menu-action",
|
|
2030
|
+
"data-sidebar": "menu-action",
|
|
2031
|
+
className: cn(
|
|
2032
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2033
|
+
// Increases the hit area of the button on mobile.
|
|
2034
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
2035
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2036
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2037
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2038
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2039
|
+
showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
2040
|
+
className
|
|
2041
|
+
)
|
|
2042
|
+
}, props)
|
|
2043
|
+
);
|
|
2044
|
+
}
|
|
2045
|
+
function SidebarMenuBadge(_a) {
|
|
2046
|
+
var _b = _a, {
|
|
2047
|
+
className
|
|
2048
|
+
} = _b, props = __objRest(_b, [
|
|
2049
|
+
"className"
|
|
2050
|
+
]);
|
|
2051
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2052
|
+
"div",
|
|
2053
|
+
__spreadValues({
|
|
2054
|
+
"data-slot": "sidebar-menu-badge",
|
|
2055
|
+
"data-sidebar": "menu-badge",
|
|
2056
|
+
className: cn(
|
|
2057
|
+
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
2058
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
2059
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2060
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2061
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2062
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2063
|
+
className
|
|
2064
|
+
)
|
|
2065
|
+
}, props)
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
function SidebarMenuSkeleton(_a) {
|
|
2069
|
+
var _b = _a, {
|
|
2070
|
+
className,
|
|
2071
|
+
showIcon = false
|
|
2072
|
+
} = _b, props = __objRest(_b, [
|
|
2073
|
+
"className",
|
|
2074
|
+
"showIcon"
|
|
2075
|
+
]);
|
|
2076
|
+
const width = React21.useMemo(() => {
|
|
2077
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2078
|
+
}, []);
|
|
2079
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2080
|
+
"div",
|
|
2081
|
+
__spreadValues({
|
|
2082
|
+
"data-slot": "sidebar-menu-skeleton",
|
|
2083
|
+
"data-sidebar": "menu-skeleton",
|
|
2084
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className)
|
|
2085
|
+
}, props),
|
|
2086
|
+
showIcon && /* @__PURE__ */ React21.createElement(
|
|
2087
|
+
Skeleton,
|
|
2088
|
+
{
|
|
2089
|
+
className: "size-4 rounded-md",
|
|
2090
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
2091
|
+
}
|
|
2092
|
+
),
|
|
2093
|
+
/* @__PURE__ */ React21.createElement(
|
|
2094
|
+
Skeleton,
|
|
2095
|
+
{
|
|
2096
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
2097
|
+
"data-sidebar": "menu-skeleton-text",
|
|
2098
|
+
style: {
|
|
2099
|
+
"--skeleton-width": width
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
)
|
|
2103
|
+
);
|
|
2104
|
+
}
|
|
2105
|
+
function SidebarMenuSub(_a) {
|
|
2106
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2107
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2108
|
+
"ul",
|
|
2109
|
+
__spreadValues({
|
|
2110
|
+
"data-slot": "sidebar-menu-sub",
|
|
2111
|
+
"data-sidebar": "menu-sub",
|
|
2112
|
+
className: cn(
|
|
2113
|
+
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
2114
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2115
|
+
className
|
|
2116
|
+
)
|
|
2117
|
+
}, props)
|
|
2118
|
+
);
|
|
2119
|
+
}
|
|
2120
|
+
function SidebarMenuSubItem(_a) {
|
|
2121
|
+
var _b = _a, {
|
|
2122
|
+
className
|
|
2123
|
+
} = _b, props = __objRest(_b, [
|
|
2124
|
+
"className"
|
|
2125
|
+
]);
|
|
2126
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2127
|
+
"li",
|
|
2128
|
+
__spreadValues({
|
|
2129
|
+
"data-slot": "sidebar-menu-sub-item",
|
|
2130
|
+
"data-sidebar": "menu-sub-item",
|
|
2131
|
+
className: cn("group/menu-sub-item relative", className)
|
|
2132
|
+
}, props)
|
|
2133
|
+
);
|
|
2134
|
+
}
|
|
2135
|
+
function SidebarMenuSubButton(_a) {
|
|
2136
|
+
var _b = _a, {
|
|
2137
|
+
asChild = false,
|
|
2138
|
+
size = "md",
|
|
2139
|
+
isActive = false,
|
|
2140
|
+
className
|
|
2141
|
+
} = _b, props = __objRest(_b, [
|
|
2142
|
+
"asChild",
|
|
2143
|
+
"size",
|
|
2144
|
+
"isActive",
|
|
2145
|
+
"className"
|
|
2146
|
+
]);
|
|
2147
|
+
const Comp = asChild ? Slot$1 : "a";
|
|
2148
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2149
|
+
Comp,
|
|
2150
|
+
__spreadValues({
|
|
2151
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
2152
|
+
"data-sidebar": "menu-sub-button",
|
|
2153
|
+
"data-size": size,
|
|
2154
|
+
"data-active": isActive,
|
|
2155
|
+
className: cn(
|
|
2156
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2157
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
2158
|
+
size === "sm" && "text-xs",
|
|
2159
|
+
size === "md" && "text-sm",
|
|
2160
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2161
|
+
className
|
|
2162
|
+
)
|
|
2163
|
+
}, props)
|
|
2164
|
+
);
|
|
2165
|
+
}
|
|
2166
|
+
function Table(_a) {
|
|
2167
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2168
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2169
|
+
"div",
|
|
2170
|
+
{
|
|
2171
|
+
"data-slot": "table-container",
|
|
2172
|
+
className: "relative w-full overflow-x-auto"
|
|
2173
|
+
},
|
|
2174
|
+
/* @__PURE__ */ React21.createElement(
|
|
2175
|
+
"table",
|
|
2176
|
+
__spreadValues({
|
|
2177
|
+
"data-slot": "table",
|
|
2178
|
+
className: cn("w-full caption-bottom text-sm", className)
|
|
2179
|
+
}, props)
|
|
2180
|
+
)
|
|
2181
|
+
);
|
|
2182
|
+
}
|
|
2183
|
+
function TableHeader(_a) {
|
|
2184
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2185
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2186
|
+
"thead",
|
|
2187
|
+
__spreadValues({
|
|
2188
|
+
"data-slot": "table-header",
|
|
2189
|
+
className: cn("[&_tr]:border-b", className)
|
|
2190
|
+
}, props)
|
|
2191
|
+
);
|
|
2192
|
+
}
|
|
2193
|
+
function TableBody(_a) {
|
|
2194
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2195
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2196
|
+
"tbody",
|
|
2197
|
+
__spreadValues({
|
|
2198
|
+
"data-slot": "table-body",
|
|
2199
|
+
className: cn("[&_tr:last-child]:border-0", className)
|
|
2200
|
+
}, props)
|
|
2201
|
+
);
|
|
2202
|
+
}
|
|
2203
|
+
function TableFooter(_a) {
|
|
2204
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2205
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2206
|
+
"tfoot",
|
|
2207
|
+
__spreadValues({
|
|
2208
|
+
"data-slot": "table-footer",
|
|
2209
|
+
className: cn(
|
|
2210
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
2211
|
+
className
|
|
2212
|
+
)
|
|
2213
|
+
}, props)
|
|
2214
|
+
);
|
|
2215
|
+
}
|
|
2216
|
+
function TableRow(_a) {
|
|
2217
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2218
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2219
|
+
"tr",
|
|
2220
|
+
__spreadValues({
|
|
2221
|
+
"data-slot": "table-row",
|
|
2222
|
+
className: cn(
|
|
2223
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
2224
|
+
className
|
|
2225
|
+
)
|
|
2226
|
+
}, props)
|
|
2227
|
+
);
|
|
2228
|
+
}
|
|
2229
|
+
function TableHead(_a) {
|
|
2230
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2231
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2232
|
+
"th",
|
|
2233
|
+
__spreadValues({
|
|
2234
|
+
"data-slot": "table-head",
|
|
2235
|
+
className: cn(
|
|
2236
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2237
|
+
className
|
|
2238
|
+
)
|
|
2239
|
+
}, props)
|
|
2240
|
+
);
|
|
2241
|
+
}
|
|
2242
|
+
function TableCell(_a) {
|
|
2243
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2244
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2245
|
+
"td",
|
|
2246
|
+
__spreadValues({
|
|
2247
|
+
"data-slot": "table-cell",
|
|
2248
|
+
className: cn(
|
|
2249
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2250
|
+
className
|
|
2251
|
+
)
|
|
2252
|
+
}, props)
|
|
2253
|
+
);
|
|
2254
|
+
}
|
|
2255
|
+
function TableCaption(_a) {
|
|
2256
|
+
var _b = _a, {
|
|
2257
|
+
className
|
|
2258
|
+
} = _b, props = __objRest(_b, [
|
|
2259
|
+
"className"
|
|
2260
|
+
]);
|
|
2261
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2262
|
+
"caption",
|
|
2263
|
+
__spreadValues({
|
|
2264
|
+
"data-slot": "table-caption",
|
|
2265
|
+
className: cn("text-muted-foreground mt-4 text-sm", className)
|
|
2266
|
+
}, props)
|
|
2267
|
+
);
|
|
2268
|
+
}
|
|
2269
|
+
function Tabs(_a) {
|
|
2270
|
+
var _b = _a, {
|
|
2271
|
+
className,
|
|
2272
|
+
orientation = "horizontal"
|
|
2273
|
+
} = _b, props = __objRest(_b, [
|
|
2274
|
+
"className",
|
|
2275
|
+
"orientation"
|
|
2276
|
+
]);
|
|
2277
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2278
|
+
Tabs$1.Root,
|
|
2279
|
+
__spreadValues({
|
|
2280
|
+
"data-slot": "tabs",
|
|
2281
|
+
"data-orientation": orientation,
|
|
2282
|
+
orientation,
|
|
2283
|
+
className: cn(
|
|
2284
|
+
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
|
|
2285
|
+
className
|
|
2286
|
+
)
|
|
2287
|
+
}, props)
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
var tabsListVariants = cva(
|
|
2291
|
+
"rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
|
|
2292
|
+
{
|
|
2293
|
+
variants: {
|
|
2294
|
+
variant: {
|
|
2295
|
+
default: "bg-muted",
|
|
2296
|
+
line: "gap-1 bg-transparent"
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
defaultVariants: {
|
|
2300
|
+
variant: "default"
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
);
|
|
2304
|
+
function TabsList(_a) {
|
|
2305
|
+
var _b = _a, {
|
|
2306
|
+
className,
|
|
2307
|
+
variant = "default"
|
|
2308
|
+
} = _b, props = __objRest(_b, [
|
|
2309
|
+
"className",
|
|
2310
|
+
"variant"
|
|
2311
|
+
]);
|
|
2312
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2313
|
+
Tabs$1.List,
|
|
2314
|
+
__spreadValues({
|
|
2315
|
+
"data-slot": "tabs-list",
|
|
2316
|
+
"data-variant": variant,
|
|
2317
|
+
className: cn(tabsListVariants({ variant }), className)
|
|
2318
|
+
}, props)
|
|
2319
|
+
);
|
|
2320
|
+
}
|
|
2321
|
+
function TabsTrigger(_a) {
|
|
2322
|
+
var _b = _a, {
|
|
2323
|
+
className
|
|
2324
|
+
} = _b, props = __objRest(_b, [
|
|
2325
|
+
"className"
|
|
2326
|
+
]);
|
|
2327
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2328
|
+
Tabs$1.Trigger,
|
|
2329
|
+
__spreadValues({
|
|
2330
|
+
"data-slot": "tabs-trigger",
|
|
2331
|
+
className: cn(
|
|
2332
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground 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 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2333
|
+
"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent",
|
|
2334
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground",
|
|
2335
|
+
"after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",
|
|
2336
|
+
className
|
|
2337
|
+
)
|
|
2338
|
+
}, props)
|
|
2339
|
+
);
|
|
2340
|
+
}
|
|
2341
|
+
function TabsContent(_a) {
|
|
2342
|
+
var _b = _a, {
|
|
2343
|
+
className
|
|
2344
|
+
} = _b, props = __objRest(_b, [
|
|
2345
|
+
"className"
|
|
2346
|
+
]);
|
|
2347
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2348
|
+
Tabs$1.Content,
|
|
2349
|
+
__spreadValues({
|
|
2350
|
+
"data-slot": "tabs-content",
|
|
2351
|
+
className: cn("flex-1 outline-none", className)
|
|
2352
|
+
}, props)
|
|
2353
|
+
);
|
|
2354
|
+
}
|
|
2355
|
+
function Textarea(_a) {
|
|
2356
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2357
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2358
|
+
"textarea",
|
|
2359
|
+
__spreadValues({
|
|
2360
|
+
"data-slot": "textarea",
|
|
2361
|
+
className: cn(
|
|
2362
|
+
"border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2363
|
+
className
|
|
2364
|
+
)
|
|
2365
|
+
}, props)
|
|
2366
|
+
);
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
export { ActivityLog, ActivityRow, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Citation, DetailViewHeader, DetailViewSummary, DetailViewThread, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, InboxGroupHeader, InboxRow, Input, Label, MetricCard, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThreadMessage, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, tabsListVariants, useIsMobile, useSidebar };
|
|
2370
|
+
//# sourceMappingURL=index.js.map
|
|
2371
|
+
//# sourceMappingURL=index.js.map
|