@lessly/ui 0.26.1 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -1
- package/dist/index.js +839 -782
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -313,32 +313,86 @@ var Input = React5.forwardRef(
|
|
|
313
313
|
);
|
|
314
314
|
Input.displayName = "Input";
|
|
315
315
|
|
|
316
|
-
// src/components/
|
|
316
|
+
// src/components/input-group.tsx
|
|
317
317
|
import * as React6 from "react";
|
|
318
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
319
|
+
var InputGroup = React6.forwardRef(
|
|
320
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
ref,
|
|
324
|
+
className: cn(
|
|
325
|
+
"flex h-10 w-full items-stretch overflow-hidden rounded-md border border-border-default bg-bg-primary text-sm text-text-primary",
|
|
326
|
+
"focus-within:ring-2 focus-within:ring-border-focus",
|
|
327
|
+
"has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50",
|
|
328
|
+
className
|
|
329
|
+
),
|
|
330
|
+
...props
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
);
|
|
334
|
+
InputGroup.displayName = "InputGroup";
|
|
335
|
+
var InputAddon = React6.forwardRef(
|
|
336
|
+
({ className, align = "leading", ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
337
|
+
"div",
|
|
338
|
+
{
|
|
339
|
+
ref,
|
|
340
|
+
"data-align": align,
|
|
341
|
+
className: cn(
|
|
342
|
+
"flex shrink-0 select-none items-center gap-2 whitespace-nowrap bg-bg-secondary px-3 text-sm text-text-secondary",
|
|
343
|
+
align === "leading" ? "border-r border-border-default" : "border-l border-border-default",
|
|
344
|
+
className
|
|
345
|
+
),
|
|
346
|
+
...props
|
|
347
|
+
}
|
|
348
|
+
)
|
|
349
|
+
);
|
|
350
|
+
InputAddon.displayName = "InputAddon";
|
|
351
|
+
var InputGroupInput = React6.forwardRef(
|
|
352
|
+
({ className, type, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
353
|
+
"input",
|
|
354
|
+
{
|
|
355
|
+
ref,
|
|
356
|
+
type,
|
|
357
|
+
className: cn(
|
|
358
|
+
"w-full min-w-0 flex-1 border-0 bg-transparent px-3 py-2 text-sm text-text-primary",
|
|
359
|
+
"placeholder:text-text-tertiary",
|
|
360
|
+
"focus:outline-none focus-visible:outline-none",
|
|
361
|
+
"disabled:cursor-not-allowed",
|
|
362
|
+
className
|
|
363
|
+
),
|
|
364
|
+
...props
|
|
365
|
+
}
|
|
366
|
+
)
|
|
367
|
+
);
|
|
368
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
369
|
+
|
|
370
|
+
// src/components/label.tsx
|
|
371
|
+
import * as React7 from "react";
|
|
318
372
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
319
373
|
import { cva as cva2 } from "class-variance-authority";
|
|
320
|
-
import { jsx as
|
|
374
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
321
375
|
var labelVariants = cva2(
|
|
322
376
|
"text-text-primary text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
323
377
|
);
|
|
324
|
-
var Label2 =
|
|
378
|
+
var Label2 = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
325
379
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
326
380
|
|
|
327
381
|
// src/components/page-header.tsx
|
|
328
|
-
import { jsx as
|
|
382
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
329
383
|
function PageHeader({ title, subtitle, icon: Icon, media, badge, actions, id }) {
|
|
330
384
|
if (Icon && !subtitle && !media && process.env.NODE_ENV !== "production") {
|
|
331
385
|
console.warn("PageHeader: `icon` needs a `subtitle` to render the medallion; medallion dropped.");
|
|
332
386
|
}
|
|
333
|
-
const leading = media ?? (Icon && subtitle ? /* @__PURE__ */
|
|
387
|
+
const leading = media ?? (Icon && subtitle ? /* @__PURE__ */ jsx8(
|
|
334
388
|
"span",
|
|
335
389
|
{
|
|
336
390
|
"data-slot": "page-header-medallion",
|
|
337
391
|
className: "inline-flex size-12 shrink-0 items-center justify-center rounded-full border border-border-subtle bg-bg-secondary text-text-secondary",
|
|
338
|
-
children: /* @__PURE__ */
|
|
392
|
+
children: /* @__PURE__ */ jsx8(Icon, { className: "size-6", "aria-hidden": true })
|
|
339
393
|
}
|
|
340
394
|
) : null);
|
|
341
|
-
const heading = /* @__PURE__ */
|
|
395
|
+
const heading = /* @__PURE__ */ jsx8("h2", { id, className: "text-lg font-semibold text-text-primary", children: title });
|
|
342
396
|
if (!leading && !subtitle && !badge && !actions) {
|
|
343
397
|
return heading;
|
|
344
398
|
}
|
|
@@ -349,28 +403,28 @@ function PageHeader({ title, subtitle, icon: Icon, media, badge, actions, id })
|
|
|
349
403
|
heading,
|
|
350
404
|
badge
|
|
351
405
|
] }),
|
|
352
|
-
subtitle && /* @__PURE__ */
|
|
406
|
+
subtitle && /* @__PURE__ */ jsx8("p", { className: "text-sm text-text-secondary", children: subtitle })
|
|
353
407
|
] }),
|
|
354
|
-
actions && /* @__PURE__ */
|
|
408
|
+
actions && /* @__PURE__ */ jsx8("div", { className: "ml-auto shrink-0", children: actions })
|
|
355
409
|
] });
|
|
356
410
|
}
|
|
357
411
|
|
|
358
412
|
// src/components/section-intro.tsx
|
|
359
413
|
import { Info } from "lucide-react";
|
|
360
|
-
import { jsx as
|
|
414
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
361
415
|
function SectionIntro({ what, when }) {
|
|
362
416
|
return /* @__PURE__ */ jsxs4("div", { className: "bg-bg-brand-subtle rounded-xl px-5 py-4 flex items-start gap-3 mb-5", children: [
|
|
363
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ jsx9(Info, { className: "w-4 h-4 text-text-brand mt-0.5 flex-shrink-0", "aria-hidden": "true" }),
|
|
364
418
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ jsx9("p", { className: "text-[0.8125rem] text-text-primary leading-relaxed", children: what }),
|
|
420
|
+
/* @__PURE__ */ jsx9("p", { className: "text-[0.8125rem] text-text-secondary leading-relaxed mt-1", children: when })
|
|
367
421
|
] })
|
|
368
422
|
] });
|
|
369
423
|
}
|
|
370
424
|
|
|
371
425
|
// src/components/select.tsx
|
|
372
426
|
import { ChevronDown } from "lucide-react";
|
|
373
|
-
import { jsx as
|
|
427
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
374
428
|
function Select({
|
|
375
429
|
value,
|
|
376
430
|
onValueChange,
|
|
@@ -400,24 +454,24 @@ function Select({
|
|
|
400
454
|
className
|
|
401
455
|
),
|
|
402
456
|
children: [
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ jsx10("span", { className: cn("truncate", !selected && "text-text-tertiary"), children: selected ? selected.label : placeholder }),
|
|
458
|
+
/* @__PURE__ */ jsx10(ChevronDown, { className: "ml-2 h-4 w-4 shrink-0 text-text-tertiary" })
|
|
405
459
|
]
|
|
406
460
|
}
|
|
407
461
|
),
|
|
408
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ jsx10(
|
|
409
463
|
DropdownMenuContent,
|
|
410
464
|
{
|
|
411
465
|
align: "start",
|
|
412
466
|
className: "max-h-64 w-[var(--radix-dropdown-menu-trigger-width)] overflow-y-auto",
|
|
413
|
-
children: /* @__PURE__ */
|
|
467
|
+
children: /* @__PURE__ */ jsx10(DropdownMenuRadioGroup, { value: value ?? "", onValueChange, children: options.map((o) => /* @__PURE__ */ jsx10(DropdownMenuRadioItem, { value: o.value, "data-testid": optionTestId?.(o.value), children: o.label }, o.value)) })
|
|
414
468
|
}
|
|
415
469
|
)
|
|
416
470
|
] });
|
|
417
471
|
}
|
|
418
472
|
|
|
419
473
|
// src/components/switch.tsx
|
|
420
|
-
import { jsx as
|
|
474
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
421
475
|
function Switch({
|
|
422
476
|
checked,
|
|
423
477
|
onCheckedChange,
|
|
@@ -427,7 +481,7 @@ function Switch({
|
|
|
427
481
|
"aria-label": ariaLabel,
|
|
428
482
|
"data-testid": testId
|
|
429
483
|
}) {
|
|
430
|
-
return /* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ jsx11(
|
|
431
485
|
"button",
|
|
432
486
|
{
|
|
433
487
|
type: "button",
|
|
@@ -439,7 +493,7 @@ function Switch({
|
|
|
439
493
|
disabled,
|
|
440
494
|
onClick: () => onCheckedChange(!checked),
|
|
441
495
|
className: `relative inline-flex h-6 w-10 shrink-0 cursor-pointer rounded-full transition-colors outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${checked ? "bg-bg-brand-bright" : "bg-border-default"} ${disabled ? "cursor-not-allowed opacity-50" : ""} ${className}`,
|
|
442
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ jsx11(
|
|
443
497
|
"span",
|
|
444
498
|
{
|
|
445
499
|
"aria-hidden": "true",
|
|
@@ -451,11 +505,11 @@ function Switch({
|
|
|
451
505
|
}
|
|
452
506
|
|
|
453
507
|
// src/components/checkbox.tsx
|
|
454
|
-
import * as
|
|
508
|
+
import * as React8 from "react";
|
|
455
509
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
456
510
|
import { Check as Check2 } from "lucide-react";
|
|
457
|
-
import { jsx as
|
|
458
|
-
var Checkbox =
|
|
511
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
512
|
+
var Checkbox = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
459
513
|
CheckboxPrimitive.Root,
|
|
460
514
|
{
|
|
461
515
|
ref,
|
|
@@ -464,19 +518,19 @@ var Checkbox = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
464
518
|
className
|
|
465
519
|
),
|
|
466
520
|
...props,
|
|
467
|
-
children: /* @__PURE__ */
|
|
521
|
+
children: /* @__PURE__ */ jsx12(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4" }) })
|
|
468
522
|
}
|
|
469
523
|
));
|
|
470
524
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
471
525
|
|
|
472
526
|
// src/components/radio-group.tsx
|
|
473
|
-
import * as
|
|
527
|
+
import * as React9 from "react";
|
|
474
528
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
475
529
|
import { Circle as Circle2 } from "lucide-react";
|
|
476
|
-
import { jsx as
|
|
477
|
-
var RadioGroup2 =
|
|
530
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
531
|
+
var RadioGroup2 = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(RadioGroupPrimitive.Root, { ref, className: cn("grid gap-2", className), ...props }));
|
|
478
532
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
479
|
-
var RadioGroupItem =
|
|
533
|
+
var RadioGroupItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
480
534
|
RadioGroupPrimitive.Item,
|
|
481
535
|
{
|
|
482
536
|
ref,
|
|
@@ -485,17 +539,17 @@ var RadioGroupItem = React8.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
485
539
|
className
|
|
486
540
|
),
|
|
487
541
|
...props,
|
|
488
|
-
children: /* @__PURE__ */
|
|
542
|
+
children: /* @__PURE__ */ jsx13(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx13(Circle2, { className: "h-2.5 w-2.5 fill-blue-400 text-blue-400" }) })
|
|
489
543
|
}
|
|
490
544
|
));
|
|
491
545
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
492
546
|
|
|
493
547
|
// src/components/textarea.tsx
|
|
494
|
-
import * as
|
|
495
|
-
import { jsx as
|
|
496
|
-
var Textarea =
|
|
548
|
+
import * as React10 from "react";
|
|
549
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
550
|
+
var Textarea = React10.forwardRef(
|
|
497
551
|
({ className, ...props }, ref) => {
|
|
498
|
-
return /* @__PURE__ */
|
|
552
|
+
return /* @__PURE__ */ jsx14(
|
|
499
553
|
"textarea",
|
|
500
554
|
{
|
|
501
555
|
ref,
|
|
@@ -511,10 +565,10 @@ var Textarea = React9.forwardRef(
|
|
|
511
565
|
Textarea.displayName = "Textarea";
|
|
512
566
|
|
|
513
567
|
// src/components/slider.tsx
|
|
514
|
-
import * as
|
|
568
|
+
import * as React11 from "react";
|
|
515
569
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
516
|
-
import { jsx as
|
|
517
|
-
var Slider =
|
|
570
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
571
|
+
var Slider = React11.forwardRef(({ className, ...props }, ref) => {
|
|
518
572
|
const thumbCount = (Array.isArray(props.value) ? props.value.length : void 0) ?? (Array.isArray(props.defaultValue) ? props.defaultValue.length : void 0) ?? 1;
|
|
519
573
|
return /* @__PURE__ */ jsxs6(
|
|
520
574
|
SliderPrimitive.Root,
|
|
@@ -523,8 +577,8 @@ var Slider = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
523
577
|
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
524
578
|
...props,
|
|
525
579
|
children: [
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
Array.from({ length: thumbCount }).map((_, i) => /* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ jsx15(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-bg-secondary", children: /* @__PURE__ */ jsx15(SliderPrimitive.Range, { className: "absolute h-full bg-blue-400" }) }),
|
|
581
|
+
Array.from({ length: thumbCount }).map((_, i) => /* @__PURE__ */ jsx15(
|
|
528
582
|
SliderPrimitive.Thumb,
|
|
529
583
|
{
|
|
530
584
|
className: "block size-5 rounded-full border border-border-brand bg-bg-elevated shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
@@ -538,10 +592,10 @@ var Slider = React10.forwardRef(({ className, ...props }, ref) => {
|
|
|
538
592
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
539
593
|
|
|
540
594
|
// src/components/toggle.tsx
|
|
541
|
-
import * as
|
|
595
|
+
import * as React12 from "react";
|
|
542
596
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
543
597
|
import { cva as cva3 } from "class-variance-authority";
|
|
544
|
-
import { jsx as
|
|
598
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
545
599
|
var toggleVariants = cva3(
|
|
546
600
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-bg-secondary hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-bg-secondary data-[state=on]:text-text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
547
601
|
{
|
|
@@ -559,30 +613,30 @@ var toggleVariants = cva3(
|
|
|
559
613
|
defaultVariants: { variant: "default", size: "default" }
|
|
560
614
|
}
|
|
561
615
|
);
|
|
562
|
-
var Toggle =
|
|
616
|
+
var Toggle = React12.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx16(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
563
617
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
564
618
|
|
|
565
619
|
// src/components/toggle-group.tsx
|
|
566
|
-
import * as
|
|
620
|
+
import * as React13 from "react";
|
|
567
621
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
568
|
-
import { jsx as
|
|
569
|
-
var ToggleGroupContext =
|
|
622
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
623
|
+
var ToggleGroupContext = React13.createContext({
|
|
570
624
|
size: "default",
|
|
571
625
|
variant: "default"
|
|
572
626
|
});
|
|
573
|
-
var ToggleGroup =
|
|
627
|
+
var ToggleGroup = React13.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
574
628
|
ToggleGroupPrimitive.Root,
|
|
575
629
|
{
|
|
576
630
|
ref,
|
|
577
631
|
className: cn("flex items-center justify-center gap-1", className),
|
|
578
632
|
...props,
|
|
579
|
-
children: /* @__PURE__ */
|
|
633
|
+
children: /* @__PURE__ */ jsx17(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
580
634
|
}
|
|
581
635
|
));
|
|
582
636
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
583
|
-
var ToggleGroupItem =
|
|
584
|
-
const context =
|
|
585
|
-
return /* @__PURE__ */
|
|
637
|
+
var ToggleGroupItem = React13.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
638
|
+
const context = React13.useContext(ToggleGroupContext);
|
|
639
|
+
return /* @__PURE__ */ jsx17(
|
|
586
640
|
ToggleGroupPrimitive.Item,
|
|
587
641
|
{
|
|
588
642
|
ref,
|
|
@@ -595,11 +649,11 @@ var ToggleGroupItem = React12.forwardRef(({ className, children, variant, size,
|
|
|
595
649
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
596
650
|
|
|
597
651
|
// src/components/input-otp.tsx
|
|
598
|
-
import * as
|
|
652
|
+
import * as React14 from "react";
|
|
599
653
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
600
654
|
import { Minus } from "lucide-react";
|
|
601
|
-
import { jsx as
|
|
602
|
-
var InputOTP =
|
|
655
|
+
import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
656
|
+
var InputOTP = React14.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
603
657
|
OTPInput,
|
|
604
658
|
{
|
|
605
659
|
ref,
|
|
@@ -609,12 +663,12 @@ var InputOTP = React13.forwardRef(({ className, containerClassName, ...props },
|
|
|
609
663
|
}
|
|
610
664
|
));
|
|
611
665
|
InputOTP.displayName = "InputOTP";
|
|
612
|
-
var InputOTPGroup =
|
|
613
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
666
|
+
var InputOTPGroup = React14.forwardRef(
|
|
667
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx18("div", { ref, className: cn("flex items-center", className), ...props })
|
|
614
668
|
);
|
|
615
669
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
616
|
-
var InputOTPSlot =
|
|
617
|
-
const inputOTPContext =
|
|
670
|
+
var InputOTPSlot = React14.forwardRef(({ index, className, ...props }, ref) => {
|
|
671
|
+
const inputOTPContext = React14.useContext(OTPInputContext);
|
|
618
672
|
const slot = inputOTPContext.slots[index];
|
|
619
673
|
const char = slot?.char;
|
|
620
674
|
const hasFakeCaret = slot?.hasFakeCaret;
|
|
@@ -631,25 +685,25 @@ var InputOTPSlot = React13.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
631
685
|
...props,
|
|
632
686
|
children: [
|
|
633
687
|
char,
|
|
634
|
-
hasFakeCaret && /* @__PURE__ */
|
|
688
|
+
hasFakeCaret && /* @__PURE__ */ jsx18("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx18("div", { className: "h-4 w-px animate-pulse bg-text-primary" }) })
|
|
635
689
|
]
|
|
636
690
|
}
|
|
637
691
|
);
|
|
638
692
|
});
|
|
639
693
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
640
|
-
var InputOTPSeparator =
|
|
641
|
-
({ ...props }, ref) => /* @__PURE__ */
|
|
694
|
+
var InputOTPSeparator = React14.forwardRef(
|
|
695
|
+
({ ...props }, ref) => /* @__PURE__ */ jsx18("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx18(Minus, { className: "h-4 w-4 text-text-tertiary" }) })
|
|
642
696
|
);
|
|
643
697
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
644
698
|
|
|
645
699
|
// src/components/popover.tsx
|
|
646
|
-
import * as
|
|
700
|
+
import * as React15 from "react";
|
|
647
701
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
648
|
-
import { jsx as
|
|
702
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
649
703
|
var Popover = PopoverPrimitive.Root;
|
|
650
704
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
651
705
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
652
|
-
var PopoverContent =
|
|
706
|
+
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx19(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx19(
|
|
653
707
|
PopoverPrimitive.Content,
|
|
654
708
|
{
|
|
655
709
|
ref,
|
|
@@ -665,13 +719,13 @@ var PopoverContent = React14.forwardRef(({ className, align = "center", sideOffs
|
|
|
665
719
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
666
720
|
|
|
667
721
|
// src/components/tooltip.tsx
|
|
668
|
-
import * as
|
|
722
|
+
import * as React16 from "react";
|
|
669
723
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
670
|
-
import { jsx as
|
|
724
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
671
725
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
672
726
|
var Tooltip = TooltipPrimitive.Root;
|
|
673
727
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
674
|
-
var TooltipContent =
|
|
728
|
+
var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx20(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx20(
|
|
675
729
|
TooltipPrimitive.Content,
|
|
676
730
|
{
|
|
677
731
|
ref,
|
|
@@ -686,12 +740,12 @@ var TooltipContent = React15.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
686
740
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
687
741
|
|
|
688
742
|
// src/components/hover-card.tsx
|
|
689
|
-
import * as
|
|
743
|
+
import * as React17 from "react";
|
|
690
744
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
691
|
-
import { jsx as
|
|
745
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
692
746
|
var HoverCard = HoverCardPrimitive.Root;
|
|
693
747
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
694
|
-
var HoverCardContent =
|
|
748
|
+
var HoverCardContent = React17.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx21(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx21(
|
|
695
749
|
HoverCardPrimitive.Content,
|
|
696
750
|
{
|
|
697
751
|
ref,
|
|
@@ -707,16 +761,16 @@ var HoverCardContent = React16.forwardRef(({ className, align = "center", sideOf
|
|
|
707
761
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
708
762
|
|
|
709
763
|
// src/components/sheet.tsx
|
|
710
|
-
import * as
|
|
764
|
+
import * as React18 from "react";
|
|
711
765
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
712
766
|
import { cva as cva4 } from "class-variance-authority";
|
|
713
767
|
import { X as X2 } from "lucide-react";
|
|
714
|
-
import { jsx as
|
|
768
|
+
import { jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
715
769
|
var Sheet = SheetPrimitive.Root;
|
|
716
770
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
717
771
|
var SheetClose = SheetPrimitive.Close;
|
|
718
772
|
var SheetPortal = SheetPrimitive.Portal;
|
|
719
|
-
var SheetOverlay =
|
|
773
|
+
var SheetOverlay = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
720
774
|
SheetPrimitive.Overlay,
|
|
721
775
|
{
|
|
722
776
|
ref,
|
|
@@ -744,8 +798,8 @@ var sheetVariants = cva4(
|
|
|
744
798
|
}
|
|
745
799
|
}
|
|
746
800
|
);
|
|
747
|
-
var SheetContent =
|
|
748
|
-
/* @__PURE__ */
|
|
801
|
+
var SheetContent = React18.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs8(SheetPortal, { children: [
|
|
802
|
+
/* @__PURE__ */ jsx22(SheetOverlay, {}),
|
|
749
803
|
/* @__PURE__ */ jsxs8(
|
|
750
804
|
SheetPrimitive.Content,
|
|
751
805
|
{
|
|
@@ -755,15 +809,15 @@ var SheetContent = React17.forwardRef(({ side = "right", className, children, ..
|
|
|
755
809
|
children: [
|
|
756
810
|
children,
|
|
757
811
|
/* @__PURE__ */ jsxs8(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm text-text-tertiary opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-border-focus disabled:pointer-events-none", children: [
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ jsx22(X2, { className: "h-4 w-4" }),
|
|
813
|
+
/* @__PURE__ */ jsx22("span", { className: "sr-only", children: "Close" })
|
|
760
814
|
] })
|
|
761
815
|
]
|
|
762
816
|
}
|
|
763
817
|
)
|
|
764
818
|
] }));
|
|
765
819
|
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
766
|
-
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
820
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx22(
|
|
767
821
|
"div",
|
|
768
822
|
{
|
|
769
823
|
className: cn("flex flex-col gap-1.5 text-left", className),
|
|
@@ -771,7 +825,7 @@ var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx21(
|
|
|
771
825
|
}
|
|
772
826
|
);
|
|
773
827
|
SheetHeader.displayName = "SheetHeader";
|
|
774
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
828
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx22(
|
|
775
829
|
"div",
|
|
776
830
|
{
|
|
777
831
|
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
@@ -779,7 +833,7 @@ var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx21(
|
|
|
779
833
|
}
|
|
780
834
|
);
|
|
781
835
|
SheetFooter.displayName = "SheetFooter";
|
|
782
|
-
var SheetTitle =
|
|
836
|
+
var SheetTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
783
837
|
SheetPrimitive.Title,
|
|
784
838
|
{
|
|
785
839
|
ref,
|
|
@@ -788,7 +842,7 @@ var SheetTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
788
842
|
}
|
|
789
843
|
));
|
|
790
844
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
791
|
-
var SheetDescription =
|
|
845
|
+
var SheetDescription = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
792
846
|
SheetPrimitive.Description,
|
|
793
847
|
{
|
|
794
848
|
ref,
|
|
@@ -799,18 +853,18 @@ var SheetDescription = React17.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
799
853
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
800
854
|
|
|
801
855
|
// src/components/drawer.tsx
|
|
802
|
-
import * as
|
|
856
|
+
import * as React19 from "react";
|
|
803
857
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
804
|
-
import { jsx as
|
|
858
|
+
import { jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
805
859
|
var Drawer = ({
|
|
806
860
|
shouldScaleBackground = true,
|
|
807
861
|
...props
|
|
808
|
-
}) => /* @__PURE__ */
|
|
862
|
+
}) => /* @__PURE__ */ jsx23(DrawerPrimitive.Root, { shouldScaleBackground, ...props });
|
|
809
863
|
Drawer.displayName = "Drawer";
|
|
810
864
|
var DrawerTrigger = DrawerPrimitive.Trigger;
|
|
811
865
|
var DrawerPortal = DrawerPrimitive.Portal;
|
|
812
866
|
var DrawerClose = DrawerPrimitive.Close;
|
|
813
|
-
var DrawerOverlay =
|
|
867
|
+
var DrawerOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
814
868
|
DrawerPrimitive.Overlay,
|
|
815
869
|
{
|
|
816
870
|
ref,
|
|
@@ -819,8 +873,8 @@ var DrawerOverlay = React18.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
819
873
|
}
|
|
820
874
|
));
|
|
821
875
|
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
822
|
-
var DrawerContent =
|
|
823
|
-
/* @__PURE__ */
|
|
876
|
+
var DrawerContent = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs9(DrawerPortal, { children: [
|
|
877
|
+
/* @__PURE__ */ jsx23(DrawerOverlay, {}),
|
|
824
878
|
/* @__PURE__ */ jsxs9(
|
|
825
879
|
DrawerPrimitive.Content,
|
|
826
880
|
{
|
|
@@ -831,18 +885,18 @@ var DrawerContent = React18.forwardRef(({ className, children, ...props }, ref)
|
|
|
831
885
|
),
|
|
832
886
|
...props,
|
|
833
887
|
children: [
|
|
834
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ jsx23("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-bg-secondary" }),
|
|
835
889
|
children
|
|
836
890
|
]
|
|
837
891
|
}
|
|
838
892
|
)
|
|
839
893
|
] }));
|
|
840
894
|
DrawerContent.displayName = "DrawerContent";
|
|
841
|
-
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
895
|
+
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx23("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
|
|
842
896
|
DrawerHeader.displayName = "DrawerHeader";
|
|
843
|
-
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
897
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx23("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
|
|
844
898
|
DrawerFooter.displayName = "DrawerFooter";
|
|
845
|
-
var DrawerTitle =
|
|
899
|
+
var DrawerTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
846
900
|
DrawerPrimitive.Title,
|
|
847
901
|
{
|
|
848
902
|
ref,
|
|
@@ -851,7 +905,7 @@ var DrawerTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
851
905
|
}
|
|
852
906
|
));
|
|
853
907
|
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
854
|
-
var DrawerDescription =
|
|
908
|
+
var DrawerDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
855
909
|
DrawerPrimitive.Description,
|
|
856
910
|
{
|
|
857
911
|
ref,
|
|
@@ -862,13 +916,13 @@ var DrawerDescription = React18.forwardRef(({ className, ...props }, ref) => /*
|
|
|
862
916
|
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
863
917
|
|
|
864
918
|
// src/components/alert-dialog.tsx
|
|
865
|
-
import * as
|
|
919
|
+
import * as React20 from "react";
|
|
866
920
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
867
|
-
import { jsx as
|
|
921
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
868
922
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
869
923
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
870
924
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
871
|
-
var AlertDialogOverlay =
|
|
925
|
+
var AlertDialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
872
926
|
AlertDialogPrimitive.Overlay,
|
|
873
927
|
{
|
|
874
928
|
ref,
|
|
@@ -880,9 +934,9 @@ var AlertDialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /*
|
|
|
880
934
|
}
|
|
881
935
|
));
|
|
882
936
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
883
|
-
var AlertDialogContent =
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
/* @__PURE__ */
|
|
937
|
+
var AlertDialogContent = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs10(AlertDialogPortal, { children: [
|
|
938
|
+
/* @__PURE__ */ jsx24(AlertDialogOverlay, {}),
|
|
939
|
+
/* @__PURE__ */ jsx24(
|
|
886
940
|
AlertDialogPrimitive.Content,
|
|
887
941
|
{
|
|
888
942
|
ref,
|
|
@@ -895,7 +949,7 @@ var AlertDialogContent = React19.forwardRef(({ className, ...props }, ref) => /*
|
|
|
895
949
|
)
|
|
896
950
|
] }));
|
|
897
951
|
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
898
|
-
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
952
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx24(
|
|
899
953
|
"div",
|
|
900
954
|
{
|
|
901
955
|
className: cn("flex flex-col gap-1.5 text-left", className),
|
|
@@ -903,7 +957,7 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx23(
|
|
|
903
957
|
}
|
|
904
958
|
);
|
|
905
959
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
906
|
-
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
960
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx24(
|
|
907
961
|
"div",
|
|
908
962
|
{
|
|
909
963
|
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
@@ -911,7 +965,7 @@ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx23(
|
|
|
911
965
|
}
|
|
912
966
|
);
|
|
913
967
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
914
|
-
var AlertDialogTitle =
|
|
968
|
+
var AlertDialogTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
915
969
|
AlertDialogPrimitive.Title,
|
|
916
970
|
{
|
|
917
971
|
ref,
|
|
@@ -920,7 +974,7 @@ var AlertDialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
920
974
|
}
|
|
921
975
|
));
|
|
922
976
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
923
|
-
var AlertDialogDescription =
|
|
977
|
+
var AlertDialogDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
924
978
|
AlertDialogPrimitive.Description,
|
|
925
979
|
{
|
|
926
980
|
ref,
|
|
@@ -929,7 +983,7 @@ var AlertDialogDescription = React19.forwardRef(({ className, ...props }, ref) =
|
|
|
929
983
|
}
|
|
930
984
|
));
|
|
931
985
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
932
|
-
var AlertDialogAction =
|
|
986
|
+
var AlertDialogAction = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
933
987
|
AlertDialogPrimitive.Action,
|
|
934
988
|
{
|
|
935
989
|
ref,
|
|
@@ -938,7 +992,7 @@ var AlertDialogAction = React19.forwardRef(({ className, ...props }, ref) => /*
|
|
|
938
992
|
}
|
|
939
993
|
));
|
|
940
994
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
941
|
-
var AlertDialogCancel =
|
|
995
|
+
var AlertDialogCancel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
942
996
|
AlertDialogPrimitive.Cancel,
|
|
943
997
|
{
|
|
944
998
|
ref,
|
|
@@ -949,17 +1003,17 @@ var AlertDialogCancel = React19.forwardRef(({ className, ...props }, ref) => /*
|
|
|
949
1003
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
950
1004
|
|
|
951
1005
|
// src/components/context-menu.tsx
|
|
952
|
-
import * as
|
|
1006
|
+
import * as React21 from "react";
|
|
953
1007
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
954
1008
|
import { Check as Check3, ChevronRight as ChevronRight2, Circle as Circle3 } from "lucide-react";
|
|
955
|
-
import { jsx as
|
|
1009
|
+
import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
956
1010
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
957
1011
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
958
1012
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
959
1013
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
960
1014
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
961
1015
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
962
|
-
var ContextMenuSubTrigger =
|
|
1016
|
+
var ContextMenuSubTrigger = React21.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs11(
|
|
963
1017
|
ContextMenuPrimitive.SubTrigger,
|
|
964
1018
|
{
|
|
965
1019
|
ref,
|
|
@@ -971,12 +1025,12 @@ var ContextMenuSubTrigger = React20.forwardRef(({ className, inset, children, ..
|
|
|
971
1025
|
...props,
|
|
972
1026
|
children: [
|
|
973
1027
|
children,
|
|
974
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ jsx25(ChevronRight2, { className: "ml-auto h-4 w-4" })
|
|
975
1029
|
]
|
|
976
1030
|
}
|
|
977
1031
|
));
|
|
978
1032
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
979
|
-
var ContextMenuSubContent =
|
|
1033
|
+
var ContextMenuSubContent = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
980
1034
|
ContextMenuPrimitive.SubContent,
|
|
981
1035
|
{
|
|
982
1036
|
ref,
|
|
@@ -988,7 +1042,7 @@ var ContextMenuSubContent = React20.forwardRef(({ className, ...props }, ref) =>
|
|
|
988
1042
|
}
|
|
989
1043
|
));
|
|
990
1044
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
991
|
-
var ContextMenuContent =
|
|
1045
|
+
var ContextMenuContent = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx25(
|
|
992
1046
|
ContextMenuPrimitive.Content,
|
|
993
1047
|
{
|
|
994
1048
|
ref,
|
|
@@ -1000,7 +1054,7 @@ var ContextMenuContent = React20.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1000
1054
|
}
|
|
1001
1055
|
) }));
|
|
1002
1056
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1003
|
-
var ContextMenuItem =
|
|
1057
|
+
var ContextMenuItem = React21.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1004
1058
|
ContextMenuPrimitive.Item,
|
|
1005
1059
|
{
|
|
1006
1060
|
ref,
|
|
@@ -1013,7 +1067,7 @@ var ContextMenuItem = React20.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1013
1067
|
}
|
|
1014
1068
|
));
|
|
1015
1069
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1016
|
-
var ContextMenuCheckboxItem =
|
|
1070
|
+
var ContextMenuCheckboxItem = React21.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs11(
|
|
1017
1071
|
ContextMenuPrimitive.CheckboxItem,
|
|
1018
1072
|
{
|
|
1019
1073
|
ref,
|
|
@@ -1024,13 +1078,13 @@ var ContextMenuCheckboxItem = React20.forwardRef(({ className, children, checked
|
|
|
1024
1078
|
checked,
|
|
1025
1079
|
...props,
|
|
1026
1080
|
children: [
|
|
1027
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ jsx25("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx25(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx25(Check3, { className: "h-4 w-4" }) }) }),
|
|
1028
1082
|
children
|
|
1029
1083
|
]
|
|
1030
1084
|
}
|
|
1031
1085
|
));
|
|
1032
1086
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1033
|
-
var ContextMenuRadioItem =
|
|
1087
|
+
var ContextMenuRadioItem = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs11(
|
|
1034
1088
|
ContextMenuPrimitive.RadioItem,
|
|
1035
1089
|
{
|
|
1036
1090
|
ref,
|
|
@@ -1040,13 +1094,13 @@ var ContextMenuRadioItem = React20.forwardRef(({ className, children, ...props }
|
|
|
1040
1094
|
),
|
|
1041
1095
|
...props,
|
|
1042
1096
|
children: [
|
|
1043
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ jsx25("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx25(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx25(Circle3, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1044
1098
|
children
|
|
1045
1099
|
]
|
|
1046
1100
|
}
|
|
1047
1101
|
));
|
|
1048
1102
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1049
|
-
var ContextMenuLabel =
|
|
1103
|
+
var ContextMenuLabel = React21.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1050
1104
|
ContextMenuPrimitive.Label,
|
|
1051
1105
|
{
|
|
1052
1106
|
ref,
|
|
@@ -1055,7 +1109,7 @@ var ContextMenuLabel = React20.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1055
1109
|
}
|
|
1056
1110
|
));
|
|
1057
1111
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1058
|
-
var ContextMenuSeparator =
|
|
1112
|
+
var ContextMenuSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1059
1113
|
ContextMenuPrimitive.Separator,
|
|
1060
1114
|
{
|
|
1061
1115
|
ref,
|
|
@@ -1065,22 +1119,22 @@ var ContextMenuSeparator = React20.forwardRef(({ className, ...props }, ref) =>
|
|
|
1065
1119
|
));
|
|
1066
1120
|
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
1067
1121
|
var ContextMenuShortcut = ({ className, ...props }) => {
|
|
1068
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ jsx25("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1069
1123
|
};
|
|
1070
1124
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
1071
1125
|
|
|
1072
1126
|
// src/components/menubar.tsx
|
|
1073
|
-
import * as
|
|
1127
|
+
import * as React22 from "react";
|
|
1074
1128
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
1075
1129
|
import { Check as Check4, ChevronRight as ChevronRight3, Circle as Circle4 } from "lucide-react";
|
|
1076
|
-
import { jsx as
|
|
1077
|
-
var MenubarMenu = (props) => /* @__PURE__ */
|
|
1130
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1131
|
+
var MenubarMenu = (props) => /* @__PURE__ */ jsx26(MenubarPrimitive.Menu, { ...props });
|
|
1078
1132
|
MenubarMenu.displayName = "MenubarMenu";
|
|
1079
1133
|
var MenubarGroup = MenubarPrimitive.Group;
|
|
1080
1134
|
var MenubarPortal = MenubarPrimitive.Portal;
|
|
1081
1135
|
var MenubarSub = MenubarPrimitive.Sub;
|
|
1082
1136
|
var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
1083
|
-
var Menubar =
|
|
1137
|
+
var Menubar = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1084
1138
|
MenubarPrimitive.Root,
|
|
1085
1139
|
{
|
|
1086
1140
|
ref,
|
|
@@ -1092,7 +1146,7 @@ var Menubar = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1092
1146
|
}
|
|
1093
1147
|
));
|
|
1094
1148
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
1095
|
-
var MenubarTrigger =
|
|
1149
|
+
var MenubarTrigger = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1096
1150
|
MenubarPrimitive.Trigger,
|
|
1097
1151
|
{
|
|
1098
1152
|
ref,
|
|
@@ -1104,7 +1158,7 @@ var MenubarTrigger = React21.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1104
1158
|
}
|
|
1105
1159
|
));
|
|
1106
1160
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
1107
|
-
var MenubarSubTrigger =
|
|
1161
|
+
var MenubarSubTrigger = React22.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1108
1162
|
MenubarPrimitive.SubTrigger,
|
|
1109
1163
|
{
|
|
1110
1164
|
ref,
|
|
@@ -1116,12 +1170,12 @@ var MenubarSubTrigger = React21.forwardRef(({ className, inset, children, ...pro
|
|
|
1116
1170
|
...props,
|
|
1117
1171
|
children: [
|
|
1118
1172
|
children,
|
|
1119
|
-
/* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ jsx26(ChevronRight3, { className: "ml-auto h-4 w-4" })
|
|
1120
1174
|
]
|
|
1121
1175
|
}
|
|
1122
1176
|
));
|
|
1123
1177
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
1124
|
-
var MenubarSubContent =
|
|
1178
|
+
var MenubarSubContent = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1125
1179
|
MenubarPrimitive.SubContent,
|
|
1126
1180
|
{
|
|
1127
1181
|
ref,
|
|
@@ -1133,7 +1187,7 @@ var MenubarSubContent = React21.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1133
1187
|
}
|
|
1134
1188
|
));
|
|
1135
1189
|
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
1136
|
-
var MenubarContent =
|
|
1190
|
+
var MenubarContent = React22.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx26(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1137
1191
|
MenubarPrimitive.Content,
|
|
1138
1192
|
{
|
|
1139
1193
|
ref,
|
|
@@ -1148,7 +1202,7 @@ var MenubarContent = React21.forwardRef(({ className, align = "start", alignOffs
|
|
|
1148
1202
|
}
|
|
1149
1203
|
) }));
|
|
1150
1204
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
1151
|
-
var MenubarItem =
|
|
1205
|
+
var MenubarItem = React22.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1152
1206
|
MenubarPrimitive.Item,
|
|
1153
1207
|
{
|
|
1154
1208
|
ref,
|
|
@@ -1161,7 +1215,7 @@ var MenubarItem = React21.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
1161
1215
|
}
|
|
1162
1216
|
));
|
|
1163
1217
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
1164
|
-
var MenubarCheckboxItem =
|
|
1218
|
+
var MenubarCheckboxItem = React22.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1165
1219
|
MenubarPrimitive.CheckboxItem,
|
|
1166
1220
|
{
|
|
1167
1221
|
ref,
|
|
@@ -1172,13 +1226,13 @@ var MenubarCheckboxItem = React21.forwardRef(({ className, children, checked, ..
|
|
|
1172
1226
|
checked,
|
|
1173
1227
|
...props,
|
|
1174
1228
|
children: [
|
|
1175
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ jsx26("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx26(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(Check4, { className: "h-4 w-4" }) }) }),
|
|
1176
1230
|
children
|
|
1177
1231
|
]
|
|
1178
1232
|
}
|
|
1179
1233
|
));
|
|
1180
1234
|
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
1181
|
-
var MenubarRadioItem =
|
|
1235
|
+
var MenubarRadioItem = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1182
1236
|
MenubarPrimitive.RadioItem,
|
|
1183
1237
|
{
|
|
1184
1238
|
ref,
|
|
@@ -1188,13 +1242,13 @@ var MenubarRadioItem = React21.forwardRef(({ className, children, ...props }, re
|
|
|
1188
1242
|
),
|
|
1189
1243
|
...props,
|
|
1190
1244
|
children: [
|
|
1191
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ jsx26("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx26(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx26(Circle4, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1192
1246
|
children
|
|
1193
1247
|
]
|
|
1194
1248
|
}
|
|
1195
1249
|
));
|
|
1196
1250
|
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
1197
|
-
var MenubarLabel =
|
|
1251
|
+
var MenubarLabel = React22.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1198
1252
|
MenubarPrimitive.Label,
|
|
1199
1253
|
{
|
|
1200
1254
|
ref,
|
|
@@ -1203,7 +1257,7 @@ var MenubarLabel = React21.forwardRef(({ className, inset, ...props }, ref) => /
|
|
|
1203
1257
|
}
|
|
1204
1258
|
));
|
|
1205
1259
|
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
1206
|
-
var MenubarSeparator =
|
|
1260
|
+
var MenubarSeparator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1207
1261
|
MenubarPrimitive.Separator,
|
|
1208
1262
|
{
|
|
1209
1263
|
ref,
|
|
@@ -1213,14 +1267,14 @@ var MenubarSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1213
1267
|
));
|
|
1214
1268
|
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
1215
1269
|
var MenubarShortcut = ({ className, ...props }) => {
|
|
1216
|
-
return /* @__PURE__ */
|
|
1270
|
+
return /* @__PURE__ */ jsx26("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
|
|
1217
1271
|
};
|
|
1218
1272
|
MenubarShortcut.displayName = "MenubarShortcut";
|
|
1219
1273
|
|
|
1220
1274
|
// src/components/badge.tsx
|
|
1221
|
-
import * as
|
|
1275
|
+
import * as React23 from "react";
|
|
1222
1276
|
import { cva as cva5 } from "class-variance-authority";
|
|
1223
|
-
import { jsx as
|
|
1277
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1224
1278
|
var badgeVariants = cva5(
|
|
1225
1279
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
1226
1280
|
{
|
|
@@ -1237,23 +1291,23 @@ var badgeVariants = cva5(
|
|
|
1237
1291
|
defaultVariants: { variant: "default" }
|
|
1238
1292
|
}
|
|
1239
1293
|
);
|
|
1240
|
-
var Badge =
|
|
1241
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
1294
|
+
var Badge = React23.forwardRef(
|
|
1295
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx27("div", { ref, className: cn(badgeVariants({ variant }), className), ...props })
|
|
1242
1296
|
);
|
|
1243
1297
|
Badge.displayName = "Badge";
|
|
1244
1298
|
|
|
1245
1299
|
// src/components/table.tsx
|
|
1246
|
-
import * as
|
|
1247
|
-
import { jsx as
|
|
1248
|
-
var Table =
|
|
1249
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1300
|
+
import * as React24 from "react";
|
|
1301
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1302
|
+
var Table = React24.forwardRef(
|
|
1303
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx28("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
1250
1304
|
);
|
|
1251
1305
|
Table.displayName = "Table";
|
|
1252
|
-
var TableHeader =
|
|
1306
|
+
var TableHeader = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28("thead", { ref, className: cn("[&_tr]:border-b [&_tr]:border-border-subtle", className), ...props }));
|
|
1253
1307
|
TableHeader.displayName = "TableHeader";
|
|
1254
|
-
var TableBody =
|
|
1308
|
+
var TableBody = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
1255
1309
|
TableBody.displayName = "TableBody";
|
|
1256
|
-
var TableFooter =
|
|
1310
|
+
var TableFooter = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1257
1311
|
"tfoot",
|
|
1258
1312
|
{
|
|
1259
1313
|
ref,
|
|
@@ -1265,8 +1319,8 @@ var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1265
1319
|
}
|
|
1266
1320
|
));
|
|
1267
1321
|
TableFooter.displayName = "TableFooter";
|
|
1268
|
-
var TableRow =
|
|
1269
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1322
|
+
var TableRow = React24.forwardRef(
|
|
1323
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1270
1324
|
"tr",
|
|
1271
1325
|
{
|
|
1272
1326
|
ref,
|
|
@@ -1279,7 +1333,7 @@ var TableRow = React23.forwardRef(
|
|
|
1279
1333
|
)
|
|
1280
1334
|
);
|
|
1281
1335
|
TableRow.displayName = "TableRow";
|
|
1282
|
-
var TableHead =
|
|
1336
|
+
var TableHead = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1283
1337
|
"th",
|
|
1284
1338
|
{
|
|
1285
1339
|
ref,
|
|
@@ -1291,7 +1345,7 @@ var TableHead = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1291
1345
|
}
|
|
1292
1346
|
));
|
|
1293
1347
|
TableHead.displayName = "TableHead";
|
|
1294
|
-
var TableCell =
|
|
1348
|
+
var TableCell = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1295
1349
|
"td",
|
|
1296
1350
|
{
|
|
1297
1351
|
ref,
|
|
@@ -1300,22 +1354,22 @@ var TableCell = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1300
1354
|
}
|
|
1301
1355
|
));
|
|
1302
1356
|
TableCell.displayName = "TableCell";
|
|
1303
|
-
var TableCaption =
|
|
1357
|
+
var TableCaption = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28("caption", { ref, className: cn("mt-4 text-sm text-text-secondary", className), ...props }));
|
|
1304
1358
|
TableCaption.displayName = "TableCaption";
|
|
1305
1359
|
|
|
1306
1360
|
// src/components/skeleton.tsx
|
|
1307
|
-
import * as
|
|
1308
|
-
import { jsx as
|
|
1309
|
-
var Skeleton =
|
|
1310
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1361
|
+
import * as React25 from "react";
|
|
1362
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1363
|
+
var Skeleton = React25.forwardRef(
|
|
1364
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx29("div", { ref, className: cn("animate-pulse rounded-md bg-bg-secondary", className), ...props })
|
|
1311
1365
|
);
|
|
1312
1366
|
Skeleton.displayName = "Skeleton";
|
|
1313
1367
|
|
|
1314
1368
|
// src/components/avatar.tsx
|
|
1315
|
-
import * as
|
|
1369
|
+
import * as React26 from "react";
|
|
1316
1370
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
1317
|
-
import { jsx as
|
|
1318
|
-
var Avatar =
|
|
1371
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1372
|
+
var Avatar = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1319
1373
|
AvatarPrimitive.Root,
|
|
1320
1374
|
{
|
|
1321
1375
|
ref,
|
|
@@ -1324,9 +1378,9 @@ var Avatar = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
1324
1378
|
}
|
|
1325
1379
|
));
|
|
1326
1380
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
1327
|
-
var AvatarImage =
|
|
1381
|
+
var AvatarImage = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(AvatarPrimitive.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props }));
|
|
1328
1382
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
1329
|
-
var AvatarFallback =
|
|
1383
|
+
var AvatarFallback = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1330
1384
|
AvatarPrimitive.Fallback,
|
|
1331
1385
|
{
|
|
1332
1386
|
ref,
|
|
@@ -1340,10 +1394,10 @@ var AvatarFallback = React25.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1340
1394
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
1341
1395
|
|
|
1342
1396
|
// src/components/separator.tsx
|
|
1343
|
-
import * as
|
|
1397
|
+
import * as React27 from "react";
|
|
1344
1398
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1345
|
-
import { jsx as
|
|
1346
|
-
var Separator4 =
|
|
1399
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1400
|
+
var Separator4 = React27.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
1347
1401
|
SeparatorPrimitive.Root,
|
|
1348
1402
|
{
|
|
1349
1403
|
ref,
|
|
@@ -1360,17 +1414,17 @@ var Separator4 = React26.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1360
1414
|
Separator4.displayName = SeparatorPrimitive.Root.displayName;
|
|
1361
1415
|
|
|
1362
1416
|
// src/components/progress.tsx
|
|
1363
|
-
import * as
|
|
1417
|
+
import * as React28 from "react";
|
|
1364
1418
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1365
|
-
import { jsx as
|
|
1366
|
-
var Progress =
|
|
1419
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1420
|
+
var Progress = React28.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
1367
1421
|
ProgressPrimitive.Root,
|
|
1368
1422
|
{
|
|
1369
1423
|
ref,
|
|
1370
1424
|
value,
|
|
1371
1425
|
className: cn("relative h-4 w-full overflow-hidden rounded-full bg-bg-secondary", className),
|
|
1372
1426
|
...props,
|
|
1373
|
-
children: /* @__PURE__ */
|
|
1427
|
+
children: /* @__PURE__ */ jsx32(
|
|
1374
1428
|
ProgressPrimitive.Indicator,
|
|
1375
1429
|
{
|
|
1376
1430
|
className: "h-full w-full flex-1 bg-blue-400 transition-all",
|
|
@@ -1386,11 +1440,11 @@ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
|
1386
1440
|
var AspectRatio = AspectRatioPrimitive.Root;
|
|
1387
1441
|
|
|
1388
1442
|
// src/components/tabs.tsx
|
|
1389
|
-
import * as
|
|
1443
|
+
import * as React29 from "react";
|
|
1390
1444
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
1391
|
-
import { jsx as
|
|
1445
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1392
1446
|
var Tabs = TabsPrimitive.Root;
|
|
1393
|
-
var TabsList =
|
|
1447
|
+
var TabsList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
1394
1448
|
TabsPrimitive.List,
|
|
1395
1449
|
{
|
|
1396
1450
|
ref,
|
|
@@ -1402,7 +1456,7 @@ var TabsList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1402
1456
|
}
|
|
1403
1457
|
));
|
|
1404
1458
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
1405
|
-
var TabsTrigger =
|
|
1459
|
+
var TabsTrigger = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
1406
1460
|
TabsPrimitive.Trigger,
|
|
1407
1461
|
{
|
|
1408
1462
|
ref,
|
|
@@ -1414,7 +1468,7 @@ var TabsTrigger = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1414
1468
|
}
|
|
1415
1469
|
));
|
|
1416
1470
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
1417
|
-
var TabsContent =
|
|
1471
|
+
var TabsContent = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
|
|
1418
1472
|
TabsPrimitive.Content,
|
|
1419
1473
|
{
|
|
1420
1474
|
ref,
|
|
@@ -1428,12 +1482,12 @@ var TabsContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1428
1482
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
1429
1483
|
|
|
1430
1484
|
// src/components/accordion.tsx
|
|
1431
|
-
import * as
|
|
1485
|
+
import * as React30 from "react";
|
|
1432
1486
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
1433
1487
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1434
|
-
import { jsx as
|
|
1488
|
+
import { jsx as jsx34, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1435
1489
|
var Accordion = AccordionPrimitive.Root;
|
|
1436
|
-
var AccordionItem =
|
|
1490
|
+
var AccordionItem = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
1437
1491
|
AccordionPrimitive.Item,
|
|
1438
1492
|
{
|
|
1439
1493
|
ref,
|
|
@@ -1442,7 +1496,7 @@ var AccordionItem = React29.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1442
1496
|
}
|
|
1443
1497
|
));
|
|
1444
1498
|
AccordionItem.displayName = AccordionPrimitive.Item.displayName;
|
|
1445
|
-
var AccordionTrigger =
|
|
1499
|
+
var AccordionTrigger = React30.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx34(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs13(
|
|
1446
1500
|
AccordionPrimitive.Trigger,
|
|
1447
1501
|
{
|
|
1448
1502
|
ref,
|
|
@@ -1453,12 +1507,12 @@ var AccordionTrigger = React29.forwardRef(({ className, children, ...props }, re
|
|
|
1453
1507
|
...props,
|
|
1454
1508
|
children: [
|
|
1455
1509
|
children,
|
|
1456
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ jsx34(ChevronDown2, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
1457
1511
|
]
|
|
1458
1512
|
}
|
|
1459
1513
|
) }));
|
|
1460
1514
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
1461
|
-
var AccordionContent =
|
|
1515
|
+
var AccordionContent = React30.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
1462
1516
|
AccordionPrimitive.Content,
|
|
1463
1517
|
{
|
|
1464
1518
|
ref,
|
|
@@ -1466,18 +1520,18 @@ var AccordionContent = React29.forwardRef(({ className, children, ...props }, re
|
|
|
1466
1520
|
"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1467
1521
|
),
|
|
1468
1522
|
...props,
|
|
1469
|
-
children: /* @__PURE__ */
|
|
1523
|
+
children: /* @__PURE__ */ jsx34("div", { className: cn("pb-4 pt-0", className), children })
|
|
1470
1524
|
}
|
|
1471
1525
|
));
|
|
1472
1526
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
1473
1527
|
|
|
1474
1528
|
// src/components/collapsible.tsx
|
|
1475
|
-
import * as
|
|
1529
|
+
import * as React31 from "react";
|
|
1476
1530
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1477
|
-
import { jsx as
|
|
1531
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1478
1532
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
1479
1533
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
1480
|
-
var CollapsibleContent2 =
|
|
1534
|
+
var CollapsibleContent2 = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
1481
1535
|
CollapsiblePrimitive.CollapsibleContent,
|
|
1482
1536
|
{
|
|
1483
1537
|
ref,
|
|
@@ -1491,24 +1545,24 @@ var CollapsibleContent2 = React30.forwardRef(({ className, ...props }, ref) => /
|
|
|
1491
1545
|
CollapsibleContent2.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;
|
|
1492
1546
|
|
|
1493
1547
|
// src/components/scroll-area.tsx
|
|
1494
|
-
import * as
|
|
1548
|
+
import * as React32 from "react";
|
|
1495
1549
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1496
|
-
import { jsx as
|
|
1497
|
-
var ScrollArea =
|
|
1550
|
+
import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1551
|
+
var ScrollArea = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
1498
1552
|
ScrollAreaPrimitive.Root,
|
|
1499
1553
|
{
|
|
1500
1554
|
ref,
|
|
1501
1555
|
className: cn("relative overflow-hidden", className),
|
|
1502
1556
|
...props,
|
|
1503
1557
|
children: [
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ jsx36(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1559
|
+
/* @__PURE__ */ jsx36(ScrollBar, {}),
|
|
1560
|
+
/* @__PURE__ */ jsx36(ScrollAreaPrimitive.Corner, {})
|
|
1507
1561
|
]
|
|
1508
1562
|
}
|
|
1509
1563
|
));
|
|
1510
1564
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1511
|
-
var ScrollBar =
|
|
1565
|
+
var ScrollBar = React32.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
1512
1566
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1513
1567
|
{
|
|
1514
1568
|
ref,
|
|
@@ -1520,15 +1574,15 @@ var ScrollBar = React31.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
1520
1574
|
className
|
|
1521
1575
|
),
|
|
1522
1576
|
...props,
|
|
1523
|
-
children: /* @__PURE__ */
|
|
1577
|
+
children: /* @__PURE__ */ jsx36(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border-default" })
|
|
1524
1578
|
}
|
|
1525
1579
|
));
|
|
1526
1580
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1527
1581
|
|
|
1528
1582
|
// src/components/alert.tsx
|
|
1529
|
-
import * as
|
|
1583
|
+
import * as React33 from "react";
|
|
1530
1584
|
import { cva as cva6 } from "class-variance-authority";
|
|
1531
|
-
import { jsx as
|
|
1585
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1532
1586
|
var alertVariants = cva6(
|
|
1533
1587
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
1534
1588
|
{
|
|
@@ -1543,7 +1597,7 @@ var alertVariants = cva6(
|
|
|
1543
1597
|
defaultVariants: { variant: "default" }
|
|
1544
1598
|
}
|
|
1545
1599
|
);
|
|
1546
|
-
var Alert =
|
|
1600
|
+
var Alert = React33.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
1547
1601
|
"div",
|
|
1548
1602
|
{
|
|
1549
1603
|
ref,
|
|
@@ -1553,7 +1607,7 @@ var Alert = React32.forwardRef(({ className, variant, ...props }, ref) => /* @__
|
|
|
1553
1607
|
}
|
|
1554
1608
|
));
|
|
1555
1609
|
Alert.displayName = "Alert";
|
|
1556
|
-
var AlertTitle =
|
|
1610
|
+
var AlertTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
1557
1611
|
"h5",
|
|
1558
1612
|
{
|
|
1559
1613
|
ref,
|
|
@@ -1562,7 +1616,7 @@ var AlertTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1562
1616
|
}
|
|
1563
1617
|
));
|
|
1564
1618
|
AlertTitle.displayName = "AlertTitle";
|
|
1565
|
-
var AlertDescription =
|
|
1619
|
+
var AlertDescription = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
1566
1620
|
"div",
|
|
1567
1621
|
{
|
|
1568
1622
|
ref,
|
|
@@ -1573,14 +1627,14 @@ var AlertDescription = React32.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1573
1627
|
AlertDescription.displayName = "AlertDescription";
|
|
1574
1628
|
|
|
1575
1629
|
// src/components/breadcrumb.tsx
|
|
1576
|
-
import * as
|
|
1630
|
+
import * as React34 from "react";
|
|
1577
1631
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
1578
1632
|
import { ChevronRight as ChevronRight4, MoreHorizontal } from "lucide-react";
|
|
1579
|
-
import { jsx as
|
|
1580
|
-
var Breadcrumb =
|
|
1633
|
+
import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1634
|
+
var Breadcrumb = React34.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx38("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
1581
1635
|
Breadcrumb.displayName = "Breadcrumb";
|
|
1582
|
-
var BreadcrumbList =
|
|
1583
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1636
|
+
var BreadcrumbList = React34.forwardRef(
|
|
1637
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
1584
1638
|
"ol",
|
|
1585
1639
|
{
|
|
1586
1640
|
ref,
|
|
@@ -1593,13 +1647,13 @@ var BreadcrumbList = React33.forwardRef(
|
|
|
1593
1647
|
)
|
|
1594
1648
|
);
|
|
1595
1649
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
1596
|
-
var BreadcrumbItem =
|
|
1597
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1650
|
+
var BreadcrumbItem = React34.forwardRef(
|
|
1651
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38("li", { ref, className: cn("inline-flex items-center gap-1.5", className), ...props })
|
|
1598
1652
|
);
|
|
1599
1653
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
1600
|
-
var BreadcrumbLink =
|
|
1654
|
+
var BreadcrumbLink = React34.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
1601
1655
|
const Comp = asChild ? Slot2 : "a";
|
|
1602
|
-
return /* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ jsx38(
|
|
1603
1657
|
Comp,
|
|
1604
1658
|
{
|
|
1605
1659
|
ref,
|
|
@@ -1609,8 +1663,8 @@ var BreadcrumbLink = React33.forwardRef(({ asChild, className, ...props }, ref)
|
|
|
1609
1663
|
);
|
|
1610
1664
|
});
|
|
1611
1665
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
1612
|
-
var BreadcrumbPage =
|
|
1613
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1666
|
+
var BreadcrumbPage = React34.forwardRef(
|
|
1667
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
1614
1668
|
"span",
|
|
1615
1669
|
{
|
|
1616
1670
|
ref,
|
|
@@ -1627,14 +1681,14 @@ var BreadcrumbSeparator = ({
|
|
|
1627
1681
|
children,
|
|
1628
1682
|
className,
|
|
1629
1683
|
...props
|
|
1630
|
-
}) => /* @__PURE__ */
|
|
1684
|
+
}) => /* @__PURE__ */ jsx38(
|
|
1631
1685
|
"li",
|
|
1632
1686
|
{
|
|
1633
1687
|
role: "presentation",
|
|
1634
1688
|
"aria-hidden": "true",
|
|
1635
1689
|
className: cn("[&>svg]:h-4 [&>svg]:w-4", className),
|
|
1636
1690
|
...props,
|
|
1637
|
-
children: children ?? /* @__PURE__ */
|
|
1691
|
+
children: children ?? /* @__PURE__ */ jsx38(ChevronRight4, {})
|
|
1638
1692
|
}
|
|
1639
1693
|
);
|
|
1640
1694
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
@@ -1646,18 +1700,18 @@ var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs15(
|
|
|
1646
1700
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
1647
1701
|
...props,
|
|
1648
1702
|
children: [
|
|
1649
|
-
/* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */
|
|
1703
|
+
/* @__PURE__ */ jsx38(MoreHorizontal, { className: "h-4 w-4" }),
|
|
1704
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "More" })
|
|
1651
1705
|
]
|
|
1652
1706
|
}
|
|
1653
1707
|
);
|
|
1654
1708
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
1655
1709
|
|
|
1656
1710
|
// src/components/pagination.tsx
|
|
1657
|
-
import * as
|
|
1711
|
+
import * as React35 from "react";
|
|
1658
1712
|
import { ChevronLeft, ChevronRight as ChevronRight5, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
1659
|
-
import { jsx as
|
|
1660
|
-
var Pagination = ({ className, ...props }) => /* @__PURE__ */
|
|
1713
|
+
import { jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1714
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx39(
|
|
1661
1715
|
"nav",
|
|
1662
1716
|
{
|
|
1663
1717
|
role: "navigation",
|
|
@@ -1667,15 +1721,15 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx38(
|
|
|
1667
1721
|
}
|
|
1668
1722
|
);
|
|
1669
1723
|
Pagination.displayName = "Pagination";
|
|
1670
|
-
var PaginationContent =
|
|
1671
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1724
|
+
var PaginationContent = React35.forwardRef(
|
|
1725
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39("ul", { ref, className: cn("flex flex-row items-center gap-1", className), ...props })
|
|
1672
1726
|
);
|
|
1673
1727
|
PaginationContent.displayName = "PaginationContent";
|
|
1674
|
-
var PaginationItem =
|
|
1675
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1728
|
+
var PaginationItem = React35.forwardRef(
|
|
1729
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39("li", { ref, className: cn("", className), ...props })
|
|
1676
1730
|
);
|
|
1677
1731
|
PaginationItem.displayName = "PaginationItem";
|
|
1678
|
-
var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */
|
|
1732
|
+
var PaginationLink = ({ className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx39(
|
|
1679
1733
|
"a",
|
|
1680
1734
|
{
|
|
1681
1735
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -1695,8 +1749,8 @@ var PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ jsxs16(
|
|
|
1695
1749
|
className: cn("gap-1 pl-2.5", className),
|
|
1696
1750
|
...props,
|
|
1697
1751
|
children: [
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ jsx39(ChevronLeft, { className: "h-4 w-4" }),
|
|
1753
|
+
/* @__PURE__ */ jsx39("span", { children: "Previous" })
|
|
1700
1754
|
]
|
|
1701
1755
|
}
|
|
1702
1756
|
);
|
|
@@ -1709,8 +1763,8 @@ var PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs16(
|
|
|
1709
1763
|
className: cn("gap-1 pr-2.5", className),
|
|
1710
1764
|
...props,
|
|
1711
1765
|
children: [
|
|
1712
|
-
/* @__PURE__ */
|
|
1713
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ jsx39("span", { children: "Next" }),
|
|
1767
|
+
/* @__PURE__ */ jsx39(ChevronRight5, { className: "h-4 w-4" })
|
|
1714
1768
|
]
|
|
1715
1769
|
}
|
|
1716
1770
|
);
|
|
@@ -1722,19 +1776,19 @@ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs16(
|
|
|
1722
1776
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
1723
1777
|
...props,
|
|
1724
1778
|
children: [
|
|
1725
|
-
/* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx39(MoreHorizontal2, { className: "h-4 w-4" }),
|
|
1780
|
+
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "More pages" })
|
|
1727
1781
|
]
|
|
1728
1782
|
}
|
|
1729
1783
|
);
|
|
1730
1784
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
1731
1785
|
|
|
1732
1786
|
// src/components/command.tsx
|
|
1733
|
-
import * as
|
|
1787
|
+
import * as React36 from "react";
|
|
1734
1788
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1735
1789
|
import { Search } from "lucide-react";
|
|
1736
|
-
import { jsx as
|
|
1737
|
-
var Command =
|
|
1790
|
+
import { jsx as jsx40, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1791
|
+
var Command = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
1738
1792
|
CommandPrimitive,
|
|
1739
1793
|
{
|
|
1740
1794
|
ref,
|
|
@@ -1746,10 +1800,10 @@ var Command = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1746
1800
|
}
|
|
1747
1801
|
));
|
|
1748
1802
|
Command.displayName = CommandPrimitive.displayName;
|
|
1749
|
-
var CommandDialog = ({ children, ...props }) => /* @__PURE__ */
|
|
1750
|
-
var CommandInput =
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
-
/* @__PURE__ */
|
|
1803
|
+
var CommandDialog = ({ children, ...props }) => /* @__PURE__ */ jsx40(Dialog, { ...props, children: /* @__PURE__ */ jsx40(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx40(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-text-tertiary [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
1804
|
+
var CommandInput = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs17("div", { className: "flex items-center border-b border-border-subtle px-3", "cmdk-input-wrapper": "", children: [
|
|
1805
|
+
/* @__PURE__ */ jsx40(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1806
|
+
/* @__PURE__ */ jsx40(
|
|
1753
1807
|
CommandPrimitive.Input,
|
|
1754
1808
|
{
|
|
1755
1809
|
ref,
|
|
@@ -1762,7 +1816,7 @@ var CommandInput = React35.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1762
1816
|
)
|
|
1763
1817
|
] }));
|
|
1764
1818
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1765
|
-
var CommandList =
|
|
1819
|
+
var CommandList = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
1766
1820
|
CommandPrimitive.List,
|
|
1767
1821
|
{
|
|
1768
1822
|
ref,
|
|
@@ -1771,7 +1825,7 @@ var CommandList = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1771
1825
|
}
|
|
1772
1826
|
));
|
|
1773
1827
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1774
|
-
var CommandEmpty =
|
|
1828
|
+
var CommandEmpty = React36.forwardRef((props, ref) => /* @__PURE__ */ jsx40(
|
|
1775
1829
|
CommandPrimitive.Empty,
|
|
1776
1830
|
{
|
|
1777
1831
|
ref,
|
|
@@ -1780,7 +1834,7 @@ var CommandEmpty = React35.forwardRef((props, ref) => /* @__PURE__ */ jsx39(
|
|
|
1780
1834
|
}
|
|
1781
1835
|
));
|
|
1782
1836
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1783
|
-
var CommandGroup =
|
|
1837
|
+
var CommandGroup = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
1784
1838
|
CommandPrimitive.Group,
|
|
1785
1839
|
{
|
|
1786
1840
|
ref,
|
|
@@ -1792,7 +1846,7 @@ var CommandGroup = React35.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1792
1846
|
}
|
|
1793
1847
|
));
|
|
1794
1848
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1795
|
-
var CommandSeparator =
|
|
1849
|
+
var CommandSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
1796
1850
|
CommandPrimitive.Separator,
|
|
1797
1851
|
{
|
|
1798
1852
|
ref,
|
|
@@ -1801,7 +1855,7 @@ var CommandSeparator = React35.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1801
1855
|
}
|
|
1802
1856
|
));
|
|
1803
1857
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1804
|
-
var CommandItem =
|
|
1858
|
+
var CommandItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
1805
1859
|
CommandPrimitive.Item,
|
|
1806
1860
|
{
|
|
1807
1861
|
ref,
|
|
@@ -1813,7 +1867,7 @@ var CommandItem = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1813
1867
|
}
|
|
1814
1868
|
));
|
|
1815
1869
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
1816
|
-
var CommandShortcut = ({ className, ...props }) => /* @__PURE__ */
|
|
1870
|
+
var CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx40(
|
|
1817
1871
|
"span",
|
|
1818
1872
|
{
|
|
1819
1873
|
className: cn("ml-auto text-xs tracking-widest text-text-tertiary", className),
|
|
@@ -1823,12 +1877,12 @@ var CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx39(
|
|
|
1823
1877
|
CommandShortcut.displayName = "CommandShortcut";
|
|
1824
1878
|
|
|
1825
1879
|
// src/components/navigation-menu.tsx
|
|
1826
|
-
import * as
|
|
1880
|
+
import * as React37 from "react";
|
|
1827
1881
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
1828
1882
|
import { cva as cva7 } from "class-variance-authority";
|
|
1829
1883
|
import { ChevronDown as ChevronDown3 } from "lucide-react";
|
|
1830
|
-
import { jsx as
|
|
1831
|
-
var NavigationMenu =
|
|
1884
|
+
import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1885
|
+
var NavigationMenu = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
1832
1886
|
NavigationMenuPrimitive.Root,
|
|
1833
1887
|
{
|
|
1834
1888
|
ref,
|
|
@@ -1836,12 +1890,12 @@ var NavigationMenu = React36.forwardRef(({ className, children, ...props }, ref)
|
|
|
1836
1890
|
...props,
|
|
1837
1891
|
children: [
|
|
1838
1892
|
children,
|
|
1839
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ jsx41(NavigationMenuViewport, {})
|
|
1840
1894
|
]
|
|
1841
1895
|
}
|
|
1842
1896
|
));
|
|
1843
1897
|
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
1844
|
-
var NavigationMenuList =
|
|
1898
|
+
var NavigationMenuList = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
1845
1899
|
NavigationMenuPrimitive.List,
|
|
1846
1900
|
{
|
|
1847
1901
|
ref,
|
|
@@ -1854,7 +1908,7 @@ var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
|
1854
1908
|
var navigationMenuTriggerStyle = cva7(
|
|
1855
1909
|
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-bg-elevated px-4 py-2 text-sm font-medium transition-colors hover:bg-bg-secondary hover:text-text-primary focus:bg-bg-secondary focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-bg-secondary"
|
|
1856
1910
|
);
|
|
1857
|
-
var NavigationMenuTrigger =
|
|
1911
|
+
var NavigationMenuTrigger = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
1858
1912
|
NavigationMenuPrimitive.Trigger,
|
|
1859
1913
|
{
|
|
1860
1914
|
ref,
|
|
@@ -1863,7 +1917,7 @@ var NavigationMenuTrigger = React36.forwardRef(({ className, children, ...props
|
|
|
1863
1917
|
children: [
|
|
1864
1918
|
children,
|
|
1865
1919
|
" ",
|
|
1866
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ jsx41(
|
|
1867
1921
|
ChevronDown3,
|
|
1868
1922
|
{
|
|
1869
1923
|
className: "relative top-[1px] ml-1 h-4 w-4 transition duration-200 group-data-[state=open]:rotate-180",
|
|
@@ -1874,7 +1928,7 @@ var NavigationMenuTrigger = React36.forwardRef(({ className, children, ...props
|
|
|
1874
1928
|
}
|
|
1875
1929
|
));
|
|
1876
1930
|
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
1877
|
-
var NavigationMenuContent =
|
|
1931
|
+
var NavigationMenuContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
1878
1932
|
NavigationMenuPrimitive.Content,
|
|
1879
1933
|
{
|
|
1880
1934
|
ref,
|
|
@@ -1887,7 +1941,7 @@ var NavigationMenuContent = React36.forwardRef(({ className, ...props }, ref) =>
|
|
|
1887
1941
|
));
|
|
1888
1942
|
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
1889
1943
|
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
1890
|
-
var NavigationMenuViewport =
|
|
1944
|
+
var NavigationMenuViewport = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx41(
|
|
1891
1945
|
NavigationMenuPrimitive.Viewport,
|
|
1892
1946
|
{
|
|
1893
1947
|
ref,
|
|
@@ -1899,7 +1953,7 @@ var NavigationMenuViewport = React36.forwardRef(({ className, ...props }, ref) =
|
|
|
1899
1953
|
}
|
|
1900
1954
|
) }));
|
|
1901
1955
|
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
1902
|
-
var NavigationMenuIndicator =
|
|
1956
|
+
var NavigationMenuIndicator = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
|
|
1903
1957
|
NavigationMenuPrimitive.Indicator,
|
|
1904
1958
|
{
|
|
1905
1959
|
ref,
|
|
@@ -1908,7 +1962,7 @@ var NavigationMenuIndicator = React36.forwardRef(({ className, ...props }, ref)
|
|
|
1908
1962
|
className
|
|
1909
1963
|
),
|
|
1910
1964
|
...props,
|
|
1911
|
-
children: /* @__PURE__ */
|
|
1965
|
+
children: /* @__PURE__ */ jsx41("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border-subtle shadow-md" })
|
|
1912
1966
|
}
|
|
1913
1967
|
));
|
|
1914
1968
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
@@ -1971,10 +2025,10 @@ function useTheme() {
|
|
|
1971
2025
|
|
|
1972
2026
|
// src/components/sonner.tsx
|
|
1973
2027
|
import { Toaster as SonnerToaster, toast } from "sonner";
|
|
1974
|
-
import { jsx as
|
|
2028
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1975
2029
|
var Toaster = ({ ...props }) => {
|
|
1976
2030
|
const { resolvedTheme } = useTheme();
|
|
1977
|
-
return /* @__PURE__ */
|
|
2031
|
+
return /* @__PURE__ */ jsx42(
|
|
1978
2032
|
SonnerToaster,
|
|
1979
2033
|
{
|
|
1980
2034
|
theme: resolvedTheme,
|
|
@@ -1994,7 +2048,7 @@ var Toaster = ({ ...props }) => {
|
|
|
1994
2048
|
|
|
1995
2049
|
// src/theme/ThemeToggle.tsx
|
|
1996
2050
|
import { Sun, Moon, Monitor } from "lucide-react";
|
|
1997
|
-
import { jsx as
|
|
2051
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1998
2052
|
var icons = {
|
|
1999
2053
|
light: Sun,
|
|
2000
2054
|
dark: Moon,
|
|
@@ -2008,14 +2062,14 @@ var nextTheme = {
|
|
|
2008
2062
|
function ThemeToggle() {
|
|
2009
2063
|
const { theme, setTheme } = useTheme();
|
|
2010
2064
|
const Icon = icons[theme];
|
|
2011
|
-
return /* @__PURE__ */
|
|
2065
|
+
return /* @__PURE__ */ jsx43(
|
|
2012
2066
|
"button",
|
|
2013
2067
|
{
|
|
2014
2068
|
onClick: () => setTheme(nextTheme[theme]),
|
|
2015
2069
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-secondary transition-colors",
|
|
2016
2070
|
"aria-label": `Switch to ${nextTheme[theme]} theme`,
|
|
2017
2071
|
title: `Theme: ${theme}`,
|
|
2018
|
-
children: /* @__PURE__ */
|
|
2072
|
+
children: /* @__PURE__ */ jsx43(Icon, { className: "w-4 h-4" })
|
|
2019
2073
|
}
|
|
2020
2074
|
);
|
|
2021
2075
|
}
|
|
@@ -2023,9 +2077,9 @@ function ThemeToggle() {
|
|
|
2023
2077
|
// src/components/calendar.tsx
|
|
2024
2078
|
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
2025
2079
|
import { DayPicker } from "react-day-picker";
|
|
2026
|
-
import { jsx as
|
|
2080
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2027
2081
|
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
2028
|
-
return /* @__PURE__ */
|
|
2082
|
+
return /* @__PURE__ */ jsx44(
|
|
2029
2083
|
DayPicker,
|
|
2030
2084
|
{
|
|
2031
2085
|
showOutsideDays,
|
|
@@ -2068,7 +2122,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
2068
2122
|
...classNames
|
|
2069
2123
|
},
|
|
2070
2124
|
components: {
|
|
2071
|
-
Chevron: ({ className: cls, orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */
|
|
2125
|
+
Chevron: ({ className: cls, orientation, ...rest }) => orientation === "left" ? /* @__PURE__ */ jsx44(ChevronLeft2, { className: cn("size-4", cls), ...rest }) : /* @__PURE__ */ jsx44(ChevronRight6, { className: cn("size-4", cls), ...rest })
|
|
2072
2126
|
},
|
|
2073
2127
|
...props
|
|
2074
2128
|
}
|
|
@@ -2077,9 +2131,9 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
|
2077
2131
|
Calendar.displayName = "Calendar";
|
|
2078
2132
|
|
|
2079
2133
|
// src/components/date-picker.tsx
|
|
2080
|
-
import * as
|
|
2134
|
+
import * as React38 from "react";
|
|
2081
2135
|
import { Calendar as CalendarIcon } from "lucide-react";
|
|
2082
|
-
import { jsx as
|
|
2136
|
+
import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2083
2137
|
var DEFAULT_FORMAT = {
|
|
2084
2138
|
year: "numeric",
|
|
2085
2139
|
month: "long",
|
|
@@ -2092,9 +2146,9 @@ function DatePicker({
|
|
|
2092
2146
|
disabled,
|
|
2093
2147
|
className
|
|
2094
2148
|
}) {
|
|
2095
|
-
const [open, setOpen] =
|
|
2149
|
+
const [open, setOpen] = React38.useState(false);
|
|
2096
2150
|
return /* @__PURE__ */ jsxs19(Popover, { open, onOpenChange: setOpen, children: [
|
|
2097
|
-
/* @__PURE__ */
|
|
2151
|
+
/* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs19(
|
|
2098
2152
|
Button,
|
|
2099
2153
|
{
|
|
2100
2154
|
type: "button",
|
|
@@ -2102,12 +2156,12 @@ function DatePicker({
|
|
|
2102
2156
|
disabled,
|
|
2103
2157
|
className: cn("w-[240px] justify-start gap-2 text-left font-normal", !value && "text-text-tertiary", className),
|
|
2104
2158
|
children: [
|
|
2105
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ jsx45(CalendarIcon, { className: "size-4 shrink-0" }),
|
|
2106
2160
|
value ? value.toLocaleDateString(void 0, DEFAULT_FORMAT) : placeholder
|
|
2107
2161
|
]
|
|
2108
2162
|
}
|
|
2109
2163
|
) }),
|
|
2110
|
-
/* @__PURE__ */
|
|
2164
|
+
/* @__PURE__ */ jsx45(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx45(
|
|
2111
2165
|
Calendar,
|
|
2112
2166
|
{
|
|
2113
2167
|
mode: "single",
|
|
@@ -2124,31 +2178,31 @@ function DatePicker({
|
|
|
2124
2178
|
DatePicker.displayName = "DatePicker";
|
|
2125
2179
|
|
|
2126
2180
|
// src/components/carousel.tsx
|
|
2127
|
-
import * as
|
|
2181
|
+
import * as React39 from "react";
|
|
2128
2182
|
import useEmblaCarousel from "embla-carousel-react";
|
|
2129
2183
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
2130
|
-
import { jsx as
|
|
2131
|
-
var CarouselContext =
|
|
2184
|
+
import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2185
|
+
var CarouselContext = React39.createContext(null);
|
|
2132
2186
|
function useCarousel() {
|
|
2133
|
-
const context =
|
|
2187
|
+
const context = React39.useContext(CarouselContext);
|
|
2134
2188
|
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
2135
2189
|
return context;
|
|
2136
2190
|
}
|
|
2137
|
-
var Carousel =
|
|
2191
|
+
var Carousel = React39.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
|
|
2138
2192
|
const [carouselRef, api] = useEmblaCarousel(
|
|
2139
2193
|
{ ...opts, axis: orientation === "horizontal" ? "x" : "y" },
|
|
2140
2194
|
plugins
|
|
2141
2195
|
);
|
|
2142
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
2143
|
-
const [canScrollNext, setCanScrollNext] =
|
|
2144
|
-
const onSelect =
|
|
2196
|
+
const [canScrollPrev, setCanScrollPrev] = React39.useState(false);
|
|
2197
|
+
const [canScrollNext, setCanScrollNext] = React39.useState(false);
|
|
2198
|
+
const onSelect = React39.useCallback((emblaApi) => {
|
|
2145
2199
|
if (!emblaApi) return;
|
|
2146
2200
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
2147
2201
|
setCanScrollNext(emblaApi.canScrollNext());
|
|
2148
2202
|
}, []);
|
|
2149
|
-
const scrollPrev =
|
|
2150
|
-
const scrollNext =
|
|
2151
|
-
const handleKeyDown =
|
|
2203
|
+
const scrollPrev = React39.useCallback(() => api?.scrollPrev(), [api]);
|
|
2204
|
+
const scrollNext = React39.useCallback(() => api?.scrollNext(), [api]);
|
|
2205
|
+
const handleKeyDown = React39.useCallback(
|
|
2152
2206
|
(event) => {
|
|
2153
2207
|
if (event.key === "ArrowLeft") {
|
|
2154
2208
|
event.preventDefault();
|
|
@@ -2160,11 +2214,11 @@ var Carousel = React38.forwardRef(({ orientation = "horizontal", opts, setApi, p
|
|
|
2160
2214
|
},
|
|
2161
2215
|
[scrollPrev, scrollNext]
|
|
2162
2216
|
);
|
|
2163
|
-
|
|
2217
|
+
React39.useEffect(() => {
|
|
2164
2218
|
if (!api || !setApi) return;
|
|
2165
2219
|
setApi(api);
|
|
2166
2220
|
}, [api, setApi]);
|
|
2167
|
-
|
|
2221
|
+
React39.useEffect(() => {
|
|
2168
2222
|
if (!api) return;
|
|
2169
2223
|
onSelect(api);
|
|
2170
2224
|
api.on("reInit", onSelect);
|
|
@@ -2174,7 +2228,7 @@ var Carousel = React38.forwardRef(({ orientation = "horizontal", opts, setApi, p
|
|
|
2174
2228
|
api.off("select", onSelect);
|
|
2175
2229
|
};
|
|
2176
2230
|
}, [api, onSelect]);
|
|
2177
|
-
return /* @__PURE__ */
|
|
2231
|
+
return /* @__PURE__ */ jsx46(
|
|
2178
2232
|
CarouselContext.Provider,
|
|
2179
2233
|
{
|
|
2180
2234
|
value: {
|
|
@@ -2187,7 +2241,7 @@ var Carousel = React38.forwardRef(({ orientation = "horizontal", opts, setApi, p
|
|
|
2187
2241
|
canScrollPrev,
|
|
2188
2242
|
canScrollNext
|
|
2189
2243
|
},
|
|
2190
|
-
children: /* @__PURE__ */
|
|
2244
|
+
children: /* @__PURE__ */ jsx46(
|
|
2191
2245
|
"div",
|
|
2192
2246
|
{
|
|
2193
2247
|
ref,
|
|
@@ -2203,10 +2257,10 @@ var Carousel = React38.forwardRef(({ orientation = "horizontal", opts, setApi, p
|
|
|
2203
2257
|
);
|
|
2204
2258
|
});
|
|
2205
2259
|
Carousel.displayName = "Carousel";
|
|
2206
|
-
var CarouselContent =
|
|
2260
|
+
var CarouselContent = React39.forwardRef(
|
|
2207
2261
|
({ className, ...props }, ref) => {
|
|
2208
2262
|
const { carouselRef, orientation } = useCarousel();
|
|
2209
|
-
return /* @__PURE__ */
|
|
2263
|
+
return /* @__PURE__ */ jsx46("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx46(
|
|
2210
2264
|
"div",
|
|
2211
2265
|
{
|
|
2212
2266
|
ref,
|
|
@@ -2217,10 +2271,10 @@ var CarouselContent = React38.forwardRef(
|
|
|
2217
2271
|
}
|
|
2218
2272
|
);
|
|
2219
2273
|
CarouselContent.displayName = "CarouselContent";
|
|
2220
|
-
var CarouselItem =
|
|
2274
|
+
var CarouselItem = React39.forwardRef(
|
|
2221
2275
|
({ className, ...props }, ref) => {
|
|
2222
2276
|
const { orientation } = useCarousel();
|
|
2223
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ jsx46(
|
|
2224
2278
|
"div",
|
|
2225
2279
|
{
|
|
2226
2280
|
ref,
|
|
@@ -2237,7 +2291,7 @@ var CarouselItem = React38.forwardRef(
|
|
|
2237
2291
|
}
|
|
2238
2292
|
);
|
|
2239
2293
|
CarouselItem.displayName = "CarouselItem";
|
|
2240
|
-
var CarouselPrevious =
|
|
2294
|
+
var CarouselPrevious = React39.forwardRef(({ className, ...props }, ref) => {
|
|
2241
2295
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
2242
2296
|
return /* @__PURE__ */ jsxs20(
|
|
2243
2297
|
"button",
|
|
@@ -2254,14 +2308,14 @@ var CarouselPrevious = React38.forwardRef(({ className, ...props }, ref) => {
|
|
|
2254
2308
|
onClick: scrollPrev,
|
|
2255
2309
|
...props,
|
|
2256
2310
|
children: [
|
|
2257
|
-
/* @__PURE__ */
|
|
2258
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsx46(ArrowLeft, { className: "size-4" }),
|
|
2312
|
+
/* @__PURE__ */ jsx46("span", { className: "sr-only", children: "Previous slide" })
|
|
2259
2313
|
]
|
|
2260
2314
|
}
|
|
2261
2315
|
);
|
|
2262
2316
|
});
|
|
2263
2317
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
2264
|
-
var CarouselNext =
|
|
2318
|
+
var CarouselNext = React39.forwardRef(({ className, ...props }, ref) => {
|
|
2265
2319
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
2266
2320
|
return /* @__PURE__ */ jsxs20(
|
|
2267
2321
|
"button",
|
|
@@ -2278,8 +2332,8 @@ var CarouselNext = React38.forwardRef(({ className, ...props }, ref) => {
|
|
|
2278
2332
|
onClick: scrollNext,
|
|
2279
2333
|
...props,
|
|
2280
2334
|
children: [
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2335
|
+
/* @__PURE__ */ jsx46(ArrowRight, { className: "size-4" }),
|
|
2336
|
+
/* @__PURE__ */ jsx46("span", { className: "sr-only", children: "Next slide" })
|
|
2283
2337
|
]
|
|
2284
2338
|
}
|
|
2285
2339
|
);
|
|
@@ -2287,7 +2341,7 @@ var CarouselNext = React38.forwardRef(({ className, ...props }, ref) => {
|
|
|
2287
2341
|
CarouselNext.displayName = "CarouselNext";
|
|
2288
2342
|
|
|
2289
2343
|
// src/components/form.tsx
|
|
2290
|
-
import * as
|
|
2344
|
+
import * as React40 from "react";
|
|
2291
2345
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
2292
2346
|
import {
|
|
2293
2347
|
Controller,
|
|
@@ -2295,16 +2349,16 @@ import {
|
|
|
2295
2349
|
useFormContext,
|
|
2296
2350
|
useFormState
|
|
2297
2351
|
} from "react-hook-form";
|
|
2298
|
-
import { jsx as
|
|
2352
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2299
2353
|
var Form = FormProvider;
|
|
2300
|
-
var FormFieldContext =
|
|
2354
|
+
var FormFieldContext = React40.createContext(null);
|
|
2301
2355
|
function FormField({ ...props }) {
|
|
2302
|
-
return /* @__PURE__ */
|
|
2356
|
+
return /* @__PURE__ */ jsx47(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx47(Controller, { ...props }) });
|
|
2303
2357
|
}
|
|
2304
|
-
var FormItemContext =
|
|
2358
|
+
var FormItemContext = React40.createContext(null);
|
|
2305
2359
|
function useFormField() {
|
|
2306
|
-
const fieldContext =
|
|
2307
|
-
const itemContext =
|
|
2360
|
+
const fieldContext = React40.useContext(FormFieldContext);
|
|
2361
|
+
const itemContext = React40.useContext(FormItemContext);
|
|
2308
2362
|
const { getFieldState } = useFormContext();
|
|
2309
2363
|
const formState = useFormState({ name: fieldContext?.name });
|
|
2310
2364
|
if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
|
|
@@ -2319,16 +2373,16 @@ function useFormField() {
|
|
|
2319
2373
|
...fieldState
|
|
2320
2374
|
};
|
|
2321
2375
|
}
|
|
2322
|
-
var FormItem =
|
|
2376
|
+
var FormItem = React40.forwardRef(
|
|
2323
2377
|
({ className, ...props }, ref) => {
|
|
2324
|
-
const id =
|
|
2325
|
-
return /* @__PURE__ */
|
|
2378
|
+
const id = React40.useId();
|
|
2379
|
+
return /* @__PURE__ */ jsx47(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx47("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
2326
2380
|
}
|
|
2327
2381
|
);
|
|
2328
2382
|
FormItem.displayName = "FormItem";
|
|
2329
|
-
var FormLabel =
|
|
2383
|
+
var FormLabel = React40.forwardRef(({ className, ...props }, ref) => {
|
|
2330
2384
|
const { error, formItemId } = useFormField();
|
|
2331
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsx47(
|
|
2332
2386
|
Label2,
|
|
2333
2387
|
{
|
|
2334
2388
|
ref,
|
|
@@ -2339,9 +2393,9 @@ var FormLabel = React39.forwardRef(({ className, ...props }, ref) => {
|
|
|
2339
2393
|
);
|
|
2340
2394
|
});
|
|
2341
2395
|
FormLabel.displayName = "FormLabel";
|
|
2342
|
-
var FormControl =
|
|
2396
|
+
var FormControl = React40.forwardRef(({ ...props }, ref) => {
|
|
2343
2397
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2344
|
-
return /* @__PURE__ */
|
|
2398
|
+
return /* @__PURE__ */ jsx47(
|
|
2345
2399
|
Slot3,
|
|
2346
2400
|
{
|
|
2347
2401
|
ref,
|
|
@@ -2353,9 +2407,9 @@ var FormControl = React39.forwardRef(({ ...props }, ref) => {
|
|
|
2353
2407
|
);
|
|
2354
2408
|
});
|
|
2355
2409
|
FormControl.displayName = "FormControl";
|
|
2356
|
-
var FormDescription =
|
|
2410
|
+
var FormDescription = React40.forwardRef(({ className, ...props }, ref) => {
|
|
2357
2411
|
const { formDescriptionId } = useFormField();
|
|
2358
|
-
return /* @__PURE__ */
|
|
2412
|
+
return /* @__PURE__ */ jsx47(
|
|
2359
2413
|
"p",
|
|
2360
2414
|
{
|
|
2361
2415
|
ref,
|
|
@@ -2366,11 +2420,11 @@ var FormDescription = React39.forwardRef(({ className, ...props }, ref) => {
|
|
|
2366
2420
|
);
|
|
2367
2421
|
});
|
|
2368
2422
|
FormDescription.displayName = "FormDescription";
|
|
2369
|
-
var FormMessage =
|
|
2423
|
+
var FormMessage = React40.forwardRef(({ className, children, ...props }, ref) => {
|
|
2370
2424
|
const { error, formMessageId } = useFormField();
|
|
2371
2425
|
const body = error ? String(error?.message ?? "") : children;
|
|
2372
2426
|
if (!body) return null;
|
|
2373
|
-
return /* @__PURE__ */
|
|
2427
|
+
return /* @__PURE__ */ jsx47(
|
|
2374
2428
|
"p",
|
|
2375
2429
|
{
|
|
2376
2430
|
ref,
|
|
@@ -2384,9 +2438,9 @@ var FormMessage = React39.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
2384
2438
|
FormMessage.displayName = "FormMessage";
|
|
2385
2439
|
|
|
2386
2440
|
// src/components/status-dot.tsx
|
|
2387
|
-
import * as
|
|
2441
|
+
import * as React41 from "react";
|
|
2388
2442
|
import { cva as cva8 } from "class-variance-authority";
|
|
2389
|
-
import { jsx as
|
|
2443
|
+
import { jsx as jsx48, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2390
2444
|
var statusDotVariants = cva8("inline-block shrink-0 rounded-full", {
|
|
2391
2445
|
variants: {
|
|
2392
2446
|
status: {
|
|
@@ -2400,7 +2454,7 @@ var statusDotVariants = cva8("inline-block shrink-0 rounded-full", {
|
|
|
2400
2454
|
},
|
|
2401
2455
|
defaultVariants: { status: "neutral", size: "md" }
|
|
2402
2456
|
});
|
|
2403
|
-
var StatusDot =
|
|
2457
|
+
var StatusDot = React41.forwardRef(
|
|
2404
2458
|
({ className, status, size, pulse = false, ...props }, ref) => /* @__PURE__ */ jsxs21(
|
|
2405
2459
|
"span",
|
|
2406
2460
|
{
|
|
@@ -2410,14 +2464,14 @@ var StatusDot = React40.forwardRef(
|
|
|
2410
2464
|
className: cn("relative inline-flex", className),
|
|
2411
2465
|
...props,
|
|
2412
2466
|
children: [
|
|
2413
|
-
pulse && /* @__PURE__ */
|
|
2467
|
+
pulse && /* @__PURE__ */ jsx48(
|
|
2414
2468
|
"span",
|
|
2415
2469
|
{
|
|
2416
2470
|
"aria-hidden": "true",
|
|
2417
2471
|
className: cn(statusDotVariants({ status, size }), "absolute inset-0 animate-ping opacity-75")
|
|
2418
2472
|
}
|
|
2419
2473
|
),
|
|
2420
|
-
/* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ jsx48("span", { className: cn(statusDotVariants({ status, size })) })
|
|
2421
2475
|
]
|
|
2422
2476
|
}
|
|
2423
2477
|
)
|
|
@@ -2425,10 +2479,10 @@ var StatusDot = React40.forwardRef(
|
|
|
2425
2479
|
StatusDot.displayName = "StatusDot";
|
|
2426
2480
|
|
|
2427
2481
|
// src/components/docs-link.tsx
|
|
2428
|
-
import * as
|
|
2482
|
+
import * as React42 from "react";
|
|
2429
2483
|
import { BookOpen, ExternalLink } from "lucide-react";
|
|
2430
|
-
import { jsx as
|
|
2431
|
-
var DocsLink =
|
|
2484
|
+
import { jsx as jsx49, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2485
|
+
var DocsLink = React42.forwardRef(
|
|
2432
2486
|
({ href = "https://docs.lessly.com", label = "Docs", className, ...props }, ref) => /* @__PURE__ */ jsxs22(
|
|
2433
2487
|
"a",
|
|
2434
2488
|
{
|
|
@@ -2442,9 +2496,9 @@ var DocsLink = React41.forwardRef(
|
|
|
2442
2496
|
),
|
|
2443
2497
|
...props,
|
|
2444
2498
|
children: [
|
|
2445
|
-
/* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ jsx49(BookOpen, { className: "size-4", "aria-hidden": "true" }),
|
|
2446
2500
|
label,
|
|
2447
|
-
/* @__PURE__ */
|
|
2501
|
+
/* @__PURE__ */ jsx49(ExternalLink, { className: "size-3 text-text-tertiary", "aria-hidden": "true" })
|
|
2448
2502
|
]
|
|
2449
2503
|
}
|
|
2450
2504
|
)
|
|
@@ -2452,9 +2506,9 @@ var DocsLink = React41.forwardRef(
|
|
|
2452
2506
|
DocsLink.displayName = "DocsLink";
|
|
2453
2507
|
|
|
2454
2508
|
// src/components/empty-state.tsx
|
|
2455
|
-
import * as
|
|
2456
|
-
import { jsx as
|
|
2457
|
-
var EmptyState =
|
|
2509
|
+
import * as React43 from "react";
|
|
2510
|
+
import { jsx as jsx50, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2511
|
+
var EmptyState = React43.forwardRef(
|
|
2458
2512
|
({ icon: Icon, title, description, action, className, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
2459
2513
|
"div",
|
|
2460
2514
|
{
|
|
@@ -2465,10 +2519,10 @@ var EmptyState = React42.forwardRef(
|
|
|
2465
2519
|
),
|
|
2466
2520
|
...props,
|
|
2467
2521
|
children: [
|
|
2468
|
-
Icon && /* @__PURE__ */
|
|
2469
|
-
/* @__PURE__ */
|
|
2470
|
-
description && /* @__PURE__ */
|
|
2471
|
-
action && /* @__PURE__ */
|
|
2522
|
+
Icon && /* @__PURE__ */ jsx50("div", { className: "mb-4 flex size-11 items-center justify-center rounded-full bg-bg-secondary", children: /* @__PURE__ */ jsx50(Icon, { className: "size-5 text-icon-secondary", "aria-hidden": "true" }) }),
|
|
2523
|
+
/* @__PURE__ */ jsx50("p", { className: "text-base font-semibold text-text-primary", children: title }),
|
|
2524
|
+
description && /* @__PURE__ */ jsx50("p", { className: "mt-1 max-w-sm text-sm text-text-secondary", children: description }),
|
|
2525
|
+
action && /* @__PURE__ */ jsx50("div", { className: "mt-4", children: action })
|
|
2472
2526
|
]
|
|
2473
2527
|
}
|
|
2474
2528
|
)
|
|
@@ -2476,14 +2530,14 @@ var EmptyState = React42.forwardRef(
|
|
|
2476
2530
|
EmptyState.displayName = "EmptyState";
|
|
2477
2531
|
|
|
2478
2532
|
// src/components/copy-button.tsx
|
|
2479
|
-
import * as
|
|
2533
|
+
import * as React44 from "react";
|
|
2480
2534
|
import { Check as Check5, Copy } from "lucide-react";
|
|
2481
|
-
import { jsx as
|
|
2482
|
-
var CopyButton =
|
|
2535
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2536
|
+
var CopyButton = React44.forwardRef(
|
|
2483
2537
|
({ value, label = "Copy", className, variant = "ghost", size = "icon", onClick, ...props }, ref) => {
|
|
2484
|
-
const [copied, setCopied] =
|
|
2485
|
-
const timer =
|
|
2486
|
-
|
|
2538
|
+
const [copied, setCopied] = React44.useState(false);
|
|
2539
|
+
const timer = React44.useRef(void 0);
|
|
2540
|
+
React44.useEffect(() => () => clearTimeout(timer.current), []);
|
|
2487
2541
|
const handleClick = async (e) => {
|
|
2488
2542
|
onClick?.(e);
|
|
2489
2543
|
if (!navigator.clipboard?.writeText) return;
|
|
@@ -2495,7 +2549,7 @@ var CopyButton = React43.forwardRef(
|
|
|
2495
2549
|
} catch {
|
|
2496
2550
|
}
|
|
2497
2551
|
};
|
|
2498
|
-
return /* @__PURE__ */
|
|
2552
|
+
return /* @__PURE__ */ jsx51(
|
|
2499
2553
|
Button,
|
|
2500
2554
|
{
|
|
2501
2555
|
ref,
|
|
@@ -2506,7 +2560,7 @@ var CopyButton = React43.forwardRef(
|
|
|
2506
2560
|
className: cn(className),
|
|
2507
2561
|
...props,
|
|
2508
2562
|
"aria-label": copied ? "Copied" : label,
|
|
2509
|
-
children: copied ? /* @__PURE__ */
|
|
2563
|
+
children: copied ? /* @__PURE__ */ jsx51(Check5, { className: "size-4 text-text-success" }) : /* @__PURE__ */ jsx51(Copy, { className: "size-4" })
|
|
2510
2564
|
}
|
|
2511
2565
|
);
|
|
2512
2566
|
}
|
|
@@ -2514,9 +2568,9 @@ var CopyButton = React43.forwardRef(
|
|
|
2514
2568
|
CopyButton.displayName = "CopyButton";
|
|
2515
2569
|
|
|
2516
2570
|
// src/components/stat-card.tsx
|
|
2517
|
-
import * as
|
|
2571
|
+
import * as React45 from "react";
|
|
2518
2572
|
import { ArrowDown, ArrowUp, Info as Info2, Minus as Minus2 } from "lucide-react";
|
|
2519
|
-
import { jsx as
|
|
2573
|
+
import { jsx as jsx52, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2520
2574
|
var directionIcons = {
|
|
2521
2575
|
up: ArrowUp,
|
|
2522
2576
|
down: ArrowDown,
|
|
@@ -2532,7 +2586,7 @@ var toneFromDirection = {
|
|
|
2532
2586
|
down: "negative",
|
|
2533
2587
|
neutral: "neutral"
|
|
2534
2588
|
};
|
|
2535
|
-
var StatCard =
|
|
2589
|
+
var StatCard = React45.forwardRef(
|
|
2536
2590
|
({ label, value, delta, hint, sub, icon: Icon, className, ...props }, ref) => {
|
|
2537
2591
|
const direction = delta?.direction ?? "neutral";
|
|
2538
2592
|
const tone = delta?.tone ?? toneFromDirection[direction];
|
|
@@ -2547,21 +2601,21 @@ var StatCard = React44.forwardRef(
|
|
|
2547
2601
|
children: [
|
|
2548
2602
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2549
2603
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1.5", children: [
|
|
2550
|
-
/* @__PURE__ */
|
|
2551
|
-
hint && /* @__PURE__ */
|
|
2552
|
-
/* @__PURE__ */
|
|
2553
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__PURE__ */ jsx52("span", { className: "text-xs font-medium uppercase tracking-wide text-text-tertiary", children: label }),
|
|
2605
|
+
hint && /* @__PURE__ */ jsx52(TooltipProvider, { children: /* @__PURE__ */ jsxs24(Tooltip, { children: [
|
|
2606
|
+
/* @__PURE__ */ jsx52(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx52("button", { type: "button", "aria-label": "More info", className: "inline-flex cursor-help text-icon-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus rounded-sm", children: /* @__PURE__ */ jsx52(Info2, { className: "size-3.5", "aria-hidden": "true" }) }) }),
|
|
2607
|
+
/* @__PURE__ */ jsx52(TooltipContent, { children: hint })
|
|
2554
2608
|
] }) })
|
|
2555
2609
|
] }),
|
|
2556
|
-
Icon && /* @__PURE__ */
|
|
2610
|
+
Icon && /* @__PURE__ */ jsx52(Icon, { className: "size-4 text-icon-secondary", "aria-hidden": "true" })
|
|
2557
2611
|
] }),
|
|
2558
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ jsx52("div", { className: "mt-2 text-3xl font-semibold text-text-primary", children: value }),
|
|
2559
2613
|
(delta || sub) && /* @__PURE__ */ jsxs24("div", { className: "mt-2 flex items-center gap-2 text-sm", children: [
|
|
2560
2614
|
delta && /* @__PURE__ */ jsxs24("span", { className: cn("inline-flex items-center gap-0.5 font-medium", deltaClass), children: [
|
|
2561
|
-
/* @__PURE__ */
|
|
2615
|
+
/* @__PURE__ */ jsx52(DeltaIcon, { className: "size-3.5", "aria-hidden": "true" }),
|
|
2562
2616
|
delta.value
|
|
2563
2617
|
] }),
|
|
2564
|
-
sub && /* @__PURE__ */
|
|
2618
|
+
sub && /* @__PURE__ */ jsx52("span", { className: "text-text-tertiary", children: sub })
|
|
2565
2619
|
] })
|
|
2566
2620
|
]
|
|
2567
2621
|
}
|
|
@@ -2571,11 +2625,11 @@ var StatCard = React44.forwardRef(
|
|
|
2571
2625
|
StatCard.displayName = "StatCard";
|
|
2572
2626
|
|
|
2573
2627
|
// src/components/confirm-dialog.tsx
|
|
2574
|
-
import * as
|
|
2628
|
+
import * as React46 from "react";
|
|
2575
2629
|
import { Loader2 } from "lucide-react";
|
|
2576
|
-
import { jsx as
|
|
2577
|
-
var InlineError =
|
|
2578
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
2630
|
+
import { jsx as jsx53, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2631
|
+
var InlineError = React46.forwardRef(
|
|
2632
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx53(
|
|
2579
2633
|
"div",
|
|
2580
2634
|
{
|
|
2581
2635
|
ref,
|
|
@@ -2601,12 +2655,12 @@ function ConfirmDialog({
|
|
|
2601
2655
|
destructive = false,
|
|
2602
2656
|
onConfirm
|
|
2603
2657
|
}) {
|
|
2604
|
-
const [internalOpen, setInternalOpen] =
|
|
2658
|
+
const [internalOpen, setInternalOpen] = React46.useState(false);
|
|
2605
2659
|
const isControlled = open !== void 0;
|
|
2606
2660
|
const actualOpen = isControlled ? open : internalOpen;
|
|
2607
|
-
const [busy, setBusy] =
|
|
2608
|
-
const [error, setError] =
|
|
2609
|
-
|
|
2661
|
+
const [busy, setBusy] = React46.useState(false);
|
|
2662
|
+
const [error, setError] = React46.useState(null);
|
|
2663
|
+
React46.useEffect(() => {
|
|
2610
2664
|
if (!actualOpen) setError(null);
|
|
2611
2665
|
}, [actualOpen]);
|
|
2612
2666
|
const setOpen = (next) => {
|
|
@@ -2629,17 +2683,17 @@ function ConfirmDialog({
|
|
|
2629
2683
|
return /* @__PURE__ */ jsxs25(Dialog, { open: actualOpen, onOpenChange: (next) => {
|
|
2630
2684
|
if (!busy) setOpen(next);
|
|
2631
2685
|
}, children: [
|
|
2632
|
-
trigger && /* @__PURE__ */
|
|
2686
|
+
trigger && /* @__PURE__ */ jsx53(DialogTrigger, { asChild: true, children: trigger }),
|
|
2633
2687
|
/* @__PURE__ */ jsxs25(DialogContent, { children: [
|
|
2634
2688
|
/* @__PURE__ */ jsxs25(DialogHeader, { children: [
|
|
2635
|
-
/* @__PURE__ */
|
|
2636
|
-
description && /* @__PURE__ */
|
|
2689
|
+
/* @__PURE__ */ jsx53(DialogTitle, { children: title }),
|
|
2690
|
+
description && /* @__PURE__ */ jsx53(DialogDescription, { children: description })
|
|
2637
2691
|
] }),
|
|
2638
|
-
error && /* @__PURE__ */
|
|
2692
|
+
error && /* @__PURE__ */ jsx53(InlineError, { children: error }),
|
|
2639
2693
|
/* @__PURE__ */ jsxs25(DialogFooter, { children: [
|
|
2640
|
-
/* @__PURE__ */
|
|
2694
|
+
/* @__PURE__ */ jsx53(Button, { variant: "outline", disabled: busy, onClick: () => setOpen(false), children: cancelLabel }),
|
|
2641
2695
|
/* @__PURE__ */ jsxs25(Button, { variant: destructive ? "destructive" : "default", disabled: busy, onClick: handleConfirm, children: [
|
|
2642
|
-
busy && /* @__PURE__ */
|
|
2696
|
+
busy && /* @__PURE__ */ jsx53(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" }),
|
|
2643
2697
|
confirmLabel
|
|
2644
2698
|
] })
|
|
2645
2699
|
] })
|
|
@@ -2649,7 +2703,7 @@ function ConfirmDialog({
|
|
|
2649
2703
|
|
|
2650
2704
|
// src/components/user-menu.tsx
|
|
2651
2705
|
import { ChevronsUpDown } from "lucide-react";
|
|
2652
|
-
import { Fragment, jsx as
|
|
2706
|
+
import { Fragment, jsx as jsx54, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2653
2707
|
function initialsOf(name) {
|
|
2654
2708
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
2655
2709
|
if (parts.length === 0) return "?";
|
|
@@ -2659,10 +2713,10 @@ function initialsOf(name) {
|
|
|
2659
2713
|
function UserMenu({ user, items, collapsed = false, align = "start" }) {
|
|
2660
2714
|
const secondLine = user.subtitle ?? user.email;
|
|
2661
2715
|
const avatar = /* @__PURE__ */ jsxs26(Avatar, { className: collapsed ? "size-9" : "size-7", children: [
|
|
2662
|
-
user.avatarUrl && /* @__PURE__ */
|
|
2663
|
-
/* @__PURE__ */
|
|
2716
|
+
user.avatarUrl && /* @__PURE__ */ jsx54(AvatarImage, { src: user.avatarUrl, alt: user.name }),
|
|
2717
|
+
/* @__PURE__ */ jsx54(AvatarFallback, { className: "text-xs", children: initialsOf(user.name) })
|
|
2664
2718
|
] });
|
|
2665
|
-
const trigger = collapsed ? /* @__PURE__ */
|
|
2719
|
+
const trigger = collapsed ? /* @__PURE__ */ jsx54(
|
|
2666
2720
|
"button",
|
|
2667
2721
|
{
|
|
2668
2722
|
type: "button",
|
|
@@ -2678,18 +2732,18 @@ function UserMenu({ user, items, collapsed = false, align = "start" }) {
|
|
|
2678
2732
|
children: [
|
|
2679
2733
|
avatar,
|
|
2680
2734
|
/* @__PURE__ */ jsxs26("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
secondLine && /* @__PURE__ */
|
|
2735
|
+
/* @__PURE__ */ jsx54("span", { className: "truncate text-sm leading-[normal] font-medium text-text-primary", children: user.name }),
|
|
2736
|
+
secondLine && /* @__PURE__ */ jsx54("span", { className: "truncate text-xs leading-[normal] text-text-tertiary", children: secondLine })
|
|
2683
2737
|
] }),
|
|
2684
|
-
/* @__PURE__ */
|
|
2738
|
+
/* @__PURE__ */ jsx54(ChevronsUpDown, { size: 14, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" })
|
|
2685
2739
|
]
|
|
2686
2740
|
}
|
|
2687
2741
|
);
|
|
2688
|
-
const menuTrigger = /* @__PURE__ */
|
|
2742
|
+
const menuTrigger = /* @__PURE__ */ jsx54(DropdownMenuTrigger, { asChild: true, children: trigger });
|
|
2689
2743
|
const menu = /* @__PURE__ */ jsxs26(DropdownMenu, { children: [
|
|
2690
|
-
collapsed ? /* @__PURE__ */
|
|
2691
|
-
/* @__PURE__ */
|
|
2692
|
-
/* @__PURE__ */
|
|
2744
|
+
collapsed ? /* @__PURE__ */ jsx54(TooltipProvider, { children: /* @__PURE__ */ jsxs26(Tooltip, { children: [
|
|
2745
|
+
/* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: menuTrigger }),
|
|
2746
|
+
/* @__PURE__ */ jsx54(TooltipContent, { side: "right", children: user.name })
|
|
2693
2747
|
] }) }) : menuTrigger,
|
|
2694
2748
|
/* @__PURE__ */ jsxs26(
|
|
2695
2749
|
DropdownMenuContent,
|
|
@@ -2699,17 +2753,17 @@ function UserMenu({ user, items, collapsed = false, align = "start" }) {
|
|
|
2699
2753
|
className: "flex w-[var(--radix-dropdown-menu-trigger-width)] min-w-56 flex-col gap-px rounded-xl border-border-subtle bg-[var(--menu-bg)] p-1 shadow-(--menu-shadow)",
|
|
2700
2754
|
children: [
|
|
2701
2755
|
/* @__PURE__ */ jsxs26(DropdownMenuLabel, { className: "px-2 pt-1.5 pb-1 text-xs font-medium text-text-tertiary", children: [
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
secondLine && /* @__PURE__ */
|
|
2756
|
+
/* @__PURE__ */ jsx54("span", { className: "block truncate text-sm font-medium text-text-primary", children: user.name }),
|
|
2757
|
+
secondLine && /* @__PURE__ */ jsx54("span", { className: "block truncate text-xs font-normal text-text-tertiary", children: secondLine })
|
|
2704
2758
|
] }),
|
|
2705
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ jsx54(DropdownMenuSeparator, { className: "mx-0 shrink-0 bg-border-subtle" }),
|
|
2706
2760
|
items.map((item, i) => {
|
|
2707
2761
|
const Icon = item.icon;
|
|
2708
2762
|
const content = /* @__PURE__ */ jsxs26(Fragment, { children: [
|
|
2709
|
-
Icon && /* @__PURE__ */
|
|
2763
|
+
Icon && /* @__PURE__ */ jsx54(Icon, { className: "size-4", "aria-hidden": "true" }),
|
|
2710
2764
|
item.label
|
|
2711
2765
|
] });
|
|
2712
|
-
return /* @__PURE__ */
|
|
2766
|
+
return /* @__PURE__ */ jsx54(
|
|
2713
2767
|
DropdownMenuItem,
|
|
2714
2768
|
{
|
|
2715
2769
|
onSelect: item.onSelect,
|
|
@@ -2718,7 +2772,7 @@ function UserMenu({ user, items, collapsed = false, align = "start" }) {
|
|
|
2718
2772
|
item.destructive && "text-text-danger focus:text-text-danger"
|
|
2719
2773
|
),
|
|
2720
2774
|
asChild: Boolean(item.href),
|
|
2721
|
-
children: item.href ? /* @__PURE__ */
|
|
2775
|
+
children: item.href ? /* @__PURE__ */ jsx54("a", { href: item.href, children: content }) : content
|
|
2722
2776
|
},
|
|
2723
2777
|
`${item.label}-${i}`
|
|
2724
2778
|
);
|
|
@@ -2732,20 +2786,20 @@ function UserMenu({ user, items, collapsed = false, align = "start" }) {
|
|
|
2732
2786
|
|
|
2733
2787
|
// src/components/extension-link.tsx
|
|
2734
2788
|
import { Link as Link2 } from "react-router";
|
|
2735
|
-
import { jsx as
|
|
2789
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2736
2790
|
function ExtensionLink({ uiMode, to, className, children, ...anchorProps }) {
|
|
2737
2791
|
if (uiMode === "federation") {
|
|
2738
|
-
return /* @__PURE__ */
|
|
2792
|
+
return /* @__PURE__ */ jsx55(Link2, { to, className, ...anchorProps, children });
|
|
2739
2793
|
}
|
|
2740
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsx55("a", { href: to, className, ...anchorProps, children });
|
|
2741
2795
|
}
|
|
2742
2796
|
ExtensionLink.displayName = "ExtensionLink";
|
|
2743
2797
|
|
|
2744
2798
|
// src/components/extension-icon.tsx
|
|
2745
|
-
import * as
|
|
2799
|
+
import * as React47 from "react";
|
|
2746
2800
|
import * as LucideIcons from "lucide-react";
|
|
2747
2801
|
import { Puzzle } from "lucide-react";
|
|
2748
|
-
import { jsx as
|
|
2802
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2749
2803
|
var FORWARD_REF = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
2750
2804
|
var catalog = LucideIcons;
|
|
2751
2805
|
function toPascalCase(name) {
|
|
@@ -2770,14 +2824,14 @@ function warnUnknownIconOnce(name) {
|
|
|
2770
2824
|
warnedUnknownIcons.add(name);
|
|
2771
2825
|
console.warn(`[@lessly/ui] ExtensionIcon: unknown icon "${name}" \u2014 falling back to Puzzle.`);
|
|
2772
2826
|
}
|
|
2773
|
-
var ExtensionIcon =
|
|
2827
|
+
var ExtensionIcon = React47.forwardRef(
|
|
2774
2828
|
({ name, ...props }, ref) => {
|
|
2775
2829
|
const Icon = resolveIcon(name);
|
|
2776
2830
|
if (!Icon) {
|
|
2777
2831
|
warnUnknownIconOnce(name);
|
|
2778
|
-
return /* @__PURE__ */
|
|
2832
|
+
return /* @__PURE__ */ jsx56(Puzzle, { ref, ...props });
|
|
2779
2833
|
}
|
|
2780
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ jsx56(Icon, { ref, ...props });
|
|
2781
2835
|
}
|
|
2782
2836
|
);
|
|
2783
2837
|
ExtensionIcon.displayName = "ExtensionIcon";
|
|
@@ -2824,9 +2878,9 @@ function useSidebar(options = {}) {
|
|
|
2824
2878
|
}
|
|
2825
2879
|
|
|
2826
2880
|
// src/components/nav-row.tsx
|
|
2827
|
-
import * as
|
|
2881
|
+
import * as React48 from "react";
|
|
2828
2882
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
2829
|
-
import { Fragment as Fragment2, jsx as
|
|
2883
|
+
import { Fragment as Fragment2, jsx as jsx57, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2830
2884
|
var base = "flex w-full items-center text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus";
|
|
2831
2885
|
var shape = {
|
|
2832
2886
|
rail: "gap-[14px] rounded-xl px-2.5 py-2",
|
|
@@ -2842,9 +2896,9 @@ var state = {
|
|
|
2842
2896
|
active: "font-semibold text-text-brand hover:bg-[var(--menu-hov)]"
|
|
2843
2897
|
}
|
|
2844
2898
|
};
|
|
2845
|
-
var NavRow =
|
|
2899
|
+
var NavRow = React48.forwardRef(function NavRow2({ icon, label, active = false, variant, trailing, hideLabel = false, asChild = false, className, children, ...props }, ref) {
|
|
2846
2900
|
const content = /* @__PURE__ */ jsxs27(Fragment2, { children: [
|
|
2847
|
-
icon && /* @__PURE__ */
|
|
2901
|
+
icon && /* @__PURE__ */ jsx57(
|
|
2848
2902
|
"span",
|
|
2849
2903
|
{
|
|
2850
2904
|
className: "flex size-5 shrink-0 items-center justify-center [&_svg]:size-[18px]",
|
|
@@ -2852,24 +2906,24 @@ var NavRow = React47.forwardRef(function NavRow2({ icon, label, active = false,
|
|
|
2852
2906
|
children: icon
|
|
2853
2907
|
}
|
|
2854
2908
|
),
|
|
2855
|
-
!hideLabel && /* @__PURE__ */
|
|
2856
|
-
trailing && /* @__PURE__ */
|
|
2909
|
+
!hideLabel && /* @__PURE__ */ jsx57("span", { className: "min-w-0 flex-1 truncate", children: label }),
|
|
2910
|
+
trailing && /* @__PURE__ */ jsx57("span", { className: "flex shrink-0 items-center", children: trailing })
|
|
2857
2911
|
] });
|
|
2858
2912
|
const classes = cn(base, shape[variant], state[variant][active ? "active" : "idle"], className);
|
|
2859
2913
|
if (asChild) {
|
|
2860
|
-
const child =
|
|
2861
|
-
return /* @__PURE__ */
|
|
2914
|
+
const child = React48.Children.only(children);
|
|
2915
|
+
return /* @__PURE__ */ jsx57(Slot4, { ref, className: classes, "aria-label": hideLabel ? label : void 0, ...props, children: React48.cloneElement(child, void 0, content) });
|
|
2862
2916
|
}
|
|
2863
|
-
return /* @__PURE__ */
|
|
2917
|
+
return /* @__PURE__ */ jsx57("button", { ref, type: "button", className: classes, "aria-label": hideLabel ? label : void 0, ...props, children: content });
|
|
2864
2918
|
});
|
|
2865
2919
|
NavRow.displayName = "NavRow";
|
|
2866
2920
|
|
|
2867
2921
|
// src/components/nav-section-label.tsx
|
|
2868
|
-
import * as
|
|
2869
|
-
import { jsx as
|
|
2870
|
-
var NavSectionLabel =
|
|
2922
|
+
import * as React49 from "react";
|
|
2923
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
2924
|
+
var NavSectionLabel = React49.forwardRef(
|
|
2871
2925
|
function NavSectionLabel2({ className, ...props }, ref) {
|
|
2872
|
-
return /* @__PURE__ */
|
|
2926
|
+
return /* @__PURE__ */ jsx58(
|
|
2873
2927
|
"div",
|
|
2874
2928
|
{
|
|
2875
2929
|
ref,
|
|
@@ -2882,8 +2936,8 @@ var NavSectionLabel = React48.forwardRef(
|
|
|
2882
2936
|
NavSectionLabel.displayName = "NavSectionLabel";
|
|
2883
2937
|
|
|
2884
2938
|
// src/components/menu-popup.tsx
|
|
2885
|
-
import * as
|
|
2886
|
-
import { jsx as
|
|
2939
|
+
import * as React50 from "react";
|
|
2940
|
+
import { jsx as jsx59, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2887
2941
|
function MenuPopup({
|
|
2888
2942
|
trigger,
|
|
2889
2943
|
children,
|
|
@@ -2896,8 +2950,8 @@ function MenuPopup({
|
|
|
2896
2950
|
className
|
|
2897
2951
|
}) {
|
|
2898
2952
|
return /* @__PURE__ */ jsxs28(Popover, { open, defaultOpen, onOpenChange, children: [
|
|
2899
|
-
/* @__PURE__ */
|
|
2900
|
-
/* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ jsx59(PopoverTrigger, { asChild: true, children: trigger }),
|
|
2954
|
+
/* @__PURE__ */ jsx59(
|
|
2901
2955
|
PopoverContent,
|
|
2902
2956
|
{
|
|
2903
2957
|
side: direction === "up" ? "top" : "bottom",
|
|
@@ -2912,9 +2966,9 @@ function MenuPopup({
|
|
|
2912
2966
|
)
|
|
2913
2967
|
] });
|
|
2914
2968
|
}
|
|
2915
|
-
var MenuDivider =
|
|
2969
|
+
var MenuDivider = React50.forwardRef(
|
|
2916
2970
|
function MenuDivider2({ className, ...props }, ref) {
|
|
2917
|
-
return /* @__PURE__ */
|
|
2971
|
+
return /* @__PURE__ */ jsx59(
|
|
2918
2972
|
"div",
|
|
2919
2973
|
{
|
|
2920
2974
|
ref,
|
|
@@ -2929,7 +2983,7 @@ MenuDivider.displayName = "MenuDivider";
|
|
|
2929
2983
|
|
|
2930
2984
|
// src/components/sidebar-nav.tsx
|
|
2931
2985
|
import { Link as Link3, useLocation } from "react-router";
|
|
2932
|
-
import { jsx as
|
|
2986
|
+
import { jsx as jsx60, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2933
2987
|
function isActivePath(pathname, full, exact) {
|
|
2934
2988
|
if (exact) return pathname === full;
|
|
2935
2989
|
return pathname === full || pathname.startsWith(`${full}/`);
|
|
@@ -2945,23 +2999,23 @@ function SidebarNavLink({
|
|
|
2945
2999
|
const Comp = LinkComponent ?? Link3;
|
|
2946
3000
|
const to = `${basePath}${item.href}`;
|
|
2947
3001
|
const Icon = item.icon;
|
|
2948
|
-
const link = /* @__PURE__ */
|
|
3002
|
+
const link = /* @__PURE__ */ jsx60(
|
|
2949
3003
|
NavRow,
|
|
2950
3004
|
{
|
|
2951
3005
|
variant: "rail",
|
|
2952
3006
|
active,
|
|
2953
3007
|
label: item.label,
|
|
2954
3008
|
hideLabel: collapsed,
|
|
2955
|
-
icon: Icon ? /* @__PURE__ */
|
|
3009
|
+
icon: Icon ? /* @__PURE__ */ jsx60(Icon, { "aria-hidden": "true" }) : void 0,
|
|
2956
3010
|
className: cn(collapsed && "size-9 justify-center px-0 py-0", className),
|
|
2957
3011
|
asChild: true,
|
|
2958
|
-
children: /* @__PURE__ */
|
|
3012
|
+
children: /* @__PURE__ */ jsx60(Comp, { to, "aria-current": active ? "page" : void 0 })
|
|
2959
3013
|
}
|
|
2960
3014
|
);
|
|
2961
3015
|
if (!collapsed) return link;
|
|
2962
3016
|
return /* @__PURE__ */ jsxs29(Tooltip, { children: [
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
3017
|
+
/* @__PURE__ */ jsx60(TooltipTrigger, { asChild: true, children: link }),
|
|
3018
|
+
/* @__PURE__ */ jsx60(TooltipContent, { side: "right", children: item.label })
|
|
2965
3019
|
] });
|
|
2966
3020
|
}
|
|
2967
3021
|
function SidebarNav({
|
|
@@ -2973,7 +3027,7 @@ function SidebarNav({
|
|
|
2973
3027
|
className
|
|
2974
3028
|
}) {
|
|
2975
3029
|
const { pathname } = useLocation();
|
|
2976
|
-
const nav = /* @__PURE__ */
|
|
3030
|
+
const nav = /* @__PURE__ */ jsx60(
|
|
2977
3031
|
"nav",
|
|
2978
3032
|
{
|
|
2979
3033
|
className: cn(
|
|
@@ -2984,7 +3038,7 @@ function SidebarNav({
|
|
|
2984
3038
|
children: items.map((item) => {
|
|
2985
3039
|
const full = `${basePath}${item.href}`;
|
|
2986
3040
|
const active = isItemActive ? isItemActive(item, pathname) : isActivePath(pathname, full, item.exact);
|
|
2987
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsx60(
|
|
2988
3042
|
SidebarNavLink,
|
|
2989
3043
|
{
|
|
2990
3044
|
item,
|
|
@@ -2998,14 +3052,14 @@ function SidebarNav({
|
|
|
2998
3052
|
})
|
|
2999
3053
|
}
|
|
3000
3054
|
);
|
|
3001
|
-
return collapsed ? /* @__PURE__ */
|
|
3055
|
+
return collapsed ? /* @__PURE__ */ jsx60(TooltipProvider, { children: nav }) : nav;
|
|
3002
3056
|
}
|
|
3003
3057
|
|
|
3004
3058
|
// src/components/app-sidebar.tsx
|
|
3005
3059
|
import { PanelLeft } from "lucide-react";
|
|
3006
|
-
import { Fragment as Fragment3, jsx as
|
|
3060
|
+
import { Fragment as Fragment3, jsx as jsx61, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3007
3061
|
function Divider({ collapsed, testId, className }) {
|
|
3008
|
-
return /* @__PURE__ */
|
|
3062
|
+
return /* @__PURE__ */ jsx61(
|
|
3009
3063
|
"div",
|
|
3010
3064
|
{
|
|
3011
3065
|
"data-testid": testId,
|
|
@@ -3037,7 +3091,7 @@ function AppSidebar({
|
|
|
3037
3091
|
defaultCollapsed,
|
|
3038
3092
|
onCollapsedChange
|
|
3039
3093
|
});
|
|
3040
|
-
const pin = collapsible ? /* @__PURE__ */
|
|
3094
|
+
const pin = collapsible ? /* @__PURE__ */ jsx61(
|
|
3041
3095
|
"button",
|
|
3042
3096
|
{
|
|
3043
3097
|
type: "button",
|
|
@@ -3045,7 +3099,7 @@ function AppSidebar({
|
|
|
3045
3099
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
3046
3100
|
"aria-expanded": !collapsed,
|
|
3047
3101
|
className: "flex size-6 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
3048
|
-
children: /* @__PURE__ */
|
|
3102
|
+
children: /* @__PURE__ */ jsx61(PanelLeft, { className: "size-4", "aria-hidden": "true" })
|
|
3049
3103
|
}
|
|
3050
3104
|
) : null;
|
|
3051
3105
|
return /* @__PURE__ */ jsxs30(
|
|
@@ -3058,12 +3112,12 @@ function AppSidebar({
|
|
|
3058
3112
|
className
|
|
3059
3113
|
),
|
|
3060
3114
|
children: [
|
|
3061
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ jsx61("div", { className: cn("flex items-center gap-2", collapsed ? "justify-center px-1 pt-2" : "px-3 pt-[13px]"), children: collapsed ? collapsible ? logoCollapsed ?? logo ? (
|
|
3062
3116
|
/* The collapsed rail (52px) can't fit the logo mark beside the pin side by side —
|
|
3063
3117
|
so the pin overlays the mark instead, revealed on hover/focus, same as pre-flat-rail. */
|
|
3064
3118
|
/* @__PURE__ */ jsxs30("div", { className: "group relative flex size-8 items-center justify-center", children: [
|
|
3065
|
-
/* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
3119
|
+
/* @__PURE__ */ jsx61("span", { className: "pointer-events-none transition-opacity group-hover:opacity-0 group-focus-within:opacity-0", children: logoCollapsed ?? logo }),
|
|
3120
|
+
/* @__PURE__ */ jsx61(
|
|
3067
3121
|
"button",
|
|
3068
3122
|
{
|
|
3069
3123
|
type: "button",
|
|
@@ -3071,7 +3125,7 @@ function AppSidebar({
|
|
|
3071
3125
|
"aria-label": "Expand sidebar",
|
|
3072
3126
|
"aria-expanded": false,
|
|
3073
3127
|
className: "absolute inset-0 flex items-center justify-center rounded-md text-text-secondary opacity-0 transition-opacity hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-border-focus group-hover:opacity-100 group-focus-within:opacity-100",
|
|
3074
|
-
children: /* @__PURE__ */
|
|
3128
|
+
children: /* @__PURE__ */ jsx61(PanelLeft, { className: "size-4", "aria-hidden": "true" })
|
|
3075
3129
|
}
|
|
3076
3130
|
)
|
|
3077
3131
|
] })
|
|
@@ -3080,7 +3134,7 @@ function AppSidebar({
|
|
|
3080
3134
|
count, it's expanded-only). Hover-revealing the pin over nothing would leave
|
|
3081
3135
|
an invisible 32px box as the only way back to expanded, so render it plain
|
|
3082
3136
|
and fully visible instead. */
|
|
3083
|
-
/* @__PURE__ */
|
|
3137
|
+
/* @__PURE__ */ jsx61(
|
|
3084
3138
|
"button",
|
|
3085
3139
|
{
|
|
3086
3140
|
type: "button",
|
|
@@ -3088,15 +3142,15 @@ function AppSidebar({
|
|
|
3088
3142
|
"aria-label": "Expand sidebar",
|
|
3089
3143
|
"aria-expanded": false,
|
|
3090
3144
|
className: "flex size-8 shrink-0 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
3091
|
-
children: /* @__PURE__ */
|
|
3145
|
+
children: /* @__PURE__ */ jsx61(PanelLeft, { className: "size-4", "aria-hidden": "true" })
|
|
3092
3146
|
}
|
|
3093
3147
|
)
|
|
3094
3148
|
) : logoCollapsed ?? logo : /* @__PURE__ */ jsxs30(Fragment3, { children: [
|
|
3095
3149
|
header ?? logo,
|
|
3096
3150
|
pin
|
|
3097
3151
|
] }) }),
|
|
3098
|
-
/* @__PURE__ */
|
|
3099
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ jsx61(Divider, { collapsed, testId: "sidebar-divider-header", className: "mt-3" }),
|
|
3153
|
+
/* @__PURE__ */ jsx61(
|
|
3100
3154
|
"div",
|
|
3101
3155
|
{
|
|
3102
3156
|
"data-testid": "sidebar-scroll",
|
|
@@ -3104,12 +3158,12 @@ function AppSidebar({
|
|
|
3104
3158
|
"min-h-0 flex-1 overflow-y-auto overflow-x-hidden pt-3 pb-2",
|
|
3105
3159
|
collapsed ? "px-1" : "px-3"
|
|
3106
3160
|
),
|
|
3107
|
-
children: /* @__PURE__ */
|
|
3161
|
+
children: /* @__PURE__ */ jsx61(SidebarNav, { items, collapsed, basePath, LinkComponent, isItemActive })
|
|
3108
3162
|
}
|
|
3109
3163
|
),
|
|
3110
3164
|
footer && /* @__PURE__ */ jsxs30(Fragment3, { children: [
|
|
3111
|
-
/* @__PURE__ */
|
|
3112
|
-
/* @__PURE__ */
|
|
3165
|
+
/* @__PURE__ */ jsx61(Divider, { collapsed, testId: "sidebar-divider-account" }),
|
|
3166
|
+
/* @__PURE__ */ jsx61("div", { className: cn("py-2", collapsed ? "px-1" : "px-3"), children: footer })
|
|
3113
3167
|
] })
|
|
3114
3168
|
]
|
|
3115
3169
|
}
|
|
@@ -3117,40 +3171,40 @@ function AppSidebar({
|
|
|
3117
3171
|
}
|
|
3118
3172
|
|
|
3119
3173
|
// src/components/sidebar-product-header.tsx
|
|
3120
|
-
import * as
|
|
3174
|
+
import * as React51 from "react";
|
|
3121
3175
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
3122
3176
|
import { ChevronsUpDown as ChevronsUpDown2 } from "lucide-react";
|
|
3123
|
-
import { Fragment as Fragment4, jsx as
|
|
3124
|
-
var SidebarProductHeader =
|
|
3177
|
+
import { Fragment as Fragment4, jsx as jsx62, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3178
|
+
var SidebarProductHeader = React51.forwardRef(
|
|
3125
3179
|
function SidebarProductHeader2({ name, icon, trailing, asChild = false, className, children, ...props }, ref) {
|
|
3126
|
-
const adornment = trailing === void 0 ? /* @__PURE__ */
|
|
3180
|
+
const adornment = trailing === void 0 ? /* @__PURE__ */ jsx62(ChevronsUpDown2, { size: 14, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }) : trailing;
|
|
3127
3181
|
const content = /* @__PURE__ */ jsxs31(Fragment4, { children: [
|
|
3128
|
-
icon && /* @__PURE__ */
|
|
3129
|
-
/* @__PURE__ */
|
|
3130
|
-
adornment && /* @__PURE__ */
|
|
3182
|
+
icon && /* @__PURE__ */ jsx62("span", { className: "flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-md", "aria-hidden": "true", children: icon }),
|
|
3183
|
+
/* @__PURE__ */ jsx62("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary", children: name }),
|
|
3184
|
+
adornment && /* @__PURE__ */ jsx62("span", { className: "flex shrink-0 items-center", children: adornment })
|
|
3131
3185
|
] });
|
|
3132
3186
|
const classes = cn("flex w-full items-center gap-2.5 rounded-xl px-1.5 py-0 text-left", className);
|
|
3133
3187
|
if (asChild) {
|
|
3134
|
-
const child =
|
|
3135
|
-
return /* @__PURE__ */
|
|
3188
|
+
const child = React51.Children.only(children);
|
|
3189
|
+
return /* @__PURE__ */ jsx62(Slot5, { ref, className: classes, ...props, children: React51.cloneElement(child, void 0, content) });
|
|
3136
3190
|
}
|
|
3137
|
-
return /* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ jsx62("button", { ref, type: "button", className: classes, ...props, children: content });
|
|
3138
3192
|
}
|
|
3139
3193
|
);
|
|
3140
3194
|
SidebarProductHeader.displayName = "SidebarProductHeader";
|
|
3141
3195
|
|
|
3142
3196
|
// src/components/org-product-switcher.tsx
|
|
3143
3197
|
import { ChevronsUpDown as ChevronsUpDown3, Check as Check6 } from "lucide-react";
|
|
3144
|
-
import { Fragment as Fragment5, jsx as
|
|
3198
|
+
import { Fragment as Fragment5, jsx as jsx63, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3145
3199
|
var triggerBox = "flex w-full items-center gap-2.5 rounded-xl px-1.5 py-1 text-left transition-colors hover:bg-[var(--hov-bg)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus";
|
|
3146
3200
|
var menuItem = "gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-text-secondary focus:bg-[var(--menu-hov)] focus:text-text-primary";
|
|
3147
3201
|
var sectionLabel = "px-2 pt-1.5 pb-1 text-xs font-medium text-text-tertiary";
|
|
3148
3202
|
function Mark({ item, size }) {
|
|
3149
3203
|
const box = size === "md" ? "size-7" : "size-5";
|
|
3150
3204
|
if (item.icon) {
|
|
3151
|
-
return /* @__PURE__ */
|
|
3205
|
+
return /* @__PURE__ */ jsx63("span", { className: cn("flex shrink-0 items-center justify-center overflow-hidden rounded-md", box), "aria-hidden": "true", children: item.icon });
|
|
3152
3206
|
}
|
|
3153
|
-
return /* @__PURE__ */
|
|
3207
|
+
return /* @__PURE__ */ jsx63(
|
|
3154
3208
|
"span",
|
|
3155
3209
|
{
|
|
3156
3210
|
"aria-hidden": "true",
|
|
@@ -3179,12 +3233,12 @@ function OrgProductSwitcher({
|
|
|
3179
3233
|
const ariaLabel = props["aria-label"] ?? `${activeOrg?.name ?? ""} / ${activeProduct?.name ?? ""}`;
|
|
3180
3234
|
return /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
3181
3235
|
/* @__PURE__ */ jsxs32(DropdownMenuTrigger, { "aria-label": ariaLabel, className: cn(triggerBox, className), children: [
|
|
3182
|
-
activeProduct && /* @__PURE__ */
|
|
3236
|
+
activeProduct && /* @__PURE__ */ jsx63(Mark, { item: activeProduct, size: "md" }),
|
|
3183
3237
|
/* @__PURE__ */ jsxs32("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
3184
|
-
/* @__PURE__ */
|
|
3185
|
-
/* @__PURE__ */
|
|
3238
|
+
/* @__PURE__ */ jsx63("span", { className: "truncate text-xs leading-[normal] text-text-tertiary", children: activeOrg?.name }),
|
|
3239
|
+
/* @__PURE__ */ jsx63("span", { className: "truncate text-sm leading-[normal] font-semibold text-text-primary", children: activeProduct?.name })
|
|
3186
3240
|
] }),
|
|
3187
|
-
/* @__PURE__ */
|
|
3241
|
+
/* @__PURE__ */ jsx63(ChevronsUpDown3, { size: 14, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" })
|
|
3188
3242
|
] }),
|
|
3189
3243
|
/* @__PURE__ */ jsxs32(
|
|
3190
3244
|
DropdownMenuContent,
|
|
@@ -3193,25 +3247,25 @@ function OrgProductSwitcher({
|
|
|
3193
3247
|
sideOffset: 6,
|
|
3194
3248
|
className: "flex w-[var(--radix-dropdown-menu-trigger-width)] min-w-56 flex-col gap-px rounded-xl border-border-subtle bg-[var(--menu-bg)] p-1 shadow-(--menu-shadow)",
|
|
3195
3249
|
children: [
|
|
3196
|
-
/* @__PURE__ */
|
|
3250
|
+
/* @__PURE__ */ jsx63(DropdownMenuLabel, { className: sectionLabel, children: "Organizations" }),
|
|
3197
3251
|
organizations.map((o) => /* @__PURE__ */ jsxs32(DropdownMenuItem, { className: menuItem, onSelect: () => onOrgSelect(o.id), children: [
|
|
3198
|
-
/* @__PURE__ */
|
|
3199
|
-
/* @__PURE__ */
|
|
3200
|
-
o.id === activeOrgId && /* @__PURE__ */
|
|
3252
|
+
/* @__PURE__ */ jsx63(Mark, { item: o, size: "sm" }),
|
|
3253
|
+
/* @__PURE__ */ jsx63("span", { className: "min-w-0 flex-1 truncate", children: o.name }),
|
|
3254
|
+
o.id === activeOrgId && /* @__PURE__ */ jsx63(Check6, { className: "size-4 shrink-0 text-text-secondary", "aria-hidden": "true" })
|
|
3201
3255
|
] }, o.id)),
|
|
3202
|
-
/* @__PURE__ */
|
|
3256
|
+
/* @__PURE__ */ jsx63(DropdownMenuSeparator, { className: "mx-0 shrink-0 bg-border-subtle" }),
|
|
3203
3257
|
/* @__PURE__ */ jsxs32(DropdownMenuLabel, { className: sectionLabel, children: [
|
|
3204
3258
|
activeOrg?.name,
|
|
3205
3259
|
" \xB7 Products"
|
|
3206
3260
|
] }),
|
|
3207
3261
|
products.map((p) => /* @__PURE__ */ jsxs32(DropdownMenuItem, { className: menuItem, onSelect: () => onProductSelect(p.id), children: [
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
/* @__PURE__ */
|
|
3210
|
-
p.id === activeProductId && /* @__PURE__ */
|
|
3262
|
+
/* @__PURE__ */ jsx63(Mark, { item: p, size: "sm" }),
|
|
3263
|
+
/* @__PURE__ */ jsx63("span", { className: "min-w-0 flex-1 truncate", children: p.name }),
|
|
3264
|
+
p.id === activeProductId && /* @__PURE__ */ jsx63(Check6, { className: "size-4 shrink-0 text-text-secondary", "aria-hidden": "true" })
|
|
3211
3265
|
] }, p.id)),
|
|
3212
3266
|
actions && actions.length > 0 && /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
actions.map((a) => /* @__PURE__ */
|
|
3267
|
+
/* @__PURE__ */ jsx63(DropdownMenuSeparator, { className: "mx-0 shrink-0 bg-border-subtle" }),
|
|
3268
|
+
actions.map((a) => /* @__PURE__ */ jsx63(DropdownMenuItem, { className: menuItem, onSelect: a.onSelect, asChild: Boolean(a.href), children: a.href ? /* @__PURE__ */ jsxs32("a", { href: a.href, children: [
|
|
3215
3269
|
a.icon,
|
|
3216
3270
|
a.label
|
|
3217
3271
|
] }) : /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
@@ -3228,12 +3282,12 @@ OrgProductSwitcher.displayName = "OrgProductSwitcher";
|
|
|
3228
3282
|
|
|
3229
3283
|
// src/components/sidebar-back-header.tsx
|
|
3230
3284
|
import { ArrowLeft as ArrowLeft2 } from "lucide-react";
|
|
3231
|
-
import { jsx as
|
|
3285
|
+
import { jsx as jsx64, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3232
3286
|
var focusRing = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus";
|
|
3233
3287
|
var arrowPlate = "flex size-5 items-center justify-center rounded-md transition-colors hover:bg-[color-mix(in_srgb,var(--text-primary)_12%,transparent)] hover:text-text-primary";
|
|
3234
3288
|
var arrowBox = "flex shrink-0 cursor-pointer items-center rounded-xl py-2 pr-0 pl-2.5 text-text-secondary";
|
|
3235
3289
|
var titleBox = "min-w-0 flex-1 cursor-pointer truncate rounded-xl py-2 pr-2.5 pl-[14px] text-left text-sm font-semibold text-text-primary";
|
|
3236
|
-
var Arrow = () => /* @__PURE__ */
|
|
3290
|
+
var Arrow = () => /* @__PURE__ */ jsx64(ArrowLeft2, { size: 16, "aria-hidden": "true" });
|
|
3237
3291
|
function SidebarBackHeader({
|
|
3238
3292
|
title,
|
|
3239
3293
|
onBack,
|
|
@@ -3255,14 +3309,14 @@ function SidebarBackHeader({
|
|
|
3255
3309
|
className: cn("flex items-center rounded-xl", focusRing, className),
|
|
3256
3310
|
...rowProps,
|
|
3257
3311
|
children: [
|
|
3258
|
-
/* @__PURE__ */
|
|
3259
|
-
/* @__PURE__ */
|
|
3312
|
+
/* @__PURE__ */ jsx64("span", { className: arrowBox, children: /* @__PURE__ */ jsx64("span", { className: cn(arrowPlate, arrowClassName), ...arrowRest, children: /* @__PURE__ */ jsx64(Arrow, {}) }) }),
|
|
3313
|
+
/* @__PURE__ */ jsx64("span", { className: cn(titleBox, titleClassName), ...titleRest, children: title })
|
|
3260
3314
|
]
|
|
3261
3315
|
}
|
|
3262
3316
|
);
|
|
3263
3317
|
}
|
|
3264
3318
|
return /* @__PURE__ */ jsxs33("div", { className: cn("flex items-center", className), ...rowProps, children: [
|
|
3265
|
-
/* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ jsx64(
|
|
3266
3320
|
"button",
|
|
3267
3321
|
{
|
|
3268
3322
|
type: "button",
|
|
@@ -3270,10 +3324,10 @@ function SidebarBackHeader({
|
|
|
3270
3324
|
onClick: onBack,
|
|
3271
3325
|
className: cn(arrowBox, focusRing, arrowClassName),
|
|
3272
3326
|
...arrowRest,
|
|
3273
|
-
children: /* @__PURE__ */
|
|
3327
|
+
children: /* @__PURE__ */ jsx64("span", { className: arrowPlate, children: /* @__PURE__ */ jsx64(Arrow, {}) })
|
|
3274
3328
|
}
|
|
3275
3329
|
),
|
|
3276
|
-
/* @__PURE__ */
|
|
3330
|
+
/* @__PURE__ */ jsx64(
|
|
3277
3331
|
"button",
|
|
3278
3332
|
{
|
|
3279
3333
|
type: "button",
|
|
@@ -3288,54 +3342,54 @@ function SidebarBackHeader({
|
|
|
3288
3342
|
SidebarBackHeader.displayName = "SidebarBackHeader";
|
|
3289
3343
|
|
|
3290
3344
|
// src/components/app-shell.tsx
|
|
3291
|
-
import * as
|
|
3345
|
+
import * as React52 from "react";
|
|
3292
3346
|
import { Menu as Menu2 } from "lucide-react";
|
|
3293
3347
|
import { useLocation as useLocation2 } from "react-router";
|
|
3294
|
-
import { jsx as
|
|
3348
|
+
import { jsx as jsx65, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3295
3349
|
function expandedSidebar(sidebar) {
|
|
3296
|
-
return
|
|
3350
|
+
return React52.isValidElement(sidebar) ? React52.cloneElement(sidebar, { collapsed: false }) : sidebar;
|
|
3297
3351
|
}
|
|
3298
3352
|
function AppShell({ sidebar, topBar, children, className }) {
|
|
3299
3353
|
const { pathname } = useLocation2();
|
|
3300
|
-
const [mobileOpen, setMobileOpen] =
|
|
3301
|
-
|
|
3354
|
+
const [mobileOpen, setMobileOpen] = React52.useState(false);
|
|
3355
|
+
React52.useEffect(() => {
|
|
3302
3356
|
setMobileOpen(false);
|
|
3303
3357
|
}, [pathname]);
|
|
3304
3358
|
const isMobile = useIsMobile();
|
|
3305
3359
|
if (isMobile) {
|
|
3306
|
-
return /* @__PURE__ */
|
|
3360
|
+
return /* @__PURE__ */ jsx65(TooltipProvider, { children: /* @__PURE__ */ jsxs34("div", { className: cn("flex min-h-screen flex-col bg-bg-surface", className), children: [
|
|
3307
3361
|
/* @__PURE__ */ jsxs34("header", { className: "flex shrink-0 items-center justify-between border-b border-border-subtle bg-bg-surface px-4 py-3", children: [
|
|
3308
3362
|
/* @__PURE__ */ jsxs34(Sheet, { open: mobileOpen, onOpenChange: setMobileOpen, children: [
|
|
3309
|
-
/* @__PURE__ */
|
|
3363
|
+
/* @__PURE__ */ jsx65(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx65(Button, { variant: "ghost", size: "icon", className: "size-8 text-text-secondary", "aria-label": "Open navigation", children: /* @__PURE__ */ jsx65(Menu2, { className: "size-5" }) }) }),
|
|
3310
3364
|
/* @__PURE__ */ jsxs34(SheetContent, { side: "left", className: "w-[248px] bg-bg-surface p-0", children: [
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3365
|
+
/* @__PURE__ */ jsx65(SheetTitle, { className: "sr-only", children: "Navigation" }),
|
|
3366
|
+
/* @__PURE__ */ jsx65(SheetDescription, { className: "sr-only", children: "Application navigation menu" }),
|
|
3313
3367
|
expandedSidebar(sidebar)
|
|
3314
3368
|
] })
|
|
3315
3369
|
] }),
|
|
3316
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx65("div", { className: "flex items-center gap-2", children: topBar })
|
|
3317
3371
|
] }),
|
|
3318
|
-
/* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ jsx65("main", { className: "flex-1 overflow-auto", children })
|
|
3319
3373
|
] }) });
|
|
3320
3374
|
}
|
|
3321
|
-
return /* @__PURE__ */
|
|
3322
|
-
/* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ jsx65(TooltipProvider, { children: /* @__PURE__ */ jsxs34("div", { className: cn("flex min-h-screen gap-3 bg-bg-surface p-4", className), children: [
|
|
3376
|
+
/* @__PURE__ */ jsx65("div", { className: "sticky top-4 h-[calc(100vh-32px)] shrink-0", children: sidebar }),
|
|
3323
3377
|
/* @__PURE__ */ jsxs34("div", { className: "flex min-w-0 flex-1 flex-col overflow-hidden", children: [
|
|
3324
|
-
topBar && /* @__PURE__ */
|
|
3325
|
-
/* @__PURE__ */
|
|
3378
|
+
topBar && /* @__PURE__ */ jsx65("div", { className: "flex shrink-0 items-center justify-end gap-2", children: topBar }),
|
|
3379
|
+
/* @__PURE__ */ jsx65("main", { className: "flex-1 overflow-y-auto", children })
|
|
3326
3380
|
] })
|
|
3327
3381
|
] }) });
|
|
3328
3382
|
}
|
|
3329
3383
|
var AuthenticatedLayout = AppShell;
|
|
3330
3384
|
|
|
3331
3385
|
// src/components/grid.tsx
|
|
3332
|
-
import * as
|
|
3386
|
+
import * as React53 from "react";
|
|
3333
3387
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
3334
|
-
import { jsx as
|
|
3335
|
-
var Grid =
|
|
3388
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3389
|
+
var Grid = React53.forwardRef(
|
|
3336
3390
|
({ fluid = false, asChild = false, className, ...props }, ref) => {
|
|
3337
3391
|
const Comp = asChild ? Slot6 : "div";
|
|
3338
|
-
return /* @__PURE__ */
|
|
3392
|
+
return /* @__PURE__ */ jsx66(
|
|
3339
3393
|
Comp,
|
|
3340
3394
|
{
|
|
3341
3395
|
ref,
|
|
@@ -3353,9 +3407,9 @@ var Grid = React52.forwardRef(
|
|
|
3353
3407
|
Grid.displayName = "Grid";
|
|
3354
3408
|
|
|
3355
3409
|
// src/components/col.tsx
|
|
3356
|
-
import * as
|
|
3410
|
+
import * as React54 from "react";
|
|
3357
3411
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
3358
|
-
import { jsx as
|
|
3412
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
3359
3413
|
var TIER_MAX = { base: 4, md: 8, xl: 12 };
|
|
3360
3414
|
var SPAN = {
|
|
3361
3415
|
base: { 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" },
|
|
@@ -3475,17 +3529,17 @@ function responsiveClasses(span, offset) {
|
|
|
3475
3529
|
}
|
|
3476
3530
|
return cn(...spanClasses, ...startClasses);
|
|
3477
3531
|
}
|
|
3478
|
-
var Col =
|
|
3532
|
+
var Col = React54.forwardRef(
|
|
3479
3533
|
({ span, offset, asChild = false, className, ...props }, ref) => {
|
|
3480
3534
|
const Comp = asChild ? Slot7 : "div";
|
|
3481
|
-
return /* @__PURE__ */
|
|
3535
|
+
return /* @__PURE__ */ jsx67(Comp, { ref, className: cn(responsiveClasses(span, offset), className), ...props });
|
|
3482
3536
|
}
|
|
3483
3537
|
);
|
|
3484
3538
|
Col.displayName = "Col";
|
|
3485
3539
|
|
|
3486
3540
|
// src/components/code-block.tsx
|
|
3487
|
-
import * as
|
|
3488
|
-
import { jsx as
|
|
3541
|
+
import * as React55 from "react";
|
|
3542
|
+
import { jsx as jsx68, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3489
3543
|
var TOKEN_CLASS = {
|
|
3490
3544
|
comment: "text-text-tertiary italic",
|
|
3491
3545
|
string: "text-text-success",
|
|
@@ -3613,11 +3667,11 @@ function tokenize(code, lang) {
|
|
|
3613
3667
|
}
|
|
3614
3668
|
return tokens;
|
|
3615
3669
|
}
|
|
3616
|
-
var CodeBlock =
|
|
3670
|
+
var CodeBlock = React55.forwardRef(
|
|
3617
3671
|
({ code, lang = "tsx", copy = false, filename, scroll = false, className, ...props }, ref) => {
|
|
3618
|
-
const tokens =
|
|
3672
|
+
const tokens = React55.useMemo(() => tokenize(code, lang), [code, lang]);
|
|
3619
3673
|
const framed = Boolean(filename) || copy;
|
|
3620
|
-
const pre = /* @__PURE__ */
|
|
3674
|
+
const pre = /* @__PURE__ */ jsx68(
|
|
3621
3675
|
"pre",
|
|
3622
3676
|
{
|
|
3623
3677
|
ref,
|
|
@@ -3628,21 +3682,21 @@ var CodeBlock = React54.forwardRef(
|
|
|
3628
3682
|
className
|
|
3629
3683
|
),
|
|
3630
3684
|
...props,
|
|
3631
|
-
children: /* @__PURE__ */
|
|
3685
|
+
children: /* @__PURE__ */ jsx68("code", { children: tokens.map((token, index) => /* @__PURE__ */ jsx68("span", { className: TOKEN_CLASS[token.kind], children: token.text }, index)) })
|
|
3632
3686
|
}
|
|
3633
3687
|
);
|
|
3634
3688
|
if (!framed) return pre;
|
|
3635
3689
|
return /* @__PURE__ */ jsxs35("div", { className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-primary", children: [
|
|
3636
3690
|
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-2", children: [
|
|
3637
|
-
filename ? /* @__PURE__ */
|
|
3638
|
-
copy ? /* @__PURE__ */
|
|
3691
|
+
filename ? /* @__PURE__ */ jsx68("span", { className: "font-mono text-xs text-text-tertiary", children: filename }) : /* @__PURE__ */ jsx68("span", {}),
|
|
3692
|
+
copy ? /* @__PURE__ */ jsx68(CopyButton, { value: code, label: "Copy code" }) : null
|
|
3639
3693
|
] }),
|
|
3640
3694
|
pre
|
|
3641
3695
|
] });
|
|
3642
3696
|
}
|
|
3643
3697
|
);
|
|
3644
3698
|
CodeBlock.displayName = "CodeBlock";
|
|
3645
|
-
var Code =
|
|
3699
|
+
var Code = React55.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx68(
|
|
3646
3700
|
"code",
|
|
3647
3701
|
{
|
|
3648
3702
|
ref,
|
|
@@ -3656,13 +3710,13 @@ var Code = React54.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
3656
3710
|
Code.displayName = "Code";
|
|
3657
3711
|
|
|
3658
3712
|
// src/components/grid-overlay.tsx
|
|
3659
|
-
import * as
|
|
3660
|
-
import { jsx as
|
|
3713
|
+
import * as React56 from "react";
|
|
3714
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
3661
3715
|
var BASELINE = "var(--grid-gutter) / 2";
|
|
3662
|
-
var GridOverlay =
|
|
3716
|
+
var GridOverlay = React56.forwardRef(
|
|
3663
3717
|
({ columns, baseline = false, className, style, ...props }, ref) => {
|
|
3664
3718
|
const count = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1;
|
|
3665
|
-
return /* @__PURE__ */
|
|
3719
|
+
return /* @__PURE__ */ jsx69(
|
|
3666
3720
|
"div",
|
|
3667
3721
|
{
|
|
3668
3722
|
ref,
|
|
@@ -3679,7 +3733,7 @@ var GridOverlay = React55.forwardRef(
|
|
|
3679
3733
|
...style
|
|
3680
3734
|
},
|
|
3681
3735
|
...props,
|
|
3682
|
-
children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */
|
|
3736
|
+
children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsx69("span", { style: { backgroundColor: "var(--bg-brand)", opacity: 0.1 } }, i))
|
|
3683
3737
|
}
|
|
3684
3738
|
);
|
|
3685
3739
|
}
|
|
@@ -3687,10 +3741,10 @@ var GridOverlay = React55.forwardRef(
|
|
|
3687
3741
|
GridOverlay.displayName = "GridOverlay";
|
|
3688
3742
|
|
|
3689
3743
|
// src/components/segment-chip.tsx
|
|
3690
|
-
import * as
|
|
3744
|
+
import * as React57 from "react";
|
|
3691
3745
|
import { cva as cva9 } from "class-variance-authority";
|
|
3692
3746
|
import { Link2 as Link22, KeyRound, Clock, Plus } from "lucide-react";
|
|
3693
|
-
import { jsx as
|
|
3747
|
+
import { jsx as jsx70, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3694
3748
|
var segmentChipVariants = cva9(
|
|
3695
3749
|
"inline-flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-sm font-medium leading-tight",
|
|
3696
3750
|
{
|
|
@@ -3711,11 +3765,11 @@ var kindIcons = {
|
|
|
3711
3765
|
pending: Clock,
|
|
3712
3766
|
available: Plus
|
|
3713
3767
|
};
|
|
3714
|
-
var SegmentChip =
|
|
3768
|
+
var SegmentChip = React57.forwardRef(
|
|
3715
3769
|
({ kind, resource, icon, hideIcon = false, className, ...props }, ref) => {
|
|
3716
3770
|
const Icon = icon ?? kindIcons[kind ?? "granted"];
|
|
3717
3771
|
return /* @__PURE__ */ jsxs36("span", { ref, className: cn(segmentChipVariants({ kind }), className), ...props, children: [
|
|
3718
|
-
!hideIcon && /* @__PURE__ */
|
|
3772
|
+
!hideIcon && /* @__PURE__ */ jsx70(Icon, { className: "size-3.5 shrink-0 opacity-90", "aria-hidden": "true" }),
|
|
3719
3773
|
resource
|
|
3720
3774
|
] });
|
|
3721
3775
|
}
|
|
@@ -3723,9 +3777,9 @@ var SegmentChip = React56.forwardRef(
|
|
|
3723
3777
|
SegmentChip.displayName = "SegmentChip";
|
|
3724
3778
|
|
|
3725
3779
|
// src/components/connection-card.tsx
|
|
3726
|
-
import * as
|
|
3780
|
+
import * as React58 from "react";
|
|
3727
3781
|
import { AlertTriangle, ChevronDown as ChevronDown4 } from "lucide-react";
|
|
3728
|
-
import { Fragment as Fragment6, jsx as
|
|
3782
|
+
import { Fragment as Fragment6, jsx as jsx71, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3729
3783
|
var authLabels = { app: "App", oauth: "OAuth", token: "token" };
|
|
3730
3784
|
var statusMeta = {
|
|
3731
3785
|
connected: { label: "Connected", badge: "success", dot: "success" },
|
|
@@ -3735,7 +3789,7 @@ var statusMeta = {
|
|
|
3735
3789
|
function monogram(name) {
|
|
3736
3790
|
return name.replace(/[^a-zA-Z0-9 ]/g, " ").split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0].toUpperCase()).join("");
|
|
3737
3791
|
}
|
|
3738
|
-
var ConnectionCard =
|
|
3792
|
+
var ConnectionCard = React58.forwardRef(
|
|
3739
3793
|
({
|
|
3740
3794
|
name,
|
|
3741
3795
|
scope,
|
|
@@ -3756,7 +3810,7 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3756
3810
|
}, ref) => {
|
|
3757
3811
|
const meta = statusMeta[status];
|
|
3758
3812
|
const connected = status !== "disconnected";
|
|
3759
|
-
const glyphBox = /* @__PURE__ */
|
|
3813
|
+
const glyphBox = /* @__PURE__ */ jsx71(
|
|
3760
3814
|
"div",
|
|
3761
3815
|
{
|
|
3762
3816
|
"aria-hidden": "true",
|
|
@@ -3765,14 +3819,14 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3765
3819
|
}
|
|
3766
3820
|
);
|
|
3767
3821
|
const identity = /* @__PURE__ */ jsxs37("div", { className: "min-w-0", children: [
|
|
3768
|
-
/* @__PURE__ */
|
|
3822
|
+
/* @__PURE__ */ jsx71("p", { className: "truncate text-sm font-semibold text-text-primary", children: name }),
|
|
3769
3823
|
/* @__PURE__ */ jsxs37("div", { className: "mt-0.5 flex flex-wrap gap-1", children: [
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
3824
|
+
/* @__PURE__ */ jsx71(Badge, { variant: "secondary", children: scope }),
|
|
3825
|
+
/* @__PURE__ */ jsx71(Badge, { variant: "secondary", children: authLabels[auth] })
|
|
3772
3826
|
] })
|
|
3773
3827
|
] });
|
|
3774
3828
|
const statusBadge = /* @__PURE__ */ jsxs37(Badge, { variant: meta.badge, className: "gap-1.5", children: [
|
|
3775
|
-
/* @__PURE__ */
|
|
3829
|
+
/* @__PURE__ */ jsx71(StatusDot, { status: meta.dot, size: "sm" }),
|
|
3776
3830
|
statusLabel ?? meta.label
|
|
3777
3831
|
] });
|
|
3778
3832
|
const accessNote = access ? /* @__PURE__ */ jsxs37(
|
|
@@ -3781,22 +3835,22 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3781
3835
|
role: "note",
|
|
3782
3836
|
className: "flex items-start gap-2 border-t border-border-subtle bg-bg-warning-subtle px-4 py-2.5 text-xs font-medium text-text-warning",
|
|
3783
3837
|
children: [
|
|
3784
|
-
/* @__PURE__ */
|
|
3785
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ jsx71(AlertTriangle, { className: "mt-0.5 size-3.5 shrink-0", "aria-hidden": "true" }),
|
|
3839
|
+
/* @__PURE__ */ jsx71("span", { children: access })
|
|
3786
3840
|
]
|
|
3787
3841
|
}
|
|
3788
3842
|
) : null;
|
|
3789
3843
|
const footerAction = collapsible ? action : connected && action;
|
|
3790
3844
|
const footer = grantedCount !== void 0 || footerAction ? /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between border-t border-border-subtle px-4 py-3", children: [
|
|
3791
|
-
/* @__PURE__ */
|
|
3845
|
+
/* @__PURE__ */ jsx71("span", { className: "text-sm text-text-secondary", children: grantedCount !== void 0 ? /* @__PURE__ */ jsxs37(Fragment6, { children: [
|
|
3792
3846
|
"Granted to ",
|
|
3793
|
-
/* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ jsx71("span", { className: "font-semibold text-text-primary", children: grantedCount }),
|
|
3794
3848
|
" ",
|
|
3795
3849
|
grantedCount === 1 ? "product" : "products"
|
|
3796
|
-
] }) : /* @__PURE__ */
|
|
3850
|
+
] }) : /* @__PURE__ */ jsx71("span", { className: "text-text-tertiary", children: "Not granted to any product yet" }) }),
|
|
3797
3851
|
footerAction
|
|
3798
3852
|
] }) : null;
|
|
3799
|
-
const drawer = children ? /* @__PURE__ */
|
|
3853
|
+
const drawer = children ? /* @__PURE__ */ jsx71("div", { "data-slot": "drawer", className: "border-t border-border-subtle", children }) : null;
|
|
3800
3854
|
if (!collapsible) {
|
|
3801
3855
|
return /* @__PURE__ */ jsxs37(
|
|
3802
3856
|
Card,
|
|
@@ -3808,7 +3862,7 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3808
3862
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3 p-4", children: [
|
|
3809
3863
|
glyphBox,
|
|
3810
3864
|
identity,
|
|
3811
|
-
/* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ jsx71("div", { className: "ml-auto shrink-0", children: connected ? statusBadge : action })
|
|
3812
3866
|
] }),
|
|
3813
3867
|
accessNote,
|
|
3814
3868
|
footer,
|
|
@@ -3817,7 +3871,7 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3817
3871
|
}
|
|
3818
3872
|
);
|
|
3819
3873
|
}
|
|
3820
|
-
return /* @__PURE__ */
|
|
3874
|
+
return /* @__PURE__ */ jsx71(Collapsible, { defaultOpen, open, onOpenChange, children: /* @__PURE__ */ jsxs37(
|
|
3821
3875
|
Card,
|
|
3822
3876
|
{
|
|
3823
3877
|
ref,
|
|
@@ -3828,7 +3882,7 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3828
3882
|
),
|
|
3829
3883
|
...props,
|
|
3830
3884
|
children: [
|
|
3831
|
-
/* @__PURE__ */
|
|
3885
|
+
/* @__PURE__ */ jsx71(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs37(
|
|
3832
3886
|
"button",
|
|
3833
3887
|
{
|
|
3834
3888
|
type: "button",
|
|
@@ -3838,7 +3892,7 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3838
3892
|
identity,
|
|
3839
3893
|
/* @__PURE__ */ jsxs37("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
3840
3894
|
statusBadge,
|
|
3841
|
-
/* @__PURE__ */
|
|
3895
|
+
/* @__PURE__ */ jsx71(
|
|
3842
3896
|
ChevronDown4,
|
|
3843
3897
|
{
|
|
3844
3898
|
"aria-hidden": "true",
|
|
@@ -3862,29 +3916,29 @@ var ConnectionCard = React57.forwardRef(
|
|
|
3862
3916
|
ConnectionCard.displayName = "ConnectionCard";
|
|
3863
3917
|
|
|
3864
3918
|
// src/components/request-row.tsx
|
|
3865
|
-
import * as
|
|
3866
|
-
import { Fragment as Fragment7, jsx as
|
|
3919
|
+
import * as React59 from "react";
|
|
3920
|
+
import { Fragment as Fragment7, jsx as jsx72, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3867
3921
|
function monogram2(name) {
|
|
3868
3922
|
return name.replace(/[^a-zA-Z0-9 ]/g, " ").split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0].toUpperCase()).join("");
|
|
3869
3923
|
}
|
|
3870
|
-
var RequestRow =
|
|
3924
|
+
var RequestRow = React59.forwardRef(
|
|
3871
3925
|
({ surface, name, state: state2, glyph, subtitle, grantedResource, onApprove, onDeny, onRequest, action, className, ...props }, ref) => {
|
|
3872
3926
|
let controls = action;
|
|
3873
3927
|
if (controls === void 0) {
|
|
3874
3928
|
if (surface === "org" && state2 === "pending") {
|
|
3875
3929
|
controls = /* @__PURE__ */ jsxs38(Fragment7, { children: [
|
|
3876
|
-
/* @__PURE__ */
|
|
3877
|
-
/* @__PURE__ */
|
|
3930
|
+
/* @__PURE__ */ jsx72(Button, { variant: "outline", size: "sm", onClick: onDeny, children: "Deny" }),
|
|
3931
|
+
/* @__PURE__ */ jsx72(Button, { size: "sm", onClick: onApprove, children: "Approve" })
|
|
3878
3932
|
] });
|
|
3879
3933
|
} else if (state2 === "available") {
|
|
3880
|
-
controls = /* @__PURE__ */
|
|
3934
|
+
controls = /* @__PURE__ */ jsx72(Button, { size: "sm", onClick: onRequest, children: "Request" });
|
|
3881
3935
|
} else if (state2 === "pending") {
|
|
3882
3936
|
controls = /* @__PURE__ */ jsxs38(Badge, { variant: "secondary", className: "gap-1.5", children: [
|
|
3883
|
-
/* @__PURE__ */
|
|
3937
|
+
/* @__PURE__ */ jsx72(StatusDot, { status: "neutral", size: "sm" }),
|
|
3884
3938
|
"Pending"
|
|
3885
3939
|
] });
|
|
3886
3940
|
} else if (state2 === "granted") {
|
|
3887
|
-
controls = /* @__PURE__ */
|
|
3941
|
+
controls = /* @__PURE__ */ jsx72(SegmentChip, { kind: "granted", resource: grantedResource ?? "a segment" });
|
|
3888
3942
|
}
|
|
3889
3943
|
}
|
|
3890
3944
|
return /* @__PURE__ */ jsxs38(
|
|
@@ -3897,7 +3951,7 @@ var RequestRow = React58.forwardRef(
|
|
|
3897
3951
|
),
|
|
3898
3952
|
...props,
|
|
3899
3953
|
children: [
|
|
3900
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ jsx72(
|
|
3901
3955
|
"div",
|
|
3902
3956
|
{
|
|
3903
3957
|
"aria-hidden": "true",
|
|
@@ -3906,10 +3960,10 @@ var RequestRow = React58.forwardRef(
|
|
|
3906
3960
|
}
|
|
3907
3961
|
),
|
|
3908
3962
|
/* @__PURE__ */ jsxs38("div", { className: "min-w-0", children: [
|
|
3909
|
-
/* @__PURE__ */
|
|
3910
|
-
subtitle && /* @__PURE__ */
|
|
3963
|
+
/* @__PURE__ */ jsx72("p", { className: "truncate text-sm font-semibold text-text-primary", children: name }),
|
|
3964
|
+
subtitle && /* @__PURE__ */ jsx72("p", { className: "truncate text-xs text-text-tertiary", children: subtitle })
|
|
3911
3965
|
] }),
|
|
3912
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ jsx72("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: controls })
|
|
3913
3967
|
]
|
|
3914
3968
|
}
|
|
3915
3969
|
);
|
|
@@ -3918,9 +3972,9 @@ var RequestRow = React58.forwardRef(
|
|
|
3918
3972
|
RequestRow.displayName = "RequestRow";
|
|
3919
3973
|
|
|
3920
3974
|
// src/components/feedback-button.tsx
|
|
3921
|
-
import * as
|
|
3975
|
+
import * as React60 from "react";
|
|
3922
3976
|
import { MessageSquare, Loader2 as Loader22, CheckCircle2 } from "lucide-react";
|
|
3923
|
-
import { jsx as
|
|
3977
|
+
import { jsx as jsx73, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3924
3978
|
var TITLE_MAX = 256;
|
|
3925
3979
|
var DETAILS_MAX = 65536;
|
|
3926
3980
|
var DEFAULT_LABELS = {
|
|
@@ -3934,15 +3988,15 @@ var DEFAULT_LABELS = {
|
|
|
3934
3988
|
};
|
|
3935
3989
|
function FeedbackButton({ onSubmit, labels, className }) {
|
|
3936
3990
|
const l = { ...DEFAULT_LABELS, ...labels };
|
|
3937
|
-
const uid =
|
|
3991
|
+
const uid = React60.useId();
|
|
3938
3992
|
const titleId = `${uid}-title`;
|
|
3939
3993
|
const detailsId = `${uid}-details`;
|
|
3940
3994
|
const titleErrId = `${uid}-title-error`;
|
|
3941
3995
|
const detailsErrId = `${uid}-details-error`;
|
|
3942
|
-
const [open, setOpen] =
|
|
3943
|
-
const [status, setStatus] =
|
|
3944
|
-
const [title, setTitle] =
|
|
3945
|
-
const [details, setDetails] =
|
|
3996
|
+
const [open, setOpen] = React60.useState(false);
|
|
3997
|
+
const [status, setStatus] = React60.useState("idle");
|
|
3998
|
+
const [title, setTitle] = React60.useState("");
|
|
3999
|
+
const [details, setDetails] = React60.useState("");
|
|
3946
4000
|
const titleTooLong = title.length > TITLE_MAX;
|
|
3947
4001
|
const detailsTooLong = details.length > DETAILS_MAX;
|
|
3948
4002
|
const titleEmpty = title.trim().length === 0;
|
|
@@ -3968,19 +4022,19 @@ function FeedbackButton({ onSubmit, labels, className }) {
|
|
|
3968
4022
|
}
|
|
3969
4023
|
};
|
|
3970
4024
|
return /* @__PURE__ */ jsxs39(Popover, { open, onOpenChange: changeOpen, children: [
|
|
3971
|
-
/* @__PURE__ */
|
|
3972
|
-
/* @__PURE__ */
|
|
4025
|
+
/* @__PURE__ */ jsx73(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs39(Button, { variant: "ghost", size: "sm", "aria-label": l.trigger, className, children: [
|
|
4026
|
+
/* @__PURE__ */ jsx73(MessageSquare, { className: "size-4", "aria-hidden": "true" }),
|
|
3973
4027
|
l.trigger
|
|
3974
4028
|
] }) }),
|
|
3975
|
-
/* @__PURE__ */
|
|
3976
|
-
/* @__PURE__ */
|
|
3977
|
-
/* @__PURE__ */
|
|
3978
|
-
/* @__PURE__ */
|
|
4029
|
+
/* @__PURE__ */ jsx73(PopoverContent, { align: "end", side: "bottom", className: "w-80", children: status === "success" ? /* @__PURE__ */ jsxs39("div", { className: "flex flex-col items-center gap-3 py-2 text-center", children: [
|
|
4030
|
+
/* @__PURE__ */ jsx73(CheckCircle2, { className: "size-8 text-text-success", "aria-hidden": "true" }),
|
|
4031
|
+
/* @__PURE__ */ jsx73("p", { role: "status", className: "text-sm text-text-primary", children: l.success }),
|
|
4032
|
+
/* @__PURE__ */ jsx73(Button, { variant: "outline", size: "sm", onClick: () => changeOpen(false), children: "Close" })
|
|
3979
4033
|
] }) : /* @__PURE__ */ jsxs39("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
|
|
3980
|
-
/* @__PURE__ */
|
|
4034
|
+
/* @__PURE__ */ jsx73("p", { className: "text-sm font-medium text-text-primary", children: l.title }),
|
|
3981
4035
|
/* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-1.5", children: [
|
|
3982
|
-
/* @__PURE__ */
|
|
3983
|
-
/* @__PURE__ */
|
|
4036
|
+
/* @__PURE__ */ jsx73(Label2, { htmlFor: titleId, children: l.titleField }),
|
|
4037
|
+
/* @__PURE__ */ jsx73(
|
|
3984
4038
|
Input,
|
|
3985
4039
|
{
|
|
3986
4040
|
id: titleId,
|
|
@@ -3999,8 +4053,8 @@ function FeedbackButton({ onSubmit, labels, className }) {
|
|
|
3999
4053
|
] })
|
|
4000
4054
|
] }),
|
|
4001
4055
|
/* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-1.5", children: [
|
|
4002
|
-
/* @__PURE__ */
|
|
4003
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ jsx73(Label2, { htmlFor: detailsId, children: l.detailsField }),
|
|
4057
|
+
/* @__PURE__ */ jsx73(
|
|
4004
4058
|
Textarea,
|
|
4005
4059
|
{
|
|
4006
4060
|
id: detailsId,
|
|
@@ -4018,9 +4072,9 @@ function FeedbackButton({ onSubmit, labels, className }) {
|
|
|
4018
4072
|
" characters or fewer."
|
|
4019
4073
|
] })
|
|
4020
4074
|
] }),
|
|
4021
|
-
status === "error" && /* @__PURE__ */
|
|
4075
|
+
status === "error" && /* @__PURE__ */ jsx73(InlineError, { children: l.error }),
|
|
4022
4076
|
/* @__PURE__ */ jsxs39(Button, { type: "submit", disabled: !valid || submitting, children: [
|
|
4023
|
-
submitting && /* @__PURE__ */
|
|
4077
|
+
submitting && /* @__PURE__ */ jsx73(Loader22, { className: "size-4 animate-spin", "aria-hidden": "true" }),
|
|
4024
4078
|
l.submit
|
|
4025
4079
|
] })
|
|
4026
4080
|
] }) })
|
|
@@ -4029,7 +4083,7 @@ function FeedbackButton({ onSubmit, labels, className }) {
|
|
|
4029
4083
|
|
|
4030
4084
|
// src/components/create-product-window.tsx
|
|
4031
4085
|
import { useForm } from "react-hook-form";
|
|
4032
|
-
import { jsx as
|
|
4086
|
+
import { jsx as jsx74, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4033
4087
|
var CREATE_ORG_VALUE = "__create_new_org__";
|
|
4034
4088
|
function CreateProductWindow({
|
|
4035
4089
|
organizations,
|
|
@@ -4064,8 +4118,8 @@ function CreateProductWindow({
|
|
|
4064
4118
|
const showSelect = organizations.length > 0;
|
|
4065
4119
|
return /* @__PURE__ */ jsxs40("div", { className: "flex w-full max-w-md flex-col gap-6", children: [
|
|
4066
4120
|
showSelect && /* @__PURE__ */ jsxs40("div", { className: "space-y-2", children: [
|
|
4067
|
-
/* @__PURE__ */
|
|
4068
|
-
/* @__PURE__ */
|
|
4121
|
+
/* @__PURE__ */ jsx74("span", { className: "text-sm font-medium leading-none text-text-primary", children: "Organization" }),
|
|
4122
|
+
/* @__PURE__ */ jsx74(
|
|
4069
4123
|
Select,
|
|
4070
4124
|
{
|
|
4071
4125
|
"data-testid": "create-product-org-select",
|
|
@@ -4079,8 +4133,8 @@ function CreateProductWindow({
|
|
|
4079
4133
|
)
|
|
4080
4134
|
] }),
|
|
4081
4135
|
!createOrgMode && /* @__PURE__ */ jsxs40("div", { className: "space-y-2", children: [
|
|
4082
|
-
/* @__PURE__ */
|
|
4083
|
-
productsLoading ? /* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsx74("span", { className: "text-sm font-medium leading-none text-text-primary", children: "Products" }),
|
|
4137
|
+
productsLoading ? /* @__PURE__ */ jsx74("p", { className: "text-sm text-text-tertiary", children: "Loading products\u2026" }) : products.length === 0 ? /* @__PURE__ */ jsx74("p", { className: "text-sm text-text-tertiary", children: "No products yet." }) : /* @__PURE__ */ jsx74("ul", { className: "flex flex-col gap-1", children: products.map((product) => /* @__PURE__ */ jsx74("li", { children: /* @__PURE__ */ jsxs40(
|
|
4084
4138
|
"button",
|
|
4085
4139
|
{
|
|
4086
4140
|
type: "button",
|
|
@@ -4089,14 +4143,14 @@ function CreateProductWindow({
|
|
|
4089
4143
|
"flex w-full items-center justify-between rounded-md border border-border-default bg-bg-primary px-3 py-2 text-left text-sm text-text-primary hover:bg-bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus"
|
|
4090
4144
|
),
|
|
4091
4145
|
children: [
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
/* @__PURE__ */
|
|
4146
|
+
/* @__PURE__ */ jsx74("span", { className: "truncate", children: product.name }),
|
|
4147
|
+
/* @__PURE__ */ jsx74("span", { className: "ml-2 truncate text-text-tertiary", children: product.slug })
|
|
4094
4148
|
]
|
|
4095
4149
|
}
|
|
4096
4150
|
) }, product.id)) })
|
|
4097
4151
|
] }),
|
|
4098
|
-
/* @__PURE__ */
|
|
4099
|
-
createOrgMode && /* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ jsx74(Form, { ...form, children: /* @__PURE__ */ jsxs40("form", { onSubmit: handleSubmit, className: "flex flex-col gap-4", noValidate: true, children: [
|
|
4153
|
+
createOrgMode && /* @__PURE__ */ jsx74(
|
|
4100
4154
|
FormField,
|
|
4101
4155
|
{
|
|
4102
4156
|
control: form.control,
|
|
@@ -4105,13 +4159,13 @@ function CreateProductWindow({
|
|
|
4105
4159
|
validate: (value) => value.trim().length > 0 || "Organization name is required"
|
|
4106
4160
|
},
|
|
4107
4161
|
render: ({ field }) => /* @__PURE__ */ jsxs40(FormItem, { children: [
|
|
4108
|
-
/* @__PURE__ */
|
|
4109
|
-
/* @__PURE__ */
|
|
4110
|
-
/* @__PURE__ */
|
|
4162
|
+
/* @__PURE__ */ jsx74(FormLabel, { children: "Organization name" }),
|
|
4163
|
+
/* @__PURE__ */ jsx74(FormControl, { children: /* @__PURE__ */ jsx74(Input, { placeholder: "Acme Inc.", ...field }) }),
|
|
4164
|
+
/* @__PURE__ */ jsx74(FormMessage, {})
|
|
4111
4165
|
] })
|
|
4112
4166
|
}
|
|
4113
4167
|
),
|
|
4114
|
-
/* @__PURE__ */
|
|
4168
|
+
/* @__PURE__ */ jsx74(
|
|
4115
4169
|
FormField,
|
|
4116
4170
|
{
|
|
4117
4171
|
control: form.control,
|
|
@@ -4120,14 +4174,14 @@ function CreateProductWindow({
|
|
|
4120
4174
|
validate: (value) => value.trim().length > 0 || "Product name is required"
|
|
4121
4175
|
},
|
|
4122
4176
|
render: ({ field }) => /* @__PURE__ */ jsxs40(FormItem, { children: [
|
|
4123
|
-
/* @__PURE__ */
|
|
4124
|
-
/* @__PURE__ */
|
|
4125
|
-
/* @__PURE__ */
|
|
4177
|
+
/* @__PURE__ */ jsx74(FormLabel, { children: "Product name" }),
|
|
4178
|
+
/* @__PURE__ */ jsx74(FormControl, { children: /* @__PURE__ */ jsx74(Input, { placeholder: "My product", ...field }) }),
|
|
4179
|
+
/* @__PURE__ */ jsx74(FormMessage, {})
|
|
4126
4180
|
] })
|
|
4127
4181
|
}
|
|
4128
4182
|
),
|
|
4129
|
-
error && /* @__PURE__ */
|
|
4130
|
-
/* @__PURE__ */
|
|
4183
|
+
error && /* @__PURE__ */ jsx74(InlineError, { children: error }),
|
|
4184
|
+
/* @__PURE__ */ jsx74(Button, { type: "submit", disabled: submitting, children: "Create product" })
|
|
4131
4185
|
] }) })
|
|
4132
4186
|
] });
|
|
4133
4187
|
}
|
|
@@ -4166,18 +4220,18 @@ function isNotificationSettled(item) {
|
|
|
4166
4220
|
}
|
|
4167
4221
|
|
|
4168
4222
|
// src/components/notification-bell.tsx
|
|
4169
|
-
import * as
|
|
4223
|
+
import * as React61 from "react";
|
|
4170
4224
|
import { BellRing, Check as Check7, Settings } from "lucide-react";
|
|
4171
|
-
import { jsx as
|
|
4225
|
+
import { jsx as jsx75, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4172
4226
|
function MarkReadButton({ title, onClick }) {
|
|
4173
|
-
return /* @__PURE__ */
|
|
4227
|
+
return /* @__PURE__ */ jsx75(
|
|
4174
4228
|
"button",
|
|
4175
4229
|
{
|
|
4176
4230
|
type: "button",
|
|
4177
4231
|
"aria-label": `Mark "${title}" as read`,
|
|
4178
4232
|
onClick,
|
|
4179
4233
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-text-tertiary opacity-0 transition-opacity hover:text-text-primary focus-visible:opacity-100 group-hover:opacity-100",
|
|
4180
|
-
children: /* @__PURE__ */
|
|
4234
|
+
children: /* @__PURE__ */ jsx75(Check7, { className: "size-3.5", "aria-hidden": "true" })
|
|
4181
4235
|
}
|
|
4182
4236
|
);
|
|
4183
4237
|
}
|
|
@@ -4196,7 +4250,7 @@ function BellRow({
|
|
|
4196
4250
|
return /* @__PURE__ */ jsxs41("div", { className: cn("group rounded-lg bg-bg-surface px-3 py-2.5", settled && "opacity-45"), children: [
|
|
4197
4251
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-start gap-2.5", children: [
|
|
4198
4252
|
/* @__PURE__ */ jsxs41("div", { className: "min-w-0 flex-1", children: [
|
|
4199
|
-
/* @__PURE__ */
|
|
4253
|
+
/* @__PURE__ */ jsx75(
|
|
4200
4254
|
"button",
|
|
4201
4255
|
{
|
|
4202
4256
|
type: "button",
|
|
@@ -4209,19 +4263,19 @@ function BellRow({
|
|
|
4209
4263
|
}
|
|
4210
4264
|
),
|
|
4211
4265
|
/* @__PURE__ */ jsxs41("p", { className: "mt-1 truncate text-xs text-text-tertiary", children: [
|
|
4212
|
-
/* @__PURE__ */
|
|
4266
|
+
/* @__PURE__ */ jsx75("span", { className: "font-semibold uppercase tracking-wide text-text-secondary", children: item.source }),
|
|
4213
4267
|
item.receipt ? `, ${item.receipt}` : ""
|
|
4214
4268
|
] })
|
|
4215
4269
|
] }),
|
|
4216
4270
|
(age || markable) && /* @__PURE__ */ jsxs41("div", { className: "mt-px flex shrink-0 items-center gap-1", children: [
|
|
4217
|
-
age && /* @__PURE__ */
|
|
4218
|
-
markable && /* @__PURE__ */
|
|
4271
|
+
age && /* @__PURE__ */ jsx75("span", { className: "text-xs text-text-tertiary", children: age }),
|
|
4272
|
+
markable && /* @__PURE__ */ jsx75(MarkReadButton, { title: item.title, onClick: () => onMarkRead(item.id) })
|
|
4219
4273
|
] })
|
|
4220
4274
|
] }),
|
|
4221
4275
|
(actions.length > 0 || item.deepLink) && /* @__PURE__ */ jsxs41("div", { className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-2", children: [
|
|
4222
4276
|
actions.map((action) => {
|
|
4223
4277
|
const chip = action.variant === "primary" || action.variant === "destructive";
|
|
4224
|
-
return /* @__PURE__ */
|
|
4278
|
+
return /* @__PURE__ */ jsx75(
|
|
4225
4279
|
"button",
|
|
4226
4280
|
{
|
|
4227
4281
|
type: "button",
|
|
@@ -4236,7 +4290,7 @@ function BellRow({
|
|
|
4236
4290
|
action.id
|
|
4237
4291
|
);
|
|
4238
4292
|
}),
|
|
4239
|
-
item.deepLink && /* @__PURE__ */
|
|
4293
|
+
item.deepLink && /* @__PURE__ */ jsx75(
|
|
4240
4294
|
"button",
|
|
4241
4295
|
{
|
|
4242
4296
|
type: "button",
|
|
@@ -4248,7 +4302,7 @@ function BellRow({
|
|
|
4248
4302
|
] })
|
|
4249
4303
|
] });
|
|
4250
4304
|
}
|
|
4251
|
-
var NotificationBell =
|
|
4305
|
+
var NotificationBell = React61.forwardRef(
|
|
4252
4306
|
({
|
|
4253
4307
|
items,
|
|
4254
4308
|
unreadCount,
|
|
@@ -4265,13 +4319,13 @@ var NotificationBell = React60.forwardRef(
|
|
|
4265
4319
|
className
|
|
4266
4320
|
}, ref) => {
|
|
4267
4321
|
const unread = unreadCount ?? items.filter((n) => !n.read && n.cls !== "ephemeral").length;
|
|
4268
|
-
const age =
|
|
4322
|
+
const age = React61.useCallback(
|
|
4269
4323
|
(createdAt) => formatAge ? formatAge(createdAt) : formatRelativeAge(createdAt),
|
|
4270
4324
|
[formatAge]
|
|
4271
4325
|
);
|
|
4272
4326
|
const rows = items.slice(0, maxItems);
|
|
4273
4327
|
return /* @__PURE__ */ jsxs41(Popover, { open, onOpenChange, children: [
|
|
4274
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsx75(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs41(
|
|
4275
4329
|
"button",
|
|
4276
4330
|
{
|
|
4277
4331
|
ref,
|
|
@@ -4282,16 +4336,16 @@ var NotificationBell = React60.forwardRef(
|
|
|
4282
4336
|
className
|
|
4283
4337
|
),
|
|
4284
4338
|
children: [
|
|
4285
|
-
/* @__PURE__ */
|
|
4286
|
-
unread > 0 && /* @__PURE__ */
|
|
4339
|
+
/* @__PURE__ */ jsx75(BellRing, { className: "size-[18px]", "aria-hidden": "true" }),
|
|
4340
|
+
unread > 0 && /* @__PURE__ */ jsx75("span", { className: "absolute -right-1.5 -top-1.5 flex size-[17px] items-center justify-center rounded-full bg-bg-brand text-xs font-bold leading-none text-text-on-brand ring-2 ring-bg-surface", children: unread })
|
|
4287
4341
|
]
|
|
4288
4342
|
}
|
|
4289
4343
|
) }),
|
|
4290
4344
|
/* @__PURE__ */ jsxs41(PopoverContent, { align: "end", className: "w-[380px] overflow-hidden p-0", children: [
|
|
4291
4345
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between px-5 py-3", children: [
|
|
4292
|
-
/* @__PURE__ */
|
|
4346
|
+
/* @__PURE__ */ jsx75("span", { className: "text-sm font-bold text-text-primary", children: "Notification center" }),
|
|
4293
4347
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-3", children: [
|
|
4294
|
-
/* @__PURE__ */
|
|
4348
|
+
/* @__PURE__ */ jsx75(
|
|
4295
4349
|
"button",
|
|
4296
4350
|
{
|
|
4297
4351
|
type: "button",
|
|
@@ -4304,19 +4358,19 @@ var NotificationBell = React60.forwardRef(
|
|
|
4304
4358
|
children: "Mark all read"
|
|
4305
4359
|
}
|
|
4306
4360
|
),
|
|
4307
|
-
onOpenSettings && /* @__PURE__ */
|
|
4361
|
+
onOpenSettings && /* @__PURE__ */ jsx75(
|
|
4308
4362
|
"button",
|
|
4309
4363
|
{
|
|
4310
4364
|
type: "button",
|
|
4311
4365
|
"aria-label": "Notification settings",
|
|
4312
4366
|
onClick: () => onOpenSettings(),
|
|
4313
4367
|
className: "flex size-6 items-center justify-center rounded-md text-text-tertiary transition-colors hover:bg-bg-surface hover:text-text-primary",
|
|
4314
|
-
children: /* @__PURE__ */
|
|
4368
|
+
children: /* @__PURE__ */ jsx75(Settings, { className: "size-[15px]", "aria-hidden": "true" })
|
|
4315
4369
|
}
|
|
4316
4370
|
)
|
|
4317
4371
|
] })
|
|
4318
4372
|
] }),
|
|
4319
|
-
/* @__PURE__ */
|
|
4373
|
+
/* @__PURE__ */ jsx75("div", { className: "space-y-1.5 px-2 pb-2", children: rows.length === 0 ? /* @__PURE__ */ jsx75("p", { className: "px-3 py-12 text-center text-xs leading-relaxed text-text-disabled", children: "Nothing yet. Everything addressed to you lands here." }) : rows.map((item) => /* @__PURE__ */ jsx75(
|
|
4320
4374
|
BellRow,
|
|
4321
4375
|
{
|
|
4322
4376
|
item,
|
|
@@ -4327,7 +4381,7 @@ var NotificationBell = React60.forwardRef(
|
|
|
4327
4381
|
},
|
|
4328
4382
|
item.id
|
|
4329
4383
|
)) }),
|
|
4330
|
-
items.length > 0 && onOpenArchive && /* @__PURE__ */
|
|
4384
|
+
items.length > 0 && onOpenArchive && /* @__PURE__ */ jsx75(
|
|
4331
4385
|
"button",
|
|
4332
4386
|
{
|
|
4333
4387
|
type: "button",
|
|
@@ -4343,21 +4397,21 @@ var NotificationBell = React60.forwardRef(
|
|
|
4343
4397
|
NotificationBell.displayName = "NotificationBell";
|
|
4344
4398
|
|
|
4345
4399
|
// src/components/notification-center.tsx
|
|
4346
|
-
import * as
|
|
4400
|
+
import * as React62 from "react";
|
|
4347
4401
|
import { ArrowUpRight, Check as Check8, Search as Search2 } from "lucide-react";
|
|
4348
|
-
import { jsx as
|
|
4402
|
+
import { jsx as jsx76, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4349
4403
|
var chipBase = "rounded-lg px-3 py-1.5 text-sm font-medium transition-colors";
|
|
4350
4404
|
var chipOn = "bg-bg-brand-subtle text-text-brand";
|
|
4351
4405
|
var chipOff = "bg-bg-elevated text-text-secondary hover:text-text-primary";
|
|
4352
4406
|
function MarkReadButton2({ title, onClick }) {
|
|
4353
|
-
return /* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsx76(
|
|
4354
4408
|
"button",
|
|
4355
4409
|
{
|
|
4356
4410
|
type: "button",
|
|
4357
4411
|
"aria-label": `Mark "${title}" as read`,
|
|
4358
4412
|
onClick,
|
|
4359
4413
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-text-tertiary opacity-0 transition-opacity hover:text-text-primary focus-visible:opacity-100 group-hover:opacity-100",
|
|
4360
|
-
children: /* @__PURE__ */
|
|
4414
|
+
children: /* @__PURE__ */ jsx76(Check8, { className: "size-3.5", "aria-hidden": "true" })
|
|
4361
4415
|
}
|
|
4362
4416
|
);
|
|
4363
4417
|
}
|
|
@@ -4373,14 +4427,14 @@ function CenterRow({
|
|
|
4373
4427
|
const age = item.createdAt ? formatAge(item.createdAt instanceof Date ? item.createdAt : new Date(item.createdAt)) : null;
|
|
4374
4428
|
return /* @__PURE__ */ jsxs42("article", { className: "group rounded-lg bg-bg-elevated px-4 py-3", children: [
|
|
4375
4429
|
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
|
|
4376
|
-
/* @__PURE__ */
|
|
4377
|
-
/* @__PURE__ */
|
|
4430
|
+
/* @__PURE__ */ jsx76("span", { className: "text-xs font-semibold uppercase tracking-[0.09em] text-text-secondary", children: item.source }),
|
|
4431
|
+
/* @__PURE__ */ jsx76(Badge, { variant: severityBadgeVariant(item.severity), children: severityLabels[item.severity] }),
|
|
4378
4432
|
(age || markable) && /* @__PURE__ */ jsxs42("div", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
|
|
4379
|
-
age && /* @__PURE__ */
|
|
4380
|
-
markable && /* @__PURE__ */
|
|
4433
|
+
age && /* @__PURE__ */ jsx76("span", { className: "text-xs tabular-nums text-text-tertiary", children: age }),
|
|
4434
|
+
markable && /* @__PURE__ */ jsx76(MarkReadButton2, { title: item.title, onClick: () => onMarkRead(item.id) })
|
|
4381
4435
|
] })
|
|
4382
4436
|
] }),
|
|
4383
|
-
/* @__PURE__ */
|
|
4437
|
+
/* @__PURE__ */ jsx76(
|
|
4384
4438
|
"button",
|
|
4385
4439
|
{
|
|
4386
4440
|
type: "button",
|
|
@@ -4392,10 +4446,10 @@ function CenterRow({
|
|
|
4392
4446
|
children: item.title
|
|
4393
4447
|
}
|
|
4394
4448
|
),
|
|
4395
|
-
item.body && /* @__PURE__ */
|
|
4449
|
+
item.body && /* @__PURE__ */ jsx76("p", { className: "mt-0.5 text-sm leading-snug text-text-secondary", children: item.body }),
|
|
4396
4450
|
(item.receipt || item.deepLink) && /* @__PURE__ */ jsxs42("div", { className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1.5", children: [
|
|
4397
4451
|
item.receipt && /* @__PURE__ */ jsxs42("span", { className: "inline-flex items-center gap-1.5 text-sm text-text-tertiary", children: [
|
|
4398
|
-
/* @__PURE__ */
|
|
4452
|
+
/* @__PURE__ */ jsx76(Check8, { className: "size-3 shrink-0 text-text-success", "aria-hidden": "true" }),
|
|
4399
4453
|
item.receipt
|
|
4400
4454
|
] }),
|
|
4401
4455
|
item.deepLink && /* @__PURE__ */ jsxs42(
|
|
@@ -4406,14 +4460,14 @@ function CenterRow({
|
|
|
4406
4460
|
className: "inline-flex items-center gap-1 text-sm font-medium text-text-brand transition-colors hover:text-text-primary",
|
|
4407
4461
|
children: [
|
|
4408
4462
|
item.deepLink.label,
|
|
4409
|
-
/* @__PURE__ */
|
|
4463
|
+
/* @__PURE__ */ jsx76(ArrowUpRight, { className: "size-3", "aria-hidden": "true" })
|
|
4410
4464
|
]
|
|
4411
4465
|
}
|
|
4412
4466
|
)
|
|
4413
4467
|
] })
|
|
4414
4468
|
] });
|
|
4415
4469
|
}
|
|
4416
|
-
var NotificationCenter =
|
|
4470
|
+
var NotificationCenter = React62.forwardRef(
|
|
4417
4471
|
({
|
|
4418
4472
|
items,
|
|
4419
4473
|
title = "Notifications",
|
|
@@ -4429,16 +4483,16 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4429
4483
|
formatAge,
|
|
4430
4484
|
className
|
|
4431
4485
|
}, ref) => {
|
|
4432
|
-
const [status, setStatus] =
|
|
4433
|
-
const [source, setSource] =
|
|
4434
|
-
const [product, setProduct] =
|
|
4435
|
-
const [query, setQuery] =
|
|
4436
|
-
const [limit, setLimit] =
|
|
4437
|
-
const age =
|
|
4486
|
+
const [status, setStatus] = React62.useState("all");
|
|
4487
|
+
const [source, setSource] = React62.useState("all");
|
|
4488
|
+
const [product, setProduct] = React62.useState("all");
|
|
4489
|
+
const [query, setQuery] = React62.useState("");
|
|
4490
|
+
const [limit, setLimit] = React62.useState(pageSize);
|
|
4491
|
+
const age = React62.useCallback(
|
|
4438
4492
|
(createdAt) => formatAge ? formatAge(createdAt) : formatRelativeAge(createdAt),
|
|
4439
4493
|
[formatAge]
|
|
4440
4494
|
);
|
|
4441
|
-
const sourceChips =
|
|
4495
|
+
const sourceChips = React62.useMemo(
|
|
4442
4496
|
() => sources ?? Array.from(new Set(items.map((n) => n.source))),
|
|
4443
4497
|
[sources, items]
|
|
4444
4498
|
);
|
|
@@ -4452,10 +4506,10 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4452
4506
|
return /* @__PURE__ */ jsxs42("div", { ref, className: cn("mx-auto max-w-[560px]", className), children: [
|
|
4453
4507
|
/* @__PURE__ */ jsxs42("div", { className: "mb-4 flex items-start gap-4", children: [
|
|
4454
4508
|
/* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
|
|
4455
|
-
/* @__PURE__ */
|
|
4456
|
-
description && /* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ jsx76("h1", { className: "mb-1.5 text-2xl font-semibold tracking-tight text-text-primary", children: title }),
|
|
4510
|
+
description && /* @__PURE__ */ jsx76("p", { className: "text-sm text-text-tertiary", children: description })
|
|
4457
4511
|
] }),
|
|
4458
|
-
onMarkAllRead && /* @__PURE__ */
|
|
4512
|
+
onMarkAllRead && /* @__PURE__ */ jsx76(
|
|
4459
4513
|
"button",
|
|
4460
4514
|
{
|
|
4461
4515
|
type: "button",
|
|
@@ -4466,8 +4520,8 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4466
4520
|
)
|
|
4467
4521
|
] }),
|
|
4468
4522
|
searchable && /* @__PURE__ */ jsxs42("div", { className: "mb-3 flex items-center gap-2 rounded-lg bg-bg-elevated px-3 py-2", children: [
|
|
4469
|
-
/* @__PURE__ */
|
|
4470
|
-
/* @__PURE__ */
|
|
4523
|
+
/* @__PURE__ */ jsx76(Search2, { className: "size-4 shrink-0 text-text-tertiary", "aria-hidden": "true" }),
|
|
4524
|
+
/* @__PURE__ */ jsx76(
|
|
4471
4525
|
"input",
|
|
4472
4526
|
{
|
|
4473
4527
|
type: "text",
|
|
@@ -4479,7 +4533,7 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4479
4533
|
)
|
|
4480
4534
|
] }),
|
|
4481
4535
|
/* @__PURE__ */ jsxs42("div", { className: "mb-2 flex flex-wrap gap-1.5", children: [
|
|
4482
|
-
/* @__PURE__ */
|
|
4536
|
+
/* @__PURE__ */ jsx76(
|
|
4483
4537
|
"button",
|
|
4484
4538
|
{
|
|
4485
4539
|
type: "button",
|
|
@@ -4488,7 +4542,7 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4488
4542
|
children: "All"
|
|
4489
4543
|
}
|
|
4490
4544
|
),
|
|
4491
|
-
/* @__PURE__ */
|
|
4545
|
+
/* @__PURE__ */ jsx76(
|
|
4492
4546
|
"button",
|
|
4493
4547
|
{
|
|
4494
4548
|
type: "button",
|
|
@@ -4499,7 +4553,7 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4499
4553
|
)
|
|
4500
4554
|
] }),
|
|
4501
4555
|
/* @__PURE__ */ jsxs42("div", { className: "mb-2 flex flex-wrap gap-1.5", children: [
|
|
4502
|
-
/* @__PURE__ */
|
|
4556
|
+
/* @__PURE__ */ jsx76(
|
|
4503
4557
|
"button",
|
|
4504
4558
|
{
|
|
4505
4559
|
type: "button",
|
|
@@ -4508,7 +4562,7 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4508
4562
|
children: "All sources"
|
|
4509
4563
|
}
|
|
4510
4564
|
),
|
|
4511
|
-
sourceChips.map((s) => /* @__PURE__ */
|
|
4565
|
+
sourceChips.map((s) => /* @__PURE__ */ jsx76(
|
|
4512
4566
|
"button",
|
|
4513
4567
|
{
|
|
4514
4568
|
type: "button",
|
|
@@ -4520,7 +4574,7 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4520
4574
|
))
|
|
4521
4575
|
] }),
|
|
4522
4576
|
products && products.length > 0 && /* @__PURE__ */ jsxs42("div", { className: "mb-4 flex flex-wrap gap-1.5", children: [
|
|
4523
|
-
/* @__PURE__ */
|
|
4577
|
+
/* @__PURE__ */ jsx76(
|
|
4524
4578
|
"button",
|
|
4525
4579
|
{
|
|
4526
4580
|
type: "button",
|
|
@@ -4529,7 +4583,7 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4529
4583
|
children: "All products"
|
|
4530
4584
|
}
|
|
4531
4585
|
),
|
|
4532
|
-
products.map((p) => /* @__PURE__ */
|
|
4586
|
+
products.map((p) => /* @__PURE__ */ jsx76(
|
|
4533
4587
|
"button",
|
|
4534
4588
|
{
|
|
4535
4589
|
type: "button",
|
|
@@ -4540,8 +4594,8 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4540
4594
|
p.id
|
|
4541
4595
|
))
|
|
4542
4596
|
] }),
|
|
4543
|
-
shown.length === 0 ? /* @__PURE__ */
|
|
4544
|
-
shown.map((item) => /* @__PURE__ */
|
|
4597
|
+
shown.length === 0 ? /* @__PURE__ */ jsx76("p", { className: "rounded-xl bg-bg-elevated px-4 py-10 text-center text-sm leading-relaxed text-text-disabled", children: filtering ? "Nothing matches." : "Nothing here yet. Everything addressed to you lands here." }) : /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-1.5", children: [
|
|
4598
|
+
shown.map((item) => /* @__PURE__ */ jsx76(
|
|
4545
4599
|
CenterRow,
|
|
4546
4600
|
{
|
|
4547
4601
|
item,
|
|
@@ -4572,9 +4626,9 @@ var NotificationCenter = React61.forwardRef(
|
|
|
4572
4626
|
NotificationCenter.displayName = "NotificationCenter";
|
|
4573
4627
|
|
|
4574
4628
|
// src/components/notification-settings.tsx
|
|
4575
|
-
import * as
|
|
4629
|
+
import * as React63 from "react";
|
|
4576
4630
|
import { Moon as Moon2, Plus as Plus2, Volume2 } from "lucide-react";
|
|
4577
|
-
import { Fragment as Fragment8, jsx as
|
|
4631
|
+
import { Fragment as Fragment8, jsx as jsx77, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4578
4632
|
var THRESHOLDS = [
|
|
4579
4633
|
["everything", "Everything"],
|
|
4580
4634
|
["important", "Important"],
|
|
@@ -4586,13 +4640,13 @@ function ThresholdControl({
|
|
|
4586
4640
|
value,
|
|
4587
4641
|
onChange
|
|
4588
4642
|
}) {
|
|
4589
|
-
return /* @__PURE__ */
|
|
4643
|
+
return /* @__PURE__ */ jsx77(
|
|
4590
4644
|
"span",
|
|
4591
4645
|
{
|
|
4592
4646
|
role: "group",
|
|
4593
4647
|
"aria-label": `Interrupt me for ${label}`,
|
|
4594
4648
|
className: "inline-flex shrink-0 overflow-hidden rounded-md bg-bg-primary",
|
|
4595
|
-
children: THRESHOLDS.map(([threshold, text]) => /* @__PURE__ */
|
|
4649
|
+
children: THRESHOLDS.map(([threshold, text]) => /* @__PURE__ */ jsx77(
|
|
4596
4650
|
"button",
|
|
4597
4651
|
{
|
|
4598
4652
|
type: "button",
|
|
@@ -4609,7 +4663,7 @@ function ThresholdControl({
|
|
|
4609
4663
|
}
|
|
4610
4664
|
);
|
|
4611
4665
|
}
|
|
4612
|
-
var NotificationSettings =
|
|
4666
|
+
var NotificationSettings = React63.forwardRef(
|
|
4613
4667
|
({
|
|
4614
4668
|
subscriptions,
|
|
4615
4669
|
value,
|
|
@@ -4622,7 +4676,7 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4622
4676
|
pushSlot,
|
|
4623
4677
|
className
|
|
4624
4678
|
}, ref) => {
|
|
4625
|
-
const [tab, setTab] =
|
|
4679
|
+
const [tab, setTab] = React63.useState(DEFAULT_KEY);
|
|
4626
4680
|
const isDefault = tab === DEFAULT_KEY;
|
|
4627
4681
|
const defaults = value[DEFAULT_KEY] ?? { thresholds: {} };
|
|
4628
4682
|
const customized = !isDefault && Object.prototype.hasOwnProperty.call(value, tab);
|
|
@@ -4643,14 +4697,14 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4643
4697
|
const rows = subscriptions.filter((s) => s.scope === scope);
|
|
4644
4698
|
if (rows.length === 0) return null;
|
|
4645
4699
|
return /* @__PURE__ */ jsxs43("div", { children: [
|
|
4646
|
-
/* @__PURE__ */
|
|
4647
|
-
/* @__PURE__ */
|
|
4700
|
+
/* @__PURE__ */ jsx77("p", { className: "mb-1.5 px-0.5 text-xs font-bold uppercase tracking-wider text-text-tertiary", children: scope === "product" ? "This product" : "Organization" }),
|
|
4701
|
+
/* @__PURE__ */ jsx77("div", { className: "space-y-2", children: rows.map((sub) => /* @__PURE__ */ jsxs43(
|
|
4648
4702
|
"div",
|
|
4649
4703
|
{
|
|
4650
4704
|
className: "flex items-center gap-4 rounded-xl bg-bg-elevated px-4 py-3",
|
|
4651
4705
|
children: [
|
|
4652
|
-
/* @__PURE__ */
|
|
4653
|
-
/* @__PURE__ */
|
|
4706
|
+
/* @__PURE__ */ jsx77("p", { className: "min-w-0 flex-1 text-sm font-semibold text-text-primary", children: sub.name }),
|
|
4707
|
+
/* @__PURE__ */ jsx77(
|
|
4654
4708
|
ThresholdControl,
|
|
4655
4709
|
{
|
|
4656
4710
|
label: sub.name,
|
|
@@ -4666,8 +4720,8 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4666
4720
|
};
|
|
4667
4721
|
return /* @__PURE__ */ jsxs43("div", { ref, className: cn("space-y-5", className), children: [
|
|
4668
4722
|
products && products.length > 0 && /* @__PURE__ */ jsxs43("div", { children: [
|
|
4669
|
-
/* @__PURE__ */
|
|
4670
|
-
/* @__PURE__ */
|
|
4723
|
+
/* @__PURE__ */ jsx77("p", { className: "mb-2 px-0.5 text-xs font-bold uppercase tracking-wider text-text-tertiary", children: "Preferences for" }),
|
|
4724
|
+
/* @__PURE__ */ jsx77("div", { className: "flex flex-wrap gap-2", children: [{ id: DEFAULT_KEY, label: "Default" }, ...products].map((t) => /* @__PURE__ */ jsxs43(
|
|
4671
4725
|
"button",
|
|
4672
4726
|
{
|
|
4673
4727
|
type: "button",
|
|
@@ -4678,32 +4732,32 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4678
4732
|
),
|
|
4679
4733
|
children: [
|
|
4680
4734
|
t.label,
|
|
4681
|
-
t.id !== DEFAULT_KEY && Object.prototype.hasOwnProperty.call(value, t.id) && /* @__PURE__ */
|
|
4735
|
+
t.id !== DEFAULT_KEY && Object.prototype.hasOwnProperty.call(value, t.id) && /* @__PURE__ */ jsx77("span", { className: "size-1.5 rounded-full bg-bg-brand", "aria-label": "customized" })
|
|
4682
4736
|
]
|
|
4683
4737
|
},
|
|
4684
4738
|
t.id
|
|
4685
4739
|
)) })
|
|
4686
4740
|
] }),
|
|
4687
4741
|
isDefault ? /* @__PURE__ */ jsxs43(Fragment8, { children: [
|
|
4688
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ jsx77("p", { className: "text-sm leading-relaxed text-text-secondary", children: "Your defaults, applied to every product unless you customize one. Everything addressed to you always lands in the in-app record; that cannot be turned off." }),
|
|
4689
4743
|
/* @__PURE__ */ jsxs43(Card, { className: "border-none bg-bg-elevated p-5", children: [
|
|
4690
|
-
/* @__PURE__ */
|
|
4691
|
-
/* @__PURE__ */
|
|
4692
|
-
pushSlot ?? /* @__PURE__ */
|
|
4744
|
+
/* @__PURE__ */ jsx77("p", { className: "mb-1.5 text-xs font-bold uppercase tracking-wide text-text-tertiary", children: "Push to" }),
|
|
4745
|
+
/* @__PURE__ */ jsx77("p", { className: "mb-3 text-sm leading-relaxed text-text-secondary", children: "Forward notifications beyond the in-app record to a connected integration." }),
|
|
4746
|
+
pushSlot ?? /* @__PURE__ */ jsx77("div", { className: "rounded-lg bg-bg-surface px-4 py-6 text-center", children: /* @__PURE__ */ jsx77("p", { className: "text-sm text-text-tertiary", children: "No integrations connected." }) })
|
|
4693
4747
|
] }),
|
|
4694
4748
|
mutes.length > 0 && /* @__PURE__ */ jsxs43("div", { children: [
|
|
4695
|
-
/* @__PURE__ */
|
|
4696
|
-
/* @__PURE__ */
|
|
4697
|
-
/* @__PURE__ */
|
|
4749
|
+
/* @__PURE__ */ jsx77("p", { className: "mb-1.5 px-0.5 text-xs font-bold uppercase tracking-wider text-text-tertiary", children: "Muted" }),
|
|
4750
|
+
/* @__PURE__ */ jsx77(Card, { className: "border-none bg-bg-elevated p-2", children: mutes.map((m) => /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3 rounded-lg px-3 py-2.5", children: [
|
|
4751
|
+
/* @__PURE__ */ jsx77(Moon2, { className: "size-4 shrink-0 text-text-tertiary", "aria-hidden": "true" }),
|
|
4698
4752
|
/* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
|
|
4699
|
-
/* @__PURE__ */
|
|
4753
|
+
/* @__PURE__ */ jsx77("p", { className: "text-sm font-medium text-text-primary", children: m.source }),
|
|
4700
4754
|
/* @__PURE__ */ jsxs43("p", { className: "text-sm text-text-tertiary", children: [
|
|
4701
4755
|
"Muted \u2014 ",
|
|
4702
4756
|
m.label,
|
|
4703
4757
|
". Critical still comes through."
|
|
4704
4758
|
] })
|
|
4705
4759
|
] }),
|
|
4706
|
-
/* @__PURE__ */
|
|
4760
|
+
/* @__PURE__ */ jsx77(
|
|
4707
4761
|
"button",
|
|
4708
4762
|
{
|
|
4709
4763
|
type: "button",
|
|
@@ -4716,13 +4770,13 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4716
4770
|
] }),
|
|
4717
4771
|
scopeGroup("product"),
|
|
4718
4772
|
scopeGroup("org"),
|
|
4719
|
-
onSoundEnabledChange && /* @__PURE__ */
|
|
4720
|
-
/* @__PURE__ */
|
|
4773
|
+
onSoundEnabledChange && /* @__PURE__ */ jsx77(Card, { className: "border-none bg-bg-elevated p-4", children: /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4774
|
+
/* @__PURE__ */ jsx77(Volume2, { className: "size-4 text-text-tertiary", "aria-hidden": "true" }),
|
|
4721
4775
|
/* @__PURE__ */ jsxs43("div", { className: "flex-1", children: [
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4776
|
+
/* @__PURE__ */ jsx77("p", { className: "text-sm font-medium text-text-primary", children: "Notification sound" }),
|
|
4777
|
+
/* @__PURE__ */ jsx77("p", { className: "text-sm text-text-tertiary", children: "Play a tone when a notification arrives. Critical always chimes." })
|
|
4724
4778
|
] }),
|
|
4725
|
-
/* @__PURE__ */
|
|
4779
|
+
/* @__PURE__ */ jsx77(
|
|
4726
4780
|
Switch,
|
|
4727
4781
|
{
|
|
4728
4782
|
checked: soundEnabled ?? false,
|
|
@@ -4736,7 +4790,7 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4736
4790
|
productLabel,
|
|
4737
4791
|
" follows your Default preferences."
|
|
4738
4792
|
] }),
|
|
4739
|
-
/* @__PURE__ */
|
|
4793
|
+
/* @__PURE__ */ jsx77("p", { className: "mx-auto mt-1.5 max-w-[360px] text-sm leading-relaxed text-text-tertiary", children: "Interrupt thresholds, sound and forwarding all come from Default. Opt in to give this product its own interrupt thresholds." }),
|
|
4740
4794
|
/* @__PURE__ */ jsxs43(
|
|
4741
4795
|
"button",
|
|
4742
4796
|
{
|
|
@@ -4744,22 +4798,22 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4744
4798
|
onClick: customize,
|
|
4745
4799
|
className: "mt-5 inline-flex items-center gap-1.5 rounded-lg bg-bg-brand px-3.5 py-2 text-sm font-semibold text-text-on-brand transition-colors hover:bg-bg-brand-hover",
|
|
4746
4800
|
children: [
|
|
4747
|
-
/* @__PURE__ */
|
|
4801
|
+
/* @__PURE__ */ jsx77(Plus2, { className: "size-4", "aria-hidden": "true" }),
|
|
4748
4802
|
" Customize for ",
|
|
4749
4803
|
productLabel
|
|
4750
4804
|
]
|
|
4751
4805
|
}
|
|
4752
4806
|
)
|
|
4753
4807
|
] }) : /* @__PURE__ */ jsxs43(Fragment8, { children: [
|
|
4754
|
-
/* @__PURE__ */
|
|
4808
|
+
/* @__PURE__ */ jsx77(Card, { className: "border-none bg-bg-brand-subtle p-3.5", children: /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4755
4809
|
/* @__PURE__ */ jsxs43("div", { className: "min-w-0 flex-1", children: [
|
|
4756
4810
|
/* @__PURE__ */ jsxs43("p", { className: "text-sm font-semibold text-text-brand", children: [
|
|
4757
4811
|
"Custom preferences for ",
|
|
4758
4812
|
productLabel
|
|
4759
4813
|
] }),
|
|
4760
|
-
/* @__PURE__ */
|
|
4814
|
+
/* @__PURE__ */ jsx77("p", { className: "text-sm leading-relaxed text-text-secondary", children: "Only the interrupt thresholds below differ. Sound and forwarding follow Default." })
|
|
4761
4815
|
] }),
|
|
4762
|
-
/* @__PURE__ */
|
|
4816
|
+
/* @__PURE__ */ jsx77(
|
|
4763
4817
|
"button",
|
|
4764
4818
|
{
|
|
4765
4819
|
type: "button",
|
|
@@ -4777,14 +4831,14 @@ var NotificationSettings = React62.forwardRef(
|
|
|
4777
4831
|
NotificationSettings.displayName = "NotificationSettings";
|
|
4778
4832
|
|
|
4779
4833
|
// src/components/notification-toast.tsx
|
|
4780
|
-
import * as
|
|
4834
|
+
import * as React64 from "react";
|
|
4781
4835
|
import { X as X3 } from "lucide-react";
|
|
4782
|
-
import { jsx as
|
|
4836
|
+
import { jsx as jsx78, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4783
4837
|
var chipBase2 = "rounded-lg px-2.5 py-1 text-sm font-medium transition-colors";
|
|
4784
4838
|
var chipPrimary = "bg-bg-brand text-text-on-brand hover:bg-bg-brand-hover";
|
|
4785
4839
|
var chipDestructive = "bg-bg-elevated text-text-danger hover:bg-bg-surface";
|
|
4786
4840
|
var linkAction = "text-sm font-semibold text-text-brand transition-colors hover:text-text-primary";
|
|
4787
|
-
var NotificationToast =
|
|
4841
|
+
var NotificationToast = React64.forwardRef(
|
|
4788
4842
|
({
|
|
4789
4843
|
item,
|
|
4790
4844
|
showSource = true,
|
|
@@ -4808,20 +4862,20 @@ var NotificationToast = React63.forwardRef(
|
|
|
4808
4862
|
),
|
|
4809
4863
|
children: [
|
|
4810
4864
|
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
|
|
4811
|
-
showSource && /* @__PURE__ */
|
|
4812
|
-
/* @__PURE__ */
|
|
4813
|
-
onDismiss && /* @__PURE__ */
|
|
4865
|
+
showSource && /* @__PURE__ */ jsx78("span", { className: "text-xs font-semibold uppercase tracking-[0.09em] text-text-secondary", children: item.source }),
|
|
4866
|
+
/* @__PURE__ */ jsx78(Badge, { variant: severityBadgeVariant(item.severity), children: severityLabels[item.severity] }),
|
|
4867
|
+
onDismiss && /* @__PURE__ */ jsx78(
|
|
4814
4868
|
"button",
|
|
4815
4869
|
{
|
|
4816
4870
|
type: "button",
|
|
4817
4871
|
"aria-label": dismissLabel,
|
|
4818
4872
|
onClick: () => onDismiss(item),
|
|
4819
4873
|
className: "-mr-1 ml-auto flex size-5 shrink-0 items-center justify-center rounded text-text-tertiary transition-colors hover:bg-bg-surface hover:text-text-primary",
|
|
4820
|
-
children: /* @__PURE__ */
|
|
4874
|
+
children: /* @__PURE__ */ jsx78(X3, { className: "size-3.5", "aria-hidden": "true" })
|
|
4821
4875
|
}
|
|
4822
4876
|
)
|
|
4823
4877
|
] }),
|
|
4824
|
-
onItemClick ? /* @__PURE__ */
|
|
4878
|
+
onItemClick ? /* @__PURE__ */ jsx78(
|
|
4825
4879
|
"button",
|
|
4826
4880
|
{
|
|
4827
4881
|
type: "button",
|
|
@@ -4829,12 +4883,12 @@ var NotificationToast = React63.forwardRef(
|
|
|
4829
4883
|
className: "mt-1 block text-left text-sm font-semibold leading-snug text-text-primary underline-offset-2 hover:underline",
|
|
4830
4884
|
children: item.title
|
|
4831
4885
|
}
|
|
4832
|
-
) : /* @__PURE__ */
|
|
4833
|
-
item.body && /* @__PURE__ */
|
|
4834
|
-
note && /* @__PURE__ */
|
|
4835
|
-
actions.length > 0 && /* @__PURE__ */
|
|
4886
|
+
) : /* @__PURE__ */ jsx78("p", { className: "mt-1 text-sm font-semibold leading-snug text-text-primary", children: item.title }),
|
|
4887
|
+
item.body && /* @__PURE__ */ jsx78("p", { className: "mt-0.5 text-sm leading-snug text-text-secondary", children: item.body }),
|
|
4888
|
+
note && /* @__PURE__ */ jsx78("p", { className: "mt-1.5 text-xs font-medium text-text-warning", children: note }),
|
|
4889
|
+
actions.length > 0 && /* @__PURE__ */ jsx78("div", { className: "mt-2.5 flex flex-wrap items-center gap-2", children: actions.map((action) => {
|
|
4836
4890
|
const variant = action.variant ?? "link";
|
|
4837
|
-
return /* @__PURE__ */
|
|
4891
|
+
return /* @__PURE__ */ jsx78(
|
|
4838
4892
|
"button",
|
|
4839
4893
|
{
|
|
4840
4894
|
type: "button",
|
|
@@ -4853,15 +4907,15 @@ var NotificationToast = React63.forwardRef(
|
|
|
4853
4907
|
NotificationToast.displayName = "NotificationToast";
|
|
4854
4908
|
|
|
4855
4909
|
// src/components/notification-toaster.tsx
|
|
4856
|
-
import * as
|
|
4857
|
-
import { jsx as
|
|
4910
|
+
import * as React65 from "react";
|
|
4911
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
4858
4912
|
var positions = {
|
|
4859
4913
|
"bottom-right": "bottom-6 right-6 flex-col",
|
|
4860
4914
|
"bottom-left": "bottom-6 left-6 flex-col",
|
|
4861
4915
|
"top-right": "top-6 right-6 flex-col-reverse",
|
|
4862
4916
|
"top-left": "top-6 left-6 flex-col-reverse"
|
|
4863
4917
|
};
|
|
4864
|
-
var NotificationToaster =
|
|
4918
|
+
var NotificationToaster = React65.forwardRef(
|
|
4865
4919
|
({
|
|
4866
4920
|
items,
|
|
4867
4921
|
dwell,
|
|
@@ -4875,15 +4929,15 @@ var NotificationToaster = React64.forwardRef(
|
|
|
4875
4929
|
className
|
|
4876
4930
|
}, ref) => {
|
|
4877
4931
|
const shown = items.slice(0, max);
|
|
4878
|
-
const [paused, setPaused] =
|
|
4879
|
-
const onDismissRef =
|
|
4932
|
+
const [paused, setPaused] = React65.useState(false);
|
|
4933
|
+
const onDismissRef = React65.useRef(onDismiss);
|
|
4880
4934
|
onDismissRef.current = onDismiss;
|
|
4881
4935
|
const fyiDwell = dwell?.fyi;
|
|
4882
4936
|
const importantDwell = dwell?.important;
|
|
4883
4937
|
const criticalDwell = dwell?.critical;
|
|
4884
|
-
const remaining =
|
|
4938
|
+
const remaining = React65.useRef(/* @__PURE__ */ new Map());
|
|
4885
4939
|
const liveIds = shown.map((item) => `${item.id}:${item.severity}`).join(" ");
|
|
4886
|
-
|
|
4940
|
+
React65.useEffect(() => {
|
|
4887
4941
|
const owedById = remaining.current;
|
|
4888
4942
|
const dwellSeconds = {
|
|
4889
4943
|
fyi: fyiDwell ?? TOAST_DWELL.fyi,
|
|
@@ -4924,7 +4978,7 @@ var NotificationToaster = React64.forwardRef(
|
|
|
4924
4978
|
};
|
|
4925
4979
|
}, [liveIds, paused, fyiDwell, importantDwell, criticalDwell]);
|
|
4926
4980
|
if (shown.length === 0) return null;
|
|
4927
|
-
return /* @__PURE__ */
|
|
4981
|
+
return /* @__PURE__ */ jsx79(
|
|
4928
4982
|
"div",
|
|
4929
4983
|
{
|
|
4930
4984
|
ref,
|
|
@@ -4937,7 +4991,7 @@ var NotificationToaster = React64.forwardRef(
|
|
|
4937
4991
|
positions[position],
|
|
4938
4992
|
className
|
|
4939
4993
|
),
|
|
4940
|
-
children: shown.map((item, i) => /* @__PURE__ */
|
|
4994
|
+
children: shown.map((item, i) => /* @__PURE__ */ jsx79("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx79(
|
|
4941
4995
|
NotificationToast,
|
|
4942
4996
|
{
|
|
4943
4997
|
item,
|
|
@@ -5208,14 +5262,14 @@ var COUNTRY_OPTIONS = [
|
|
|
5208
5262
|
];
|
|
5209
5263
|
|
|
5210
5264
|
// src/components/beta-gate-screen.tsx
|
|
5211
|
-
import * as
|
|
5265
|
+
import * as React66 from "react";
|
|
5212
5266
|
|
|
5213
5267
|
// src/components/auth-divider.tsx
|
|
5214
|
-
import { jsx as
|
|
5268
|
+
import { jsx as jsx80, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5215
5269
|
function AuthDivider({ label }) {
|
|
5216
5270
|
return /* @__PURE__ */ jsxs45("div", { className: "relative my-5", children: [
|
|
5217
|
-
/* @__PURE__ */
|
|
5218
|
-
/* @__PURE__ */
|
|
5271
|
+
/* @__PURE__ */ jsx80("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx80("div", { className: "w-full border-t border-border-subtle" }) }),
|
|
5272
|
+
/* @__PURE__ */ jsx80("div", { className: "relative flex justify-center text-xs", children: /* @__PURE__ */ jsx80("span", { className: "bg-bg-surface px-2 text-text-tertiary", children: label }) })
|
|
5219
5273
|
] });
|
|
5220
5274
|
}
|
|
5221
5275
|
|
|
@@ -5226,14 +5280,14 @@ var AUTH_QUIET_BUTTON = "flex h-[46px] w-full items-center justify-center gap-[1
|
|
|
5226
5280
|
var AUTH_BUTTON_SHADOW = "var(--auth-btn-shadow)";
|
|
5227
5281
|
|
|
5228
5282
|
// src/components/onboarding-screen-shell.tsx
|
|
5229
|
-
import { jsx as
|
|
5283
|
+
import { jsx as jsx81, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5230
5284
|
var CARD_WIDTH = {
|
|
5231
5285
|
md: "max-w-[440px]",
|
|
5232
5286
|
lg: "max-w-[560px]"
|
|
5233
5287
|
};
|
|
5234
5288
|
function OnboardingScreenShell({
|
|
5235
5289
|
logo,
|
|
5236
|
-
themeToggle = /* @__PURE__ */
|
|
5290
|
+
themeToggle = /* @__PURE__ */ jsx81(ThemeToggle, {}),
|
|
5237
5291
|
title,
|
|
5238
5292
|
description,
|
|
5239
5293
|
footer,
|
|
@@ -5252,7 +5306,7 @@ function OnboardingScreenShell({
|
|
|
5252
5306
|
style: { background: AUTH_GLOW_BG },
|
|
5253
5307
|
...props,
|
|
5254
5308
|
children: [
|
|
5255
|
-
themeToggle && /* @__PURE__ */
|
|
5309
|
+
themeToggle && /* @__PURE__ */ jsx81("div", { className: "absolute right-6 top-6", children: themeToggle }),
|
|
5256
5310
|
/* @__PURE__ */ jsxs46(
|
|
5257
5311
|
"div",
|
|
5258
5312
|
{
|
|
@@ -5265,8 +5319,8 @@ function OnboardingScreenShell({
|
|
|
5265
5319
|
boxShadow: "var(--auth-card-shadow)"
|
|
5266
5320
|
},
|
|
5267
5321
|
children: [
|
|
5268
|
-
logo && /* @__PURE__ */
|
|
5269
|
-
title != null && /* @__PURE__ */
|
|
5322
|
+
logo && /* @__PURE__ */ jsx81("div", { className: "mb-[22px] flex items-center justify-center text-[24px] font-bold leading-none tracking-[-0.02em] text-text-primary", children: logo }),
|
|
5323
|
+
title != null && /* @__PURE__ */ jsx81(
|
|
5270
5324
|
"h1",
|
|
5271
5325
|
{
|
|
5272
5326
|
className: cn(
|
|
@@ -5277,9 +5331,9 @@ function OnboardingScreenShell({
|
|
|
5277
5331
|
children: title
|
|
5278
5332
|
}
|
|
5279
5333
|
),
|
|
5280
|
-
description && /* @__PURE__ */
|
|
5281
|
-
/* @__PURE__ */
|
|
5282
|
-
footer != null && /* @__PURE__ */
|
|
5334
|
+
description && /* @__PURE__ */ jsx81("p", { className: "mx-auto mb-[24px] max-w-[320px] text-[13.5px] leading-[1.5] text-text-secondary", children: description }),
|
|
5335
|
+
/* @__PURE__ */ jsx81("div", { className: "text-left", children }),
|
|
5336
|
+
footer != null && /* @__PURE__ */ jsx81("div", { className: "mt-[24px] text-[11px] tracking-[0.005em] text-text-tertiary", children: footer })
|
|
5283
5337
|
]
|
|
5284
5338
|
}
|
|
5285
5339
|
)
|
|
@@ -5289,7 +5343,7 @@ function OnboardingScreenShell({
|
|
|
5289
5343
|
}
|
|
5290
5344
|
|
|
5291
5345
|
// src/components/beta-gate-screen.tsx
|
|
5292
|
-
import { Fragment as Fragment9, jsx as
|
|
5346
|
+
import { Fragment as Fragment9, jsx as jsx82, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5293
5347
|
var DEFAULT_WAITLIST_HREF = "https://lessly.com/#waitlist";
|
|
5294
5348
|
var LINK = "font-medium text-text-link hover:text-text-link-hover";
|
|
5295
5349
|
function BetaGateScreen({
|
|
@@ -5311,11 +5365,11 @@ function BetaGateScreen({
|
|
|
5311
5365
|
footer,
|
|
5312
5366
|
...props
|
|
5313
5367
|
}) {
|
|
5314
|
-
const [code, setCode] =
|
|
5315
|
-
const submittingRef =
|
|
5368
|
+
const [code, setCode] = React66.useState(defaultCode);
|
|
5369
|
+
const submittingRef = React66.useRef(false);
|
|
5316
5370
|
const trimmed = code.trim();
|
|
5317
5371
|
const canSubmit = trimmed !== "" && !submitting;
|
|
5318
|
-
|
|
5372
|
+
React66.useEffect(() => {
|
|
5319
5373
|
submittingRef.current = false;
|
|
5320
5374
|
}, [code, submitting, error]);
|
|
5321
5375
|
const handleSubmit = (event) => {
|
|
@@ -5327,7 +5381,7 @@ function BetaGateScreen({
|
|
|
5327
5381
|
const defaultDescription = /* @__PURE__ */ jsxs47(Fragment9, { children: [
|
|
5328
5382
|
"A beta access code is required to join. or",
|
|
5329
5383
|
" ",
|
|
5330
|
-
/* @__PURE__ */
|
|
5384
|
+
/* @__PURE__ */ jsx82("a", { href: waitlistHref, className: LINK, children: "join the waitlist" }),
|
|
5331
5385
|
" ",
|
|
5332
5386
|
"to request one."
|
|
5333
5387
|
] });
|
|
@@ -5342,14 +5396,14 @@ function BetaGateScreen({
|
|
|
5342
5396
|
...props,
|
|
5343
5397
|
children: [
|
|
5344
5398
|
socialAuth && /* @__PURE__ */ jsxs47(Fragment9, { children: [
|
|
5345
|
-
/* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5399
|
+
/* @__PURE__ */ jsx82("div", { "data-testid": "beta-gate-social-auth", children: socialAuth }),
|
|
5400
|
+
/* @__PURE__ */ jsx82(AuthDivider, { label: "or" })
|
|
5347
5401
|
] }),
|
|
5348
|
-
error && /* @__PURE__ */
|
|
5402
|
+
error && /* @__PURE__ */ jsx82(InlineError, { "data-testid": "beta-gate-error", className: "mb-4 text-center", children: error }),
|
|
5349
5403
|
/* @__PURE__ */ jsxs47("form", { onSubmit: handleSubmit, className: "space-y-4", noValidate: true, children: [
|
|
5350
5404
|
/* @__PURE__ */ jsxs47("div", { className: "space-y-1.5", children: [
|
|
5351
|
-
/* @__PURE__ */
|
|
5352
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ jsx82(Label2, { htmlFor: "beta-code", className: "sr-only", children: "Lessly beta access code" }),
|
|
5406
|
+
/* @__PURE__ */ jsx82(
|
|
5353
5407
|
Input,
|
|
5354
5408
|
{
|
|
5355
5409
|
id: "beta-code",
|
|
@@ -5365,7 +5419,7 @@ function BetaGateScreen({
|
|
|
5365
5419
|
}
|
|
5366
5420
|
)
|
|
5367
5421
|
] }),
|
|
5368
|
-
/* @__PURE__ */
|
|
5422
|
+
/* @__PURE__ */ jsx82("div", { className: "pt-1", children: /* @__PURE__ */ jsx82(
|
|
5369
5423
|
"button",
|
|
5370
5424
|
{
|
|
5371
5425
|
type: "submit",
|
|
@@ -5380,7 +5434,7 @@ function BetaGateScreen({
|
|
|
5380
5434
|
(signInHref || onSignIn) && /* @__PURE__ */ jsxs47("p", { className: "mt-5 text-center text-sm text-text-secondary", children: [
|
|
5381
5435
|
"Already have an account?",
|
|
5382
5436
|
" ",
|
|
5383
|
-
signInHref ? /* @__PURE__ */
|
|
5437
|
+
signInHref ? /* @__PURE__ */ jsx82("a", { "data-testid": "beta-gate-signin", href: signInHref, className: LINK, children: "Sign in" }) : /* @__PURE__ */ jsx82(
|
|
5384
5438
|
"button",
|
|
5385
5439
|
{
|
|
5386
5440
|
type: "button",
|
|
@@ -5397,8 +5451,8 @@ function BetaGateScreen({
|
|
|
5397
5451
|
}
|
|
5398
5452
|
|
|
5399
5453
|
// src/components/signup-screen.tsx
|
|
5400
|
-
import * as
|
|
5401
|
-
import { Fragment as Fragment10, jsx as
|
|
5454
|
+
import * as React67 from "react";
|
|
5455
|
+
import { Fragment as Fragment10, jsx as jsx83, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5402
5456
|
var LINK2 = "font-medium text-text-link hover:text-text-link-hover";
|
|
5403
5457
|
function SignupScreen({
|
|
5404
5458
|
onSubmit,
|
|
@@ -5419,15 +5473,15 @@ function SignupScreen({
|
|
|
5419
5473
|
footer,
|
|
5420
5474
|
...props
|
|
5421
5475
|
}) {
|
|
5422
|
-
const [name, setName] =
|
|
5423
|
-
const [email, setEmail] =
|
|
5424
|
-
const [password, setPassword] =
|
|
5425
|
-
const [passwordError, setPasswordError] =
|
|
5426
|
-
const submittingRef =
|
|
5476
|
+
const [name, setName] = React67.useState(defaultValues?.name ?? "");
|
|
5477
|
+
const [email, setEmail] = React67.useState(defaultValues?.email ?? "");
|
|
5478
|
+
const [password, setPassword] = React67.useState(defaultValues?.password ?? "");
|
|
5479
|
+
const [passwordError, setPasswordError] = React67.useState(null);
|
|
5480
|
+
const submittingRef = React67.useRef(false);
|
|
5427
5481
|
const trimmedName = name.trim();
|
|
5428
5482
|
const trimmedEmail = email.trim();
|
|
5429
5483
|
const canSubmit = trimmedName !== "" && trimmedEmail !== "" && password !== "" && !submitting;
|
|
5430
|
-
|
|
5484
|
+
React67.useEffect(() => {
|
|
5431
5485
|
submittingRef.current = false;
|
|
5432
5486
|
}, [name, email, password, submitting, serverError]);
|
|
5433
5487
|
const handleSubmit = (event) => {
|
|
@@ -5444,13 +5498,13 @@ function SignupScreen({
|
|
|
5444
5498
|
};
|
|
5445
5499
|
const body = children ?? /* @__PURE__ */ jsxs48(Fragment10, { children: [
|
|
5446
5500
|
socialAuth && /* @__PURE__ */ jsxs48(Fragment10, { children: [
|
|
5447
|
-
/* @__PURE__ */
|
|
5448
|
-
/* @__PURE__ */
|
|
5501
|
+
/* @__PURE__ */ jsx83("div", { "data-testid": "signup-social-auth", children: socialAuth }),
|
|
5502
|
+
/* @__PURE__ */ jsx83(AuthDivider, { label: "or continue with email" })
|
|
5449
5503
|
] }),
|
|
5450
5504
|
/* @__PURE__ */ jsxs48("form", { onSubmit: handleSubmit, className: "space-y-4", noValidate: true, children: [
|
|
5451
5505
|
/* @__PURE__ */ jsxs48("div", { className: "space-y-1.5", children: [
|
|
5452
|
-
/* @__PURE__ */
|
|
5453
|
-
/* @__PURE__ */
|
|
5506
|
+
/* @__PURE__ */ jsx83(Label2, { htmlFor: "signup-name", children: "Full name" }),
|
|
5507
|
+
/* @__PURE__ */ jsx83(
|
|
5454
5508
|
Input,
|
|
5455
5509
|
{
|
|
5456
5510
|
id: "signup-name",
|
|
@@ -5463,8 +5517,8 @@ function SignupScreen({
|
|
|
5463
5517
|
)
|
|
5464
5518
|
] }),
|
|
5465
5519
|
/* @__PURE__ */ jsxs48("div", { className: "space-y-1.5", children: [
|
|
5466
|
-
/* @__PURE__ */
|
|
5467
|
-
/* @__PURE__ */
|
|
5520
|
+
/* @__PURE__ */ jsx83(Label2, { htmlFor: "signup-email", children: "Email" }),
|
|
5521
|
+
/* @__PURE__ */ jsx83(
|
|
5468
5522
|
Input,
|
|
5469
5523
|
{
|
|
5470
5524
|
id: "signup-email",
|
|
@@ -5479,8 +5533,8 @@ function SignupScreen({
|
|
|
5479
5533
|
)
|
|
5480
5534
|
] }),
|
|
5481
5535
|
/* @__PURE__ */ jsxs48("div", { className: "space-y-1.5", children: [
|
|
5482
|
-
/* @__PURE__ */
|
|
5483
|
-
/* @__PURE__ */
|
|
5536
|
+
/* @__PURE__ */ jsx83(Label2, { htmlFor: "signup-password", children: "Password" }),
|
|
5537
|
+
/* @__PURE__ */ jsx83(
|
|
5484
5538
|
Input,
|
|
5485
5539
|
{
|
|
5486
5540
|
id: "signup-password",
|
|
@@ -5497,12 +5551,12 @@ function SignupScreen({
|
|
|
5497
5551
|
}
|
|
5498
5552
|
)
|
|
5499
5553
|
] }),
|
|
5500
|
-
passwordError && /* @__PURE__ */
|
|
5554
|
+
passwordError && /* @__PURE__ */ jsx83(InlineError, { "data-testid": "signup-password-error", children: passwordError }),
|
|
5501
5555
|
(serverError || violations && violations.length > 0) && /* @__PURE__ */ jsxs48(InlineError, { "data-testid": "signup-error", children: [
|
|
5502
5556
|
serverError,
|
|
5503
|
-
violations && violations.length > 0 && /* @__PURE__ */
|
|
5557
|
+
violations && violations.length > 0 && /* @__PURE__ */ jsx83("ul", { "data-testid": "signup-violations", className: "mt-1 list-disc pl-4", children: violations.map((violation) => /* @__PURE__ */ jsx83("li", { children: violation }, violation)) })
|
|
5504
5558
|
] }),
|
|
5505
|
-
/* @__PURE__ */
|
|
5559
|
+
/* @__PURE__ */ jsx83("div", { className: "pt-1", children: /* @__PURE__ */ jsx83(
|
|
5506
5560
|
"button",
|
|
5507
5561
|
{
|
|
5508
5562
|
type: "submit",
|
|
@@ -5514,7 +5568,7 @@ function SignupScreen({
|
|
|
5514
5568
|
}
|
|
5515
5569
|
) })
|
|
5516
5570
|
] }),
|
|
5517
|
-
onEditCode && /* @__PURE__ */
|
|
5571
|
+
onEditCode && /* @__PURE__ */ jsx83("p", { className: "mt-4 text-center text-sm text-text-secondary", children: /* @__PURE__ */ jsx83(
|
|
5518
5572
|
"button",
|
|
5519
5573
|
{
|
|
5520
5574
|
type: "button",
|
|
@@ -5539,7 +5593,7 @@ function SignupScreen({
|
|
|
5539
5593
|
(signInHref || onSignIn) && /* @__PURE__ */ jsxs48("p", { className: "mt-5 text-center text-sm text-text-secondary", children: [
|
|
5540
5594
|
"Already have an account?",
|
|
5541
5595
|
" ",
|
|
5542
|
-
signInHref ? /* @__PURE__ */
|
|
5596
|
+
signInHref ? /* @__PURE__ */ jsx83("a", { "data-testid": "signup-signin", href: signInHref, className: LINK2, children: "Sign in" }) : /* @__PURE__ */ jsx83("button", { type: "button", "data-testid": "signup-signin", onClick: onSignIn, className: LINK2, children: "Sign in" })
|
|
5543
5597
|
] })
|
|
5544
5598
|
]
|
|
5545
5599
|
}
|
|
@@ -5553,8 +5607,8 @@ function validatePassword(password) {
|
|
|
5553
5607
|
}
|
|
5554
5608
|
|
|
5555
5609
|
// src/components/organization-onboarding-form.tsx
|
|
5556
|
-
import * as
|
|
5557
|
-
import { jsx as
|
|
5610
|
+
import * as React68 from "react";
|
|
5611
|
+
import { jsx as jsx84, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5558
5612
|
var CONTROLLER_SHARE_PCT = 50;
|
|
5559
5613
|
var MAX_BENEFICIAL_OWNERS = 50;
|
|
5560
5614
|
var OWNERSHIP_CONFIRMATION_MESSAGE = "Please confirm the ownership details by ticking the box";
|
|
@@ -5589,22 +5643,22 @@ function OrganizationOnboardingForm({
|
|
|
5589
5643
|
onCancel,
|
|
5590
5644
|
className
|
|
5591
5645
|
}) {
|
|
5592
|
-
const [name, setName] =
|
|
5593
|
-
const [legalName, setLegalName] =
|
|
5594
|
-
const [ownerName, setOwnerName] =
|
|
5595
|
-
const [countryOfIncorporation, setCountryOfIncorporation] =
|
|
5646
|
+
const [name, setName] = React68.useState(defaultValues?.name ?? "");
|
|
5647
|
+
const [legalName, setLegalName] = React68.useState(defaultValues?.legal_name ?? "");
|
|
5648
|
+
const [ownerName, setOwnerName] = React68.useState(defaultValues?.owner_name ?? "");
|
|
5649
|
+
const [countryOfIncorporation, setCountryOfIncorporation] = React68.useState(
|
|
5596
5650
|
defaultValues?.country_of_incorporation ?? ""
|
|
5597
5651
|
);
|
|
5598
|
-
const [residencyCountry, setResidencyCountry] =
|
|
5652
|
+
const [residencyCountry, setResidencyCountry] = React68.useState(
|
|
5599
5653
|
defaultValues?.residency_country ?? ""
|
|
5600
5654
|
);
|
|
5601
|
-
const [owners, setOwners] =
|
|
5655
|
+
const [owners, setOwners] = React68.useState(
|
|
5602
5656
|
() => initialRows(defaultValues?.beneficial_owners)
|
|
5603
5657
|
);
|
|
5604
|
-
const [ownershipConfirmed, setOwnershipConfirmed] =
|
|
5605
|
-
const [confirmationAttempted, setConfirmationAttempted] =
|
|
5606
|
-
const nextKeyRef =
|
|
5607
|
-
const submittingRef =
|
|
5658
|
+
const [ownershipConfirmed, setOwnershipConfirmed] = React68.useState(false);
|
|
5659
|
+
const [confirmationAttempted, setConfirmationAttempted] = React68.useState(false);
|
|
5660
|
+
const nextKeyRef = React68.useRef(owners.length);
|
|
5661
|
+
const submittingRef = React68.useRef(false);
|
|
5608
5662
|
const trimmed = name.trim();
|
|
5609
5663
|
const filledOwners = owners.filter((row) => !isRowBlank(row));
|
|
5610
5664
|
const ownerShares = filledOwners.map((row) => parseShare(row.share));
|
|
@@ -5658,7 +5712,7 @@ function OrganizationOnboardingForm({
|
|
|
5658
5712
|
...needsOwnershipConfirmation ? { ownership_confirmed: ownershipConfirmed } : {}
|
|
5659
5713
|
});
|
|
5660
5714
|
};
|
|
5661
|
-
|
|
5715
|
+
React68.useEffect(() => {
|
|
5662
5716
|
submittingRef.current = false;
|
|
5663
5717
|
}, [
|
|
5664
5718
|
name,
|
|
@@ -5674,9 +5728,9 @@ function OrganizationOnboardingForm({
|
|
|
5674
5728
|
const countryField = (params) => /* @__PURE__ */ jsxs49("div", { className: "space-y-1.5", children: [
|
|
5675
5729
|
/* @__PURE__ */ jsxs49(Label2, { htmlFor: params.id, children: [
|
|
5676
5730
|
params.label,
|
|
5677
|
-
params.required && /* @__PURE__ */
|
|
5731
|
+
params.required && /* @__PURE__ */ jsx84("span", { className: "text-text-danger", children: " *" })
|
|
5678
5732
|
] }),
|
|
5679
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx84(
|
|
5680
5734
|
Select,
|
|
5681
5735
|
{
|
|
5682
5736
|
id: params.id,
|
|
@@ -5691,8 +5745,8 @@ function OrganizationOnboardingForm({
|
|
|
5691
5745
|
] });
|
|
5692
5746
|
return /* @__PURE__ */ jsxs49("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: [
|
|
5693
5747
|
/* @__PURE__ */ jsxs49("div", { className: "space-y-1.5", children: [
|
|
5694
|
-
/* @__PURE__ */
|
|
5695
|
-
/* @__PURE__ */
|
|
5748
|
+
/* @__PURE__ */ jsx84(Label2, { htmlFor: "create-org-name", children: "Organization name" }),
|
|
5749
|
+
/* @__PURE__ */ jsx84(
|
|
5696
5750
|
Input,
|
|
5697
5751
|
{
|
|
5698
5752
|
id: "create-org-name",
|
|
@@ -5704,8 +5758,8 @@ function OrganizationOnboardingForm({
|
|
|
5704
5758
|
)
|
|
5705
5759
|
] }),
|
|
5706
5760
|
/* @__PURE__ */ jsxs49("div", { className: "space-y-1.5", children: [
|
|
5707
|
-
/* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5761
|
+
/* @__PURE__ */ jsx84(Label2, { htmlFor: "create-org-legal-name", children: "Legal name" }),
|
|
5762
|
+
/* @__PURE__ */ jsx84(
|
|
5709
5763
|
Input,
|
|
5710
5764
|
{
|
|
5711
5765
|
id: "create-org-legal-name",
|
|
@@ -5717,8 +5771,8 @@ function OrganizationOnboardingForm({
|
|
|
5717
5771
|
)
|
|
5718
5772
|
] }),
|
|
5719
5773
|
/* @__PURE__ */ jsxs49("div", { className: "space-y-1.5", children: [
|
|
5720
|
-
/* @__PURE__ */
|
|
5721
|
-
/* @__PURE__ */
|
|
5774
|
+
/* @__PURE__ */ jsx84(Label2, { htmlFor: "create-org-owner-name", children: "Owner name" }),
|
|
5775
|
+
/* @__PURE__ */ jsx84(
|
|
5722
5776
|
Input,
|
|
5723
5777
|
{
|
|
5724
5778
|
id: "create-org-owner-name",
|
|
@@ -5745,8 +5799,8 @@ function OrganizationOnboardingForm({
|
|
|
5745
5799
|
}),
|
|
5746
5800
|
/* @__PURE__ */ jsxs49("div", { className: "space-y-2", children: [
|
|
5747
5801
|
/* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-between", children: [
|
|
5748
|
-
/* @__PURE__ */
|
|
5749
|
-
/* @__PURE__ */
|
|
5802
|
+
/* @__PURE__ */ jsx84(Label2, { children: "Beneficial owners" }),
|
|
5803
|
+
/* @__PURE__ */ jsx84(
|
|
5750
5804
|
Button,
|
|
5751
5805
|
{
|
|
5752
5806
|
type: "button",
|
|
@@ -5759,7 +5813,7 @@ function OrganizationOnboardingForm({
|
|
|
5759
5813
|
}
|
|
5760
5814
|
)
|
|
5761
5815
|
] }),
|
|
5762
|
-
owners.length === 0 && /* @__PURE__ */
|
|
5816
|
+
owners.length === 0 && /* @__PURE__ */ jsx84("p", { className: "text-xs text-text-tertiary", children: "List the natural persons who ultimately own or control the organization." }),
|
|
5763
5817
|
owners.map((row) => /* @__PURE__ */ jsxs49(
|
|
5764
5818
|
"div",
|
|
5765
5819
|
{
|
|
@@ -5767,8 +5821,8 @@ function OrganizationOnboardingForm({
|
|
|
5767
5821
|
className: "flex items-end gap-2",
|
|
5768
5822
|
children: [
|
|
5769
5823
|
/* @__PURE__ */ jsxs49("div", { className: "flex-1 space-y-1", children: [
|
|
5770
|
-
/* @__PURE__ */
|
|
5771
|
-
/* @__PURE__ */
|
|
5824
|
+
/* @__PURE__ */ jsx84(Label2, { htmlFor: `bo-name-${row.key}`, className: "text-xs", children: "Name" }),
|
|
5825
|
+
/* @__PURE__ */ jsx84(
|
|
5772
5826
|
Input,
|
|
5773
5827
|
{
|
|
5774
5828
|
id: `bo-name-${row.key}`,
|
|
@@ -5779,8 +5833,8 @@ function OrganizationOnboardingForm({
|
|
|
5779
5833
|
)
|
|
5780
5834
|
] }),
|
|
5781
5835
|
/* @__PURE__ */ jsxs49("div", { className: "w-40 space-y-1", children: [
|
|
5782
|
-
/* @__PURE__ */
|
|
5783
|
-
/* @__PURE__ */
|
|
5836
|
+
/* @__PURE__ */ jsx84(Label2, { htmlFor: `bo-country-${row.key}`, className: "text-xs", children: "Country" }),
|
|
5837
|
+
/* @__PURE__ */ jsx84(
|
|
5784
5838
|
Select,
|
|
5785
5839
|
{
|
|
5786
5840
|
id: `bo-country-${row.key}`,
|
|
@@ -5794,8 +5848,8 @@ function OrganizationOnboardingForm({
|
|
|
5794
5848
|
)
|
|
5795
5849
|
] }),
|
|
5796
5850
|
/* @__PURE__ */ jsxs49("div", { className: "w-24 space-y-1", children: [
|
|
5797
|
-
/* @__PURE__ */
|
|
5798
|
-
/* @__PURE__ */
|
|
5851
|
+
/* @__PURE__ */ jsx84(Label2, { htmlFor: `bo-share-${row.key}`, className: "text-xs", children: "Share %" }),
|
|
5852
|
+
/* @__PURE__ */ jsx84(
|
|
5799
5853
|
Input,
|
|
5800
5854
|
{
|
|
5801
5855
|
id: `bo-share-${row.key}`,
|
|
@@ -5806,7 +5860,7 @@ function OrganizationOnboardingForm({
|
|
|
5806
5860
|
}
|
|
5807
5861
|
)
|
|
5808
5862
|
] }),
|
|
5809
|
-
/* @__PURE__ */
|
|
5863
|
+
/* @__PURE__ */ jsx84(
|
|
5810
5864
|
Button,
|
|
5811
5865
|
{
|
|
5812
5866
|
type: "button",
|
|
@@ -5821,7 +5875,7 @@ function OrganizationOnboardingForm({
|
|
|
5821
5875
|
},
|
|
5822
5876
|
row.key
|
|
5823
5877
|
)),
|
|
5824
|
-
!ownersValid && /* @__PURE__ */
|
|
5878
|
+
!ownersValid && /* @__PURE__ */ jsx84("p", { "data-testid": "beneficial-owners-error", className: "text-xs text-text-danger", children: "Every owner needs a name, a country and a share between 0 and 100." }),
|
|
5825
5879
|
shareSum > 100 && /* @__PURE__ */ jsxs49("p", { "data-testid": "beneficial-owners-sum-warning", className: "text-xs text-text-warning", children: [
|
|
5826
5880
|
"The listed shares add up to ",
|
|
5827
5881
|
shareSum,
|
|
@@ -5830,7 +5884,7 @@ function OrganizationOnboardingForm({
|
|
|
5830
5884
|
] }),
|
|
5831
5885
|
needsOwnershipConfirmation && /* @__PURE__ */ jsxs49("div", { className: "space-y-1", children: [
|
|
5832
5886
|
/* @__PURE__ */ jsxs49("div", { className: "flex items-start gap-2", children: [
|
|
5833
|
-
/* @__PURE__ */
|
|
5887
|
+
/* @__PURE__ */ jsx84(
|
|
5834
5888
|
Checkbox,
|
|
5835
5889
|
{
|
|
5836
5890
|
id: "create-org-ownership-confirmed",
|
|
@@ -5847,12 +5901,12 @@ function OrganizationOnboardingForm({
|
|
|
5847
5901
|
className: "text-xs font-normal leading-snug",
|
|
5848
5902
|
children: [
|
|
5849
5903
|
"I confirm the ownership structure above is complete and correct",
|
|
5850
|
-
/* @__PURE__ */
|
|
5904
|
+
/* @__PURE__ */ jsx84("span", { className: "text-text-danger", children: " *" })
|
|
5851
5905
|
]
|
|
5852
5906
|
}
|
|
5853
5907
|
)
|
|
5854
5908
|
] }),
|
|
5855
|
-
showConfirmationError && /* @__PURE__ */
|
|
5909
|
+
showConfirmationError && /* @__PURE__ */ jsx84(
|
|
5856
5910
|
"p",
|
|
5857
5911
|
{
|
|
5858
5912
|
id: "create-org-ownership-error",
|
|
@@ -5864,10 +5918,10 @@ function OrganizationOnboardingForm({
|
|
|
5864
5918
|
] }),
|
|
5865
5919
|
(serverError || otherViolations.length > 0) && /* @__PURE__ */ jsxs49(InlineError, { children: [
|
|
5866
5920
|
serverError,
|
|
5867
|
-
otherViolations.length > 0 && /* @__PURE__ */
|
|
5921
|
+
otherViolations.length > 0 && /* @__PURE__ */ jsx84("ul", { "data-testid": "create-org-violations", className: "mt-1 list-disc pl-4", children: otherViolations.map((violation) => /* @__PURE__ */ jsx84("li", { children: violation }, violation)) })
|
|
5868
5922
|
] }),
|
|
5869
5923
|
/* @__PURE__ */ jsxs49("div", { className: "space-y-2 pt-1", children: [
|
|
5870
|
-
/* @__PURE__ */
|
|
5924
|
+
/* @__PURE__ */ jsx84(
|
|
5871
5925
|
"button",
|
|
5872
5926
|
{
|
|
5873
5927
|
type: "submit",
|
|
@@ -5878,13 +5932,13 @@ function OrganizationOnboardingForm({
|
|
|
5878
5932
|
children: submitting ? "Creating\u2026" : submitLabel
|
|
5879
5933
|
}
|
|
5880
5934
|
),
|
|
5881
|
-
onCancel && /* @__PURE__ */
|
|
5935
|
+
onCancel && /* @__PURE__ */ jsx84("button", { type: "button", onClick: onCancel, className: AUTH_QUIET_BUTTON, children: "Cancel" })
|
|
5882
5936
|
] })
|
|
5883
5937
|
] });
|
|
5884
5938
|
}
|
|
5885
5939
|
|
|
5886
5940
|
// src/components/organization-create-screen.tsx
|
|
5887
|
-
import { jsx as
|
|
5941
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
5888
5942
|
function OrganizationCreateScreen({
|
|
5889
5943
|
requireSanctionsFields,
|
|
5890
5944
|
onSubmit,
|
|
@@ -5902,7 +5956,7 @@ function OrganizationCreateScreen({
|
|
|
5902
5956
|
footer,
|
|
5903
5957
|
...props
|
|
5904
5958
|
}) {
|
|
5905
|
-
return /* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ jsx85(
|
|
5906
5960
|
OnboardingScreenShell,
|
|
5907
5961
|
{
|
|
5908
5962
|
logo,
|
|
@@ -5912,7 +5966,7 @@ function OrganizationCreateScreen({
|
|
|
5912
5966
|
footer,
|
|
5913
5967
|
width: "lg",
|
|
5914
5968
|
...props,
|
|
5915
|
-
children: /* @__PURE__ */
|
|
5969
|
+
children: /* @__PURE__ */ jsx85(
|
|
5916
5970
|
OrganizationOnboardingForm,
|
|
5917
5971
|
{
|
|
5918
5972
|
requireSanctionsFields,
|
|
@@ -5931,7 +5985,7 @@ function OrganizationCreateScreen({
|
|
|
5931
5985
|
}
|
|
5932
5986
|
|
|
5933
5987
|
// src/components/organization-under-review-screen.tsx
|
|
5934
|
-
import { jsx as
|
|
5988
|
+
import { jsx as jsx86, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5935
5989
|
function OrganizationUnderReviewScreen({
|
|
5936
5990
|
onLogout,
|
|
5937
5991
|
onFeedback,
|
|
@@ -5958,7 +6012,7 @@ function OrganizationUnderReviewScreen({
|
|
|
5958
6012
|
children: [
|
|
5959
6013
|
children,
|
|
5960
6014
|
/* @__PURE__ */ jsxs50("div", { className: "space-y-2 pt-1", children: [
|
|
5961
|
-
/* @__PURE__ */
|
|
6015
|
+
/* @__PURE__ */ jsx86(
|
|
5962
6016
|
"button",
|
|
5963
6017
|
{
|
|
5964
6018
|
type: "button",
|
|
@@ -5969,7 +6023,7 @@ function OrganizationUnderReviewScreen({
|
|
|
5969
6023
|
children: logoutLabel
|
|
5970
6024
|
}
|
|
5971
6025
|
),
|
|
5972
|
-
onFeedback && /* @__PURE__ */
|
|
6026
|
+
onFeedback && /* @__PURE__ */ jsx86(
|
|
5973
6027
|
"button",
|
|
5974
6028
|
{
|
|
5975
6029
|
type: "button",
|
|
@@ -5986,8 +6040,8 @@ function OrganizationUnderReviewScreen({
|
|
|
5986
6040
|
}
|
|
5987
6041
|
|
|
5988
6042
|
// src/components/product-create-screen.tsx
|
|
5989
|
-
import * as
|
|
5990
|
-
import { jsx as
|
|
6043
|
+
import * as React69 from "react";
|
|
6044
|
+
import { jsx as jsx87, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5991
6045
|
var productRow = "flex w-full items-center justify-between rounded-md border border-border-default bg-bg-primary px-3 py-2 text-left text-sm text-text-primary";
|
|
5992
6046
|
function ProductCreateScreen({
|
|
5993
6047
|
// Destructured only to keep it out of `...props`, which is spread onto a <div>.
|
|
@@ -6013,11 +6067,11 @@ function ProductCreateScreen({
|
|
|
6013
6067
|
footer,
|
|
6014
6068
|
...props
|
|
6015
6069
|
}) {
|
|
6016
|
-
const [name, setName] =
|
|
6017
|
-
const submittingRef =
|
|
6070
|
+
const [name, setName] = React69.useState(defaultName);
|
|
6071
|
+
const submittingRef = React69.useRef(false);
|
|
6018
6072
|
const trimmed = name.trim();
|
|
6019
6073
|
const canSubmit = trimmed !== "" && !submitting;
|
|
6020
|
-
|
|
6074
|
+
React69.useEffect(() => {
|
|
6021
6075
|
submittingRef.current = false;
|
|
6022
6076
|
}, [name, submitting, serverError]);
|
|
6023
6077
|
const handleSubmit = (event) => {
|
|
@@ -6029,7 +6083,7 @@ function ProductCreateScreen({
|
|
|
6029
6083
|
const products = existingProducts ?? [];
|
|
6030
6084
|
const orgs = organizations ?? [];
|
|
6031
6085
|
const pickerLayout = orgs.length > 0;
|
|
6032
|
-
const productList = /* @__PURE__ */
|
|
6086
|
+
const productList = /* @__PURE__ */ jsx87("ul", { className: "flex flex-col gap-1", children: products.map((product) => /* @__PURE__ */ jsx87("li", { children: onOpenProduct ? /* @__PURE__ */ jsxs51(
|
|
6033
6087
|
"button",
|
|
6034
6088
|
{
|
|
6035
6089
|
type: "button",
|
|
@@ -6040,13 +6094,13 @@ function ProductCreateScreen({
|
|
|
6040
6094
|
"hover:bg-bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus"
|
|
6041
6095
|
),
|
|
6042
6096
|
children: [
|
|
6043
|
-
/* @__PURE__ */
|
|
6044
|
-
product.slug && /* @__PURE__ */
|
|
6097
|
+
/* @__PURE__ */ jsx87("span", { className: "truncate", children: product.name }),
|
|
6098
|
+
product.slug && /* @__PURE__ */ jsx87("span", { className: "ml-2 truncate text-text-tertiary", children: product.slug })
|
|
6045
6099
|
]
|
|
6046
6100
|
}
|
|
6047
6101
|
) : /* @__PURE__ */ jsxs51("div", { className: productRow, children: [
|
|
6048
|
-
/* @__PURE__ */
|
|
6049
|
-
product.slug && /* @__PURE__ */
|
|
6102
|
+
/* @__PURE__ */ jsx87("span", { className: "truncate", children: product.name }),
|
|
6103
|
+
product.slug && /* @__PURE__ */ jsx87("span", { className: "ml-2 truncate text-text-tertiary", children: product.slug })
|
|
6050
6104
|
] }) }, product.id)) });
|
|
6051
6105
|
return /* @__PURE__ */ jsxs51(
|
|
6052
6106
|
OnboardingScreenShell,
|
|
@@ -6060,8 +6114,8 @@ function ProductCreateScreen({
|
|
|
6060
6114
|
children: [
|
|
6061
6115
|
pickerLayout && /* @__PURE__ */ jsxs51("div", { className: "mb-4 space-y-4", children: [
|
|
6062
6116
|
/* @__PURE__ */ jsxs51("div", { className: "space-y-1.5", children: [
|
|
6063
|
-
/* @__PURE__ */
|
|
6064
|
-
/* @__PURE__ */
|
|
6117
|
+
/* @__PURE__ */ jsx87(Label2, { htmlFor: "create-product-org-select", children: "Organization" }),
|
|
6118
|
+
/* @__PURE__ */ jsx87(
|
|
6065
6119
|
Select,
|
|
6066
6120
|
{
|
|
6067
6121
|
id: "create-product-org-select",
|
|
@@ -6076,14 +6130,14 @@ function ProductCreateScreen({
|
|
|
6076
6130
|
)
|
|
6077
6131
|
] }),
|
|
6078
6132
|
/* @__PURE__ */ jsxs51("div", { "data-testid": "existing-products", className: "space-y-1.5", children: [
|
|
6079
|
-
/* @__PURE__ */
|
|
6080
|
-
productsLoading ? /* @__PURE__ */
|
|
6133
|
+
/* @__PURE__ */ jsx87(Label2, { children: existingProductsLabel }),
|
|
6134
|
+
productsLoading ? /* @__PURE__ */ jsx87("p", { className: "text-sm text-text-tertiary", children: "Loading products\u2026" }) : products.length === 0 ? /* @__PURE__ */ jsx87("p", { className: "text-sm text-text-tertiary", children: "No products yet." }) : productList
|
|
6081
6135
|
] })
|
|
6082
6136
|
] }),
|
|
6083
6137
|
/* @__PURE__ */ jsxs51("form", { onSubmit: handleSubmit, className: "space-y-4", noValidate: true, children: [
|
|
6084
6138
|
/* @__PURE__ */ jsxs51("div", { className: "space-y-1.5", children: [
|
|
6085
|
-
/* @__PURE__ */
|
|
6086
|
-
/* @__PURE__ */
|
|
6139
|
+
/* @__PURE__ */ jsx87(Label2, { htmlFor: "create-product-name", children: "Product name" }),
|
|
6140
|
+
/* @__PURE__ */ jsx87(
|
|
6087
6141
|
Input,
|
|
6088
6142
|
{
|
|
6089
6143
|
id: "create-product-name",
|
|
@@ -6094,9 +6148,9 @@ function ProductCreateScreen({
|
|
|
6094
6148
|
}
|
|
6095
6149
|
)
|
|
6096
6150
|
] }),
|
|
6097
|
-
serverError && /* @__PURE__ */
|
|
6151
|
+
serverError && /* @__PURE__ */ jsx87(InlineError, { children: serverError }),
|
|
6098
6152
|
/* @__PURE__ */ jsxs51("div", { className: "space-y-2 pt-1", children: [
|
|
6099
|
-
/* @__PURE__ */
|
|
6153
|
+
/* @__PURE__ */ jsx87(
|
|
6100
6154
|
"button",
|
|
6101
6155
|
{
|
|
6102
6156
|
type: "submit",
|
|
@@ -6107,7 +6161,7 @@ function ProductCreateScreen({
|
|
|
6107
6161
|
children: submitting ? "Creating\u2026" : submitLabel
|
|
6108
6162
|
}
|
|
6109
6163
|
),
|
|
6110
|
-
onCancel && /* @__PURE__ */
|
|
6164
|
+
onCancel && /* @__PURE__ */ jsx87("button", { type: "button", onClick: onCancel, className: AUTH_QUIET_BUTTON, children: "Cancel" })
|
|
6111
6165
|
] })
|
|
6112
6166
|
] }),
|
|
6113
6167
|
!pickerLayout && products.length > 0 && /* @__PURE__ */ jsxs51(
|
|
@@ -6116,7 +6170,7 @@ function ProductCreateScreen({
|
|
|
6116
6170
|
"data-testid": "existing-products",
|
|
6117
6171
|
className: "mt-6 space-y-2 border-t border-border-default pt-5",
|
|
6118
6172
|
children: [
|
|
6119
|
-
/* @__PURE__ */
|
|
6173
|
+
/* @__PURE__ */ jsx87(Label2, { children: existingProductsLabel }),
|
|
6120
6174
|
productList
|
|
6121
6175
|
]
|
|
6122
6176
|
}
|
|
@@ -6264,6 +6318,9 @@ export {
|
|
|
6264
6318
|
HoverCardTrigger,
|
|
6265
6319
|
InlineError,
|
|
6266
6320
|
Input,
|
|
6321
|
+
InputAddon,
|
|
6322
|
+
InputGroup,
|
|
6323
|
+
InputGroupInput,
|
|
6267
6324
|
InputOTP,
|
|
6268
6325
|
InputOTPGroup,
|
|
6269
6326
|
InputOTPSeparator,
|