@pactor-app/ui 1.7.0 → 1.9.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-PMYLC26E.js → chunk-KUFQSYTS.js} +82 -38
- package/dist/{chunk-ZM3WJZZ7.js → chunk-PECP7DJB.js} +1 -1
- package/dist/{chunk-7KC6DMKH.js → chunk-S3SMCICK.js} +10 -3
- package/dist/{chunk-FJPRXEKQ.js → chunk-TAJXMOEX.js} +2 -2
- package/dist/{chunk-L4Z7MNYY.js → chunk-VM4FESQB.js} +16 -2
- package/dist/{chunk-E2TD6JD2.js → chunk-VT5XP4U4.js} +29 -10
- package/dist/components/index.cjs +459 -384
- package/dist/components/index.d.cts +21 -7
- package/dist/components/index.d.ts +21 -7
- package/dist/components/index.js +4 -4
- package/dist/index.cjs +481 -399
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/interaction/index.cjs +10 -3
- package/dist/interaction/index.d.cts +3 -1
- package/dist/interaction/index.d.ts +3 -1
- package/dist/interaction/index.js +1 -1
- package/dist/layout/index.cjs +16 -2
- package/dist/layout/index.js +3 -3
- package/dist/{typography-DsGdDBc2.d.cts → typography-BYDh5oku.d.cts} +14 -1
- package/dist/{typography-DsGdDBc2.d.ts → typography-BYDh5oku.d.ts} +14 -1
- package/dist/ui/index.cjs +44 -11
- package/dist/ui/index.d.cts +10 -14
- package/dist/ui/index.d.ts +10 -14
- package/dist/ui/index.js +2 -2
- package/package.json +5 -5
- package/styles.css +57 -27
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,14 +1195,28 @@ function Calendar2({
|
|
|
1027
1195
|
}
|
|
1028
1196
|
|
|
1029
1197
|
// src/ui/card.tsx
|
|
1030
|
-
var
|
|
1031
|
-
|
|
1032
|
-
|
|
1198
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1199
|
+
var cardRoundedClasses = {
|
|
1200
|
+
none: "rounded-none",
|
|
1201
|
+
sm: "rounded-sm",
|
|
1202
|
+
md: "rounded-md",
|
|
1203
|
+
lg: "rounded-lg",
|
|
1204
|
+
xl: "rounded-xl",
|
|
1205
|
+
"2xl": "rounded-2xl",
|
|
1206
|
+
"3xl": "rounded-3xl"
|
|
1207
|
+
};
|
|
1208
|
+
function Card({
|
|
1209
|
+
className,
|
|
1210
|
+
rounded = "lg",
|
|
1211
|
+
...props
|
|
1212
|
+
}) {
|
|
1213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1033
1214
|
"div",
|
|
1034
1215
|
{
|
|
1035
1216
|
"data-slot": "card",
|
|
1036
1217
|
className: cn(
|
|
1037
|
-
"flex flex-col gap-6
|
|
1218
|
+
"flex flex-col gap-6 border border-border bg-card py-6 text-card-foreground shadow-(--card-shadow)",
|
|
1219
|
+
cardRoundedClasses[rounded],
|
|
1038
1220
|
className
|
|
1039
1221
|
),
|
|
1040
1222
|
...props
|
|
@@ -1042,7 +1224,7 @@ function Card({ className, ...props }) {
|
|
|
1042
1224
|
);
|
|
1043
1225
|
}
|
|
1044
1226
|
function CardHeader({ className, ...props }) {
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1046
1228
|
"div",
|
|
1047
1229
|
{
|
|
1048
1230
|
"data-slot": "card-header",
|
|
@@ -1055,7 +1237,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1055
1237
|
);
|
|
1056
1238
|
}
|
|
1057
1239
|
function CardTitle({ className, ...props }) {
|
|
1058
|
-
return /* @__PURE__ */ (0,
|
|
1240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1059
1241
|
"div",
|
|
1060
1242
|
{
|
|
1061
1243
|
"data-slot": "card-title",
|
|
@@ -1065,7 +1247,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1065
1247
|
);
|
|
1066
1248
|
}
|
|
1067
1249
|
function CardContent({ className, ...props }) {
|
|
1068
|
-
return /* @__PURE__ */ (0,
|
|
1250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1069
1251
|
"div",
|
|
1070
1252
|
{
|
|
1071
1253
|
"data-slot": "card-content",
|
|
@@ -1076,16 +1258,17 @@ function CardContent({ className, ...props }) {
|
|
|
1076
1258
|
}
|
|
1077
1259
|
|
|
1078
1260
|
// src/components/components/Card/index.tsx
|
|
1079
|
-
var
|
|
1080
|
-
function Card2({ title, bordered = true, className, style, children }) {
|
|
1081
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1262
|
+
function Card2({ title, bordered = true, rounded, className, style, children }) {
|
|
1263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1082
1264
|
Card,
|
|
1083
1265
|
{
|
|
1266
|
+
rounded,
|
|
1084
1267
|
className: cn("gap-4 py-4", !bordered && "border-transparent shadow-none", className),
|
|
1085
1268
|
style,
|
|
1086
1269
|
children: [
|
|
1087
|
-
title ? /* @__PURE__ */ (0,
|
|
1088
|
-
/* @__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 })
|
|
1089
1272
|
]
|
|
1090
1273
|
}
|
|
1091
1274
|
);
|
|
@@ -1097,9 +1280,9 @@ var import_react5 = require("react");
|
|
|
1097
1280
|
|
|
1098
1281
|
// src/ui/carousel.tsx
|
|
1099
1282
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1100
|
-
var
|
|
1283
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1101
1284
|
var React2 = __toESM(require("react"), 1);
|
|
1102
|
-
var
|
|
1285
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1103
1286
|
var CarouselContext = React2.createContext(null);
|
|
1104
1287
|
function useCarousel() {
|
|
1105
1288
|
const context = React2.useContext(CarouselContext);
|
|
@@ -1154,7 +1337,7 @@ function Carousel({
|
|
|
1154
1337
|
api.off("select", onSelect);
|
|
1155
1338
|
};
|
|
1156
1339
|
}, [api, onSelect]);
|
|
1157
|
-
return /* @__PURE__ */ (0,
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1158
1341
|
CarouselContext.Provider,
|
|
1159
1342
|
{
|
|
1160
1343
|
value: {
|
|
@@ -1167,7 +1350,7 @@ function Carousel({
|
|
|
1167
1350
|
canScrollPrev,
|
|
1168
1351
|
canScrollNext
|
|
1169
1352
|
},
|
|
1170
|
-
children: /* @__PURE__ */ (0,
|
|
1353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1171
1354
|
"div",
|
|
1172
1355
|
{
|
|
1173
1356
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -1184,7 +1367,7 @@ function Carousel({
|
|
|
1184
1367
|
}
|
|
1185
1368
|
function CarouselContent({ className, ...props }) {
|
|
1186
1369
|
const { carouselRef, orientation } = useCarousel();
|
|
1187
|
-
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)(
|
|
1188
1371
|
"div",
|
|
1189
1372
|
{
|
|
1190
1373
|
className: cn(
|
|
@@ -1198,7 +1381,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1198
1381
|
}
|
|
1199
1382
|
function CarouselItem({ className, ...props }) {
|
|
1200
1383
|
const { orientation } = useCarousel();
|
|
1201
|
-
return /* @__PURE__ */ (0,
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1202
1385
|
"div",
|
|
1203
1386
|
{
|
|
1204
1387
|
role: "group",
|
|
@@ -1220,7 +1403,7 @@ function CarouselPrevious({
|
|
|
1220
1403
|
...props
|
|
1221
1404
|
}) {
|
|
1222
1405
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1223
|
-
return /* @__PURE__ */ (0,
|
|
1406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1224
1407
|
Button,
|
|
1225
1408
|
{
|
|
1226
1409
|
"data-slot": "carousel-previous",
|
|
@@ -1235,8 +1418,8 @@ function CarouselPrevious({
|
|
|
1235
1418
|
onClick: scrollPrev,
|
|
1236
1419
|
...props,
|
|
1237
1420
|
children: [
|
|
1238
|
-
/* @__PURE__ */ (0,
|
|
1239
|
-
/* @__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" })
|
|
1240
1423
|
]
|
|
1241
1424
|
}
|
|
1242
1425
|
);
|
|
@@ -1248,7 +1431,7 @@ function CarouselNext({
|
|
|
1248
1431
|
...props
|
|
1249
1432
|
}) {
|
|
1250
1433
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1251
|
-
return /* @__PURE__ */ (0,
|
|
1434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1252
1435
|
Button,
|
|
1253
1436
|
{
|
|
1254
1437
|
"data-slot": "carousel-next",
|
|
@@ -1263,15 +1446,15 @@ function CarouselNext({
|
|
|
1263
1446
|
onClick: scrollNext,
|
|
1264
1447
|
...props,
|
|
1265
1448
|
children: [
|
|
1266
|
-
/* @__PURE__ */ (0,
|
|
1267
|
-
/* @__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" })
|
|
1268
1451
|
]
|
|
1269
1452
|
}
|
|
1270
1453
|
);
|
|
1271
1454
|
}
|
|
1272
1455
|
|
|
1273
1456
|
// src/components/components/Carousel/index.tsx
|
|
1274
|
-
var
|
|
1457
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1275
1458
|
function isDslNode(item) {
|
|
1276
1459
|
return typeof item.type === "string";
|
|
1277
1460
|
}
|
|
@@ -1296,7 +1479,7 @@ function Carousel2({
|
|
|
1296
1479
|
}, interval);
|
|
1297
1480
|
return () => clearInterval(timer);
|
|
1298
1481
|
}, [api, autoplay, loop]);
|
|
1299
|
-
return /* @__PURE__ */ (0,
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1300
1483
|
Carousel,
|
|
1301
1484
|
{
|
|
1302
1485
|
opts: { loop: loop === true },
|
|
@@ -1304,7 +1487,7 @@ function Carousel2({
|
|
|
1304
1487
|
className,
|
|
1305
1488
|
style,
|
|
1306
1489
|
children: [
|
|
1307
|
-
/* @__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)(
|
|
1308
1491
|
"img",
|
|
1309
1492
|
{
|
|
1310
1493
|
src: item.src,
|
|
@@ -1312,8 +1495,8 @@ function Carousel2({
|
|
|
1312
1495
|
className: "w-full rounded-md object-cover"
|
|
1313
1496
|
}
|
|
1314
1497
|
) }, index)) }),
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselPrevious, {}),
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselNext, {})
|
|
1317
1500
|
]
|
|
1318
1501
|
}
|
|
1319
1502
|
);
|
|
@@ -1324,10 +1507,10 @@ var import_react6 = require("react");
|
|
|
1324
1507
|
|
|
1325
1508
|
// src/ui/checkbox.tsx
|
|
1326
1509
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1327
|
-
var
|
|
1328
|
-
var
|
|
1510
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1511
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1329
1512
|
function Checkbox({ className, ...props }) {
|
|
1330
|
-
return /* @__PURE__ */ (0,
|
|
1513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1331
1514
|
import_checkbox.Checkbox.Root,
|
|
1332
1515
|
{
|
|
1333
1516
|
"data-slot": "checkbox",
|
|
@@ -1336,12 +1519,12 @@ function Checkbox({ className, ...props }) {
|
|
|
1336
1519
|
className
|
|
1337
1520
|
),
|
|
1338
1521
|
...props,
|
|
1339
|
-
children: /* @__PURE__ */ (0,
|
|
1522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1340
1523
|
import_checkbox.Checkbox.Indicator,
|
|
1341
1524
|
{
|
|
1342
1525
|
"data-slot": "checkbox-indicator",
|
|
1343
1526
|
className: "flex items-center justify-center text-current",
|
|
1344
|
-
children: /* @__PURE__ */ (0,
|
|
1527
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.CheckIcon, { className: "size-3.5" })
|
|
1345
1528
|
}
|
|
1346
1529
|
)
|
|
1347
1530
|
}
|
|
@@ -1349,7 +1532,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1349
1532
|
}
|
|
1350
1533
|
|
|
1351
1534
|
// src/components/components/Checkbox/index.tsx
|
|
1352
|
-
var
|
|
1535
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1353
1536
|
function Checkbox2({
|
|
1354
1537
|
name,
|
|
1355
1538
|
label,
|
|
@@ -1378,13 +1561,13 @@ function Checkbox2({
|
|
|
1378
1561
|
}
|
|
1379
1562
|
onChange?.(next);
|
|
1380
1563
|
};
|
|
1381
|
-
const control = /* @__PURE__ */ (0,
|
|
1564
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1382
1565
|
"span",
|
|
1383
1566
|
{
|
|
1384
1567
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
1385
1568
|
style: inForm ? void 0 : style,
|
|
1386
1569
|
children: [
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1388
1571
|
Checkbox,
|
|
1389
1572
|
{
|
|
1390
1573
|
id: controlId,
|
|
@@ -1394,12 +1577,12 @@ function Checkbox2({
|
|
|
1394
1577
|
onCheckedChange: handleChange
|
|
1395
1578
|
}
|
|
1396
1579
|
),
|
|
1397
|
-
label ? /* @__PURE__ */ (0,
|
|
1580
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
1398
1581
|
]
|
|
1399
1582
|
}
|
|
1400
1583
|
);
|
|
1401
1584
|
if (inForm && form && name) {
|
|
1402
|
-
return /* @__PURE__ */ (0,
|
|
1585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1403
1586
|
"div",
|
|
1404
1587
|
{
|
|
1405
1588
|
"data-slot": "form-item",
|
|
@@ -1407,7 +1590,7 @@ function Checkbox2({
|
|
|
1407
1590
|
style,
|
|
1408
1591
|
children: [
|
|
1409
1592
|
control,
|
|
1410
|
-
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
|
|
1411
1594
|
]
|
|
1412
1595
|
}
|
|
1413
1596
|
);
|
|
@@ -1420,19 +1603,19 @@ var import_react7 = require("react");
|
|
|
1420
1603
|
|
|
1421
1604
|
// src/ui/collapsible.tsx
|
|
1422
1605
|
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1606
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1607
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1425
1608
|
function Collapsible({
|
|
1426
1609
|
...props
|
|
1427
1610
|
}) {
|
|
1428
|
-
return /* @__PURE__ */ (0,
|
|
1611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1429
1612
|
}
|
|
1430
1613
|
function CollapsibleTrigger({
|
|
1431
1614
|
className,
|
|
1432
1615
|
children,
|
|
1433
1616
|
...props
|
|
1434
1617
|
}) {
|
|
1435
|
-
return /* @__PURE__ */ (0,
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1436
1619
|
import_collapsible.Collapsible.Trigger,
|
|
1437
1620
|
{
|
|
1438
1621
|
"data-slot": "collapsible-trigger",
|
|
@@ -1443,7 +1626,7 @@ function CollapsibleTrigger({
|
|
|
1443
1626
|
...props,
|
|
1444
1627
|
children: [
|
|
1445
1628
|
children,
|
|
1446
|
-
/* @__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" })
|
|
1447
1630
|
]
|
|
1448
1631
|
}
|
|
1449
1632
|
);
|
|
@@ -1452,7 +1635,7 @@ function CollapsibleContent({
|
|
|
1452
1635
|
className,
|
|
1453
1636
|
...props
|
|
1454
1637
|
}) {
|
|
1455
|
-
return /* @__PURE__ */ (0,
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1456
1639
|
import_collapsible.Collapsible.Panel,
|
|
1457
1640
|
{
|
|
1458
1641
|
"data-slot": "collapsible-content",
|
|
@@ -1466,7 +1649,7 @@ function CollapsibleContent({
|
|
|
1466
1649
|
}
|
|
1467
1650
|
|
|
1468
1651
|
// src/components/components/Collapsible/index.tsx
|
|
1469
|
-
var
|
|
1652
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1470
1653
|
function Collapsible2({
|
|
1471
1654
|
title,
|
|
1472
1655
|
open,
|
|
@@ -1476,7 +1659,7 @@ function Collapsible2({
|
|
|
1476
1659
|
}) {
|
|
1477
1660
|
const [innerOpen, setInnerOpen] = (0, import_react7.useState)(false);
|
|
1478
1661
|
const controlled = open !== void 0;
|
|
1479
|
-
return /* @__PURE__ */ (0,
|
|
1662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1480
1663
|
Collapsible,
|
|
1481
1664
|
{
|
|
1482
1665
|
open: controlled ? open : innerOpen,
|
|
@@ -1488,8 +1671,8 @@ function Collapsible2({
|
|
|
1488
1671
|
className,
|
|
1489
1672
|
style,
|
|
1490
1673
|
children: [
|
|
1491
|
-
title ? /* @__PURE__ */ (0,
|
|
1492
|
-
/* @__PURE__ */ (0,
|
|
1674
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CollapsibleTrigger, { children: title }) : null,
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CollapsibleContent, { children })
|
|
1493
1676
|
]
|
|
1494
1677
|
}
|
|
1495
1678
|
);
|
|
@@ -1499,20 +1682,20 @@ function Collapsible2({
|
|
|
1499
1682
|
var import_react8 = require("react");
|
|
1500
1683
|
|
|
1501
1684
|
// src/ui/combobox.tsx
|
|
1502
|
-
var
|
|
1685
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1503
1686
|
|
|
1504
1687
|
// src/ui/popover.tsx
|
|
1505
1688
|
var import_popover = require("@base-ui/react/popover");
|
|
1506
|
-
var
|
|
1689
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1507
1690
|
function Popover({
|
|
1508
1691
|
...props
|
|
1509
1692
|
}) {
|
|
1510
|
-
return /* @__PURE__ */ (0,
|
|
1693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1511
1694
|
}
|
|
1512
1695
|
function PopoverTrigger({
|
|
1513
1696
|
...props
|
|
1514
1697
|
}) {
|
|
1515
|
-
return /* @__PURE__ */ (0,
|
|
1698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1516
1699
|
}
|
|
1517
1700
|
function PopoverContent({
|
|
1518
1701
|
className,
|
|
@@ -1522,7 +1705,7 @@ function PopoverContent({
|
|
|
1522
1705
|
anchor,
|
|
1523
1706
|
...props
|
|
1524
1707
|
}) {
|
|
1525
|
-
return /* @__PURE__ */ (0,
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1526
1709
|
import_popover.Popover.Positioner,
|
|
1527
1710
|
{
|
|
1528
1711
|
align,
|
|
@@ -1530,7 +1713,7 @@ function PopoverContent({
|
|
|
1530
1713
|
sideOffset,
|
|
1531
1714
|
anchor,
|
|
1532
1715
|
className: "isolate z-50",
|
|
1533
|
-
children: /* @__PURE__ */ (0,
|
|
1716
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1534
1717
|
import_popover.Popover.Popup,
|
|
1535
1718
|
{
|
|
1536
1719
|
"data-slot": "popover-content",
|
|
@@ -1546,20 +1729,20 @@ function PopoverContent({
|
|
|
1546
1729
|
}
|
|
1547
1730
|
|
|
1548
1731
|
// src/ui/combobox.tsx
|
|
1549
|
-
var
|
|
1732
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1550
1733
|
function Combobox({
|
|
1551
1734
|
open,
|
|
1552
1735
|
onOpenChange,
|
|
1553
1736
|
children
|
|
1554
1737
|
}) {
|
|
1555
|
-
return /* @__PURE__ */ (0,
|
|
1738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Popover, { open, onOpenChange: (next) => onOpenChange?.(next), children });
|
|
1556
1739
|
}
|
|
1557
1740
|
function ComboboxTrigger({
|
|
1558
1741
|
className,
|
|
1559
1742
|
children,
|
|
1560
1743
|
...props
|
|
1561
1744
|
}) {
|
|
1562
|
-
return /* @__PURE__ */ (0,
|
|
1745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1563
1746
|
PopoverTrigger,
|
|
1564
1747
|
{
|
|
1565
1748
|
"data-slot": "combobox-trigger",
|
|
@@ -1569,8 +1752,8 @@ function ComboboxTrigger({
|
|
|
1569
1752
|
),
|
|
1570
1753
|
...props,
|
|
1571
1754
|
children: [
|
|
1572
|
-
/* @__PURE__ */ (0,
|
|
1573
|
-
/* @__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" })
|
|
1574
1757
|
]
|
|
1575
1758
|
}
|
|
1576
1759
|
);
|
|
@@ -1580,7 +1763,7 @@ function ComboboxContent({
|
|
|
1580
1763
|
children,
|
|
1581
1764
|
...props
|
|
1582
1765
|
}) {
|
|
1583
|
-
return /* @__PURE__ */ (0,
|
|
1766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1584
1767
|
PopoverContent,
|
|
1585
1768
|
{
|
|
1586
1769
|
"data-slot": "combobox-content",
|
|
@@ -1593,13 +1776,13 @@ function ComboboxContent({
|
|
|
1593
1776
|
|
|
1594
1777
|
// src/ui/command.tsx
|
|
1595
1778
|
var import_cmdk = require("cmdk");
|
|
1596
|
-
var
|
|
1597
|
-
var
|
|
1779
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1780
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1598
1781
|
function Command({
|
|
1599
1782
|
className,
|
|
1600
1783
|
...props
|
|
1601
1784
|
}) {
|
|
1602
|
-
return /* @__PURE__ */ (0,
|
|
1785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1603
1786
|
import_cmdk.Command,
|
|
1604
1787
|
{
|
|
1605
1788
|
"data-slot": "command",
|
|
@@ -1615,14 +1798,14 @@ function CommandInput({
|
|
|
1615
1798
|
className,
|
|
1616
1799
|
...props
|
|
1617
1800
|
}) {
|
|
1618
|
-
return /* @__PURE__ */ (0,
|
|
1801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1619
1802
|
"div",
|
|
1620
1803
|
{
|
|
1621
1804
|
"data-slot": "command-input-wrapper",
|
|
1622
1805
|
className: "flex items-center gap-2 border-b border-border px-3",
|
|
1623
1806
|
children: [
|
|
1624
|
-
/* @__PURE__ */ (0,
|
|
1625
|
-
/* @__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)(
|
|
1626
1809
|
import_cmdk.Command.Input,
|
|
1627
1810
|
{
|
|
1628
1811
|
"data-slot": "command-input",
|
|
@@ -1641,7 +1824,7 @@ function CommandList({
|
|
|
1641
1824
|
className,
|
|
1642
1825
|
...props
|
|
1643
1826
|
}) {
|
|
1644
|
-
return /* @__PURE__ */ (0,
|
|
1827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1645
1828
|
import_cmdk.Command.List,
|
|
1646
1829
|
{
|
|
1647
1830
|
"data-slot": "command-list",
|
|
@@ -1656,7 +1839,7 @@ function CommandList({
|
|
|
1656
1839
|
function CommandEmpty({
|
|
1657
1840
|
...props
|
|
1658
1841
|
}) {
|
|
1659
|
-
return /* @__PURE__ */ (0,
|
|
1842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1660
1843
|
import_cmdk.Command.Empty,
|
|
1661
1844
|
{
|
|
1662
1845
|
"data-slot": "command-empty",
|
|
@@ -1669,7 +1852,7 @@ function CommandGroup({
|
|
|
1669
1852
|
className,
|
|
1670
1853
|
...props
|
|
1671
1854
|
}) {
|
|
1672
|
-
return /* @__PURE__ */ (0,
|
|
1855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1673
1856
|
import_cmdk.Command.Group,
|
|
1674
1857
|
{
|
|
1675
1858
|
"data-slot": "command-group",
|
|
@@ -1685,7 +1868,7 @@ function CommandItem({
|
|
|
1685
1868
|
className,
|
|
1686
1869
|
...props
|
|
1687
1870
|
}) {
|
|
1688
|
-
return /* @__PURE__ */ (0,
|
|
1871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1689
1872
|
import_cmdk.Command.Item,
|
|
1690
1873
|
{
|
|
1691
1874
|
"data-slot": "command-item",
|
|
@@ -1699,7 +1882,7 @@ function CommandItem({
|
|
|
1699
1882
|
}
|
|
1700
1883
|
|
|
1701
1884
|
// src/components/components/Combobox/index.tsx
|
|
1702
|
-
var
|
|
1885
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1703
1886
|
function Combobox2({
|
|
1704
1887
|
name,
|
|
1705
1888
|
label,
|
|
@@ -1740,8 +1923,8 @@ function Combobox2({
|
|
|
1740
1923
|
onChange?.(option.value);
|
|
1741
1924
|
setOpen(false);
|
|
1742
1925
|
};
|
|
1743
|
-
const control = /* @__PURE__ */ (0,
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1926
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Combobox, { open, onOpenChange: setOpen, children: [
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1745
1928
|
ComboboxTrigger,
|
|
1746
1929
|
{
|
|
1747
1930
|
id: controlId,
|
|
@@ -1752,11 +1935,11 @@ function Combobox2({
|
|
|
1752
1935
|
children: selected ? selected.label : placeholder ?? ""
|
|
1753
1936
|
}
|
|
1754
1937
|
),
|
|
1755
|
-
/* @__PURE__ */ (0,
|
|
1756
|
-
searchable ? /* @__PURE__ */ (0,
|
|
1757
|
-
/* @__PURE__ */ (0,
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1759
|
-
/* @__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)(
|
|
1760
1943
|
CommandItem,
|
|
1761
1944
|
{
|
|
1762
1945
|
value: String(option.value),
|
|
@@ -1773,14 +1956,14 @@ function Combobox2({
|
|
|
1773
1956
|
] });
|
|
1774
1957
|
if (inForm && form && name) {
|
|
1775
1958
|
const error = form.errors[name];
|
|
1776
|
-
return /* @__PURE__ */ (0,
|
|
1959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1777
1960
|
"div",
|
|
1778
1961
|
{
|
|
1779
1962
|
"data-slot": "form-item",
|
|
1780
1963
|
className: cn(formItemClass(form.layout), className),
|
|
1781
1964
|
style,
|
|
1782
1965
|
children: [
|
|
1783
|
-
label ? /* @__PURE__ */ (0,
|
|
1966
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1784
1967
|
"label",
|
|
1785
1968
|
{
|
|
1786
1969
|
htmlFor: controlId,
|
|
@@ -1789,7 +1972,7 @@ function Combobox2({
|
|
|
1789
1972
|
}
|
|
1790
1973
|
) : null,
|
|
1791
1974
|
control,
|
|
1792
|
-
error ? /* @__PURE__ */ (0,
|
|
1975
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1793
1976
|
]
|
|
1794
1977
|
}
|
|
1795
1978
|
);
|
|
@@ -1799,160 +1982,6 @@ function Combobox2({
|
|
|
1799
1982
|
|
|
1800
1983
|
// src/components/components/Command/index.tsx
|
|
1801
1984
|
var import_runtime4 = require("@pactor-app/runtime");
|
|
1802
|
-
|
|
1803
|
-
// src/components/components/Icon/index.tsx
|
|
1804
|
-
var import_lucide_react10 = require("lucide-react");
|
|
1805
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1806
|
-
var ICONS = {
|
|
1807
|
-
"arrow-left": import_lucide_react10.ArrowLeft,
|
|
1808
|
-
"arrow-right": import_lucide_react10.ArrowRight,
|
|
1809
|
-
"arrow-up": import_lucide_react10.ArrowUp,
|
|
1810
|
-
"arrow-down": import_lucide_react10.ArrowDown,
|
|
1811
|
-
"chevron-left": import_lucide_react10.ChevronLeft,
|
|
1812
|
-
"chevron-right": import_lucide_react10.ChevronRight,
|
|
1813
|
-
"chevron-up": import_lucide_react10.ChevronUp,
|
|
1814
|
-
"chevron-down": import_lucide_react10.ChevronDown,
|
|
1815
|
-
check: import_lucide_react10.Check,
|
|
1816
|
-
x: import_lucide_react10.X,
|
|
1817
|
-
plus: import_lucide_react10.Plus,
|
|
1818
|
-
minus: import_lucide_react10.Minus,
|
|
1819
|
-
search: import_lucide_react10.Search,
|
|
1820
|
-
settings: import_lucide_react10.Settings,
|
|
1821
|
-
user: import_lucide_react10.User,
|
|
1822
|
-
users: import_lucide_react10.Users,
|
|
1823
|
-
home: import_lucide_react10.House,
|
|
1824
|
-
menu: import_lucide_react10.Menu,
|
|
1825
|
-
bell: import_lucide_react10.Bell,
|
|
1826
|
-
calendar: import_lucide_react10.Calendar,
|
|
1827
|
-
clock: import_lucide_react10.Clock,
|
|
1828
|
-
download: import_lucide_react10.Download,
|
|
1829
|
-
upload: import_lucide_react10.Upload,
|
|
1830
|
-
pencil: import_lucide_react10.Pencil,
|
|
1831
|
-
edit: import_lucide_react10.SquarePen,
|
|
1832
|
-
trash: import_lucide_react10.Trash2,
|
|
1833
|
-
eye: import_lucide_react10.Eye,
|
|
1834
|
-
info: import_lucide_react10.Info,
|
|
1835
|
-
warning: import_lucide_react10.TriangleAlert,
|
|
1836
|
-
error: import_lucide_react10.CircleAlert,
|
|
1837
|
-
"check-circle": import_lucide_react10.CircleCheck,
|
|
1838
|
-
"x-circle": import_lucide_react10.CircleX,
|
|
1839
|
-
"help-circle": import_lucide_react10.CircleQuestionMark,
|
|
1840
|
-
loading: import_lucide_react10.LoaderCircle,
|
|
1841
|
-
spinner: import_lucide_react10.LoaderCircle,
|
|
1842
|
-
star: import_lucide_react10.Star,
|
|
1843
|
-
heart: import_lucide_react10.Heart,
|
|
1844
|
-
bookmark: import_lucide_react10.Bookmark,
|
|
1845
|
-
share: import_lucide_react10.Share2,
|
|
1846
|
-
copy: import_lucide_react10.Copy,
|
|
1847
|
-
"external-link": import_lucide_react10.ExternalLink,
|
|
1848
|
-
link: import_lucide_react10.Link,
|
|
1849
|
-
mail: import_lucide_react10.Mail,
|
|
1850
|
-
phone: import_lucide_react10.Phone,
|
|
1851
|
-
lock: import_lucide_react10.Lock,
|
|
1852
|
-
unlock: import_lucide_react10.LockOpen,
|
|
1853
|
-
"log-in": import_lucide_react10.LogIn,
|
|
1854
|
-
"log-out": import_lucide_react10.LogOut,
|
|
1855
|
-
sun: import_lucide_react10.Sun,
|
|
1856
|
-
moon: import_lucide_react10.Moon,
|
|
1857
|
-
globe: import_lucide_react10.Globe,
|
|
1858
|
-
filter: import_lucide_react10.Funnel,
|
|
1859
|
-
"list-filter": import_lucide_react10.ListFilter,
|
|
1860
|
-
"more-horizontal": import_lucide_react10.Ellipsis,
|
|
1861
|
-
"more-vertical": import_lucide_react10.EllipsisVertical,
|
|
1862
|
-
refresh: import_lucide_react10.RefreshCcw,
|
|
1863
|
-
save: import_lucide_react10.Save,
|
|
1864
|
-
file: import_lucide_react10.File,
|
|
1865
|
-
folder: import_lucide_react10.Folder,
|
|
1866
|
-
image: import_lucide_react10.Image,
|
|
1867
|
-
camera: import_lucide_react10.Camera,
|
|
1868
|
-
chart: import_lucide_react10.ChartColumn,
|
|
1869
|
-
table: import_lucide_react10.Table,
|
|
1870
|
-
list: import_lucide_react10.List,
|
|
1871
|
-
grid: import_lucide_react10.LayoutGrid,
|
|
1872
|
-
tag: import_lucide_react10.Tag,
|
|
1873
|
-
"shopping-cart": import_lucide_react10.ShoppingCart,
|
|
1874
|
-
"credit-card": import_lucide_react10.CreditCard,
|
|
1875
|
-
package: import_lucide_react10.Package,
|
|
1876
|
-
"map-pin": import_lucide_react10.MapPin,
|
|
1877
|
-
building: import_lucide_react10.Building2,
|
|
1878
|
-
briefcase: import_lucide_react10.Briefcase,
|
|
1879
|
-
send: import_lucide_react10.Send,
|
|
1880
|
-
message: import_lucide_react10.MessageCircle,
|
|
1881
|
-
"message-square": import_lucide_react10.MessageSquare,
|
|
1882
|
-
paperclip: import_lucide_react10.Paperclip,
|
|
1883
|
-
"thumbs-up": import_lucide_react10.ThumbsUp,
|
|
1884
|
-
"thumbs-down": import_lucide_react10.ThumbsDown,
|
|
1885
|
-
zap: import_lucide_react10.Zap,
|
|
1886
|
-
flag: import_lucide_react10.Flag,
|
|
1887
|
-
key: import_lucide_react10.Key,
|
|
1888
|
-
shield: import_lucide_react10.Shield,
|
|
1889
|
-
terminal: import_lucide_react10.Terminal,
|
|
1890
|
-
code: import_lucide_react10.Code,
|
|
1891
|
-
database: import_lucide_react10.Database,
|
|
1892
|
-
cloud: import_lucide_react10.Cloud,
|
|
1893
|
-
languages: import_lucide_react10.Languages,
|
|
1894
|
-
// @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
|
|
1895
|
-
// 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
|
|
1896
|
-
"chevrons-up-down": import_lucide_react10.ChevronsUpDown,
|
|
1897
|
-
"file-text": import_lucide_react10.FileText,
|
|
1898
|
-
"panel-left": import_lucide_react10.PanelLeft,
|
|
1899
|
-
"panel-right-open": import_lucide_react10.PanelRightOpen,
|
|
1900
|
-
square: import_lucide_react10.Square,
|
|
1901
|
-
history: import_lucide_react10.History,
|
|
1902
|
-
"rotate-ccw": import_lucide_react10.RotateCcw,
|
|
1903
|
-
quote: import_lucide_react10.Quote,
|
|
1904
|
-
chat: import_lucide_react10.MessageSquare,
|
|
1905
|
-
brain: import_lucide_react10.Brain
|
|
1906
|
-
};
|
|
1907
|
-
function normalizeIconName(name) {
|
|
1908
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
1909
|
-
}
|
|
1910
|
-
var sizePx = {
|
|
1911
|
-
sm: 16,
|
|
1912
|
-
default: 20,
|
|
1913
|
-
lg: 24
|
|
1914
|
-
};
|
|
1915
|
-
function Icon({
|
|
1916
|
-
name,
|
|
1917
|
-
size = "default",
|
|
1918
|
-
color,
|
|
1919
|
-
strokeWidth,
|
|
1920
|
-
className,
|
|
1921
|
-
style
|
|
1922
|
-
}) {
|
|
1923
|
-
const key = name ? normalizeIconName(name) : "";
|
|
1924
|
-
const Lucide = ICONS[key];
|
|
1925
|
-
const px = typeof size === "number" ? size : sizePx[size];
|
|
1926
|
-
if (!Lucide) {
|
|
1927
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1928
|
-
import_lucide_react10.CircleQuestionMark,
|
|
1929
|
-
{
|
|
1930
|
-
"data-slot": "icon",
|
|
1931
|
-
"data-unknown": name,
|
|
1932
|
-
size: px,
|
|
1933
|
-
color,
|
|
1934
|
-
strokeWidth,
|
|
1935
|
-
className: cn("shrink-0 text-muted-foreground", className),
|
|
1936
|
-
style,
|
|
1937
|
-
"aria-hidden": "true"
|
|
1938
|
-
}
|
|
1939
|
-
);
|
|
1940
|
-
}
|
|
1941
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1942
|
-
Lucide,
|
|
1943
|
-
{
|
|
1944
|
-
"data-slot": "icon",
|
|
1945
|
-
size: px,
|
|
1946
|
-
color,
|
|
1947
|
-
strokeWidth,
|
|
1948
|
-
className: cn("shrink-0", className),
|
|
1949
|
-
style,
|
|
1950
|
-
"aria-hidden": "true"
|
|
1951
|
-
}
|
|
1952
|
-
);
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
// src/components/components/Command/index.tsx
|
|
1956
1985
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1957
1986
|
function Command2({
|
|
1958
1987
|
groups = [],
|
|
@@ -2752,7 +2781,7 @@ function DatePicker(props) {
|
|
|
2752
2781
|
"data-slot": "datepicker-start-panel",
|
|
2753
2782
|
className: "border-r border-border",
|
|
2754
2783
|
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2755
|
-
|
|
2784
|
+
Calendar2,
|
|
2756
2785
|
{
|
|
2757
2786
|
mode: "single",
|
|
2758
2787
|
month: startMonth,
|
|
@@ -2766,7 +2795,7 @@ function DatePicker(props) {
|
|
|
2766
2795
|
}
|
|
2767
2796
|
),
|
|
2768
2797
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2769
|
-
|
|
2798
|
+
Calendar2,
|
|
2770
2799
|
{
|
|
2771
2800
|
mode: "single",
|
|
2772
2801
|
month: endMonth,
|
|
@@ -2778,7 +2807,7 @@ function DatePicker(props) {
|
|
|
2778
2807
|
}
|
|
2779
2808
|
) })
|
|
2780
2809
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2781
|
-
|
|
2810
|
+
Calendar2,
|
|
2782
2811
|
{
|
|
2783
2812
|
mode: "single",
|
|
2784
2813
|
selected: singleDate,
|
|
@@ -3868,6 +3897,7 @@ function HoverCard2({ content, children, className, style }) {
|
|
|
3868
3897
|
}
|
|
3869
3898
|
|
|
3870
3899
|
// src/components/components/Input/index.tsx
|
|
3900
|
+
var import_runtime12 = require("@pactor-app/runtime");
|
|
3871
3901
|
var import_react15 = require("react");
|
|
3872
3902
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3873
3903
|
function Input2({
|
|
@@ -3878,11 +3908,13 @@ function Input2({
|
|
|
3878
3908
|
type = "text",
|
|
3879
3909
|
placeholder,
|
|
3880
3910
|
disabled,
|
|
3911
|
+
allowClear,
|
|
3881
3912
|
onChange,
|
|
3882
3913
|
className,
|
|
3883
3914
|
style
|
|
3884
3915
|
}) {
|
|
3885
3916
|
const form = useFormContext();
|
|
3917
|
+
const { t } = (0, import_runtime12.useI18n)();
|
|
3886
3918
|
const controlId = (0, import_react15.useId)();
|
|
3887
3919
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
3888
3920
|
(0, import_react15.useEffect)(() => {
|
|
@@ -3892,8 +3924,56 @@ function Input2({
|
|
|
3892
3924
|
}
|
|
3893
3925
|
return void 0;
|
|
3894
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;
|
|
3895
3976
|
if (inForm && form && name) {
|
|
3896
|
-
const fieldValue = form.values[name];
|
|
3897
3977
|
const error = form.errors[name];
|
|
3898
3978
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3899
3979
|
"div",
|
|
@@ -3910,37 +3990,13 @@ function Input2({
|
|
|
3910
3990
|
children: label
|
|
3911
3991
|
}
|
|
3912
3992
|
) : null,
|
|
3913
|
-
|
|
3914
|
-
Input,
|
|
3915
|
-
{
|
|
3916
|
-
id: controlId,
|
|
3917
|
-
type,
|
|
3918
|
-
value: typeof fieldValue === "string" ? fieldValue : "",
|
|
3919
|
-
placeholder,
|
|
3920
|
-
disabled,
|
|
3921
|
-
onChange: (event) => {
|
|
3922
|
-
form.setValue(name, event.target.value);
|
|
3923
|
-
onChange?.(event.target.value);
|
|
3924
|
-
}
|
|
3925
|
-
}
|
|
3926
|
-
),
|
|
3993
|
+
control,
|
|
3927
3994
|
error ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
3928
3995
|
]
|
|
3929
3996
|
}
|
|
3930
3997
|
);
|
|
3931
3998
|
}
|
|
3932
|
-
return
|
|
3933
|
-
Input,
|
|
3934
|
-
{
|
|
3935
|
-
type,
|
|
3936
|
-
value: value ?? "",
|
|
3937
|
-
placeholder,
|
|
3938
|
-
disabled,
|
|
3939
|
-
className,
|
|
3940
|
-
style,
|
|
3941
|
-
onChange: (event) => onChange?.(event.target.value)
|
|
3942
|
-
}
|
|
3943
|
-
);
|
|
3999
|
+
return control;
|
|
3944
4000
|
}
|
|
3945
4001
|
|
|
3946
4002
|
// src/ui/input-group.tsx
|
|
@@ -4100,7 +4156,7 @@ function InputOTP2({
|
|
|
4100
4156
|
}
|
|
4101
4157
|
|
|
4102
4158
|
// src/components/components/Item/index.tsx
|
|
4103
|
-
var
|
|
4159
|
+
var import_runtime13 = require("@pactor-app/runtime");
|
|
4104
4160
|
|
|
4105
4161
|
// src/ui/item.tsx
|
|
4106
4162
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
@@ -4181,7 +4237,7 @@ function Item2({
|
|
|
4181
4237
|
className,
|
|
4182
4238
|
style
|
|
4183
4239
|
}) {
|
|
4184
|
-
const { renderChildren } = (0,
|
|
4240
|
+
const { renderChildren } = (0, import_runtime13.useRenderer)();
|
|
4185
4241
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
4186
4242
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Item, { className, style, children: [
|
|
4187
4243
|
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
@@ -4242,10 +4298,10 @@ function Label2({ text, htmlFor, className, style }) {
|
|
|
4242
4298
|
|
|
4243
4299
|
// src/components/components/Layout/index.tsx
|
|
4244
4300
|
var import_core = require("@pactor-app/core");
|
|
4245
|
-
var
|
|
4301
|
+
var import_runtime14 = require("@pactor-app/runtime");
|
|
4246
4302
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4247
4303
|
function Layout({ direction, className, style, dslChildren }) {
|
|
4248
|
-
const { renderChildren, context } = (0,
|
|
4304
|
+
const { renderChildren, context } = (0, import_runtime14.useRenderer)();
|
|
4249
4305
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
4250
4306
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
4251
4307
|
) : false;
|
|
@@ -4366,7 +4422,7 @@ function RailTooltip({
|
|
|
4366
4422
|
}
|
|
4367
4423
|
|
|
4368
4424
|
// src/components/components/Sidebar/index.tsx
|
|
4369
|
-
var
|
|
4425
|
+
var import_runtime15 = require("@pactor-app/runtime");
|
|
4370
4426
|
var import_react18 = require("react");
|
|
4371
4427
|
|
|
4372
4428
|
// src/ui/sidebar.tsx
|
|
@@ -4903,7 +4959,7 @@ function useSidebarDrawer() {
|
|
|
4903
4959
|
}
|
|
4904
4960
|
function useOptionalRenderer() {
|
|
4905
4961
|
try {
|
|
4906
|
-
return (0,
|
|
4962
|
+
return (0, import_runtime15.useRenderer)();
|
|
4907
4963
|
} catch {
|
|
4908
4964
|
return null;
|
|
4909
4965
|
}
|
|
@@ -5010,7 +5066,7 @@ function SidebarInner({
|
|
|
5010
5066
|
drawer = true,
|
|
5011
5067
|
children
|
|
5012
5068
|
}) {
|
|
5013
|
-
const { t } = (0,
|
|
5069
|
+
const { t } = (0, import_runtime15.useI18n)();
|
|
5014
5070
|
const isMobile = useIsMobile();
|
|
5015
5071
|
const { state, setOpenMobile, toggleSidebar } = useSidebar();
|
|
5016
5072
|
const collapsed = state === "collapsed";
|
|
@@ -5788,13 +5844,13 @@ function Pagination2({
|
|
|
5788
5844
|
}
|
|
5789
5845
|
|
|
5790
5846
|
// src/components/components/Popover/index.tsx
|
|
5791
|
-
var
|
|
5847
|
+
var import_runtime16 = require("@pactor-app/runtime");
|
|
5792
5848
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5793
5849
|
function isDslNode3(value) {
|
|
5794
5850
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
5795
5851
|
}
|
|
5796
5852
|
function Popover2({ content, children, className, style }) {
|
|
5797
|
-
const { renderChildren } = (0,
|
|
5853
|
+
const { renderChildren } = (0, import_runtime16.useRenderer)();
|
|
5798
5854
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Popover, { children: [
|
|
5799
5855
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5800
5856
|
PopoverTrigger,
|
|
@@ -6000,7 +6056,7 @@ function RadioGroup2({
|
|
|
6000
6056
|
}
|
|
6001
6057
|
|
|
6002
6058
|
// src/components/components/Resizable/index.tsx
|
|
6003
|
-
var
|
|
6059
|
+
var import_runtime17 = require("@pactor-app/runtime");
|
|
6004
6060
|
var import_react22 = require("react");
|
|
6005
6061
|
|
|
6006
6062
|
// src/ui/resizable.tsx
|
|
@@ -6053,7 +6109,7 @@ function Resizable({
|
|
|
6053
6109
|
className,
|
|
6054
6110
|
style
|
|
6055
6111
|
}) {
|
|
6056
|
-
const { renderChildren } = (0,
|
|
6112
|
+
const { renderChildren } = (0, import_runtime17.useRenderer)();
|
|
6057
6113
|
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: [
|
|
6058
6114
|
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ResizableHandle, { withHandle: true }) : null,
|
|
6059
6115
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
@@ -6145,7 +6201,7 @@ function ScrollArea2({
|
|
|
6145
6201
|
}
|
|
6146
6202
|
|
|
6147
6203
|
// src/components/components/Select/index.tsx
|
|
6148
|
-
var
|
|
6204
|
+
var import_runtime18 = require("@pactor-app/runtime");
|
|
6149
6205
|
var import_react23 = require("react");
|
|
6150
6206
|
|
|
6151
6207
|
// src/ui/select.tsx
|
|
@@ -6294,7 +6350,7 @@ function Select2({
|
|
|
6294
6350
|
style
|
|
6295
6351
|
}) {
|
|
6296
6352
|
const form = useFormContext();
|
|
6297
|
-
const { t } = (0,
|
|
6353
|
+
const { t } = (0, import_runtime18.useI18n)();
|
|
6298
6354
|
const controlId = (0, import_react23.useId)();
|
|
6299
6355
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6300
6356
|
(0, import_react23.useEffect)(() => {
|
|
@@ -6619,7 +6675,7 @@ function Slider2({
|
|
|
6619
6675
|
}
|
|
6620
6676
|
|
|
6621
6677
|
// src/components/components/Sonner/index.tsx
|
|
6622
|
-
var
|
|
6678
|
+
var import_runtime19 = require("@pactor-app/runtime");
|
|
6623
6679
|
var import_react25 = require("react");
|
|
6624
6680
|
|
|
6625
6681
|
// src/ui/toast.tsx
|
|
@@ -6699,7 +6755,7 @@ function Toaster({ className }) {
|
|
|
6699
6755
|
// src/components/components/Sonner/index.tsx
|
|
6700
6756
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
6701
6757
|
function Sonner({ className, style }) {
|
|
6702
|
-
const { context } = (0,
|
|
6758
|
+
const { context } = (0, import_runtime19.useRenderer)();
|
|
6703
6759
|
(0, import_react25.useEffect)(() => {
|
|
6704
6760
|
const { actions } = context;
|
|
6705
6761
|
if (actions.has("toast")) {
|
|
@@ -6852,7 +6908,7 @@ function Switch2({
|
|
|
6852
6908
|
}
|
|
6853
6909
|
|
|
6854
6910
|
// src/components/components/Table/index.tsx
|
|
6855
|
-
var
|
|
6911
|
+
var import_runtime20 = require("@pactor-app/runtime");
|
|
6856
6912
|
var import_react27 = require("react");
|
|
6857
6913
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
6858
6914
|
function renderCellValue2(value) {
|
|
@@ -6874,8 +6930,8 @@ function Table3({
|
|
|
6874
6930
|
className,
|
|
6875
6931
|
style
|
|
6876
6932
|
}) {
|
|
6877
|
-
const { renderChildren } = (0,
|
|
6878
|
-
const { t } = (0,
|
|
6933
|
+
const { renderChildren } = (0, import_runtime20.useRenderer)();
|
|
6934
|
+
const { t } = (0, import_runtime20.useI18n)();
|
|
6879
6935
|
const [current, setCurrent] = (0, import_react27.useState)(1);
|
|
6880
6936
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
6881
6937
|
const total = dataSource.length;
|
|
@@ -6941,10 +6997,11 @@ function Table3({
|
|
|
6941
6997
|
}
|
|
6942
6998
|
|
|
6943
6999
|
// src/components/components/Tabs/index.tsx
|
|
6944
|
-
var
|
|
7000
|
+
var import_runtime21 = require("@pactor-app/runtime");
|
|
6945
7001
|
|
|
6946
7002
|
// src/ui/tabs.tsx
|
|
6947
7003
|
var import_tabs = require("@base-ui/react/tabs");
|
|
7004
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
6948
7005
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
6949
7006
|
function Tabs({
|
|
6950
7007
|
className,
|
|
@@ -6959,18 +7016,31 @@ function Tabs({
|
|
|
6959
7016
|
}
|
|
6960
7017
|
);
|
|
6961
7018
|
}
|
|
7019
|
+
var tabsListVariants = (0, import_class_variance_authority7.cva)(
|
|
7020
|
+
"group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground",
|
|
7021
|
+
{
|
|
7022
|
+
variants: {
|
|
7023
|
+
variant: {
|
|
7024
|
+
default: "h-9 rounded-lg bg-muted p-[3px]",
|
|
7025
|
+
line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
|
|
7026
|
+
}
|
|
7027
|
+
},
|
|
7028
|
+
defaultVariants: {
|
|
7029
|
+
variant: "default"
|
|
7030
|
+
}
|
|
7031
|
+
}
|
|
7032
|
+
);
|
|
6962
7033
|
function TabsList({
|
|
6963
7034
|
className,
|
|
7035
|
+
variant,
|
|
6964
7036
|
...props
|
|
6965
7037
|
}) {
|
|
6966
7038
|
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
6967
7039
|
import_tabs.Tabs.List,
|
|
6968
7040
|
{
|
|
6969
7041
|
"data-slot": "tabs-list",
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
className
|
|
6973
|
-
),
|
|
7042
|
+
"data-variant": variant ?? "default",
|
|
7043
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
6974
7044
|
...props
|
|
6975
7045
|
}
|
|
6976
7046
|
);
|
|
@@ -6984,7 +7054,12 @@ function TabsTrigger({
|
|
|
6984
7054
|
{
|
|
6985
7055
|
"data-slot": "tabs-trigger",
|
|
6986
7056
|
className: cn(
|
|
6987
|
-
"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
|
|
7057
|
+
"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",
|
|
7058
|
+
// default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
|
|
7059
|
+
"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",
|
|
7060
|
+
// line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
|
|
7061
|
+
//(叠在 List 的底边轨道上),无底色/圆角/阴影
|
|
7062
|
+
"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",
|
|
6988
7063
|
className
|
|
6989
7064
|
),
|
|
6990
7065
|
...props
|
|
@@ -7007,8 +7082,8 @@ function TabsContent({
|
|
|
7007
7082
|
|
|
7008
7083
|
// src/components/components/Tabs/index.tsx
|
|
7009
7084
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
7010
|
-
function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
7011
|
-
const { renderChildren } = (0,
|
|
7085
|
+
function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
|
|
7086
|
+
const { renderChildren } = (0, import_runtime21.useRenderer)();
|
|
7012
7087
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
7013
7088
|
Tabs,
|
|
7014
7089
|
{
|
|
@@ -7018,7 +7093,7 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
|
7018
7093
|
className,
|
|
7019
7094
|
style,
|
|
7020
7095
|
children: [
|
|
7021
|
-
/* @__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)) }),
|
|
7096
|
+
/* @__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)) }),
|
|
7022
7097
|
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
|
|
7023
7098
|
]
|
|
7024
7099
|
}
|
|
@@ -7133,9 +7208,9 @@ function Textarea2({
|
|
|
7133
7208
|
|
|
7134
7209
|
// src/ui/toggle.tsx
|
|
7135
7210
|
var import_toggle = require("@base-ui/react/toggle");
|
|
7136
|
-
var
|
|
7211
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
7137
7212
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
7138
|
-
var toggleVariants = (0,
|
|
7213
|
+
var toggleVariants = (0, import_class_variance_authority8.cva)(
|
|
7139
7214
|
"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",
|
|
7140
7215
|
{
|
|
7141
7216
|
variants: {
|
|
@@ -7310,9 +7385,9 @@ function Tooltip3({ content, children, className, style }) {
|
|
|
7310
7385
|
}
|
|
7311
7386
|
|
|
7312
7387
|
// src/ui/typography.tsx
|
|
7313
|
-
var
|
|
7388
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
7314
7389
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
7315
|
-
var typographyVariants = (0,
|
|
7390
|
+
var typographyVariants = (0, import_class_variance_authority9.cva)("", {
|
|
7316
7391
|
variants: {
|
|
7317
7392
|
variant: {
|
|
7318
7393
|
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight text-balance",
|
|
@@ -7430,7 +7505,7 @@ var builtinComponents = {
|
|
|
7430
7505
|
Tooltip: Tooltip3,
|
|
7431
7506
|
HoverCard: HoverCard2,
|
|
7432
7507
|
// 复合类扩展组件(第三批)
|
|
7433
|
-
Calendar:
|
|
7508
|
+
Calendar: Calendar3,
|
|
7434
7509
|
DatePicker,
|
|
7435
7510
|
InputOTP: InputOTP2,
|
|
7436
7511
|
Combobox: Combobox2,
|
|
@@ -7509,7 +7584,7 @@ function collectDefaultOpenKeys(registry, activeMenuId) {
|
|
|
7509
7584
|
// src/layout/admin/AdminLayout.tsx
|
|
7510
7585
|
var import_permission = require("@pactor-app/permission");
|
|
7511
7586
|
var import_router = require("@pactor-app/router");
|
|
7512
|
-
var
|
|
7587
|
+
var import_runtime22 = require("@pactor-app/runtime");
|
|
7513
7588
|
var import_react30 = require("react");
|
|
7514
7589
|
|
|
7515
7590
|
// src/layout/admin/use-media-query.ts
|
|
@@ -7756,7 +7831,7 @@ function AdminLayout({
|
|
|
7756
7831
|
headerExtra,
|
|
7757
7832
|
children
|
|
7758
7833
|
}) {
|
|
7759
|
-
const { t } = (0,
|
|
7834
|
+
const { t } = (0, import_runtime22.useI18n)();
|
|
7760
7835
|
const mode = config.mode ?? "top-side";
|
|
7761
7836
|
const showHeader = config.header ?? true;
|
|
7762
7837
|
const showSidebar = (config.sidebar ?? true) && mode !== "top-bottom";
|
|
@@ -8399,7 +8474,7 @@ var OverlayManager = class {
|
|
|
8399
8474
|
};
|
|
8400
8475
|
|
|
8401
8476
|
// src/interaction/actions.ts
|
|
8402
|
-
var
|
|
8477
|
+
var import_runtime23 = require("@pactor-app/runtime");
|
|
8403
8478
|
function createUiBridge() {
|
|
8404
8479
|
return {};
|
|
8405
8480
|
}
|
|
@@ -8415,7 +8490,7 @@ function registerInteractionActions(actions, manager, ui) {
|
|
|
8415
8490
|
return failure("[pactor-interaction] overlay.open \u7F3A\u5C11 overlay \u914D\u7F6E\u53C2\u6570");
|
|
8416
8491
|
}
|
|
8417
8492
|
const { content, ...rest } = overlay;
|
|
8418
|
-
const resolved = (0,
|
|
8493
|
+
const resolved = (0, import_runtime23.resolveDeep)(rest, ctx.scope);
|
|
8419
8494
|
const config = { ...resolved, content };
|
|
8420
8495
|
const data = await manager.open(config, {
|
|
8421
8496
|
parentScope: { ...ctx.scope }
|
|
@@ -8478,7 +8553,7 @@ function isRecord(value) {
|
|
|
8478
8553
|
}
|
|
8479
8554
|
|
|
8480
8555
|
// src/interaction/provider.tsx
|
|
8481
|
-
var
|
|
8556
|
+
var import_runtime24 = require("@pactor-app/runtime");
|
|
8482
8557
|
var import_react32 = require("react");
|
|
8483
8558
|
var import_react_dom = require("react-dom");
|
|
8484
8559
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
@@ -8494,8 +8569,9 @@ function InteractionProvider({
|
|
|
8494
8569
|
children
|
|
8495
8570
|
}) {
|
|
8496
8571
|
const [confirmState, setConfirmState] = (0, import_react32.useState)(null);
|
|
8572
|
+
const [confirmOpen, setConfirmOpen] = (0, import_react32.useState)(false);
|
|
8497
8573
|
const [toasts, setToasts] = (0, import_react32.useState)([]);
|
|
8498
|
-
const { t } = (0,
|
|
8574
|
+
const { t } = (0, import_runtime24.useI18n)();
|
|
8499
8575
|
const { modal, message } = (0, import_react32.useMemo)(() => {
|
|
8500
8576
|
const pushToast = (type, content) => {
|
|
8501
8577
|
const id = Date.now() + Math.random();
|
|
@@ -8507,6 +8583,7 @@ function InteractionProvider({
|
|
|
8507
8583
|
const modalImpl = {
|
|
8508
8584
|
confirm(config) {
|
|
8509
8585
|
setConfirmState({ ...config });
|
|
8586
|
+
setConfirmOpen(true);
|
|
8510
8587
|
}
|
|
8511
8588
|
};
|
|
8512
8589
|
const messageImpl = {
|
|
@@ -8527,12 +8604,12 @@ function InteractionProvider({
|
|
|
8527
8604
|
}, [bridge, modal, message]);
|
|
8528
8605
|
const handleOk = () => {
|
|
8529
8606
|
const state = confirmState;
|
|
8530
|
-
|
|
8607
|
+
setConfirmOpen(false);
|
|
8531
8608
|
state?.onOk?.();
|
|
8532
8609
|
};
|
|
8533
8610
|
const handleCancel = () => {
|
|
8534
8611
|
const state = confirmState;
|
|
8535
|
-
|
|
8612
|
+
setConfirmOpen(false);
|
|
8536
8613
|
state?.onCancel?.();
|
|
8537
8614
|
};
|
|
8538
8615
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
|
|
@@ -8542,12 +8619,17 @@ function InteractionProvider({
|
|
|
8542
8619
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
8543
8620
|
Dialog,
|
|
8544
8621
|
{
|
|
8545
|
-
open:
|
|
8622
|
+
open: confirmOpen,
|
|
8546
8623
|
onOpenChange: (open) => {
|
|
8547
8624
|
if (!open) {
|
|
8548
8625
|
handleCancel();
|
|
8549
8626
|
}
|
|
8550
8627
|
},
|
|
8628
|
+
onOpenChangeComplete: (open) => {
|
|
8629
|
+
if (!open) {
|
|
8630
|
+
setConfirmState(null);
|
|
8631
|
+
}
|
|
8632
|
+
},
|
|
8551
8633
|
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogContent, { "data-slot": "confirm-dialog", className: "sm:max-w-sm", children: [
|
|
8552
8634
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogHeader, { children: [
|
|
8553
8635
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DialogTitle, { children: confirmState?.title ?? "" }),
|
|
@@ -8594,7 +8676,7 @@ function InteractionProvider({
|
|
|
8594
8676
|
|
|
8595
8677
|
// src/interaction/host.tsx
|
|
8596
8678
|
var import_lucide_react27 = require("lucide-react");
|
|
8597
|
-
var
|
|
8679
|
+
var import_runtime25 = require("@pactor-app/runtime");
|
|
8598
8680
|
var import_react33 = require("react");
|
|
8599
8681
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
8600
8682
|
function toCssWidth(width) {
|
|
@@ -8604,7 +8686,7 @@ function toCssWidth(width) {
|
|
|
8604
8686
|
return typeof width === "number" ? `${width}px` : width;
|
|
8605
8687
|
}
|
|
8606
8688
|
function OverlayHost({ manager, resolvePage }) {
|
|
8607
|
-
const renderer = (0,
|
|
8689
|
+
const renderer = (0, import_runtime25.useRenderer)();
|
|
8608
8690
|
const stack = (0, import_react33.useSyncExternalStore)(
|
|
8609
8691
|
(onChange) => manager.subscribe(onChange),
|
|
8610
8692
|
() => manager.stack()
|
|
@@ -8637,7 +8719,7 @@ function OverlayEntryView({
|
|
|
8637
8719
|
renderer,
|
|
8638
8720
|
resolvePage
|
|
8639
8721
|
}) {
|
|
8640
|
-
const { t } = (0,
|
|
8722
|
+
const { t } = (0, import_runtime25.useI18n)();
|
|
8641
8723
|
const handleCancel = () => manager.close(entry.id);
|
|
8642
8724
|
let body = null;
|
|
8643
8725
|
if (entry.content) {
|
|
@@ -8705,7 +8787,7 @@ function ShadcnDrawerView({
|
|
|
8705
8787
|
onCancel,
|
|
8706
8788
|
children
|
|
8707
8789
|
}) {
|
|
8708
|
-
const { t } = (0,
|
|
8790
|
+
const { t } = (0, import_runtime25.useI18n)();
|
|
8709
8791
|
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
|
|
8710
8792
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8711
8793
|
Drawer,
|
|
@@ -8776,7 +8858,7 @@ function PageOverlayBody({
|
|
|
8776
8858
|
return;
|
|
8777
8859
|
}
|
|
8778
8860
|
const host = renderer.context;
|
|
8779
|
-
created = (0,
|
|
8861
|
+
created = (0, import_runtime25.createPageRuntime)(pageDsl, {
|
|
8780
8862
|
app: host.app,
|
|
8781
8863
|
user: host.user,
|
|
8782
8864
|
components: host.components,
|
|
@@ -8805,7 +8887,7 @@ function PageOverlayBody({
|
|
|
8805
8887
|
if (!child) {
|
|
8806
8888
|
return null;
|
|
8807
8889
|
}
|
|
8808
|
-
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
8890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_runtime25.PageRuntimeView, { runtime: child });
|
|
8809
8891
|
}
|
|
8810
8892
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8811
8893
|
0 && (module.exports = {
|