@tutti-os/ui-system 0.0.189 → 0.0.191
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-OW6744SQ.js} +700 -444
- package/dist/chunk-OW6744SQ.js.map +1 -0
- package/dist/components/index.d.ts +43 -2
- package/dist/components/index.js +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/dist/metadata/components.json +40 -0
- package/dist/metadata/index.js +40 -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",
|
|
@@ -2853,14 +3044,77 @@ function ShortcutBadge({ className, ...props }) {
|
|
|
2853
3044
|
);
|
|
2854
3045
|
}
|
|
2855
3046
|
|
|
3047
|
+
// src/components/slider/slider.tsx
|
|
3048
|
+
import * as React10 from "react";
|
|
3049
|
+
import { Slider as SliderPrimitive } from "radix-ui";
|
|
3050
|
+
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3051
|
+
function Slider({
|
|
3052
|
+
"aria-label": ariaLabel,
|
|
3053
|
+
"aria-labelledby": ariaLabelledBy,
|
|
3054
|
+
className,
|
|
3055
|
+
defaultValue,
|
|
3056
|
+
value,
|
|
3057
|
+
min = 0,
|
|
3058
|
+
max = 100,
|
|
3059
|
+
thumbAriaLabels,
|
|
3060
|
+
...props
|
|
3061
|
+
}) {
|
|
3062
|
+
const values = React10.useMemo(
|
|
3063
|
+
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min],
|
|
3064
|
+
[defaultValue, min, value]
|
|
3065
|
+
);
|
|
3066
|
+
return /* @__PURE__ */ jsxs14(
|
|
3067
|
+
SliderPrimitive.Root,
|
|
3068
|
+
{
|
|
3069
|
+
"data-slot": "slider",
|
|
3070
|
+
defaultValue,
|
|
3071
|
+
value,
|
|
3072
|
+
min,
|
|
3073
|
+
max,
|
|
3074
|
+
className: cn(
|
|
3075
|
+
"relative flex w-full touch-none items-center select-none outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
3076
|
+
className
|
|
3077
|
+
),
|
|
3078
|
+
...props,
|
|
3079
|
+
children: [
|
|
3080
|
+
/* @__PURE__ */ jsx26(
|
|
3081
|
+
SliderPrimitive.Track,
|
|
3082
|
+
{
|
|
3083
|
+
"data-slot": "slider-track",
|
|
3084
|
+
className: "relative grow overflow-hidden rounded-full bg-[var(--transparency-block)] data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1",
|
|
3085
|
+
children: /* @__PURE__ */ jsx26(
|
|
3086
|
+
SliderPrimitive.Range,
|
|
3087
|
+
{
|
|
3088
|
+
"data-slot": "slider-range",
|
|
3089
|
+
className: "absolute bg-[var(--tutti-purple)] select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
3090
|
+
}
|
|
3091
|
+
)
|
|
3092
|
+
}
|
|
3093
|
+
),
|
|
3094
|
+
Array.from({ length: values.length }, (_, index) => /* @__PURE__ */ jsx26(
|
|
3095
|
+
SliderPrimitive.Thumb,
|
|
3096
|
+
{
|
|
3097
|
+
"aria-disabled": props.disabled || void 0,
|
|
3098
|
+
"aria-label": thumbAriaLabels?.[index] ?? (values.length === 1 ? ariaLabel : void 0),
|
|
3099
|
+
"aria-labelledby": values.length === 1 ? ariaLabelledBy : void 0,
|
|
3100
|
+
"data-slot": "slider-thumb",
|
|
3101
|
+
className: "relative block size-3 shrink-0 rounded-full border border-[var(--tutti-purple)] bg-[var(--background-fronted)] shadow-none transition-[box-shadow] outline-none select-none after:absolute after:-inset-2 hover:ring-3 hover:ring-[color-mix(in_srgb,var(--tutti-purple)_20%,transparent)] focus-visible:ring-3 focus-visible:ring-[color-mix(in_srgb,var(--border-focus)_30%,transparent)] data-disabled:pointer-events-none data-disabled:hover:ring-0"
|
|
3102
|
+
},
|
|
3103
|
+
index
|
|
3104
|
+
))
|
|
3105
|
+
]
|
|
3106
|
+
}
|
|
3107
|
+
);
|
|
3108
|
+
}
|
|
3109
|
+
|
|
2856
3110
|
// src/components/sonner/sonner.tsx
|
|
2857
3111
|
import {
|
|
2858
3112
|
Toaster as SonnerToaster,
|
|
2859
3113
|
toast
|
|
2860
3114
|
} from "sonner";
|
|
2861
|
-
import { jsx as
|
|
3115
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2862
3116
|
function Toaster({ toastOptions, style, ...props }) {
|
|
2863
|
-
return /* @__PURE__ */
|
|
3117
|
+
return /* @__PURE__ */ jsx27(
|
|
2864
3118
|
SonnerToaster,
|
|
2865
3119
|
{
|
|
2866
3120
|
closeButton: true,
|
|
@@ -2869,11 +3123,11 @@ function Toaster({ toastOptions, style, ...props }) {
|
|
|
2869
3123
|
position: "top-right",
|
|
2870
3124
|
visibleToasts: 4,
|
|
2871
3125
|
icons: {
|
|
2872
|
-
error: /* @__PURE__ */
|
|
2873
|
-
info: /* @__PURE__ */
|
|
2874
|
-
loading: /* @__PURE__ */
|
|
2875
|
-
success: /* @__PURE__ */
|
|
2876
|
-
warning: /* @__PURE__ */
|
|
3126
|
+
error: /* @__PURE__ */ jsx27(FailedFilledIcon, { className: "size-4" }),
|
|
3127
|
+
info: /* @__PURE__ */ jsx27(WarningLinedIcon, { className: "size-4" }),
|
|
3128
|
+
loading: /* @__PURE__ */ jsx27(LoadingIcon, { className: "size-4 animate-spin" }),
|
|
3129
|
+
success: /* @__PURE__ */ jsx27(SuccessFilledIcon, { className: "size-4" }),
|
|
3130
|
+
warning: /* @__PURE__ */ jsx27(WarningFilledIcon, { className: "size-4" })
|
|
2877
3131
|
},
|
|
2878
3132
|
style: {
|
|
2879
3133
|
"--normal-bg": "var(--background-fronted)",
|
|
@@ -2902,7 +3156,7 @@ function Toaster({ toastOptions, style, ...props }) {
|
|
|
2902
3156
|
}
|
|
2903
3157
|
|
|
2904
3158
|
// src/components/spinner/spinner.tsx
|
|
2905
|
-
import { jsx as
|
|
3159
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2906
3160
|
function Spinner({
|
|
2907
3161
|
className,
|
|
2908
3162
|
size = 16,
|
|
@@ -2911,7 +3165,7 @@ function Spinner({
|
|
|
2911
3165
|
testId,
|
|
2912
3166
|
trackColor
|
|
2913
3167
|
}) {
|
|
2914
|
-
return /* @__PURE__ */
|
|
3168
|
+
return /* @__PURE__ */ jsx28(
|
|
2915
3169
|
LoadingIcon,
|
|
2916
3170
|
{
|
|
2917
3171
|
"data-slot": "spinner",
|
|
@@ -2957,11 +3211,11 @@ import {
|
|
|
2957
3211
|
} from "@dnd-kit/sortable";
|
|
2958
3212
|
import { CSS } from "@dnd-kit/utilities";
|
|
2959
3213
|
import { Slot as SlotPrimitive } from "radix-ui";
|
|
2960
|
-
import * as
|
|
3214
|
+
import * as React12 from "react";
|
|
2961
3215
|
import * as ReactDOM from "react-dom";
|
|
2962
3216
|
|
|
2963
3217
|
// src/lib/compose-refs.ts
|
|
2964
|
-
import * as
|
|
3218
|
+
import * as React11 from "react";
|
|
2965
3219
|
function setRef(ref, value) {
|
|
2966
3220
|
if (typeof ref === "function") {
|
|
2967
3221
|
return ref(value);
|
|
@@ -2995,11 +3249,11 @@ function composeRefs(...refs) {
|
|
|
2995
3249
|
};
|
|
2996
3250
|
}
|
|
2997
3251
|
function useComposedRefs(...refs) {
|
|
2998
|
-
return
|
|
3252
|
+
return React11.useCallback(composeRefs(...refs), refs);
|
|
2999
3253
|
}
|
|
3000
3254
|
|
|
3001
3255
|
// src/components/sortable/sortable.tsx
|
|
3002
|
-
import { jsx as
|
|
3256
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3003
3257
|
var orientationConfig = {
|
|
3004
3258
|
vertical: {
|
|
3005
3259
|
modifiers: [restrictToVerticalAxis, restrictToParentElement],
|
|
@@ -3022,9 +3276,9 @@ var CONTENT_NAME = "SortableContent";
|
|
|
3022
3276
|
var ITEM_NAME = "SortableItem";
|
|
3023
3277
|
var ITEM_HANDLE_NAME = "SortableItemHandle";
|
|
3024
3278
|
var OVERLAY_NAME = "SortableOverlay";
|
|
3025
|
-
var SortableRootContext =
|
|
3279
|
+
var SortableRootContext = React12.createContext(null);
|
|
3026
3280
|
function useSortableContext(consumerName) {
|
|
3027
|
-
const context =
|
|
3281
|
+
const context = React12.useContext(SortableRootContext);
|
|
3028
3282
|
if (!context) {
|
|
3029
3283
|
throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
|
|
3030
3284
|
}
|
|
@@ -3044,8 +3298,8 @@ function Sortable(props) {
|
|
|
3044
3298
|
accessibility,
|
|
3045
3299
|
...sortableProps
|
|
3046
3300
|
} = props;
|
|
3047
|
-
const id =
|
|
3048
|
-
const [activeId, setActiveId] =
|
|
3301
|
+
const id = React12.useId();
|
|
3302
|
+
const [activeId, setActiveId] = React12.useState(null);
|
|
3049
3303
|
const sensors = useSensors(
|
|
3050
3304
|
useSensor(MouseSensor, {
|
|
3051
3305
|
activationConstraint: { distance: 6 }
|
|
@@ -3057,11 +3311,11 @@ function Sortable(props) {
|
|
|
3057
3311
|
coordinateGetter: sortableKeyboardCoordinates
|
|
3058
3312
|
})
|
|
3059
3313
|
);
|
|
3060
|
-
const config =
|
|
3314
|
+
const config = React12.useMemo(
|
|
3061
3315
|
() => orientationConfig[orientation],
|
|
3062
3316
|
[orientation]
|
|
3063
3317
|
);
|
|
3064
|
-
const getItemValue =
|
|
3318
|
+
const getItemValue = React12.useCallback(
|
|
3065
3319
|
(item) => {
|
|
3066
3320
|
if (typeof item === "object" && !getItemValueProp) {
|
|
3067
3321
|
throw new Error(
|
|
@@ -3072,17 +3326,17 @@ function Sortable(props) {
|
|
|
3072
3326
|
},
|
|
3073
3327
|
[getItemValueProp]
|
|
3074
3328
|
);
|
|
3075
|
-
const items =
|
|
3329
|
+
const items = React12.useMemo(() => {
|
|
3076
3330
|
return value.map((item) => getItemValue(item));
|
|
3077
3331
|
}, [value, getItemValue]);
|
|
3078
|
-
const onDragStart =
|
|
3332
|
+
const onDragStart = React12.useCallback(
|
|
3079
3333
|
(event) => {
|
|
3080
3334
|
sortableProps.onDragStart?.(event);
|
|
3081
3335
|
setActiveId(event.active.id);
|
|
3082
3336
|
},
|
|
3083
3337
|
[sortableProps.onDragStart]
|
|
3084
3338
|
);
|
|
3085
|
-
const onDragEnd =
|
|
3339
|
+
const onDragEnd = React12.useCallback(
|
|
3086
3340
|
(event) => {
|
|
3087
3341
|
sortableProps.onDragEnd?.(event);
|
|
3088
3342
|
const { active, over } = event;
|
|
@@ -3107,14 +3361,14 @@ function Sortable(props) {
|
|
|
3107
3361
|
},
|
|
3108
3362
|
[value, onValueChange, onMove, getItemValue, sortableProps.onDragEnd]
|
|
3109
3363
|
);
|
|
3110
|
-
const onDragCancel =
|
|
3364
|
+
const onDragCancel = React12.useCallback(
|
|
3111
3365
|
(event) => {
|
|
3112
3366
|
sortableProps.onDragCancel?.(event);
|
|
3113
3367
|
setActiveId(null);
|
|
3114
3368
|
},
|
|
3115
3369
|
[sortableProps.onDragCancel]
|
|
3116
3370
|
);
|
|
3117
|
-
const contextValue =
|
|
3371
|
+
const contextValue = React12.useMemo(
|
|
3118
3372
|
() => ({
|
|
3119
3373
|
id,
|
|
3120
3374
|
items,
|
|
@@ -3137,11 +3391,11 @@ function Sortable(props) {
|
|
|
3137
3391
|
flatCursor
|
|
3138
3392
|
]
|
|
3139
3393
|
);
|
|
3140
|
-
return /* @__PURE__ */
|
|
3394
|
+
return /* @__PURE__ */ jsx29(
|
|
3141
3395
|
SortableRootContext.Provider,
|
|
3142
3396
|
{
|
|
3143
3397
|
value: contextValue,
|
|
3144
|
-
children: /* @__PURE__ */
|
|
3398
|
+
children: /* @__PURE__ */ jsx29(
|
|
3145
3399
|
DndContext,
|
|
3146
3400
|
{
|
|
3147
3401
|
collisionDetection: collisionDetection ?? config.collisionDetection,
|
|
@@ -3158,7 +3412,7 @@ function Sortable(props) {
|
|
|
3158
3412
|
}
|
|
3159
3413
|
);
|
|
3160
3414
|
}
|
|
3161
|
-
var SortableContentContext =
|
|
3415
|
+
var SortableContentContext = React12.createContext(false);
|
|
3162
3416
|
function SortableContent(props) {
|
|
3163
3417
|
const {
|
|
3164
3418
|
strategy: strategyProp,
|
|
@@ -3170,12 +3424,12 @@ function SortableContent(props) {
|
|
|
3170
3424
|
} = props;
|
|
3171
3425
|
const context = useSortableContext(CONTENT_NAME);
|
|
3172
3426
|
const ContentPrimitive = asChild ? SlotPrimitive.Slot : "div";
|
|
3173
|
-
return /* @__PURE__ */
|
|
3427
|
+
return /* @__PURE__ */ jsx29(SortableContentContext.Provider, { value: true, children: /* @__PURE__ */ jsx29(
|
|
3174
3428
|
SortableContext,
|
|
3175
3429
|
{
|
|
3176
3430
|
items: context.items,
|
|
3177
3431
|
strategy: strategyProp ?? context.strategy,
|
|
3178
|
-
children: withoutSlot ? children : /* @__PURE__ */
|
|
3432
|
+
children: withoutSlot ? children : /* @__PURE__ */ jsx29(
|
|
3179
3433
|
ContentPrimitive,
|
|
3180
3434
|
{
|
|
3181
3435
|
"data-slot": "sortable-content",
|
|
@@ -3187,9 +3441,9 @@ function SortableContent(props) {
|
|
|
3187
3441
|
}
|
|
3188
3442
|
) });
|
|
3189
3443
|
}
|
|
3190
|
-
var SortableItemContext =
|
|
3444
|
+
var SortableItemContext = React12.createContext(null);
|
|
3191
3445
|
function useSortableItemContext(consumerName) {
|
|
3192
|
-
const context =
|
|
3446
|
+
const context = React12.useContext(SortableItemContext);
|
|
3193
3447
|
if (!context) {
|
|
3194
3448
|
throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
|
|
3195
3449
|
}
|
|
@@ -3206,8 +3460,8 @@ function SortableItem(props) {
|
|
|
3206
3460
|
ref,
|
|
3207
3461
|
...itemProps
|
|
3208
3462
|
} = props;
|
|
3209
|
-
const inSortableContent =
|
|
3210
|
-
const inSortableOverlay =
|
|
3463
|
+
const inSortableContent = React12.useContext(SortableContentContext);
|
|
3464
|
+
const inSortableOverlay = React12.useContext(SortableOverlayContext);
|
|
3211
3465
|
if (!inSortableContent && !inSortableOverlay) {
|
|
3212
3466
|
throw new Error(
|
|
3213
3467
|
`\`${ITEM_NAME}\` must be used within \`${CONTENT_NAME}\` or \`${OVERLAY_NAME}\``
|
|
@@ -3217,7 +3471,7 @@ function SortableItem(props) {
|
|
|
3217
3471
|
throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
|
|
3218
3472
|
}
|
|
3219
3473
|
const context = useSortableContext(ITEM_NAME);
|
|
3220
|
-
const id =
|
|
3474
|
+
const id = React12.useId();
|
|
3221
3475
|
const {
|
|
3222
3476
|
attributes,
|
|
3223
3477
|
listeners,
|
|
@@ -3233,14 +3487,14 @@ function SortableItem(props) {
|
|
|
3233
3487
|
setNodeRef(node);
|
|
3234
3488
|
if (asHandle) setActivatorNodeRef(node);
|
|
3235
3489
|
});
|
|
3236
|
-
const composedStyle =
|
|
3490
|
+
const composedStyle = React12.useMemo(() => {
|
|
3237
3491
|
return {
|
|
3238
3492
|
transform: CSS.Translate.toString(transform),
|
|
3239
3493
|
transition: prefersReducedMotion ? void 0 : transition,
|
|
3240
3494
|
...style
|
|
3241
3495
|
};
|
|
3242
3496
|
}, [prefersReducedMotion, transform, transition, style]);
|
|
3243
|
-
const itemContext =
|
|
3497
|
+
const itemContext = React12.useMemo(
|
|
3244
3498
|
() => ({
|
|
3245
3499
|
id,
|
|
3246
3500
|
attributes,
|
|
@@ -3252,7 +3506,7 @@ function SortableItem(props) {
|
|
|
3252
3506
|
[id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
|
|
3253
3507
|
);
|
|
3254
3508
|
const ItemPrimitive = asChild ? SlotPrimitive.Slot : "div";
|
|
3255
|
-
return /* @__PURE__ */
|
|
3509
|
+
return /* @__PURE__ */ jsx29(SortableItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx29(
|
|
3256
3510
|
ItemPrimitive,
|
|
3257
3511
|
{
|
|
3258
3512
|
id,
|
|
@@ -3289,7 +3543,7 @@ function SortableItemHandle(props) {
|
|
|
3289
3543
|
itemContext.setActivatorNodeRef(node);
|
|
3290
3544
|
});
|
|
3291
3545
|
const HandlePrimitive = asChild ? SlotPrimitive.Slot : "button";
|
|
3292
|
-
return /* @__PURE__ */
|
|
3546
|
+
return /* @__PURE__ */ jsx29(
|
|
3293
3547
|
HandlePrimitive,
|
|
3294
3548
|
{
|
|
3295
3549
|
type: "button",
|
|
@@ -3311,10 +3565,10 @@ function SortableItemHandle(props) {
|
|
|
3311
3565
|
);
|
|
3312
3566
|
}
|
|
3313
3567
|
function usePrefersReducedMotion() {
|
|
3314
|
-
const [reduced, setReduced] =
|
|
3568
|
+
const [reduced, setReduced] = React12.useState(
|
|
3315
3569
|
() => globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false
|
|
3316
3570
|
);
|
|
3317
|
-
|
|
3571
|
+
React12.useEffect(() => {
|
|
3318
3572
|
const query = globalThis.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
3319
3573
|
if (!query) return;
|
|
3320
3574
|
const update = () => setReduced(query.matches);
|
|
@@ -3324,7 +3578,7 @@ function usePrefersReducedMotion() {
|
|
|
3324
3578
|
}, []);
|
|
3325
3579
|
return reduced;
|
|
3326
3580
|
}
|
|
3327
|
-
var SortableOverlayContext =
|
|
3581
|
+
var SortableOverlayContext = React12.createContext(false);
|
|
3328
3582
|
var defaultDropAnimation = {
|
|
3329
3583
|
sideEffects: defaultDropAnimationSideEffects({
|
|
3330
3584
|
styles: {
|
|
@@ -3343,19 +3597,19 @@ function SortableOverlay(props) {
|
|
|
3343
3597
|
} = props;
|
|
3344
3598
|
const context = useSortableContext(OVERLAY_NAME);
|
|
3345
3599
|
const prefersReducedMotion = usePrefersReducedMotion();
|
|
3346
|
-
const [mounted, setMounted] =
|
|
3347
|
-
|
|
3600
|
+
const [mounted, setMounted] = React12.useState(false);
|
|
3601
|
+
React12.useLayoutEffect(() => setMounted(true), []);
|
|
3348
3602
|
const container = containerProp ?? (mounted ? globalThis.document?.body : null);
|
|
3349
3603
|
if (!container) return null;
|
|
3350
3604
|
return ReactDOM.createPortal(
|
|
3351
|
-
/* @__PURE__ */
|
|
3605
|
+
/* @__PURE__ */ jsx29(
|
|
3352
3606
|
DragOverlay,
|
|
3353
3607
|
{
|
|
3354
3608
|
modifiers: context.modifiers,
|
|
3355
3609
|
className: cn(!context.flatCursor && "cursor-grabbing"),
|
|
3356
3610
|
...overlayProps,
|
|
3357
3611
|
dropAnimation: prefersReducedMotion ? null : callerDropAnimation === void 0 ? defaultDropAnimation : callerDropAnimation,
|
|
3358
|
-
children: /* @__PURE__ */
|
|
3612
|
+
children: /* @__PURE__ */ jsx29(SortableOverlayContext.Provider, { value: true, children: context.activeId ? typeof children === "function" ? children({ value: context.activeId }) : children : null })
|
|
3359
3613
|
}
|
|
3360
3614
|
),
|
|
3361
3615
|
container
|
|
@@ -3364,7 +3618,7 @@ function SortableOverlay(props) {
|
|
|
3364
3618
|
|
|
3365
3619
|
// src/components/status-dot/status-dot.tsx
|
|
3366
3620
|
import { cva as cva4 } from "class-variance-authority";
|
|
3367
|
-
import { jsx as
|
|
3621
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
3368
3622
|
var statusDotVariants = cva4("inline-flex shrink-0 rounded-full", {
|
|
3369
3623
|
variants: {
|
|
3370
3624
|
tone: {
|
|
@@ -3398,7 +3652,7 @@ function StatusDot({
|
|
|
3398
3652
|
title,
|
|
3399
3653
|
className
|
|
3400
3654
|
}) {
|
|
3401
|
-
return /* @__PURE__ */
|
|
3655
|
+
return /* @__PURE__ */ jsx30(
|
|
3402
3656
|
"span",
|
|
3403
3657
|
{
|
|
3404
3658
|
"aria-hidden": ariaLabel ? void 0 : true,
|
|
@@ -3416,7 +3670,7 @@ function StatusDot({
|
|
|
3416
3670
|
|
|
3417
3671
|
// src/components/switch/switch.tsx
|
|
3418
3672
|
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
3419
|
-
import { jsx as
|
|
3673
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3420
3674
|
function Switch({
|
|
3421
3675
|
className,
|
|
3422
3676
|
disabled,
|
|
@@ -3424,7 +3678,7 @@ function Switch({
|
|
|
3424
3678
|
size = "default",
|
|
3425
3679
|
...props
|
|
3426
3680
|
}) {
|
|
3427
|
-
return /* @__PURE__ */
|
|
3681
|
+
return /* @__PURE__ */ jsx31(
|
|
3428
3682
|
SwitchPrimitive.Root,
|
|
3429
3683
|
{
|
|
3430
3684
|
"data-slot": "switch",
|
|
@@ -3437,12 +3691,12 @@ function Switch({
|
|
|
3437
3691
|
className
|
|
3438
3692
|
),
|
|
3439
3693
|
...props,
|
|
3440
|
-
children: /* @__PURE__ */
|
|
3694
|
+
children: /* @__PURE__ */ jsx31(
|
|
3441
3695
|
SwitchPrimitive.Thumb,
|
|
3442
3696
|
{
|
|
3443
3697
|
"data-slot": "switch-thumb",
|
|
3444
3698
|
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__ */
|
|
3699
|
+
children: loading ? /* @__PURE__ */ jsx31(
|
|
3446
3700
|
LoadingIcon,
|
|
3447
3701
|
{
|
|
3448
3702
|
"aria-hidden": "true",
|
|
@@ -3456,9 +3710,9 @@ function Switch({
|
|
|
3456
3710
|
}
|
|
3457
3711
|
|
|
3458
3712
|
// src/components/textarea/textarea.tsx
|
|
3459
|
-
import { jsx as
|
|
3713
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3460
3714
|
function Textarea({ className, ...props }) {
|
|
3461
|
-
return /* @__PURE__ */
|
|
3715
|
+
return /* @__PURE__ */ jsx32(
|
|
3462
3716
|
"textarea",
|
|
3463
3717
|
{
|
|
3464
3718
|
"data-slot": "textarea",
|
|
@@ -3472,18 +3726,18 @@ function Textarea({ className, ...props }) {
|
|
|
3472
3726
|
}
|
|
3473
3727
|
|
|
3474
3728
|
// src/components/toast/toast.tsx
|
|
3475
|
-
import * as
|
|
3729
|
+
import * as React13 from "react";
|
|
3476
3730
|
import { Toast as ToastPrimitive } from "radix-ui";
|
|
3477
3731
|
import { cva as cva5 } from "class-variance-authority";
|
|
3478
|
-
import { jsx as
|
|
3732
|
+
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3479
3733
|
var toastDefaultDurationMs = 3e3;
|
|
3480
3734
|
function ToastProvider({
|
|
3481
3735
|
duration = toastDefaultDurationMs,
|
|
3482
3736
|
...props
|
|
3483
3737
|
}) {
|
|
3484
|
-
return /* @__PURE__ */
|
|
3738
|
+
return /* @__PURE__ */ jsx33(ToastPrimitive.Provider, { duration, ...props });
|
|
3485
3739
|
}
|
|
3486
|
-
var ToastVisualContext =
|
|
3740
|
+
var ToastVisualContext = React13.createContext(null);
|
|
3487
3741
|
var toastStatusIconByVariant = {
|
|
3488
3742
|
destructive: FailedFilledIcon,
|
|
3489
3743
|
success: SuccessFilledIcon
|
|
@@ -3507,7 +3761,7 @@ function formatToastText(children) {
|
|
|
3507
3761
|
if (typeof children === "string") {
|
|
3508
3762
|
return stripToastTrailingSentencePunctuation(children);
|
|
3509
3763
|
}
|
|
3510
|
-
const flatChildren =
|
|
3764
|
+
const flatChildren = React13.Children.toArray(children);
|
|
3511
3765
|
if (flatChildren.length === 1 && typeof flatChildren[0] === "string") {
|
|
3512
3766
|
return stripToastTrailingSentencePunctuation(flatChildren[0]);
|
|
3513
3767
|
}
|
|
@@ -3539,7 +3793,7 @@ function ToastRoot({
|
|
|
3539
3793
|
...props
|
|
3540
3794
|
}) {
|
|
3541
3795
|
const isDestructive = variant === "destructive";
|
|
3542
|
-
return /* @__PURE__ */
|
|
3796
|
+
return /* @__PURE__ */ jsx33(
|
|
3543
3797
|
ToastPrimitive.Root,
|
|
3544
3798
|
{
|
|
3545
3799
|
"aria-busy": busy,
|
|
@@ -3556,7 +3810,7 @@ function ToastRoot({
|
|
|
3556
3810
|
...style
|
|
3557
3811
|
},
|
|
3558
3812
|
...props,
|
|
3559
|
-
children: /* @__PURE__ */
|
|
3813
|
+
children: /* @__PURE__ */ jsx33(ToastVisualContext.Provider, { value: { busy, variant }, children: /* @__PURE__ */ jsx33("span", { className: "flex min-w-0 max-w-full flex-col items-center justify-center whitespace-normal break-words text-center", children }) })
|
|
3560
3814
|
}
|
|
3561
3815
|
);
|
|
3562
3816
|
}
|
|
@@ -3565,9 +3819,9 @@ function ToastTitle({
|
|
|
3565
3819
|
children,
|
|
3566
3820
|
...props
|
|
3567
3821
|
}) {
|
|
3568
|
-
const toastVisual =
|
|
3822
|
+
const toastVisual = React13.useContext(ToastVisualContext);
|
|
3569
3823
|
const StatusIcon = toastVisual?.variant && hasToastStatusIcon(toastVisual.variant) ? toastStatusIconByVariant[toastVisual.variant] : null;
|
|
3570
|
-
return /* @__PURE__ */
|
|
3824
|
+
return /* @__PURE__ */ jsxs15(
|
|
3571
3825
|
ToastPrimitive.Title,
|
|
3572
3826
|
{
|
|
3573
3827
|
"data-slot": "toast-title",
|
|
@@ -3577,7 +3831,7 @@ function ToastTitle({
|
|
|
3577
3831
|
),
|
|
3578
3832
|
...props,
|
|
3579
3833
|
children: [
|
|
3580
|
-
toastVisual?.busy ? /* @__PURE__ */
|
|
3834
|
+
toastVisual?.busy ? /* @__PURE__ */ jsx33(
|
|
3581
3835
|
Spinner,
|
|
3582
3836
|
{
|
|
3583
3837
|
className: "shrink-0 text-current",
|
|
@@ -3585,8 +3839,8 @@ function ToastTitle({
|
|
|
3585
3839
|
strokeWidth: 2,
|
|
3586
3840
|
trackColor: "color-mix(in srgb, currentColor 28%, transparent)"
|
|
3587
3841
|
}
|
|
3588
|
-
) : StatusIcon ? /* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3842
|
+
) : StatusIcon ? /* @__PURE__ */ jsx33(StatusIcon, { className: "size-4 shrink-0 text-current" }) : null,
|
|
3843
|
+
/* @__PURE__ */ jsx33("span", { className: "min-w-0 break-words", children: formatToastText(children) })
|
|
3590
3844
|
]
|
|
3591
3845
|
}
|
|
3592
3846
|
);
|
|
@@ -3595,7 +3849,7 @@ function ToastDescription({
|
|
|
3595
3849
|
className,
|
|
3596
3850
|
...props
|
|
3597
3851
|
}) {
|
|
3598
|
-
return /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ jsx33(
|
|
3599
3853
|
ToastPrimitive.Description,
|
|
3600
3854
|
{
|
|
3601
3855
|
"data-slot": "toast-description",
|
|
@@ -3611,7 +3865,7 @@ function ToastClose({
|
|
|
3611
3865
|
className,
|
|
3612
3866
|
...props
|
|
3613
3867
|
}) {
|
|
3614
|
-
return /* @__PURE__ */
|
|
3868
|
+
return /* @__PURE__ */ jsx33(
|
|
3615
3869
|
ToastPrimitive.Close,
|
|
3616
3870
|
{
|
|
3617
3871
|
"data-slot": "toast-close",
|
|
@@ -3620,7 +3874,7 @@ function ToastClose({
|
|
|
3620
3874
|
className
|
|
3621
3875
|
),
|
|
3622
3876
|
...props,
|
|
3623
|
-
children: /* @__PURE__ */
|
|
3877
|
+
children: /* @__PURE__ */ jsx33(CloseIcon, { className: "size-4" })
|
|
3624
3878
|
}
|
|
3625
3879
|
);
|
|
3626
3880
|
}
|
|
@@ -3629,7 +3883,7 @@ function ToastViewport({
|
|
|
3629
3883
|
style,
|
|
3630
3884
|
...props
|
|
3631
3885
|
}) {
|
|
3632
|
-
return /* @__PURE__ */
|
|
3886
|
+
return /* @__PURE__ */ jsx33(
|
|
3633
3887
|
ToastPrimitive.Viewport,
|
|
3634
3888
|
{
|
|
3635
3889
|
"data-slot": "toast-viewport",
|
|
@@ -3644,8 +3898,8 @@ function ToastViewport({
|
|
|
3644
3898
|
}
|
|
3645
3899
|
|
|
3646
3900
|
// src/components/underline-tabs/underline-tabs.tsx
|
|
3647
|
-
import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect3, useRef as useRef4, useState as
|
|
3648
|
-
import { jsx as
|
|
3901
|
+
import { useEffect as useEffect6, useLayoutEffect as useLayoutEffect3, useRef as useRef4, useState as useState8 } from "react";
|
|
3902
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3649
3903
|
function UnderlineTabs({
|
|
3650
3904
|
tabs,
|
|
3651
3905
|
value,
|
|
@@ -3663,8 +3917,8 @@ function UnderlineTabs({
|
|
|
3663
3917
|
const viewportRef = useRef4(null);
|
|
3664
3918
|
const rowRef = useRef4(null);
|
|
3665
3919
|
const buttonRefs = useRef4({});
|
|
3666
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
3667
|
-
const [overflow, setOverflow] =
|
|
3920
|
+
const [indicatorStyle, setIndicatorStyle] = useState8({ left: 0, width: 0 });
|
|
3921
|
+
const [overflow, setOverflow] = useState8({
|
|
3668
3922
|
canScrollLeft: false,
|
|
3669
3923
|
canScrollRight: false
|
|
3670
3924
|
});
|
|
@@ -3728,7 +3982,7 @@ function UnderlineTabs({
|
|
|
3728
3982
|
behavior: "smooth"
|
|
3729
3983
|
});
|
|
3730
3984
|
};
|
|
3731
|
-
return /* @__PURE__ */
|
|
3985
|
+
return /* @__PURE__ */ jsxs16(
|
|
3732
3986
|
"div",
|
|
3733
3987
|
{
|
|
3734
3988
|
"aria-label": ariaLabel,
|
|
@@ -3740,7 +3994,7 @@ function UnderlineTabs({
|
|
|
3740
3994
|
"data-testid": testId,
|
|
3741
3995
|
role: "tablist",
|
|
3742
3996
|
children: [
|
|
3743
|
-
/* @__PURE__ */
|
|
3997
|
+
/* @__PURE__ */ jsx34(
|
|
3744
3998
|
"div",
|
|
3745
3999
|
{
|
|
3746
4000
|
ref: viewportRef,
|
|
@@ -3754,7 +4008,7 @@ function UnderlineTabs({
|
|
|
3754
4008
|
"data-can-scroll-right": overflow.canScrollRight ? "true" : "false",
|
|
3755
4009
|
"data-slot": "underline-tabs-viewport",
|
|
3756
4010
|
"data-testid": viewportTestId,
|
|
3757
|
-
children: /* @__PURE__ */
|
|
4011
|
+
children: /* @__PURE__ */ jsxs16(
|
|
3758
4012
|
"div",
|
|
3759
4013
|
{
|
|
3760
4014
|
ref: rowRef,
|
|
@@ -3762,7 +4016,7 @@ function UnderlineTabs({
|
|
|
3762
4016
|
children: [
|
|
3763
4017
|
tabs.map((tab) => {
|
|
3764
4018
|
const isActive = value === tab.value;
|
|
3765
|
-
return /* @__PURE__ */
|
|
4019
|
+
return /* @__PURE__ */ jsxs16(
|
|
3766
4020
|
"button",
|
|
3767
4021
|
{
|
|
3768
4022
|
ref: (element) => {
|
|
@@ -3785,14 +4039,14 @@ function UnderlineTabs({
|
|
|
3785
4039
|
onClick: () => onValueChange(tab.value),
|
|
3786
4040
|
onMouseDown: preventMouseDownDefault ? (event) => event.preventDefault() : void 0,
|
|
3787
4041
|
children: [
|
|
3788
|
-
/* @__PURE__ */
|
|
3789
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsx34("span", { children: tab.label }),
|
|
4043
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx34("span", { className: "text-[11px] font-medium leading-6 text-[inherit]", children: tab.count }) : null
|
|
3790
4044
|
]
|
|
3791
4045
|
},
|
|
3792
4046
|
tab.value
|
|
3793
4047
|
);
|
|
3794
4048
|
}),
|
|
3795
|
-
/* @__PURE__ */
|
|
4049
|
+
/* @__PURE__ */ jsx34(
|
|
3796
4050
|
"div",
|
|
3797
4051
|
{
|
|
3798
4052
|
"aria-hidden": true,
|
|
@@ -3809,7 +4063,7 @@ function UnderlineTabs({
|
|
|
3809
4063
|
)
|
|
3810
4064
|
}
|
|
3811
4065
|
),
|
|
3812
|
-
/* @__PURE__ */
|
|
4066
|
+
/* @__PURE__ */ jsx34(
|
|
3813
4067
|
"button",
|
|
3814
4068
|
{
|
|
3815
4069
|
"aria-label": scrollLeftLabel,
|
|
@@ -3820,10 +4074,10 @@ function UnderlineTabs({
|
|
|
3820
4074
|
disabled: !overflow.canScrollLeft,
|
|
3821
4075
|
type: "button",
|
|
3822
4076
|
onClick: () => scrollTabs("left"),
|
|
3823
|
-
children: /* @__PURE__ */
|
|
4077
|
+
children: /* @__PURE__ */ jsx34(ArrowLeftIcon, { size: 16 })
|
|
3824
4078
|
}
|
|
3825
4079
|
),
|
|
3826
|
-
/* @__PURE__ */
|
|
4080
|
+
/* @__PURE__ */ jsx34(
|
|
3827
4081
|
"button",
|
|
3828
4082
|
{
|
|
3829
4083
|
"aria-label": scrollRightLabel,
|
|
@@ -3834,7 +4088,7 @@ function UnderlineTabs({
|
|
|
3834
4088
|
disabled: !overflow.canScrollRight,
|
|
3835
4089
|
type: "button",
|
|
3836
4090
|
onClick: () => scrollTabs("right"),
|
|
3837
|
-
children: /* @__PURE__ */
|
|
4091
|
+
children: /* @__PURE__ */ jsx34(ArrowRightIcon, { size: 16 })
|
|
3838
4092
|
}
|
|
3839
4093
|
)
|
|
3840
4094
|
]
|
|
@@ -3843,9 +4097,9 @@ function UnderlineTabs({
|
|
|
3843
4097
|
}
|
|
3844
4098
|
|
|
3845
4099
|
// src/components/viewport-menu-surface/viewport-menu-surface.tsx
|
|
3846
|
-
import * as
|
|
4100
|
+
import * as React14 from "react";
|
|
3847
4101
|
import { createPortal as createPortal3 } from "react-dom";
|
|
3848
|
-
import { jsx as
|
|
4102
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3849
4103
|
var VIEWPORT_MENU_PADDING = 12;
|
|
3850
4104
|
var MENU_BOUNDARY_PADDING = 8;
|
|
3851
4105
|
function clampMenuCoordinate(origin, size, viewportExtent, padding) {
|
|
@@ -3957,7 +4211,7 @@ function assignRef(ref, value) {
|
|
|
3957
4211
|
function callHandler(handler, event) {
|
|
3958
4212
|
handler?.(event);
|
|
3959
4213
|
}
|
|
3960
|
-
var ViewportMenuSurface =
|
|
4214
|
+
var ViewportMenuSurface = React14.forwardRef(function ViewportMenuSurface2({
|
|
3961
4215
|
open,
|
|
3962
4216
|
placement,
|
|
3963
4217
|
children,
|
|
@@ -3973,16 +4227,16 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
3973
4227
|
className,
|
|
3974
4228
|
...rest
|
|
3975
4229
|
}, forwardedRef) {
|
|
3976
|
-
const surfaceRef =
|
|
3977
|
-
const [measuredSize, setMeasuredSize] =
|
|
3978
|
-
const setRefs2 =
|
|
4230
|
+
const surfaceRef = React14.useRef(null);
|
|
4231
|
+
const [measuredSize, setMeasuredSize] = React14.useState(null);
|
|
4232
|
+
const setRefs2 = React14.useCallback(
|
|
3979
4233
|
(node) => {
|
|
3980
4234
|
surfaceRef.current = node;
|
|
3981
4235
|
assignRef(forwardedRef, node);
|
|
3982
4236
|
},
|
|
3983
4237
|
[forwardedRef]
|
|
3984
4238
|
);
|
|
3985
|
-
|
|
4239
|
+
React14.useLayoutEffect(() => {
|
|
3986
4240
|
if (!open) {
|
|
3987
4241
|
setMeasuredSize(null);
|
|
3988
4242
|
return;
|
|
@@ -4006,7 +4260,7 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
4006
4260
|
observer.observe(element);
|
|
4007
4261
|
return () => observer.disconnect();
|
|
4008
4262
|
}, [open, placement]);
|
|
4009
|
-
|
|
4263
|
+
React14.useEffect(() => {
|
|
4010
4264
|
if (!open) {
|
|
4011
4265
|
return;
|
|
4012
4266
|
}
|
|
@@ -4063,7 +4317,7 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
4063
4317
|
onDismiss,
|
|
4064
4318
|
open
|
|
4065
4319
|
]);
|
|
4066
|
-
const resolvedPlacement =
|
|
4320
|
+
const resolvedPlacement = React14.useMemo(() => {
|
|
4067
4321
|
if (placement.type === "absolute") {
|
|
4068
4322
|
const boundary2 = resolveMenuBoundaryFromPoint(
|
|
4069
4323
|
placement.boundaryPoint ?? {
|
|
@@ -4115,7 +4369,7 @@ var ViewportMenuSurface = React12.forwardRef(function ViewportMenuSurface2({
|
|
|
4115
4369
|
}
|
|
4116
4370
|
const portalTarget = resolvedPlacement.portalTarget ?? document.body;
|
|
4117
4371
|
return createPortal3(
|
|
4118
|
-
/* @__PURE__ */
|
|
4372
|
+
/* @__PURE__ */ jsx35(
|
|
4119
4373
|
MenuSurface,
|
|
4120
4374
|
{
|
|
4121
4375
|
...rest,
|
|
@@ -4162,6 +4416,19 @@ export {
|
|
|
4162
4416
|
CardContent,
|
|
4163
4417
|
CardFooter,
|
|
4164
4418
|
Checkbox,
|
|
4419
|
+
Input,
|
|
4420
|
+
menuSurfaceClassName,
|
|
4421
|
+
menuItemClassName,
|
|
4422
|
+
menuItemWithIndicatorClassName,
|
|
4423
|
+
menuItemIndicatorClassName,
|
|
4424
|
+
MenuSurface,
|
|
4425
|
+
Popover,
|
|
4426
|
+
PopoverTrigger,
|
|
4427
|
+
PopoverPortal,
|
|
4428
|
+
PopoverClose,
|
|
4429
|
+
PopoverContent,
|
|
4430
|
+
PopoverAnchor,
|
|
4431
|
+
Combobox,
|
|
4165
4432
|
Dialog,
|
|
4166
4433
|
DialogTrigger,
|
|
4167
4434
|
DialogPortal,
|
|
@@ -4173,11 +4440,6 @@ export {
|
|
|
4173
4440
|
DialogTitle,
|
|
4174
4441
|
DialogDescription,
|
|
4175
4442
|
ConfirmationDialog,
|
|
4176
|
-
menuSurfaceClassName,
|
|
4177
|
-
menuItemClassName,
|
|
4178
|
-
menuItemWithIndicatorClassName,
|
|
4179
|
-
menuItemIndicatorClassName,
|
|
4180
|
-
MenuSurface,
|
|
4181
4443
|
ContextMenu,
|
|
4182
4444
|
ContextMenuTrigger,
|
|
4183
4445
|
ContextMenuContent,
|
|
@@ -4212,7 +4474,6 @@ export {
|
|
|
4212
4474
|
DropdownMenuSub,
|
|
4213
4475
|
DropdownMenuSubTrigger,
|
|
4214
4476
|
DropdownMenuSubContent,
|
|
4215
|
-
Input,
|
|
4216
4477
|
TooltipProvider,
|
|
4217
4478
|
Tooltip,
|
|
4218
4479
|
TooltipTrigger,
|
|
@@ -4221,12 +4482,6 @@ export {
|
|
|
4221
4482
|
useTextOverflow,
|
|
4222
4483
|
TruncatingPillLabel,
|
|
4223
4484
|
MentionPill,
|
|
4224
|
-
Popover,
|
|
4225
|
-
PopoverTrigger,
|
|
4226
|
-
PopoverPortal,
|
|
4227
|
-
PopoverClose,
|
|
4228
|
-
PopoverContent,
|
|
4229
|
-
PopoverAnchor,
|
|
4230
4485
|
RadioIndicator,
|
|
4231
4486
|
ResizablePanelGroup,
|
|
4232
4487
|
ResizablePanel,
|
|
@@ -4251,6 +4506,7 @@ export {
|
|
|
4251
4506
|
Separator2 as Separator,
|
|
4252
4507
|
SectionTabs,
|
|
4253
4508
|
ShortcutBadge,
|
|
4509
|
+
Slider,
|
|
4254
4510
|
toast,
|
|
4255
4511
|
Toaster,
|
|
4256
4512
|
Spinner,
|
|
@@ -4273,4 +4529,4 @@ export {
|
|
|
4273
4529
|
UnderlineTabs,
|
|
4274
4530
|
ViewportMenuSurface
|
|
4275
4531
|
};
|
|
4276
|
-
//# sourceMappingURL=chunk-
|
|
4532
|
+
//# sourceMappingURL=chunk-OW6744SQ.js.map
|