@pactor-app/ui 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-7YOIAVV6.js → chunk-M4PHRT2N.js} +96 -38
- package/dist/{chunk-7KC6DMKH.js → chunk-VRAVO5LE.js} +11 -4
- package/dist/{chunk-XUIXZJDQ.js → chunk-VT5XP4U4.js} +28 -9
- package/dist/{chunk-F42SGQNW.js → chunk-XUHJ5YSG.js} +2 -2
- package/dist/components/index.cjs +460 -385
- package/dist/components/index.d.cts +21 -6
- package/dist/components/index.d.ts +21 -6
- package/dist/components/index.js +3 -3
- package/dist/index.cjs +482 -400
- package/dist/index.js +4 -4
- package/dist/interaction/index.cjs +12 -5
- package/dist/interaction/index.d.cts +3 -1
- package/dist/interaction/index.d.ts +3 -1
- package/dist/interaction/index.js +2 -2
- package/dist/ui/index.cjs +30 -11
- package/dist/ui/index.d.cts +7 -2
- package/dist/ui/index.d.ts +7 -2
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +50 -7
package/dist/index.cjs
CHANGED
|
@@ -41,7 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
Breadcrumb: () => Breadcrumb2,
|
|
42
42
|
Button: () => Button2,
|
|
43
43
|
ButtonGroup: () => ButtonGroup2,
|
|
44
|
-
Calendar: () =>
|
|
44
|
+
Calendar: () => Calendar3,
|
|
45
45
|
Card: () => Card2,
|
|
46
46
|
Carousel: () => Carousel2,
|
|
47
47
|
Chart: () => Chart,
|
|
@@ -310,18 +310,186 @@ function AlertDescription({
|
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
// src/components/components/
|
|
313
|
+
// src/components/components/Icon/index.tsx
|
|
314
|
+
var import_lucide_react2 = require("lucide-react");
|
|
314
315
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
316
|
+
var ICONS = {
|
|
317
|
+
"arrow-left": import_lucide_react2.ArrowLeft,
|
|
318
|
+
"arrow-right": import_lucide_react2.ArrowRight,
|
|
319
|
+
"arrow-up": import_lucide_react2.ArrowUp,
|
|
320
|
+
"arrow-down": import_lucide_react2.ArrowDown,
|
|
321
|
+
"chevron-left": import_lucide_react2.ChevronLeft,
|
|
322
|
+
"chevron-right": import_lucide_react2.ChevronRight,
|
|
323
|
+
"chevron-up": import_lucide_react2.ChevronUp,
|
|
324
|
+
"chevron-down": import_lucide_react2.ChevronDown,
|
|
325
|
+
check: import_lucide_react2.Check,
|
|
326
|
+
x: import_lucide_react2.X,
|
|
327
|
+
plus: import_lucide_react2.Plus,
|
|
328
|
+
minus: import_lucide_react2.Minus,
|
|
329
|
+
search: import_lucide_react2.Search,
|
|
330
|
+
settings: import_lucide_react2.Settings,
|
|
331
|
+
user: import_lucide_react2.User,
|
|
332
|
+
users: import_lucide_react2.Users,
|
|
333
|
+
home: import_lucide_react2.House,
|
|
334
|
+
menu: import_lucide_react2.Menu,
|
|
335
|
+
bell: import_lucide_react2.Bell,
|
|
336
|
+
calendar: import_lucide_react2.Calendar,
|
|
337
|
+
clock: import_lucide_react2.Clock,
|
|
338
|
+
download: import_lucide_react2.Download,
|
|
339
|
+
upload: import_lucide_react2.Upload,
|
|
340
|
+
pencil: import_lucide_react2.Pencil,
|
|
341
|
+
edit: import_lucide_react2.SquarePen,
|
|
342
|
+
trash: import_lucide_react2.Trash2,
|
|
343
|
+
eye: import_lucide_react2.Eye,
|
|
344
|
+
info: import_lucide_react2.Info,
|
|
345
|
+
warning: import_lucide_react2.TriangleAlert,
|
|
346
|
+
error: import_lucide_react2.CircleAlert,
|
|
347
|
+
"check-circle": import_lucide_react2.CircleCheck,
|
|
348
|
+
"x-circle": import_lucide_react2.CircleX,
|
|
349
|
+
"help-circle": import_lucide_react2.CircleQuestionMark,
|
|
350
|
+
loading: import_lucide_react2.LoaderCircle,
|
|
351
|
+
spinner: import_lucide_react2.LoaderCircle,
|
|
352
|
+
star: import_lucide_react2.Star,
|
|
353
|
+
heart: import_lucide_react2.Heart,
|
|
354
|
+
bookmark: import_lucide_react2.Bookmark,
|
|
355
|
+
share: import_lucide_react2.Share2,
|
|
356
|
+
copy: import_lucide_react2.Copy,
|
|
357
|
+
"external-link": import_lucide_react2.ExternalLink,
|
|
358
|
+
link: import_lucide_react2.Link,
|
|
359
|
+
mail: import_lucide_react2.Mail,
|
|
360
|
+
phone: import_lucide_react2.Phone,
|
|
361
|
+
lock: import_lucide_react2.Lock,
|
|
362
|
+
unlock: import_lucide_react2.LockOpen,
|
|
363
|
+
"log-in": import_lucide_react2.LogIn,
|
|
364
|
+
"log-out": import_lucide_react2.LogOut,
|
|
365
|
+
sun: import_lucide_react2.Sun,
|
|
366
|
+
moon: import_lucide_react2.Moon,
|
|
367
|
+
globe: import_lucide_react2.Globe,
|
|
368
|
+
filter: import_lucide_react2.Funnel,
|
|
369
|
+
"list-filter": import_lucide_react2.ListFilter,
|
|
370
|
+
"more-horizontal": import_lucide_react2.Ellipsis,
|
|
371
|
+
"more-vertical": import_lucide_react2.EllipsisVertical,
|
|
372
|
+
refresh: import_lucide_react2.RefreshCcw,
|
|
373
|
+
save: import_lucide_react2.Save,
|
|
374
|
+
file: import_lucide_react2.File,
|
|
375
|
+
folder: import_lucide_react2.Folder,
|
|
376
|
+
image: import_lucide_react2.Image,
|
|
377
|
+
camera: import_lucide_react2.Camera,
|
|
378
|
+
chart: import_lucide_react2.ChartColumn,
|
|
379
|
+
table: import_lucide_react2.Table,
|
|
380
|
+
list: import_lucide_react2.List,
|
|
381
|
+
grid: import_lucide_react2.LayoutGrid,
|
|
382
|
+
tag: import_lucide_react2.Tag,
|
|
383
|
+
"shopping-cart": import_lucide_react2.ShoppingCart,
|
|
384
|
+
"credit-card": import_lucide_react2.CreditCard,
|
|
385
|
+
package: import_lucide_react2.Package,
|
|
386
|
+
"map-pin": import_lucide_react2.MapPin,
|
|
387
|
+
building: import_lucide_react2.Building2,
|
|
388
|
+
briefcase: import_lucide_react2.Briefcase,
|
|
389
|
+
send: import_lucide_react2.Send,
|
|
390
|
+
message: import_lucide_react2.MessageCircle,
|
|
391
|
+
"message-square": import_lucide_react2.MessageSquare,
|
|
392
|
+
paperclip: import_lucide_react2.Paperclip,
|
|
393
|
+
"thumbs-up": import_lucide_react2.ThumbsUp,
|
|
394
|
+
"thumbs-down": import_lucide_react2.ThumbsDown,
|
|
395
|
+
zap: import_lucide_react2.Zap,
|
|
396
|
+
flag: import_lucide_react2.Flag,
|
|
397
|
+
key: import_lucide_react2.Key,
|
|
398
|
+
shield: import_lucide_react2.Shield,
|
|
399
|
+
terminal: import_lucide_react2.Terminal,
|
|
400
|
+
code: import_lucide_react2.Code,
|
|
401
|
+
database: import_lucide_react2.Database,
|
|
402
|
+
cloud: import_lucide_react2.Cloud,
|
|
403
|
+
languages: import_lucide_react2.Languages,
|
|
404
|
+
// @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
|
|
405
|
+
// 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
|
|
406
|
+
"chevrons-up-down": import_lucide_react2.ChevronsUpDown,
|
|
407
|
+
"file-text": import_lucide_react2.FileText,
|
|
408
|
+
"panel-left": import_lucide_react2.PanelLeft,
|
|
409
|
+
"panel-right-open": import_lucide_react2.PanelRightOpen,
|
|
410
|
+
square: import_lucide_react2.Square,
|
|
411
|
+
history: import_lucide_react2.History,
|
|
412
|
+
"rotate-ccw": import_lucide_react2.RotateCcw,
|
|
413
|
+
quote: import_lucide_react2.Quote,
|
|
414
|
+
chat: import_lucide_react2.MessageSquare,
|
|
415
|
+
brain: import_lucide_react2.Brain
|
|
416
|
+
};
|
|
417
|
+
function normalizeIconName(name) {
|
|
418
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
419
|
+
}
|
|
420
|
+
var sizePx = {
|
|
421
|
+
sm: 16,
|
|
422
|
+
default: 20,
|
|
423
|
+
lg: 24
|
|
424
|
+
};
|
|
425
|
+
function Icon({
|
|
426
|
+
name,
|
|
427
|
+
size = "default",
|
|
428
|
+
color,
|
|
429
|
+
strokeWidth,
|
|
430
|
+
className,
|
|
431
|
+
style
|
|
432
|
+
}) {
|
|
433
|
+
const key = name ? normalizeIconName(name) : "";
|
|
434
|
+
const Lucide = ICONS[key];
|
|
435
|
+
const px = typeof size === "number" ? size : sizePx[size];
|
|
436
|
+
if (!Lucide) {
|
|
437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
438
|
+
import_lucide_react2.CircleQuestionMark,
|
|
439
|
+
{
|
|
440
|
+
"data-slot": "icon",
|
|
441
|
+
"data-unknown": name,
|
|
442
|
+
size: px,
|
|
443
|
+
color,
|
|
444
|
+
strokeWidth,
|
|
445
|
+
className: cn("shrink-0 text-muted-foreground", className),
|
|
446
|
+
style,
|
|
447
|
+
"aria-hidden": "true"
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
452
|
+
Lucide,
|
|
453
|
+
{
|
|
454
|
+
"data-slot": "icon",
|
|
455
|
+
size: px,
|
|
456
|
+
color,
|
|
457
|
+
strokeWidth,
|
|
458
|
+
className: cn("shrink-0", className),
|
|
459
|
+
style,
|
|
460
|
+
"aria-hidden": "true"
|
|
461
|
+
}
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// src/components/components/Alert/index.tsx
|
|
466
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
315
467
|
var variantMap = {
|
|
316
468
|
success: "success",
|
|
317
469
|
info: "info",
|
|
318
470
|
warning: "warning",
|
|
319
471
|
error: "destructive"
|
|
320
472
|
};
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
473
|
+
var defaultIconMap = {
|
|
474
|
+
success: "check-circle",
|
|
475
|
+
info: "info",
|
|
476
|
+
warning: "warning",
|
|
477
|
+
error: "x-circle"
|
|
478
|
+
};
|
|
479
|
+
function Alert2({
|
|
480
|
+
message,
|
|
481
|
+
description,
|
|
482
|
+
variant = "info",
|
|
483
|
+
showIcon,
|
|
484
|
+
icon,
|
|
485
|
+
className,
|
|
486
|
+
style
|
|
487
|
+
}) {
|
|
488
|
+
const iconName = icon ?? (showIcon === true ? defaultIconMap[variant] : void 0);
|
|
489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Alert, { variant: variantMap[variant], className, style, children: [
|
|
490
|
+
iconName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: iconName, size: "sm" }) : null,
|
|
491
|
+
message ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AlertTitle, { children: message }) : null,
|
|
492
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AlertDescription, { children: description }) : null
|
|
325
493
|
] });
|
|
326
494
|
}
|
|
327
495
|
|
|
@@ -336,7 +504,7 @@ var import_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
|
336
504
|
var import_button = require("@base-ui/react/button");
|
|
337
505
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
338
506
|
var React = __toESM(require("react"), 1);
|
|
339
|
-
var
|
|
507
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
340
508
|
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
341
509
|
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
342
510
|
{
|
|
@@ -375,7 +543,7 @@ function Button({
|
|
|
375
543
|
...props
|
|
376
544
|
}) {
|
|
377
545
|
if (asChild && React.isValidElement(children)) {
|
|
378
|
-
return /* @__PURE__ */ (0,
|
|
546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
379
547
|
import_button.Button,
|
|
380
548
|
{
|
|
381
549
|
"data-slot": "button",
|
|
@@ -385,7 +553,7 @@ function Button({
|
|
|
385
553
|
}
|
|
386
554
|
);
|
|
387
555
|
}
|
|
388
|
-
return /* @__PURE__ */ (0,
|
|
556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
389
557
|
import_button.Button,
|
|
390
558
|
{
|
|
391
559
|
"data-slot": "button",
|
|
@@ -397,27 +565,27 @@ function Button({
|
|
|
397
565
|
}
|
|
398
566
|
|
|
399
567
|
// src/ui/alert-dialog.tsx
|
|
400
|
-
var
|
|
568
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
401
569
|
function AlertDialog({
|
|
402
570
|
...props
|
|
403
571
|
}) {
|
|
404
|
-
return /* @__PURE__ */ (0,
|
|
572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
405
573
|
}
|
|
406
574
|
function AlertDialogTrigger({
|
|
407
575
|
...props
|
|
408
576
|
}) {
|
|
409
|
-
return /* @__PURE__ */ (0,
|
|
577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
410
578
|
}
|
|
411
579
|
function AlertDialogPortal({
|
|
412
580
|
...props
|
|
413
581
|
}) {
|
|
414
|
-
return /* @__PURE__ */ (0,
|
|
582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
415
583
|
}
|
|
416
584
|
function AlertDialogOverlay({
|
|
417
585
|
className,
|
|
418
586
|
...props
|
|
419
587
|
}) {
|
|
420
|
-
return /* @__PURE__ */ (0,
|
|
588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
421
589
|
import_alert_dialog.AlertDialog.Backdrop,
|
|
422
590
|
{
|
|
423
591
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -433,9 +601,9 @@ function AlertDialogContent({
|
|
|
433
601
|
className,
|
|
434
602
|
...props
|
|
435
603
|
}) {
|
|
436
|
-
return /* @__PURE__ */ (0,
|
|
437
|
-
/* @__PURE__ */ (0,
|
|
438
|
-
/* @__PURE__ */ (0,
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(AlertDialogPortal, { "data-slot": "alert-dialog-portal", children: [
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AlertDialogOverlay, {}),
|
|
606
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
439
607
|
import_alert_dialog.AlertDialog.Popup,
|
|
440
608
|
{
|
|
441
609
|
"data-slot": "alert-dialog-content",
|
|
@@ -452,7 +620,7 @@ function AlertDialogHeader({
|
|
|
452
620
|
className,
|
|
453
621
|
...props
|
|
454
622
|
}) {
|
|
455
|
-
return /* @__PURE__ */ (0,
|
|
623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
456
624
|
"div",
|
|
457
625
|
{
|
|
458
626
|
"data-slot": "alert-dialog-header",
|
|
@@ -465,7 +633,7 @@ function AlertDialogFooter({
|
|
|
465
633
|
className,
|
|
466
634
|
...props
|
|
467
635
|
}) {
|
|
468
|
-
return /* @__PURE__ */ (0,
|
|
636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
469
637
|
"div",
|
|
470
638
|
{
|
|
471
639
|
"data-slot": "alert-dialog-footer",
|
|
@@ -481,7 +649,7 @@ function AlertDialogTitle({
|
|
|
481
649
|
className,
|
|
482
650
|
...props
|
|
483
651
|
}) {
|
|
484
|
-
return /* @__PURE__ */ (0,
|
|
652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
485
653
|
import_alert_dialog.AlertDialog.Title,
|
|
486
654
|
{
|
|
487
655
|
"data-slot": "alert-dialog-title",
|
|
@@ -494,7 +662,7 @@ function AlertDialogDescription({
|
|
|
494
662
|
className,
|
|
495
663
|
...props
|
|
496
664
|
}) {
|
|
497
|
-
return /* @__PURE__ */ (0,
|
|
665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
498
666
|
import_alert_dialog.AlertDialog.Description,
|
|
499
667
|
{
|
|
500
668
|
"data-slot": "alert-dialog-description",
|
|
@@ -508,7 +676,7 @@ function AlertDialogAction({
|
|
|
508
676
|
variant = "default",
|
|
509
677
|
...props
|
|
510
678
|
}) {
|
|
511
|
-
return /* @__PURE__ */ (0,
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
512
680
|
import_alert_dialog.AlertDialog.Close,
|
|
513
681
|
{
|
|
514
682
|
"data-slot": "alert-dialog-action",
|
|
@@ -522,7 +690,7 @@ function AlertDialogCancel({
|
|
|
522
690
|
variant = "outline",
|
|
523
691
|
...props
|
|
524
692
|
}) {
|
|
525
|
-
return /* @__PURE__ */ (0,
|
|
693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
526
694
|
import_alert_dialog.AlertDialog.Close,
|
|
527
695
|
{
|
|
528
696
|
"data-slot": "alert-dialog-cancel",
|
|
@@ -533,13 +701,13 @@ function AlertDialogCancel({
|
|
|
533
701
|
}
|
|
534
702
|
|
|
535
703
|
// src/components/components/trigger-render.tsx
|
|
536
|
-
var
|
|
704
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
537
705
|
function triggerWrapper(slot) {
|
|
538
|
-
return /* @__PURE__ */ (0,
|
|
706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-slot": slot });
|
|
539
707
|
}
|
|
540
708
|
|
|
541
709
|
// src/components/components/AlertDialog/index.tsx
|
|
542
|
-
var
|
|
710
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
543
711
|
function AlertDialog2({
|
|
544
712
|
title,
|
|
545
713
|
description,
|
|
@@ -557,7 +725,7 @@ function AlertDialog2({
|
|
|
557
725
|
const [innerOpen, setInnerOpen] = (0, import_react.useState)(false);
|
|
558
726
|
const controlled = open !== void 0;
|
|
559
727
|
const visible = controlled ? open : innerOpen;
|
|
560
|
-
return /* @__PURE__ */ (0,
|
|
728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
561
729
|
AlertDialog,
|
|
562
730
|
{
|
|
563
731
|
open: visible,
|
|
@@ -567,7 +735,7 @@ function AlertDialog2({
|
|
|
567
735
|
}
|
|
568
736
|
},
|
|
569
737
|
children: [
|
|
570
|
-
trigger ? /* @__PURE__ */ (0,
|
|
738
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
571
739
|
AlertDialogTrigger,
|
|
572
740
|
{
|
|
573
741
|
nativeButton: false,
|
|
@@ -575,14 +743,14 @@ function AlertDialog2({
|
|
|
575
743
|
children: renderChildren([trigger])
|
|
576
744
|
}
|
|
577
745
|
) : null,
|
|
578
|
-
/* @__PURE__ */ (0,
|
|
579
|
-
/* @__PURE__ */ (0,
|
|
580
|
-
/* @__PURE__ */ (0,
|
|
581
|
-
description ? /* @__PURE__ */ (0,
|
|
746
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogContent, { className, style, children: [
|
|
747
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogHeader, { children: [
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogTitle, { children: title ?? "" }),
|
|
749
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogDescription, { children: description }) : null
|
|
582
750
|
] }),
|
|
583
|
-
/* @__PURE__ */ (0,
|
|
584
|
-
/* @__PURE__ */ (0,
|
|
585
|
-
/* @__PURE__ */ (0,
|
|
751
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogFooter, { children: [
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogCancel, { onClick: () => onCancel?.(), children: cancelText ?? t("pactor.alertDialog.cancel") }),
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogAction, { onClick: () => onConfirm?.(), children: confirmText ?? t("pactor.alertDialog.confirm") })
|
|
586
754
|
] })
|
|
587
755
|
] })
|
|
588
756
|
]
|
|
@@ -591,14 +759,14 @@ function AlertDialog2({
|
|
|
591
759
|
}
|
|
592
760
|
|
|
593
761
|
// src/ui/aspect-ratio.tsx
|
|
594
|
-
var
|
|
762
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
595
763
|
function AspectRatio({
|
|
596
764
|
ratio = 1,
|
|
597
765
|
className,
|
|
598
766
|
style,
|
|
599
767
|
...props
|
|
600
768
|
}) {
|
|
601
|
-
return /* @__PURE__ */ (0,
|
|
769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
602
770
|
"div",
|
|
603
771
|
{
|
|
604
772
|
"data-slot": "aspect-ratio",
|
|
@@ -610,16 +778,16 @@ function AspectRatio({
|
|
|
610
778
|
}
|
|
611
779
|
|
|
612
780
|
// src/components/components/AspectRatio/index.tsx
|
|
613
|
-
var
|
|
781
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
614
782
|
function AspectRatio2({ ratio = 1, children, className, style }) {
|
|
615
|
-
return /* @__PURE__ */ (0,
|
|
783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AspectRatio, { ratio, className, style, children });
|
|
616
784
|
}
|
|
617
785
|
|
|
618
786
|
// src/ui/avatar.tsx
|
|
619
787
|
var import_avatar = require("@base-ui/react/avatar");
|
|
620
|
-
var
|
|
788
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
621
789
|
function Avatar({ className, ...props }) {
|
|
622
|
-
return /* @__PURE__ */ (0,
|
|
790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
623
791
|
import_avatar.Avatar.Root,
|
|
624
792
|
{
|
|
625
793
|
"data-slot": "avatar",
|
|
@@ -632,7 +800,7 @@ function Avatar({ className, ...props }) {
|
|
|
632
800
|
);
|
|
633
801
|
}
|
|
634
802
|
function AvatarImage({ className, ...props }) {
|
|
635
|
-
return /* @__PURE__ */ (0,
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
636
804
|
import_avatar.Avatar.Image,
|
|
637
805
|
{
|
|
638
806
|
"data-slot": "avatar-image",
|
|
@@ -642,7 +810,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
642
810
|
);
|
|
643
811
|
}
|
|
644
812
|
function AvatarFallback({ className, ...props }) {
|
|
645
|
-
return /* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
646
814
|
import_avatar.Avatar.Fallback,
|
|
647
815
|
{
|
|
648
816
|
"data-slot": "avatar-fallback",
|
|
@@ -656,17 +824,17 @@ function AvatarFallback({ className, ...props }) {
|
|
|
656
824
|
}
|
|
657
825
|
|
|
658
826
|
// src/components/components/Avatar/index.tsx
|
|
659
|
-
var
|
|
827
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
660
828
|
function Avatar2({ src, alt, fallback, className, style }) {
|
|
661
|
-
return /* @__PURE__ */ (0,
|
|
662
|
-
src ? /* @__PURE__ */ (0,
|
|
663
|
-
fallback ? /* @__PURE__ */ (0,
|
|
829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Avatar, { className, style, children: [
|
|
830
|
+
src ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarImage, { src, alt: alt ?? "" }) : null,
|
|
831
|
+
fallback ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarFallback, { children: fallback }) : null
|
|
664
832
|
] });
|
|
665
833
|
}
|
|
666
834
|
|
|
667
835
|
// src/ui/badge.tsx
|
|
668
836
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
669
|
-
var
|
|
837
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
670
838
|
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
671
839
|
"inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
672
840
|
{
|
|
@@ -688,7 +856,7 @@ function Badge({
|
|
|
688
856
|
variant,
|
|
689
857
|
...props
|
|
690
858
|
}) {
|
|
691
|
-
return /* @__PURE__ */ (0,
|
|
859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
692
860
|
"span",
|
|
693
861
|
{
|
|
694
862
|
"data-slot": "badge",
|
|
@@ -699,22 +867,22 @@ function Badge({
|
|
|
699
867
|
}
|
|
700
868
|
|
|
701
869
|
// src/components/components/Badge/index.tsx
|
|
702
|
-
var
|
|
870
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
703
871
|
function Badge2({ text, variant = "default", className, style }) {
|
|
704
|
-
return /* @__PURE__ */ (0,
|
|
872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant, className, style, children: text });
|
|
705
873
|
}
|
|
706
874
|
|
|
707
875
|
// src/components/components/Breadcrumb/index.tsx
|
|
708
876
|
var import_react2 = require("react");
|
|
709
877
|
|
|
710
878
|
// src/ui/breadcrumb.tsx
|
|
711
|
-
var
|
|
712
|
-
var
|
|
879
|
+
var import_lucide_react3 = require("lucide-react");
|
|
880
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
713
881
|
function Breadcrumb({ ...props }) {
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
715
883
|
}
|
|
716
884
|
function BreadcrumbList({ className, ...props }) {
|
|
717
|
-
return /* @__PURE__ */ (0,
|
|
885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
718
886
|
"ol",
|
|
719
887
|
{
|
|
720
888
|
"data-slot": "breadcrumb-list",
|
|
@@ -727,7 +895,7 @@ function BreadcrumbList({ className, ...props }) {
|
|
|
727
895
|
);
|
|
728
896
|
}
|
|
729
897
|
function BreadcrumbItem({ className, ...props }) {
|
|
730
|
-
return /* @__PURE__ */ (0,
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
731
899
|
"li",
|
|
732
900
|
{
|
|
733
901
|
"data-slot": "breadcrumb-item",
|
|
@@ -737,7 +905,7 @@ function BreadcrumbItem({ className, ...props }) {
|
|
|
737
905
|
);
|
|
738
906
|
}
|
|
739
907
|
function BreadcrumbLink({ className, ...props }) {
|
|
740
|
-
return /* @__PURE__ */ (0,
|
|
908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
741
909
|
"a",
|
|
742
910
|
{
|
|
743
911
|
"data-slot": "breadcrumb-link",
|
|
@@ -747,7 +915,7 @@ function BreadcrumbLink({ className, ...props }) {
|
|
|
747
915
|
);
|
|
748
916
|
}
|
|
749
917
|
function BreadcrumbPage({ className, ...props }) {
|
|
750
|
-
return /* @__PURE__ */ (0,
|
|
918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
751
919
|
"span",
|
|
752
920
|
{
|
|
753
921
|
"data-slot": "breadcrumb-page",
|
|
@@ -764,7 +932,7 @@ function BreadcrumbSeparator({
|
|
|
764
932
|
className,
|
|
765
933
|
...props
|
|
766
934
|
}) {
|
|
767
|
-
return /* @__PURE__ */ (0,
|
|
935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
768
936
|
"li",
|
|
769
937
|
{
|
|
770
938
|
"data-slot": "breadcrumb-separator",
|
|
@@ -772,26 +940,26 @@ function BreadcrumbSeparator({
|
|
|
772
940
|
"aria-hidden": "true",
|
|
773
941
|
className: cn("[&>svg]:size-3.5", className),
|
|
774
942
|
...props,
|
|
775
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
943
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react3.ChevronRightIcon, {})
|
|
776
944
|
}
|
|
777
945
|
);
|
|
778
946
|
}
|
|
779
947
|
|
|
780
948
|
// src/components/components/Breadcrumb/index.tsx
|
|
781
|
-
var
|
|
949
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
782
950
|
function Breadcrumb2({ items = [], className, style }) {
|
|
783
|
-
return /* @__PURE__ */ (0,
|
|
951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Breadcrumb, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbList, { children: items.map((item, index) => {
|
|
784
952
|
const isLast = index === items.length - 1;
|
|
785
|
-
return /* @__PURE__ */ (0,
|
|
786
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
787
|
-
/* @__PURE__ */ (0,
|
|
953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react2.Fragment, { children: [
|
|
954
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbSeparator, {}) : null,
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbItem, { children: isLast || !item.href ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbLink, { href: item.href, children: item.label }) })
|
|
788
956
|
] }, `${item.label}-${index}`);
|
|
789
957
|
}) }) });
|
|
790
958
|
}
|
|
791
959
|
|
|
792
960
|
// src/components/components/Button/index.tsx
|
|
793
|
-
var
|
|
794
|
-
var
|
|
961
|
+
var import_lucide_react4 = require("lucide-react");
|
|
962
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
795
963
|
var variantMap2 = {
|
|
796
964
|
default: "outline",
|
|
797
965
|
primary: "default",
|
|
@@ -818,7 +986,7 @@ function Button2({
|
|
|
818
986
|
children
|
|
819
987
|
}) {
|
|
820
988
|
const textual = variant === "link" || variant === "text";
|
|
821
|
-
return /* @__PURE__ */ (0,
|
|
989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
822
990
|
Button,
|
|
823
991
|
{
|
|
824
992
|
type: submit ? "submit" : "button",
|
|
@@ -834,7 +1002,7 @@ function Button2({
|
|
|
834
1002
|
className
|
|
835
1003
|
),
|
|
836
1004
|
children: [
|
|
837
|
-
loading ? /* @__PURE__ */ (0,
|
|
1005
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.Loader2, { "aria-hidden": true, className: "animate-spin" }) : null,
|
|
838
1006
|
text ?? children
|
|
839
1007
|
]
|
|
840
1008
|
}
|
|
@@ -842,9 +1010,9 @@ function Button2({
|
|
|
842
1010
|
}
|
|
843
1011
|
|
|
844
1012
|
// src/ui/button-group.tsx
|
|
845
|
-
var
|
|
1013
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
846
1014
|
function ButtonGroup({ className, ...props }) {
|
|
847
|
-
return /* @__PURE__ */ (0,
|
|
1015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
848
1016
|
"div",
|
|
849
1017
|
{
|
|
850
1018
|
role: "group",
|
|
@@ -859,9 +1027,9 @@ function ButtonGroup({ className, ...props }) {
|
|
|
859
1027
|
}
|
|
860
1028
|
|
|
861
1029
|
// src/components/components/ButtonGroup/index.tsx
|
|
862
|
-
var
|
|
1030
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
863
1031
|
function ButtonGroup2({ className, style, children }) {
|
|
864
|
-
return /* @__PURE__ */ (0,
|
|
1032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ButtonGroup, { className, style, children });
|
|
865
1033
|
}
|
|
866
1034
|
|
|
867
1035
|
// src/components/components/Calendar/index.tsx
|
|
@@ -869,17 +1037,17 @@ var import_date_fns = require("date-fns");
|
|
|
869
1037
|
var import_react4 = require("react");
|
|
870
1038
|
|
|
871
1039
|
// src/ui/calendar.tsx
|
|
872
|
-
var
|
|
1040
|
+
var import_lucide_react5 = require("lucide-react");
|
|
873
1041
|
var import_react_day_picker = require("react-day-picker");
|
|
874
|
-
var
|
|
875
|
-
function
|
|
1042
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1043
|
+
function Calendar2({
|
|
876
1044
|
className,
|
|
877
1045
|
classNames,
|
|
878
1046
|
showOutsideDays = true,
|
|
879
1047
|
...props
|
|
880
1048
|
}) {
|
|
881
1049
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
882
|
-
return /* @__PURE__ */ (0,
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
883
1051
|
import_react_day_picker.DayPicker,
|
|
884
1052
|
{
|
|
885
1053
|
showOutsideDays,
|
|
@@ -936,7 +1104,7 @@ function Calendar({
|
|
|
936
1104
|
...classNames
|
|
937
1105
|
},
|
|
938
1106
|
components: {
|
|
939
|
-
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0,
|
|
1107
|
+
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react5.ChevronLeftIcon, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react5.ChevronRightIcon, { className: "size-4" })
|
|
940
1108
|
},
|
|
941
1109
|
...props
|
|
942
1110
|
}
|
|
@@ -962,13 +1130,13 @@ function formItemClass(layout) {
|
|
|
962
1130
|
}
|
|
963
1131
|
|
|
964
1132
|
// src/components/components/Calendar/index.tsx
|
|
965
|
-
var
|
|
1133
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
966
1134
|
function parseValue(value) {
|
|
967
1135
|
if (typeof value !== "string" || value === "") return void 0;
|
|
968
1136
|
const date = (0, import_date_fns.parseISO)(value);
|
|
969
1137
|
return (0, import_date_fns.isValid)(date) ? date : void 0;
|
|
970
1138
|
}
|
|
971
|
-
function
|
|
1139
|
+
function Calendar3({
|
|
972
1140
|
name,
|
|
973
1141
|
label,
|
|
974
1142
|
rules,
|
|
@@ -996,8 +1164,8 @@ function Calendar2({
|
|
|
996
1164
|
}
|
|
997
1165
|
onChange?.(next);
|
|
998
1166
|
};
|
|
999
|
-
const calendar = /* @__PURE__ */ (0,
|
|
1000
|
-
|
|
1167
|
+
const calendar = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1168
|
+
Calendar2,
|
|
1001
1169
|
{
|
|
1002
1170
|
mode,
|
|
1003
1171
|
selected: parseValue(current),
|
|
@@ -1009,16 +1177,16 @@ function Calendar2({
|
|
|
1009
1177
|
);
|
|
1010
1178
|
if (inForm && form && name) {
|
|
1011
1179
|
const error = form.errors[name];
|
|
1012
|
-
return /* @__PURE__ */ (0,
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1013
1181
|
"div",
|
|
1014
1182
|
{
|
|
1015
1183
|
"data-slot": "form-item",
|
|
1016
1184
|
className: cn(formItemClass(form.layout), className),
|
|
1017
1185
|
style,
|
|
1018
1186
|
children: [
|
|
1019
|
-
label ? /* @__PURE__ */ (0,
|
|
1187
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
1020
1188
|
calendar,
|
|
1021
|
-
error ? /* @__PURE__ */ (0,
|
|
1189
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1022
1190
|
]
|
|
1023
1191
|
}
|
|
1024
1192
|
);
|
|
@@ -1027,7 +1195,7 @@ function Calendar2({
|
|
|
1027
1195
|
}
|
|
1028
1196
|
|
|
1029
1197
|
// src/ui/card.tsx
|
|
1030
|
-
var
|
|
1198
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1031
1199
|
var cardRoundedClasses = {
|
|
1032
1200
|
none: "rounded-none",
|
|
1033
1201
|
sm: "rounded-sm",
|
|
@@ -1042,7 +1210,7 @@ function Card({
|
|
|
1042
1210
|
rounded = "lg",
|
|
1043
1211
|
...props
|
|
1044
1212
|
}) {
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1046
1214
|
"div",
|
|
1047
1215
|
{
|
|
1048
1216
|
"data-slot": "card",
|
|
@@ -1056,7 +1224,7 @@ function Card({
|
|
|
1056
1224
|
);
|
|
1057
1225
|
}
|
|
1058
1226
|
function CardHeader({ className, ...props }) {
|
|
1059
|
-
return /* @__PURE__ */ (0,
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1060
1228
|
"div",
|
|
1061
1229
|
{
|
|
1062
1230
|
"data-slot": "card-header",
|
|
@@ -1069,7 +1237,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1069
1237
|
);
|
|
1070
1238
|
}
|
|
1071
1239
|
function CardTitle({ className, ...props }) {
|
|
1072
|
-
return /* @__PURE__ */ (0,
|
|
1240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1073
1241
|
"div",
|
|
1074
1242
|
{
|
|
1075
1243
|
"data-slot": "card-title",
|
|
@@ -1079,7 +1247,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1079
1247
|
);
|
|
1080
1248
|
}
|
|
1081
1249
|
function CardContent({ className, ...props }) {
|
|
1082
|
-
return /* @__PURE__ */ (0,
|
|
1250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1083
1251
|
"div",
|
|
1084
1252
|
{
|
|
1085
1253
|
"data-slot": "card-content",
|
|
@@ -1090,17 +1258,17 @@ function CardContent({ className, ...props }) {
|
|
|
1090
1258
|
}
|
|
1091
1259
|
|
|
1092
1260
|
// src/components/components/Card/index.tsx
|
|
1093
|
-
var
|
|
1261
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1094
1262
|
function Card2({ title, bordered = true, rounded, className, style, children }) {
|
|
1095
|
-
return /* @__PURE__ */ (0,
|
|
1263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1096
1264
|
Card,
|
|
1097
1265
|
{
|
|
1098
1266
|
rounded,
|
|
1099
1267
|
className: cn("gap-4 py-4", !bordered && "border-transparent shadow-none", className),
|
|
1100
1268
|
style,
|
|
1101
1269
|
children: [
|
|
1102
|
-
title ? /* @__PURE__ */ (0,
|
|
1103
|
-
/* @__PURE__ */ (0,
|
|
1270
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardHeader, { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardTitle, { children: title }) }) : null,
|
|
1271
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardContent, { className: "px-4", children })
|
|
1104
1272
|
]
|
|
1105
1273
|
}
|
|
1106
1274
|
);
|
|
@@ -1112,9 +1280,9 @@ var import_react5 = require("react");
|
|
|
1112
1280
|
|
|
1113
1281
|
// src/ui/carousel.tsx
|
|
1114
1282
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1115
|
-
var
|
|
1283
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1116
1284
|
var React2 = __toESM(require("react"), 1);
|
|
1117
|
-
var
|
|
1285
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1118
1286
|
var CarouselContext = React2.createContext(null);
|
|
1119
1287
|
function useCarousel() {
|
|
1120
1288
|
const context = React2.useContext(CarouselContext);
|
|
@@ -1169,7 +1337,7 @@ function Carousel({
|
|
|
1169
1337
|
api.off("select", onSelect);
|
|
1170
1338
|
};
|
|
1171
1339
|
}, [api, onSelect]);
|
|
1172
|
-
return /* @__PURE__ */ (0,
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1173
1341
|
CarouselContext.Provider,
|
|
1174
1342
|
{
|
|
1175
1343
|
value: {
|
|
@@ -1182,7 +1350,7 @@ function Carousel({
|
|
|
1182
1350
|
canScrollPrev,
|
|
1183
1351
|
canScrollNext
|
|
1184
1352
|
},
|
|
1185
|
-
children: /* @__PURE__ */ (0,
|
|
1353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1186
1354
|
"div",
|
|
1187
1355
|
{
|
|
1188
1356
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -1199,7 +1367,7 @@ function Carousel({
|
|
|
1199
1367
|
}
|
|
1200
1368
|
function CarouselContent({ className, ...props }) {
|
|
1201
1369
|
const { carouselRef, orientation } = useCarousel();
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-viewport", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1203
1371
|
"div",
|
|
1204
1372
|
{
|
|
1205
1373
|
className: cn(
|
|
@@ -1213,7 +1381,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1213
1381
|
}
|
|
1214
1382
|
function CarouselItem({ className, ...props }) {
|
|
1215
1383
|
const { orientation } = useCarousel();
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1217
1385
|
"div",
|
|
1218
1386
|
{
|
|
1219
1387
|
role: "group",
|
|
@@ -1235,7 +1403,7 @@ function CarouselPrevious({
|
|
|
1235
1403
|
...props
|
|
1236
1404
|
}) {
|
|
1237
1405
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1238
|
-
return /* @__PURE__ */ (0,
|
|
1406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1239
1407
|
Button,
|
|
1240
1408
|
{
|
|
1241
1409
|
"data-slot": "carousel-previous",
|
|
@@ -1250,8 +1418,8 @@ function CarouselPrevious({
|
|
|
1250
1418
|
onClick: scrollPrev,
|
|
1251
1419
|
...props,
|
|
1252
1420
|
children: [
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1421
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronLeftIcon, {}),
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
1255
1423
|
]
|
|
1256
1424
|
}
|
|
1257
1425
|
);
|
|
@@ -1263,7 +1431,7 @@ function CarouselNext({
|
|
|
1263
1431
|
...props
|
|
1264
1432
|
}) {
|
|
1265
1433
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1266
|
-
return /* @__PURE__ */ (0,
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1267
1435
|
Button,
|
|
1268
1436
|
{
|
|
1269
1437
|
"data-slot": "carousel-next",
|
|
@@ -1278,15 +1446,15 @@ function CarouselNext({
|
|
|
1278
1446
|
onClick: scrollNext,
|
|
1279
1447
|
...props,
|
|
1280
1448
|
children: [
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1282
|
-
/* @__PURE__ */ (0,
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronRightIcon, {}),
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
1283
1451
|
]
|
|
1284
1452
|
}
|
|
1285
1453
|
);
|
|
1286
1454
|
}
|
|
1287
1455
|
|
|
1288
1456
|
// src/components/components/Carousel/index.tsx
|
|
1289
|
-
var
|
|
1457
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1290
1458
|
function isDslNode(item) {
|
|
1291
1459
|
return typeof item.type === "string";
|
|
1292
1460
|
}
|
|
@@ -1311,7 +1479,7 @@ function Carousel2({
|
|
|
1311
1479
|
}, interval);
|
|
1312
1480
|
return () => clearInterval(timer);
|
|
1313
1481
|
}, [api, autoplay, loop]);
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1315
1483
|
Carousel,
|
|
1316
1484
|
{
|
|
1317
1485
|
opts: { loop: loop === true },
|
|
@@ -1319,7 +1487,7 @@ function Carousel2({
|
|
|
1319
1487
|
className,
|
|
1320
1488
|
style,
|
|
1321
1489
|
children: [
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1490
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselContent, { children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselItem, { children: isDslNode(item) ? renderChildren([item]) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1323
1491
|
"img",
|
|
1324
1492
|
{
|
|
1325
1493
|
src: item.src,
|
|
@@ -1327,8 +1495,8 @@ function Carousel2({
|
|
|
1327
1495
|
className: "w-full rounded-md object-cover"
|
|
1328
1496
|
}
|
|
1329
1497
|
) }, index)) }),
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1331
|
-
/* @__PURE__ */ (0,
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselPrevious, {}),
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselNext, {})
|
|
1332
1500
|
]
|
|
1333
1501
|
}
|
|
1334
1502
|
);
|
|
@@ -1339,10 +1507,10 @@ var import_react6 = require("react");
|
|
|
1339
1507
|
|
|
1340
1508
|
// src/ui/checkbox.tsx
|
|
1341
1509
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1342
|
-
var
|
|
1343
|
-
var
|
|
1510
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1511
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1344
1512
|
function Checkbox({ className, ...props }) {
|
|
1345
|
-
return /* @__PURE__ */ (0,
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1346
1514
|
import_checkbox.Checkbox.Root,
|
|
1347
1515
|
{
|
|
1348
1516
|
"data-slot": "checkbox",
|
|
@@ -1351,12 +1519,12 @@ function Checkbox({ className, ...props }) {
|
|
|
1351
1519
|
className
|
|
1352
1520
|
),
|
|
1353
1521
|
...props,
|
|
1354
|
-
children: /* @__PURE__ */ (0,
|
|
1522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1355
1523
|
import_checkbox.Checkbox.Indicator,
|
|
1356
1524
|
{
|
|
1357
1525
|
"data-slot": "checkbox-indicator",
|
|
1358
1526
|
className: "flex items-center justify-center text-current",
|
|
1359
|
-
children: /* @__PURE__ */ (0,
|
|
1527
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.CheckIcon, { className: "size-3.5" })
|
|
1360
1528
|
}
|
|
1361
1529
|
)
|
|
1362
1530
|
}
|
|
@@ -1364,7 +1532,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1364
1532
|
}
|
|
1365
1533
|
|
|
1366
1534
|
// src/components/components/Checkbox/index.tsx
|
|
1367
|
-
var
|
|
1535
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1368
1536
|
function Checkbox2({
|
|
1369
1537
|
name,
|
|
1370
1538
|
label,
|
|
@@ -1393,13 +1561,13 @@ function Checkbox2({
|
|
|
1393
1561
|
}
|
|
1394
1562
|
onChange?.(next);
|
|
1395
1563
|
};
|
|
1396
|
-
const control = /* @__PURE__ */ (0,
|
|
1564
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1397
1565
|
"span",
|
|
1398
1566
|
{
|
|
1399
1567
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
1400
1568
|
style: inForm ? void 0 : style,
|
|
1401
1569
|
children: [
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1403
1571
|
Checkbox,
|
|
1404
1572
|
{
|
|
1405
1573
|
id: controlId,
|
|
@@ -1409,12 +1577,12 @@ function Checkbox2({
|
|
|
1409
1577
|
onCheckedChange: handleChange
|
|
1410
1578
|
}
|
|
1411
1579
|
),
|
|
1412
|
-
label ? /* @__PURE__ */ (0,
|
|
1580
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
1413
1581
|
]
|
|
1414
1582
|
}
|
|
1415
1583
|
);
|
|
1416
1584
|
if (inForm && form && name) {
|
|
1417
|
-
return /* @__PURE__ */ (0,
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1418
1586
|
"div",
|
|
1419
1587
|
{
|
|
1420
1588
|
"data-slot": "form-item",
|
|
@@ -1422,7 +1590,7 @@ function Checkbox2({
|
|
|
1422
1590
|
style,
|
|
1423
1591
|
children: [
|
|
1424
1592
|
control,
|
|
1425
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
1593
|
+
form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
|
|
1426
1594
|
]
|
|
1427
1595
|
}
|
|
1428
1596
|
);
|
|
@@ -1435,19 +1603,19 @@ var import_react7 = require("react");
|
|
|
1435
1603
|
|
|
1436
1604
|
// src/ui/collapsible.tsx
|
|
1437
1605
|
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1438
|
-
var
|
|
1439
|
-
var
|
|
1606
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1607
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1440
1608
|
function Collapsible({
|
|
1441
1609
|
...props
|
|
1442
1610
|
}) {
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1444
1612
|
}
|
|
1445
1613
|
function CollapsibleTrigger({
|
|
1446
1614
|
className,
|
|
1447
1615
|
children,
|
|
1448
1616
|
...props
|
|
1449
1617
|
}) {
|
|
1450
|
-
return /* @__PURE__ */ (0,
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1451
1619
|
import_collapsible.Collapsible.Trigger,
|
|
1452
1620
|
{
|
|
1453
1621
|
"data-slot": "collapsible-trigger",
|
|
@@ -1458,7 +1626,7 @@ function CollapsibleTrigger({
|
|
|
1458
1626
|
...props,
|
|
1459
1627
|
children: [
|
|
1460
1628
|
children,
|
|
1461
|
-
/* @__PURE__ */ (0,
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1462
1630
|
]
|
|
1463
1631
|
}
|
|
1464
1632
|
);
|
|
@@ -1467,7 +1635,7 @@ function CollapsibleContent({
|
|
|
1467
1635
|
className,
|
|
1468
1636
|
...props
|
|
1469
1637
|
}) {
|
|
1470
|
-
return /* @__PURE__ */ (0,
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1471
1639
|
import_collapsible.Collapsible.Panel,
|
|
1472
1640
|
{
|
|
1473
1641
|
"data-slot": "collapsible-content",
|
|
@@ -1481,7 +1649,7 @@ function CollapsibleContent({
|
|
|
1481
1649
|
}
|
|
1482
1650
|
|
|
1483
1651
|
// src/components/components/Collapsible/index.tsx
|
|
1484
|
-
var
|
|
1652
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1485
1653
|
function Collapsible2({
|
|
1486
1654
|
title,
|
|
1487
1655
|
open,
|
|
@@ -1491,7 +1659,7 @@ function Collapsible2({
|
|
|
1491
1659
|
}) {
|
|
1492
1660
|
const [innerOpen, setInnerOpen] = (0, import_react7.useState)(false);
|
|
1493
1661
|
const controlled = open !== void 0;
|
|
1494
|
-
return /* @__PURE__ */ (0,
|
|
1662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1495
1663
|
Collapsible,
|
|
1496
1664
|
{
|
|
1497
1665
|
open: controlled ? open : innerOpen,
|
|
@@ -1503,8 +1671,8 @@ function Collapsible2({
|
|
|
1503
1671
|
className,
|
|
1504
1672
|
style,
|
|
1505
1673
|
children: [
|
|
1506
|
-
title ? /* @__PURE__ */ (0,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1674
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CollapsibleTrigger, { children: title }) : null,
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CollapsibleContent, { children })
|
|
1508
1676
|
]
|
|
1509
1677
|
}
|
|
1510
1678
|
);
|
|
@@ -1514,20 +1682,20 @@ function Collapsible2({
|
|
|
1514
1682
|
var import_react8 = require("react");
|
|
1515
1683
|
|
|
1516
1684
|
// src/ui/combobox.tsx
|
|
1517
|
-
var
|
|
1685
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1518
1686
|
|
|
1519
1687
|
// src/ui/popover.tsx
|
|
1520
1688
|
var import_popover = require("@base-ui/react/popover");
|
|
1521
|
-
var
|
|
1689
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1522
1690
|
function Popover({
|
|
1523
1691
|
...props
|
|
1524
1692
|
}) {
|
|
1525
|
-
return /* @__PURE__ */ (0,
|
|
1693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1526
1694
|
}
|
|
1527
1695
|
function PopoverTrigger({
|
|
1528
1696
|
...props
|
|
1529
1697
|
}) {
|
|
1530
|
-
return /* @__PURE__ */ (0,
|
|
1698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1531
1699
|
}
|
|
1532
1700
|
function PopoverContent({
|
|
1533
1701
|
className,
|
|
@@ -1537,7 +1705,7 @@ function PopoverContent({
|
|
|
1537
1705
|
anchor,
|
|
1538
1706
|
...props
|
|
1539
1707
|
}) {
|
|
1540
|
-
return /* @__PURE__ */ (0,
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1541
1709
|
import_popover.Popover.Positioner,
|
|
1542
1710
|
{
|
|
1543
1711
|
align,
|
|
@@ -1545,7 +1713,7 @@ function PopoverContent({
|
|
|
1545
1713
|
sideOffset,
|
|
1546
1714
|
anchor,
|
|
1547
1715
|
className: "isolate z-50",
|
|
1548
|
-
children: /* @__PURE__ */ (0,
|
|
1716
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1549
1717
|
import_popover.Popover.Popup,
|
|
1550
1718
|
{
|
|
1551
1719
|
"data-slot": "popover-content",
|
|
@@ -1561,20 +1729,20 @@ function PopoverContent({
|
|
|
1561
1729
|
}
|
|
1562
1730
|
|
|
1563
1731
|
// src/ui/combobox.tsx
|
|
1564
|
-
var
|
|
1732
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1565
1733
|
function Combobox({
|
|
1566
1734
|
open,
|
|
1567
1735
|
onOpenChange,
|
|
1568
1736
|
children
|
|
1569
1737
|
}) {
|
|
1570
|
-
return /* @__PURE__ */ (0,
|
|
1738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Popover, { open, onOpenChange: (next) => onOpenChange?.(next), children });
|
|
1571
1739
|
}
|
|
1572
1740
|
function ComboboxTrigger({
|
|
1573
1741
|
className,
|
|
1574
1742
|
children,
|
|
1575
1743
|
...props
|
|
1576
1744
|
}) {
|
|
1577
|
-
return /* @__PURE__ */ (0,
|
|
1745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1578
1746
|
PopoverTrigger,
|
|
1579
1747
|
{
|
|
1580
1748
|
"data-slot": "combobox-trigger",
|
|
@@ -1584,8 +1752,8 @@ function ComboboxTrigger({
|
|
|
1584
1752
|
),
|
|
1585
1753
|
...props,
|
|
1586
1754
|
children: [
|
|
1587
|
-
/* @__PURE__ */ (0,
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children }),
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.ChevronsUpDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
1589
1757
|
]
|
|
1590
1758
|
}
|
|
1591
1759
|
);
|
|
@@ -1595,7 +1763,7 @@ function ComboboxContent({
|
|
|
1595
1763
|
children,
|
|
1596
1764
|
...props
|
|
1597
1765
|
}) {
|
|
1598
|
-
return /* @__PURE__ */ (0,
|
|
1766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1599
1767
|
PopoverContent,
|
|
1600
1768
|
{
|
|
1601
1769
|
"data-slot": "combobox-content",
|
|
@@ -1608,13 +1776,13 @@ function ComboboxContent({
|
|
|
1608
1776
|
|
|
1609
1777
|
// src/ui/command.tsx
|
|
1610
1778
|
var import_cmdk = require("cmdk");
|
|
1611
|
-
var
|
|
1612
|
-
var
|
|
1779
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1780
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1613
1781
|
function Command({
|
|
1614
1782
|
className,
|
|
1615
1783
|
...props
|
|
1616
1784
|
}) {
|
|
1617
|
-
return /* @__PURE__ */ (0,
|
|
1785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1618
1786
|
import_cmdk.Command,
|
|
1619
1787
|
{
|
|
1620
1788
|
"data-slot": "command",
|
|
@@ -1630,14 +1798,14 @@ function CommandInput({
|
|
|
1630
1798
|
className,
|
|
1631
1799
|
...props
|
|
1632
1800
|
}) {
|
|
1633
|
-
return /* @__PURE__ */ (0,
|
|
1801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1634
1802
|
"div",
|
|
1635
1803
|
{
|
|
1636
1804
|
"data-slot": "command-input-wrapper",
|
|
1637
1805
|
className: "flex items-center gap-2 border-b border-border px-3",
|
|
1638
1806
|
children: [
|
|
1639
|
-
/* @__PURE__ */ (0,
|
|
1640
|
-
/* @__PURE__ */ (0,
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react10.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1641
1809
|
import_cmdk.Command.Input,
|
|
1642
1810
|
{
|
|
1643
1811
|
"data-slot": "command-input",
|
|
@@ -1656,7 +1824,7 @@ function CommandList({
|
|
|
1656
1824
|
className,
|
|
1657
1825
|
...props
|
|
1658
1826
|
}) {
|
|
1659
|
-
return /* @__PURE__ */ (0,
|
|
1827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1660
1828
|
import_cmdk.Command.List,
|
|
1661
1829
|
{
|
|
1662
1830
|
"data-slot": "command-list",
|
|
@@ -1671,7 +1839,7 @@ function CommandList({
|
|
|
1671
1839
|
function CommandEmpty({
|
|
1672
1840
|
...props
|
|
1673
1841
|
}) {
|
|
1674
|
-
return /* @__PURE__ */ (0,
|
|
1842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1675
1843
|
import_cmdk.Command.Empty,
|
|
1676
1844
|
{
|
|
1677
1845
|
"data-slot": "command-empty",
|
|
@@ -1684,7 +1852,7 @@ function CommandGroup({
|
|
|
1684
1852
|
className,
|
|
1685
1853
|
...props
|
|
1686
1854
|
}) {
|
|
1687
|
-
return /* @__PURE__ */ (0,
|
|
1855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1688
1856
|
import_cmdk.Command.Group,
|
|
1689
1857
|
{
|
|
1690
1858
|
"data-slot": "command-group",
|
|
@@ -1700,7 +1868,7 @@ function CommandItem({
|
|
|
1700
1868
|
className,
|
|
1701
1869
|
...props
|
|
1702
1870
|
}) {
|
|
1703
|
-
return /* @__PURE__ */ (0,
|
|
1871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1704
1872
|
import_cmdk.Command.Item,
|
|
1705
1873
|
{
|
|
1706
1874
|
"data-slot": "command-item",
|
|
@@ -1714,7 +1882,7 @@ function CommandItem({
|
|
|
1714
1882
|
}
|
|
1715
1883
|
|
|
1716
1884
|
// src/components/components/Combobox/index.tsx
|
|
1717
|
-
var
|
|
1885
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1718
1886
|
function Combobox2({
|
|
1719
1887
|
name,
|
|
1720
1888
|
label,
|
|
@@ -1755,8 +1923,8 @@ function Combobox2({
|
|
|
1755
1923
|
onChange?.(option.value);
|
|
1756
1924
|
setOpen(false);
|
|
1757
1925
|
};
|
|
1758
|
-
const control = /* @__PURE__ */ (0,
|
|
1759
|
-
/* @__PURE__ */ (0,
|
|
1926
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Combobox, { open, onOpenChange: setOpen, children: [
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1760
1928
|
ComboboxTrigger,
|
|
1761
1929
|
{
|
|
1762
1930
|
id: controlId,
|
|
@@ -1767,11 +1935,11 @@ function Combobox2({
|
|
|
1767
1935
|
children: selected ? selected.label : placeholder ?? ""
|
|
1768
1936
|
}
|
|
1769
1937
|
),
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1771
|
-
searchable ? /* @__PURE__ */ (0,
|
|
1772
|
-
/* @__PURE__ */ (0,
|
|
1773
|
-
/* @__PURE__ */ (0,
|
|
1774
|
-
/* @__PURE__ */ (0,
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Command, { children: [
|
|
1939
|
+
searchable ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CommandInput, { placeholder }) : null,
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(CommandList, { children: [
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CommandEmpty, { children: "\u65E0\u5339\u914D\u7ED3\u679C" }),
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CommandGroup, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1775
1943
|
CommandItem,
|
|
1776
1944
|
{
|
|
1777
1945
|
value: String(option.value),
|
|
@@ -1788,14 +1956,14 @@ function Combobox2({
|
|
|
1788
1956
|
] });
|
|
1789
1957
|
if (inForm && form && name) {
|
|
1790
1958
|
const error = form.errors[name];
|
|
1791
|
-
return /* @__PURE__ */ (0,
|
|
1959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1792
1960
|
"div",
|
|
1793
1961
|
{
|
|
1794
1962
|
"data-slot": "form-item",
|
|
1795
1963
|
className: cn(formItemClass(form.layout), className),
|
|
1796
1964
|
style,
|
|
1797
1965
|
children: [
|
|
1798
|
-
label ? /* @__PURE__ */ (0,
|
|
1966
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1799
1967
|
"label",
|
|
1800
1968
|
{
|
|
1801
1969
|
htmlFor: controlId,
|
|
@@ -1804,7 +1972,7 @@ function Combobox2({
|
|
|
1804
1972
|
}
|
|
1805
1973
|
) : null,
|
|
1806
1974
|
control,
|
|
1807
|
-
error ? /* @__PURE__ */ (0,
|
|
1975
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1808
1976
|
]
|
|
1809
1977
|
}
|
|
1810
1978
|
);
|
|
@@ -1814,160 +1982,6 @@ function Combobox2({
|
|
|
1814
1982
|
|
|
1815
1983
|
// src/components/components/Command/index.tsx
|
|
1816
1984
|
var import_runtime4 = require("@pactor-app/runtime");
|
|
1817
|
-
|
|
1818
|
-
// src/components/components/Icon/index.tsx
|
|
1819
|
-
var import_lucide_react10 = require("lucide-react");
|
|
1820
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1821
|
-
var ICONS = {
|
|
1822
|
-
"arrow-left": import_lucide_react10.ArrowLeft,
|
|
1823
|
-
"arrow-right": import_lucide_react10.ArrowRight,
|
|
1824
|
-
"arrow-up": import_lucide_react10.ArrowUp,
|
|
1825
|
-
"arrow-down": import_lucide_react10.ArrowDown,
|
|
1826
|
-
"chevron-left": import_lucide_react10.ChevronLeft,
|
|
1827
|
-
"chevron-right": import_lucide_react10.ChevronRight,
|
|
1828
|
-
"chevron-up": import_lucide_react10.ChevronUp,
|
|
1829
|
-
"chevron-down": import_lucide_react10.ChevronDown,
|
|
1830
|
-
check: import_lucide_react10.Check,
|
|
1831
|
-
x: import_lucide_react10.X,
|
|
1832
|
-
plus: import_lucide_react10.Plus,
|
|
1833
|
-
minus: import_lucide_react10.Minus,
|
|
1834
|
-
search: import_lucide_react10.Search,
|
|
1835
|
-
settings: import_lucide_react10.Settings,
|
|
1836
|
-
user: import_lucide_react10.User,
|
|
1837
|
-
users: import_lucide_react10.Users,
|
|
1838
|
-
home: import_lucide_react10.House,
|
|
1839
|
-
menu: import_lucide_react10.Menu,
|
|
1840
|
-
bell: import_lucide_react10.Bell,
|
|
1841
|
-
calendar: import_lucide_react10.Calendar,
|
|
1842
|
-
clock: import_lucide_react10.Clock,
|
|
1843
|
-
download: import_lucide_react10.Download,
|
|
1844
|
-
upload: import_lucide_react10.Upload,
|
|
1845
|
-
pencil: import_lucide_react10.Pencil,
|
|
1846
|
-
edit: import_lucide_react10.SquarePen,
|
|
1847
|
-
trash: import_lucide_react10.Trash2,
|
|
1848
|
-
eye: import_lucide_react10.Eye,
|
|
1849
|
-
info: import_lucide_react10.Info,
|
|
1850
|
-
warning: import_lucide_react10.TriangleAlert,
|
|
1851
|
-
error: import_lucide_react10.CircleAlert,
|
|
1852
|
-
"check-circle": import_lucide_react10.CircleCheck,
|
|
1853
|
-
"x-circle": import_lucide_react10.CircleX,
|
|
1854
|
-
"help-circle": import_lucide_react10.CircleQuestionMark,
|
|
1855
|
-
loading: import_lucide_react10.LoaderCircle,
|
|
1856
|
-
spinner: import_lucide_react10.LoaderCircle,
|
|
1857
|
-
star: import_lucide_react10.Star,
|
|
1858
|
-
heart: import_lucide_react10.Heart,
|
|
1859
|
-
bookmark: import_lucide_react10.Bookmark,
|
|
1860
|
-
share: import_lucide_react10.Share2,
|
|
1861
|
-
copy: import_lucide_react10.Copy,
|
|
1862
|
-
"external-link": import_lucide_react10.ExternalLink,
|
|
1863
|
-
link: import_lucide_react10.Link,
|
|
1864
|
-
mail: import_lucide_react10.Mail,
|
|
1865
|
-
phone: import_lucide_react10.Phone,
|
|
1866
|
-
lock: import_lucide_react10.Lock,
|
|
1867
|
-
unlock: import_lucide_react10.LockOpen,
|
|
1868
|
-
"log-in": import_lucide_react10.LogIn,
|
|
1869
|
-
"log-out": import_lucide_react10.LogOut,
|
|
1870
|
-
sun: import_lucide_react10.Sun,
|
|
1871
|
-
moon: import_lucide_react10.Moon,
|
|
1872
|
-
globe: import_lucide_react10.Globe,
|
|
1873
|
-
filter: import_lucide_react10.Funnel,
|
|
1874
|
-
"list-filter": import_lucide_react10.ListFilter,
|
|
1875
|
-
"more-horizontal": import_lucide_react10.Ellipsis,
|
|
1876
|
-
"more-vertical": import_lucide_react10.EllipsisVertical,
|
|
1877
|
-
refresh: import_lucide_react10.RefreshCcw,
|
|
1878
|
-
save: import_lucide_react10.Save,
|
|
1879
|
-
file: import_lucide_react10.File,
|
|
1880
|
-
folder: import_lucide_react10.Folder,
|
|
1881
|
-
image: import_lucide_react10.Image,
|
|
1882
|
-
camera: import_lucide_react10.Camera,
|
|
1883
|
-
chart: import_lucide_react10.ChartColumn,
|
|
1884
|
-
table: import_lucide_react10.Table,
|
|
1885
|
-
list: import_lucide_react10.List,
|
|
1886
|
-
grid: import_lucide_react10.LayoutGrid,
|
|
1887
|
-
tag: import_lucide_react10.Tag,
|
|
1888
|
-
"shopping-cart": import_lucide_react10.ShoppingCart,
|
|
1889
|
-
"credit-card": import_lucide_react10.CreditCard,
|
|
1890
|
-
package: import_lucide_react10.Package,
|
|
1891
|
-
"map-pin": import_lucide_react10.MapPin,
|
|
1892
|
-
building: import_lucide_react10.Building2,
|
|
1893
|
-
briefcase: import_lucide_react10.Briefcase,
|
|
1894
|
-
send: import_lucide_react10.Send,
|
|
1895
|
-
message: import_lucide_react10.MessageCircle,
|
|
1896
|
-
"message-square": import_lucide_react10.MessageSquare,
|
|
1897
|
-
paperclip: import_lucide_react10.Paperclip,
|
|
1898
|
-
"thumbs-up": import_lucide_react10.ThumbsUp,
|
|
1899
|
-
"thumbs-down": import_lucide_react10.ThumbsDown,
|
|
1900
|
-
zap: import_lucide_react10.Zap,
|
|
1901
|
-
flag: import_lucide_react10.Flag,
|
|
1902
|
-
key: import_lucide_react10.Key,
|
|
1903
|
-
shield: import_lucide_react10.Shield,
|
|
1904
|
-
terminal: import_lucide_react10.Terminal,
|
|
1905
|
-
code: import_lucide_react10.Code,
|
|
1906
|
-
database: import_lucide_react10.Database,
|
|
1907
|
-
cloud: import_lucide_react10.Cloud,
|
|
1908
|
-
languages: import_lucide_react10.Languages,
|
|
1909
|
-
// @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
|
|
1910
|
-
// 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
|
|
1911
|
-
"chevrons-up-down": import_lucide_react10.ChevronsUpDown,
|
|
1912
|
-
"file-text": import_lucide_react10.FileText,
|
|
1913
|
-
"panel-left": import_lucide_react10.PanelLeft,
|
|
1914
|
-
"panel-right-open": import_lucide_react10.PanelRightOpen,
|
|
1915
|
-
square: import_lucide_react10.Square,
|
|
1916
|
-
history: import_lucide_react10.History,
|
|
1917
|
-
"rotate-ccw": import_lucide_react10.RotateCcw,
|
|
1918
|
-
quote: import_lucide_react10.Quote,
|
|
1919
|
-
chat: import_lucide_react10.MessageSquare,
|
|
1920
|
-
brain: import_lucide_react10.Brain
|
|
1921
|
-
};
|
|
1922
|
-
function normalizeIconName(name) {
|
|
1923
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
1924
|
-
}
|
|
1925
|
-
var sizePx = {
|
|
1926
|
-
sm: 16,
|
|
1927
|
-
default: 20,
|
|
1928
|
-
lg: 24
|
|
1929
|
-
};
|
|
1930
|
-
function Icon({
|
|
1931
|
-
name,
|
|
1932
|
-
size = "default",
|
|
1933
|
-
color,
|
|
1934
|
-
strokeWidth,
|
|
1935
|
-
className,
|
|
1936
|
-
style
|
|
1937
|
-
}) {
|
|
1938
|
-
const key = name ? normalizeIconName(name) : "";
|
|
1939
|
-
const Lucide = ICONS[key];
|
|
1940
|
-
const px = typeof size === "number" ? size : sizePx[size];
|
|
1941
|
-
if (!Lucide) {
|
|
1942
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1943
|
-
import_lucide_react10.CircleQuestionMark,
|
|
1944
|
-
{
|
|
1945
|
-
"data-slot": "icon",
|
|
1946
|
-
"data-unknown": name,
|
|
1947
|
-
size: px,
|
|
1948
|
-
color,
|
|
1949
|
-
strokeWidth,
|
|
1950
|
-
className: cn("shrink-0 text-muted-foreground", className),
|
|
1951
|
-
style,
|
|
1952
|
-
"aria-hidden": "true"
|
|
1953
|
-
}
|
|
1954
|
-
);
|
|
1955
|
-
}
|
|
1956
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1957
|
-
Lucide,
|
|
1958
|
-
{
|
|
1959
|
-
"data-slot": "icon",
|
|
1960
|
-
size: px,
|
|
1961
|
-
color,
|
|
1962
|
-
strokeWidth,
|
|
1963
|
-
className: cn("shrink-0", className),
|
|
1964
|
-
style,
|
|
1965
|
-
"aria-hidden": "true"
|
|
1966
|
-
}
|
|
1967
|
-
);
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
// src/components/components/Command/index.tsx
|
|
1971
1985
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1972
1986
|
function Command2({
|
|
1973
1987
|
groups = [],
|
|
@@ -2767,7 +2781,7 @@ function DatePicker(props) {
|
|
|
2767
2781
|
"data-slot": "datepicker-start-panel",
|
|
2768
2782
|
className: "border-r border-border",
|
|
2769
2783
|
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2770
|
-
|
|
2784
|
+
Calendar2,
|
|
2771
2785
|
{
|
|
2772
2786
|
mode: "single",
|
|
2773
2787
|
month: startMonth,
|
|
@@ -2781,7 +2795,7 @@ function DatePicker(props) {
|
|
|
2781
2795
|
}
|
|
2782
2796
|
),
|
|
2783
2797
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2784
|
-
|
|
2798
|
+
Calendar2,
|
|
2785
2799
|
{
|
|
2786
2800
|
mode: "single",
|
|
2787
2801
|
month: endMonth,
|
|
@@ -2793,7 +2807,7 @@ function DatePicker(props) {
|
|
|
2793
2807
|
}
|
|
2794
2808
|
) })
|
|
2795
2809
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2796
|
-
|
|
2810
|
+
Calendar2,
|
|
2797
2811
|
{
|
|
2798
2812
|
mode: "single",
|
|
2799
2813
|
selected: singleDate,
|
|
@@ -2908,7 +2922,7 @@ function DialogOverlay({
|
|
|
2908
2922
|
{
|
|
2909
2923
|
"data-slot": "dialog-overlay",
|
|
2910
2924
|
className: cn(
|
|
2911
|
-
"fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
2925
|
+
"fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 data-closed:fill-mode-forwards",
|
|
2912
2926
|
className
|
|
2913
2927
|
),
|
|
2914
2928
|
...props
|
|
@@ -2928,7 +2942,7 @@ function DialogContent({
|
|
|
2928
2942
|
{
|
|
2929
2943
|
"data-slot": "dialog-content",
|
|
2930
2944
|
className: cn(
|
|
2931
|
-
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
|
|
2945
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:fill-mode-forwards sm:max-w-lg",
|
|
2932
2946
|
className
|
|
2933
2947
|
),
|
|
2934
2948
|
...props,
|
|
@@ -3883,6 +3897,7 @@ function HoverCard2({ content, children, className, style }) {
|
|
|
3883
3897
|
}
|
|
3884
3898
|
|
|
3885
3899
|
// src/components/components/Input/index.tsx
|
|
3900
|
+
var import_runtime12 = require("@pactor-app/runtime");
|
|
3886
3901
|
var import_react15 = require("react");
|
|
3887
3902
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3888
3903
|
function Input2({
|
|
@@ -3893,11 +3908,13 @@ function Input2({
|
|
|
3893
3908
|
type = "text",
|
|
3894
3909
|
placeholder,
|
|
3895
3910
|
disabled,
|
|
3911
|
+
allowClear,
|
|
3896
3912
|
onChange,
|
|
3897
3913
|
className,
|
|
3898
3914
|
style
|
|
3899
3915
|
}) {
|
|
3900
3916
|
const form = useFormContext();
|
|
3917
|
+
const { t } = (0, import_runtime12.useI18n)();
|
|
3901
3918
|
const controlId = (0, import_react15.useId)();
|
|
3902
3919
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
3903
3920
|
(0, import_react15.useEffect)(() => {
|
|
@@ -3907,8 +3924,56 @@ function Input2({
|
|
|
3907
3924
|
}
|
|
3908
3925
|
return void 0;
|
|
3909
3926
|
});
|
|
3927
|
+
const fieldValue = inForm && form && name ? form.values[name] : void 0;
|
|
3928
|
+
const currentValue = typeof fieldValue === "string" ? fieldValue : inForm ? "" : value ?? "";
|
|
3929
|
+
const showClear = allowClear === true && disabled !== true && currentValue !== "";
|
|
3930
|
+
const handleClear = () => {
|
|
3931
|
+
if (inForm && form && name) {
|
|
3932
|
+
form.setValue(name, "");
|
|
3933
|
+
}
|
|
3934
|
+
onChange?.("");
|
|
3935
|
+
};
|
|
3936
|
+
const inFormRoot = inForm === true;
|
|
3937
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3938
|
+
Input,
|
|
3939
|
+
{
|
|
3940
|
+
id: controlId,
|
|
3941
|
+
type,
|
|
3942
|
+
value: currentValue,
|
|
3943
|
+
placeholder,
|
|
3944
|
+
disabled,
|
|
3945
|
+
className: !inFormRoot && allowClear !== true ? className : void 0,
|
|
3946
|
+
style: !inFormRoot && allowClear !== true ? style : void 0,
|
|
3947
|
+
onChange: (event) => {
|
|
3948
|
+
if (inForm && form && name) {
|
|
3949
|
+
form.setValue(name, event.target.value);
|
|
3950
|
+
}
|
|
3951
|
+
onChange?.(event.target.value);
|
|
3952
|
+
}
|
|
3953
|
+
}
|
|
3954
|
+
);
|
|
3955
|
+
const clearButton = showClear ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3956
|
+
"button",
|
|
3957
|
+
{
|
|
3958
|
+
type: "button",
|
|
3959
|
+
"aria-label": t("pactor.input.clear"),
|
|
3960
|
+
className: "shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
3961
|
+
onClick: handleClear,
|
|
3962
|
+
children: "\xD7"
|
|
3963
|
+
}
|
|
3964
|
+
) : null;
|
|
3965
|
+
const control = allowClear === true ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3966
|
+
"span",
|
|
3967
|
+
{
|
|
3968
|
+
className: cn("flex items-center gap-1", !inFormRoot && className),
|
|
3969
|
+
style: inFormRoot ? void 0 : style,
|
|
3970
|
+
children: [
|
|
3971
|
+
input,
|
|
3972
|
+
clearButton
|
|
3973
|
+
]
|
|
3974
|
+
}
|
|
3975
|
+
) : input;
|
|
3910
3976
|
if (inForm && form && name) {
|
|
3911
|
-
const fieldValue = form.values[name];
|
|
3912
3977
|
const error = form.errors[name];
|
|
3913
3978
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3914
3979
|
"div",
|
|
@@ -3925,37 +3990,13 @@ function Input2({
|
|
|
3925
3990
|
children: label
|
|
3926
3991
|
}
|
|
3927
3992
|
) : null,
|
|
3928
|
-
|
|
3929
|
-
Input,
|
|
3930
|
-
{
|
|
3931
|
-
id: controlId,
|
|
3932
|
-
type,
|
|
3933
|
-
value: typeof fieldValue === "string" ? fieldValue : "",
|
|
3934
|
-
placeholder,
|
|
3935
|
-
disabled,
|
|
3936
|
-
onChange: (event) => {
|
|
3937
|
-
form.setValue(name, event.target.value);
|
|
3938
|
-
onChange?.(event.target.value);
|
|
3939
|
-
}
|
|
3940
|
-
}
|
|
3941
|
-
),
|
|
3993
|
+
control,
|
|
3942
3994
|
error ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
3943
3995
|
]
|
|
3944
3996
|
}
|
|
3945
3997
|
);
|
|
3946
3998
|
}
|
|
3947
|
-
return
|
|
3948
|
-
Input,
|
|
3949
|
-
{
|
|
3950
|
-
type,
|
|
3951
|
-
value: value ?? "",
|
|
3952
|
-
placeholder,
|
|
3953
|
-
disabled,
|
|
3954
|
-
className,
|
|
3955
|
-
style,
|
|
3956
|
-
onChange: (event) => onChange?.(event.target.value)
|
|
3957
|
-
}
|
|
3958
|
-
);
|
|
3999
|
+
return control;
|
|
3959
4000
|
}
|
|
3960
4001
|
|
|
3961
4002
|
// src/ui/input-group.tsx
|
|
@@ -4115,7 +4156,7 @@ function InputOTP2({
|
|
|
4115
4156
|
}
|
|
4116
4157
|
|
|
4117
4158
|
// src/components/components/Item/index.tsx
|
|
4118
|
-
var
|
|
4159
|
+
var import_runtime13 = require("@pactor-app/runtime");
|
|
4119
4160
|
|
|
4120
4161
|
// src/ui/item.tsx
|
|
4121
4162
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
@@ -4196,7 +4237,7 @@ function Item2({
|
|
|
4196
4237
|
className,
|
|
4197
4238
|
style
|
|
4198
4239
|
}) {
|
|
4199
|
-
const { renderChildren } = (0,
|
|
4240
|
+
const { renderChildren } = (0, import_runtime13.useRenderer)();
|
|
4200
4241
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
4201
4242
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Item, { className, style, children: [
|
|
4202
4243
|
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
@@ -4257,10 +4298,10 @@ function Label2({ text, htmlFor, className, style }) {
|
|
|
4257
4298
|
|
|
4258
4299
|
// src/components/components/Layout/index.tsx
|
|
4259
4300
|
var import_core = require("@pactor-app/core");
|
|
4260
|
-
var
|
|
4301
|
+
var import_runtime14 = require("@pactor-app/runtime");
|
|
4261
4302
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4262
4303
|
function Layout({ direction, className, style, dslChildren }) {
|
|
4263
|
-
const { renderChildren, context } = (0,
|
|
4304
|
+
const { renderChildren, context } = (0, import_runtime14.useRenderer)();
|
|
4264
4305
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
4265
4306
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
4266
4307
|
) : false;
|
|
@@ -4381,7 +4422,7 @@ function RailTooltip({
|
|
|
4381
4422
|
}
|
|
4382
4423
|
|
|
4383
4424
|
// src/components/components/Sidebar/index.tsx
|
|
4384
|
-
var
|
|
4425
|
+
var import_runtime15 = require("@pactor-app/runtime");
|
|
4385
4426
|
var import_react18 = require("react");
|
|
4386
4427
|
|
|
4387
4428
|
// src/ui/sidebar.tsx
|
|
@@ -4918,7 +4959,7 @@ function useSidebarDrawer() {
|
|
|
4918
4959
|
}
|
|
4919
4960
|
function useOptionalRenderer() {
|
|
4920
4961
|
try {
|
|
4921
|
-
return (0,
|
|
4962
|
+
return (0, import_runtime15.useRenderer)();
|
|
4922
4963
|
} catch {
|
|
4923
4964
|
return null;
|
|
4924
4965
|
}
|
|
@@ -5025,7 +5066,7 @@ function SidebarInner({
|
|
|
5025
5066
|
drawer = true,
|
|
5026
5067
|
children
|
|
5027
5068
|
}) {
|
|
5028
|
-
const { t } = (0,
|
|
5069
|
+
const { t } = (0, import_runtime15.useI18n)();
|
|
5029
5070
|
const isMobile = useIsMobile();
|
|
5030
5071
|
const { state, setOpenMobile, toggleSidebar } = useSidebar();
|
|
5031
5072
|
const collapsed = state === "collapsed";
|
|
@@ -5803,13 +5844,13 @@ function Pagination2({
|
|
|
5803
5844
|
}
|
|
5804
5845
|
|
|
5805
5846
|
// src/components/components/Popover/index.tsx
|
|
5806
|
-
var
|
|
5847
|
+
var import_runtime16 = require("@pactor-app/runtime");
|
|
5807
5848
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5808
5849
|
function isDslNode3(value) {
|
|
5809
5850
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
5810
5851
|
}
|
|
5811
5852
|
function Popover2({ content, children, className, style }) {
|
|
5812
|
-
const { renderChildren } = (0,
|
|
5853
|
+
const { renderChildren } = (0, import_runtime16.useRenderer)();
|
|
5813
5854
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Popover, { children: [
|
|
5814
5855
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5815
5856
|
PopoverTrigger,
|
|
@@ -5949,6 +5990,7 @@ function RadioGroup2({
|
|
|
5949
5990
|
label,
|
|
5950
5991
|
rules,
|
|
5951
5992
|
options = [],
|
|
5993
|
+
direction = "vertical",
|
|
5952
5994
|
value,
|
|
5953
5995
|
disabled,
|
|
5954
5996
|
onChange,
|
|
@@ -5980,10 +6022,14 @@ function RadioGroup2({
|
|
|
5980
6022
|
onValueChange: handleChange,
|
|
5981
6023
|
disabled,
|
|
5982
6024
|
name: inForm ? name : void 0,
|
|
5983
|
-
className: cn(
|
|
6025
|
+
className: cn(
|
|
6026
|
+
direction === "horizontal" && "flex flex-wrap items-center gap-x-6 gap-y-2",
|
|
6027
|
+
!inForm && className
|
|
6028
|
+
),
|
|
5984
6029
|
style: inForm ? void 0 : style,
|
|
5985
6030
|
children: options.map((option, index) => {
|
|
5986
6031
|
const optionId = `${controlId}-${index}`;
|
|
6032
|
+
const optionDisabled = disabled || option.disabled;
|
|
5987
6033
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
|
|
5988
6034
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5989
6035
|
RadioGroupItem,
|
|
@@ -5993,7 +6039,17 @@ function RadioGroup2({
|
|
|
5993
6039
|
disabled: option.disabled
|
|
5994
6040
|
}
|
|
5995
6041
|
),
|
|
5996
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6042
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
6043
|
+
"label",
|
|
6044
|
+
{
|
|
6045
|
+
htmlFor: optionId,
|
|
6046
|
+
className: cn(
|
|
6047
|
+
"text-sm leading-none font-medium",
|
|
6048
|
+
optionDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
6049
|
+
),
|
|
6050
|
+
children: option.label
|
|
6051
|
+
}
|
|
6052
|
+
)
|
|
5997
6053
|
] }, String(option.value));
|
|
5998
6054
|
})
|
|
5999
6055
|
}
|
|
@@ -6015,7 +6071,7 @@ function RadioGroup2({
|
|
|
6015
6071
|
}
|
|
6016
6072
|
|
|
6017
6073
|
// src/components/components/Resizable/index.tsx
|
|
6018
|
-
var
|
|
6074
|
+
var import_runtime17 = require("@pactor-app/runtime");
|
|
6019
6075
|
var import_react22 = require("react");
|
|
6020
6076
|
|
|
6021
6077
|
// src/ui/resizable.tsx
|
|
@@ -6068,7 +6124,7 @@ function Resizable({
|
|
|
6068
6124
|
className,
|
|
6069
6125
|
style
|
|
6070
6126
|
}) {
|
|
6071
|
-
const { renderChildren } = (0,
|
|
6127
|
+
const { renderChildren } = (0, import_runtime17.useRenderer)();
|
|
6072
6128
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react22.Fragment, { children: [
|
|
6073
6129
|
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ResizableHandle, { withHandle: true }) : null,
|
|
6074
6130
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
@@ -6160,7 +6216,7 @@ function ScrollArea2({
|
|
|
6160
6216
|
}
|
|
6161
6217
|
|
|
6162
6218
|
// src/components/components/Select/index.tsx
|
|
6163
|
-
var
|
|
6219
|
+
var import_runtime18 = require("@pactor-app/runtime");
|
|
6164
6220
|
var import_react23 = require("react");
|
|
6165
6221
|
|
|
6166
6222
|
// src/ui/select.tsx
|
|
@@ -6309,7 +6365,7 @@ function Select2({
|
|
|
6309
6365
|
style
|
|
6310
6366
|
}) {
|
|
6311
6367
|
const form = useFormContext();
|
|
6312
|
-
const { t } = (0,
|
|
6368
|
+
const { t } = (0, import_runtime18.useI18n)();
|
|
6313
6369
|
const controlId = (0, import_react23.useId)();
|
|
6314
6370
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6315
6371
|
(0, import_react23.useEffect)(() => {
|
|
@@ -6634,7 +6690,7 @@ function Slider2({
|
|
|
6634
6690
|
}
|
|
6635
6691
|
|
|
6636
6692
|
// src/components/components/Sonner/index.tsx
|
|
6637
|
-
var
|
|
6693
|
+
var import_runtime19 = require("@pactor-app/runtime");
|
|
6638
6694
|
var import_react25 = require("react");
|
|
6639
6695
|
|
|
6640
6696
|
// src/ui/toast.tsx
|
|
@@ -6714,7 +6770,7 @@ function Toaster({ className }) {
|
|
|
6714
6770
|
// src/components/components/Sonner/index.tsx
|
|
6715
6771
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
6716
6772
|
function Sonner({ className, style }) {
|
|
6717
|
-
const { context } = (0,
|
|
6773
|
+
const { context } = (0, import_runtime19.useRenderer)();
|
|
6718
6774
|
(0, import_react25.useEffect)(() => {
|
|
6719
6775
|
const { actions } = context;
|
|
6720
6776
|
if (actions.has("toast")) {
|
|
@@ -6867,7 +6923,7 @@ function Switch2({
|
|
|
6867
6923
|
}
|
|
6868
6924
|
|
|
6869
6925
|
// src/components/components/Table/index.tsx
|
|
6870
|
-
var
|
|
6926
|
+
var import_runtime20 = require("@pactor-app/runtime");
|
|
6871
6927
|
var import_react27 = require("react");
|
|
6872
6928
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
6873
6929
|
function renderCellValue2(value) {
|
|
@@ -6889,8 +6945,8 @@ function Table3({
|
|
|
6889
6945
|
className,
|
|
6890
6946
|
style
|
|
6891
6947
|
}) {
|
|
6892
|
-
const { renderChildren } = (0,
|
|
6893
|
-
const { t } = (0,
|
|
6948
|
+
const { renderChildren } = (0, import_runtime20.useRenderer)();
|
|
6949
|
+
const { t } = (0, import_runtime20.useI18n)();
|
|
6894
6950
|
const [current, setCurrent] = (0, import_react27.useState)(1);
|
|
6895
6951
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
6896
6952
|
const total = dataSource.length;
|
|
@@ -6956,10 +7012,11 @@ function Table3({
|
|
|
6956
7012
|
}
|
|
6957
7013
|
|
|
6958
7014
|
// src/components/components/Tabs/index.tsx
|
|
6959
|
-
var
|
|
7015
|
+
var import_runtime21 = require("@pactor-app/runtime");
|
|
6960
7016
|
|
|
6961
7017
|
// src/ui/tabs.tsx
|
|
6962
7018
|
var import_tabs = require("@base-ui/react/tabs");
|
|
7019
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
6963
7020
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
6964
7021
|
function Tabs({
|
|
6965
7022
|
className,
|
|
@@ -6974,18 +7031,31 @@ function Tabs({
|
|
|
6974
7031
|
}
|
|
6975
7032
|
);
|
|
6976
7033
|
}
|
|
7034
|
+
var tabsListVariants = (0, import_class_variance_authority7.cva)(
|
|
7035
|
+
"group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground",
|
|
7036
|
+
{
|
|
7037
|
+
variants: {
|
|
7038
|
+
variant: {
|
|
7039
|
+
default: "h-9 rounded-lg bg-muted p-[3px]",
|
|
7040
|
+
line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
|
|
7041
|
+
}
|
|
7042
|
+
},
|
|
7043
|
+
defaultVariants: {
|
|
7044
|
+
variant: "default"
|
|
7045
|
+
}
|
|
7046
|
+
}
|
|
7047
|
+
);
|
|
6977
7048
|
function TabsList({
|
|
6978
7049
|
className,
|
|
7050
|
+
variant,
|
|
6979
7051
|
...props
|
|
6980
7052
|
}) {
|
|
6981
7053
|
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
6982
7054
|
import_tabs.Tabs.List,
|
|
6983
7055
|
{
|
|
6984
7056
|
"data-slot": "tabs-list",
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
className
|
|
6988
|
-
),
|
|
7057
|
+
"data-variant": variant ?? "default",
|
|
7058
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
6989
7059
|
...props
|
|
6990
7060
|
}
|
|
6991
7061
|
);
|
|
@@ -6999,7 +7069,12 @@ function TabsTrigger({
|
|
|
6999
7069
|
{
|
|
7000
7070
|
"data-slot": "tabs-trigger",
|
|
7001
7071
|
className: cn(
|
|
7002
|
-
"inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50
|
|
7072
|
+
"inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7073
|
+
// default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
|
|
7074
|
+
"group-data-[variant=default]/tabs-list:data-active:border-border group-data-[variant=default]/tabs-list:data-active:bg-card group-data-[variant=default]/tabs-list:data-active:shadow-sm",
|
|
7075
|
+
// line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
|
|
7076
|
+
//(叠在 List 的底边轨道上),无底色/圆角/阴影
|
|
7077
|
+
"group-data-[variant=line]/tabs-list:-mb-px group-data-[variant=line]/tabs-list:h-9 group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:border-x-0 group-data-[variant=line]/tabs-list:border-t-0 group-data-[variant=line]/tabs-list:border-b-2 group-data-[variant=line]/tabs-list:py-1.5 group-data-[variant=line]/tabs-list:text-muted-foreground group-data-[variant=line]/tabs-list:data-active:border-b-primary group-data-[variant=line]/tabs-list:data-active:text-foreground",
|
|
7003
7078
|
className
|
|
7004
7079
|
),
|
|
7005
7080
|
...props
|
|
@@ -7022,8 +7097,8 @@ function TabsContent({
|
|
|
7022
7097
|
|
|
7023
7098
|
// src/components/components/Tabs/index.tsx
|
|
7024
7099
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
7025
|
-
function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
7026
|
-
const { renderChildren } = (0,
|
|
7100
|
+
function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
|
|
7101
|
+
const { renderChildren } = (0, import_runtime21.useRenderer)();
|
|
7027
7102
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
7028
7103
|
Tabs,
|
|
7029
7104
|
{
|
|
@@ -7033,7 +7108,7 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
|
7033
7108
|
className,
|
|
7034
7109
|
style,
|
|
7035
7110
|
children: [
|
|
7036
|
-
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsList, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
|
|
7111
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
|
|
7037
7112
|
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
|
|
7038
7113
|
]
|
|
7039
7114
|
}
|
|
@@ -7148,9 +7223,9 @@ function Textarea2({
|
|
|
7148
7223
|
|
|
7149
7224
|
// src/ui/toggle.tsx
|
|
7150
7225
|
var import_toggle = require("@base-ui/react/toggle");
|
|
7151
|
-
var
|
|
7226
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
7152
7227
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
7153
|
-
var toggleVariants = (0,
|
|
7228
|
+
var toggleVariants = (0, import_class_variance_authority8.cva)(
|
|
7154
7229
|
"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:bg-accent data-pressed:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7155
7230
|
{
|
|
7156
7231
|
variants: {
|
|
@@ -7325,9 +7400,9 @@ function Tooltip3({ content, children, className, style }) {
|
|
|
7325
7400
|
}
|
|
7326
7401
|
|
|
7327
7402
|
// src/ui/typography.tsx
|
|
7328
|
-
var
|
|
7403
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
7329
7404
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
7330
|
-
var typographyVariants = (0,
|
|
7405
|
+
var typographyVariants = (0, import_class_variance_authority9.cva)("", {
|
|
7331
7406
|
variants: {
|
|
7332
7407
|
variant: {
|
|
7333
7408
|
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight text-balance",
|
|
@@ -7445,7 +7520,7 @@ var builtinComponents = {
|
|
|
7445
7520
|
Tooltip: Tooltip3,
|
|
7446
7521
|
HoverCard: HoverCard2,
|
|
7447
7522
|
// 复合类扩展组件(第三批)
|
|
7448
|
-
Calendar:
|
|
7523
|
+
Calendar: Calendar3,
|
|
7449
7524
|
DatePicker,
|
|
7450
7525
|
InputOTP: InputOTP2,
|
|
7451
7526
|
Combobox: Combobox2,
|
|
@@ -7524,7 +7599,7 @@ function collectDefaultOpenKeys(registry, activeMenuId) {
|
|
|
7524
7599
|
// src/layout/admin/AdminLayout.tsx
|
|
7525
7600
|
var import_permission = require("@pactor-app/permission");
|
|
7526
7601
|
var import_router = require("@pactor-app/router");
|
|
7527
|
-
var
|
|
7602
|
+
var import_runtime22 = require("@pactor-app/runtime");
|
|
7528
7603
|
var import_react30 = require("react");
|
|
7529
7604
|
|
|
7530
7605
|
// src/layout/admin/use-media-query.ts
|
|
@@ -7771,7 +7846,7 @@ function AdminLayout({
|
|
|
7771
7846
|
headerExtra,
|
|
7772
7847
|
children
|
|
7773
7848
|
}) {
|
|
7774
|
-
const { t } = (0,
|
|
7849
|
+
const { t } = (0, import_runtime22.useI18n)();
|
|
7775
7850
|
const mode = config.mode ?? "top-side";
|
|
7776
7851
|
const showHeader = config.header ?? true;
|
|
7777
7852
|
const showSidebar = (config.sidebar ?? true) && mode !== "top-bottom";
|
|
@@ -8414,7 +8489,7 @@ var OverlayManager = class {
|
|
|
8414
8489
|
};
|
|
8415
8490
|
|
|
8416
8491
|
// src/interaction/actions.ts
|
|
8417
|
-
var
|
|
8492
|
+
var import_runtime23 = require("@pactor-app/runtime");
|
|
8418
8493
|
function createUiBridge() {
|
|
8419
8494
|
return {};
|
|
8420
8495
|
}
|
|
@@ -8430,7 +8505,7 @@ function registerInteractionActions(actions, manager, ui) {
|
|
|
8430
8505
|
return failure("[pactor-interaction] overlay.open \u7F3A\u5C11 overlay \u914D\u7F6E\u53C2\u6570");
|
|
8431
8506
|
}
|
|
8432
8507
|
const { content, ...rest } = overlay;
|
|
8433
|
-
const resolved = (0,
|
|
8508
|
+
const resolved = (0, import_runtime23.resolveDeep)(rest, ctx.scope);
|
|
8434
8509
|
const config = { ...resolved, content };
|
|
8435
8510
|
const data = await manager.open(config, {
|
|
8436
8511
|
parentScope: { ...ctx.scope }
|
|
@@ -8493,7 +8568,7 @@ function isRecord(value) {
|
|
|
8493
8568
|
}
|
|
8494
8569
|
|
|
8495
8570
|
// src/interaction/provider.tsx
|
|
8496
|
-
var
|
|
8571
|
+
var import_runtime24 = require("@pactor-app/runtime");
|
|
8497
8572
|
var import_react32 = require("react");
|
|
8498
8573
|
var import_react_dom = require("react-dom");
|
|
8499
8574
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
@@ -8509,8 +8584,9 @@ function InteractionProvider({
|
|
|
8509
8584
|
children
|
|
8510
8585
|
}) {
|
|
8511
8586
|
const [confirmState, setConfirmState] = (0, import_react32.useState)(null);
|
|
8587
|
+
const [confirmOpen, setConfirmOpen] = (0, import_react32.useState)(false);
|
|
8512
8588
|
const [toasts, setToasts] = (0, import_react32.useState)([]);
|
|
8513
|
-
const { t } = (0,
|
|
8589
|
+
const { t } = (0, import_runtime24.useI18n)();
|
|
8514
8590
|
const { modal, message } = (0, import_react32.useMemo)(() => {
|
|
8515
8591
|
const pushToast = (type, content) => {
|
|
8516
8592
|
const id = Date.now() + Math.random();
|
|
@@ -8522,6 +8598,7 @@ function InteractionProvider({
|
|
|
8522
8598
|
const modalImpl = {
|
|
8523
8599
|
confirm(config) {
|
|
8524
8600
|
setConfirmState({ ...config });
|
|
8601
|
+
setConfirmOpen(true);
|
|
8525
8602
|
}
|
|
8526
8603
|
};
|
|
8527
8604
|
const messageImpl = {
|
|
@@ -8542,12 +8619,12 @@ function InteractionProvider({
|
|
|
8542
8619
|
}, [bridge, modal, message]);
|
|
8543
8620
|
const handleOk = () => {
|
|
8544
8621
|
const state = confirmState;
|
|
8545
|
-
|
|
8622
|
+
setConfirmOpen(false);
|
|
8546
8623
|
state?.onOk?.();
|
|
8547
8624
|
};
|
|
8548
8625
|
const handleCancel = () => {
|
|
8549
8626
|
const state = confirmState;
|
|
8550
|
-
|
|
8627
|
+
setConfirmOpen(false);
|
|
8551
8628
|
state?.onCancel?.();
|
|
8552
8629
|
};
|
|
8553
8630
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
|
|
@@ -8557,12 +8634,17 @@ function InteractionProvider({
|
|
|
8557
8634
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8558
8635
|
Dialog,
|
|
8559
8636
|
{
|
|
8560
|
-
open:
|
|
8637
|
+
open: confirmOpen,
|
|
8561
8638
|
onOpenChange: (open) => {
|
|
8562
8639
|
if (!open) {
|
|
8563
8640
|
handleCancel();
|
|
8564
8641
|
}
|
|
8565
8642
|
},
|
|
8643
|
+
onOpenChangeComplete: (open) => {
|
|
8644
|
+
if (!open) {
|
|
8645
|
+
setConfirmState(null);
|
|
8646
|
+
}
|
|
8647
|
+
},
|
|
8566
8648
|
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogContent, { "data-slot": "confirm-dialog", className: "sm:max-w-sm", children: [
|
|
8567
8649
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogHeader, { children: [
|
|
8568
8650
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DialogTitle, { children: confirmState?.title ?? "" }),
|
|
@@ -8609,7 +8691,7 @@ function InteractionProvider({
|
|
|
8609
8691
|
|
|
8610
8692
|
// src/interaction/host.tsx
|
|
8611
8693
|
var import_lucide_react27 = require("lucide-react");
|
|
8612
|
-
var
|
|
8694
|
+
var import_runtime25 = require("@pactor-app/runtime");
|
|
8613
8695
|
var import_react33 = require("react");
|
|
8614
8696
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
8615
8697
|
function toCssWidth(width) {
|
|
@@ -8619,7 +8701,7 @@ function toCssWidth(width) {
|
|
|
8619
8701
|
return typeof width === "number" ? `${width}px` : width;
|
|
8620
8702
|
}
|
|
8621
8703
|
function OverlayHost({ manager, resolvePage }) {
|
|
8622
|
-
const renderer = (0,
|
|
8704
|
+
const renderer = (0, import_runtime25.useRenderer)();
|
|
8623
8705
|
const stack = (0, import_react33.useSyncExternalStore)(
|
|
8624
8706
|
(onChange) => manager.subscribe(onChange),
|
|
8625
8707
|
() => manager.stack()
|
|
@@ -8652,7 +8734,7 @@ function OverlayEntryView({
|
|
|
8652
8734
|
renderer,
|
|
8653
8735
|
resolvePage
|
|
8654
8736
|
}) {
|
|
8655
|
-
const { t } = (0,
|
|
8737
|
+
const { t } = (0, import_runtime25.useI18n)();
|
|
8656
8738
|
const handleCancel = () => manager.close(entry.id);
|
|
8657
8739
|
let body = null;
|
|
8658
8740
|
if (entry.content) {
|
|
@@ -8720,7 +8802,7 @@ function ShadcnDrawerView({
|
|
|
8720
8802
|
onCancel,
|
|
8721
8803
|
children
|
|
8722
8804
|
}) {
|
|
8723
|
-
const { t } = (0,
|
|
8805
|
+
const { t } = (0, import_runtime25.useI18n)();
|
|
8724
8806
|
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
|
|
8725
8807
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8726
8808
|
Drawer,
|
|
@@ -8791,7 +8873,7 @@ function PageOverlayBody({
|
|
|
8791
8873
|
return;
|
|
8792
8874
|
}
|
|
8793
8875
|
const host = renderer.context;
|
|
8794
|
-
created = (0,
|
|
8876
|
+
created = (0, import_runtime25.createPageRuntime)(pageDsl, {
|
|
8795
8877
|
app: host.app,
|
|
8796
8878
|
user: host.user,
|
|
8797
8879
|
components: host.components,
|
|
@@ -8820,7 +8902,7 @@ function PageOverlayBody({
|
|
|
8820
8902
|
if (!child) {
|
|
8821
8903
|
return null;
|
|
8822
8904
|
}
|
|
8823
|
-
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_runtime25.PageRuntimeView, { runtime: child });
|
|
8824
8906
|
}
|
|
8825
8907
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8826
8908
|
0 && (module.exports = {
|