@arbidocs/react 0.3.185 → 0.4.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/dist/{chunk-YJAYST7S.js → chunk-3CLGHHME.js} +880 -240
- package/dist/chunk-3CLGHHME.js.map +1 -0
- package/dist/chunk-6ALMBER7.js +176 -0
- package/dist/chunk-6ALMBER7.js.map +1 -0
- package/dist/chunk-BXP6S34V.cjs +284 -0
- package/dist/chunk-BXP6S34V.cjs.map +1 -0
- package/dist/chunk-EJ2BMHYK.js +272 -0
- package/dist/chunk-EJ2BMHYK.js.map +1 -0
- package/dist/{chunk-IZPXHVPJ.cjs → chunk-OU2QLIKS.cjs} +969 -344
- package/dist/chunk-OU2QLIKS.cjs.map +1 -0
- package/dist/chunk-RZQACYNQ.cjs +218 -0
- package/dist/chunk-RZQACYNQ.cjs.map +1 -0
- package/dist/{index-4WwLZsQO.d.cts → index-CcbVSNSP.d.cts} +40 -2
- package/dist/{index-4WwLZsQO.d.ts → index-CcbVSNSP.d.ts} +40 -2
- package/dist/index.cjs +589 -1070
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -155
- package/dist/index.d.ts +11 -155
- package/dist/index.js +223 -725
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +13 -4
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +2 -1
- package/dist/ui/index.cjs +211 -190
- package/dist/ui/index.d.cts +204 -3
- package/dist/ui/index.d.ts +204 -3
- package/dist/ui/index.js +2 -1
- package/dist/viewers/index.cjs +327 -76
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.cts +90 -4
- package/dist/viewers/index.d.ts +90 -4
- package/dist/viewers/index.js +316 -78
- package/dist/viewers/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/chunk-3MLQUKT4.cjs +0 -97
- package/dist/chunk-3MLQUKT4.cjs.map +0 -1
- package/dist/chunk-IZPXHVPJ.cjs.map +0 -1
- package/dist/chunk-J3XEKOV5.js +0 -87
- package/dist/chunk-J3XEKOV5.js.map +0 -1
- package/dist/chunk-YJAYST7S.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
3
|
+
var chunkRZQACYNQ_cjs = require('./chunk-RZQACYNQ.cjs');
|
|
5
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
5
|
var React2 = require('react');
|
|
7
6
|
var Markdown = require('react-markdown');
|
|
@@ -16,7 +15,6 @@ var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
|
16
15
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
17
16
|
var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
|
|
18
17
|
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
19
|
-
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
20
18
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
21
19
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
22
20
|
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
@@ -26,7 +24,6 @@ var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
|
26
24
|
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
27
25
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
28
26
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
29
|
-
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
30
27
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
31
28
|
var cmdk = require('cmdk');
|
|
32
29
|
|
|
@@ -59,7 +56,6 @@ var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrim
|
|
|
59
56
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
60
57
|
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
|
|
61
58
|
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
62
|
-
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
63
59
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
64
60
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
65
61
|
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
@@ -69,13 +65,8 @@ var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive)
|
|
|
69
65
|
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
70
66
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
71
67
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
72
|
-
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
73
68
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
74
69
|
|
|
75
|
-
// src/lib/utils.ts
|
|
76
|
-
function cn(...inputs) {
|
|
77
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
78
|
-
}
|
|
79
70
|
var markdownBaseComponents = {
|
|
80
71
|
h1: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg font-semibold", "data-testid": "markdown-heading-1", ...props, children }),
|
|
81
72
|
h2: ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-semibold text-base", "data-testid": "markdown-heading-2", ...props, children }),
|
|
@@ -179,7 +170,7 @@ function CodeBlock({ language, code }) {
|
|
|
179
170
|
}
|
|
180
171
|
)
|
|
181
172
|
] }),
|
|
182
|
-
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "overflow-x-auto p-3 text-sm leading-relaxed", children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: cn("font-mono text-foreground", language && `language-${language}`), children: code }) })
|
|
173
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "overflow-x-auto p-3 text-sm leading-relaxed", children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: chunkRZQACYNQ_cjs.cn("font-mono text-foreground", language && `language-${language}`), children: code }) })
|
|
183
174
|
]
|
|
184
175
|
}
|
|
185
176
|
);
|
|
@@ -271,11 +262,11 @@ function MarkdownRendererComponent({
|
|
|
271
262
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
272
263
|
MarkdownErrorBoundary,
|
|
273
264
|
{
|
|
274
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("whitespace-pre-wrap break-words text-foreground", className), children }),
|
|
265
|
+
fallback: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkRZQACYNQ_cjs.cn("whitespace-pre-wrap break-words text-foreground", className), children }),
|
|
275
266
|
children: /* @__PURE__ */ jsxRuntime.jsx(MarkdownStreamingContext.Provider, { value: isStreaming, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
276
267
|
"div",
|
|
277
268
|
{
|
|
278
|
-
className: cn(
|
|
269
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
279
270
|
"markdown-content space-y-3 break-words leading-relaxed text-foreground",
|
|
280
271
|
className
|
|
281
272
|
),
|
|
@@ -309,39 +300,74 @@ function Tooltip({ children, delayDuration }) {
|
|
|
309
300
|
timer.current = null;
|
|
310
301
|
}
|
|
311
302
|
};
|
|
303
|
+
const suppressed = React2__namespace.useRef(false);
|
|
312
304
|
const show = React2__namespace.useCallback(() => {
|
|
313
305
|
clearTimer();
|
|
306
|
+
if (suppressed.current) return;
|
|
314
307
|
timer.current = setTimeout(() => setOpen(true), delay);
|
|
315
308
|
}, [delay]);
|
|
316
309
|
const hide = React2__namespace.useCallback(() => {
|
|
317
310
|
clearTimer();
|
|
318
311
|
setOpen(false);
|
|
319
312
|
}, []);
|
|
313
|
+
const suppress = React2__namespace.useCallback(() => {
|
|
314
|
+
suppressed.current = true;
|
|
315
|
+
clearTimer();
|
|
316
|
+
setOpen(false);
|
|
317
|
+
}, []);
|
|
318
|
+
const release = React2__namespace.useCallback(() => {
|
|
319
|
+
suppressed.current = false;
|
|
320
|
+
}, []);
|
|
320
321
|
const setTrigger = React2__namespace.useCallback((el) => {
|
|
321
322
|
triggerRef.current = el;
|
|
322
323
|
}, []);
|
|
323
324
|
React2__namespace.useEffect(() => () => clearTimer(), []);
|
|
324
325
|
const value = React2__namespace.useMemo(
|
|
325
|
-
() => ({ open, show, hide, setTrigger, triggerRef, contentId }),
|
|
326
|
-
[open, show, hide, setTrigger, contentId]
|
|
326
|
+
() => ({ open, show, hide, suppress, release, setTrigger, triggerRef, contentId }),
|
|
327
|
+
[open, show, hide, suppress, release, setTrigger, contentId]
|
|
327
328
|
);
|
|
328
329
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipContext.Provider, { value, children });
|
|
329
330
|
}
|
|
331
|
+
function isKeyboardFocus(target) {
|
|
332
|
+
try {
|
|
333
|
+
return target.matches(":focus-visible");
|
|
334
|
+
} catch {
|
|
335
|
+
return true;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function showsOwnText(el) {
|
|
339
|
+
if (!el) return false;
|
|
340
|
+
const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT);
|
|
341
|
+
let visible = "";
|
|
342
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
|
343
|
+
if (node.parentElement?.closest(".sr-only")) continue;
|
|
344
|
+
visible += node.textContent ?? "";
|
|
345
|
+
}
|
|
346
|
+
return /\p{L}{2,}/u.test(visible);
|
|
347
|
+
}
|
|
330
348
|
function TooltipTrigger({ asChild, children, ...props }) {
|
|
331
349
|
const ctx = React2__namespace.useContext(TooltipContext);
|
|
332
350
|
if (!ctx) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
333
351
|
const triggerHandlers = {
|
|
334
352
|
onPointerEnter: (e) => {
|
|
335
353
|
props.onPointerEnter?.(e);
|
|
354
|
+
if (e.pointerType === "touch") return;
|
|
355
|
+
if (showsOwnText(e.currentTarget)) return;
|
|
336
356
|
ctx.show();
|
|
337
357
|
},
|
|
338
358
|
onPointerLeave: (e) => {
|
|
339
359
|
props.onPointerLeave?.(e);
|
|
360
|
+
ctx.release();
|
|
340
361
|
ctx.hide();
|
|
341
362
|
},
|
|
363
|
+
onPointerDown: (e) => {
|
|
364
|
+
props.onPointerDown?.(e);
|
|
365
|
+
(asChild && React2__namespace.isValidElement(children) ? children.props.onPointerDown : void 0)?.(e);
|
|
366
|
+
ctx.suppress();
|
|
367
|
+
},
|
|
342
368
|
onFocus: (e) => {
|
|
343
369
|
props.onFocus?.(e);
|
|
344
|
-
ctx.show();
|
|
370
|
+
if (isKeyboardFocus(e.target) && !showsOwnText(e.currentTarget)) ctx.show();
|
|
345
371
|
},
|
|
346
372
|
onBlur: (e) => {
|
|
347
373
|
props.onBlur?.(e);
|
|
@@ -376,7 +402,7 @@ var TRANSFORM_BY_SIDE = {
|
|
|
376
402
|
right: "translate(0, -50%)"
|
|
377
403
|
};
|
|
378
404
|
var TooltipContent = React2__namespace.forwardRef(
|
|
379
|
-
({ className, side = "top", sideOffset = 4, style, ...props }, ref) => {
|
|
405
|
+
({ className, side = "top", sideOffset = 4, collisionPadding = 8, style, ...props }, ref) => {
|
|
380
406
|
const ctx = React2__namespace.useContext(TooltipContext);
|
|
381
407
|
const innerRef = React2__namespace.useRef(null);
|
|
382
408
|
const [coords, setCoords] = React2__namespace.useState(null);
|
|
@@ -396,12 +422,16 @@ var TooltipContent = React2__namespace.forwardRef(
|
|
|
396
422
|
else if (s === "bottom" && r.bottom + sideOffset + ch > vh) s = "top";
|
|
397
423
|
else if (s === "left" && r.left - sideOffset - cw < 0) s = "right";
|
|
398
424
|
else if (s === "right" && r.right + sideOffset + cw > vw) s = "left";
|
|
425
|
+
const PAD = collisionPadding;
|
|
426
|
+
const clamp = (value, half, max) => Math.min(Math.max(value, PAD + half), Math.max(PAD + half, max - PAD - half));
|
|
427
|
+
const rawTop = s === "top" ? r.top - sideOffset : s === "bottom" ? r.bottom + sideOffset : r.top + r.height / 2;
|
|
428
|
+
const rawLeft = s === "left" ? r.left - sideOffset : s === "right" ? r.right + sideOffset : r.left + r.width / 2;
|
|
399
429
|
setCoords({
|
|
400
|
-
top: s === "
|
|
401
|
-
left: s === "
|
|
430
|
+
top: s === "left" || s === "right" ? clamp(rawTop, ch / 2, vh) : rawTop,
|
|
431
|
+
left: s === "top" || s === "bottom" ? clamp(rawLeft, cw / 2, vw) : rawLeft,
|
|
402
432
|
transform: TRANSFORM_BY_SIDE[s]
|
|
403
433
|
});
|
|
404
|
-
}, [ctx?.open, side, sideOffset, ctx?.triggerRef]);
|
|
434
|
+
}, [ctx?.open, side, sideOffset, collisionPadding, ctx?.triggerRef]);
|
|
405
435
|
if (!ctx?.open) return null;
|
|
406
436
|
const setRefs = (node) => {
|
|
407
437
|
innerRef.current = node;
|
|
@@ -415,13 +445,13 @@ var TooltipContent = React2__namespace.forwardRef(
|
|
|
415
445
|
ref: setRefs,
|
|
416
446
|
id: ctx.contentId,
|
|
417
447
|
role: "tooltip",
|
|
418
|
-
className: cn(
|
|
448
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
419
449
|
// The kit owns the tooltip's look: semantic tokens only, so it is
|
|
420
450
|
// legible in every app without one of them defining a global class.
|
|
421
451
|
// The `tooltip-content` hook is kept last-but-one so a host stylesheet
|
|
422
452
|
// can still restyle every tooltip in one place (the ARBI app does, with
|
|
423
453
|
// `!important` rules that win over these defaults).
|
|
424
|
-
"pointer-events-none max-w-[300px] break-words rounded-md border border-border bg-popover px-3 py-2 text-sm font-normal text-popover-foreground shadow-lg",
|
|
454
|
+
"pointer-events-none w-max max-w-[300px] break-words rounded-md border border-border bg-popover px-3 py-2 text-sm font-normal text-popover-foreground shadow-lg",
|
|
425
455
|
"tooltip-content",
|
|
426
456
|
className
|
|
427
457
|
),
|
|
@@ -476,6 +506,7 @@ function IconToggle({
|
|
|
476
506
|
"aria-pressed": isMixed ? "mixed" : isActive,
|
|
477
507
|
className: `
|
|
478
508
|
group/toggle relative inline-flex items-center h-4 w-8 rounded-full
|
|
509
|
+
pointer-coarse:after:absolute pointer-coarse:after:left-1/2 pointer-coarse:after:top-1/2 pointer-coarse:after:size-11 pointer-coarse:after:-translate-x-1/2 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:content-['']
|
|
479
510
|
transition-colors cursor-pointer
|
|
480
511
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
481
512
|
${isActive ? bgColorClass : isMixed ? "bg-gray-400" : "bg-muted"}
|
|
@@ -526,7 +557,7 @@ var Avatar = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
526
557
|
AvatarPrimitive__namespace.Root,
|
|
527
558
|
{
|
|
528
559
|
ref,
|
|
529
|
-
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
560
|
+
className: chunkRZQACYNQ_cjs.cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
530
561
|
...props
|
|
531
562
|
}
|
|
532
563
|
));
|
|
@@ -535,7 +566,7 @@ var AvatarImage = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
535
566
|
AvatarPrimitive__namespace.Image,
|
|
536
567
|
{
|
|
537
568
|
ref,
|
|
538
|
-
className: cn("aspect-square h-full w-full object-cover", className),
|
|
569
|
+
className: chunkRZQACYNQ_cjs.cn("aspect-square h-full w-full object-cover", className),
|
|
539
570
|
...props
|
|
540
571
|
}
|
|
541
572
|
));
|
|
@@ -544,7 +575,7 @@ var AvatarFallback = React2__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
544
575
|
AvatarPrimitive__namespace.Fallback,
|
|
545
576
|
{
|
|
546
577
|
ref,
|
|
547
|
-
className: cn(
|
|
578
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
548
579
|
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
549
580
|
className
|
|
550
581
|
),
|
|
@@ -570,26 +601,31 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
570
601
|
}
|
|
571
602
|
);
|
|
572
603
|
function Badge({ className, variant, ...props }) {
|
|
573
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
604
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkRZQACYNQ_cjs.cn(badgeVariants({ variant }), className), ...props });
|
|
574
605
|
}
|
|
575
606
|
var buttonVariants = classVarianceAuthority.cva(
|
|
576
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-
|
|
607
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
577
608
|
{
|
|
578
609
|
variants: {
|
|
610
|
+
// One filled primary per view; everything else is tonal, hairline or ghost. No
|
|
611
|
+
// static shadows: separation is tone, and shadows are reserved for floating layers.
|
|
579
612
|
variant: {
|
|
580
|
-
default: "bg-primary text-primary-foreground
|
|
581
|
-
accent: "bg-ai-accent text-ai-accent-foreground
|
|
582
|
-
destructive: "bg-destructive text-destructive-foreground
|
|
583
|
-
outline: "border border-
|
|
584
|
-
secondary: "bg-
|
|
585
|
-
ghost: "hover:bg-
|
|
613
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
614
|
+
accent: "bg-ai-accent text-ai-accent-foreground hover:bg-ai-accent/90",
|
|
615
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
616
|
+
outline: "border border-border bg-background hover:bg-muted",
|
|
617
|
+
secondary: "bg-muted text-foreground hover:bg-muted/70",
|
|
618
|
+
ghost: "hover:bg-muted",
|
|
586
619
|
link: "text-primary underline-offset-4 hover:underline"
|
|
587
620
|
},
|
|
621
|
+
// Touch screens get a 44px target (coarse pointers only), mouse keeps the compact 36px.
|
|
622
|
+
// `!` so the floor also wins over a caller's compact `h-7` or a container's
|
|
623
|
+
// `[&_button]:h-7` rule: a compact toolbar on a phone must still be tappable.
|
|
588
624
|
size: {
|
|
589
|
-
default: "h-9 px-4 py-2",
|
|
590
|
-
sm: "h-8 rounded-md px-3",
|
|
591
|
-
lg: "h-10 rounded-md px-8",
|
|
592
|
-
icon: "h-9 w-9"
|
|
625
|
+
default: "h-9 px-4 py-2 pointer-coarse:h-11!",
|
|
626
|
+
sm: "h-8 rounded-md px-3 pointer-coarse:h-11! pointer-coarse:min-w-11",
|
|
627
|
+
lg: "h-10 rounded-md px-8 pointer-coarse:h-12!",
|
|
628
|
+
icon: "h-9 w-9 pointer-coarse:h-11! pointer-coarse:w-11!"
|
|
593
629
|
}
|
|
594
630
|
},
|
|
595
631
|
defaultVariants: {
|
|
@@ -601,7 +637,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
601
637
|
var Button = React2__namespace.forwardRef(
|
|
602
638
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
603
639
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
604
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
640
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { className: chunkRZQACYNQ_cjs.cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
605
641
|
}
|
|
606
642
|
);
|
|
607
643
|
Button.displayName = "Button";
|
|
@@ -613,8 +649,9 @@ var HoverCardContent = React2__namespace.forwardRef(({ className, align = "cente
|
|
|
613
649
|
ref,
|
|
614
650
|
align,
|
|
615
651
|
sideOffset,
|
|
616
|
-
|
|
617
|
-
|
|
652
|
+
collisionPadding: chunkRZQACYNQ_cjs.getCollisionPadding(),
|
|
653
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
654
|
+
"z-50 w-64 max-w-[calc(100vw-1rem)] rounded-md border bg-popover p-4 text-popover-foreground shadow-lg outline-none 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 origin-[--radix-hover-card-content-transform-origin]",
|
|
618
655
|
className
|
|
619
656
|
),
|
|
620
657
|
...props
|
|
@@ -639,7 +676,7 @@ var Card = React2__namespace.forwardRef(
|
|
|
639
676
|
{
|
|
640
677
|
ref,
|
|
641
678
|
"data-slot": "card",
|
|
642
|
-
className: cn(cardVariants({ variant }), className),
|
|
679
|
+
className: chunkRZQACYNQ_cjs.cn(cardVariants({ variant }), className),
|
|
643
680
|
...props
|
|
644
681
|
}
|
|
645
682
|
)
|
|
@@ -651,7 +688,7 @@ var CardHeader = React2__namespace.forwardRef(
|
|
|
651
688
|
{
|
|
652
689
|
ref,
|
|
653
690
|
"data-slot": "card-header",
|
|
654
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
691
|
+
className: chunkRZQACYNQ_cjs.cn("flex flex-col space-y-1.5 p-6", className),
|
|
655
692
|
...props
|
|
656
693
|
}
|
|
657
694
|
)
|
|
@@ -663,7 +700,7 @@ var CardTitle = React2__namespace.forwardRef(
|
|
|
663
700
|
{
|
|
664
701
|
ref,
|
|
665
702
|
"data-slot": "card-title",
|
|
666
|
-
className: cn("font-semibold leading-none tracking-tight", className),
|
|
703
|
+
className: chunkRZQACYNQ_cjs.cn("font-semibold leading-none tracking-tight", className),
|
|
667
704
|
...props
|
|
668
705
|
}
|
|
669
706
|
)
|
|
@@ -675,14 +712,14 @@ var CardDescription = React2__namespace.forwardRef(
|
|
|
675
712
|
{
|
|
676
713
|
ref,
|
|
677
714
|
"data-slot": "card-description",
|
|
678
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
715
|
+
className: chunkRZQACYNQ_cjs.cn("text-sm text-muted-foreground", className),
|
|
679
716
|
...props
|
|
680
717
|
}
|
|
681
718
|
)
|
|
682
719
|
);
|
|
683
720
|
CardDescription.displayName = "CardDescription";
|
|
684
721
|
var CardContent = React2__namespace.forwardRef(
|
|
685
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "card-content", className: cn("p-6 pt-0", className), ...props })
|
|
722
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "card-content", className: chunkRZQACYNQ_cjs.cn("p-6 pt-0", className), ...props })
|
|
686
723
|
);
|
|
687
724
|
CardContent.displayName = "CardContent";
|
|
688
725
|
var CardFooter = React2__namespace.forwardRef(
|
|
@@ -691,7 +728,7 @@ var CardFooter = React2__namespace.forwardRef(
|
|
|
691
728
|
{
|
|
692
729
|
ref,
|
|
693
730
|
"data-slot": "card-footer",
|
|
694
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
731
|
+
className: chunkRZQACYNQ_cjs.cn("flex items-center p-6 pt-0", className),
|
|
695
732
|
...props
|
|
696
733
|
}
|
|
697
734
|
)
|
|
@@ -1034,8 +1071,8 @@ var Input = React2__namespace.forwardRef(
|
|
|
1034
1071
|
{
|
|
1035
1072
|
type,
|
|
1036
1073
|
"data-slot": "input",
|
|
1037
|
-
className: cn(
|
|
1038
|
-
"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1074
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1075
|
+
"flex h-9 pointer-coarse:h-11 w-full rounded-md border border-input bg-background px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1039
1076
|
showDictate && "pr-9",
|
|
1040
1077
|
className
|
|
1041
1078
|
),
|
|
@@ -1093,7 +1130,7 @@ var Separator = React2__namespace.forwardRef(({ className, orientation = "horizo
|
|
|
1093
1130
|
ref,
|
|
1094
1131
|
decorative,
|
|
1095
1132
|
orientation,
|
|
1096
|
-
className: cn(
|
|
1133
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1097
1134
|
"shrink-0 bg-border",
|
|
1098
1135
|
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1099
1136
|
className
|
|
@@ -1112,7 +1149,7 @@ var Textarea = React2__namespace.forwardRef(
|
|
|
1112
1149
|
const textarea = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
1150
|
"textarea",
|
|
1114
1151
|
{
|
|
1115
|
-
className: cn(
|
|
1152
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1116
1153
|
"flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1117
1154
|
showDictate && "pr-9",
|
|
1118
1155
|
className
|
|
@@ -1163,7 +1200,7 @@ var Progress = React2__namespace.forwardRef(({ className, value, ...props }, ref
|
|
|
1163
1200
|
ProgressPrimitive__namespace.Root,
|
|
1164
1201
|
{
|
|
1165
1202
|
ref,
|
|
1166
|
-
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
|
|
1203
|
+
className: chunkRZQACYNQ_cjs.cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
|
|
1167
1204
|
...props,
|
|
1168
1205
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1169
1206
|
ProgressPrimitive__namespace.Indicator,
|
|
@@ -1175,38 +1212,8 @@ var Progress = React2__namespace.forwardRef(({ className, value, ...props }, ref
|
|
|
1175
1212
|
}
|
|
1176
1213
|
));
|
|
1177
1214
|
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
1178
|
-
var ScrollArea = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1179
|
-
ScrollAreaPrimitive__namespace.Root,
|
|
1180
|
-
{
|
|
1181
|
-
ref,
|
|
1182
|
-
className: cn("relative overflow-hidden", className),
|
|
1183
|
-
...props,
|
|
1184
|
-
children: [
|
|
1185
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1186
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
|
|
1187
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
1188
|
-
]
|
|
1189
|
-
}
|
|
1190
|
-
));
|
|
1191
|
-
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
1192
|
-
var ScrollBar = React2__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1193
|
-
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
1194
|
-
{
|
|
1195
|
-
ref,
|
|
1196
|
-
orientation,
|
|
1197
|
-
className: cn(
|
|
1198
|
-
"flex touch-none select-none transition-colors",
|
|
1199
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1200
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1201
|
-
className
|
|
1202
|
-
),
|
|
1203
|
-
...props,
|
|
1204
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1205
|
-
}
|
|
1206
|
-
));
|
|
1207
|
-
ScrollBar.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
1208
1215
|
var RadioGroup = React2__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1209
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: cn("grid gap-2", className), ...props, ref });
|
|
1216
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Root, { className: chunkRZQACYNQ_cjs.cn("grid gap-2", className), ...props, ref });
|
|
1210
1217
|
});
|
|
1211
1218
|
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
1212
1219
|
var RadioGroupItem = React2__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
@@ -1214,8 +1221,8 @@ var RadioGroupItem = React2__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1214
1221
|
RadioGroupPrimitive__namespace.Item,
|
|
1215
1222
|
{
|
|
1216
1223
|
ref,
|
|
1217
|
-
className: cn(
|
|
1218
|
-
"aspect-square h-4 w-4 rounded-full border border-primary text-primary focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1224
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1225
|
+
"relative aspect-square h-4 w-4 rounded-full border border-primary text-primary after:absolute after:left-1/2 after:top-1/2 after:hidden after:size-11 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:block focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
1219
1226
|
className
|
|
1220
1227
|
),
|
|
1221
1228
|
...props,
|
|
@@ -1228,20 +1235,20 @@ var Checkbox = React2__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1228
1235
|
CheckboxPrimitive__namespace.Root,
|
|
1229
1236
|
{
|
|
1230
1237
|
ref,
|
|
1231
|
-
className: cn(
|
|
1232
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-
|
|
1238
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1239
|
+
"peer relative h-4 w-4 shrink-0 rounded-sm border border-muted-foreground/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground after:absolute after:left-1/2 after:top-1/2 after:hidden after:size-11 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:block",
|
|
1233
1240
|
className
|
|
1234
1241
|
),
|
|
1235
1242
|
...props,
|
|
1236
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) })
|
|
1243
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: chunkRZQACYNQ_cjs.cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) })
|
|
1237
1244
|
}
|
|
1238
1245
|
));
|
|
1239
1246
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1240
1247
|
var Switch = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1241
1248
|
SwitchPrimitives__namespace.Root,
|
|
1242
1249
|
{
|
|
1243
|
-
className: cn(
|
|
1244
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
1250
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1251
|
+
"peer relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-muted-foreground/45 after:absolute after:left-1/2 after:top-1/2 after:hidden after:size-11 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:block",
|
|
1245
1252
|
className
|
|
1246
1253
|
),
|
|
1247
1254
|
...props,
|
|
@@ -1249,7 +1256,7 @@ var Switch = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1249
1256
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1250
1257
|
SwitchPrimitives__namespace.Thumb,
|
|
1251
1258
|
{
|
|
1252
|
-
className: cn(
|
|
1259
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1253
1260
|
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
1254
1261
|
)
|
|
1255
1262
|
}
|
|
@@ -1262,8 +1269,8 @@ var TabsList = React2__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1262
1269
|
TabsPrimitive__namespace.List,
|
|
1263
1270
|
{
|
|
1264
1271
|
ref,
|
|
1265
|
-
className: cn(
|
|
1266
|
-
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
1272
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1273
|
+
"inline-flex h-9 pointer-coarse:h-auto items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
1267
1274
|
className
|
|
1268
1275
|
),
|
|
1269
1276
|
...props
|
|
@@ -1274,8 +1281,8 @@ var TabsTrigger = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1274
1281
|
TabsPrimitive__namespace.Trigger,
|
|
1275
1282
|
{
|
|
1276
1283
|
ref,
|
|
1277
|
-
className: cn(
|
|
1278
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
1284
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1285
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm pointer-coarse:min-h-11 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
1279
1286
|
className
|
|
1280
1287
|
),
|
|
1281
1288
|
...props
|
|
@@ -1286,7 +1293,7 @@ var TabsContent = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1286
1293
|
TabsPrimitive__namespace.Content,
|
|
1287
1294
|
{
|
|
1288
1295
|
ref,
|
|
1289
|
-
className: cn(
|
|
1296
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1290
1297
|
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1291
1298
|
className
|
|
1292
1299
|
),
|
|
@@ -1295,18 +1302,18 @@ var TabsContent = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1295
1302
|
));
|
|
1296
1303
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
1297
1304
|
var Table = React2__namespace.forwardRef(
|
|
1298
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
1305
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: chunkRZQACYNQ_cjs.cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
1299
1306
|
);
|
|
1300
1307
|
Table.displayName = "Table";
|
|
1301
|
-
var TableHeader = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
1308
|
+
var TableHeader = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: chunkRZQACYNQ_cjs.cn("[&_tr]:border-b", className), ...props }));
|
|
1302
1309
|
TableHeader.displayName = "TableHeader";
|
|
1303
|
-
var TableBody = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
1310
|
+
var TableBody = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: chunkRZQACYNQ_cjs.cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
1304
1311
|
TableBody.displayName = "TableBody";
|
|
1305
1312
|
var TableFooter = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1306
1313
|
"tfoot",
|
|
1307
1314
|
{
|
|
1308
1315
|
ref,
|
|
1309
|
-
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
1316
|
+
className: chunkRZQACYNQ_cjs.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
1310
1317
|
...props
|
|
1311
1318
|
}
|
|
1312
1319
|
));
|
|
@@ -1316,7 +1323,7 @@ var TableRow = React2__namespace.forwardRef(
|
|
|
1316
1323
|
"tr",
|
|
1317
1324
|
{
|
|
1318
1325
|
ref,
|
|
1319
|
-
className: cn(
|
|
1326
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1320
1327
|
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1321
1328
|
className
|
|
1322
1329
|
),
|
|
@@ -1330,7 +1337,7 @@ var TableHead = React2__namespace.forwardRef(
|
|
|
1330
1337
|
"th",
|
|
1331
1338
|
{
|
|
1332
1339
|
ref,
|
|
1333
|
-
className: cn(
|
|
1340
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1334
1341
|
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1335
1342
|
className
|
|
1336
1343
|
),
|
|
@@ -1344,7 +1351,7 @@ var TableCell = React2__namespace.forwardRef(
|
|
|
1344
1351
|
"td",
|
|
1345
1352
|
{
|
|
1346
1353
|
ref,
|
|
1347
|
-
className: cn(
|
|
1354
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1348
1355
|
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
1349
1356
|
className
|
|
1350
1357
|
),
|
|
@@ -1353,17 +1360,17 @@ var TableCell = React2__namespace.forwardRef(
|
|
|
1353
1360
|
)
|
|
1354
1361
|
);
|
|
1355
1362
|
TableCell.displayName = "TableCell";
|
|
1356
|
-
var TableCaption = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
1363
|
+
var TableCaption = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: chunkRZQACYNQ_cjs.cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
1357
1364
|
TableCaption.displayName = "TableCaption";
|
|
1358
1365
|
var Slider = React2__namespace.forwardRef(
|
|
1359
1366
|
({ className, rangeClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1360
1367
|
SliderPrimitive__namespace.Root,
|
|
1361
1368
|
{
|
|
1362
1369
|
ref,
|
|
1363
|
-
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
1370
|
+
className: chunkRZQACYNQ_cjs.cn("relative flex w-full touch-none select-none items-center", className),
|
|
1364
1371
|
...props,
|
|
1365
1372
|
children: [
|
|
1366
|
-
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: cn("absolute h-full bg-primary", rangeClassName) }) }),
|
|
1373
|
+
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: chunkRZQACYNQ_cjs.cn("absolute h-full bg-primary", rangeClassName) }) }),
|
|
1367
1374
|
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
1368
1375
|
]
|
|
1369
1376
|
}
|
|
@@ -1379,9 +1386,9 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
1379
1386
|
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
1380
1387
|
},
|
|
1381
1388
|
size: {
|
|
1382
|
-
default: "h-9 px-2 min-w-9",
|
|
1383
|
-
sm: "h-8 px-1.5 min-w-8",
|
|
1384
|
-
lg: "h-10 px-2.5 min-w-10"
|
|
1389
|
+
default: "h-9 px-2 min-w-9 pointer-coarse:h-11 pointer-coarse:min-w-11",
|
|
1390
|
+
sm: "h-8 px-1.5 min-w-8 pointer-coarse:h-11 pointer-coarse:min-w-11",
|
|
1391
|
+
lg: "h-10 px-2.5 min-w-10 pointer-coarse:h-11 pointer-coarse:min-w-11"
|
|
1385
1392
|
}
|
|
1386
1393
|
},
|
|
1387
1394
|
defaultVariants: {
|
|
@@ -1394,7 +1401,7 @@ var Toggle = React2__namespace.forwardRef(({ className, variant, size, ...props
|
|
|
1394
1401
|
TogglePrimitive__namespace.Root,
|
|
1395
1402
|
{
|
|
1396
1403
|
ref,
|
|
1397
|
-
className: cn(toggleVariants({ variant, size, className })),
|
|
1404
|
+
className: chunkRZQACYNQ_cjs.cn(toggleVariants({ variant, size, className })),
|
|
1398
1405
|
...props
|
|
1399
1406
|
}
|
|
1400
1407
|
));
|
|
@@ -1407,7 +1414,7 @@ var ToggleGroup = React2__namespace.forwardRef(({ className, variant, size, chil
|
|
|
1407
1414
|
ToggleGroupPrimitive__namespace.Root,
|
|
1408
1415
|
{
|
|
1409
1416
|
ref,
|
|
1410
|
-
className: cn("flex items-center justify-center gap-1", className),
|
|
1417
|
+
className: chunkRZQACYNQ_cjs.cn("flex items-center justify-center gap-1", className),
|
|
1411
1418
|
...props,
|
|
1412
1419
|
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
1413
1420
|
}
|
|
@@ -1419,7 +1426,7 @@ var ToggleGroupItem = React2__namespace.forwardRef(({ className, children, varia
|
|
|
1419
1426
|
ToggleGroupPrimitive__namespace.Item,
|
|
1420
1427
|
{
|
|
1421
1428
|
ref,
|
|
1422
|
-
className: cn(
|
|
1429
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1423
1430
|
toggleVariants({
|
|
1424
1431
|
variant: context.variant || variant,
|
|
1425
1432
|
size: context.size || size
|
|
@@ -1447,7 +1454,7 @@ var DialogOverlay = React2__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1447
1454
|
DialogPrimitive__namespace.Overlay,
|
|
1448
1455
|
{
|
|
1449
1456
|
ref,
|
|
1450
|
-
className: cn(
|
|
1457
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1451
1458
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1452
1459
|
className
|
|
1453
1460
|
),
|
|
@@ -1455,45 +1462,61 @@ var DialogOverlay = React2__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1455
1462
|
}
|
|
1456
1463
|
));
|
|
1457
1464
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
1458
|
-
var
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
]
|
|
1465
|
+
var PHONE_PRESENTATION = {
|
|
1466
|
+
center: "",
|
|
1467
|
+
sheet: "max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:max-w-full max-sm:border-x-0 max-sm:border-b-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-[calc(100dvh-env(safe-area-inset-top,0px)-2.5rem)] max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100",
|
|
1468
|
+
full: "max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:border-x-0 max-sm:border-b-0 max-sm:h-[calc(100dvh-env(safe-area-inset-top,0px)-1rem)] max-sm:w-full max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-none max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100"
|
|
1469
|
+
};
|
|
1470
|
+
var DialogContent = React2__namespace.forwardRef(
|
|
1471
|
+
({ className, children, hideCloseButton, presentation = "center", onInteractOutside, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
1472
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
1473
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1474
|
+
DialogPrimitive__namespace.Content,
|
|
1475
|
+
{
|
|
1476
|
+
ref,
|
|
1477
|
+
"data-slot": "dialog-content",
|
|
1478
|
+
"data-presentation": presentation,
|
|
1479
|
+
onInteractOutside: (event) => {
|
|
1480
|
+
if (isToastInteraction(event)) event.preventDefault();
|
|
1481
|
+
onInteractOutside?.(event);
|
|
1482
|
+
},
|
|
1483
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1484
|
+
// Always inside the viewport: width and height are capped by the DYNAMIC viewport (mobile
|
|
1485
|
+
// browser chrome) and the notch / home-indicator insets; the content scrolls inside.
|
|
1486
|
+
"fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px))] max-w-lg max-h-[calc(min(100dvh,100svh,100vh)-2rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] translate-x-[-50%] translate-y-[-50%] will-change-transform grid-cols-[minmax(0,1fr)] gap-4 overflow-x-hidden overflow-y-auto overscroll-contain border bg-background p-6 shadow-xl duration-200 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 rounded-md",
|
|
1487
|
+
PHONE_PRESENTATION[presentation],
|
|
1488
|
+
className
|
|
1489
|
+
),
|
|
1490
|
+
...props,
|
|
1491
|
+
children: [
|
|
1492
|
+
children,
|
|
1493
|
+
!hideCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1494
|
+
DialogPrimitive__namespace.Close,
|
|
1495
|
+
{
|
|
1496
|
+
className: "fixed right-4 top-4 z-20 inline-flex items-center justify-center rounded-sm pointer-coarse:right-2 pointer-coarse:top-2 pointer-coarse:size-11 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
1497
|
+
"data-testid": "dialog-close-button",
|
|
1498
|
+
children: [
|
|
1499
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close dialog" })
|
|
1501
|
+
]
|
|
1502
|
+
}
|
|
1503
|
+
)
|
|
1504
|
+
]
|
|
1505
|
+
}
|
|
1506
|
+
)
|
|
1507
|
+
] })
|
|
1508
|
+
);
|
|
1490
1509
|
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
1491
|
-
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-1.5
|
|
1510
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkRZQACYNQ_cjs.cn("flex min-w-0 flex-col space-y-1.5 pr-8 text-left", className), ...props });
|
|
1492
1511
|
DialogHeader.displayName = "DialogHeader";
|
|
1493
1512
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1494
1513
|
"div",
|
|
1495
1514
|
{
|
|
1496
|
-
className: cn(
|
|
1515
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1516
|
+
// Sticks to the bottom of a scrolling dialog so the actions stay reachable.
|
|
1517
|
+
"sticky bottom-0 z-10 -mx-6 -mb-6 flex flex-col-reverse gap-2 bg-background px-6 pb-6 pt-3 sm:flex-row sm:justify-end",
|
|
1518
|
+
className
|
|
1519
|
+
),
|
|
1497
1520
|
...props
|
|
1498
1521
|
}
|
|
1499
1522
|
);
|
|
@@ -1502,7 +1525,7 @@ var DialogTitle = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1502
1525
|
DialogPrimitive__namespace.Title,
|
|
1503
1526
|
{
|
|
1504
1527
|
ref,
|
|
1505
|
-
className: cn("text-lg font-semibold leading-
|
|
1528
|
+
className: chunkRZQACYNQ_cjs.cn("break-words text-lg font-semibold leading-tight tracking-tight", className),
|
|
1506
1529
|
...props
|
|
1507
1530
|
}
|
|
1508
1531
|
));
|
|
@@ -1511,7 +1534,7 @@ var DialogDescription = React2__namespace.forwardRef(({ className, ...props }, r
|
|
|
1511
1534
|
DialogPrimitive__namespace.Description,
|
|
1512
1535
|
{
|
|
1513
1536
|
ref,
|
|
1514
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
1537
|
+
className: chunkRZQACYNQ_cjs.cn("text-sm text-muted-foreground", className),
|
|
1515
1538
|
...props
|
|
1516
1539
|
}
|
|
1517
1540
|
));
|
|
@@ -1525,131 +1548,273 @@ var PopoverContent = React2__namespace.forwardRef(({ className, align = "center"
|
|
|
1525
1548
|
ref,
|
|
1526
1549
|
align,
|
|
1527
1550
|
sideOffset,
|
|
1528
|
-
|
|
1529
|
-
|
|
1551
|
+
collisionPadding: chunkRZQACYNQ_cjs.getCollisionPadding(),
|
|
1552
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1553
|
+
"z-50 w-72 max-w-[calc(100vw-1rem)] max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-lg outline-none 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 origin-[--radix-popover-content-transform-origin]",
|
|
1530
1554
|
className
|
|
1531
1555
|
),
|
|
1532
1556
|
...props
|
|
1533
1557
|
}
|
|
1534
1558
|
) }));
|
|
1535
1559
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
1536
|
-
var
|
|
1537
|
-
var
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
1544
|
-
{
|
|
1545
|
-
ref,
|
|
1546
|
-
className: cn(
|
|
1547
|
-
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1548
|
-
inset && "pl-8",
|
|
1549
|
-
className
|
|
1550
|
-
),
|
|
1551
|
-
...props,
|
|
1552
|
-
children: [
|
|
1553
|
-
children,
|
|
1554
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto" })
|
|
1555
|
-
]
|
|
1560
|
+
var FINE_OPEN_DELAY = 350;
|
|
1561
|
+
var FINE_CLOSE_DELAY = 180;
|
|
1562
|
+
function isFocusVisible(el) {
|
|
1563
|
+
try {
|
|
1564
|
+
return el.matches(":focus-visible");
|
|
1565
|
+
} catch {
|
|
1566
|
+
return true;
|
|
1556
1567
|
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
)
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
));
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
{
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
));
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1568
|
+
}
|
|
1569
|
+
function isCoarse(pointerType) {
|
|
1570
|
+
if (pointerType === "touch" || pointerType === "pen") return true;
|
|
1571
|
+
if (pointerType === "mouse") return false;
|
|
1572
|
+
return typeof window !== "undefined" && !!window.matchMedia?.("(pointer: coarse)").matches;
|
|
1573
|
+
}
|
|
1574
|
+
function MarkMenu({
|
|
1575
|
+
as = "span",
|
|
1576
|
+
href,
|
|
1577
|
+
items,
|
|
1578
|
+
preview,
|
|
1579
|
+
menuLabel,
|
|
1580
|
+
shouldClickRunPrimary = true,
|
|
1581
|
+
openDelay = FINE_OPEN_DELAY,
|
|
1582
|
+
closeDelay = FINE_CLOSE_DELAY,
|
|
1583
|
+
testId,
|
|
1584
|
+
menuTestId,
|
|
1585
|
+
triggerRef: externalRef,
|
|
1586
|
+
className,
|
|
1587
|
+
children,
|
|
1588
|
+
onPointerDown,
|
|
1589
|
+
onPointerEnter,
|
|
1590
|
+
onPointerLeave,
|
|
1591
|
+
onFocus,
|
|
1592
|
+
onBlur,
|
|
1593
|
+
onKeyDown,
|
|
1594
|
+
...rest
|
|
1595
|
+
}) {
|
|
1596
|
+
const [open, setOpen] = React2.useState(false);
|
|
1597
|
+
const [side, setSide] = React2.useState("bottom");
|
|
1598
|
+
const menuId = React2.useId();
|
|
1599
|
+
const triggerRef = React2.useRef(null);
|
|
1600
|
+
const contentRef = React2.useRef(null);
|
|
1601
|
+
const timer = React2.useRef(null);
|
|
1602
|
+
const mode = React2.useRef("hover");
|
|
1603
|
+
const lastPointer = React2.useRef("mouse");
|
|
1604
|
+
const focusFirstOnOpen = React2.useRef(false);
|
|
1605
|
+
const isEmpty = items.length === 0 && !preview;
|
|
1606
|
+
const ordered = [...items].sort((a, b) => Number(!!b.primary) - Number(!!a.primary));
|
|
1607
|
+
const primary = ordered[0];
|
|
1608
|
+
const clearTimer = () => {
|
|
1609
|
+
if (timer.current) clearTimeout(timer.current);
|
|
1610
|
+
timer.current = null;
|
|
1611
|
+
};
|
|
1612
|
+
React2.useEffect(() => clearTimer, []);
|
|
1613
|
+
const rows = () => Array.from(contentRef.current?.querySelectorAll('[role="menuitem"]') ?? []);
|
|
1614
|
+
const firstItem = () => rows()[0];
|
|
1615
|
+
const openWith = (next, focusFirst = false) => {
|
|
1616
|
+
clearTimer();
|
|
1617
|
+
mode.current = next;
|
|
1618
|
+
focusFirstOnOpen.current = focusFirst;
|
|
1619
|
+
setSide(next === "press" && isCoarse(lastPointer.current) ? "top" : "bottom");
|
|
1620
|
+
setOpen(true);
|
|
1621
|
+
if (focusFirst) {
|
|
1622
|
+
requestAnimationFrame(() => firstItem()?.focus());
|
|
1623
|
+
}
|
|
1624
|
+
};
|
|
1625
|
+
const close = (returnFocus = false) => {
|
|
1626
|
+
clearTimer();
|
|
1627
|
+
setOpen(false);
|
|
1628
|
+
if (returnFocus) triggerRef.current?.focus({ preventScroll: true });
|
|
1629
|
+
};
|
|
1630
|
+
const schedule = (action, delay) => {
|
|
1631
|
+
clearTimer();
|
|
1632
|
+
timer.current = setTimeout(action, delay);
|
|
1633
|
+
};
|
|
1634
|
+
const handlePointerDown = (e) => {
|
|
1635
|
+
lastPointer.current = e.pointerType;
|
|
1636
|
+
onPointerDown?.(e);
|
|
1637
|
+
};
|
|
1638
|
+
const handlePointerEnter = (e) => {
|
|
1639
|
+
onPointerEnter?.(e);
|
|
1640
|
+
if (isCoarse(e.pointerType) || isEmpty) return;
|
|
1641
|
+
lastPointer.current = e.pointerType;
|
|
1642
|
+
schedule(() => openWith("hover"), openDelay);
|
|
1643
|
+
};
|
|
1644
|
+
const handlePointerLeave = (e) => {
|
|
1645
|
+
onPointerLeave?.(e);
|
|
1646
|
+
if (isCoarse(e.pointerType)) return;
|
|
1647
|
+
if (!open) return clearTimer();
|
|
1648
|
+
if (mode.current === "hover") schedule(() => close(), closeDelay);
|
|
1649
|
+
};
|
|
1650
|
+
const handleFocus = (e) => {
|
|
1651
|
+
onFocus?.(e);
|
|
1652
|
+
if (isEmpty) return;
|
|
1653
|
+
if (isFocusVisible(e.currentTarget)) schedule(() => openWith("focus"), openDelay);
|
|
1654
|
+
};
|
|
1655
|
+
const handleBlur = (e) => {
|
|
1656
|
+
onBlur?.(e);
|
|
1657
|
+
const next = e.relatedTarget;
|
|
1658
|
+
if (next && contentRef.current?.contains(next)) return;
|
|
1659
|
+
if (mode.current === "focus" || mode.current === "key") schedule(() => close(), closeDelay);
|
|
1660
|
+
else clearTimer();
|
|
1661
|
+
};
|
|
1662
|
+
const handleKeyDown = (e) => {
|
|
1663
|
+
onKeyDown?.(e);
|
|
1664
|
+
lastPointer.current = "keyboard";
|
|
1665
|
+
if (e.defaultPrevented || isEmpty) return;
|
|
1666
|
+
if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
|
|
1667
|
+
e.preventDefault();
|
|
1668
|
+
openWith("key", true);
|
|
1669
|
+
} else if (e.key === "Escape" && open) {
|
|
1670
|
+
e.preventDefault();
|
|
1671
|
+
e.stopPropagation();
|
|
1672
|
+
close(true);
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1675
|
+
const handleClick = (e) => {
|
|
1676
|
+
if (isEmpty) return;
|
|
1677
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
1678
|
+
if (e.detail === 0 && lastPointer.current === "keyboard") {
|
|
1679
|
+
e.preventDefault();
|
|
1680
|
+
return;
|
|
1681
|
+
}
|
|
1682
|
+
if (isCoarse(lastPointer.current)) {
|
|
1683
|
+
e.preventDefault();
|
|
1684
|
+
if (open) close();
|
|
1685
|
+
else openWith("press");
|
|
1686
|
+
return;
|
|
1687
|
+
}
|
|
1688
|
+
if (shouldClickRunPrimary && primary?.onSelect) {
|
|
1689
|
+
e.preventDefault();
|
|
1690
|
+
close();
|
|
1691
|
+
primary.onSelect();
|
|
1692
|
+
}
|
|
1693
|
+
};
|
|
1694
|
+
const handleMenuKeyDown = (e) => {
|
|
1695
|
+
const list = rows();
|
|
1696
|
+
const index = list.indexOf(document.activeElement);
|
|
1697
|
+
let target;
|
|
1698
|
+
if (e.key === "ArrowDown") target = list[(index + 1) % list.length];
|
|
1699
|
+
else if (e.key === "ArrowUp") target = list[(index - 1 + list.length) % list.length];
|
|
1700
|
+
else if (e.key === "Home") target = list[0];
|
|
1701
|
+
else if (e.key === "End") target = list[list.length - 1];
|
|
1702
|
+
else if (e.key === "Escape") {
|
|
1703
|
+
e.preventDefault();
|
|
1704
|
+
e.stopPropagation();
|
|
1705
|
+
close(true);
|
|
1706
|
+
return;
|
|
1707
|
+
} else if (e.key === "Tab") {
|
|
1708
|
+
close();
|
|
1709
|
+
return;
|
|
1710
|
+
}
|
|
1711
|
+
if (target) {
|
|
1712
|
+
e.preventDefault();
|
|
1713
|
+
target.focus();
|
|
1714
|
+
}
|
|
1715
|
+
};
|
|
1716
|
+
const choose = (item) => {
|
|
1717
|
+
const wasKey = mode.current === "key";
|
|
1718
|
+
close(wasKey);
|
|
1719
|
+
item.onSelect?.();
|
|
1720
|
+
};
|
|
1721
|
+
const setTriggerRef = React2.useCallback(
|
|
1722
|
+
(el) => {
|
|
1723
|
+
triggerRef.current = el;
|
|
1724
|
+
if (typeof externalRef === "function") externalRef(el);
|
|
1725
|
+
else if (externalRef) externalRef.current = el;
|
|
1726
|
+
},
|
|
1727
|
+
[externalRef]
|
|
1728
|
+
);
|
|
1729
|
+
const triggerProps = {
|
|
1730
|
+
ref: setTriggerRef,
|
|
1731
|
+
className,
|
|
1732
|
+
"data-testid": testId,
|
|
1733
|
+
"data-slot": "mark",
|
|
1734
|
+
"aria-haspopup": "true",
|
|
1735
|
+
"aria-expanded": open,
|
|
1736
|
+
"aria-controls": open ? menuId : void 0,
|
|
1737
|
+
onPointerDown: handlePointerDown,
|
|
1738
|
+
onPointerEnter: handlePointerEnter,
|
|
1739
|
+
onPointerLeave: handlePointerLeave,
|
|
1740
|
+
onFocus: handleFocus,
|
|
1741
|
+
onBlur: handleBlur,
|
|
1742
|
+
onKeyDown: handleKeyDown,
|
|
1743
|
+
onClick: handleClick,
|
|
1744
|
+
...rest
|
|
1745
|
+
};
|
|
1746
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: open && !isEmpty, children: [
|
|
1747
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverAnchor, { asChild: true, children: as === "a" ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, ...triggerProps, children }) : /* @__PURE__ */ jsxRuntime.jsx("span", { role: "button", tabIndex: 0, ...triggerProps, children }) }),
|
|
1748
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1749
|
+
PopoverContent,
|
|
1750
|
+
{
|
|
1751
|
+
ref: contentRef,
|
|
1752
|
+
id: menuId,
|
|
1753
|
+
side,
|
|
1754
|
+
align: "start",
|
|
1755
|
+
sideOffset: 6,
|
|
1756
|
+
collisionPadding: 8,
|
|
1757
|
+
role: "group",
|
|
1758
|
+
"data-testid": menuTestId,
|
|
1759
|
+
"data-slot": "mark-menu",
|
|
1760
|
+
className: "w-auto min-w-[12rem] max-w-[min(22rem,calc(100vw-1rem))] p-1",
|
|
1761
|
+
onOpenAutoFocus: (e) => {
|
|
1762
|
+
e.preventDefault();
|
|
1763
|
+
if (focusFirstOnOpen.current) firstItem()?.focus();
|
|
1764
|
+
},
|
|
1765
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
1766
|
+
onEscapeKeyDown: (e) => {
|
|
1767
|
+
e.preventDefault();
|
|
1768
|
+
close(true);
|
|
1769
|
+
},
|
|
1770
|
+
onInteractOutside: (e) => {
|
|
1771
|
+
if (triggerRef.current?.contains(e.target)) e.preventDefault();
|
|
1772
|
+
},
|
|
1773
|
+
onPointerDownOutside: () => close(),
|
|
1774
|
+
onPointerEnter: clearTimer,
|
|
1775
|
+
onPointerLeave: (e) => {
|
|
1776
|
+
if (!isCoarse(e.pointerType) && mode.current === "hover")
|
|
1777
|
+
schedule(() => close(), closeDelay);
|
|
1778
|
+
},
|
|
1779
|
+
children: [
|
|
1780
|
+
preview && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5 text-sm", children: preview }),
|
|
1781
|
+
ordered.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { role: "menu", "aria-label": menuLabel, onKeyDown: handleMenuKeyDown, children: ordered.map((item) => {
|
|
1782
|
+
const rowClass = chunkRZQACYNQ_cjs.cn(
|
|
1783
|
+
"flex w-full cursor-pointer items-center rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent focus-visible:bg-accent pointer-coarse:min-h-11 pointer-coarse:px-3",
|
|
1784
|
+
item.primary && "font-medium pointer-coarse:text-base",
|
|
1785
|
+
item.destructive && "text-destructive"
|
|
1786
|
+
);
|
|
1787
|
+
return item.href && !item.onSelect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1788
|
+
"a",
|
|
1789
|
+
{
|
|
1790
|
+
role: "menuitem",
|
|
1791
|
+
tabIndex: -1,
|
|
1792
|
+
href: item.href,
|
|
1793
|
+
className: rowClass,
|
|
1794
|
+
"data-testid": item.testId,
|
|
1795
|
+
onClick: () => close(),
|
|
1796
|
+
children: item.label
|
|
1797
|
+
},
|
|
1798
|
+
item.id
|
|
1799
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1800
|
+
"button",
|
|
1801
|
+
{
|
|
1802
|
+
type: "button",
|
|
1803
|
+
role: "menuitem",
|
|
1804
|
+
tabIndex: -1,
|
|
1805
|
+
className: rowClass,
|
|
1806
|
+
"data-testid": item.testId,
|
|
1807
|
+
onClick: () => choose(item),
|
|
1808
|
+
children: item.label
|
|
1809
|
+
},
|
|
1810
|
+
item.id
|
|
1811
|
+
);
|
|
1812
|
+
}) })
|
|
1813
|
+
]
|
|
1814
|
+
}
|
|
1815
|
+
)
|
|
1816
|
+
] });
|
|
1817
|
+
}
|
|
1653
1818
|
var Select = SelectPrimitive__namespace.Root;
|
|
1654
1819
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
1655
1820
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
@@ -1657,8 +1822,8 @@ var SelectTrigger = React2__namespace.forwardRef(({ className, children, ...prop
|
|
|
1657
1822
|
SelectPrimitive__namespace.Trigger,
|
|
1658
1823
|
{
|
|
1659
1824
|
ref,
|
|
1660
|
-
className: cn(
|
|
1661
|
-
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground/60 focus:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1825
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1826
|
+
"flex h-9 pointer-coarse:min-h-11 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground/60 focus:outline-none focus-visible:border-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1662
1827
|
className
|
|
1663
1828
|
),
|
|
1664
1829
|
...props,
|
|
@@ -1673,7 +1838,7 @@ var SelectScrollUpButton = React2__namespace.forwardRef(({ className, ...props }
|
|
|
1673
1838
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
1674
1839
|
{
|
|
1675
1840
|
ref,
|
|
1676
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1841
|
+
className: chunkRZQACYNQ_cjs.cn("flex cursor-default items-center justify-center py-1", className),
|
|
1677
1842
|
...props,
|
|
1678
1843
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
1679
1844
|
}
|
|
@@ -1683,7 +1848,7 @@ var SelectScrollDownButton = React2__namespace.forwardRef(({ className, ...props
|
|
|
1683
1848
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
1684
1849
|
{
|
|
1685
1850
|
ref,
|
|
1686
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1851
|
+
className: chunkRZQACYNQ_cjs.cn("flex cursor-default items-center justify-center py-1", className),
|
|
1687
1852
|
...props,
|
|
1688
1853
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
1689
1854
|
}
|
|
@@ -1693,19 +1858,20 @@ var SelectContent = React2__namespace.forwardRef(({ className, children, positio
|
|
|
1693
1858
|
SelectPrimitive__namespace.Content,
|
|
1694
1859
|
{
|
|
1695
1860
|
ref,
|
|
1696
|
-
className: cn(
|
|
1697
|
-
"relative z-50 max-h-
|
|
1861
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1862
|
+
"relative z-50 max-h-[min(24rem,var(--radix-select-content-available-height))] min-w-[8rem] max-w-[calc(100vw-1rem)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg 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",
|
|
1698
1863
|
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",
|
|
1699
1864
|
className
|
|
1700
1865
|
),
|
|
1701
1866
|
position,
|
|
1867
|
+
collisionPadding: chunkRZQACYNQ_cjs.getCollisionPadding(),
|
|
1702
1868
|
...props,
|
|
1703
1869
|
children: [
|
|
1704
1870
|
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
1705
1871
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1706
1872
|
SelectPrimitive__namespace.Viewport,
|
|
1707
1873
|
{
|
|
1708
|
-
className: cn(
|
|
1874
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1709
1875
|
"p-1",
|
|
1710
1876
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1711
1877
|
),
|
|
@@ -1721,7 +1887,7 @@ var SelectLabel = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1721
1887
|
SelectPrimitive__namespace.Label,
|
|
1722
1888
|
{
|
|
1723
1889
|
ref,
|
|
1724
|
-
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
1890
|
+
className: chunkRZQACYNQ_cjs.cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
1725
1891
|
...props
|
|
1726
1892
|
}
|
|
1727
1893
|
));
|
|
@@ -1730,8 +1896,8 @@ var SelectItem = React2__namespace.forwardRef(({ className, children, ...props }
|
|
|
1730
1896
|
SelectPrimitive__namespace.Item,
|
|
1731
1897
|
{
|
|
1732
1898
|
ref,
|
|
1733
|
-
className: cn(
|
|
1734
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1899
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1900
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 pointer-coarse:min-h-11 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1735
1901
|
className
|
|
1736
1902
|
),
|
|
1737
1903
|
...props,
|
|
@@ -1746,7 +1912,7 @@ var SelectSeparator = React2__namespace.forwardRef(({ className, ...props }, ref
|
|
|
1746
1912
|
SelectPrimitive__namespace.Separator,
|
|
1747
1913
|
{
|
|
1748
1914
|
ref,
|
|
1749
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1915
|
+
className: chunkRZQACYNQ_cjs.cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1750
1916
|
...props
|
|
1751
1917
|
}
|
|
1752
1918
|
));
|
|
@@ -1755,7 +1921,7 @@ var Command = React2__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1755
1921
|
cmdk.Command,
|
|
1756
1922
|
{
|
|
1757
1923
|
ref,
|
|
1758
|
-
className: cn(
|
|
1924
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1759
1925
|
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
1760
1926
|
className
|
|
1761
1927
|
),
|
|
@@ -1772,8 +1938,8 @@ var CommandInput = React2__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1772
1938
|
cmdk.Command.Input,
|
|
1773
1939
|
{
|
|
1774
1940
|
ref,
|
|
1775
|
-
className: cn(
|
|
1776
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1941
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1942
|
+
"flex h-10 pointer-coarse:h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1777
1943
|
className
|
|
1778
1944
|
),
|
|
1779
1945
|
...props
|
|
@@ -1785,7 +1951,7 @@ var CommandList = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1785
1951
|
cmdk.Command.List,
|
|
1786
1952
|
{
|
|
1787
1953
|
ref,
|
|
1788
|
-
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
1954
|
+
className: chunkRZQACYNQ_cjs.cn("max-h-[min(300px,50dvh)] overflow-y-auto overflow-x-hidden", className),
|
|
1789
1955
|
...props
|
|
1790
1956
|
}
|
|
1791
1957
|
));
|
|
@@ -1796,7 +1962,7 @@ var CommandGroup = React2__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1796
1962
|
cmdk.Command.Group,
|
|
1797
1963
|
{
|
|
1798
1964
|
ref,
|
|
1799
|
-
className: cn(
|
|
1965
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1800
1966
|
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
1801
1967
|
className
|
|
1802
1968
|
),
|
|
@@ -1808,7 +1974,7 @@ var CommandSeparator = React2__namespace.forwardRef(({ className, ...props }, re
|
|
|
1808
1974
|
cmdk.Command.Separator,
|
|
1809
1975
|
{
|
|
1810
1976
|
ref,
|
|
1811
|
-
className: cn("-mx-1 h-px bg-border", className),
|
|
1977
|
+
className: chunkRZQACYNQ_cjs.cn("-mx-1 h-px bg-border", className),
|
|
1812
1978
|
...props
|
|
1813
1979
|
}
|
|
1814
1980
|
));
|
|
@@ -1817,8 +1983,8 @@ var CommandItem = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1817
1983
|
cmdk.Command.Item,
|
|
1818
1984
|
{
|
|
1819
1985
|
ref,
|
|
1820
|
-
className: cn(
|
|
1821
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1986
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1987
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 pointer-coarse:min-h-11 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1822
1988
|
className
|
|
1823
1989
|
),
|
|
1824
1990
|
...props
|
|
@@ -1829,7 +1995,7 @@ var CommandShortcut = ({ className, ...props }) => {
|
|
|
1829
1995
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1830
1996
|
"span",
|
|
1831
1997
|
{
|
|
1832
|
-
className: cn("ml-auto text-sm tracking-widest text-muted-foreground", className),
|
|
1998
|
+
className: chunkRZQACYNQ_cjs.cn("ml-auto text-sm tracking-widest text-muted-foreground", className),
|
|
1833
1999
|
...props
|
|
1834
2000
|
}
|
|
1835
2001
|
);
|
|
@@ -1891,7 +2057,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1891
2057
|
const shapeClass = shape === "pill" ? "rounded-full" : "rounded-md";
|
|
1892
2058
|
const sizeClasses2 = size === "base" ? "gap-1.5 px-1.5 py-0.5" : "gap-1 px-1";
|
|
1893
2059
|
const textSizeClass = size === "base" ? "text-base" : "text-sm";
|
|
1894
|
-
const baseClasses = cn(
|
|
2060
|
+
const baseClasses = chunkRZQACYNQ_cjs.cn(
|
|
1895
2061
|
"group/pill items-center",
|
|
1896
2062
|
fullWidth ? "flex w-full" : "inline-flex",
|
|
1897
2063
|
sizeClasses2,
|
|
@@ -1901,7 +2067,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1901
2067
|
"transition-all",
|
|
1902
2068
|
className
|
|
1903
2069
|
);
|
|
1904
|
-
const interactiveClasses = "cursor-pointer hover:bg-muted/80";
|
|
2070
|
+
const interactiveClasses = "relative cursor-pointer hover:bg-muted/80 pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']";
|
|
1905
2071
|
const disabledClasses = "cursor-default opacity-60";
|
|
1906
2072
|
const highlightClasses = "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground";
|
|
1907
2073
|
const mainContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1921,7 +2087,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1921
2087
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
2088
|
"span",
|
|
1923
2089
|
{
|
|
1924
|
-
className: cn(
|
|
2090
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
1925
2091
|
textSizeClass,
|
|
1926
2092
|
"font-medium truncate leading-tight min-w-0",
|
|
1927
2093
|
labelMaxWidth,
|
|
@@ -1944,7 +2110,11 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1944
2110
|
),
|
|
1945
2111
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side, className: "p-2", children: tip })
|
|
1946
2112
|
] });
|
|
1947
|
-
const mainAreaClass = cn("inline-flex items-center gap-1", fullWidth && "min-w-0 flex-1");
|
|
2113
|
+
const mainAreaClass = chunkRZQACYNQ_cjs.cn("inline-flex items-center gap-1", fullWidth && "min-w-0 flex-1");
|
|
2114
|
+
const mainAreaTouchClass = chunkRZQACYNQ_cjs.cn(
|
|
2115
|
+
mainAreaClass,
|
|
2116
|
+
(onClick || href) && !disabled && "relative pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']"
|
|
2117
|
+
);
|
|
1948
2118
|
if (onMoreClick || moreContent) {
|
|
1949
2119
|
let mainArea;
|
|
1950
2120
|
if (tooltipContent) {
|
|
@@ -1952,7 +2122,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1952
2122
|
mainContent,
|
|
1953
2123
|
tooltipContent,
|
|
1954
2124
|
tooltipSide,
|
|
1955
|
-
cn(
|
|
2125
|
+
chunkRZQACYNQ_cjs.cn(mainAreaTouchClass, disabled && "opacity-60"),
|
|
1956
2126
|
{
|
|
1957
2127
|
type: "button",
|
|
1958
2128
|
onClick: href ? onClick : disabled ? void 0 : onClick,
|
|
@@ -1966,7 +2136,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1966
2136
|
href,
|
|
1967
2137
|
target: "_blank",
|
|
1968
2138
|
rel: "noopener noreferrer",
|
|
1969
|
-
className:
|
|
2139
|
+
className: mainAreaTouchClass,
|
|
1970
2140
|
onClick,
|
|
1971
2141
|
children: mainContent
|
|
1972
2142
|
}
|
|
@@ -1978,12 +2148,15 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
1978
2148
|
type: "button",
|
|
1979
2149
|
onClick: disabled ? void 0 : onClick,
|
|
1980
2150
|
disabled,
|
|
1981
|
-
className: cn(
|
|
2151
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2152
|
+
"relative inline-flex items-center gap-1 pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']",
|
|
2153
|
+
disabled && "opacity-60"
|
|
2154
|
+
),
|
|
1982
2155
|
children: mainContent
|
|
1983
2156
|
}
|
|
1984
2157
|
);
|
|
1985
2158
|
} else {
|
|
1986
|
-
mainArea = /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2159
|
+
mainArea = /* @__PURE__ */ jsxRuntime.jsx("span", { className: mainAreaTouchClass, children: mainContent });
|
|
1987
2160
|
}
|
|
1988
2161
|
const moreArea = moreContent ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 leading-none", children: moreContent }) : tooltipWrap(
|
|
1989
2162
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, { className: "w-3.5 h-3.5" }),
|
|
@@ -2002,9 +2175,9 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
2002
2175
|
"span",
|
|
2003
2176
|
{
|
|
2004
2177
|
ref,
|
|
2005
|
-
className: cn(
|
|
2178
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2006
2179
|
baseClasses,
|
|
2007
|
-
(onClick || href) && !disabled &&
|
|
2180
|
+
(onClick || href) && !disabled && "cursor-pointer hover:bg-muted/80",
|
|
2008
2181
|
highlight && highlightClasses
|
|
2009
2182
|
),
|
|
2010
2183
|
"data-testid": testId,
|
|
@@ -2031,7 +2204,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
2031
2204
|
),
|
|
2032
2205
|
tooltipContent,
|
|
2033
2206
|
tooltipSide,
|
|
2034
|
-
cn(baseClasses, interactiveClasses),
|
|
2207
|
+
chunkRZQACYNQ_cjs.cn(baseClasses, interactiveClasses),
|
|
2035
2208
|
{ "data-testid": testId }
|
|
2036
2209
|
);
|
|
2037
2210
|
}
|
|
@@ -2039,7 +2212,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
2039
2212
|
mainContent,
|
|
2040
2213
|
tooltipContent,
|
|
2041
2214
|
tooltipSide,
|
|
2042
|
-
cn(
|
|
2215
|
+
chunkRZQACYNQ_cjs.cn(
|
|
2043
2216
|
baseClasses,
|
|
2044
2217
|
onClick && !disabled ? interactiveClasses : "",
|
|
2045
2218
|
disabled ? disabledClasses : "",
|
|
@@ -2062,7 +2235,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
2062
2235
|
href,
|
|
2063
2236
|
target: "_blank",
|
|
2064
2237
|
rel: "noopener noreferrer",
|
|
2065
|
-
className: cn(baseClasses, interactiveClasses),
|
|
2238
|
+
className: chunkRZQACYNQ_cjs.cn(baseClasses, interactiveClasses),
|
|
2066
2239
|
"data-testid": testId,
|
|
2067
2240
|
onClick,
|
|
2068
2241
|
children: mainContent
|
|
@@ -2077,7 +2250,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
2077
2250
|
type: "button",
|
|
2078
2251
|
onClick: disabled ? void 0 : onClick,
|
|
2079
2252
|
disabled,
|
|
2080
|
-
className: cn(
|
|
2253
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2081
2254
|
baseClasses,
|
|
2082
2255
|
disabled ? disabledClasses : interactiveClasses,
|
|
2083
2256
|
highlight && highlightClasses
|
|
@@ -2091,7 +2264,7 @@ var EntityPill = React2.forwardRef(function EntityPill2({
|
|
|
2091
2264
|
"span",
|
|
2092
2265
|
{
|
|
2093
2266
|
ref,
|
|
2094
|
-
className: cn(baseClasses, highlight && highlightClasses),
|
|
2267
|
+
className: chunkRZQACYNQ_cjs.cn(baseClasses, highlight && highlightClasses),
|
|
2095
2268
|
"data-testid": testId,
|
|
2096
2269
|
children: mainContent
|
|
2097
2270
|
}
|
|
@@ -2211,6 +2384,79 @@ function TagEntity({
|
|
|
2211
2384
|
}
|
|
2212
2385
|
);
|
|
2213
2386
|
}
|
|
2387
|
+
var TIERS = [
|
|
2388
|
+
{ min: 0.7, tone: "bg-emerald-500", label: "High relevance" },
|
|
2389
|
+
{ min: 0.4, tone: "bg-amber-500", label: "Medium relevance" },
|
|
2390
|
+
{ min: -Infinity, tone: "bg-muted-foreground/40", label: "Low relevance" }
|
|
2391
|
+
];
|
|
2392
|
+
function RelevanceDot({ score }) {
|
|
2393
|
+
if (score == null) return null;
|
|
2394
|
+
const tier = TIERS.find((t) => score >= t.min) ?? TIERS[TIERS.length - 1];
|
|
2395
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2396
|
+
"span",
|
|
2397
|
+
{
|
|
2398
|
+
role: "img",
|
|
2399
|
+
"aria-label": tier.label,
|
|
2400
|
+
title: `${tier.label} (${score.toFixed(2)})`,
|
|
2401
|
+
className: chunkRZQACYNQ_cjs.cn("size-1.5 shrink-0 rounded-full", tier.tone),
|
|
2402
|
+
"data-testid": "passage-relevance"
|
|
2403
|
+
}
|
|
2404
|
+
);
|
|
2405
|
+
}
|
|
2406
|
+
function PassageCard({
|
|
2407
|
+
header,
|
|
2408
|
+
score,
|
|
2409
|
+
headerRight,
|
|
2410
|
+
active,
|
|
2411
|
+
onClick,
|
|
2412
|
+
footer,
|
|
2413
|
+
className,
|
|
2414
|
+
children,
|
|
2415
|
+
"data-testid": testId
|
|
2416
|
+
}) {
|
|
2417
|
+
const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2418
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
|
|
2419
|
+
header,
|
|
2420
|
+
(score != null || headerRight) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
2421
|
+
/* @__PURE__ */ jsxRuntime.jsx(RelevanceDot, { score }),
|
|
2422
|
+
headerRight
|
|
2423
|
+
] })
|
|
2424
|
+
] }),
|
|
2425
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "[&_mark]:rounded-sm [&_mark]:bg-ai-accent/20 [&_mark]:px-0.5 [&_mark]:font-medium [&_mark]:text-foreground", children })
|
|
2426
|
+
] });
|
|
2427
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2428
|
+
"div",
|
|
2429
|
+
{
|
|
2430
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2431
|
+
"group rounded-lg border border-border bg-card p-3 text-left transition-colors",
|
|
2432
|
+
onClick && "hover:border-ai-accent/40 focus-within:ring-2 focus-within:ring-ai-accent/40",
|
|
2433
|
+
active && "border-ai-accent/60 ring-1 ring-ai-accent/30",
|
|
2434
|
+
className
|
|
2435
|
+
),
|
|
2436
|
+
children: [
|
|
2437
|
+
onClick ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2438
|
+
"div",
|
|
2439
|
+
{
|
|
2440
|
+
role: "button",
|
|
2441
|
+
tabIndex: 0,
|
|
2442
|
+
onClick,
|
|
2443
|
+
onKeyDown: (e) => {
|
|
2444
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
2445
|
+
e.preventDefault();
|
|
2446
|
+
onClick(e);
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
"aria-current": active || void 0,
|
|
2450
|
+
"data-testid": testId,
|
|
2451
|
+
className: "cursor-pointer focus:outline-none",
|
|
2452
|
+
children: body
|
|
2453
|
+
}
|
|
2454
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-current": active || void 0, "data-testid": testId, children: body }),
|
|
2455
|
+
footer
|
|
2456
|
+
]
|
|
2457
|
+
}
|
|
2458
|
+
);
|
|
2459
|
+
}
|
|
2214
2460
|
|
|
2215
2461
|
// src/icons/colors.ts
|
|
2216
2462
|
var NEUTRAL_GRAY = "#64748b";
|
|
@@ -2565,7 +2811,8 @@ function DocumentEntity({
|
|
|
2565
2811
|
tooltipContent,
|
|
2566
2812
|
className,
|
|
2567
2813
|
fullWidth,
|
|
2568
|
-
noClamp
|
|
2814
|
+
noClamp,
|
|
2815
|
+
"data-testid": testId
|
|
2569
2816
|
}) {
|
|
2570
2817
|
const title = getDocumentTitle(doc);
|
|
2571
2818
|
const ext = doc.file_name?.split(".").pop()?.toLowerCase();
|
|
@@ -2573,7 +2820,7 @@ function DocumentEntity({
|
|
|
2573
2820
|
const eyeSizeClass = size === "base" ? "h-4 w-4" : "h-3.5 w-3.5";
|
|
2574
2821
|
const baseIcon = icon ?? getDocIcon(doc.file_name, iconSize);
|
|
2575
2822
|
const displayIcon = viewing || iconBadge ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex flex-shrink-0 items-center justify-center", children: [
|
|
2576
|
-
viewing ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: cn("text-primary-foreground", eyeSizeClass) }) : baseIcon,
|
|
2823
|
+
viewing ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: chunkRZQACYNQ_cjs.cn("text-primary-foreground", eyeSizeClass) }) : baseIcon,
|
|
2577
2824
|
iconBadge
|
|
2578
2825
|
] }) : baseIcon;
|
|
2579
2826
|
const defaultTooltip = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 text-xs max-w-[440px]", children: [
|
|
@@ -2606,6 +2853,7 @@ function DocumentEntity({
|
|
|
2606
2853
|
moreContent: actions,
|
|
2607
2854
|
className,
|
|
2608
2855
|
highlight: viewing,
|
|
2856
|
+
"data-testid": testId,
|
|
2609
2857
|
tooltipContent: tooltipContent ?? defaultTooltip
|
|
2610
2858
|
}
|
|
2611
2859
|
);
|
|
@@ -2652,7 +2900,7 @@ function ProjectEntity({
|
|
|
2652
2900
|
const variant = resolveVariant(relation, paid, hasCollaborators);
|
|
2653
2901
|
const { pill, icon: iconClass } = VARIANT_STYLES[variant];
|
|
2654
2902
|
const iconSizeClass = size === "base" ? "h-4 w-4" : "h-3.5 w-3.5";
|
|
2655
|
-
const iconNode = icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: cn(iconSizeClass, iconClass) });
|
|
2903
|
+
const iconNode = icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: chunkRZQACYNQ_cjs.cn(iconSizeClass, iconClass) });
|
|
2656
2904
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2657
2905
|
EntityPill,
|
|
2658
2906
|
{
|
|
@@ -2660,7 +2908,7 @@ function ProjectEntity({
|
|
|
2660
2908
|
label: label ?? name,
|
|
2661
2909
|
size,
|
|
2662
2910
|
shape: "rounded",
|
|
2663
|
-
className: cn(pill, className),
|
|
2911
|
+
className: chunkRZQACYNQ_cjs.cn(pill, className),
|
|
2664
2912
|
onClick,
|
|
2665
2913
|
tooltipContent
|
|
2666
2914
|
}
|
|
@@ -2728,7 +2976,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2728
2976
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2729
2977
|
Avatar,
|
|
2730
2978
|
{
|
|
2731
|
-
className: cn(sizeClasses[size], "border border-border", className),
|
|
2979
|
+
className: chunkRZQACYNQ_cjs.cn(sizeClasses[size], "border border-border", className),
|
|
2732
2980
|
"data-testid": "user-entity",
|
|
2733
2981
|
children: /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "bg-status-empty text-muted-foreground text-xs font-semibold", children: "?" })
|
|
2734
2982
|
}
|
|
@@ -2741,7 +2989,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2741
2989
|
const avatarCore = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2742
2990
|
Avatar,
|
|
2743
2991
|
{
|
|
2744
|
-
className: cn(
|
|
2992
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2745
2993
|
sizeClasses[size],
|
|
2746
2994
|
isAgent ? "rounded-full border-2 border-dashed" : "border border-white"
|
|
2747
2995
|
),
|
|
@@ -2752,7 +3000,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2752
3000
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2753
3001
|
AvatarFallback,
|
|
2754
3002
|
{
|
|
2755
|
-
className: cn(
|
|
3003
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2756
3004
|
textSizeClasses[size],
|
|
2757
3005
|
"font-semibold leading-none",
|
|
2758
3006
|
isAgent ? "rounded-full bg-transparent" : `text-white ${colorClass}`
|
|
@@ -2767,7 +3015,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2767
3015
|
const statusDot = showUnread || displayStatus ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2768
3016
|
"span",
|
|
2769
3017
|
{
|
|
2770
|
-
className: cn(
|
|
3018
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2771
3019
|
"absolute rounded-full border-white",
|
|
2772
3020
|
presenceDotClasses[size],
|
|
2773
3021
|
presencePositionClasses[size],
|
|
@@ -2783,7 +3031,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2783
3031
|
const avatarElement = statusDot ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2784
3032
|
"div",
|
|
2785
3033
|
{
|
|
2786
|
-
className: cn(
|
|
3034
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2787
3035
|
"relative inline-block",
|
|
2788
3036
|
sizeClasses[size],
|
|
2789
3037
|
variant === "pill" ? "" : className
|
|
@@ -2793,12 +3041,12 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2793
3041
|
statusDot
|
|
2794
3042
|
]
|
|
2795
3043
|
}
|
|
2796
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-block", variant === "pill" ? "" : className), children: avatarCore });
|
|
3044
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkRZQACYNQ_cjs.cn("inline-block", variant === "pill" ? "" : className), children: avatarCore });
|
|
2797
3045
|
const pillAvatar = (
|
|
2798
3046
|
// shrink-0: when the pill is squeezed the NAME truncates away — the avatar
|
|
2799
3047
|
// must never collapse under it and overflow onto neighbouring text.
|
|
2800
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("relative inline-block shrink-0", sizeClasses[size]), children: [
|
|
2801
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("block transition-opacity", canMessage && "group-hover/pill:opacity-0"), children: avatarCore }),
|
|
3048
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunkRZQACYNQ_cjs.cn("relative inline-block shrink-0", sizeClasses[size]), children: [
|
|
3049
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkRZQACYNQ_cjs.cn("block transition-opacity", canMessage && "group-hover/pill:opacity-0"), children: avatarCore }),
|
|
2802
3050
|
canMessage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2803
3051
|
"span",
|
|
2804
3052
|
{
|
|
@@ -2819,7 +3067,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2819
3067
|
] });
|
|
2820
3068
|
const rowClass = "group/pill inline-flex min-w-0 items-center gap-2";
|
|
2821
3069
|
const clickable = interactive && !!onClick;
|
|
2822
|
-
const clickableClass = "cursor-pointer rounded-md px-1 py-0.5 -mx-1 transition-colors hover:bg-muted/60";
|
|
3070
|
+
const clickableClass = "relative cursor-pointer rounded-md px-1 py-0.5 -mx-1 transition-colors hover:bg-muted/60 pointer-coarse:after:absolute pointer-coarse:after:inset-x-0 pointer-coarse:after:-inset-y-3 pointer-coarse:after:content-['']";
|
|
2823
3071
|
if (resolvedTooltip) {
|
|
2824
3072
|
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
2825
3073
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2828,7 +3076,7 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2828
3076
|
type: "button",
|
|
2829
3077
|
onClick: clickable ? onClick : void 0,
|
|
2830
3078
|
onFocusCapture: (e) => e.stopPropagation(),
|
|
2831
|
-
className: cn(rowClass, clickable && clickableClass, className),
|
|
3079
|
+
className: chunkRZQACYNQ_cjs.cn(rowClass, clickable && clickableClass, className),
|
|
2832
3080
|
"data-testid": "user-entity-pill",
|
|
2833
3081
|
children: row
|
|
2834
3082
|
}
|
|
@@ -2842,17 +3090,24 @@ var UserEntity = React2.memo(function UserEntity2({
|
|
|
2842
3090
|
{
|
|
2843
3091
|
type: "button",
|
|
2844
3092
|
onClick,
|
|
2845
|
-
className: cn(rowClass, clickableClass, className),
|
|
3093
|
+
className: chunkRZQACYNQ_cjs.cn(rowClass, clickableClass, className),
|
|
2846
3094
|
"data-testid": "user-entity-pill",
|
|
2847
3095
|
children: row
|
|
2848
3096
|
}
|
|
2849
3097
|
);
|
|
2850
3098
|
}
|
|
2851
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(rowClass, className), "data-testid": "user-entity-pill", children: row });
|
|
3099
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkRZQACYNQ_cjs.cn(rowClass, className), "data-testid": "user-entity-pill", children: row });
|
|
2852
3100
|
}
|
|
2853
3101
|
if (showTooltip) {
|
|
2854
3102
|
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
2855
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3103
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3104
|
+
TooltipTrigger,
|
|
3105
|
+
{
|
|
3106
|
+
onFocusCapture: (e) => e.stopPropagation(),
|
|
3107
|
+
className: "touch-hit inline-flex",
|
|
3108
|
+
children: avatarElement
|
|
3109
|
+
}
|
|
3110
|
+
),
|
|
2856
3111
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "p-2", children: tooltipContent })
|
|
2857
3112
|
] });
|
|
2858
3113
|
}
|
|
@@ -2863,9 +3118,9 @@ function AgentBadge({ className }) {
|
|
|
2863
3118
|
"span",
|
|
2864
3119
|
{
|
|
2865
3120
|
"data-testid": "agent-badge",
|
|
2866
|
-
className: cn(
|
|
3121
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2867
3122
|
"inline-flex shrink-0 items-center gap-1 rounded-full border border-ai-accent/50",
|
|
2868
|
-
"bg-ai-accent-soft px-2 py-0.5 text-
|
|
3123
|
+
"bg-ai-accent-soft px-2 py-0.5 text-xs font-bold uppercase tracking-wider text-ai-accent",
|
|
2869
3124
|
className
|
|
2870
3125
|
),
|
|
2871
3126
|
children: [
|
|
@@ -2894,12 +3149,12 @@ function PresenceLabel({
|
|
|
2894
3149
|
"span",
|
|
2895
3150
|
{
|
|
2896
3151
|
"data-testid": "presence-label",
|
|
2897
|
-
className: cn("inline-flex shrink-0 items-center gap-1 text-xs", className),
|
|
3152
|
+
className: chunkRZQACYNQ_cjs.cn("inline-flex shrink-0 items-center gap-1 text-xs", className),
|
|
2898
3153
|
children: [
|
|
2899
3154
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2900
3155
|
"span",
|
|
2901
3156
|
{
|
|
2902
|
-
className: cn(
|
|
3157
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
2903
3158
|
"size-1.5 rounded-full",
|
|
2904
3159
|
online ? "bg-status-online" : "bg-muted-foreground/50"
|
|
2905
3160
|
),
|
|
@@ -2951,8 +3206,8 @@ function RagDot({
|
|
|
2951
3206
|
className
|
|
2952
3207
|
}) {
|
|
2953
3208
|
const color = rag === "red" ? "bg-destructive" : rag === "amber" ? "bg-warning" : "bg-success";
|
|
2954
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("inline-flex items-center gap-1.5", className), "data-testid": `rag-${rag}`, children: [
|
|
2955
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("size-2 rounded-full", color) }),
|
|
3209
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunkRZQACYNQ_cjs.cn("inline-flex items-center gap-1.5", className), "data-testid": `rag-${rag}`, children: [
|
|
3210
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkRZQACYNQ_cjs.cn("size-2 rounded-full", color) }),
|
|
2956
3211
|
withLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: RAG_LABELS[rag] })
|
|
2957
3212
|
] });
|
|
2958
3213
|
}
|
|
@@ -3279,6 +3534,389 @@ var getWorkspaceColor = (workspaceId, useWorkspaceColors) => {
|
|
|
3279
3534
|
if (!isValidId) return "hsl(var(--primary))";
|
|
3280
3535
|
return getEntityColor2(workspaceId, "medium");
|
|
3281
3536
|
};
|
|
3537
|
+
function nameInitials(name) {
|
|
3538
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
3539
|
+
if (!parts.length) return "?";
|
|
3540
|
+
return parts.slice(0, 2).map((p) => p[0]?.toUpperCase() ?? "").join("");
|
|
3541
|
+
}
|
|
3542
|
+
var STATUS_DOT = {
|
|
3543
|
+
online: "bg-emerald-500",
|
|
3544
|
+
busy: "bg-amber-500",
|
|
3545
|
+
offline: "bg-destructive"
|
|
3546
|
+
};
|
|
3547
|
+
function UserMenu({
|
|
3548
|
+
user,
|
|
3549
|
+
status,
|
|
3550
|
+
items = [],
|
|
3551
|
+
onLogout,
|
|
3552
|
+
logoutLabel = "Sign out",
|
|
3553
|
+
align = "end",
|
|
3554
|
+
side = "bottom",
|
|
3555
|
+
variant = "avatar",
|
|
3556
|
+
showChevron = true,
|
|
3557
|
+
classNames,
|
|
3558
|
+
testId = "user-menu",
|
|
3559
|
+
logoutTestId
|
|
3560
|
+
}) {
|
|
3561
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkRZQACYNQ_cjs.DropdownMenu, { children: [
|
|
3562
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRZQACYNQ_cjs.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3563
|
+
"button",
|
|
3564
|
+
{
|
|
3565
|
+
type: "button",
|
|
3566
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3567
|
+
"flex items-center gap-2 rounded-md transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3568
|
+
variant === "account" ? "w-full min-w-0 p-1 text-left pointer-coarse:min-h-11" : "px-1.5 py-1 pointer-coarse:min-h-11 pointer-coarse:min-w-11 pointer-coarse:justify-center",
|
|
3569
|
+
classNames?.trigger
|
|
3570
|
+
),
|
|
3571
|
+
"data-testid": testId,
|
|
3572
|
+
"data-variant": variant,
|
|
3573
|
+
"aria-label": variant === "avatar" ? "Account menu" : void 0,
|
|
3574
|
+
title: variant === "avatar" ? user.name : void 0,
|
|
3575
|
+
children: [
|
|
3576
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative", children: [
|
|
3577
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-8", children: [
|
|
3578
|
+
user.picture ? /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: user.picture, alt: user.name }) : null,
|
|
3579
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3580
|
+
AvatarFallback,
|
|
3581
|
+
{
|
|
3582
|
+
className: chunkRZQACYNQ_cjs.cn("bg-primary text-primary-foreground", classNames?.fallback),
|
|
3583
|
+
children: nameInitials(user.name)
|
|
3584
|
+
}
|
|
3585
|
+
)
|
|
3586
|
+
] }),
|
|
3587
|
+
status && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3588
|
+
"span",
|
|
3589
|
+
{
|
|
3590
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3591
|
+
"absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border-2 border-background",
|
|
3592
|
+
STATUS_DOT[status.tone]
|
|
3593
|
+
),
|
|
3594
|
+
title: status.detail ? `${status.label} \xB7 ${status.detail}` : status.label,
|
|
3595
|
+
"data-testid": status.testId ? `${status.testId}-dot` : void 0
|
|
3596
|
+
}
|
|
3597
|
+
)
|
|
3598
|
+
] }),
|
|
3599
|
+
variant === "account" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3600
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-foreground", children: user.name }),
|
|
3601
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "mr-1 size-4 shrink-0 text-muted-foreground" })
|
|
3602
|
+
] }) : showChevron && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4 text-muted-foreground" })
|
|
3603
|
+
]
|
|
3604
|
+
}
|
|
3605
|
+
) }),
|
|
3606
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3607
|
+
chunkRZQACYNQ_cjs.DropdownMenuContent,
|
|
3608
|
+
{
|
|
3609
|
+
align,
|
|
3610
|
+
side,
|
|
3611
|
+
sideOffset: 8,
|
|
3612
|
+
collisionPadding: 12,
|
|
3613
|
+
className: "w-60 rounded-lg border-border/60 shadow-lg",
|
|
3614
|
+
"data-testid": "user-menu-panel",
|
|
3615
|
+
"data-topbar-popover": "",
|
|
3616
|
+
children: [
|
|
3617
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkRZQACYNQ_cjs.DropdownMenuLabel, { className: "relative pr-8 pointer-coarse:pr-12", children: [
|
|
3618
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3619
|
+
chunkRZQACYNQ_cjs.DropdownMenuItem,
|
|
3620
|
+
{
|
|
3621
|
+
className: "absolute right-1 top-1 flex size-6 items-center justify-center rounded-md p-0 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus:bg-accent pointer-coarse:right-0 pointer-coarse:top-0 pointer-coarse:size-11",
|
|
3622
|
+
"aria-label": "Close account menu",
|
|
3623
|
+
"data-testid": "user-menu-close",
|
|
3624
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3.5" })
|
|
3625
|
+
}
|
|
3626
|
+
),
|
|
3627
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-medium text-foreground", title: user.name, children: user.name }),
|
|
3628
|
+
user.email && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-xs font-normal text-muted-foreground", title: user.email, children: user.email }),
|
|
3629
|
+
status && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3630
|
+
"div",
|
|
3631
|
+
{
|
|
3632
|
+
className: "mt-1 text-xs font-normal text-muted-foreground",
|
|
3633
|
+
"data-testid": status.testId,
|
|
3634
|
+
children: [
|
|
3635
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
3636
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkRZQACYNQ_cjs.cn("size-2 shrink-0 rounded-full", STATUS_DOT[status.tone]) }),
|
|
3637
|
+
status.label
|
|
3638
|
+
] }),
|
|
3639
|
+
status.detail && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 truncate pl-3.5 text-xs leading-tight text-muted-foreground/70", children: status.detail })
|
|
3640
|
+
]
|
|
3641
|
+
}
|
|
3642
|
+
)
|
|
3643
|
+
] }),
|
|
3644
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRZQACYNQ_cjs.DropdownMenuSeparator, {}),
|
|
3645
|
+
items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React2.Fragment, { children: [
|
|
3646
|
+
item.separatorBefore && /* @__PURE__ */ jsxRuntime.jsx(chunkRZQACYNQ_cjs.DropdownMenuSeparator, {}),
|
|
3647
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3648
|
+
chunkRZQACYNQ_cjs.DropdownMenuItem,
|
|
3649
|
+
{
|
|
3650
|
+
onClick: item.onSelect,
|
|
3651
|
+
"data-testid": item.testId,
|
|
3652
|
+
className: "pointer-coarse:min-h-11",
|
|
3653
|
+
...item.checked !== void 0 ? { role: "menuitemcheckbox", "aria-checked": item.checked } : {},
|
|
3654
|
+
children: [
|
|
3655
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative flex shrink-0", children: [
|
|
3656
|
+
/* @__PURE__ */ jsxRuntime.jsx(item.icon, { className: "size-4" }),
|
|
3657
|
+
item.dot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3658
|
+
"span",
|
|
3659
|
+
{
|
|
3660
|
+
className: "absolute -right-0.5 -top-0.5 size-2 rounded-full bg-primary ring-2 ring-popover",
|
|
3661
|
+
"aria-hidden": true
|
|
3662
|
+
}
|
|
3663
|
+
)
|
|
3664
|
+
] }),
|
|
3665
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
|
|
3666
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-muted px-1.5 text-xs font-medium tabular-nums text-muted-foreground", children: item.badge }),
|
|
3667
|
+
item.checked !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3668
|
+
"span",
|
|
3669
|
+
{
|
|
3670
|
+
"aria-hidden": true,
|
|
3671
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3672
|
+
"flex h-4 w-7 shrink-0 items-center rounded-full p-0.5 transition-colors",
|
|
3673
|
+
item.checked ? "bg-primary" : "bg-border"
|
|
3674
|
+
),
|
|
3675
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3676
|
+
"span",
|
|
3677
|
+
{
|
|
3678
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3679
|
+
"size-3 rounded-full bg-background transition-transform",
|
|
3680
|
+
item.checked && "translate-x-3"
|
|
3681
|
+
)
|
|
3682
|
+
}
|
|
3683
|
+
)
|
|
3684
|
+
}
|
|
3685
|
+
)
|
|
3686
|
+
]
|
|
3687
|
+
}
|
|
3688
|
+
)
|
|
3689
|
+
] }, item.label)),
|
|
3690
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRZQACYNQ_cjs.DropdownMenuSeparator, {}),
|
|
3691
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3692
|
+
chunkRZQACYNQ_cjs.DropdownMenuItem,
|
|
3693
|
+
{
|
|
3694
|
+
onClick: onLogout,
|
|
3695
|
+
"data-testid": logoutTestId ?? `${testId}-logout`,
|
|
3696
|
+
className: "pointer-coarse:min-h-11",
|
|
3697
|
+
children: [
|
|
3698
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "size-4" }),
|
|
3699
|
+
logoutLabel
|
|
3700
|
+
]
|
|
3701
|
+
}
|
|
3702
|
+
)
|
|
3703
|
+
]
|
|
3704
|
+
}
|
|
3705
|
+
)
|
|
3706
|
+
] });
|
|
3707
|
+
}
|
|
3708
|
+
var ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
3709
|
+
"queued",
|
|
3710
|
+
"processing",
|
|
3711
|
+
"parsing",
|
|
3712
|
+
"encrypting",
|
|
3713
|
+
"indexing",
|
|
3714
|
+
"analysing"
|
|
3715
|
+
]);
|
|
3716
|
+
var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "skipped", "empty", "low-content"]);
|
|
3717
|
+
var STATUS_LABEL = {
|
|
3718
|
+
queued: "Queued",
|
|
3719
|
+
processing: "Processing",
|
|
3720
|
+
parsing: "Parsing",
|
|
3721
|
+
encrypting: "Encrypting",
|
|
3722
|
+
indexing: "Indexing",
|
|
3723
|
+
analysing: "Analysing"
|
|
3724
|
+
};
|
|
3725
|
+
var IMAGE_EXTENSIONS2 = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "bmp", "tiff", "tif", "webp"]);
|
|
3726
|
+
var VIDEO_EXTENSIONS2 = /* @__PURE__ */ new Set(["mp4", "mpeg", "mpg", "webm", "mov", "avi", "mkv"]);
|
|
3727
|
+
var AUDIO_EXTENSIONS2 = /* @__PURE__ */ new Set(["mp3", "wav", "m4a", "aac", "ogg", "flac"]);
|
|
3728
|
+
var EMAIL_EXTENSIONS2 = /* @__PURE__ */ new Set(["eml", "msg"]);
|
|
3729
|
+
function fileIcon(fileName, size) {
|
|
3730
|
+
const ext = fileName?.split(".").pop()?.toLowerCase();
|
|
3731
|
+
if (ext && VIDEO_EXTENSIONS2.has(ext)) return /* @__PURE__ */ jsxRuntime.jsx(VidIcon, { size });
|
|
3732
|
+
if (ext && AUDIO_EXTENSIONS2.has(ext)) return /* @__PURE__ */ jsxRuntime.jsx(AudIcon, { size });
|
|
3733
|
+
if (ext && IMAGE_EXTENSIONS2.has(ext)) return /* @__PURE__ */ jsxRuntime.jsx(ImgIcon, { size });
|
|
3734
|
+
if (ext && EMAIL_EXTENSIONS2.has(ext)) return /* @__PURE__ */ jsxRuntime.jsx(EmlIcon, { size });
|
|
3735
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PdfIcon, { size });
|
|
3736
|
+
}
|
|
3737
|
+
function RenameField({
|
|
3738
|
+
seed,
|
|
3739
|
+
onCommit,
|
|
3740
|
+
onCancel,
|
|
3741
|
+
testId
|
|
3742
|
+
}) {
|
|
3743
|
+
const done = React2__namespace.default.useRef(false);
|
|
3744
|
+
const commit = (value) => {
|
|
3745
|
+
if (done.current) return;
|
|
3746
|
+
done.current = true;
|
|
3747
|
+
const trimmed = value.trim();
|
|
3748
|
+
if (trimmed && trimmed !== seed) onCommit(trimmed);
|
|
3749
|
+
else onCancel();
|
|
3750
|
+
};
|
|
3751
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3752
|
+
"input",
|
|
3753
|
+
{
|
|
3754
|
+
autoFocus: true,
|
|
3755
|
+
defaultValue: seed,
|
|
3756
|
+
"data-testid": testId,
|
|
3757
|
+
onFocus: (e) => e.currentTarget.select(),
|
|
3758
|
+
onClick: (e) => e.stopPropagation(),
|
|
3759
|
+
onKeyDown: (e) => {
|
|
3760
|
+
if (e.key === "Enter") {
|
|
3761
|
+
e.preventDefault();
|
|
3762
|
+
commit(e.currentTarget.value);
|
|
3763
|
+
} else if (e.key === "Escape") {
|
|
3764
|
+
e.preventDefault();
|
|
3765
|
+
done.current = true;
|
|
3766
|
+
onCancel();
|
|
3767
|
+
}
|
|
3768
|
+
},
|
|
3769
|
+
onBlur: (e) => commit(e.currentTarget.value),
|
|
3770
|
+
className: "w-full rounded border border-primary bg-background px-1 py-0.5 text-xs text-foreground outline-none"
|
|
3771
|
+
}
|
|
3772
|
+
);
|
|
3773
|
+
}
|
|
3774
|
+
function StatusMarker({ status, testId }) {
|
|
3775
|
+
let icon = null;
|
|
3776
|
+
let title = "";
|
|
3777
|
+
switch (status) {
|
|
3778
|
+
case "completed":
|
|
3779
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "size-4 text-success", strokeWidth: 2.75 });
|
|
3780
|
+
title = "Ready";
|
|
3781
|
+
break;
|
|
3782
|
+
case "failed":
|
|
3783
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "size-4 text-destructive", strokeWidth: 2.75 });
|
|
3784
|
+
title = "Failed";
|
|
3785
|
+
break;
|
|
3786
|
+
case "skipped":
|
|
3787
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SkipForward, { className: "size-4 text-muted-foreground", strokeWidth: 2.75 });
|
|
3788
|
+
title = "Skipped";
|
|
3789
|
+
break;
|
|
3790
|
+
case "empty":
|
|
3791
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileX, { className: "size-4 text-warning", strokeWidth: 2.75 });
|
|
3792
|
+
title = "Empty \u2014 no extractable content";
|
|
3793
|
+
break;
|
|
3794
|
+
case "low-content":
|
|
3795
|
+
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-4 text-warning", strokeWidth: 2.75 });
|
|
3796
|
+
title = "Low content \u2014 minimal extractable content";
|
|
3797
|
+
break;
|
|
3798
|
+
default:
|
|
3799
|
+
return null;
|
|
3800
|
+
}
|
|
3801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3802
|
+
"span",
|
|
3803
|
+
{
|
|
3804
|
+
title,
|
|
3805
|
+
"data-testid": testId,
|
|
3806
|
+
className: "flex size-6 items-center justify-center rounded-full bg-background shadow-sm",
|
|
3807
|
+
children: icon
|
|
3808
|
+
}
|
|
3809
|
+
);
|
|
3810
|
+
}
|
|
3811
|
+
function DocumentCard({
|
|
3812
|
+
doc,
|
|
3813
|
+
thumbnailUrl,
|
|
3814
|
+
status,
|
|
3815
|
+
selected = false,
|
|
3816
|
+
onToggleSelect,
|
|
3817
|
+
viewing = false,
|
|
3818
|
+
onOpen,
|
|
3819
|
+
actions,
|
|
3820
|
+
renaming = false,
|
|
3821
|
+
onCommitRename,
|
|
3822
|
+
onCancelRename,
|
|
3823
|
+
tooltipContent,
|
|
3824
|
+
marker,
|
|
3825
|
+
testId = "document-card",
|
|
3826
|
+
className
|
|
3827
|
+
}) {
|
|
3828
|
+
const normalised = (status ?? "").toLowerCase();
|
|
3829
|
+
const isProcessing = ACTIVE_STATUSES.has(normalised);
|
|
3830
|
+
const showStatusMarker = !isProcessing && TERMINAL_STATUSES.has(normalised);
|
|
3831
|
+
const [thumbFailed, setThumbFailed] = React2__namespace.default.useState(false);
|
|
3832
|
+
const [thumbLandscape, setThumbLandscape] = React2__namespace.default.useState(false);
|
|
3833
|
+
const showThumbnail = !!thumbnailUrl && !thumbFailed && !isProcessing;
|
|
3834
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3835
|
+
"div",
|
|
3836
|
+
{
|
|
3837
|
+
"data-testid": testId,
|
|
3838
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3839
|
+
// Square corners and a portrait-page aspect (height = 1.3 × width), so a
|
|
3840
|
+
// cover-page thumbnail reads edge-to-edge.
|
|
3841
|
+
"group relative aspect-[10/13] select-none overflow-hidden border bg-muted/20 transition",
|
|
3842
|
+
selected ? "border-primary bg-primary/10" : "border-border shadow-sm hover:border-border/80 hover:bg-muted/50",
|
|
3843
|
+
className
|
|
3844
|
+
),
|
|
3845
|
+
children: [
|
|
3846
|
+
showThumbnail ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3847
|
+
"img",
|
|
3848
|
+
{
|
|
3849
|
+
src: thumbnailUrl,
|
|
3850
|
+
alt: "",
|
|
3851
|
+
loading: "lazy",
|
|
3852
|
+
draggable: false,
|
|
3853
|
+
onError: () => setThumbFailed(true),
|
|
3854
|
+
onLoad: (e) => setThumbLandscape(e.currentTarget.naturalWidth > e.currentTarget.naturalHeight),
|
|
3855
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3856
|
+
"absolute inset-0 size-full bg-white",
|
|
3857
|
+
thumbLandscape ? "object-contain" : "object-cover object-top"
|
|
3858
|
+
)
|
|
3859
|
+
}
|
|
3860
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center text-muted-foreground", children: fileIcon(doc.file_name, 44) }),
|
|
3861
|
+
isProcessing && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3862
|
+
"div",
|
|
3863
|
+
{
|
|
3864
|
+
"data-testid": `${testId}-processing`,
|
|
3865
|
+
className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-1.5 bg-background/80 px-3",
|
|
3866
|
+
children: [
|
|
3867
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-sm bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-1/3 animate-pulse rounded-sm bg-primary" }) }),
|
|
3868
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-primary", children: STATUS_LABEL[normalised] ?? normalised })
|
|
3869
|
+
]
|
|
3870
|
+
}
|
|
3871
|
+
),
|
|
3872
|
+
onToggleSelect && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3873
|
+
Checkbox,
|
|
3874
|
+
{
|
|
3875
|
+
checked: selected,
|
|
3876
|
+
onCheckedChange: () => onToggleSelect(),
|
|
3877
|
+
onClick: (e) => e.stopPropagation(),
|
|
3878
|
+
"aria-label": selected ? "Deselect" : "Select",
|
|
3879
|
+
"data-testid": `${testId}-select`,
|
|
3880
|
+
className: chunkRZQACYNQ_cjs.cn(
|
|
3881
|
+
"absolute left-1.5 top-1.5 z-20 size-6 rounded-none border-muted-foreground/60 bg-background shadow-sm transition",
|
|
3882
|
+
selected ? "opacity-100" : "opacity-40 group-hover:opacity-100"
|
|
3883
|
+
)
|
|
3884
|
+
}
|
|
3885
|
+
),
|
|
3886
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-1.5 top-1.5 z-20", children: actions }),
|
|
3887
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-x-1.5 bottom-1.5 z-20 flex flex-col gap-1", children: [
|
|
3888
|
+
(marker || showStatusMarker) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
3889
|
+
marker,
|
|
3890
|
+
showStatusMarker && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex", children: /* @__PURE__ */ jsxRuntime.jsx(StatusMarker, { status: normalised, testId: `${testId}-status` }) })
|
|
3891
|
+
] }),
|
|
3892
|
+
renaming ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3893
|
+
RenameField,
|
|
3894
|
+
{
|
|
3895
|
+
seed: doc.doc_metadata?.title || doc.file_name || "",
|
|
3896
|
+
onCommit: (name) => onCommitRename?.(name),
|
|
3897
|
+
onCancel: () => onCancelRename?.(),
|
|
3898
|
+
testId: `${testId}-rename-input`
|
|
3899
|
+
}
|
|
3900
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3901
|
+
DocumentEntity,
|
|
3902
|
+
{
|
|
3903
|
+
doc,
|
|
3904
|
+
fullWidth: true,
|
|
3905
|
+
viewing,
|
|
3906
|
+
tooltipContent,
|
|
3907
|
+
labelClassName: "font-semibold",
|
|
3908
|
+
className: "w-full min-w-0 max-w-full bg-background/90 backdrop-blur-sm",
|
|
3909
|
+
onClick: (e) => {
|
|
3910
|
+
e.stopPropagation();
|
|
3911
|
+
onOpen?.();
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
)
|
|
3915
|
+
] })
|
|
3916
|
+
]
|
|
3917
|
+
}
|
|
3918
|
+
);
|
|
3919
|
+
}
|
|
3282
3920
|
|
|
3283
3921
|
exports.AgentBadge = AgentBadge;
|
|
3284
3922
|
exports.AiMarkdown = AiMarkdown;
|
|
@@ -3320,22 +3958,8 @@ exports.DialogPortal = DialogPortal;
|
|
|
3320
3958
|
exports.DialogTitle = DialogTitle;
|
|
3321
3959
|
exports.DialogTrigger = DialogTrigger;
|
|
3322
3960
|
exports.DictateProvider = DictateProvider;
|
|
3961
|
+
exports.DocumentCard = DocumentCard;
|
|
3323
3962
|
exports.DocumentEntity = DocumentEntity;
|
|
3324
|
-
exports.DropdownMenu = DropdownMenu;
|
|
3325
|
-
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
3326
|
-
exports.DropdownMenuContent = DropdownMenuContent;
|
|
3327
|
-
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
3328
|
-
exports.DropdownMenuItem = DropdownMenuItem;
|
|
3329
|
-
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
3330
|
-
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
3331
|
-
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
3332
|
-
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
3333
|
-
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
3334
|
-
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
3335
|
-
exports.DropdownMenuSub = DropdownMenuSub;
|
|
3336
|
-
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
3337
|
-
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
3338
|
-
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
3339
3963
|
exports.ENTITY_MAPPINGS = ENTITY_MAPPINGS;
|
|
3340
3964
|
exports.EmlIcon = EmlIcon;
|
|
3341
3965
|
exports.EntityIcon = EntityIcon;
|
|
@@ -3349,12 +3973,14 @@ exports.ImgIcon = ImgIcon;
|
|
|
3349
3973
|
exports.InlineMicButton = InlineMicButton;
|
|
3350
3974
|
exports.Input = Input;
|
|
3351
3975
|
exports.Label = Label;
|
|
3976
|
+
exports.MarkMenu = MarkMenu;
|
|
3352
3977
|
exports.MarkdownRenderer = MarkdownRenderer;
|
|
3353
3978
|
exports.MarkdownStreamingContext = MarkdownStreamingContext;
|
|
3354
3979
|
exports.MicRecordingOverlay = MicRecordingOverlay;
|
|
3355
3980
|
exports.MicWaveformIndicator = MicWaveformIndicator;
|
|
3356
3981
|
exports.NEUTRAL_GRAY = NEUTRAL_GRAY2;
|
|
3357
3982
|
exports.PLACEHOLDER_COLOR = PLACEHOLDER_COLOR;
|
|
3983
|
+
exports.PassageCard = PassageCard;
|
|
3358
3984
|
exports.PdfIcon = PdfIcon;
|
|
3359
3985
|
exports.Popover = Popover;
|
|
3360
3986
|
exports.PopoverAnchor = PopoverAnchor;
|
|
@@ -3366,8 +3992,7 @@ exports.ProjectEntity = ProjectEntity;
|
|
|
3366
3992
|
exports.RadioGroup = RadioGroup;
|
|
3367
3993
|
exports.RadioGroupItem = RadioGroupItem;
|
|
3368
3994
|
exports.RagDot = RagDot;
|
|
3369
|
-
exports.
|
|
3370
|
-
exports.ScrollBar = ScrollBar;
|
|
3995
|
+
exports.RelevanceDot = RelevanceDot;
|
|
3371
3996
|
exports.Select = Select;
|
|
3372
3997
|
exports.SelectContent = SelectContent;
|
|
3373
3998
|
exports.SelectGroup = SelectGroup;
|
|
@@ -3406,6 +4031,7 @@ exports.TooltipContent = TooltipContent;
|
|
|
3406
4031
|
exports.TooltipProvider = TooltipProvider;
|
|
3407
4032
|
exports.TooltipTrigger = TooltipTrigger;
|
|
3408
4033
|
exports.UserEntity = UserEntity;
|
|
4034
|
+
exports.UserMenu = UserMenu;
|
|
3409
4035
|
exports.VISIBILITY_ICONS = VISIBILITY_ICONS;
|
|
3410
4036
|
exports.VidIcon = VidIcon;
|
|
3411
4037
|
exports.VisibilityIcon = VisibilityIcon;
|
|
@@ -3413,7 +4039,6 @@ exports.badgeVariants = badgeVariants;
|
|
|
3413
4039
|
exports.buttonVariants = buttonVariants;
|
|
3414
4040
|
exports.cardVariants = cardVariants;
|
|
3415
4041
|
exports.classifyMediaError = classifyMediaError;
|
|
3416
|
-
exports.cn = cn;
|
|
3417
4042
|
exports.configureEntityRegistry = configureEntityRegistry;
|
|
3418
4043
|
exports.configureRagLabels = configureRagLabels;
|
|
3419
4044
|
exports.configureStatusRegistry = configureStatusRegistry;
|
|
@@ -3431,5 +4056,5 @@ exports.markdownBaseComponents = markdownBaseComponents;
|
|
|
3431
4056
|
exports.splitMarkdownBlocks = splitMarkdownBlocks;
|
|
3432
4057
|
exports.toggleVariants = toggleVariants;
|
|
3433
4058
|
exports.useAudioRecorder = useAudioRecorder;
|
|
3434
|
-
//# sourceMappingURL=chunk-
|
|
3435
|
-
//# sourceMappingURL=chunk-
|
|
4059
|
+
//# sourceMappingURL=chunk-OU2QLIKS.cjs.map
|
|
4060
|
+
//# sourceMappingURL=chunk-OU2QLIKS.cjs.map
|