@tutti-os/ui-system 0.0.188 → 0.0.190
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-45TFBBVS.js → chunk-S74ESIMT.js} +636 -444
- package/dist/chunk-S74ESIMT.js.map +1 -0
- package/dist/components/index.d.ts +36 -1
- package/dist/components/index.js +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/metadata/components.json +20 -0
- package/dist/metadata/index.js +20 -0
- package/dist/metadata/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-45TFBBVS.js.map +0 -1
|
@@ -314,12 +314,310 @@ function Checkbox({
|
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
// src/components/
|
|
317
|
+
// src/components/combobox/combobox.tsx
|
|
318
|
+
import * as React4 from "react";
|
|
319
|
+
|
|
320
|
+
// src/components/input/input.tsx
|
|
321
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
322
|
+
var inputVariantClassNames = {
|
|
323
|
+
default: "h-8 rounded-md px-3 py-0 text-[13px] leading-[1.3]",
|
|
324
|
+
lg: "h-12 rounded-[8px] px-4 py-3 text-[15px] leading-[1.3]",
|
|
325
|
+
md: "h-8 rounded-md px-3 py-0 text-[13px] leading-[1.3]",
|
|
326
|
+
sm: "h-8 rounded-md px-3 py-0 text-[13px] leading-[1.3]",
|
|
327
|
+
otp: "h-12 w-12 rounded-[4px] px-0 text-center text-xl font-medium sm:h-14 sm:w-14 sm:text-2xl"
|
|
328
|
+
};
|
|
329
|
+
function Input({
|
|
330
|
+
className,
|
|
331
|
+
size = "default",
|
|
332
|
+
type,
|
|
333
|
+
variant,
|
|
334
|
+
...props
|
|
335
|
+
}) {
|
|
336
|
+
const resolvedVariant = variant ?? (size === "sm" ? "sm" : "default");
|
|
337
|
+
return /* @__PURE__ */ jsx6(
|
|
338
|
+
"input",
|
|
339
|
+
{
|
|
340
|
+
type,
|
|
341
|
+
"data-slot": "input",
|
|
342
|
+
"data-size": size,
|
|
343
|
+
"data-variant": resolvedVariant,
|
|
344
|
+
className: cn(
|
|
345
|
+
"w-full min-w-0 appearance-none border-0 bg-[var(--transparency-block)] font-normal text-[var(--text-primary)] shadow-none transition-colors duration-200 outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-[13px] file:font-medium file:text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] hover:bg-[var(--transparency-hover)] focus:bg-[var(--transparency-hover)] focus-visible:border-0 focus-visible:bg-[var(--transparency-hover)] focus-visible:ring-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-[var(--transparency-block)] disabled:text-[var(--text-disabled)] disabled:opacity-100 aria-invalid:border-0 aria-invalid:bg-[var(--transparency-block)] aria-invalid:hover:bg-[var(--transparency-hover)] aria-invalid:focus:bg-[var(--transparency-hover)] aria-invalid:focus-visible:bg-[var(--transparency-hover)] aria-invalid:ring-0 aria-invalid:shadow-none",
|
|
346
|
+
inputVariantClassNames[resolvedVariant],
|
|
347
|
+
!variant && size === "sm" && "h-7 rounded-[4px] px-2 text-[11px]",
|
|
348
|
+
className
|
|
349
|
+
),
|
|
350
|
+
...props
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// src/components/menu-surface/menu-surface.tsx
|
|
318
356
|
import * as React3 from "react";
|
|
357
|
+
import { Slot as Slot4 } from "radix-ui";
|
|
358
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
359
|
+
var menuSurfaceClassName = "t-dropdown flex flex-col gap-0.5 rounded-[8px] border border-[var(--border-1)] bg-[var(--background-fronted)] p-1 text-[13px] text-[var(--text-primary)] shadow-panel outline-none";
|
|
360
|
+
var menuItemClassName = "relative flex cursor-pointer items-center gap-1.5 rounded-sm px-2 py-1 text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 select-none hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus:bg-[var(--transparency-hover)] focus:text-[var(--text-primary)] data-[highlighted]:bg-[var(--transparency-hover)] data-[highlighted]:text-[var(--text-primary)] data-disabled:pointer-events-none data-disabled:text-[var(--text-disabled)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:min-w-0 *:[span]:last:flex-1 *:[span]:last:items-center *:[span]:last:gap-2";
|
|
361
|
+
var menuItemWithIndicatorClassName = `${menuItemClassName} pr-8`;
|
|
362
|
+
var menuItemIndicatorClassName = "pointer-events-none absolute right-2 flex size-4 items-center justify-center text-[var(--tutti-purple)]";
|
|
363
|
+
var MenuSurface = React3.forwardRef(
|
|
364
|
+
({
|
|
365
|
+
asChild = false,
|
|
366
|
+
className,
|
|
367
|
+
"data-state": dataState,
|
|
368
|
+
state = "open",
|
|
369
|
+
...props
|
|
370
|
+
}, ref) => {
|
|
371
|
+
const Comp = asChild ? Slot4.Root : "div";
|
|
372
|
+
return /* @__PURE__ */ jsx7(
|
|
373
|
+
Comp,
|
|
374
|
+
{
|
|
375
|
+
...props,
|
|
376
|
+
ref,
|
|
377
|
+
className: cn(menuSurfaceClassName, className),
|
|
378
|
+
"data-state": dataState ?? state
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
MenuSurface.displayName = "MenuSurface";
|
|
384
|
+
|
|
385
|
+
// src/components/popover/popover.tsx
|
|
386
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
387
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
388
|
+
function Popover({
|
|
389
|
+
...props
|
|
390
|
+
}) {
|
|
391
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
392
|
+
}
|
|
393
|
+
function PopoverTrigger({
|
|
394
|
+
...props
|
|
395
|
+
}) {
|
|
396
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
397
|
+
}
|
|
398
|
+
function PopoverPortal({
|
|
399
|
+
...props
|
|
400
|
+
}) {
|
|
401
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Portal, { "data-slot": "popover-portal", ...props });
|
|
402
|
+
}
|
|
403
|
+
function PopoverClose({
|
|
404
|
+
...props
|
|
405
|
+
}) {
|
|
406
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Close, { "data-slot": "popover-close", ...props });
|
|
407
|
+
}
|
|
408
|
+
function PopoverContent({
|
|
409
|
+
className,
|
|
410
|
+
align = "center",
|
|
411
|
+
sideOffset = 4,
|
|
412
|
+
...props
|
|
413
|
+
}) {
|
|
414
|
+
return /* @__PURE__ */ jsx8(PopoverPortal, { children: /* @__PURE__ */ jsx8(
|
|
415
|
+
PopoverPrimitive.Content,
|
|
416
|
+
{
|
|
417
|
+
"data-slot": "popover-content",
|
|
418
|
+
align,
|
|
419
|
+
sideOffset,
|
|
420
|
+
className: cn(
|
|
421
|
+
"t-dropdown z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg border border-[var(--border-1)] bg-[var(--background-fronted)] p-3 text-[13px] text-popover-foreground shadow-soft outline-hidden",
|
|
422
|
+
className
|
|
423
|
+
),
|
|
424
|
+
style: { zIndex: "var(--z-popover)" },
|
|
425
|
+
...props
|
|
426
|
+
}
|
|
427
|
+
) });
|
|
428
|
+
}
|
|
429
|
+
function PopoverAnchor({
|
|
430
|
+
...props
|
|
431
|
+
}) {
|
|
432
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// src/components/combobox/combobox.tsx
|
|
436
|
+
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
437
|
+
var comboboxItemClassName = "relative flex w-full cursor-pointer scroll-my-1 flex-col items-start gap-0.5 rounded-sm px-2 py-1 pr-8 text-left text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 select-none data-[active=true]:bg-[var(--transparency-hover)] data-disabled:pointer-events-none data-disabled:text-[var(--text-disabled)]";
|
|
438
|
+
function comboboxOptionMatches(option, query) {
|
|
439
|
+
if (!query) {
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
return [option.label, option.value, ...option.keywords ?? []].some(
|
|
443
|
+
(candidate) => candidate.toLocaleLowerCase().includes(query)
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
function Combobox({
|
|
447
|
+
align = "start",
|
|
448
|
+
allowCustomValue = false,
|
|
449
|
+
"aria-label": ariaLabel,
|
|
450
|
+
className,
|
|
451
|
+
contentClassName,
|
|
452
|
+
contentStyle,
|
|
453
|
+
customValueLabel,
|
|
454
|
+
disabled = false,
|
|
455
|
+
emptyMessage,
|
|
456
|
+
onValueChange,
|
|
457
|
+
options,
|
|
458
|
+
placeholder,
|
|
459
|
+
searchPlaceholder,
|
|
460
|
+
value
|
|
461
|
+
}) {
|
|
462
|
+
const [open, setOpen] = React4.useState(false);
|
|
463
|
+
const [query, setQuery] = React4.useState("");
|
|
464
|
+
const [activeIndex, setActiveIndex] = React4.useState(0);
|
|
465
|
+
const listboxID = React4.useId();
|
|
466
|
+
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
467
|
+
const visibleOptions = options.filter(
|
|
468
|
+
(option) => comboboxOptionMatches(option, normalizedQuery)
|
|
469
|
+
);
|
|
470
|
+
const customValue = allowCustomValue && query.trim() && !options.some((option) => option.value === query.trim()) ? query.trim() : null;
|
|
471
|
+
const rows = customValue ? [...visibleOptions, { label: customValue, value: customValue }] : visibleOptions;
|
|
472
|
+
const clampedActiveIndex = Math.min(
|
|
473
|
+
activeIndex,
|
|
474
|
+
Math.max(rows.length - 1, 0)
|
|
475
|
+
);
|
|
476
|
+
const selectedOption = options.find((option) => option.value === value);
|
|
477
|
+
const triggerLabel = selectedOption?.label ?? value;
|
|
478
|
+
const commit = (row) => {
|
|
479
|
+
if (row.disabled) {
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
onValueChange(row.value);
|
|
483
|
+
setOpen(false);
|
|
484
|
+
};
|
|
485
|
+
const onOpenChange = (nextOpen) => {
|
|
486
|
+
setOpen(nextOpen);
|
|
487
|
+
setQuery("");
|
|
488
|
+
setActiveIndex(0);
|
|
489
|
+
};
|
|
490
|
+
const onSearchKeyDown = (event) => {
|
|
491
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
492
|
+
event.preventDefault();
|
|
493
|
+
if (rows.length === 0) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
const delta = event.key === "ArrowDown" ? 1 : -1;
|
|
497
|
+
setActiveIndex((rows.length + clampedActiveIndex + delta) % rows.length);
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (event.key === "Home" || event.key === "End") {
|
|
501
|
+
event.preventDefault();
|
|
502
|
+
setActiveIndex(event.key === "Home" ? 0 : Math.max(rows.length - 1, 0));
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
if (event.key === "Enter") {
|
|
506
|
+
event.preventDefault();
|
|
507
|
+
const row = rows[clampedActiveIndex];
|
|
508
|
+
if (row) {
|
|
509
|
+
commit(row);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
return /* @__PURE__ */ jsxs2(Popover, { open, onOpenChange, children: [
|
|
514
|
+
/* @__PURE__ */ jsx9(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
|
|
515
|
+
"button",
|
|
516
|
+
{
|
|
517
|
+
"aria-label": ariaLabel,
|
|
518
|
+
className: cn(
|
|
519
|
+
"flex h-8 w-full min-w-0 cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-transparent bg-[var(--transparency-block)] py-2 pr-2 pl-2.5 text-[13px] text-[var(--text-primary)] transition-colors outline-none select-none hover:bg-[var(--transparency-hover)] focus:bg-[var(--transparency-hover)] focus-visible:bg-[var(--transparency-hover)] disabled:cursor-not-allowed disabled:bg-[var(--transparency-block)] disabled:text-[var(--text-disabled)]",
|
|
520
|
+
"[&[data-state=open]>svg]:rotate-180 [&>svg]:transition-transform [&>svg]:duration-200",
|
|
521
|
+
className
|
|
522
|
+
),
|
|
523
|
+
"data-slot": "combobox-trigger",
|
|
524
|
+
disabled,
|
|
525
|
+
type: "button",
|
|
526
|
+
children: [
|
|
527
|
+
/* @__PURE__ */ jsx9(
|
|
528
|
+
"span",
|
|
529
|
+
{
|
|
530
|
+
className: cn(
|
|
531
|
+
"min-w-0 flex-1 truncate text-left",
|
|
532
|
+
!triggerLabel && "text-[var(--text-placeholder)]"
|
|
533
|
+
),
|
|
534
|
+
children: triggerLabel || placeholder
|
|
535
|
+
}
|
|
536
|
+
),
|
|
537
|
+
/* @__PURE__ */ jsx9(ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-current" })
|
|
538
|
+
]
|
|
539
|
+
}
|
|
540
|
+
) }),
|
|
541
|
+
/* @__PURE__ */ jsxs2(
|
|
542
|
+
PopoverContent,
|
|
543
|
+
{
|
|
544
|
+
align,
|
|
545
|
+
className: cn(
|
|
546
|
+
"w-[var(--radix-popover-trigger-width)] min-w-44 gap-0 p-1",
|
|
547
|
+
contentClassName
|
|
548
|
+
),
|
|
549
|
+
"data-slot": "combobox-content",
|
|
550
|
+
style: contentStyle,
|
|
551
|
+
onOpenAutoFocus: (event) => {
|
|
552
|
+
event.preventDefault();
|
|
553
|
+
},
|
|
554
|
+
children: [
|
|
555
|
+
/* @__PURE__ */ jsx9(
|
|
556
|
+
Input,
|
|
557
|
+
{
|
|
558
|
+
"aria-activedescendant": rows[clampedActiveIndex] ? `${listboxID}-${clampedActiveIndex}` : void 0,
|
|
559
|
+
"aria-autocomplete": "list",
|
|
560
|
+
"aria-controls": listboxID,
|
|
561
|
+
"aria-expanded": true,
|
|
562
|
+
autoFocus: true,
|
|
563
|
+
className: "shrink-0",
|
|
564
|
+
"data-slot": "combobox-search",
|
|
565
|
+
placeholder: searchPlaceholder,
|
|
566
|
+
role: "combobox",
|
|
567
|
+
value: query,
|
|
568
|
+
onChange: (event) => {
|
|
569
|
+
setQuery(event.currentTarget.value);
|
|
570
|
+
setActiveIndex(0);
|
|
571
|
+
},
|
|
572
|
+
onKeyDown: onSearchKeyDown
|
|
573
|
+
}
|
|
574
|
+
),
|
|
575
|
+
/* @__PURE__ */ jsx9(
|
|
576
|
+
"div",
|
|
577
|
+
{
|
|
578
|
+
className: "mt-1 flex max-h-56 flex-col gap-0.5 overflow-y-auto overscroll-contain",
|
|
579
|
+
"data-slot": "combobox-listbox",
|
|
580
|
+
id: listboxID,
|
|
581
|
+
role: "listbox",
|
|
582
|
+
children: rows.length === 0 ? /* @__PURE__ */ jsx9("span", { className: "px-2 py-1.5 text-[12px] text-[var(--text-tertiary)]", children: emptyMessage }) : rows.map((row, index) => {
|
|
583
|
+
const isCustomRow = customValue !== null && index === rows.length - 1;
|
|
584
|
+
return /* @__PURE__ */ jsxs2(
|
|
585
|
+
"button",
|
|
586
|
+
{
|
|
587
|
+
"aria-selected": row.value === value,
|
|
588
|
+
className: comboboxItemClassName,
|
|
589
|
+
"data-active": index === clampedActiveIndex,
|
|
590
|
+
"data-disabled": row.disabled ? "" : void 0,
|
|
591
|
+
"data-slot": "combobox-item",
|
|
592
|
+
id: `${listboxID}-${index}`,
|
|
593
|
+
role: "option",
|
|
594
|
+
tabIndex: -1,
|
|
595
|
+
type: "button",
|
|
596
|
+
onClick: () => commit(row),
|
|
597
|
+
onPointerMove: () => setActiveIndex(index),
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ jsx9("span", { className: "w-full truncate pr-2", children: isCustomRow ? customValueLabel?.(row.value) ?? row.label : row.label }),
|
|
600
|
+
row.description ? /* @__PURE__ */ jsx9("span", { className: "w-full truncate pr-2 text-[11px] text-[var(--text-tertiary)]", children: row.description }) : null,
|
|
601
|
+
row.value === value ? /* @__PURE__ */ jsx9("span", { className: menuItemIndicatorClassName, children: /* @__PURE__ */ jsx9(CheckIcon, { className: "pointer-events-none" }) }) : null
|
|
602
|
+
]
|
|
603
|
+
},
|
|
604
|
+
`${row.value}:${isCustomRow ? "custom" : "option"}`
|
|
605
|
+
);
|
|
606
|
+
})
|
|
607
|
+
}
|
|
608
|
+
)
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
)
|
|
612
|
+
] });
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// src/components/dialog/dialog.tsx
|
|
616
|
+
import * as React5 from "react";
|
|
319
617
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
320
|
-
import { Fragment, jsx as
|
|
618
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
321
619
|
var dialogCloseDurationMs = 150;
|
|
322
|
-
var DialogMotionContext =
|
|
620
|
+
var DialogMotionContext = React5.createContext({
|
|
323
621
|
open: false
|
|
324
622
|
});
|
|
325
623
|
function Dialog({
|
|
@@ -328,11 +626,11 @@ function Dialog({
|
|
|
328
626
|
open,
|
|
329
627
|
...props
|
|
330
628
|
}) {
|
|
331
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
629
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React5.useState(
|
|
332
630
|
defaultOpen ?? false
|
|
333
631
|
);
|
|
334
632
|
const currentOpen = open ?? uncontrolledOpen;
|
|
335
|
-
const handleOpenChange =
|
|
633
|
+
const handleOpenChange = React5.useCallback(
|
|
336
634
|
(nextOpen) => {
|
|
337
635
|
if (open === void 0) {
|
|
338
636
|
setUncontrolledOpen(nextOpen);
|
|
@@ -341,7 +639,7 @@ function Dialog({
|
|
|
341
639
|
},
|
|
342
640
|
[onOpenChange, open]
|
|
343
641
|
);
|
|
344
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ jsx10(DialogMotionContext.Provider, { value: { open: currentOpen }, children: /* @__PURE__ */ jsx10(
|
|
345
643
|
DialogPrimitive.Root,
|
|
346
644
|
{
|
|
347
645
|
"data-slot": "dialog",
|
|
@@ -354,24 +652,24 @@ function Dialog({
|
|
|
354
652
|
function DialogTrigger({
|
|
355
653
|
...props
|
|
356
654
|
}) {
|
|
357
|
-
return /* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ jsx10(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
358
656
|
}
|
|
359
657
|
function DialogPortal({
|
|
360
658
|
...props
|
|
361
659
|
}) {
|
|
362
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ jsx10(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
363
661
|
}
|
|
364
662
|
function DialogClose({
|
|
365
663
|
...props
|
|
366
664
|
}) {
|
|
367
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ jsx10(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
368
666
|
}
|
|
369
667
|
function DialogOverlay({
|
|
370
668
|
className,
|
|
371
669
|
style,
|
|
372
670
|
...props
|
|
373
671
|
}) {
|
|
374
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ jsx10(
|
|
375
673
|
DialogPrimitive.Overlay,
|
|
376
674
|
{
|
|
377
675
|
"data-slot": "dialog-overlay",
|
|
@@ -393,9 +691,9 @@ function DialogContent({
|
|
|
393
691
|
style,
|
|
394
692
|
...props
|
|
395
693
|
}) {
|
|
396
|
-
const { open } =
|
|
397
|
-
const [mounted, setMounted] =
|
|
398
|
-
|
|
694
|
+
const { open } = React5.useContext(DialogMotionContext);
|
|
695
|
+
const [mounted, setMounted] = React5.useState(open);
|
|
696
|
+
React5.useEffect(() => {
|
|
399
697
|
if (open) {
|
|
400
698
|
setMounted(true);
|
|
401
699
|
return void 0;
|
|
@@ -410,9 +708,9 @@ function DialogContent({
|
|
|
410
708
|
if (!mounted) {
|
|
411
709
|
return null;
|
|
412
710
|
}
|
|
413
|
-
const content = /* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
711
|
+
const content = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
712
|
+
/* @__PURE__ */ jsx10(DialogOverlay, { className: overlayClassName, forceMount: true }),
|
|
713
|
+
/* @__PURE__ */ jsxs3(
|
|
416
714
|
DialogPrimitive.Content,
|
|
417
715
|
{
|
|
418
716
|
"data-slot": "dialog-content",
|
|
@@ -426,15 +724,15 @@ function DialogContent({
|
|
|
426
724
|
...props,
|
|
427
725
|
children: [
|
|
428
726
|
children,
|
|
429
|
-
showCloseButton && /* @__PURE__ */
|
|
727
|
+
showCloseButton && /* @__PURE__ */ jsx10(DialogPrimitive.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs3(
|
|
430
728
|
Button,
|
|
431
729
|
{
|
|
432
730
|
variant: "ghost",
|
|
433
731
|
className: "absolute top-3 right-3",
|
|
434
732
|
size: "icon-sm",
|
|
435
733
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ jsx10(CloseIcon, {}),
|
|
735
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Close" })
|
|
438
736
|
]
|
|
439
737
|
}
|
|
440
738
|
) })
|
|
@@ -445,10 +743,10 @@ function DialogContent({
|
|
|
445
743
|
if (!portaled) {
|
|
446
744
|
return content;
|
|
447
745
|
}
|
|
448
|
-
return /* @__PURE__ */
|
|
746
|
+
return /* @__PURE__ */ jsx10(DialogPortal, { forceMount: true, children: content });
|
|
449
747
|
}
|
|
450
748
|
function DialogHeader({ className, ...props }) {
|
|
451
|
-
return /* @__PURE__ */
|
|
749
|
+
return /* @__PURE__ */ jsx10(
|
|
452
750
|
"div",
|
|
453
751
|
{
|
|
454
752
|
"data-slot": "dialog-header",
|
|
@@ -463,7 +761,7 @@ function DialogFooter({
|
|
|
463
761
|
children,
|
|
464
762
|
...props
|
|
465
763
|
}) {
|
|
466
|
-
return /* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ jsxs3(
|
|
467
765
|
"div",
|
|
468
766
|
{
|
|
469
767
|
"data-slot": "dialog-footer",
|
|
@@ -474,7 +772,7 @@ function DialogFooter({
|
|
|
474
772
|
...props,
|
|
475
773
|
children: [
|
|
476
774
|
children,
|
|
477
|
-
showCloseButton && /* @__PURE__ */
|
|
775
|
+
showCloseButton && /* @__PURE__ */ jsx10(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx10(Button, { variant: "ghost", size: "dialog", children: "Close" }) })
|
|
478
776
|
]
|
|
479
777
|
}
|
|
480
778
|
);
|
|
@@ -483,7 +781,7 @@ function DialogTitle({
|
|
|
483
781
|
className,
|
|
484
782
|
...props
|
|
485
783
|
}) {
|
|
486
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ jsx10(
|
|
487
785
|
DialogPrimitive.Title,
|
|
488
786
|
{
|
|
489
787
|
"data-slot": "dialog-title",
|
|
@@ -499,7 +797,7 @@ function DialogDescription({
|
|
|
499
797
|
className,
|
|
500
798
|
...props
|
|
501
799
|
}) {
|
|
502
|
-
return /* @__PURE__ */
|
|
800
|
+
return /* @__PURE__ */ jsx10(
|
|
503
801
|
DialogPrimitive.Description,
|
|
504
802
|
{
|
|
505
803
|
"data-slot": "dialog-description",
|
|
@@ -513,7 +811,7 @@ function DialogDescription({
|
|
|
513
811
|
}
|
|
514
812
|
|
|
515
813
|
// src/components/confirmation-dialog/confirmation-dialog.tsx
|
|
516
|
-
import { jsx as
|
|
814
|
+
import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
517
815
|
function confirmToneClassName(tone) {
|
|
518
816
|
if (tone === "destructive") {
|
|
519
817
|
return "shadow-none";
|
|
@@ -541,7 +839,7 @@ function ConfirmationDialog({
|
|
|
541
839
|
title
|
|
542
840
|
}) {
|
|
543
841
|
const isCloseDisabled = disableCloseWhileBusy && confirmBusy;
|
|
544
|
-
return /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ jsx11(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs4(
|
|
545
843
|
DialogContent,
|
|
546
844
|
{
|
|
547
845
|
className: cn(
|
|
@@ -562,13 +860,13 @@ function ConfirmationDialog({
|
|
|
562
860
|
}
|
|
563
861
|
},
|
|
564
862
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
/* @__PURE__ */
|
|
567
|
-
description ? /* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ jsxs4(DialogHeader, { children: [
|
|
864
|
+
/* @__PURE__ */ jsx11(DialogTitle, { children: title }),
|
|
865
|
+
description ? /* @__PURE__ */ jsx11(DialogDescription, { children: description }) : null
|
|
568
866
|
] }),
|
|
569
|
-
children ? /* @__PURE__ */
|
|
570
|
-
footer ?? /* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
867
|
+
children ? /* @__PURE__ */ jsx11("div", { className: "text-[13px] leading-[1.3] text-text-secondary", children }) : null,
|
|
868
|
+
footer ?? /* @__PURE__ */ jsxs4(DialogFooter, { children: [
|
|
869
|
+
/* @__PURE__ */ jsx11(
|
|
572
870
|
Button,
|
|
573
871
|
{
|
|
574
872
|
disabled: confirmBusy,
|
|
@@ -582,7 +880,7 @@ function ConfirmationDialog({
|
|
|
582
880
|
children: cancelLabel
|
|
583
881
|
}
|
|
584
882
|
),
|
|
585
|
-
hideConfirmButton ? null : /* @__PURE__ */
|
|
883
|
+
hideConfirmButton ? null : /* @__PURE__ */ jsx11(
|
|
586
884
|
Button,
|
|
587
885
|
{
|
|
588
886
|
disabled: confirmBusy || confirmDisabled,
|
|
@@ -604,48 +902,16 @@ function ConfirmationDialog({
|
|
|
604
902
|
|
|
605
903
|
// src/components/context-menu/context-menu.tsx
|
|
606
904
|
import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
|
|
607
|
-
|
|
608
|
-
// src/components/menu-surface/menu-surface.tsx
|
|
609
|
-
import * as React4 from "react";
|
|
610
|
-
import { Slot as Slot4 } from "radix-ui";
|
|
611
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
612
|
-
var menuSurfaceClassName = "t-dropdown flex flex-col gap-0.5 rounded-[8px] border border-[var(--border-1)] bg-[var(--background-fronted)] p-1 text-[13px] text-[var(--text-primary)] shadow-panel outline-none";
|
|
613
|
-
var menuItemClassName = "relative flex cursor-pointer items-center gap-1.5 rounded-sm px-2 py-1 text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 select-none hover:bg-[var(--transparency-hover)] hover:text-[var(--text-primary)] focus:bg-[var(--transparency-hover)] focus:text-[var(--text-primary)] data-[highlighted]:bg-[var(--transparency-hover)] data-[highlighted]:text-[var(--text-primary)] data-disabled:pointer-events-none data-disabled:text-[var(--text-disabled)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:min-w-0 *:[span]:last:flex-1 *:[span]:last:items-center *:[span]:last:gap-2";
|
|
614
|
-
var menuItemWithIndicatorClassName = `${menuItemClassName} pr-8`;
|
|
615
|
-
var menuItemIndicatorClassName = "pointer-events-none absolute right-2 flex size-4 items-center justify-center text-[var(--tutti-purple)]";
|
|
616
|
-
var MenuSurface = React4.forwardRef(
|
|
617
|
-
({
|
|
618
|
-
asChild = false,
|
|
619
|
-
className,
|
|
620
|
-
"data-state": dataState,
|
|
621
|
-
state = "open",
|
|
622
|
-
...props
|
|
623
|
-
}, ref) => {
|
|
624
|
-
const Comp = asChild ? Slot4.Root : "div";
|
|
625
|
-
return /* @__PURE__ */ jsx8(
|
|
626
|
-
Comp,
|
|
627
|
-
{
|
|
628
|
-
...props,
|
|
629
|
-
ref,
|
|
630
|
-
className: cn(menuSurfaceClassName, className),
|
|
631
|
-
"data-state": dataState ?? state
|
|
632
|
-
}
|
|
633
|
-
);
|
|
634
|
-
}
|
|
635
|
-
);
|
|
636
|
-
MenuSurface.displayName = "MenuSurface";
|
|
637
|
-
|
|
638
|
-
// src/components/context-menu/context-menu.tsx
|
|
639
|
-
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
905
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
640
906
|
function ContextMenu({
|
|
641
907
|
...props
|
|
642
908
|
}) {
|
|
643
|
-
return /* @__PURE__ */
|
|
909
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
644
910
|
}
|
|
645
911
|
function ContextMenuTrigger({
|
|
646
912
|
...props
|
|
647
913
|
}) {
|
|
648
|
-
return /* @__PURE__ */
|
|
914
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
649
915
|
}
|
|
650
916
|
function ContextMenuContent({
|
|
651
917
|
className,
|
|
@@ -653,13 +919,13 @@ function ContextMenuContent({
|
|
|
653
919
|
style,
|
|
654
920
|
...props
|
|
655
921
|
}) {
|
|
656
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
657
923
|
ContextMenuPrimitive.Content,
|
|
658
924
|
{
|
|
659
925
|
asChild: true,
|
|
660
926
|
"data-slot": "context-menu-content",
|
|
661
927
|
...props,
|
|
662
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ jsx12(
|
|
663
929
|
MenuSurface,
|
|
664
930
|
{
|
|
665
931
|
"data-slot": "context-menu-content",
|
|
@@ -680,7 +946,7 @@ function ContextMenuItem({
|
|
|
680
946
|
variant = "default",
|
|
681
947
|
...props
|
|
682
948
|
}) {
|
|
683
|
-
return /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsx12(
|
|
684
950
|
ContextMenuPrimitive.Item,
|
|
685
951
|
{
|
|
686
952
|
"data-inset": inset,
|
|
@@ -700,7 +966,7 @@ function ContextMenuSeparator({
|
|
|
700
966
|
className,
|
|
701
967
|
...props
|
|
702
968
|
}) {
|
|
703
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ jsx12(
|
|
704
970
|
ContextMenuPrimitive.Separator,
|
|
705
971
|
{
|
|
706
972
|
"data-slot": "context-menu-separator",
|
|
@@ -712,14 +978,14 @@ function ContextMenuSeparator({
|
|
|
712
978
|
function ContextMenuSub({
|
|
713
979
|
...props
|
|
714
980
|
}) {
|
|
715
|
-
return /* @__PURE__ */
|
|
981
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
716
982
|
}
|
|
717
983
|
function ContextMenuSubTrigger({
|
|
718
984
|
className,
|
|
719
985
|
children,
|
|
720
986
|
...props
|
|
721
987
|
}) {
|
|
722
|
-
return /* @__PURE__ */
|
|
988
|
+
return /* @__PURE__ */ jsxs5(
|
|
723
989
|
ContextMenuPrimitive.SubTrigger,
|
|
724
990
|
{
|
|
725
991
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -731,7 +997,7 @@ function ContextMenuSubTrigger({
|
|
|
731
997
|
...props,
|
|
732
998
|
children: [
|
|
733
999
|
children,
|
|
734
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ jsx12(ArrowRightIcon, { className: "ml-auto text-[var(--text-tertiary)]" })
|
|
735
1001
|
]
|
|
736
1002
|
}
|
|
737
1003
|
);
|
|
@@ -742,13 +1008,13 @@ function ContextMenuSubContent({
|
|
|
742
1008
|
style,
|
|
743
1009
|
...props
|
|
744
1010
|
}) {
|
|
745
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
746
1012
|
ContextMenuPrimitive.SubContent,
|
|
747
1013
|
{
|
|
748
1014
|
asChild: true,
|
|
749
1015
|
"data-slot": "context-menu-sub-content",
|
|
750
1016
|
...props,
|
|
751
|
-
children: /* @__PURE__ */
|
|
1017
|
+
children: /* @__PURE__ */ jsx12(
|
|
752
1018
|
MenuSurface,
|
|
753
1019
|
{
|
|
754
1020
|
"data-slot": "context-menu-sub-content",
|
|
@@ -762,9 +1028,9 @@ function ContextMenuSubContent({
|
|
|
762
1028
|
}
|
|
763
1029
|
|
|
764
1030
|
// src/components/date-picker/date-picker.tsx
|
|
765
|
-
import * as
|
|
1031
|
+
import * as React6 from "react";
|
|
766
1032
|
import { createPortal } from "react-dom";
|
|
767
|
-
import { Fragment as Fragment2, jsx as
|
|
1033
|
+
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
768
1034
|
var defaultLabels = {
|
|
769
1035
|
placeholder: "Year / Month / Day",
|
|
770
1036
|
previousMonth: "Previous month",
|
|
@@ -852,7 +1118,7 @@ function subscribeScrollableAncestors(trigger, onScrollLike) {
|
|
|
852
1118
|
}
|
|
853
1119
|
return () => cleanups.forEach((dispose) => dispose());
|
|
854
1120
|
}
|
|
855
|
-
var DatePicker =
|
|
1121
|
+
var DatePicker = React6.forwardRef(
|
|
856
1122
|
({
|
|
857
1123
|
className,
|
|
858
1124
|
value,
|
|
@@ -869,20 +1135,20 @@ var DatePicker = React5.forwardRef(
|
|
|
869
1135
|
...labels,
|
|
870
1136
|
weekdayLabels: labels?.weekdayLabels ?? defaultLabels.weekdayLabels
|
|
871
1137
|
};
|
|
872
|
-
const triggerRef =
|
|
873
|
-
const popoverRef =
|
|
874
|
-
const selectedDate =
|
|
875
|
-
const [isOpen, setIsOpen] =
|
|
876
|
-
const [visibleMonth, setVisibleMonth] =
|
|
1138
|
+
const triggerRef = React6.useRef(null);
|
|
1139
|
+
const popoverRef = React6.useRef(null);
|
|
1140
|
+
const selectedDate = React6.useMemo(() => parseDateValue(value), [value]);
|
|
1141
|
+
const [isOpen, setIsOpen] = React6.useState(false);
|
|
1142
|
+
const [visibleMonth, setVisibleMonth] = React6.useState(
|
|
877
1143
|
() => selectedDate ?? /* @__PURE__ */ new Date()
|
|
878
1144
|
);
|
|
879
|
-
const [popoverPosition, setPopoverPosition] =
|
|
880
|
-
|
|
1145
|
+
const [popoverPosition, setPopoverPosition] = React6.useState(null);
|
|
1146
|
+
React6.useEffect(() => {
|
|
881
1147
|
if (selectedDate) {
|
|
882
1148
|
setVisibleMonth(selectedDate);
|
|
883
1149
|
}
|
|
884
1150
|
}, [selectedDate]);
|
|
885
|
-
const openPopover =
|
|
1151
|
+
const openPopover = React6.useCallback(() => {
|
|
886
1152
|
const trigger = triggerRef.current;
|
|
887
1153
|
if (!trigger) {
|
|
888
1154
|
return;
|
|
@@ -892,7 +1158,7 @@ var DatePicker = React5.forwardRef(
|
|
|
892
1158
|
);
|
|
893
1159
|
setIsOpen(true);
|
|
894
1160
|
}, []);
|
|
895
|
-
|
|
1161
|
+
React6.useLayoutEffect(() => {
|
|
896
1162
|
if (!isOpen) {
|
|
897
1163
|
return;
|
|
898
1164
|
}
|
|
@@ -909,7 +1175,7 @@ var DatePicker = React5.forwardRef(
|
|
|
909
1175
|
const rafId = window.requestAnimationFrame(sync);
|
|
910
1176
|
return () => window.cancelAnimationFrame(rafId);
|
|
911
1177
|
}, [isOpen]);
|
|
912
|
-
|
|
1178
|
+
React6.useEffect(() => {
|
|
913
1179
|
if (!isOpen) {
|
|
914
1180
|
return void 0;
|
|
915
1181
|
}
|
|
@@ -956,8 +1222,8 @@ var DatePicker = React5.forwardRef(
|
|
|
956
1222
|
unsubAncestors();
|
|
957
1223
|
};
|
|
958
1224
|
}, [isOpen]);
|
|
959
|
-
const today =
|
|
960
|
-
const monthGrid =
|
|
1225
|
+
const today = React6.useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
1226
|
+
const monthGrid = React6.useMemo(
|
|
961
1227
|
() => buildMonthGrid(visibleMonth),
|
|
962
1228
|
[visibleMonth]
|
|
963
1229
|
);
|
|
@@ -967,8 +1233,8 @@ var DatePicker = React5.forwardRef(
|
|
|
967
1233
|
setIsOpen(false);
|
|
968
1234
|
triggerRef.current?.focus();
|
|
969
1235
|
};
|
|
970
|
-
return /* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1237
|
+
/* @__PURE__ */ jsx13(
|
|
972
1238
|
"button",
|
|
973
1239
|
{
|
|
974
1240
|
ref: (node) => {
|
|
@@ -999,11 +1265,11 @@ var DatePicker = React5.forwardRef(
|
|
|
999
1265
|
}
|
|
1000
1266
|
},
|
|
1001
1267
|
...props,
|
|
1002
|
-
children: /* @__PURE__ */
|
|
1268
|
+
children: /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: displayValue })
|
|
1003
1269
|
}
|
|
1004
1270
|
),
|
|
1005
1271
|
isOpen && popoverPosition ? createPortal(
|
|
1006
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ jsxs6(
|
|
1007
1273
|
"div",
|
|
1008
1274
|
{
|
|
1009
1275
|
ref: popoverRef,
|
|
@@ -1016,10 +1282,10 @@ var DatePicker = React5.forwardRef(
|
|
|
1016
1282
|
zIndex: "var(--z-popover)"
|
|
1017
1283
|
},
|
|
1018
1284
|
children: [
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
1021
|
-
/* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ jsxs6("div", { className: "mb-3 flex items-center justify-between gap-2", children: [
|
|
1286
|
+
/* @__PURE__ */ jsx13("div", { className: "text-[13px] font-semibold text-foreground", children: formatMonthLabel(visibleMonth) }),
|
|
1287
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-1", children: [
|
|
1288
|
+
/* @__PURE__ */ jsx13(
|
|
1023
1289
|
"button",
|
|
1024
1290
|
{
|
|
1025
1291
|
"aria-label": resolvedLabels.previousMonth,
|
|
@@ -1032,10 +1298,10 @@ var DatePicker = React5.forwardRef(
|
|
|
1032
1298
|
1
|
|
1033
1299
|
)
|
|
1034
1300
|
),
|
|
1035
|
-
children: /* @__PURE__ */
|
|
1301
|
+
children: /* @__PURE__ */ jsx13(ArrowLeftIcon, { size: 16 })
|
|
1036
1302
|
}
|
|
1037
1303
|
),
|
|
1038
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ jsx13(
|
|
1039
1305
|
"button",
|
|
1040
1306
|
{
|
|
1041
1307
|
"aria-label": resolvedLabels.nextMonth,
|
|
@@ -1048,13 +1314,13 @@ var DatePicker = React5.forwardRef(
|
|
|
1048
1314
|
1
|
|
1049
1315
|
)
|
|
1050
1316
|
),
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1317
|
+
children: /* @__PURE__ */ jsx13(ArrowRightIcon, { size: 16 })
|
|
1052
1318
|
}
|
|
1053
1319
|
)
|
|
1054
1320
|
] })
|
|
1055
1321
|
] }),
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ jsx13("div", { className: "grid grid-cols-7 gap-1 text-center text-[11px] font-semibold text-muted-foreground", children: resolvedLabels.weekdayLabels.map((day) => /* @__PURE__ */ jsx13("div", { className: "py-1", children: day }, day)) }),
|
|
1323
|
+
/* @__PURE__ */ jsx13(
|
|
1058
1324
|
"div",
|
|
1059
1325
|
{
|
|
1060
1326
|
className: "mt-1 grid grid-cols-7 justify-items-center gap-1",
|
|
@@ -1063,7 +1329,7 @@ var DatePicker = React5.forwardRef(
|
|
|
1063
1329
|
const isSelected = isSameDate(date, selectedDate);
|
|
1064
1330
|
const isToday = isSameDate(date, today);
|
|
1065
1331
|
const inCurrentMonth = date.getMonth() === visibleMonth.getMonth();
|
|
1066
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ jsx13(
|
|
1067
1333
|
"button",
|
|
1068
1334
|
{
|
|
1069
1335
|
"aria-pressed": isSelected,
|
|
@@ -1083,8 +1349,8 @@ var DatePicker = React5.forwardRef(
|
|
|
1083
1349
|
})
|
|
1084
1350
|
}
|
|
1085
1351
|
),
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ jsxs6("div", { className: "mt-3 flex items-center justify-between gap-2 border-t border-border/70 pt-3", children: [
|
|
1353
|
+
/* @__PURE__ */ jsx13(
|
|
1088
1354
|
"button",
|
|
1089
1355
|
{
|
|
1090
1356
|
className: "inline-flex min-h-8 items-center justify-center rounded-sm px-3 text-[13px] font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
@@ -1097,7 +1363,7 @@ var DatePicker = React5.forwardRef(
|
|
|
1097
1363
|
children: resolvedLabels.clear
|
|
1098
1364
|
}
|
|
1099
1365
|
),
|
|
1100
|
-
/* @__PURE__ */
|
|
1366
|
+
/* @__PURE__ */ jsx13(
|
|
1101
1367
|
"button",
|
|
1102
1368
|
{
|
|
1103
1369
|
className: "inline-flex min-h-8 items-center justify-center rounded-sm bg-primary px-3 text-[13px] font-medium text-primary-foreground transition-opacity hover:opacity-90",
|
|
@@ -1119,33 +1385,33 @@ DatePicker.displayName = "DatePicker";
|
|
|
1119
1385
|
|
|
1120
1386
|
// src/components/drawer/drawer.tsx
|
|
1121
1387
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
1122
|
-
import { jsx as
|
|
1388
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1123
1389
|
function Drawer({
|
|
1124
1390
|
...props
|
|
1125
1391
|
}) {
|
|
1126
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ jsx14(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
|
|
1127
1393
|
}
|
|
1128
1394
|
function DrawerTrigger({
|
|
1129
1395
|
...props
|
|
1130
1396
|
}) {
|
|
1131
|
-
return /* @__PURE__ */
|
|
1397
|
+
return /* @__PURE__ */ jsx14(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
1132
1398
|
}
|
|
1133
1399
|
function DrawerPortal({
|
|
1134
1400
|
...props
|
|
1135
1401
|
}) {
|
|
1136
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsx14(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
1137
1403
|
}
|
|
1138
1404
|
function DrawerClose({
|
|
1139
1405
|
...props
|
|
1140
1406
|
}) {
|
|
1141
|
-
return /* @__PURE__ */
|
|
1407
|
+
return /* @__PURE__ */ jsx14(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
1142
1408
|
}
|
|
1143
1409
|
function DrawerOverlay({
|
|
1144
1410
|
className,
|
|
1145
1411
|
style,
|
|
1146
1412
|
...props
|
|
1147
1413
|
}) {
|
|
1148
|
-
return /* @__PURE__ */
|
|
1414
|
+
return /* @__PURE__ */ jsx14(
|
|
1149
1415
|
DrawerPrimitive.Overlay,
|
|
1150
1416
|
{
|
|
1151
1417
|
"data-slot": "drawer-overlay",
|
|
@@ -1166,9 +1432,9 @@ function DrawerContent({
|
|
|
1166
1432
|
style,
|
|
1167
1433
|
...props
|
|
1168
1434
|
}) {
|
|
1169
|
-
return /* @__PURE__ */
|
|
1170
|
-
showOverlay ? /* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
1435
|
+
return /* @__PURE__ */ jsxs7(DrawerPortal, { "data-slot": "drawer-portal", container: portalContainer, children: [
|
|
1436
|
+
showOverlay ? /* @__PURE__ */ jsx14(DrawerOverlay, {}) : null,
|
|
1437
|
+
/* @__PURE__ */ jsxs7(
|
|
1172
1438
|
DrawerPrimitive.Content,
|
|
1173
1439
|
{
|
|
1174
1440
|
"data-slot": "drawer-content",
|
|
@@ -1183,7 +1449,7 @@ function DrawerContent({
|
|
|
1183
1449
|
style: { zIndex: "var(--z-dialog)", ...style },
|
|
1184
1450
|
...props,
|
|
1185
1451
|
children: [
|
|
1186
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ jsx14("div", { className: "mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1187
1453
|
children
|
|
1188
1454
|
]
|
|
1189
1455
|
}
|
|
@@ -1191,7 +1457,7 @@ function DrawerContent({
|
|
|
1191
1457
|
] });
|
|
1192
1458
|
}
|
|
1193
1459
|
function DrawerHeader({ className, ...props }) {
|
|
1194
|
-
return /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ jsx14(
|
|
1195
1461
|
"div",
|
|
1196
1462
|
{
|
|
1197
1463
|
"data-slot": "drawer-header",
|
|
@@ -1204,7 +1470,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
1204
1470
|
);
|
|
1205
1471
|
}
|
|
1206
1472
|
function DrawerFooter({ className, ...props }) {
|
|
1207
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ jsx14(
|
|
1208
1474
|
"div",
|
|
1209
1475
|
{
|
|
1210
1476
|
"data-slot": "drawer-footer",
|
|
@@ -1217,7 +1483,7 @@ function DrawerTitle({
|
|
|
1217
1483
|
className,
|
|
1218
1484
|
...props
|
|
1219
1485
|
}) {
|
|
1220
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ jsx14(
|
|
1221
1487
|
DrawerPrimitive.Title,
|
|
1222
1488
|
{
|
|
1223
1489
|
"data-slot": "drawer-title",
|
|
@@ -1233,7 +1499,7 @@ function DrawerDescription({
|
|
|
1233
1499
|
className,
|
|
1234
1500
|
...props
|
|
1235
1501
|
}) {
|
|
1236
|
-
return /* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ jsx14(
|
|
1237
1503
|
DrawerPrimitive.Description,
|
|
1238
1504
|
{
|
|
1239
1505
|
"data-slot": "drawer-description",
|
|
@@ -1245,21 +1511,21 @@ function DrawerDescription({
|
|
|
1245
1511
|
|
|
1246
1512
|
// src/components/dropdown-menu/dropdown-menu.tsx
|
|
1247
1513
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
1248
|
-
import { jsx as
|
|
1514
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1249
1515
|
function DropdownMenu({
|
|
1250
1516
|
...props
|
|
1251
1517
|
}) {
|
|
1252
|
-
return /* @__PURE__ */
|
|
1518
|
+
return /* @__PURE__ */ jsx15(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1253
1519
|
}
|
|
1254
1520
|
function DropdownMenuPortal({
|
|
1255
1521
|
...props
|
|
1256
1522
|
}) {
|
|
1257
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx15(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1258
1524
|
}
|
|
1259
1525
|
function DropdownMenuTrigger({
|
|
1260
1526
|
...props
|
|
1261
1527
|
}) {
|
|
1262
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ jsx15(
|
|
1263
1529
|
DropdownMenuPrimitive.Trigger,
|
|
1264
1530
|
{
|
|
1265
1531
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1275,7 +1541,7 @@ function DropdownMenuContent({
|
|
|
1275
1541
|
style,
|
|
1276
1542
|
...props
|
|
1277
1543
|
}) {
|
|
1278
|
-
return /* @__PURE__ */
|
|
1544
|
+
return /* @__PURE__ */ jsx15(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
|
|
1279
1545
|
DropdownMenuPrimitive.Content,
|
|
1280
1546
|
{
|
|
1281
1547
|
asChild: true,
|
|
@@ -1283,7 +1549,7 @@ function DropdownMenuContent({
|
|
|
1283
1549
|
align,
|
|
1284
1550
|
sideOffset,
|
|
1285
1551
|
...props,
|
|
1286
|
-
children: /* @__PURE__ */
|
|
1552
|
+
children: /* @__PURE__ */ jsx15(
|
|
1287
1553
|
MenuSurface,
|
|
1288
1554
|
{
|
|
1289
1555
|
"data-slot": "dropdown-menu-content",
|
|
@@ -1302,7 +1568,7 @@ function DropdownMenuGroup({
|
|
|
1302
1568
|
className,
|
|
1303
1569
|
...props
|
|
1304
1570
|
}) {
|
|
1305
|
-
return /* @__PURE__ */
|
|
1571
|
+
return /* @__PURE__ */ jsx15(
|
|
1306
1572
|
DropdownMenuPrimitive.Group,
|
|
1307
1573
|
{
|
|
1308
1574
|
"data-slot": "dropdown-menu-group",
|
|
@@ -1317,7 +1583,7 @@ function DropdownMenuItem({
|
|
|
1317
1583
|
variant = "default",
|
|
1318
1584
|
...props
|
|
1319
1585
|
}) {
|
|
1320
|
-
return /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ jsx15(
|
|
1321
1587
|
DropdownMenuPrimitive.Item,
|
|
1322
1588
|
{
|
|
1323
1589
|
"data-inset": inset,
|
|
@@ -1340,7 +1606,7 @@ function DropdownMenuCheckboxItem({
|
|
|
1340
1606
|
inset,
|
|
1341
1607
|
...props
|
|
1342
1608
|
}) {
|
|
1343
|
-
return /* @__PURE__ */
|
|
1609
|
+
return /* @__PURE__ */ jsxs8(
|
|
1344
1610
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1345
1611
|
{
|
|
1346
1612
|
checked,
|
|
@@ -1348,17 +1614,27 @@ function DropdownMenuCheckboxItem({
|
|
|
1348
1614
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
1349
1615
|
className: cn(
|
|
1350
1616
|
menuItemWithIndicatorClassName,
|
|
1351
|
-
"data-inset:pl-7",
|
|
1617
|
+
"data-inset:pl-7 data-[state=checked]:[&_[data-slot=dropdown-menu-checkbox-item-indeterminate]]:hidden data-[state=indeterminate]:[&_[data-slot=dropdown-menu-checkbox-item-check]]:hidden",
|
|
1352
1618
|
className
|
|
1353
1619
|
),
|
|
1354
1620
|
...props,
|
|
1355
1621
|
children: [
|
|
1356
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ jsx15(
|
|
1357
1623
|
"span",
|
|
1358
1624
|
{
|
|
1359
1625
|
className: menuItemIndicatorClassName,
|
|
1360
1626
|
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
1361
|
-
children: /* @__PURE__ */
|
|
1627
|
+
children: /* @__PURE__ */ jsxs8(DropdownMenuPrimitive.ItemIndicator, { className: "grid place-content-center text-[var(--tutti-purple)]", children: [
|
|
1628
|
+
/* @__PURE__ */ jsx15(CheckIcon, { "data-slot": "dropdown-menu-checkbox-item-check" }),
|
|
1629
|
+
/* @__PURE__ */ jsx15(
|
|
1630
|
+
"span",
|
|
1631
|
+
{
|
|
1632
|
+
"aria-hidden": "true",
|
|
1633
|
+
className: "h-0.5 w-2.5 rounded-full bg-current",
|
|
1634
|
+
"data-slot": "dropdown-menu-checkbox-item-indeterminate"
|
|
1635
|
+
}
|
|
1636
|
+
)
|
|
1637
|
+
] })
|
|
1362
1638
|
}
|
|
1363
1639
|
),
|
|
1364
1640
|
children
|
|
@@ -1370,7 +1646,7 @@ function DropdownMenuRadioGroup({
|
|
|
1370
1646
|
className,
|
|
1371
1647
|
...props
|
|
1372
1648
|
}) {
|
|
1373
|
-
return /* @__PURE__ */
|
|
1649
|
+
return /* @__PURE__ */ jsx15(
|
|
1374
1650
|
DropdownMenuPrimitive.RadioGroup,
|
|
1375
1651
|
{
|
|
1376
1652
|
"data-slot": "dropdown-menu-radio-group",
|
|
@@ -1385,7 +1661,7 @@ function DropdownMenuRadioItem({
|
|
|
1385
1661
|
inset,
|
|
1386
1662
|
...props
|
|
1387
1663
|
}) {
|
|
1388
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsxs8(
|
|
1389
1665
|
DropdownMenuPrimitive.RadioItem,
|
|
1390
1666
|
{
|
|
1391
1667
|
"data-inset": inset,
|
|
@@ -1397,12 +1673,12 @@ function DropdownMenuRadioItem({
|
|
|
1397
1673
|
),
|
|
1398
1674
|
...props,
|
|
1399
1675
|
children: [
|
|
1400
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ jsx15(
|
|
1401
1677
|
"span",
|
|
1402
1678
|
{
|
|
1403
1679
|
className: menuItemIndicatorClassName,
|
|
1404
1680
|
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
1405
|
-
children: /* @__PURE__ */
|
|
1681
|
+
children: /* @__PURE__ */ jsx15(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(CheckIcon, { className: "text-[var(--tutti-purple)]" }) })
|
|
1406
1682
|
}
|
|
1407
1683
|
),
|
|
1408
1684
|
children
|
|
@@ -1415,7 +1691,7 @@ function DropdownMenuLabel({
|
|
|
1415
1691
|
inset,
|
|
1416
1692
|
...props
|
|
1417
1693
|
}) {
|
|
1418
|
-
return /* @__PURE__ */
|
|
1694
|
+
return /* @__PURE__ */ jsx15(
|
|
1419
1695
|
DropdownMenuPrimitive.Label,
|
|
1420
1696
|
{
|
|
1421
1697
|
"data-inset": inset,
|
|
@@ -1432,7 +1708,7 @@ function DropdownMenuSeparator({
|
|
|
1432
1708
|
className,
|
|
1433
1709
|
...props
|
|
1434
1710
|
}) {
|
|
1435
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ jsx15(
|
|
1436
1712
|
DropdownMenuPrimitive.Separator,
|
|
1437
1713
|
{
|
|
1438
1714
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -1445,7 +1721,7 @@ function DropdownMenuShortcut({
|
|
|
1445
1721
|
className,
|
|
1446
1722
|
...props
|
|
1447
1723
|
}) {
|
|
1448
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ jsx15(
|
|
1449
1725
|
"span",
|
|
1450
1726
|
{
|
|
1451
1727
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -1460,7 +1736,7 @@ function DropdownMenuShortcut({
|
|
|
1460
1736
|
function DropdownMenuSub({
|
|
1461
1737
|
...props
|
|
1462
1738
|
}) {
|
|
1463
|
-
return /* @__PURE__ */
|
|
1739
|
+
return /* @__PURE__ */ jsx15(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1464
1740
|
}
|
|
1465
1741
|
function DropdownMenuSubTrigger({
|
|
1466
1742
|
className,
|
|
@@ -1468,7 +1744,7 @@ function DropdownMenuSubTrigger({
|
|
|
1468
1744
|
children,
|
|
1469
1745
|
...props
|
|
1470
1746
|
}) {
|
|
1471
|
-
return /* @__PURE__ */
|
|
1747
|
+
return /* @__PURE__ */ jsxs8(
|
|
1472
1748
|
DropdownMenuPrimitive.SubTrigger,
|
|
1473
1749
|
{
|
|
1474
1750
|
"data-inset": inset,
|
|
@@ -1481,7 +1757,7 @@ function DropdownMenuSubTrigger({
|
|
|
1481
1757
|
...props,
|
|
1482
1758
|
children: [
|
|
1483
1759
|
children,
|
|
1484
|
-
/* @__PURE__ */
|
|
1760
|
+
/* @__PURE__ */ jsx15(ArrowRightIcon, { className: "ml-auto text-[var(--text-tertiary)]" })
|
|
1485
1761
|
]
|
|
1486
1762
|
}
|
|
1487
1763
|
);
|
|
@@ -1492,13 +1768,13 @@ function DropdownMenuSubContent({
|
|
|
1492
1768
|
style,
|
|
1493
1769
|
...props
|
|
1494
1770
|
}) {
|
|
1495
|
-
return /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ jsx15(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
|
|
1496
1772
|
DropdownMenuPrimitive.SubContent,
|
|
1497
1773
|
{
|
|
1498
1774
|
asChild: true,
|
|
1499
1775
|
"data-slot": "dropdown-menu-sub-content",
|
|
1500
1776
|
...props,
|
|
1501
|
-
children: /* @__PURE__ */
|
|
1777
|
+
children: /* @__PURE__ */ jsx15(
|
|
1502
1778
|
MenuSurface,
|
|
1503
1779
|
{
|
|
1504
1780
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -1514,55 +1790,20 @@ function DropdownMenuSubContent({
|
|
|
1514
1790
|
) });
|
|
1515
1791
|
}
|
|
1516
1792
|
|
|
1517
|
-
// src/components/input/input.tsx
|
|
1518
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1519
|
-
var inputVariantClassNames = {
|
|
1520
|
-
default: "h-8 rounded-md px-3 py-0 text-[13px] leading-[1.3]",
|
|
1521
|
-
lg: "h-12 rounded-[8px] px-4 py-3 text-[15px] leading-[1.3]",
|
|
1522
|
-
md: "h-8 rounded-md px-3 py-0 text-[13px] leading-[1.3]",
|
|
1523
|
-
sm: "h-8 rounded-md px-3 py-0 text-[13px] leading-[1.3]",
|
|
1524
|
-
otp: "h-12 w-12 rounded-[4px] px-0 text-center text-xl font-medium sm:h-14 sm:w-14 sm:text-2xl"
|
|
1525
|
-
};
|
|
1526
|
-
function Input({
|
|
1527
|
-
className,
|
|
1528
|
-
size = "default",
|
|
1529
|
-
type,
|
|
1530
|
-
variant,
|
|
1531
|
-
...props
|
|
1532
|
-
}) {
|
|
1533
|
-
const resolvedVariant = variant ?? (size === "sm" ? "sm" : "default");
|
|
1534
|
-
return /* @__PURE__ */ jsx13(
|
|
1535
|
-
"input",
|
|
1536
|
-
{
|
|
1537
|
-
type,
|
|
1538
|
-
"data-slot": "input",
|
|
1539
|
-
"data-size": size,
|
|
1540
|
-
"data-variant": resolvedVariant,
|
|
1541
|
-
className: cn(
|
|
1542
|
-
"w-full min-w-0 appearance-none border-0 bg-[var(--transparency-block)] font-normal text-[var(--text-primary)] shadow-none transition-colors duration-200 outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-[13px] file:font-medium file:text-[var(--text-primary)] placeholder:text-[var(--text-placeholder)] hover:bg-[var(--transparency-hover)] focus:bg-[var(--transparency-hover)] focus-visible:border-0 focus-visible:bg-[var(--transparency-hover)] focus-visible:ring-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-[var(--transparency-block)] disabled:text-[var(--text-disabled)] disabled:opacity-100 aria-invalid:border-0 aria-invalid:bg-[var(--transparency-block)] aria-invalid:hover:bg-[var(--transparency-hover)] aria-invalid:focus:bg-[var(--transparency-hover)] aria-invalid:focus-visible:bg-[var(--transparency-hover)] aria-invalid:ring-0 aria-invalid:shadow-none",
|
|
1543
|
-
inputVariantClassNames[resolvedVariant],
|
|
1544
|
-
!variant && size === "sm" && "h-7 rounded-[4px] px-2 text-[11px]",
|
|
1545
|
-
className
|
|
1546
|
-
),
|
|
1547
|
-
...props
|
|
1548
|
-
}
|
|
1549
|
-
);
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
1793
|
// src/components/mention-pill/mention-pill.tsx
|
|
1553
|
-
import * as
|
|
1794
|
+
import * as React8 from "react";
|
|
1554
1795
|
|
|
1555
1796
|
// src/components/mention-pill/truncating-pill-label.tsx
|
|
1556
|
-
import * as
|
|
1797
|
+
import * as React7 from "react";
|
|
1557
1798
|
|
|
1558
1799
|
// src/components/tooltip/tooltip.tsx
|
|
1559
1800
|
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
1560
|
-
import { jsx as
|
|
1801
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1561
1802
|
function TooltipProvider({
|
|
1562
1803
|
delayDuration = 0,
|
|
1563
1804
|
...props
|
|
1564
1805
|
}) {
|
|
1565
|
-
return /* @__PURE__ */
|
|
1806
|
+
return /* @__PURE__ */ jsx16(
|
|
1566
1807
|
TooltipPrimitive.Provider,
|
|
1567
1808
|
{
|
|
1568
1809
|
"data-slot": "tooltip-provider",
|
|
@@ -1574,17 +1815,17 @@ function TooltipProvider({
|
|
|
1574
1815
|
function Tooltip({
|
|
1575
1816
|
...props
|
|
1576
1817
|
}) {
|
|
1577
|
-
return /* @__PURE__ */
|
|
1818
|
+
return /* @__PURE__ */ jsx16(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
1578
1819
|
}
|
|
1579
1820
|
function TooltipTrigger({
|
|
1580
1821
|
...props
|
|
1581
1822
|
}) {
|
|
1582
|
-
return /* @__PURE__ */
|
|
1823
|
+
return /* @__PURE__ */ jsx16(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
1583
1824
|
}
|
|
1584
1825
|
function TooltipPortal({
|
|
1585
1826
|
...props
|
|
1586
1827
|
}) {
|
|
1587
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ jsx16(TooltipPrimitive.Portal, { "data-slot": "tooltip-portal", ...props });
|
|
1588
1829
|
}
|
|
1589
1830
|
function TooltipContent({
|
|
1590
1831
|
className,
|
|
@@ -1593,7 +1834,7 @@ function TooltipContent({
|
|
|
1593
1834
|
style,
|
|
1594
1835
|
...props
|
|
1595
1836
|
}) {
|
|
1596
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ jsx16(TooltipPortal, { children: /* @__PURE__ */ jsx16(
|
|
1597
1838
|
TooltipPrimitive.Content,
|
|
1598
1839
|
{
|
|
1599
1840
|
"data-slot": "tooltip-content",
|
|
@@ -1610,11 +1851,11 @@ function TooltipContent({
|
|
|
1610
1851
|
}
|
|
1611
1852
|
|
|
1612
1853
|
// src/components/mention-pill/truncating-pill-label.tsx
|
|
1613
|
-
import { jsx as
|
|
1854
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1614
1855
|
function useTextOverflow(watch, descendantSelector) {
|
|
1615
|
-
const ref =
|
|
1616
|
-
const [overflowing, setOverflowing] =
|
|
1617
|
-
|
|
1856
|
+
const ref = React7.useRef(null);
|
|
1857
|
+
const [overflowing, setOverflowing] = React7.useState(false);
|
|
1858
|
+
React7.useEffect(() => {
|
|
1618
1859
|
const element = ref.current;
|
|
1619
1860
|
if (!element) {
|
|
1620
1861
|
return;
|
|
@@ -1647,7 +1888,7 @@ function TruncatingPillLabel({
|
|
|
1647
1888
|
withTooltipProvider = true
|
|
1648
1889
|
}) {
|
|
1649
1890
|
const { ref: labelRef, overflowing } = useTextOverflow(tooltip);
|
|
1650
|
-
const label = /* @__PURE__ */
|
|
1891
|
+
const label = /* @__PURE__ */ jsx17(
|
|
1651
1892
|
"span",
|
|
1652
1893
|
{
|
|
1653
1894
|
ref: labelRef,
|
|
@@ -1661,15 +1902,15 @@ function TruncatingPillLabel({
|
|
|
1661
1902
|
if (!tooltip) {
|
|
1662
1903
|
return label;
|
|
1663
1904
|
}
|
|
1664
|
-
const tooltipElement = /* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1666
|
-
overflowing ? /* @__PURE__ */
|
|
1905
|
+
const tooltipElement = /* @__PURE__ */ jsxs9(Tooltip, { children: [
|
|
1906
|
+
/* @__PURE__ */ jsx17(TooltipTrigger, { asChild: true, children: label }),
|
|
1907
|
+
overflowing ? /* @__PURE__ */ jsx17(TooltipContent, { className: "max-w-[min(420px,calc(100vw-32px))] whitespace-normal text-left [overflow-wrap:anywhere]", children: tooltip }) : null
|
|
1667
1908
|
] });
|
|
1668
|
-
return withTooltipProvider ? /* @__PURE__ */
|
|
1909
|
+
return withTooltipProvider ? /* @__PURE__ */ jsx17(TooltipProvider, { delayDuration: 200, children: tooltipElement }) : tooltipElement;
|
|
1669
1910
|
}
|
|
1670
1911
|
|
|
1671
1912
|
// src/components/mention-pill/mention-pill.tsx
|
|
1672
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1673
1914
|
var mentionPillTokenByKind = {
|
|
1674
1915
|
app: "var(--rich-text-folder)",
|
|
1675
1916
|
issue: "var(--rich-text-mention-issue)",
|
|
@@ -1703,13 +1944,13 @@ function MentionPill({
|
|
|
1703
1944
|
const color = isFile && fileKind === "folder" ? "var(--folder)" : mentionPillTokenByKind[kind];
|
|
1704
1945
|
const dataKind = mentionPillDataKindByKind[kind];
|
|
1705
1946
|
const normalizedIconUrl = iconUrl?.trim() ?? "";
|
|
1706
|
-
const [failedIconUrl, setFailedIconUrl] =
|
|
1947
|
+
const [failedIconUrl, setFailedIconUrl] = React8.useState(null);
|
|
1707
1948
|
const iconSizeClassName = "size-4";
|
|
1708
1949
|
const iconShellClassName = isFile || kind === "session" ? "size-4" : "size-[18px]";
|
|
1709
1950
|
const tooltipText = [label, summary].filter(
|
|
1710
1951
|
(part) => typeof part === "string" && part.trim() !== ""
|
|
1711
1952
|
).join(" ");
|
|
1712
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsxs10(
|
|
1713
1954
|
"span",
|
|
1714
1955
|
{
|
|
1715
1956
|
className: cn(
|
|
@@ -1726,7 +1967,7 @@ function MentionPill({
|
|
|
1726
1967
|
},
|
|
1727
1968
|
...props,
|
|
1728
1969
|
children: [
|
|
1729
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ jsxs10(
|
|
1730
1971
|
"span",
|
|
1731
1972
|
{
|
|
1732
1973
|
...iconContainerProps,
|
|
@@ -1737,7 +1978,7 @@ function MentionPill({
|
|
|
1737
1978
|
iconContainerProps?.className
|
|
1738
1979
|
),
|
|
1739
1980
|
children: [
|
|
1740
|
-
normalizedIconUrl && failedIconUrl !== normalizedIconUrl ? /* @__PURE__ */
|
|
1981
|
+
normalizedIconUrl && failedIconUrl !== normalizedIconUrl ? /* @__PURE__ */ jsx18(
|
|
1741
1982
|
"img",
|
|
1742
1983
|
{
|
|
1743
1984
|
src: normalizedIconUrl,
|
|
@@ -1753,7 +1994,7 @@ function MentionPill({
|
|
|
1753
1994
|
setFailedIconUrl(normalizedIconUrl);
|
|
1754
1995
|
}
|
|
1755
1996
|
}
|
|
1756
|
-
) : /* @__PURE__ */
|
|
1997
|
+
) : /* @__PURE__ */ jsx18(
|
|
1757
1998
|
Icon,
|
|
1758
1999
|
{
|
|
1759
2000
|
...fallbackIconProps,
|
|
@@ -1766,7 +2007,7 @@ function MentionPill({
|
|
|
1766
2007
|
"data-mention-pill-fallback-icon": "true"
|
|
1767
2008
|
}
|
|
1768
2009
|
),
|
|
1769
|
-
removable ? /* @__PURE__ */
|
|
2010
|
+
removable ? /* @__PURE__ */ jsx18(
|
|
1770
2011
|
"button",
|
|
1771
2012
|
{
|
|
1772
2013
|
"aria-label": removeButtonProps?.["aria-label"],
|
|
@@ -1776,20 +2017,20 @@ function MentionPill({
|
|
|
1776
2017
|
"absolute top-1/2 left-1/2 inline-flex size-5 -translate-x-1/2 -translate-y-1/2 items-center justify-center text-[var(--text-secondary)] opacity-0 transition-opacity group-hover:opacity-100 hover:text-[var(--text-primary)] focus-visible:opacity-100",
|
|
1777
2018
|
removeButtonProps?.className
|
|
1778
2019
|
),
|
|
1779
|
-
children: /* @__PURE__ */
|
|
2020
|
+
children: /* @__PURE__ */ jsx18(CloseIcon, { className: "size-3.5" })
|
|
1780
2021
|
}
|
|
1781
2022
|
) : null
|
|
1782
2023
|
]
|
|
1783
2024
|
}
|
|
1784
2025
|
),
|
|
1785
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ jsxs10(
|
|
1786
2027
|
TruncatingPillLabel,
|
|
1787
2028
|
{
|
|
1788
2029
|
tooltip: tooltipEnabled ? tooltipText : "",
|
|
1789
2030
|
withTooltipProvider,
|
|
1790
2031
|
children: [
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
summary ? /* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ jsx18("span", { children: label }),
|
|
2033
|
+
summary ? /* @__PURE__ */ jsxs10("span", { className: "text-current", children: [
|
|
1793
2034
|
" ",
|
|
1794
2035
|
summary
|
|
1795
2036
|
] }) : null
|
|
@@ -1801,65 +2042,15 @@ function MentionPill({
|
|
|
1801
2042
|
);
|
|
1802
2043
|
}
|
|
1803
2044
|
|
|
1804
|
-
// src/components/popover/popover.tsx
|
|
1805
|
-
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
1806
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1807
|
-
function Popover({
|
|
1808
|
-
...props
|
|
1809
|
-
}) {
|
|
1810
|
-
return /* @__PURE__ */ jsx17(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1811
|
-
}
|
|
1812
|
-
function PopoverTrigger({
|
|
1813
|
-
...props
|
|
1814
|
-
}) {
|
|
1815
|
-
return /* @__PURE__ */ jsx17(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1816
|
-
}
|
|
1817
|
-
function PopoverPortal({
|
|
1818
|
-
...props
|
|
1819
|
-
}) {
|
|
1820
|
-
return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { "data-slot": "popover-portal", ...props });
|
|
1821
|
-
}
|
|
1822
|
-
function PopoverClose({
|
|
1823
|
-
...props
|
|
1824
|
-
}) {
|
|
1825
|
-
return /* @__PURE__ */ jsx17(PopoverPrimitive.Close, { "data-slot": "popover-close", ...props });
|
|
1826
|
-
}
|
|
1827
|
-
function PopoverContent({
|
|
1828
|
-
className,
|
|
1829
|
-
align = "center",
|
|
1830
|
-
sideOffset = 4,
|
|
1831
|
-
...props
|
|
1832
|
-
}) {
|
|
1833
|
-
return /* @__PURE__ */ jsx17(PopoverPortal, { children: /* @__PURE__ */ jsx17(
|
|
1834
|
-
PopoverPrimitive.Content,
|
|
1835
|
-
{
|
|
1836
|
-
"data-slot": "popover-content",
|
|
1837
|
-
align,
|
|
1838
|
-
sideOffset,
|
|
1839
|
-
className: cn(
|
|
1840
|
-
"t-dropdown z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg border border-[var(--border-1)] bg-[var(--background-fronted)] p-3 text-[13px] text-popover-foreground shadow-soft outline-hidden",
|
|
1841
|
-
className
|
|
1842
|
-
),
|
|
1843
|
-
style: { zIndex: "var(--z-popover)" },
|
|
1844
|
-
...props
|
|
1845
|
-
}
|
|
1846
|
-
) });
|
|
1847
|
-
}
|
|
1848
|
-
function PopoverAnchor({
|
|
1849
|
-
...props
|
|
1850
|
-
}) {
|
|
1851
|
-
return /* @__PURE__ */ jsx17(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
1852
|
-
}
|
|
1853
|
-
|
|
1854
2045
|
// src/components/radio-indicator/radio-indicator.tsx
|
|
1855
|
-
import { jsx as
|
|
2046
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1856
2047
|
function RadioIndicator({
|
|
1857
2048
|
checked = false,
|
|
1858
2049
|
disabled = false,
|
|
1859
2050
|
className,
|
|
1860
2051
|
...props
|
|
1861
2052
|
}) {
|
|
1862
|
-
return /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ jsx19(
|
|
1863
2054
|
"span",
|
|
1864
2055
|
{
|
|
1865
2056
|
...props,
|
|
@@ -1872,7 +2063,7 @@ function RadioIndicator({
|
|
|
1872
2063
|
"inline-flex size-4 shrink-0 items-center justify-center rounded-full border-2 border-[var(--border-1)] bg-transparent transition-[border-color,background-color,box-shadow] data-[state=checked]:border-[var(--tutti-purple)] data-[state=unchecked]:hover:border-[color-mix(in_srgb,var(--text-primary)_40%,transparent)] data-disabled:cursor-not-allowed data-disabled:opacity-60",
|
|
1873
2064
|
className
|
|
1874
2065
|
),
|
|
1875
|
-
children: checked ? /* @__PURE__ */
|
|
2066
|
+
children: checked ? /* @__PURE__ */ jsx19(
|
|
1876
2067
|
"span",
|
|
1877
2068
|
{
|
|
1878
2069
|
"aria-hidden": "true",
|
|
@@ -1885,13 +2076,13 @@ function RadioIndicator({
|
|
|
1885
2076
|
|
|
1886
2077
|
// src/components/resizable/resizable.tsx
|
|
1887
2078
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
1888
|
-
import { jsx as
|
|
2079
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1889
2080
|
function ResizablePanelGroup({
|
|
1890
2081
|
className,
|
|
1891
2082
|
orientation = "horizontal",
|
|
1892
2083
|
...props
|
|
1893
2084
|
}) {
|
|
1894
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ jsx20(
|
|
1895
2086
|
ResizablePrimitive.Group,
|
|
1896
2087
|
{
|
|
1897
2088
|
"data-orientation": orientation,
|
|
@@ -1906,14 +2097,14 @@ function ResizablePanelGroup({
|
|
|
1906
2097
|
);
|
|
1907
2098
|
}
|
|
1908
2099
|
function ResizablePanel(props) {
|
|
1909
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ jsx20(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
1910
2101
|
}
|
|
1911
2102
|
function ResizableHandle({
|
|
1912
2103
|
className,
|
|
1913
2104
|
withHandle,
|
|
1914
2105
|
...props
|
|
1915
2106
|
}) {
|
|
1916
|
-
return /* @__PURE__ */
|
|
2107
|
+
return /* @__PURE__ */ jsx20(
|
|
1917
2108
|
ResizablePrimitive.Separator,
|
|
1918
2109
|
{
|
|
1919
2110
|
"data-slot": "resizable-handle",
|
|
@@ -1922,14 +2113,14 @@ function ResizableHandle({
|
|
|
1922
2113
|
className
|
|
1923
2114
|
),
|
|
1924
2115
|
...props,
|
|
1925
|
-
children: withHandle ? /* @__PURE__ */
|
|
2116
|
+
children: withHandle ? /* @__PURE__ */ jsx20("div", { className: "z-10 flex items-center justify-center rounded-full bg-border/85 opacity-0 transition-[background-color,opacity] group-hover:bg-border group-hover:opacity-100 group-focus-visible:bg-border group-focus-visible:opacity-100 group-aria-[orientation=horizontal]:h-[3px] group-aria-[orientation=horizontal]:w-10 group-aria-[orientation=vertical]:h-10 group-aria-[orientation=vertical]:w-[3px]" }) : null
|
|
1926
2117
|
}
|
|
1927
2118
|
);
|
|
1928
2119
|
}
|
|
1929
2120
|
|
|
1930
2121
|
// src/components/scroll-area/scroll-area.tsx
|
|
1931
|
-
import * as
|
|
1932
|
-
import { jsx as
|
|
2122
|
+
import * as React9 from "react";
|
|
2123
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1933
2124
|
var MIN_THUMB_SIZE_PX = 24;
|
|
1934
2125
|
function ScrollArea({
|
|
1935
2126
|
className,
|
|
@@ -1966,9 +2157,9 @@ function ScrollArea({
|
|
|
1966
2157
|
...props
|
|
1967
2158
|
};
|
|
1968
2159
|
if (scrollbarMode === "native") {
|
|
1969
|
-
return /* @__PURE__ */
|
|
2160
|
+
return /* @__PURE__ */ jsx21(NativeScrollArea, { ...implementationProps, children });
|
|
1970
2161
|
}
|
|
1971
|
-
return /* @__PURE__ */
|
|
2162
|
+
return /* @__PURE__ */ jsx21(CustomScrollArea, { ...implementationProps, children });
|
|
1972
2163
|
}
|
|
1973
2164
|
function NativeScrollArea({
|
|
1974
2165
|
className,
|
|
@@ -1988,7 +2179,7 @@ function NativeScrollArea({
|
|
|
1988
2179
|
...props
|
|
1989
2180
|
}) {
|
|
1990
2181
|
const alwaysVisible = type === "always" || type === "scroll" || hasAlwaysVisibleScrollbarSelector(className);
|
|
1991
|
-
return /* @__PURE__ */
|
|
2182
|
+
return /* @__PURE__ */ jsx21(
|
|
1992
2183
|
ScrollAreaFrame,
|
|
1993
2184
|
{
|
|
1994
2185
|
...props,
|
|
@@ -2029,11 +2220,11 @@ function CustomScrollArea({
|
|
|
2029
2220
|
viewportTestId,
|
|
2030
2221
|
...props
|
|
2031
2222
|
}) {
|
|
2032
|
-
const localViewportRef =
|
|
2033
|
-
const contentRef =
|
|
2034
|
-
const [active, setActive] =
|
|
2223
|
+
const localViewportRef = React9.useRef(null);
|
|
2224
|
+
const contentRef = React9.useRef(null);
|
|
2225
|
+
const [active, setActive] = React9.useState(false);
|
|
2035
2226
|
const alwaysVisible = type === "always" || type === "scroll" || hasAlwaysVisibleScrollbarSelector(className);
|
|
2036
|
-
return /* @__PURE__ */
|
|
2227
|
+
return /* @__PURE__ */ jsxs11(
|
|
2037
2228
|
ScrollAreaFrame,
|
|
2038
2229
|
{
|
|
2039
2230
|
...props,
|
|
@@ -2069,7 +2260,7 @@ function CustomScrollArea({
|
|
|
2069
2260
|
viewportTestId,
|
|
2070
2261
|
children: [
|
|
2071
2262
|
children,
|
|
2072
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ jsx21(
|
|
2073
2264
|
ScrollAreaScrollbar,
|
|
2074
2265
|
{
|
|
2075
2266
|
active: active || alwaysVisible,
|
|
@@ -2094,7 +2285,7 @@ function ScrollAreaFrame({
|
|
|
2094
2285
|
viewportTestId,
|
|
2095
2286
|
...props
|
|
2096
2287
|
}) {
|
|
2097
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsx21(
|
|
2098
2289
|
"div",
|
|
2099
2290
|
{
|
|
2100
2291
|
"data-slot": "scroll-area",
|
|
@@ -2104,7 +2295,7 @@ function ScrollAreaFrame({
|
|
|
2104
2295
|
className
|
|
2105
2296
|
),
|
|
2106
2297
|
...props,
|
|
2107
|
-
children: /* @__PURE__ */
|
|
2298
|
+
children: /* @__PURE__ */ jsx21(
|
|
2108
2299
|
"div",
|
|
2109
2300
|
{
|
|
2110
2301
|
...viewportProps,
|
|
@@ -2115,7 +2306,7 @@ function ScrollAreaFrame({
|
|
|
2115
2306
|
"size-full overflow-auto rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
2116
2307
|
viewportClassName
|
|
2117
2308
|
),
|
|
2118
|
-
children: /* @__PURE__ */
|
|
2309
|
+
children: /* @__PURE__ */ jsx21(
|
|
2119
2310
|
"div",
|
|
2120
2311
|
{
|
|
2121
2312
|
ref: contentRef,
|
|
@@ -2139,15 +2330,15 @@ function ScrollAreaScrollbar({
|
|
|
2139
2330
|
orientation,
|
|
2140
2331
|
viewportRef
|
|
2141
2332
|
}) {
|
|
2142
|
-
const trackRef =
|
|
2143
|
-
const thumbRef =
|
|
2144
|
-
const dragStateRef =
|
|
2145
|
-
const frameRef =
|
|
2146
|
-
const scrollableRef =
|
|
2147
|
-
const [dragging, setDragging] =
|
|
2148
|
-
const [scrollable, setScrollable] =
|
|
2149
|
-
const [trackActive, setTrackActive] =
|
|
2150
|
-
const syncScrollbarState =
|
|
2333
|
+
const trackRef = React9.useRef(null);
|
|
2334
|
+
const thumbRef = React9.useRef(null);
|
|
2335
|
+
const dragStateRef = React9.useRef(null);
|
|
2336
|
+
const frameRef = React9.useRef(null);
|
|
2337
|
+
const scrollableRef = React9.useRef(false);
|
|
2338
|
+
const [dragging, setDragging] = React9.useState(false);
|
|
2339
|
+
const [scrollable, setScrollable] = React9.useState(false);
|
|
2340
|
+
const [trackActive, setTrackActive] = React9.useState(false);
|
|
2341
|
+
const syncScrollbarState = React9.useCallback(() => {
|
|
2151
2342
|
const viewport = viewportRef.current;
|
|
2152
2343
|
const track = trackRef.current;
|
|
2153
2344
|
const thumb = thumbRef.current;
|
|
@@ -2186,7 +2377,7 @@ function ScrollAreaScrollbar({
|
|
|
2186
2377
|
}
|
|
2187
2378
|
updateScrollable(true, scrollableRef, setScrollable);
|
|
2188
2379
|
}, [orientation, viewportRef]);
|
|
2189
|
-
const scheduleSync =
|
|
2380
|
+
const scheduleSync = React9.useCallback(() => {
|
|
2190
2381
|
if (frameRef.current !== null) {
|
|
2191
2382
|
return;
|
|
2192
2383
|
}
|
|
@@ -2195,7 +2386,7 @@ function ScrollAreaScrollbar({
|
|
|
2195
2386
|
syncScrollbarState();
|
|
2196
2387
|
});
|
|
2197
2388
|
}, [syncScrollbarState]);
|
|
2198
|
-
const scrollViewportToThumbOffset =
|
|
2389
|
+
const scrollViewportToThumbOffset = React9.useCallback(
|
|
2199
2390
|
(thumbOffset) => {
|
|
2200
2391
|
const viewport = viewportRef.current;
|
|
2201
2392
|
const track = trackRef.current;
|
|
@@ -2222,7 +2413,7 @@ function ScrollAreaScrollbar({
|
|
|
2222
2413
|
},
|
|
2223
2414
|
[orientation, syncScrollbarState, viewportRef]
|
|
2224
2415
|
);
|
|
2225
|
-
const handleTrackPointerDown =
|
|
2416
|
+
const handleTrackPointerDown = React9.useCallback(
|
|
2226
2417
|
(event) => {
|
|
2227
2418
|
if (event.button !== 0 || !scrollableRef.current) {
|
|
2228
2419
|
return;
|
|
@@ -2242,7 +2433,7 @@ function ScrollAreaScrollbar({
|
|
|
2242
2433
|
},
|
|
2243
2434
|
[orientation, scrollViewportToThumbOffset]
|
|
2244
2435
|
);
|
|
2245
|
-
const handleThumbPointerDown =
|
|
2436
|
+
const handleThumbPointerDown = React9.useCallback(
|
|
2246
2437
|
(event) => {
|
|
2247
2438
|
if (event.button !== 0 || !scrollableRef.current) {
|
|
2248
2439
|
return;
|
|
@@ -2274,7 +2465,7 @@ function ScrollAreaScrollbar({
|
|
|
2274
2465
|
},
|
|
2275
2466
|
[orientation, viewportRef]
|
|
2276
2467
|
);
|
|
2277
|
-
|
|
2468
|
+
React9.useEffect(() => {
|
|
2278
2469
|
if (!dragging) {
|
|
2279
2470
|
return;
|
|
2280
2471
|
}
|
|
@@ -2305,7 +2496,7 @@ function ScrollAreaScrollbar({
|
|
|
2305
2496
|
window.removeEventListener("pointerup", handlePointerUp);
|
|
2306
2497
|
};
|
|
2307
2498
|
}, [dragging, orientation, syncScrollbarState, viewportRef]);
|
|
2308
|
-
|
|
2499
|
+
React9.useEffect(() => {
|
|
2309
2500
|
const viewport = viewportRef.current;
|
|
2310
2501
|
if (!viewport) {
|
|
2311
2502
|
updateScrollable(false, scrollableRef, setScrollable);
|
|
@@ -2327,10 +2518,10 @@ function ScrollAreaScrollbar({
|
|
|
2327
2518
|
resizeObserver?.disconnect();
|
|
2328
2519
|
};
|
|
2329
2520
|
}, [contentRef, scheduleSync, syncScrollbarState, viewportRef]);
|
|
2330
|
-
|
|
2521
|
+
React9.useEffect(() => {
|
|
2331
2522
|
scheduleSync();
|
|
2332
2523
|
});
|
|
2333
|
-
return /* @__PURE__ */
|
|
2524
|
+
return /* @__PURE__ */ jsx21(
|
|
2334
2525
|
"div",
|
|
2335
2526
|
{
|
|
2336
2527
|
ref: trackRef,
|
|
@@ -2348,7 +2539,7 @@ function ScrollAreaScrollbar({
|
|
|
2348
2539
|
onPointerEnter: () => setTrackActive(true),
|
|
2349
2540
|
onPointerLeave: () => setTrackActive(false),
|
|
2350
2541
|
onPointerDown: handleTrackPointerDown,
|
|
2351
|
-
children: /* @__PURE__ */
|
|
2542
|
+
children: /* @__PURE__ */ jsx21(
|
|
2352
2543
|
"div",
|
|
2353
2544
|
{
|
|
2354
2545
|
ref: thumbRef,
|
|
@@ -2367,7 +2558,7 @@ function ScrollBar({
|
|
|
2367
2558
|
orientation = "vertical",
|
|
2368
2559
|
...props
|
|
2369
2560
|
}) {
|
|
2370
|
-
return /* @__PURE__ */
|
|
2561
|
+
return /* @__PURE__ */ jsx21(
|
|
2371
2562
|
"div",
|
|
2372
2563
|
{
|
|
2373
2564
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -2375,7 +2566,7 @@ function ScrollBar({
|
|
|
2375
2566
|
className: cn(scrollbarClassName(orientation), className),
|
|
2376
2567
|
style: scrollbarStyle({ active: false, orientation, scrollable: true }),
|
|
2377
2568
|
...props,
|
|
2378
|
-
children: /* @__PURE__ */
|
|
2569
|
+
children: /* @__PURE__ */ jsx21(
|
|
2379
2570
|
"div",
|
|
2380
2571
|
{
|
|
2381
2572
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2496,17 +2687,17 @@ function clamp(value, min, max) {
|
|
|
2496
2687
|
|
|
2497
2688
|
// src/components/select/select.tsx
|
|
2498
2689
|
import { Select as SelectPrimitive } from "radix-ui";
|
|
2499
|
-
import { jsx as
|
|
2690
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2500
2691
|
function Select({
|
|
2501
2692
|
...props
|
|
2502
2693
|
}) {
|
|
2503
|
-
return /* @__PURE__ */
|
|
2694
|
+
return /* @__PURE__ */ jsx22(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
2504
2695
|
}
|
|
2505
2696
|
function SelectGroup({
|
|
2506
2697
|
className,
|
|
2507
2698
|
...props
|
|
2508
2699
|
}) {
|
|
2509
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ jsx22(
|
|
2510
2701
|
SelectPrimitive.Group,
|
|
2511
2702
|
{
|
|
2512
2703
|
"data-slot": "select-group",
|
|
@@ -2518,7 +2709,7 @@ function SelectGroup({
|
|
|
2518
2709
|
function SelectValue({
|
|
2519
2710
|
...props
|
|
2520
2711
|
}) {
|
|
2521
|
-
return /* @__PURE__ */
|
|
2712
|
+
return /* @__PURE__ */ jsx22(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
2522
2713
|
}
|
|
2523
2714
|
function SelectTrigger({
|
|
2524
2715
|
className,
|
|
@@ -2527,7 +2718,7 @@ function SelectTrigger({
|
|
|
2527
2718
|
children,
|
|
2528
2719
|
...props
|
|
2529
2720
|
}) {
|
|
2530
|
-
return /* @__PURE__ */
|
|
2721
|
+
return /* @__PURE__ */ jsxs12(
|
|
2531
2722
|
SelectPrimitive.Trigger,
|
|
2532
2723
|
{
|
|
2533
2724
|
"data-slot": "select-trigger",
|
|
@@ -2541,7 +2732,7 @@ function SelectTrigger({
|
|
|
2541
2732
|
...props,
|
|
2542
2733
|
children: [
|
|
2543
2734
|
children,
|
|
2544
|
-
/* @__PURE__ */
|
|
2735
|
+
/* @__PURE__ */ jsx22(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx22(
|
|
2545
2736
|
ChevronDownIcon,
|
|
2546
2737
|
{
|
|
2547
2738
|
className: cn("pointer-events-none size-4", "text-current")
|
|
@@ -2559,7 +2750,7 @@ function SelectContent({
|
|
|
2559
2750
|
style,
|
|
2560
2751
|
...props
|
|
2561
2752
|
}) {
|
|
2562
|
-
return /* @__PURE__ */
|
|
2753
|
+
return /* @__PURE__ */ jsx22(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx22(
|
|
2563
2754
|
SelectPrimitive.Content,
|
|
2564
2755
|
{
|
|
2565
2756
|
asChild: true,
|
|
@@ -2568,7 +2759,7 @@ function SelectContent({
|
|
|
2568
2759
|
position,
|
|
2569
2760
|
align,
|
|
2570
2761
|
...props,
|
|
2571
|
-
children: /* @__PURE__ */
|
|
2762
|
+
children: /* @__PURE__ */ jsxs12(
|
|
2572
2763
|
MenuSurface,
|
|
2573
2764
|
{
|
|
2574
2765
|
"data-slot": "select-content",
|
|
@@ -2579,8 +2770,8 @@ function SelectContent({
|
|
|
2579
2770
|
),
|
|
2580
2771
|
style: { zIndex: "var(--z-popover)", ...style },
|
|
2581
2772
|
children: [
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
/* @__PURE__ */
|
|
2773
|
+
/* @__PURE__ */ jsx22(SelectScrollUpButton, {}),
|
|
2774
|
+
/* @__PURE__ */ jsx22(
|
|
2584
2775
|
SelectPrimitive.Viewport,
|
|
2585
2776
|
{
|
|
2586
2777
|
"data-position": position,
|
|
@@ -2590,7 +2781,7 @@ function SelectContent({
|
|
|
2590
2781
|
children
|
|
2591
2782
|
}
|
|
2592
2783
|
),
|
|
2593
|
-
/* @__PURE__ */
|
|
2784
|
+
/* @__PURE__ */ jsx22(SelectScrollDownButton, {})
|
|
2594
2785
|
]
|
|
2595
2786
|
}
|
|
2596
2787
|
)
|
|
@@ -2601,7 +2792,7 @@ function SelectLabel({
|
|
|
2601
2792
|
className,
|
|
2602
2793
|
...props
|
|
2603
2794
|
}) {
|
|
2604
|
-
return /* @__PURE__ */
|
|
2795
|
+
return /* @__PURE__ */ jsx22(
|
|
2605
2796
|
SelectPrimitive.Label,
|
|
2606
2797
|
{
|
|
2607
2798
|
"data-slot": "select-label",
|
|
@@ -2617,7 +2808,7 @@ function SelectSplitLayout({
|
|
|
2617
2808
|
className,
|
|
2618
2809
|
...props
|
|
2619
2810
|
}) {
|
|
2620
|
-
return /* @__PURE__ */
|
|
2811
|
+
return /* @__PURE__ */ jsx22(
|
|
2621
2812
|
"div",
|
|
2622
2813
|
{
|
|
2623
2814
|
"data-slot": "select-split-layout",
|
|
@@ -2633,7 +2824,7 @@ function SelectSplitColumn({
|
|
|
2633
2824
|
className,
|
|
2634
2825
|
...props
|
|
2635
2826
|
}) {
|
|
2636
|
-
return /* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ jsx22(
|
|
2637
2828
|
"div",
|
|
2638
2829
|
{
|
|
2639
2830
|
"data-slot": "select-split-column",
|
|
@@ -2646,7 +2837,7 @@ function SelectSplitColumnLabel({
|
|
|
2646
2837
|
className,
|
|
2647
2838
|
...props
|
|
2648
2839
|
}) {
|
|
2649
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ jsx22(
|
|
2650
2841
|
"div",
|
|
2651
2842
|
{
|
|
2652
2843
|
"data-slot": "select-split-column-label",
|
|
@@ -2662,7 +2853,7 @@ function SelectSplitColumnItems({
|
|
|
2662
2853
|
className,
|
|
2663
2854
|
...props
|
|
2664
2855
|
}) {
|
|
2665
|
-
return /* @__PURE__ */
|
|
2856
|
+
return /* @__PURE__ */ jsx22(
|
|
2666
2857
|
"div",
|
|
2667
2858
|
{
|
|
2668
2859
|
"data-slot": "select-split-column-items",
|
|
@@ -2678,7 +2869,7 @@ function SelectSplitDivider({
|
|
|
2678
2869
|
className,
|
|
2679
2870
|
...props
|
|
2680
2871
|
}) {
|
|
2681
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ jsx22(
|
|
2682
2873
|
"div",
|
|
2683
2874
|
{
|
|
2684
2875
|
"aria-hidden": "true",
|
|
@@ -2697,21 +2888,21 @@ function SelectItem({
|
|
|
2697
2888
|
forceSelectedIndicator = false,
|
|
2698
2889
|
...props
|
|
2699
2890
|
}) {
|
|
2700
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ jsxs12(
|
|
2701
2892
|
SelectPrimitive.Item,
|
|
2702
2893
|
{
|
|
2703
2894
|
"data-slot": "select-item",
|
|
2704
2895
|
className: cn("w-full", menuItemWithIndicatorClassName, className),
|
|
2705
2896
|
...props,
|
|
2706
2897
|
children: [
|
|
2707
|
-
/* @__PURE__ */
|
|
2898
|
+
/* @__PURE__ */ jsx22("span", { className: menuItemIndicatorClassName, children: forceSelectedIndicator ? /* @__PURE__ */ jsx22(
|
|
2708
2899
|
CheckIcon,
|
|
2709
2900
|
{
|
|
2710
2901
|
className: "pointer-events-none text-[var(--tutti-purple)]",
|
|
2711
2902
|
"data-slot": "select-item-forced-indicator"
|
|
2712
2903
|
}
|
|
2713
|
-
) : /* @__PURE__ */
|
|
2714
|
-
/* @__PURE__ */
|
|
2904
|
+
) : /* @__PURE__ */ jsx22(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx22(CheckIcon, { className: "pointer-events-none text-[var(--tutti-purple)]" }) }) }),
|
|
2905
|
+
/* @__PURE__ */ jsx22(SelectPrimitive.ItemText, { children })
|
|
2715
2906
|
]
|
|
2716
2907
|
}
|
|
2717
2908
|
);
|
|
@@ -2720,7 +2911,7 @@ function SelectSeparator({
|
|
|
2720
2911
|
className,
|
|
2721
2912
|
...props
|
|
2722
2913
|
}) {
|
|
2723
|
-
return /* @__PURE__ */
|
|
2914
|
+
return /* @__PURE__ */ jsx22(
|
|
2724
2915
|
SelectPrimitive.Separator,
|
|
2725
2916
|
{
|
|
2726
2917
|
"data-slot": "select-separator",
|
|
@@ -2736,7 +2927,7 @@ function SelectScrollUpButton({
|
|
|
2736
2927
|
className,
|
|
2737
2928
|
...props
|
|
2738
2929
|
}) {
|
|
2739
|
-
return /* @__PURE__ */
|
|
2930
|
+
return /* @__PURE__ */ jsx22(
|
|
2740
2931
|
SelectPrimitive.ScrollUpButton,
|
|
2741
2932
|
{
|
|
2742
2933
|
"data-slot": "select-scroll-up-button",
|
|
@@ -2745,7 +2936,7 @@ function SelectScrollUpButton({
|
|
|
2745
2936
|
className
|
|
2746
2937
|
),
|
|
2747
2938
|
...props,
|
|
2748
|
-
children: /* @__PURE__ */
|
|
2939
|
+
children: /* @__PURE__ */ jsx22(ChevronUpIcon, {})
|
|
2749
2940
|
}
|
|
2750
2941
|
);
|
|
2751
2942
|
}
|
|
@@ -2753,7 +2944,7 @@ function SelectScrollDownButton({
|
|
|
2753
2944
|
className,
|
|
2754
2945
|
...props
|
|
2755
2946
|
}) {
|
|
2756
|
-
return /* @__PURE__ */
|
|
2947
|
+
return /* @__PURE__ */ jsx22(
|
|
2757
2948
|
SelectPrimitive.ScrollDownButton,
|
|
2758
2949
|
{
|
|
2759
2950
|
"data-slot": "select-scroll-down-button",
|
|
@@ -2762,21 +2953,21 @@ function SelectScrollDownButton({
|
|
|
2762
2953
|
className
|
|
2763
2954
|
),
|
|
2764
2955
|
...props,
|
|
2765
|
-
children: /* @__PURE__ */
|
|
2956
|
+
children: /* @__PURE__ */ jsx22(ChevronDownIcon, {})
|
|
2766
2957
|
}
|
|
2767
2958
|
);
|
|
2768
2959
|
}
|
|
2769
2960
|
|
|
2770
2961
|
// src/components/separator/separator.tsx
|
|
2771
2962
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
2772
|
-
import { jsx as
|
|
2963
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2773
2964
|
function Separator2({
|
|
2774
2965
|
className,
|
|
2775
2966
|
orientation = "horizontal",
|
|
2776
2967
|
decorative = true,
|
|
2777
2968
|
...props
|
|
2778
2969
|
}) {
|
|
2779
|
-
return /* @__PURE__ */
|
|
2970
|
+
return /* @__PURE__ */ jsx23(
|
|
2780
2971
|
SeparatorPrimitive.Root,
|
|
2781
2972
|
{
|
|
2782
2973
|
"data-slot": "separator",
|
|
@@ -2792,7 +2983,7 @@ function Separator2({
|
|
|
2792
2983
|
}
|
|
2793
2984
|
|
|
2794
2985
|
// src/components/section-tabs/section-tabs.tsx
|
|
2795
|
-
import { jsx as
|
|
2986
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2796
2987
|
function SectionTabs({
|
|
2797
2988
|
tabs,
|
|
2798
2989
|
value,
|
|
@@ -2801,7 +2992,7 @@ function SectionTabs({
|
|
|
2801
2992
|
className,
|
|
2802
2993
|
testId
|
|
2803
2994
|
}) {
|
|
2804
|
-
return /* @__PURE__ */
|
|
2995
|
+
return /* @__PURE__ */ jsx24(
|
|
2805
2996
|
"div",
|
|
2806
2997
|
{
|
|
2807
2998
|
"aria-label": ariaLabel,
|
|
@@ -2811,7 +3002,7 @@ function SectionTabs({
|
|
|
2811
3002
|
role: "tablist",
|
|
2812
3003
|
children: tabs.map((tab) => {
|
|
2813
3004
|
const isActive = value === tab.value;
|
|
2814
|
-
return /* @__PURE__ */
|
|
3005
|
+
return /* @__PURE__ */ jsxs13(
|
|
2815
3006
|
"button",
|
|
2816
3007
|
{
|
|
2817
3008
|
"aria-selected": isActive,
|
|
@@ -2826,8 +3017,8 @@ function SectionTabs({
|
|
|
2826
3017
|
type: "button",
|
|
2827
3018
|
onClick: () => onValueChange(tab.value),
|
|
2828
3019
|
children: [
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsx24("span", { className: "min-w-0 truncate", children: tab.label }),
|
|
3021
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx24("span", { className: "text-[15px] font-semibold leading-5 text-[inherit]", children: tab.count }) : null
|
|
2831
3022
|
]
|
|
2832
3023
|
},
|
|
2833
3024
|
tab.value
|
|
@@ -2838,9 +3029,9 @@ function SectionTabs({
|
|
|
2838
3029
|
}
|
|
2839
3030
|
|
|
2840
3031
|
// src/components/shortcut-badge/shortcut-badge.tsx
|
|
2841
|
-
import { jsx as
|
|
3032
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2842
3033
|
function ShortcutBadge({ className, ...props }) {
|
|
2843
|
-
return /* @__PURE__ */
|
|
3034
|
+
return /* @__PURE__ */ jsx25(
|
|
2844
3035
|
"kbd",
|
|
2845
3036
|
{
|
|
2846
3037
|
"data-slot": "shortcut-badge",
|
|
@@ -2858,9 +3049,9 @@ import {
|
|
|
2858
3049
|
Toaster as SonnerToaster,
|
|
2859
3050
|
toast
|
|
2860
3051
|
} from "sonner";
|
|
2861
|
-
import { jsx as
|
|
3052
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2862
3053
|
function Toaster({ toastOptions, style, ...props }) {
|
|
2863
|
-
return /* @__PURE__ */
|
|
3054
|
+
return /* @__PURE__ */ jsx26(
|
|
2864
3055
|
SonnerToaster,
|
|
2865
3056
|
{
|
|
2866
3057
|
closeButton: true,
|
|
@@ -2869,11 +3060,11 @@ function Toaster({ toastOptions, style, ...props }) {
|
|
|
2869
3060
|
position: "top-right",
|
|
2870
3061
|
visibleToasts: 4,
|
|
2871
3062
|
icons: {
|
|
2872
|
-
error: /* @__PURE__ */
|
|
2873
|
-
info: /* @__PURE__ */
|
|
2874
|
-
loading: /* @__PURE__ */
|
|
2875
|
-
success: /* @__PURE__ */
|
|
2876
|
-
warning: /* @__PURE__ */
|
|
3063
|
+
error: /* @__PURE__ */ jsx26(FailedFilledIcon, { className: "size-4" }),
|
|
3064
|
+
info: /* @__PURE__ */ jsx26(WarningLinedIcon, { className: "size-4" }),
|
|
3065
|
+
loading: /* @__PURE__ */ jsx26(LoadingIcon, { className: "size-4 animate-spin" }),
|
|
3066
|
+
success: /* @__PURE__ */ jsx26(SuccessFilledIcon, { className: "size-4" }),
|
|
3067
|
+
warning: /* @__PURE__ */ jsx26(WarningFilledIcon, { className: "size-4" })
|
|
2877
3068
|
},
|
|
2878
3069
|
style: {
|
|
2879
3070
|
"--normal-bg": "var(--background-fronted)",
|
|
@@ -2902,7 +3093,7 @@ function Toaster({ toastOptions, style, ...props }) {
|
|
|
2902
3093
|
}
|
|
2903
3094
|
|
|
2904
3095
|
// src/components/spinner/spinner.tsx
|
|
2905
|
-
import { jsx as
|
|
3096
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2906
3097
|
function Spinner({
|
|
2907
3098
|
className,
|
|
2908
3099
|
size = 16,
|
|
@@ -2911,7 +3102,7 @@ function Spinner({
|
|
|
2911
3102
|
testId,
|
|
2912
3103
|
trackColor
|
|
2913
3104
|
}) {
|
|
2914
|
-
return /* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ jsx27(
|
|
2915
3106
|
LoadingIcon,
|
|
2916
3107
|
{
|
|
2917
3108
|
"data-slot": "spinner",
|
|
@@ -2957,11 +3148,11 @@ import {
|
|
|
2957
3148
|
} from "@dnd-kit/sortable";
|
|
2958
3149
|
import { CSS } from "@dnd-kit/utilities";
|
|
2959
3150
|
import { Slot as SlotPrimitive } from "radix-ui";
|
|
2960
|
-
import * as
|
|
3151
|
+
import * as React11 from "react";
|
|
2961
3152
|
import * as ReactDOM from "react-dom";
|
|
2962
3153
|
|
|
2963
3154
|
// src/lib/compose-refs.ts
|
|
2964
|
-
import * as
|
|
3155
|
+
import * as React10 from "react";
|
|
2965
3156
|
function setRef(ref, value) {
|
|
2966
3157
|
if (typeof ref === "function") {
|
|
2967
3158
|
return ref(value);
|
|
@@ -2995,11 +3186,11 @@ function composeRefs(...refs) {
|
|
|
2995
3186
|
};
|
|
2996
3187
|
}
|
|
2997
3188
|
function useComposedRefs(...refs) {
|
|
2998
|
-
return
|
|
3189
|
+
return React10.useCallback(composeRefs(...refs), refs);
|
|
2999
3190
|
}
|
|
3000
3191
|
|
|
3001
3192
|
// src/components/sortable/sortable.tsx
|
|
3002
|
-
import { jsx as
|
|
3193
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3003
3194
|
var orientationConfig = {
|
|
3004
3195
|
vertical: {
|
|
3005
3196
|
modifiers: [restrictToVerticalAxis, restrictToParentElement],
|
|
@@ -3022,9 +3213,9 @@ var CONTENT_NAME = "SortableContent";
|
|
|
3022
3213
|
var ITEM_NAME = "SortableItem";
|
|
3023
3214
|
var ITEM_HANDLE_NAME = "SortableItemHandle";
|
|
3024
3215
|
var OVERLAY_NAME = "SortableOverlay";
|
|
3025
|
-
var SortableRootContext =
|
|
3216
|
+
var SortableRootContext = React11.createContext(null);
|
|
3026
3217
|
function useSortableContext(consumerName) {
|
|
3027
|
-
const context =
|
|
3218
|
+
const context = React11.useContext(SortableRootContext);
|
|
3028
3219
|
if (!context) {
|
|
3029
3220
|
throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
|
|
3030
3221
|
}
|
|
@@ -3044,8 +3235,8 @@ function Sortable(props) {
|
|
|
3044
3235
|
accessibility,
|
|
3045
3236
|
...sortableProps
|
|
3046
3237
|
} = props;
|
|
3047
|
-
const id =
|
|
3048
|
-
const [activeId, setActiveId] =
|
|
3238
|
+
const id = React11.useId();
|
|
3239
|
+
const [activeId, setActiveId] = React11.useState(null);
|
|
3049
3240
|
const sensors = useSensors(
|
|
3050
3241
|
useSensor(MouseSensor, {
|
|
3051
3242
|
activationConstraint: { distance: 6 }
|
|
@@ -3057,11 +3248,11 @@ function Sortable(props) {
|
|
|
3057
3248
|
coordinateGetter: sortableKeyboardCoordinates
|
|
3058
3249
|
})
|
|
3059
3250
|
);
|
|
3060
|
-
const config =
|
|
3251
|
+
const config = React11.useMemo(
|
|
3061
3252
|
() => orientationConfig[orientation],
|
|
3062
3253
|
[orientation]
|
|
3063
3254
|
);
|
|
3064
|
-
const getItemValue =
|
|
3255
|
+
const getItemValue = React11.useCallback(
|
|
3065
3256
|
(item) => {
|
|
3066
3257
|
if (typeof item === "object" && !getItemValueProp) {
|
|
3067
3258
|
throw new Error(
|
|
@@ -3072,17 +3263,17 @@ function Sortable(props) {
|
|
|
3072
3263
|
},
|
|
3073
3264
|
[getItemValueProp]
|
|
3074
3265
|
);
|
|
3075
|
-
const items =
|
|
3266
|
+
const items = React11.useMemo(() => {
|
|
3076
3267
|
return value.map((item) => getItemValue(item));
|
|
3077
3268
|
}, [value, getItemValue]);
|
|
3078
|
-
const onDragStart =
|
|
3269
|
+
const onDragStart = React11.useCallback(
|
|
3079
3270
|
(event) => {
|
|
3080
3271
|
sortableProps.onDragStart?.(event);
|
|
3081
3272
|
setActiveId(event.active.id);
|
|
3082
3273
|
},
|
|
3083
3274
|
[sortableProps.onDragStart]
|
|
3084
3275
|
);
|
|
3085
|
-
const onDragEnd =
|
|
3276
|
+
const onDragEnd = React11.useCallback(
|
|
3086
3277
|
(event) => {
|
|
3087
3278
|
sortableProps.onDragEnd?.(event);
|
|
3088
3279
|
const { active, over } = event;
|
|
@@ -3107,14 +3298,14 @@ function Sortable(props) {
|
|
|
3107
3298
|
},
|
|
3108
3299
|
[value, onValueChange, onMove, getItemValue, sortableProps.onDragEnd]
|
|
3109
3300
|
);
|
|
3110
|
-
const onDragCancel =
|
|
3301
|
+
const onDragCancel = React11.useCallback(
|
|
3111
3302
|
(event) => {
|
|
3112
3303
|
sortableProps.onDragCancel?.(event);
|
|
3113
3304
|
setActiveId(null);
|
|
3114
3305
|
},
|
|
3115
3306
|
[sortableProps.onDragCancel]
|
|
3116
3307
|
);
|
|
3117
|
-
const contextValue =
|
|
3308
|
+
const contextValue = React11.useMemo(
|
|
3118
3309
|
() => ({
|
|
3119
3310
|
id,
|
|
3120
3311
|
items,
|
|
@@ -3137,11 +3328,11 @@ function Sortable(props) {
|
|
|
3137
3328
|
flatCursor
|
|
3138
3329
|
]
|
|
3139
3330
|
);
|
|
3140
|
-
return /* @__PURE__ */
|
|
3331
|
+
return /* @__PURE__ */ jsx28(
|
|
3141
3332
|
SortableRootContext.Provider,
|
|
3142
3333
|
{
|
|
3143
3334
|
value: contextValue,
|
|
3144
|
-
children: /* @__PURE__ */
|
|
3335
|
+
children: /* @__PURE__ */ jsx28(
|
|
3145
3336
|
DndContext,
|
|
3146
3337
|
{
|
|
3147
3338
|
collisionDetection: collisionDetection ?? config.collisionDetection,
|
|
@@ -3158,7 +3349,7 @@ function Sortable(props) {
|
|
|
3158
3349
|
}
|
|
3159
3350
|
);
|
|
3160
3351
|
}
|
|
3161
|
-
var SortableContentContext =
|
|
3352
|
+
var SortableContentContext = React11.createContext(false);
|
|
3162
3353
|
function SortableContent(props) {
|
|
3163
3354
|
const {
|
|
3164
3355
|
strategy: strategyProp,
|
|
@@ -3170,12 +3361,12 @@ function SortableContent(props) {
|
|
|
3170
3361
|
} = props;
|
|
3171
3362
|
const context = useSortableContext(CONTENT_NAME);
|
|
3172
3363
|
const ContentPrimitive = asChild ? SlotPrimitive.Slot : "div";
|
|
3173
|
-
return /* @__PURE__ */
|
|
3364
|
+
return /* @__PURE__ */ jsx28(SortableContentContext.Provider, { value: true, children: /* @__PURE__ */ jsx28(
|
|
3174
3365
|
SortableContext,
|
|
3175
3366
|
{
|
|
3176
3367
|
items: context.items,
|
|
3177
3368
|
strategy: strategyProp ?? context.strategy,
|
|
3178
|
-
children: withoutSlot ? children : /* @__PURE__ */
|
|
3369
|
+
children: withoutSlot ? children : /* @__PURE__ */ jsx28(
|
|
3179
3370
|
ContentPrimitive,
|
|
3180
3371
|
{
|
|
3181
3372
|
"data-slot": "sortable-content",
|
|
@@ -3187,9 +3378,9 @@ function SortableContent(props) {
|
|
|
3187
3378
|
}
|
|
3188
3379
|
) });
|
|
3189
3380
|
}
|
|
3190
|
-
var SortableItemContext =
|
|
3381
|
+
var SortableItemContext = React11.createContext(null);
|
|
3191
3382
|
function useSortableItemContext(consumerName) {
|
|
3192
|
-
const context =
|
|
3383
|
+
const context = React11.useContext(SortableItemContext);
|
|
3193
3384
|
if (!context) {
|
|
3194
3385
|
throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
|
|
3195
3386
|
}
|
|
@@ -3206,8 +3397,8 @@ function SortableItem(props) {
|
|
|
3206
3397
|
ref,
|
|
3207
3398
|
...itemProps
|
|
3208
3399
|
} = props;
|
|
3209
|
-
const inSortableContent =
|
|
3210
|
-
const inSortableOverlay =
|
|
3400
|
+
const inSortableContent = React11.useContext(SortableContentContext);
|
|
3401
|
+
const inSortableOverlay = React11.useContext(SortableOverlayContext);
|
|
3211
3402
|
if (!inSortableContent && !inSortableOverlay) {
|
|
3212
3403
|
throw new Error(
|
|
3213
3404
|
`\`${ITEM_NAME}\` must be used within \`${CONTENT_NAME}\` or \`${OVERLAY_NAME}\``
|
|
@@ -3217,7 +3408,7 @@ function SortableItem(props) {
|
|
|
3217
3408
|
throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
|
|
3218
3409
|
}
|
|
3219
3410
|
const context = useSortableContext(ITEM_NAME);
|
|
3220
|
-
const id =
|
|
3411
|
+
const id = React11.useId();
|
|
3221
3412
|
const {
|
|
3222
3413
|
attributes,
|
|
3223
3414
|
listeners,
|
|
@@ -3233,14 +3424,14 @@ function SortableItem(props) {
|
|
|
3233
3424
|
setNodeRef(node);
|
|
3234
3425
|
if (asHandle) setActivatorNodeRef(node);
|
|
3235
3426
|
});
|
|
3236
|
-
const composedStyle =
|
|
3427
|
+
const composedStyle = React11.useMemo(() => {
|
|
3237
3428
|
return {
|
|
3238
3429
|
transform: CSS.Translate.toString(transform),
|
|
3239
3430
|
transition: prefersReducedMotion ? void 0 : transition,
|
|
3240
3431
|
...style
|
|
3241
3432
|
};
|
|
3242
3433
|
}, [prefersReducedMotion, transform, transition, style]);
|
|
3243
|
-
const itemContext =
|
|
3434
|
+
const itemContext = React11.useMemo(
|
|
3244
3435
|
() => ({
|
|
3245
3436
|
id,
|
|
3246
3437
|
attributes,
|
|
@@ -3252,7 +3443,7 @@ function SortableItem(props) {
|
|
|
3252
3443
|
[id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
|
|
3253
3444
|
);
|
|
3254
3445
|
const ItemPrimitive = asChild ? SlotPrimitive.Slot : "div";
|
|
3255
|
-
return /* @__PURE__ */
|
|
3446
|
+
return /* @__PURE__ */ jsx28(SortableItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx28(
|
|
3256
3447
|
ItemPrimitive,
|
|
3257
3448
|
{
|
|
3258
3449
|
id,
|
|
@@ -3289,7 +3480,7 @@ function SortableItemHandle(props) {
|
|
|
3289
3480
|
itemContext.setActivatorNodeRef(node);
|
|
3290
3481
|
});
|
|
3291
3482
|
const HandlePrimitive = asChild ? SlotPrimitive.Slot : "button";
|
|
3292
|
-
return /* @__PURE__ */
|
|
3483
|
+
return /* @__PURE__ */ jsx28(
|
|
3293
3484
|
HandlePrimitive,
|
|
3294
3485
|
{
|
|
3295
3486
|
type: "button",
|
|
@@ -3311,10 +3502,10 @@ function SortableItemHandle(props) {
|
|
|
3311
3502
|
);
|
|
3312
3503
|
}
|
|
3313
3504
|
function usePrefersReducedMotion() {
|
|
3314
|
-
const [reduced, setReduced] =
|
|
3505
|
+
const [reduced, setReduced] = React11.useState(
|
|
3315
3506
|
() => globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false
|
|
3316
3507
|
);
|
|
3317
|
-
|
|
3508
|
+
React11.useEffect(() => {
|
|
3318
3509
|
const query = globalThis.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
3319
3510
|
if (!query) return;
|
|
3320
3511
|
const update = () => setReduced(query.matches);
|
|
@@ -3324,7 +3515,7 @@ function usePrefersReducedMotion() {
|
|
|
3324
3515
|
}, []);
|
|
3325
3516
|
return reduced;
|
|
3326
3517
|
}
|
|
3327
|
-
var SortableOverlayContext =
|
|
3518
|
+
var SortableOverlayContext = React11.createContext(false);
|
|
3328
3519
|
var defaultDropAnimation = {
|
|
3329
3520
|
sideEffects: defaultDropAnimationSideEffects({
|
|
3330
3521
|
styles: {
|
|
@@ -3343,19 +3534,19 @@ function SortableOverlay(props) {
|
|
|
3343
3534
|
} = props;
|
|
3344
3535
|
const context = useSortableContext(OVERLAY_NAME);
|
|
3345
3536
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
3346
|
-
const [mounted, setMounted] =
|
|
3347
|
-
|
|
3537
|
+
const [mounted, setMounted] = React11.useState(false);
|
|
3538
|
+
React11.useLayoutEffect(() => setMounted(true), []);
|
|
3348
3539
|
const container = containerProp ?? (mounted ? globalThis.document?.body : null);
|
|
3349
3540
|
if (!container) return null;
|
|
3350
3541
|
return ReactDOM.createPortal(
|
|
3351
|
-
/* @__PURE__ */
|
|
3542
|
+
/* @__PURE__ */ jsx28(
|
|
3352
3543
|
DragOverlay,
|
|
3353
3544
|
{
|
|
3354
3545
|
modifiers: context.modifiers,
|
|
3355
3546
|
className: cn(!context.flatCursor && "cursor-grabbing"),
|
|
3356
3547
|
...overlayProps,
|
|
3357
3548
|
dropAnimation: prefersReducedMotion ? null : callerDropAnimation === void 0 ? defaultDropAnimation : callerDropAnimation,
|
|
3358
|
-
children: /* @__PURE__ */
|
|
3549
|
+
children: /* @__PURE__ */ jsx28(SortableOverlayContext.Provider, { value: true, children: context.activeId ? typeof children === "function" ? children({ value: context.activeId }) : children : null })
|
|
3359
3550
|
}
|
|
3360
3551
|
),
|
|
3361
3552
|
container
|
|
@@ -3364,7 +3555,7 @@ function SortableOverlay(props) {
|
|
|
3364
3555
|
|
|
3365
3556
|
// src/components/status-dot/status-dot.tsx
|
|
3366
3557
|
import { cva as cva4 } from "class-variance-authority";
|
|
3367
|
-
import { jsx as
|
|
3558
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3368
3559
|
var statusDotVariants = cva4("inline-flex shrink-0 rounded-full", {
|
|
3369
3560
|
variants: {
|
|
3370
3561
|
tone: {
|
|
@@ -3398,7 +3589,7 @@ function StatusDot({
|
|
|
3398
3589
|
title,
|
|
3399
3590
|
className
|
|
3400
3591
|
}) {
|
|
3401
|
-
return /* @__PURE__ */
|
|
3592
|
+
return /* @__PURE__ */ jsx29(
|
|
3402
3593
|
"span",
|
|
3403
3594
|
{
|
|
3404
3595
|
"aria-hidden": ariaLabel ? void 0 : true,
|
|
@@ -3416,7 +3607,7 @@ function StatusDot({
|
|
|
3416
3607
|
|
|
3417
3608
|
// src/components/switch/switch.tsx
|
|
3418
3609
|
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
3419
|
-
import { jsx as
|
|
3610
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
3420
3611
|
function Switch({
|
|
3421
3612
|
className,
|
|
3422
3613
|
disabled,
|
|
@@ -3424,7 +3615,7 @@ function Switch({
|
|
|
3424
3615
|
size = "default",
|
|
3425
3616
|
...props
|
|
3426
3617
|
}) {
|
|
3427
|
-
return /* @__PURE__ */
|
|
3618
|
+
return /* @__PURE__ */ jsx30(
|
|
3428
3619
|
SwitchPrimitive.Root,
|
|
3429
3620
|
{
|
|
3430
3621
|
"data-slot": "switch",
|
|
@@ -3437,12 +3628,12 @@ function Switch({
|
|
|
3437
3628
|
className
|
|
3438
3629
|
),
|
|
3439
3630
|
...props,
|
|
3440
|
-
children: /* @__PURE__ */
|
|
3631
|
+
children: /* @__PURE__ */ jsx30(
|
|
3441
3632
|
SwitchPrimitive.Thumb,
|
|
3442
3633
|
{
|
|
3443
3634
|
"data-slot": "switch-thumb",
|
|
3444
3635
|
className: "pointer-events-none inline-flex items-center justify-center rounded-full bg-[var(--white-stationary)] ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-[state=checked]:translate-x-[14px] group-data-[size=sm]/switch:data-[state=checked]:translate-x-[10px] group-data-[size=default]/switch:data-[state=unchecked]:translate-x-0 group-data-[size=sm]/switch:data-[state=unchecked]:translate-x-0",
|
|
3445
|
-
children: loading ? /* @__PURE__ */
|
|
3636
|
+
children: loading ? /* @__PURE__ */ jsx30(
|
|
3446
3637
|
LoadingIcon,
|
|
3447
3638
|
{
|
|
3448
3639
|
"aria-hidden": "true",
|
|
@@ -3456,9 +3647,9 @@ function Switch({
|
|
|
3456
3647
|
}
|
|
3457
3648
|
|
|
3458
3649
|
// src/components/textarea/textarea.tsx
|
|
3459
|
-
import { jsx as
|
|
3650
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3460
3651
|
function Textarea({ className, ...props }) {
|
|
3461
|
-
return /* @__PURE__ */
|
|
3652
|
+
return /* @__PURE__ */ jsx31(
|
|
3462
3653
|
"textarea",
|
|
3463
3654
|
{
|
|
3464
3655
|
"data-slot": "textarea",
|
|
@@ -3472,18 +3663,18 @@ function Textarea({ className, ...props }) {
|
|
|
3472
3663
|
}
|
|
3473
3664
|
|
|
3474
3665
|
// src/components/toast/toast.tsx
|
|
3475
|
-
import * as
|
|
3666
|
+
import * as React12 from "react";
|
|
3476
3667
|
import { Toast as ToastPrimitive } from "radix-ui";
|
|
3477
3668
|
import { cva as cva5 } from "class-variance-authority";
|
|
3478
|
-
import { jsx as
|
|
3669
|
+
import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3479
3670
|
var toastDefaultDurationMs = 3e3;
|
|
3480
3671
|
function ToastProvider({
|
|
3481
3672
|
duration = toastDefaultDurationMs,
|
|
3482
3673
|
...props
|
|
3483
3674
|
}) {
|
|
3484
|
-
return /* @__PURE__ */
|
|
3675
|
+
return /* @__PURE__ */ jsx32(ToastPrimitive.Provider, { duration, ...props });
|
|
3485
3676
|
}
|
|
3486
|
-
var ToastVisualContext =
|
|
3677
|
+
var ToastVisualContext = React12.createContext(null);
|
|
3487
3678
|
var toastStatusIconByVariant = {
|
|
3488
3679
|
destructive: FailedFilledIcon,
|
|
3489
3680
|
success: SuccessFilledIcon
|
|
@@ -3507,7 +3698,7 @@ function formatToastText(children) {
|
|
|
3507
3698
|
if (typeof children === "string") {
|
|
3508
3699
|
return stripToastTrailingSentencePunctuation(children);
|
|
3509
3700
|
}
|
|
3510
|
-
const flatChildren =
|
|
3701
|
+
const flatChildren = React12.Children.toArray(children);
|
|
3511
3702
|
if (flatChildren.length === 1 && typeof flatChildren[0] === "string") {
|
|
3512
3703
|
return stripToastTrailingSentencePunctuation(flatChildren[0]);
|
|
3513
3704
|
}
|
|
@@ -3539,7 +3730,7 @@ function ToastRoot({
|
|
|
3539
3730
|
...props
|
|
3540
3731
|
}) {
|
|
3541
3732
|
const isDestructive = variant === "destructive";
|
|
3542
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsx32(
|
|
3543
3734
|
ToastPrimitive.Root,
|
|
3544
3735
|
{
|
|
3545
3736
|
"aria-busy": busy,
|
|
@@ -3556,7 +3747,7 @@ function ToastRoot({
|
|
|
3556
3747
|
...style
|
|
3557
3748
|
},
|
|
3558
3749
|
...props,
|
|
3559
|
-
children: /* @__PURE__ */
|
|
3750
|
+
children: /* @__PURE__ */ jsx32(ToastVisualContext.Provider, { value: { busy, variant }, children: /* @__PURE__ */ jsx32("span", { className: "flex min-w-0 max-w-full flex-col items-center justify-center whitespace-normal break-words text-center", children }) })
|
|
3560
3751
|
}
|
|
3561
3752
|
);
|
|
3562
3753
|
}
|
|
@@ -3565,9 +3756,9 @@ function ToastTitle({
|
|
|
3565
3756
|
children,
|
|
3566
3757
|
...props
|
|
3567
3758
|
}) {
|
|
3568
|
-
const toastVisual =
|
|
3759
|
+
const toastVisual = React12.useContext(ToastVisualContext);
|
|
3569
3760
|
const StatusIcon = toastVisual?.variant && hasToastStatusIcon(toastVisual.variant) ? toastStatusIconByVariant[toastVisual.variant] : null;
|
|
3570
|
-
return /* @__PURE__ */
|
|
3761
|
+
return /* @__PURE__ */ jsxs14(
|
|
3571
3762
|
ToastPrimitive.Title,
|
|
3572
3763
|
{
|
|
3573
3764
|
"data-slot": "toast-title",
|
|
@@ -3577,7 +3768,7 @@ function ToastTitle({
|
|
|
3577
3768
|
),
|
|
3578
3769
|
...props,
|
|
3579
3770
|
children: [
|
|
3580
|
-
toastVisual?.busy ? /* @__PURE__ */
|
|
3771
|
+
toastVisual?.busy ? /* @__PURE__ */ jsx32(
|
|
3581
3772
|
Spinner,
|
|
3582
3773
|
{
|
|
3583
3774
|
className: "shrink-0 text-current",
|
|
@@ -3585,8 +3776,8 @@ function ToastTitle({
|
|
|
3585
3776
|
strokeWidth: 2,
|
|
3586
3777
|
trackColor: "color-mix(in srgb, currentColor 28%, transparent)"
|
|
3587
3778
|
}
|
|
3588
|
-
) : StatusIcon ? /* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3779
|
+
) : StatusIcon ? /* @__PURE__ */ jsx32(StatusIcon, { className: "size-4 shrink-0 text-current" }) : null,
|
|
3780
|
+
/* @__PURE__ */ jsx32("span", { className: "min-w-0 break-words", children: formatToastText(children) })
|
|
3590
3781
|
]
|
|
3591
3782
|
}
|
|
3592
3783
|
);
|
|
@@ -3595,7 +3786,7 @@ function ToastDescription({
|
|
|
3595
3786
|
className,
|
|
3596
3787
|
...props
|
|
3597
3788
|
}) {
|
|
3598
|
-
return /* @__PURE__ */
|
|
3789
|
+
return /* @__PURE__ */ jsx32(
|
|
3599
3790
|
ToastPrimitive.Description,
|
|
3600
3791
|
{
|
|
3601
3792
|
"data-slot": "toast-description",
|
|
@@ -3611,7 +3802,7 @@ function ToastClose({
|
|
|
3611
3802
|
className,
|
|
3612
3803
|
...props
|
|
3613
3804
|
}) {
|
|
3614
|
-
return /* @__PURE__ */
|
|
3805
|
+
return /* @__PURE__ */ jsx32(
|
|
3615
3806
|
ToastPrimitive.Close,
|
|
3616
3807
|
{
|
|
3617
3808
|
"data-slot": "toast-close",
|
|
@@ -3620,7 +3811,7 @@ function ToastClose({
|
|
|
3620
3811
|
className
|
|
3621
3812
|
),
|
|
3622
3813
|
...props,
|
|
3623
|
-
children: /* @__PURE__ */
|
|
3814
|
+
children: /* @__PURE__ */ jsx32(CloseIcon, { className: "size-4" })
|
|
3624
3815
|
}
|
|
3625
3816
|
);
|
|
3626
3817
|
}
|
|
@@ -3629,7 +3820,7 @@ function ToastViewport({
|
|
|
3629
3820
|
style,
|
|
3630
3821
|
...props
|
|
3631
3822
|
}) {
|
|
3632
|
-
return /* @__PURE__ */
|
|
3823
|
+
return /* @__PURE__ */ jsx32(
|
|
3633
3824
|
ToastPrimitive.Viewport,
|
|
3634
3825
|
{
|
|
3635
3826
|
"data-slot": "toast-viewport",
|
|
@@ -3644,8 +3835,8 @@ function ToastViewport({
|
|
|
3644
3835
|
}
|
|
3645
3836
|
|
|
3646
3837
|
// src/components/underline-tabs/underline-tabs.tsx
|
|
3647
|
-
import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect3, useRef as useRef4, useState as
|
|
3648
|
-
import { jsx as
|
|
3838
|
+
import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect3, useRef as useRef4, useState as useState8 } from "react";
|
|
3839
|
+
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3649
3840
|
function UnderlineTabs({
|
|
3650
3841
|
tabs,
|
|
3651
3842
|
value,
|
|
@@ -3663,8 +3854,8 @@ function UnderlineTabs({
|
|
|
3663
3854
|
const viewportRef = useRef4(null);
|
|
3664
3855
|
const rowRef = useRef4(null);
|
|
3665
3856
|
const buttonRefs = useRef4({});
|
|
3666
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
3667
|
-
const [overflow, setOverflow] =
|
|
3857
|
+
const [indicatorStyle, setIndicatorStyle] = useState8({ left: 0, width: 0 });
|
|
3858
|
+
const [overflow, setOverflow] = useState8({
|
|
3668
3859
|
canScrollLeft: false,
|
|
3669
3860
|
canScrollRight: false
|
|
3670
3861
|
});
|
|
@@ -3728,7 +3919,7 @@ function UnderlineTabs({
|
|
|
3728
3919
|
behavior: "smooth"
|
|
3729
3920
|
});
|
|
3730
3921
|
};
|
|
3731
|
-
return /* @__PURE__ */
|
|
3922
|
+
return /* @__PURE__ */ jsxs15(
|
|
3732
3923
|
"div",
|
|
3733
3924
|
{
|
|
3734
3925
|
"aria-label": ariaLabel,
|
|
@@ -3740,7 +3931,7 @@ function UnderlineTabs({
|
|
|
3740
3931
|
"data-testid": testId,
|
|
3741
3932
|
role: "tablist",
|
|
3742
3933
|
children: [
|
|
3743
|
-
/* @__PURE__ */
|
|
3934
|
+
/* @__PURE__ */ jsx33(
|
|
3744
3935
|
"div",
|
|
3745
3936
|
{
|
|
3746
3937
|
ref: viewportRef,
|
|
@@ -3754,7 +3945,7 @@ function UnderlineTabs({
|
|
|
3754
3945
|
"data-can-scroll-right": overflow.canScrollRight ? "true" : "false",
|
|
3755
3946
|
"data-slot": "underline-tabs-viewport",
|
|
3756
3947
|
"data-testid": viewportTestId,
|
|
3757
|
-
children: /* @__PURE__ */
|
|
3948
|
+
children: /* @__PURE__ */ jsxs15(
|
|
3758
3949
|
"div",
|
|
3759
3950
|
{
|
|
3760
3951
|
ref: rowRef,
|
|
@@ -3762,7 +3953,7 @@ function UnderlineTabs({
|
|
|
3762
3953
|
children: [
|
|
3763
3954
|
tabs.map((tab) => {
|
|
3764
3955
|
const isActive = value === tab.value;
|
|
3765
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsxs15(
|
|
3766
3957
|
"button",
|
|
3767
3958
|
{
|
|
3768
3959
|
ref: (element) => {
|
|
@@ -3785,14 +3976,14 @@ function UnderlineTabs({
|
|
|
3785
3976
|
onClick: () => onValueChange(tab.value),
|
|
3786
3977
|
onMouseDown: preventMouseDownDefault ? (event) => event.preventDefault() : void 0,
|
|
3787
3978
|
children: [
|
|
3788
|
-
/* @__PURE__ */
|
|
3789
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
3979
|
+
/* @__PURE__ */ jsx33("span", { children: tab.label }),
|
|
3980
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx33("span", { className: "text-[11px] font-medium leading-6 text-[inherit]", children: tab.count }) : null
|
|
3790
3981
|
]
|
|
3791
3982
|
},
|
|
3792
3983
|
tab.value
|
|
3793
3984
|
);
|
|
3794
3985
|
}),
|
|
3795
|
-
/* @__PURE__ */
|
|
3986
|
+
/* @__PURE__ */ jsx33(
|
|
3796
3987
|
"div",
|
|
3797
3988
|
{
|
|
3798
3989
|
"aria-hidden": true,
|
|
@@ -3809,7 +4000,7 @@ function UnderlineTabs({
|
|
|
3809
4000
|
)
|
|
3810
4001
|
}
|
|
3811
4002
|
),
|
|
3812
|
-
/* @__PURE__ */
|
|
4003
|
+
/* @__PURE__ */ jsx33(
|
|
3813
4004
|
"button",
|
|
3814
4005
|
{
|
|
3815
4006
|
"aria-label": scrollLeftLabel,
|
|
@@ -3820,10 +4011,10 @@ function UnderlineTabs({
|
|
|
3820
4011
|
disabled: !overflow.canScrollLeft,
|
|
3821
4012
|
type: "button",
|
|
3822
4013
|
onClick: () => scrollTabs("left"),
|
|
3823
|
-
children: /* @__PURE__ */
|
|
4014
|
+
children: /* @__PURE__ */ jsx33(ArrowLeftIcon, { size: 16 })
|
|
3824
4015
|
}
|
|
3825
4016
|
),
|
|
3826
|
-
/* @__PURE__ */
|
|
4017
|
+
/* @__PURE__ */ jsx33(
|
|
3827
4018
|
"button",
|
|
3828
4019
|
{
|
|
3829
4020
|
"aria-label": scrollRightLabel,
|
|
@@ -3834,7 +4025,7 @@ function UnderlineTabs({
|
|
|
3834
4025
|
disabled: !overflow.canScrollRight,
|
|
3835
4026
|
type: "button",
|
|
3836
4027
|
onClick: () => scrollTabs("right"),
|
|
3837
|
-
children: /* @__PURE__ */
|
|
4028
|
+
children: /* @__PURE__ */ jsx33(ArrowRightIcon, { size: 16 })
|
|
3838
4029
|
}
|
|
3839
4030
|
)
|
|
3840
4031
|
]
|
|
@@ -3843,9 +4034,9 @@ function UnderlineTabs({
|
|
|
3843
4034
|
}
|
|
3844
4035
|
|
|
3845
4036
|
// src/components/viewport-menu-surface/viewport-menu-surface.tsx
|
|
3846
|
-
import * as
|
|
4037
|
+
import * as React13 from "react";
|
|
3847
4038
|
import { createPortal as createPortal3 } from "react-dom";
|
|
3848
|
-
import { jsx as
|
|
4039
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3849
4040
|
var VIEWPORT_MENU_PADDING = 12;
|
|
3850
4041
|
var MENU_BOUNDARY_PADDING = 8;
|
|
3851
4042
|
function clampMenuCoordinate(origin, size, viewportExtent, padding) {
|
|
@@ -3957,7 +4148,7 @@ function assignRef(ref, value) {
|
|
|
3957
4148
|
function callHandler(handler, event) {
|
|
3958
4149
|
handler?.(event);
|
|
3959
4150
|
}
|
|
3960
|
-
var ViewportMenuSurface =
|
|
4151
|
+
var ViewportMenuSurface = React13.forwardRef(function ViewportMenuSurface2({
|
|
3961
4152
|
open,
|
|
3962
4153
|
placement,
|
|
3963
4154
|
children,
|
|
@@ -3973,16 +4164,16 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
3973
4164
|
className,
|
|
3974
4165
|
...rest
|
|
3975
4166
|
}, forwardedRef) {
|
|
3976
|
-
const surfaceRef =
|
|
3977
|
-
const [measuredSize, setMeasuredSize] =
|
|
3978
|
-
const setRefs2 =
|
|
4167
|
+
const surfaceRef = React13.useRef(null);
|
|
4168
|
+
const [measuredSize, setMeasuredSize] = React13.useState(null);
|
|
4169
|
+
const setRefs2 = React13.useCallback(
|
|
3979
4170
|
(node) => {
|
|
3980
4171
|
surfaceRef.current = node;
|
|
3981
4172
|
assignRef(forwardedRef, node);
|
|
3982
4173
|
},
|
|
3983
4174
|
[forwardedRef]
|
|
3984
4175
|
);
|
|
3985
|
-
|
|
4176
|
+
React13.useLayoutEffect(() => {
|
|
3986
4177
|
if (!open) {
|
|
3987
4178
|
setMeasuredSize(null);
|
|
3988
4179
|
return;
|
|
@@ -4006,7 +4197,7 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
4006
4197
|
observer.observe(element);
|
|
4007
4198
|
return () => observer.disconnect();
|
|
4008
4199
|
}, [open, placement]);
|
|
4009
|
-
|
|
4200
|
+
React13.useEffect(() => {
|
|
4010
4201
|
if (!open) {
|
|
4011
4202
|
return;
|
|
4012
4203
|
}
|
|
@@ -4063,7 +4254,7 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
4063
4254
|
onDismiss,
|
|
4064
4255
|
open
|
|
4065
4256
|
]);
|
|
4066
|
-
const resolvedPlacement =
|
|
4257
|
+
const resolvedPlacement = React13.useMemo(() => {
|
|
4067
4258
|
if (placement.type === "absolute") {
|
|
4068
4259
|
const boundary2 = resolveMenuBoundaryFromPoint(
|
|
4069
4260
|
placement.boundaryPoint ?? {
|
|
@@ -4115,7 +4306,7 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
4115
4306
|
}
|
|
4116
4307
|
const portalTarget = resolvedPlacement.portalTarget ?? document.body;
|
|
4117
4308
|
return createPortal3(
|
|
4118
|
-
/* @__PURE__ */
|
|
4309
|
+
/* @__PURE__ */ jsx34(
|
|
4119
4310
|
MenuSurface,
|
|
4120
4311
|
{
|
|
4121
4312
|
...rest,
|
|
@@ -4162,6 +4353,19 @@ export {
|
|
|
4162
4353
|
CardContent,
|
|
4163
4354
|
CardFooter,
|
|
4164
4355
|
Checkbox,
|
|
4356
|
+
Input,
|
|
4357
|
+
menuSurfaceClassName,
|
|
4358
|
+
menuItemClassName,
|
|
4359
|
+
menuItemWithIndicatorClassName,
|
|
4360
|
+
menuItemIndicatorClassName,
|
|
4361
|
+
MenuSurface,
|
|
4362
|
+
Popover,
|
|
4363
|
+
PopoverTrigger,
|
|
4364
|
+
PopoverPortal,
|
|
4365
|
+
PopoverClose,
|
|
4366
|
+
PopoverContent,
|
|
4367
|
+
PopoverAnchor,
|
|
4368
|
+
Combobox,
|
|
4165
4369
|
Dialog,
|
|
4166
4370
|
DialogTrigger,
|
|
4167
4371
|
DialogPortal,
|
|
@@ -4173,11 +4377,6 @@ export {
|
|
|
4173
4377
|
DialogTitle,
|
|
4174
4378
|
DialogDescription,
|
|
4175
4379
|
ConfirmationDialog,
|
|
4176
|
-
menuSurfaceClassName,
|
|
4177
|
-
menuItemClassName,
|
|
4178
|
-
menuItemWithIndicatorClassName,
|
|
4179
|
-
menuItemIndicatorClassName,
|
|
4180
|
-
MenuSurface,
|
|
4181
4380
|
ContextMenu,
|
|
4182
4381
|
ContextMenuTrigger,
|
|
4183
4382
|
ContextMenuContent,
|
|
@@ -4212,7 +4411,6 @@ export {
|
|
|
4212
4411
|
DropdownMenuSub,
|
|
4213
4412
|
DropdownMenuSubTrigger,
|
|
4214
4413
|
DropdownMenuSubContent,
|
|
4215
|
-
Input,
|
|
4216
4414
|
TooltipProvider,
|
|
4217
4415
|
Tooltip,
|
|
4218
4416
|
TooltipTrigger,
|
|
@@ -4221,12 +4419,6 @@ export {
|
|
|
4221
4419
|
useTextOverflow,
|
|
4222
4420
|
TruncatingPillLabel,
|
|
4223
4421
|
MentionPill,
|
|
4224
|
-
Popover,
|
|
4225
|
-
PopoverTrigger,
|
|
4226
|
-
PopoverPortal,
|
|
4227
|
-
PopoverClose,
|
|
4228
|
-
PopoverContent,
|
|
4229
|
-
PopoverAnchor,
|
|
4230
4422
|
RadioIndicator,
|
|
4231
4423
|
ResizablePanelGroup,
|
|
4232
4424
|
ResizablePanel,
|
|
@@ -4273,4 +4465,4 @@ export {
|
|
|
4273
4465
|
UnderlineTabs,
|
|
4274
4466
|
ViewportMenuSurface
|
|
4275
4467
|
};
|
|
4276
|
-
//# sourceMappingURL=chunk-
|
|
4468
|
+
//# sourceMappingURL=chunk-S74ESIMT.js.map
|