@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
|
@@ -39,7 +39,7 @@ __export(components_exports, {
|
|
|
39
39
|
Breadcrumb: () => Breadcrumb2,
|
|
40
40
|
Button: () => Button2,
|
|
41
41
|
ButtonGroup: () => ButtonGroup2,
|
|
42
|
-
Calendar: () =>
|
|
42
|
+
Calendar: () => Calendar3,
|
|
43
43
|
Card: () => Card2,
|
|
44
44
|
Carousel: () => Carousel2,
|
|
45
45
|
Chart: () => Chart,
|
|
@@ -294,18 +294,186 @@ function AlertDescription({
|
|
|
294
294
|
);
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
// src/components/components/
|
|
297
|
+
// src/components/components/Icon/index.tsx
|
|
298
|
+
var import_lucide_react2 = require("lucide-react");
|
|
298
299
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
300
|
+
var ICONS = {
|
|
301
|
+
"arrow-left": import_lucide_react2.ArrowLeft,
|
|
302
|
+
"arrow-right": import_lucide_react2.ArrowRight,
|
|
303
|
+
"arrow-up": import_lucide_react2.ArrowUp,
|
|
304
|
+
"arrow-down": import_lucide_react2.ArrowDown,
|
|
305
|
+
"chevron-left": import_lucide_react2.ChevronLeft,
|
|
306
|
+
"chevron-right": import_lucide_react2.ChevronRight,
|
|
307
|
+
"chevron-up": import_lucide_react2.ChevronUp,
|
|
308
|
+
"chevron-down": import_lucide_react2.ChevronDown,
|
|
309
|
+
check: import_lucide_react2.Check,
|
|
310
|
+
x: import_lucide_react2.X,
|
|
311
|
+
plus: import_lucide_react2.Plus,
|
|
312
|
+
minus: import_lucide_react2.Minus,
|
|
313
|
+
search: import_lucide_react2.Search,
|
|
314
|
+
settings: import_lucide_react2.Settings,
|
|
315
|
+
user: import_lucide_react2.User,
|
|
316
|
+
users: import_lucide_react2.Users,
|
|
317
|
+
home: import_lucide_react2.House,
|
|
318
|
+
menu: import_lucide_react2.Menu,
|
|
319
|
+
bell: import_lucide_react2.Bell,
|
|
320
|
+
calendar: import_lucide_react2.Calendar,
|
|
321
|
+
clock: import_lucide_react2.Clock,
|
|
322
|
+
download: import_lucide_react2.Download,
|
|
323
|
+
upload: import_lucide_react2.Upload,
|
|
324
|
+
pencil: import_lucide_react2.Pencil,
|
|
325
|
+
edit: import_lucide_react2.SquarePen,
|
|
326
|
+
trash: import_lucide_react2.Trash2,
|
|
327
|
+
eye: import_lucide_react2.Eye,
|
|
328
|
+
info: import_lucide_react2.Info,
|
|
329
|
+
warning: import_lucide_react2.TriangleAlert,
|
|
330
|
+
error: import_lucide_react2.CircleAlert,
|
|
331
|
+
"check-circle": import_lucide_react2.CircleCheck,
|
|
332
|
+
"x-circle": import_lucide_react2.CircleX,
|
|
333
|
+
"help-circle": import_lucide_react2.CircleQuestionMark,
|
|
334
|
+
loading: import_lucide_react2.LoaderCircle,
|
|
335
|
+
spinner: import_lucide_react2.LoaderCircle,
|
|
336
|
+
star: import_lucide_react2.Star,
|
|
337
|
+
heart: import_lucide_react2.Heart,
|
|
338
|
+
bookmark: import_lucide_react2.Bookmark,
|
|
339
|
+
share: import_lucide_react2.Share2,
|
|
340
|
+
copy: import_lucide_react2.Copy,
|
|
341
|
+
"external-link": import_lucide_react2.ExternalLink,
|
|
342
|
+
link: import_lucide_react2.Link,
|
|
343
|
+
mail: import_lucide_react2.Mail,
|
|
344
|
+
phone: import_lucide_react2.Phone,
|
|
345
|
+
lock: import_lucide_react2.Lock,
|
|
346
|
+
unlock: import_lucide_react2.LockOpen,
|
|
347
|
+
"log-in": import_lucide_react2.LogIn,
|
|
348
|
+
"log-out": import_lucide_react2.LogOut,
|
|
349
|
+
sun: import_lucide_react2.Sun,
|
|
350
|
+
moon: import_lucide_react2.Moon,
|
|
351
|
+
globe: import_lucide_react2.Globe,
|
|
352
|
+
filter: import_lucide_react2.Funnel,
|
|
353
|
+
"list-filter": import_lucide_react2.ListFilter,
|
|
354
|
+
"more-horizontal": import_lucide_react2.Ellipsis,
|
|
355
|
+
"more-vertical": import_lucide_react2.EllipsisVertical,
|
|
356
|
+
refresh: import_lucide_react2.RefreshCcw,
|
|
357
|
+
save: import_lucide_react2.Save,
|
|
358
|
+
file: import_lucide_react2.File,
|
|
359
|
+
folder: import_lucide_react2.Folder,
|
|
360
|
+
image: import_lucide_react2.Image,
|
|
361
|
+
camera: import_lucide_react2.Camera,
|
|
362
|
+
chart: import_lucide_react2.ChartColumn,
|
|
363
|
+
table: import_lucide_react2.Table,
|
|
364
|
+
list: import_lucide_react2.List,
|
|
365
|
+
grid: import_lucide_react2.LayoutGrid,
|
|
366
|
+
tag: import_lucide_react2.Tag,
|
|
367
|
+
"shopping-cart": import_lucide_react2.ShoppingCart,
|
|
368
|
+
"credit-card": import_lucide_react2.CreditCard,
|
|
369
|
+
package: import_lucide_react2.Package,
|
|
370
|
+
"map-pin": import_lucide_react2.MapPin,
|
|
371
|
+
building: import_lucide_react2.Building2,
|
|
372
|
+
briefcase: import_lucide_react2.Briefcase,
|
|
373
|
+
send: import_lucide_react2.Send,
|
|
374
|
+
message: import_lucide_react2.MessageCircle,
|
|
375
|
+
"message-square": import_lucide_react2.MessageSquare,
|
|
376
|
+
paperclip: import_lucide_react2.Paperclip,
|
|
377
|
+
"thumbs-up": import_lucide_react2.ThumbsUp,
|
|
378
|
+
"thumbs-down": import_lucide_react2.ThumbsDown,
|
|
379
|
+
zap: import_lucide_react2.Zap,
|
|
380
|
+
flag: import_lucide_react2.Flag,
|
|
381
|
+
key: import_lucide_react2.Key,
|
|
382
|
+
shield: import_lucide_react2.Shield,
|
|
383
|
+
terminal: import_lucide_react2.Terminal,
|
|
384
|
+
code: import_lucide_react2.Code,
|
|
385
|
+
database: import_lucide_react2.Database,
|
|
386
|
+
cloud: import_lucide_react2.Cloud,
|
|
387
|
+
languages: import_lucide_react2.Languages,
|
|
388
|
+
// @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
|
|
389
|
+
// 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
|
|
390
|
+
"chevrons-up-down": import_lucide_react2.ChevronsUpDown,
|
|
391
|
+
"file-text": import_lucide_react2.FileText,
|
|
392
|
+
"panel-left": import_lucide_react2.PanelLeft,
|
|
393
|
+
"panel-right-open": import_lucide_react2.PanelRightOpen,
|
|
394
|
+
square: import_lucide_react2.Square,
|
|
395
|
+
history: import_lucide_react2.History,
|
|
396
|
+
"rotate-ccw": import_lucide_react2.RotateCcw,
|
|
397
|
+
quote: import_lucide_react2.Quote,
|
|
398
|
+
chat: import_lucide_react2.MessageSquare,
|
|
399
|
+
brain: import_lucide_react2.Brain
|
|
400
|
+
};
|
|
401
|
+
function normalizeIconName(name) {
|
|
402
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
403
|
+
}
|
|
404
|
+
var sizePx = {
|
|
405
|
+
sm: 16,
|
|
406
|
+
default: 20,
|
|
407
|
+
lg: 24
|
|
408
|
+
};
|
|
409
|
+
function Icon({
|
|
410
|
+
name,
|
|
411
|
+
size = "default",
|
|
412
|
+
color,
|
|
413
|
+
strokeWidth,
|
|
414
|
+
className,
|
|
415
|
+
style
|
|
416
|
+
}) {
|
|
417
|
+
const key = name ? normalizeIconName(name) : "";
|
|
418
|
+
const Lucide = ICONS[key];
|
|
419
|
+
const px = typeof size === "number" ? size : sizePx[size];
|
|
420
|
+
if (!Lucide) {
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
422
|
+
import_lucide_react2.CircleQuestionMark,
|
|
423
|
+
{
|
|
424
|
+
"data-slot": "icon",
|
|
425
|
+
"data-unknown": name,
|
|
426
|
+
size: px,
|
|
427
|
+
color,
|
|
428
|
+
strokeWidth,
|
|
429
|
+
className: cn("shrink-0 text-muted-foreground", className),
|
|
430
|
+
style,
|
|
431
|
+
"aria-hidden": "true"
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
436
|
+
Lucide,
|
|
437
|
+
{
|
|
438
|
+
"data-slot": "icon",
|
|
439
|
+
size: px,
|
|
440
|
+
color,
|
|
441
|
+
strokeWidth,
|
|
442
|
+
className: cn("shrink-0", className),
|
|
443
|
+
style,
|
|
444
|
+
"aria-hidden": "true"
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// src/components/components/Alert/index.tsx
|
|
450
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
299
451
|
var variantMap = {
|
|
300
452
|
success: "success",
|
|
301
453
|
info: "info",
|
|
302
454
|
warning: "warning",
|
|
303
455
|
error: "destructive"
|
|
304
456
|
};
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
457
|
+
var defaultIconMap = {
|
|
458
|
+
success: "check-circle",
|
|
459
|
+
info: "info",
|
|
460
|
+
warning: "warning",
|
|
461
|
+
error: "x-circle"
|
|
462
|
+
};
|
|
463
|
+
function Alert2({
|
|
464
|
+
message,
|
|
465
|
+
description,
|
|
466
|
+
variant = "info",
|
|
467
|
+
showIcon,
|
|
468
|
+
icon,
|
|
469
|
+
className,
|
|
470
|
+
style
|
|
471
|
+
}) {
|
|
472
|
+
const iconName = icon ?? (showIcon === true ? defaultIconMap[variant] : void 0);
|
|
473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Alert, { variant: variantMap[variant], className, style, children: [
|
|
474
|
+
iconName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: iconName, size: "sm" }) : null,
|
|
475
|
+
message ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AlertTitle, { children: message }) : null,
|
|
476
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AlertDescription, { children: description }) : null
|
|
309
477
|
] });
|
|
310
478
|
}
|
|
311
479
|
|
|
@@ -320,7 +488,7 @@ var import_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
|
320
488
|
var import_button = require("@base-ui/react/button");
|
|
321
489
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
322
490
|
var React = __toESM(require("react"), 1);
|
|
323
|
-
var
|
|
491
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
324
492
|
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
325
493
|
"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",
|
|
326
494
|
{
|
|
@@ -359,7 +527,7 @@ function Button({
|
|
|
359
527
|
...props
|
|
360
528
|
}) {
|
|
361
529
|
if (asChild && React.isValidElement(children)) {
|
|
362
|
-
return /* @__PURE__ */ (0,
|
|
530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
363
531
|
import_button.Button,
|
|
364
532
|
{
|
|
365
533
|
"data-slot": "button",
|
|
@@ -369,7 +537,7 @@ function Button({
|
|
|
369
537
|
}
|
|
370
538
|
);
|
|
371
539
|
}
|
|
372
|
-
return /* @__PURE__ */ (0,
|
|
540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
373
541
|
import_button.Button,
|
|
374
542
|
{
|
|
375
543
|
"data-slot": "button",
|
|
@@ -381,27 +549,27 @@ function Button({
|
|
|
381
549
|
}
|
|
382
550
|
|
|
383
551
|
// src/ui/alert-dialog.tsx
|
|
384
|
-
var
|
|
552
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
385
553
|
function AlertDialog({
|
|
386
554
|
...props
|
|
387
555
|
}) {
|
|
388
|
-
return /* @__PURE__ */ (0,
|
|
556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
|
|
389
557
|
}
|
|
390
558
|
function AlertDialogTrigger({
|
|
391
559
|
...props
|
|
392
560
|
}) {
|
|
393
|
-
return /* @__PURE__ */ (0,
|
|
561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
394
562
|
}
|
|
395
563
|
function AlertDialogPortal({
|
|
396
564
|
...props
|
|
397
565
|
}) {
|
|
398
|
-
return /* @__PURE__ */ (0,
|
|
566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_alert_dialog.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
399
567
|
}
|
|
400
568
|
function AlertDialogOverlay({
|
|
401
569
|
className,
|
|
402
570
|
...props
|
|
403
571
|
}) {
|
|
404
|
-
return /* @__PURE__ */ (0,
|
|
572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
405
573
|
import_alert_dialog.AlertDialog.Backdrop,
|
|
406
574
|
{
|
|
407
575
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -417,9 +585,9 @@ function AlertDialogContent({
|
|
|
417
585
|
className,
|
|
418
586
|
...props
|
|
419
587
|
}) {
|
|
420
|
-
return /* @__PURE__ */ (0,
|
|
421
|
-
/* @__PURE__ */ (0,
|
|
422
|
-
/* @__PURE__ */ (0,
|
|
588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(AlertDialogPortal, { "data-slot": "alert-dialog-portal", children: [
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AlertDialogOverlay, {}),
|
|
590
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
423
591
|
import_alert_dialog.AlertDialog.Popup,
|
|
424
592
|
{
|
|
425
593
|
"data-slot": "alert-dialog-content",
|
|
@@ -436,7 +604,7 @@ function AlertDialogHeader({
|
|
|
436
604
|
className,
|
|
437
605
|
...props
|
|
438
606
|
}) {
|
|
439
|
-
return /* @__PURE__ */ (0,
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
440
608
|
"div",
|
|
441
609
|
{
|
|
442
610
|
"data-slot": "alert-dialog-header",
|
|
@@ -449,7 +617,7 @@ function AlertDialogFooter({
|
|
|
449
617
|
className,
|
|
450
618
|
...props
|
|
451
619
|
}) {
|
|
452
|
-
return /* @__PURE__ */ (0,
|
|
620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
453
621
|
"div",
|
|
454
622
|
{
|
|
455
623
|
"data-slot": "alert-dialog-footer",
|
|
@@ -465,7 +633,7 @@ function AlertDialogTitle({
|
|
|
465
633
|
className,
|
|
466
634
|
...props
|
|
467
635
|
}) {
|
|
468
|
-
return /* @__PURE__ */ (0,
|
|
636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
469
637
|
import_alert_dialog.AlertDialog.Title,
|
|
470
638
|
{
|
|
471
639
|
"data-slot": "alert-dialog-title",
|
|
@@ -478,7 +646,7 @@ function AlertDialogDescription({
|
|
|
478
646
|
className,
|
|
479
647
|
...props
|
|
480
648
|
}) {
|
|
481
|
-
return /* @__PURE__ */ (0,
|
|
649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
482
650
|
import_alert_dialog.AlertDialog.Description,
|
|
483
651
|
{
|
|
484
652
|
"data-slot": "alert-dialog-description",
|
|
@@ -492,7 +660,7 @@ function AlertDialogAction({
|
|
|
492
660
|
variant = "default",
|
|
493
661
|
...props
|
|
494
662
|
}) {
|
|
495
|
-
return /* @__PURE__ */ (0,
|
|
663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
496
664
|
import_alert_dialog.AlertDialog.Close,
|
|
497
665
|
{
|
|
498
666
|
"data-slot": "alert-dialog-action",
|
|
@@ -506,7 +674,7 @@ function AlertDialogCancel({
|
|
|
506
674
|
variant = "outline",
|
|
507
675
|
...props
|
|
508
676
|
}) {
|
|
509
|
-
return /* @__PURE__ */ (0,
|
|
677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
510
678
|
import_alert_dialog.AlertDialog.Close,
|
|
511
679
|
{
|
|
512
680
|
"data-slot": "alert-dialog-cancel",
|
|
@@ -517,13 +685,13 @@ function AlertDialogCancel({
|
|
|
517
685
|
}
|
|
518
686
|
|
|
519
687
|
// src/components/components/trigger-render.tsx
|
|
520
|
-
var
|
|
688
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
521
689
|
function triggerWrapper(slot) {
|
|
522
|
-
return /* @__PURE__ */ (0,
|
|
690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "data-slot": slot });
|
|
523
691
|
}
|
|
524
692
|
|
|
525
693
|
// src/components/components/AlertDialog/index.tsx
|
|
526
|
-
var
|
|
694
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
527
695
|
function AlertDialog2({
|
|
528
696
|
title,
|
|
529
697
|
description,
|
|
@@ -541,7 +709,7 @@ function AlertDialog2({
|
|
|
541
709
|
const [innerOpen, setInnerOpen] = (0, import_react.useState)(false);
|
|
542
710
|
const controlled = open !== void 0;
|
|
543
711
|
const visible = controlled ? open : innerOpen;
|
|
544
|
-
return /* @__PURE__ */ (0,
|
|
712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
545
713
|
AlertDialog,
|
|
546
714
|
{
|
|
547
715
|
open: visible,
|
|
@@ -551,7 +719,7 @@ function AlertDialog2({
|
|
|
551
719
|
}
|
|
552
720
|
},
|
|
553
721
|
children: [
|
|
554
|
-
trigger ? /* @__PURE__ */ (0,
|
|
722
|
+
trigger ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
555
723
|
AlertDialogTrigger,
|
|
556
724
|
{
|
|
557
725
|
nativeButton: false,
|
|
@@ -559,14 +727,14 @@ function AlertDialog2({
|
|
|
559
727
|
children: renderChildren([trigger])
|
|
560
728
|
}
|
|
561
729
|
) : null,
|
|
562
|
-
/* @__PURE__ */ (0,
|
|
563
|
-
/* @__PURE__ */ (0,
|
|
564
|
-
/* @__PURE__ */ (0,
|
|
565
|
-
description ? /* @__PURE__ */ (0,
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogContent, { className, style, children: [
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogHeader, { children: [
|
|
732
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogTitle, { children: title ?? "" }),
|
|
733
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogDescription, { children: description }) : null
|
|
566
734
|
] }),
|
|
567
|
-
/* @__PURE__ */ (0,
|
|
568
|
-
/* @__PURE__ */ (0,
|
|
569
|
-
/* @__PURE__ */ (0,
|
|
735
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(AlertDialogFooter, { children: [
|
|
736
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogCancel, { onClick: () => onCancel?.(), children: cancelText ?? t("pactor.alertDialog.cancel") }),
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(AlertDialogAction, { onClick: () => onConfirm?.(), children: confirmText ?? t("pactor.alertDialog.confirm") })
|
|
570
738
|
] })
|
|
571
739
|
] })
|
|
572
740
|
]
|
|
@@ -575,14 +743,14 @@ function AlertDialog2({
|
|
|
575
743
|
}
|
|
576
744
|
|
|
577
745
|
// src/ui/aspect-ratio.tsx
|
|
578
|
-
var
|
|
746
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
579
747
|
function AspectRatio({
|
|
580
748
|
ratio = 1,
|
|
581
749
|
className,
|
|
582
750
|
style,
|
|
583
751
|
...props
|
|
584
752
|
}) {
|
|
585
|
-
return /* @__PURE__ */ (0,
|
|
753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
586
754
|
"div",
|
|
587
755
|
{
|
|
588
756
|
"data-slot": "aspect-ratio",
|
|
@@ -594,16 +762,16 @@ function AspectRatio({
|
|
|
594
762
|
}
|
|
595
763
|
|
|
596
764
|
// src/components/components/AspectRatio/index.tsx
|
|
597
|
-
var
|
|
765
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
598
766
|
function AspectRatio2({ ratio = 1, children, className, style }) {
|
|
599
|
-
return /* @__PURE__ */ (0,
|
|
767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AspectRatio, { ratio, className, style, children });
|
|
600
768
|
}
|
|
601
769
|
|
|
602
770
|
// src/ui/avatar.tsx
|
|
603
771
|
var import_avatar = require("@base-ui/react/avatar");
|
|
604
|
-
var
|
|
772
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
605
773
|
function Avatar({ className, ...props }) {
|
|
606
|
-
return /* @__PURE__ */ (0,
|
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
607
775
|
import_avatar.Avatar.Root,
|
|
608
776
|
{
|
|
609
777
|
"data-slot": "avatar",
|
|
@@ -616,7 +784,7 @@ function Avatar({ className, ...props }) {
|
|
|
616
784
|
);
|
|
617
785
|
}
|
|
618
786
|
function AvatarImage({ className, ...props }) {
|
|
619
|
-
return /* @__PURE__ */ (0,
|
|
787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
620
788
|
import_avatar.Avatar.Image,
|
|
621
789
|
{
|
|
622
790
|
"data-slot": "avatar-image",
|
|
@@ -626,7 +794,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
626
794
|
);
|
|
627
795
|
}
|
|
628
796
|
function AvatarFallback({ className, ...props }) {
|
|
629
|
-
return /* @__PURE__ */ (0,
|
|
797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
630
798
|
import_avatar.Avatar.Fallback,
|
|
631
799
|
{
|
|
632
800
|
"data-slot": "avatar-fallback",
|
|
@@ -640,17 +808,17 @@ function AvatarFallback({ className, ...props }) {
|
|
|
640
808
|
}
|
|
641
809
|
|
|
642
810
|
// src/components/components/Avatar/index.tsx
|
|
643
|
-
var
|
|
811
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
644
812
|
function Avatar2({ src, alt, fallback, className, style }) {
|
|
645
|
-
return /* @__PURE__ */ (0,
|
|
646
|
-
src ? /* @__PURE__ */ (0,
|
|
647
|
-
fallback ? /* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Avatar, { className, style, children: [
|
|
814
|
+
src ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarImage, { src, alt: alt ?? "" }) : null,
|
|
815
|
+
fallback ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarFallback, { children: fallback }) : null
|
|
648
816
|
] });
|
|
649
817
|
}
|
|
650
818
|
|
|
651
819
|
// src/ui/badge.tsx
|
|
652
820
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
653
|
-
var
|
|
821
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
654
822
|
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
655
823
|
"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",
|
|
656
824
|
{
|
|
@@ -672,7 +840,7 @@ function Badge({
|
|
|
672
840
|
variant,
|
|
673
841
|
...props
|
|
674
842
|
}) {
|
|
675
|
-
return /* @__PURE__ */ (0,
|
|
843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
676
844
|
"span",
|
|
677
845
|
{
|
|
678
846
|
"data-slot": "badge",
|
|
@@ -683,22 +851,22 @@ function Badge({
|
|
|
683
851
|
}
|
|
684
852
|
|
|
685
853
|
// src/components/components/Badge/index.tsx
|
|
686
|
-
var
|
|
854
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
687
855
|
function Badge2({ text, variant = "default", className, style }) {
|
|
688
|
-
return /* @__PURE__ */ (0,
|
|
856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Badge, { variant, className, style, children: text });
|
|
689
857
|
}
|
|
690
858
|
|
|
691
859
|
// src/components/components/Breadcrumb/index.tsx
|
|
692
860
|
var import_react2 = require("react");
|
|
693
861
|
|
|
694
862
|
// src/ui/breadcrumb.tsx
|
|
695
|
-
var
|
|
696
|
-
var
|
|
863
|
+
var import_lucide_react3 = require("lucide-react");
|
|
864
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
697
865
|
function Breadcrumb({ ...props }) {
|
|
698
|
-
return /* @__PURE__ */ (0,
|
|
866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
699
867
|
}
|
|
700
868
|
function BreadcrumbList({ className, ...props }) {
|
|
701
|
-
return /* @__PURE__ */ (0,
|
|
869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
702
870
|
"ol",
|
|
703
871
|
{
|
|
704
872
|
"data-slot": "breadcrumb-list",
|
|
@@ -711,7 +879,7 @@ function BreadcrumbList({ className, ...props }) {
|
|
|
711
879
|
);
|
|
712
880
|
}
|
|
713
881
|
function BreadcrumbItem({ className, ...props }) {
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
715
883
|
"li",
|
|
716
884
|
{
|
|
717
885
|
"data-slot": "breadcrumb-item",
|
|
@@ -721,7 +889,7 @@ function BreadcrumbItem({ className, ...props }) {
|
|
|
721
889
|
);
|
|
722
890
|
}
|
|
723
891
|
function BreadcrumbLink({ className, ...props }) {
|
|
724
|
-
return /* @__PURE__ */ (0,
|
|
892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
725
893
|
"a",
|
|
726
894
|
{
|
|
727
895
|
"data-slot": "breadcrumb-link",
|
|
@@ -731,7 +899,7 @@ function BreadcrumbLink({ className, ...props }) {
|
|
|
731
899
|
);
|
|
732
900
|
}
|
|
733
901
|
function BreadcrumbPage({ className, ...props }) {
|
|
734
|
-
return /* @__PURE__ */ (0,
|
|
902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
735
903
|
"span",
|
|
736
904
|
{
|
|
737
905
|
"data-slot": "breadcrumb-page",
|
|
@@ -748,7 +916,7 @@ function BreadcrumbSeparator({
|
|
|
748
916
|
className,
|
|
749
917
|
...props
|
|
750
918
|
}) {
|
|
751
|
-
return /* @__PURE__ */ (0,
|
|
919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
752
920
|
"li",
|
|
753
921
|
{
|
|
754
922
|
"data-slot": "breadcrumb-separator",
|
|
@@ -756,26 +924,26 @@ function BreadcrumbSeparator({
|
|
|
756
924
|
"aria-hidden": "true",
|
|
757
925
|
className: cn("[&>svg]:size-3.5", className),
|
|
758
926
|
...props,
|
|
759
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
927
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react3.ChevronRightIcon, {})
|
|
760
928
|
}
|
|
761
929
|
);
|
|
762
930
|
}
|
|
763
931
|
|
|
764
932
|
// src/components/components/Breadcrumb/index.tsx
|
|
765
|
-
var
|
|
933
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
766
934
|
function Breadcrumb2({ items = [], className, style }) {
|
|
767
|
-
return /* @__PURE__ */ (0,
|
|
935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Breadcrumb, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbList, { children: items.map((item, index) => {
|
|
768
936
|
const isLast = index === items.length - 1;
|
|
769
|
-
return /* @__PURE__ */ (0,
|
|
770
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
771
|
-
/* @__PURE__ */ (0,
|
|
937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react2.Fragment, { children: [
|
|
938
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BreadcrumbSeparator, {}) : null,
|
|
939
|
+
/* @__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 }) })
|
|
772
940
|
] }, `${item.label}-${index}`);
|
|
773
941
|
}) }) });
|
|
774
942
|
}
|
|
775
943
|
|
|
776
944
|
// src/components/components/Button/index.tsx
|
|
777
|
-
var
|
|
778
|
-
var
|
|
945
|
+
var import_lucide_react4 = require("lucide-react");
|
|
946
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
779
947
|
var variantMap2 = {
|
|
780
948
|
default: "outline",
|
|
781
949
|
primary: "default",
|
|
@@ -802,7 +970,7 @@ function Button2({
|
|
|
802
970
|
children
|
|
803
971
|
}) {
|
|
804
972
|
const textual = variant === "link" || variant === "text";
|
|
805
|
-
return /* @__PURE__ */ (0,
|
|
973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
806
974
|
Button,
|
|
807
975
|
{
|
|
808
976
|
type: submit ? "submit" : "button",
|
|
@@ -818,7 +986,7 @@ function Button2({
|
|
|
818
986
|
className
|
|
819
987
|
),
|
|
820
988
|
children: [
|
|
821
|
-
loading ? /* @__PURE__ */ (0,
|
|
989
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react4.Loader2, { "aria-hidden": true, className: "animate-spin" }) : null,
|
|
822
990
|
text ?? children
|
|
823
991
|
]
|
|
824
992
|
}
|
|
@@ -826,9 +994,9 @@ function Button2({
|
|
|
826
994
|
}
|
|
827
995
|
|
|
828
996
|
// src/ui/button-group.tsx
|
|
829
|
-
var
|
|
997
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
830
998
|
function ButtonGroup({ className, ...props }) {
|
|
831
|
-
return /* @__PURE__ */ (0,
|
|
999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
832
1000
|
"div",
|
|
833
1001
|
{
|
|
834
1002
|
role: "group",
|
|
@@ -843,9 +1011,9 @@ function ButtonGroup({ className, ...props }) {
|
|
|
843
1011
|
}
|
|
844
1012
|
|
|
845
1013
|
// src/components/components/ButtonGroup/index.tsx
|
|
846
|
-
var
|
|
1014
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
847
1015
|
function ButtonGroup2({ className, style, children }) {
|
|
848
|
-
return /* @__PURE__ */ (0,
|
|
1016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ButtonGroup, { className, style, children });
|
|
849
1017
|
}
|
|
850
1018
|
|
|
851
1019
|
// src/components/components/Calendar/index.tsx
|
|
@@ -853,17 +1021,17 @@ var import_date_fns = require("date-fns");
|
|
|
853
1021
|
var import_react4 = require("react");
|
|
854
1022
|
|
|
855
1023
|
// src/ui/calendar.tsx
|
|
856
|
-
var
|
|
1024
|
+
var import_lucide_react5 = require("lucide-react");
|
|
857
1025
|
var import_react_day_picker = require("react-day-picker");
|
|
858
|
-
var
|
|
859
|
-
function
|
|
1026
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1027
|
+
function Calendar2({
|
|
860
1028
|
className,
|
|
861
1029
|
classNames,
|
|
862
1030
|
showOutsideDays = true,
|
|
863
1031
|
...props
|
|
864
1032
|
}) {
|
|
865
1033
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
866
|
-
return /* @__PURE__ */ (0,
|
|
1034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
867
1035
|
import_react_day_picker.DayPicker,
|
|
868
1036
|
{
|
|
869
1037
|
showOutsideDays,
|
|
@@ -920,7 +1088,7 @@ function Calendar({
|
|
|
920
1088
|
...classNames
|
|
921
1089
|
},
|
|
922
1090
|
components: {
|
|
923
|
-
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ (0,
|
|
1091
|
+
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" })
|
|
924
1092
|
},
|
|
925
1093
|
...props
|
|
926
1094
|
}
|
|
@@ -946,13 +1114,13 @@ function formItemClass(layout) {
|
|
|
946
1114
|
}
|
|
947
1115
|
|
|
948
1116
|
// src/components/components/Calendar/index.tsx
|
|
949
|
-
var
|
|
1117
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
950
1118
|
function parseValue(value) {
|
|
951
1119
|
if (typeof value !== "string" || value === "") return void 0;
|
|
952
1120
|
const date = (0, import_date_fns.parseISO)(value);
|
|
953
1121
|
return (0, import_date_fns.isValid)(date) ? date : void 0;
|
|
954
1122
|
}
|
|
955
|
-
function
|
|
1123
|
+
function Calendar3({
|
|
956
1124
|
name,
|
|
957
1125
|
label,
|
|
958
1126
|
rules,
|
|
@@ -980,8 +1148,8 @@ function Calendar2({
|
|
|
980
1148
|
}
|
|
981
1149
|
onChange?.(next);
|
|
982
1150
|
};
|
|
983
|
-
const calendar = /* @__PURE__ */ (0,
|
|
984
|
-
|
|
1151
|
+
const calendar = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1152
|
+
Calendar2,
|
|
985
1153
|
{
|
|
986
1154
|
mode,
|
|
987
1155
|
selected: parseValue(current),
|
|
@@ -993,16 +1161,16 @@ function Calendar2({
|
|
|
993
1161
|
);
|
|
994
1162
|
if (inForm && form && name) {
|
|
995
1163
|
const error = form.errors[name];
|
|
996
|
-
return /* @__PURE__ */ (0,
|
|
1164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
997
1165
|
"div",
|
|
998
1166
|
{
|
|
999
1167
|
"data-slot": "form-item",
|
|
1000
1168
|
className: cn(formItemClass(form.layout), className),
|
|
1001
1169
|
style,
|
|
1002
1170
|
children: [
|
|
1003
|
-
label ? /* @__PURE__ */ (0,
|
|
1171
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: label }) : null,
|
|
1004
1172
|
calendar,
|
|
1005
|
-
error ? /* @__PURE__ */ (0,
|
|
1173
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1006
1174
|
]
|
|
1007
1175
|
}
|
|
1008
1176
|
);
|
|
@@ -1011,14 +1179,28 @@ function Calendar2({
|
|
|
1011
1179
|
}
|
|
1012
1180
|
|
|
1013
1181
|
// src/ui/card.tsx
|
|
1014
|
-
var
|
|
1015
|
-
|
|
1016
|
-
|
|
1182
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1183
|
+
var cardRoundedClasses = {
|
|
1184
|
+
none: "rounded-none",
|
|
1185
|
+
sm: "rounded-sm",
|
|
1186
|
+
md: "rounded-md",
|
|
1187
|
+
lg: "rounded-lg",
|
|
1188
|
+
xl: "rounded-xl",
|
|
1189
|
+
"2xl": "rounded-2xl",
|
|
1190
|
+
"3xl": "rounded-3xl"
|
|
1191
|
+
};
|
|
1192
|
+
function Card({
|
|
1193
|
+
className,
|
|
1194
|
+
rounded = "lg",
|
|
1195
|
+
...props
|
|
1196
|
+
}) {
|
|
1197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1017
1198
|
"div",
|
|
1018
1199
|
{
|
|
1019
1200
|
"data-slot": "card",
|
|
1020
1201
|
className: cn(
|
|
1021
|
-
"flex flex-col gap-6
|
|
1202
|
+
"flex flex-col gap-6 border border-border bg-card py-6 text-card-foreground shadow-(--card-shadow)",
|
|
1203
|
+
cardRoundedClasses[rounded],
|
|
1022
1204
|
className
|
|
1023
1205
|
),
|
|
1024
1206
|
...props
|
|
@@ -1026,7 +1208,7 @@ function Card({ className, ...props }) {
|
|
|
1026
1208
|
);
|
|
1027
1209
|
}
|
|
1028
1210
|
function CardHeader({ className, ...props }) {
|
|
1029
|
-
return /* @__PURE__ */ (0,
|
|
1211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1030
1212
|
"div",
|
|
1031
1213
|
{
|
|
1032
1214
|
"data-slot": "card-header",
|
|
@@ -1039,7 +1221,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1039
1221
|
);
|
|
1040
1222
|
}
|
|
1041
1223
|
function CardTitle({ className, ...props }) {
|
|
1042
|
-
return /* @__PURE__ */ (0,
|
|
1224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1043
1225
|
"div",
|
|
1044
1226
|
{
|
|
1045
1227
|
"data-slot": "card-title",
|
|
@@ -1049,7 +1231,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1049
1231
|
);
|
|
1050
1232
|
}
|
|
1051
1233
|
function CardContent({ className, ...props }) {
|
|
1052
|
-
return /* @__PURE__ */ (0,
|
|
1234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1053
1235
|
"div",
|
|
1054
1236
|
{
|
|
1055
1237
|
"data-slot": "card-content",
|
|
@@ -1060,16 +1242,17 @@ function CardContent({ className, ...props }) {
|
|
|
1060
1242
|
}
|
|
1061
1243
|
|
|
1062
1244
|
// src/components/components/Card/index.tsx
|
|
1063
|
-
var
|
|
1064
|
-
function Card2({ title, bordered = true, className, style, children }) {
|
|
1065
|
-
return /* @__PURE__ */ (0,
|
|
1245
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1246
|
+
function Card2({ title, bordered = true, rounded, className, style, children }) {
|
|
1247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1066
1248
|
Card,
|
|
1067
1249
|
{
|
|
1250
|
+
rounded,
|
|
1068
1251
|
className: cn("gap-4 py-4", !bordered && "border-transparent shadow-none", className),
|
|
1069
1252
|
style,
|
|
1070
1253
|
children: [
|
|
1071
|
-
title ? /* @__PURE__ */ (0,
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1254
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardHeader, { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardTitle, { children: title }) }) : null,
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CardContent, { className: "px-4", children })
|
|
1073
1256
|
]
|
|
1074
1257
|
}
|
|
1075
1258
|
);
|
|
@@ -1081,9 +1264,9 @@ var import_react5 = require("react");
|
|
|
1081
1264
|
|
|
1082
1265
|
// src/ui/carousel.tsx
|
|
1083
1266
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1084
|
-
var
|
|
1267
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1085
1268
|
var React2 = __toESM(require("react"), 1);
|
|
1086
|
-
var
|
|
1269
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1087
1270
|
var CarouselContext = React2.createContext(null);
|
|
1088
1271
|
function useCarousel() {
|
|
1089
1272
|
const context = React2.useContext(CarouselContext);
|
|
@@ -1138,7 +1321,7 @@ function Carousel({
|
|
|
1138
1321
|
api.off("select", onSelect);
|
|
1139
1322
|
};
|
|
1140
1323
|
}, [api, onSelect]);
|
|
1141
|
-
return /* @__PURE__ */ (0,
|
|
1324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1142
1325
|
CarouselContext.Provider,
|
|
1143
1326
|
{
|
|
1144
1327
|
value: {
|
|
@@ -1151,7 +1334,7 @@ function Carousel({
|
|
|
1151
1334
|
canScrollPrev,
|
|
1152
1335
|
canScrollNext
|
|
1153
1336
|
},
|
|
1154
|
-
children: /* @__PURE__ */ (0,
|
|
1337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1155
1338
|
"div",
|
|
1156
1339
|
{
|
|
1157
1340
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -1168,7 +1351,7 @@ function Carousel({
|
|
|
1168
1351
|
}
|
|
1169
1352
|
function CarouselContent({ className, ...props }) {
|
|
1170
1353
|
const { carouselRef, orientation } = useCarousel();
|
|
1171
|
-
return /* @__PURE__ */ (0,
|
|
1354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-viewport", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1172
1355
|
"div",
|
|
1173
1356
|
{
|
|
1174
1357
|
className: cn(
|
|
@@ -1182,7 +1365,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1182
1365
|
}
|
|
1183
1366
|
function CarouselItem({ className, ...props }) {
|
|
1184
1367
|
const { orientation } = useCarousel();
|
|
1185
|
-
return /* @__PURE__ */ (0,
|
|
1368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1186
1369
|
"div",
|
|
1187
1370
|
{
|
|
1188
1371
|
role: "group",
|
|
@@ -1204,7 +1387,7 @@ function CarouselPrevious({
|
|
|
1204
1387
|
...props
|
|
1205
1388
|
}) {
|
|
1206
1389
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1207
|
-
return /* @__PURE__ */ (0,
|
|
1390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1208
1391
|
Button,
|
|
1209
1392
|
{
|
|
1210
1393
|
"data-slot": "carousel-previous",
|
|
@@ -1219,8 +1402,8 @@ function CarouselPrevious({
|
|
|
1219
1402
|
onClick: scrollPrev,
|
|
1220
1403
|
...props,
|
|
1221
1404
|
children: [
|
|
1222
|
-
/* @__PURE__ */ (0,
|
|
1223
|
-
/* @__PURE__ */ (0,
|
|
1405
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronLeftIcon, {}),
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
1224
1407
|
]
|
|
1225
1408
|
}
|
|
1226
1409
|
);
|
|
@@ -1232,7 +1415,7 @@ function CarouselNext({
|
|
|
1232
1415
|
...props
|
|
1233
1416
|
}) {
|
|
1234
1417
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1235
|
-
return /* @__PURE__ */ (0,
|
|
1418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1236
1419
|
Button,
|
|
1237
1420
|
{
|
|
1238
1421
|
"data-slot": "carousel-next",
|
|
@@ -1247,15 +1430,15 @@ function CarouselNext({
|
|
|
1247
1430
|
onClick: scrollNext,
|
|
1248
1431
|
...props,
|
|
1249
1432
|
children: [
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1251
|
-
/* @__PURE__ */ (0,
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronRightIcon, {}),
|
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
1252
1435
|
]
|
|
1253
1436
|
}
|
|
1254
1437
|
);
|
|
1255
1438
|
}
|
|
1256
1439
|
|
|
1257
1440
|
// src/components/components/Carousel/index.tsx
|
|
1258
|
-
var
|
|
1441
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1259
1442
|
function isDslNode(item) {
|
|
1260
1443
|
return typeof item.type === "string";
|
|
1261
1444
|
}
|
|
@@ -1280,7 +1463,7 @@ function Carousel2({
|
|
|
1280
1463
|
}, interval);
|
|
1281
1464
|
return () => clearInterval(timer);
|
|
1282
1465
|
}, [api, autoplay, loop]);
|
|
1283
|
-
return /* @__PURE__ */ (0,
|
|
1466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1284
1467
|
Carousel,
|
|
1285
1468
|
{
|
|
1286
1469
|
opts: { loop: loop === true },
|
|
@@ -1288,7 +1471,7 @@ function Carousel2({
|
|
|
1288
1471
|
className,
|
|
1289
1472
|
style,
|
|
1290
1473
|
children: [
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1474
|
+
/* @__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)(
|
|
1292
1475
|
"img",
|
|
1293
1476
|
{
|
|
1294
1477
|
src: item.src,
|
|
@@ -1296,8 +1479,8 @@ function Carousel2({
|
|
|
1296
1479
|
className: "w-full rounded-md object-cover"
|
|
1297
1480
|
}
|
|
1298
1481
|
) }, index)) }),
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1300
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselPrevious, {}),
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CarouselNext, {})
|
|
1301
1484
|
]
|
|
1302
1485
|
}
|
|
1303
1486
|
);
|
|
@@ -1308,10 +1491,10 @@ var import_react6 = require("react");
|
|
|
1308
1491
|
|
|
1309
1492
|
// src/ui/checkbox.tsx
|
|
1310
1493
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1311
|
-
var
|
|
1312
|
-
var
|
|
1494
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1495
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1313
1496
|
function Checkbox({ className, ...props }) {
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1315
1498
|
import_checkbox.Checkbox.Root,
|
|
1316
1499
|
{
|
|
1317
1500
|
"data-slot": "checkbox",
|
|
@@ -1320,12 +1503,12 @@ function Checkbox({ className, ...props }) {
|
|
|
1320
1503
|
className
|
|
1321
1504
|
),
|
|
1322
1505
|
...props,
|
|
1323
|
-
children: /* @__PURE__ */ (0,
|
|
1506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1324
1507
|
import_checkbox.Checkbox.Indicator,
|
|
1325
1508
|
{
|
|
1326
1509
|
"data-slot": "checkbox-indicator",
|
|
1327
1510
|
className: "flex items-center justify-center text-current",
|
|
1328
|
-
children: /* @__PURE__ */ (0,
|
|
1511
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.CheckIcon, { className: "size-3.5" })
|
|
1329
1512
|
}
|
|
1330
1513
|
)
|
|
1331
1514
|
}
|
|
@@ -1333,7 +1516,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1333
1516
|
}
|
|
1334
1517
|
|
|
1335
1518
|
// src/components/components/Checkbox/index.tsx
|
|
1336
|
-
var
|
|
1519
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1337
1520
|
function Checkbox2({
|
|
1338
1521
|
name,
|
|
1339
1522
|
label,
|
|
@@ -1362,13 +1545,13 @@ function Checkbox2({
|
|
|
1362
1545
|
}
|
|
1363
1546
|
onChange?.(next);
|
|
1364
1547
|
};
|
|
1365
|
-
const control = /* @__PURE__ */ (0,
|
|
1548
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1366
1549
|
"span",
|
|
1367
1550
|
{
|
|
1368
1551
|
className: cn("inline-flex items-center gap-2", !inForm && className),
|
|
1369
1552
|
style: inForm ? void 0 : style,
|
|
1370
1553
|
children: [
|
|
1371
|
-
/* @__PURE__ */ (0,
|
|
1554
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1372
1555
|
Checkbox,
|
|
1373
1556
|
{
|
|
1374
1557
|
id: controlId,
|
|
@@ -1378,12 +1561,12 @@ function Checkbox2({
|
|
|
1378
1561
|
onCheckedChange: handleChange
|
|
1379
1562
|
}
|
|
1380
1563
|
),
|
|
1381
|
-
label ? /* @__PURE__ */ (0,
|
|
1564
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
|
|
1382
1565
|
]
|
|
1383
1566
|
}
|
|
1384
1567
|
);
|
|
1385
1568
|
if (inForm && form && name) {
|
|
1386
|
-
return /* @__PURE__ */ (0,
|
|
1569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1387
1570
|
"div",
|
|
1388
1571
|
{
|
|
1389
1572
|
"data-slot": "form-item",
|
|
@@ -1391,7 +1574,7 @@ function Checkbox2({
|
|
|
1391
1574
|
style,
|
|
1392
1575
|
children: [
|
|
1393
1576
|
control,
|
|
1394
|
-
form.errors[name] ? /* @__PURE__ */ (0,
|
|
1577
|
+
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
|
|
1395
1578
|
]
|
|
1396
1579
|
}
|
|
1397
1580
|
);
|
|
@@ -1404,19 +1587,19 @@ var import_react7 = require("react");
|
|
|
1404
1587
|
|
|
1405
1588
|
// src/ui/collapsible.tsx
|
|
1406
1589
|
var import_collapsible = require("@base-ui/react/collapsible");
|
|
1407
|
-
var
|
|
1408
|
-
var
|
|
1590
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1591
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1409
1592
|
function Collapsible({
|
|
1410
1593
|
...props
|
|
1411
1594
|
}) {
|
|
1412
|
-
return /* @__PURE__ */ (0,
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_collapsible.Collapsible.Root, { "data-slot": "collapsible", ...props });
|
|
1413
1596
|
}
|
|
1414
1597
|
function CollapsibleTrigger({
|
|
1415
1598
|
className,
|
|
1416
1599
|
children,
|
|
1417
1600
|
...props
|
|
1418
1601
|
}) {
|
|
1419
|
-
return /* @__PURE__ */ (0,
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1420
1603
|
import_collapsible.Collapsible.Trigger,
|
|
1421
1604
|
{
|
|
1422
1605
|
"data-slot": "collapsible-trigger",
|
|
@@ -1427,7 +1610,7 @@ function CollapsibleTrigger({
|
|
|
1427
1610
|
...props,
|
|
1428
1611
|
children: [
|
|
1429
1612
|
children,
|
|
1430
|
-
/* @__PURE__ */ (0,
|
|
1613
|
+
/* @__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" })
|
|
1431
1614
|
]
|
|
1432
1615
|
}
|
|
1433
1616
|
);
|
|
@@ -1436,7 +1619,7 @@ function CollapsibleContent({
|
|
|
1436
1619
|
className,
|
|
1437
1620
|
...props
|
|
1438
1621
|
}) {
|
|
1439
|
-
return /* @__PURE__ */ (0,
|
|
1622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1440
1623
|
import_collapsible.Collapsible.Panel,
|
|
1441
1624
|
{
|
|
1442
1625
|
"data-slot": "collapsible-content",
|
|
@@ -1450,7 +1633,7 @@ function CollapsibleContent({
|
|
|
1450
1633
|
}
|
|
1451
1634
|
|
|
1452
1635
|
// src/components/components/Collapsible/index.tsx
|
|
1453
|
-
var
|
|
1636
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1454
1637
|
function Collapsible2({
|
|
1455
1638
|
title,
|
|
1456
1639
|
open,
|
|
@@ -1460,7 +1643,7 @@ function Collapsible2({
|
|
|
1460
1643
|
}) {
|
|
1461
1644
|
const [innerOpen, setInnerOpen] = (0, import_react7.useState)(false);
|
|
1462
1645
|
const controlled = open !== void 0;
|
|
1463
|
-
return /* @__PURE__ */ (0,
|
|
1646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1464
1647
|
Collapsible,
|
|
1465
1648
|
{
|
|
1466
1649
|
open: controlled ? open : innerOpen,
|
|
@@ -1472,8 +1655,8 @@ function Collapsible2({
|
|
|
1472
1655
|
className,
|
|
1473
1656
|
style,
|
|
1474
1657
|
children: [
|
|
1475
|
-
title ? /* @__PURE__ */ (0,
|
|
1476
|
-
/* @__PURE__ */ (0,
|
|
1658
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CollapsibleTrigger, { children: title }) : null,
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CollapsibleContent, { children })
|
|
1477
1660
|
]
|
|
1478
1661
|
}
|
|
1479
1662
|
);
|
|
@@ -1483,20 +1666,20 @@ function Collapsible2({
|
|
|
1483
1666
|
var import_react8 = require("react");
|
|
1484
1667
|
|
|
1485
1668
|
// src/ui/combobox.tsx
|
|
1486
|
-
var
|
|
1669
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1487
1670
|
|
|
1488
1671
|
// src/ui/popover.tsx
|
|
1489
1672
|
var import_popover = require("@base-ui/react/popover");
|
|
1490
|
-
var
|
|
1673
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1491
1674
|
function Popover({
|
|
1492
1675
|
...props
|
|
1493
1676
|
}) {
|
|
1494
|
-
return /* @__PURE__ */ (0,
|
|
1677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
1495
1678
|
}
|
|
1496
1679
|
function PopoverTrigger({
|
|
1497
1680
|
...props
|
|
1498
1681
|
}) {
|
|
1499
|
-
return /* @__PURE__ */ (0,
|
|
1682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1500
1683
|
}
|
|
1501
1684
|
function PopoverContent({
|
|
1502
1685
|
className,
|
|
@@ -1506,7 +1689,7 @@ function PopoverContent({
|
|
|
1506
1689
|
anchor,
|
|
1507
1690
|
...props
|
|
1508
1691
|
}) {
|
|
1509
|
-
return /* @__PURE__ */ (0,
|
|
1692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1510
1693
|
import_popover.Popover.Positioner,
|
|
1511
1694
|
{
|
|
1512
1695
|
align,
|
|
@@ -1514,7 +1697,7 @@ function PopoverContent({
|
|
|
1514
1697
|
sideOffset,
|
|
1515
1698
|
anchor,
|
|
1516
1699
|
className: "isolate z-50",
|
|
1517
|
-
children: /* @__PURE__ */ (0,
|
|
1700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1518
1701
|
import_popover.Popover.Popup,
|
|
1519
1702
|
{
|
|
1520
1703
|
"data-slot": "popover-content",
|
|
@@ -1530,20 +1713,20 @@ function PopoverContent({
|
|
|
1530
1713
|
}
|
|
1531
1714
|
|
|
1532
1715
|
// src/ui/combobox.tsx
|
|
1533
|
-
var
|
|
1716
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1534
1717
|
function Combobox({
|
|
1535
1718
|
open,
|
|
1536
1719
|
onOpenChange,
|
|
1537
1720
|
children
|
|
1538
1721
|
}) {
|
|
1539
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Popover, { open, onOpenChange: (next) => onOpenChange?.(next), children });
|
|
1540
1723
|
}
|
|
1541
1724
|
function ComboboxTrigger({
|
|
1542
1725
|
className,
|
|
1543
1726
|
children,
|
|
1544
1727
|
...props
|
|
1545
1728
|
}) {
|
|
1546
|
-
return /* @__PURE__ */ (0,
|
|
1729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1547
1730
|
PopoverTrigger,
|
|
1548
1731
|
{
|
|
1549
1732
|
"data-slot": "combobox-trigger",
|
|
@@ -1553,8 +1736,8 @@ function ComboboxTrigger({
|
|
|
1553
1736
|
),
|
|
1554
1737
|
...props,
|
|
1555
1738
|
children: [
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1557
|
-
/* @__PURE__ */ (0,
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.ChevronsUpDownIcon, { className: "size-4 shrink-0 opacity-50" })
|
|
1558
1741
|
]
|
|
1559
1742
|
}
|
|
1560
1743
|
);
|
|
@@ -1564,7 +1747,7 @@ function ComboboxContent({
|
|
|
1564
1747
|
children,
|
|
1565
1748
|
...props
|
|
1566
1749
|
}) {
|
|
1567
|
-
return /* @__PURE__ */ (0,
|
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1568
1751
|
PopoverContent,
|
|
1569
1752
|
{
|
|
1570
1753
|
"data-slot": "combobox-content",
|
|
@@ -1577,13 +1760,13 @@ function ComboboxContent({
|
|
|
1577
1760
|
|
|
1578
1761
|
// src/ui/command.tsx
|
|
1579
1762
|
var import_cmdk = require("cmdk");
|
|
1580
|
-
var
|
|
1581
|
-
var
|
|
1763
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1764
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1582
1765
|
function Command({
|
|
1583
1766
|
className,
|
|
1584
1767
|
...props
|
|
1585
1768
|
}) {
|
|
1586
|
-
return /* @__PURE__ */ (0,
|
|
1769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1587
1770
|
import_cmdk.Command,
|
|
1588
1771
|
{
|
|
1589
1772
|
"data-slot": "command",
|
|
@@ -1599,14 +1782,14 @@ function CommandInput({
|
|
|
1599
1782
|
className,
|
|
1600
1783
|
...props
|
|
1601
1784
|
}) {
|
|
1602
|
-
return /* @__PURE__ */ (0,
|
|
1785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1603
1786
|
"div",
|
|
1604
1787
|
{
|
|
1605
1788
|
"data-slot": "command-input-wrapper",
|
|
1606
1789
|
className: "flex items-center gap-2 border-b border-border px-3",
|
|
1607
1790
|
children: [
|
|
1608
|
-
/* @__PURE__ */ (0,
|
|
1609
|
-
/* @__PURE__ */ (0,
|
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react10.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1610
1793
|
import_cmdk.Command.Input,
|
|
1611
1794
|
{
|
|
1612
1795
|
"data-slot": "command-input",
|
|
@@ -1625,7 +1808,7 @@ function CommandList({
|
|
|
1625
1808
|
className,
|
|
1626
1809
|
...props
|
|
1627
1810
|
}) {
|
|
1628
|
-
return /* @__PURE__ */ (0,
|
|
1811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1629
1812
|
import_cmdk.Command.List,
|
|
1630
1813
|
{
|
|
1631
1814
|
"data-slot": "command-list",
|
|
@@ -1640,7 +1823,7 @@ function CommandList({
|
|
|
1640
1823
|
function CommandEmpty({
|
|
1641
1824
|
...props
|
|
1642
1825
|
}) {
|
|
1643
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1644
1827
|
import_cmdk.Command.Empty,
|
|
1645
1828
|
{
|
|
1646
1829
|
"data-slot": "command-empty",
|
|
@@ -1653,7 +1836,7 @@ function CommandGroup({
|
|
|
1653
1836
|
className,
|
|
1654
1837
|
...props
|
|
1655
1838
|
}) {
|
|
1656
|
-
return /* @__PURE__ */ (0,
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1657
1840
|
import_cmdk.Command.Group,
|
|
1658
1841
|
{
|
|
1659
1842
|
"data-slot": "command-group",
|
|
@@ -1669,7 +1852,7 @@ function CommandItem({
|
|
|
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.Item,
|
|
1674
1857
|
{
|
|
1675
1858
|
"data-slot": "command-item",
|
|
@@ -1683,7 +1866,7 @@ function CommandItem({
|
|
|
1683
1866
|
}
|
|
1684
1867
|
|
|
1685
1868
|
// src/components/components/Combobox/index.tsx
|
|
1686
|
-
var
|
|
1869
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1687
1870
|
function Combobox2({
|
|
1688
1871
|
name,
|
|
1689
1872
|
label,
|
|
@@ -1724,8 +1907,8 @@ function Combobox2({
|
|
|
1724
1907
|
onChange?.(option.value);
|
|
1725
1908
|
setOpen(false);
|
|
1726
1909
|
};
|
|
1727
|
-
const control = /* @__PURE__ */ (0,
|
|
1728
|
-
/* @__PURE__ */ (0,
|
|
1910
|
+
const control = /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Combobox, { open, onOpenChange: setOpen, children: [
|
|
1911
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1729
1912
|
ComboboxTrigger,
|
|
1730
1913
|
{
|
|
1731
1914
|
id: controlId,
|
|
@@ -1736,11 +1919,11 @@ function Combobox2({
|
|
|
1736
1919
|
children: selected ? selected.label : placeholder ?? ""
|
|
1737
1920
|
}
|
|
1738
1921
|
),
|
|
1739
|
-
/* @__PURE__ */ (0,
|
|
1740
|
-
searchable ? /* @__PURE__ */ (0,
|
|
1741
|
-
/* @__PURE__ */ (0,
|
|
1742
|
-
/* @__PURE__ */ (0,
|
|
1743
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ComboboxContent, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Command, { children: [
|
|
1923
|
+
searchable ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CommandInput, { placeholder }) : null,
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(CommandList, { children: [
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CommandEmpty, { children: "\u65E0\u5339\u914D\u7ED3\u679C" }),
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CommandGroup, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1744
1927
|
CommandItem,
|
|
1745
1928
|
{
|
|
1746
1929
|
value: String(option.value),
|
|
@@ -1757,14 +1940,14 @@ function Combobox2({
|
|
|
1757
1940
|
] });
|
|
1758
1941
|
if (inForm && form && name) {
|
|
1759
1942
|
const error = form.errors[name];
|
|
1760
|
-
return /* @__PURE__ */ (0,
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1761
1944
|
"div",
|
|
1762
1945
|
{
|
|
1763
1946
|
"data-slot": "form-item",
|
|
1764
1947
|
className: cn(formItemClass(form.layout), className),
|
|
1765
1948
|
style,
|
|
1766
1949
|
children: [
|
|
1767
|
-
label ? /* @__PURE__ */ (0,
|
|
1950
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1768
1951
|
"label",
|
|
1769
1952
|
{
|
|
1770
1953
|
htmlFor: controlId,
|
|
@@ -1773,7 +1956,7 @@ function Combobox2({
|
|
|
1773
1956
|
}
|
|
1774
1957
|
) : null,
|
|
1775
1958
|
control,
|
|
1776
|
-
error ? /* @__PURE__ */ (0,
|
|
1959
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
1777
1960
|
]
|
|
1778
1961
|
}
|
|
1779
1962
|
);
|
|
@@ -1783,160 +1966,6 @@ function Combobox2({
|
|
|
1783
1966
|
|
|
1784
1967
|
// src/components/components/Command/index.tsx
|
|
1785
1968
|
var import_runtime4 = require("@pactor-app/runtime");
|
|
1786
|
-
|
|
1787
|
-
// src/components/components/Icon/index.tsx
|
|
1788
|
-
var import_lucide_react10 = require("lucide-react");
|
|
1789
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1790
|
-
var ICONS = {
|
|
1791
|
-
"arrow-left": import_lucide_react10.ArrowLeft,
|
|
1792
|
-
"arrow-right": import_lucide_react10.ArrowRight,
|
|
1793
|
-
"arrow-up": import_lucide_react10.ArrowUp,
|
|
1794
|
-
"arrow-down": import_lucide_react10.ArrowDown,
|
|
1795
|
-
"chevron-left": import_lucide_react10.ChevronLeft,
|
|
1796
|
-
"chevron-right": import_lucide_react10.ChevronRight,
|
|
1797
|
-
"chevron-up": import_lucide_react10.ChevronUp,
|
|
1798
|
-
"chevron-down": import_lucide_react10.ChevronDown,
|
|
1799
|
-
check: import_lucide_react10.Check,
|
|
1800
|
-
x: import_lucide_react10.X,
|
|
1801
|
-
plus: import_lucide_react10.Plus,
|
|
1802
|
-
minus: import_lucide_react10.Minus,
|
|
1803
|
-
search: import_lucide_react10.Search,
|
|
1804
|
-
settings: import_lucide_react10.Settings,
|
|
1805
|
-
user: import_lucide_react10.User,
|
|
1806
|
-
users: import_lucide_react10.Users,
|
|
1807
|
-
home: import_lucide_react10.House,
|
|
1808
|
-
menu: import_lucide_react10.Menu,
|
|
1809
|
-
bell: import_lucide_react10.Bell,
|
|
1810
|
-
calendar: import_lucide_react10.Calendar,
|
|
1811
|
-
clock: import_lucide_react10.Clock,
|
|
1812
|
-
download: import_lucide_react10.Download,
|
|
1813
|
-
upload: import_lucide_react10.Upload,
|
|
1814
|
-
pencil: import_lucide_react10.Pencil,
|
|
1815
|
-
edit: import_lucide_react10.SquarePen,
|
|
1816
|
-
trash: import_lucide_react10.Trash2,
|
|
1817
|
-
eye: import_lucide_react10.Eye,
|
|
1818
|
-
info: import_lucide_react10.Info,
|
|
1819
|
-
warning: import_lucide_react10.TriangleAlert,
|
|
1820
|
-
error: import_lucide_react10.CircleAlert,
|
|
1821
|
-
"check-circle": import_lucide_react10.CircleCheck,
|
|
1822
|
-
"x-circle": import_lucide_react10.CircleX,
|
|
1823
|
-
"help-circle": import_lucide_react10.CircleQuestionMark,
|
|
1824
|
-
loading: import_lucide_react10.LoaderCircle,
|
|
1825
|
-
spinner: import_lucide_react10.LoaderCircle,
|
|
1826
|
-
star: import_lucide_react10.Star,
|
|
1827
|
-
heart: import_lucide_react10.Heart,
|
|
1828
|
-
bookmark: import_lucide_react10.Bookmark,
|
|
1829
|
-
share: import_lucide_react10.Share2,
|
|
1830
|
-
copy: import_lucide_react10.Copy,
|
|
1831
|
-
"external-link": import_lucide_react10.ExternalLink,
|
|
1832
|
-
link: import_lucide_react10.Link,
|
|
1833
|
-
mail: import_lucide_react10.Mail,
|
|
1834
|
-
phone: import_lucide_react10.Phone,
|
|
1835
|
-
lock: import_lucide_react10.Lock,
|
|
1836
|
-
unlock: import_lucide_react10.LockOpen,
|
|
1837
|
-
"log-in": import_lucide_react10.LogIn,
|
|
1838
|
-
"log-out": import_lucide_react10.LogOut,
|
|
1839
|
-
sun: import_lucide_react10.Sun,
|
|
1840
|
-
moon: import_lucide_react10.Moon,
|
|
1841
|
-
globe: import_lucide_react10.Globe,
|
|
1842
|
-
filter: import_lucide_react10.Funnel,
|
|
1843
|
-
"list-filter": import_lucide_react10.ListFilter,
|
|
1844
|
-
"more-horizontal": import_lucide_react10.Ellipsis,
|
|
1845
|
-
"more-vertical": import_lucide_react10.EllipsisVertical,
|
|
1846
|
-
refresh: import_lucide_react10.RefreshCcw,
|
|
1847
|
-
save: import_lucide_react10.Save,
|
|
1848
|
-
file: import_lucide_react10.File,
|
|
1849
|
-
folder: import_lucide_react10.Folder,
|
|
1850
|
-
image: import_lucide_react10.Image,
|
|
1851
|
-
camera: import_lucide_react10.Camera,
|
|
1852
|
-
chart: import_lucide_react10.ChartColumn,
|
|
1853
|
-
table: import_lucide_react10.Table,
|
|
1854
|
-
list: import_lucide_react10.List,
|
|
1855
|
-
grid: import_lucide_react10.LayoutGrid,
|
|
1856
|
-
tag: import_lucide_react10.Tag,
|
|
1857
|
-
"shopping-cart": import_lucide_react10.ShoppingCart,
|
|
1858
|
-
"credit-card": import_lucide_react10.CreditCard,
|
|
1859
|
-
package: import_lucide_react10.Package,
|
|
1860
|
-
"map-pin": import_lucide_react10.MapPin,
|
|
1861
|
-
building: import_lucide_react10.Building2,
|
|
1862
|
-
briefcase: import_lucide_react10.Briefcase,
|
|
1863
|
-
send: import_lucide_react10.Send,
|
|
1864
|
-
message: import_lucide_react10.MessageCircle,
|
|
1865
|
-
"message-square": import_lucide_react10.MessageSquare,
|
|
1866
|
-
paperclip: import_lucide_react10.Paperclip,
|
|
1867
|
-
"thumbs-up": import_lucide_react10.ThumbsUp,
|
|
1868
|
-
"thumbs-down": import_lucide_react10.ThumbsDown,
|
|
1869
|
-
zap: import_lucide_react10.Zap,
|
|
1870
|
-
flag: import_lucide_react10.Flag,
|
|
1871
|
-
key: import_lucide_react10.Key,
|
|
1872
|
-
shield: import_lucide_react10.Shield,
|
|
1873
|
-
terminal: import_lucide_react10.Terminal,
|
|
1874
|
-
code: import_lucide_react10.Code,
|
|
1875
|
-
database: import_lucide_react10.Database,
|
|
1876
|
-
cloud: import_lucide_react10.Cloud,
|
|
1877
|
-
languages: import_lucide_react10.Languages,
|
|
1878
|
-
// @pactor-app/chat 收敛(spec: chat-icon-convergence):chat 既有图标与
|
|
1879
|
-
// 契约图标名(menu.icon / messageActions[].icon 的既有取值)直通
|
|
1880
|
-
"chevrons-up-down": import_lucide_react10.ChevronsUpDown,
|
|
1881
|
-
"file-text": import_lucide_react10.FileText,
|
|
1882
|
-
"panel-left": import_lucide_react10.PanelLeft,
|
|
1883
|
-
"panel-right-open": import_lucide_react10.PanelRightOpen,
|
|
1884
|
-
square: import_lucide_react10.Square,
|
|
1885
|
-
history: import_lucide_react10.History,
|
|
1886
|
-
"rotate-ccw": import_lucide_react10.RotateCcw,
|
|
1887
|
-
quote: import_lucide_react10.Quote,
|
|
1888
|
-
chat: import_lucide_react10.MessageSquare,
|
|
1889
|
-
brain: import_lucide_react10.Brain
|
|
1890
|
-
};
|
|
1891
|
-
function normalizeIconName(name) {
|
|
1892
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
|
|
1893
|
-
}
|
|
1894
|
-
var sizePx = {
|
|
1895
|
-
sm: 16,
|
|
1896
|
-
default: 20,
|
|
1897
|
-
lg: 24
|
|
1898
|
-
};
|
|
1899
|
-
function Icon({
|
|
1900
|
-
name,
|
|
1901
|
-
size = "default",
|
|
1902
|
-
color,
|
|
1903
|
-
strokeWidth,
|
|
1904
|
-
className,
|
|
1905
|
-
style
|
|
1906
|
-
}) {
|
|
1907
|
-
const key = name ? normalizeIconName(name) : "";
|
|
1908
|
-
const Lucide = ICONS[key];
|
|
1909
|
-
const px = typeof size === "number" ? size : sizePx[size];
|
|
1910
|
-
if (!Lucide) {
|
|
1911
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1912
|
-
import_lucide_react10.CircleQuestionMark,
|
|
1913
|
-
{
|
|
1914
|
-
"data-slot": "icon",
|
|
1915
|
-
"data-unknown": name,
|
|
1916
|
-
size: px,
|
|
1917
|
-
color,
|
|
1918
|
-
strokeWidth,
|
|
1919
|
-
className: cn("shrink-0 text-muted-foreground", className),
|
|
1920
|
-
style,
|
|
1921
|
-
"aria-hidden": "true"
|
|
1922
|
-
}
|
|
1923
|
-
);
|
|
1924
|
-
}
|
|
1925
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1926
|
-
Lucide,
|
|
1927
|
-
{
|
|
1928
|
-
"data-slot": "icon",
|
|
1929
|
-
size: px,
|
|
1930
|
-
color,
|
|
1931
|
-
strokeWidth,
|
|
1932
|
-
className: cn("shrink-0", className),
|
|
1933
|
-
style,
|
|
1934
|
-
"aria-hidden": "true"
|
|
1935
|
-
}
|
|
1936
|
-
);
|
|
1937
|
-
}
|
|
1938
|
-
|
|
1939
|
-
// src/components/components/Command/index.tsx
|
|
1940
1969
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1941
1970
|
function Command2({
|
|
1942
1971
|
groups = [],
|
|
@@ -2736,7 +2765,7 @@ function DatePicker(props) {
|
|
|
2736
2765
|
"data-slot": "datepicker-start-panel",
|
|
2737
2766
|
className: "border-r border-border",
|
|
2738
2767
|
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2739
|
-
|
|
2768
|
+
Calendar2,
|
|
2740
2769
|
{
|
|
2741
2770
|
mode: "single",
|
|
2742
2771
|
month: startMonth,
|
|
@@ -2750,7 +2779,7 @@ function DatePicker(props) {
|
|
|
2750
2779
|
}
|
|
2751
2780
|
),
|
|
2752
2781
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-slot": "datepicker-end-panel", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2753
|
-
|
|
2782
|
+
Calendar2,
|
|
2754
2783
|
{
|
|
2755
2784
|
mode: "single",
|
|
2756
2785
|
month: endMonth,
|
|
@@ -2762,7 +2791,7 @@ function DatePicker(props) {
|
|
|
2762
2791
|
}
|
|
2763
2792
|
) })
|
|
2764
2793
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2765
|
-
|
|
2794
|
+
Calendar2,
|
|
2766
2795
|
{
|
|
2767
2796
|
mode: "single",
|
|
2768
2797
|
selected: singleDate,
|
|
@@ -3829,6 +3858,7 @@ function HoverCard2({ content, children, className, style }) {
|
|
|
3829
3858
|
}
|
|
3830
3859
|
|
|
3831
3860
|
// src/components/components/Input/index.tsx
|
|
3861
|
+
var import_runtime12 = require("@pactor-app/runtime");
|
|
3832
3862
|
var import_react15 = require("react");
|
|
3833
3863
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3834
3864
|
function Input2({
|
|
@@ -3839,11 +3869,13 @@ function Input2({
|
|
|
3839
3869
|
type = "text",
|
|
3840
3870
|
placeholder,
|
|
3841
3871
|
disabled,
|
|
3872
|
+
allowClear,
|
|
3842
3873
|
onChange,
|
|
3843
3874
|
className,
|
|
3844
3875
|
style
|
|
3845
3876
|
}) {
|
|
3846
3877
|
const form = useFormContext();
|
|
3878
|
+
const { t } = (0, import_runtime12.useI18n)();
|
|
3847
3879
|
const controlId = (0, import_react15.useId)();
|
|
3848
3880
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
3849
3881
|
(0, import_react15.useEffect)(() => {
|
|
@@ -3853,8 +3885,56 @@ function Input2({
|
|
|
3853
3885
|
}
|
|
3854
3886
|
return void 0;
|
|
3855
3887
|
});
|
|
3888
|
+
const fieldValue = inForm && form && name ? form.values[name] : void 0;
|
|
3889
|
+
const currentValue = typeof fieldValue === "string" ? fieldValue : inForm ? "" : value ?? "";
|
|
3890
|
+
const showClear = allowClear === true && disabled !== true && currentValue !== "";
|
|
3891
|
+
const handleClear = () => {
|
|
3892
|
+
if (inForm && form && name) {
|
|
3893
|
+
form.setValue(name, "");
|
|
3894
|
+
}
|
|
3895
|
+
onChange?.("");
|
|
3896
|
+
};
|
|
3897
|
+
const inFormRoot = inForm === true;
|
|
3898
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3899
|
+
Input,
|
|
3900
|
+
{
|
|
3901
|
+
id: controlId,
|
|
3902
|
+
type,
|
|
3903
|
+
value: currentValue,
|
|
3904
|
+
placeholder,
|
|
3905
|
+
disabled,
|
|
3906
|
+
className: !inFormRoot && allowClear !== true ? className : void 0,
|
|
3907
|
+
style: !inFormRoot && allowClear !== true ? style : void 0,
|
|
3908
|
+
onChange: (event) => {
|
|
3909
|
+
if (inForm && form && name) {
|
|
3910
|
+
form.setValue(name, event.target.value);
|
|
3911
|
+
}
|
|
3912
|
+
onChange?.(event.target.value);
|
|
3913
|
+
}
|
|
3914
|
+
}
|
|
3915
|
+
);
|
|
3916
|
+
const clearButton = showClear ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3917
|
+
"button",
|
|
3918
|
+
{
|
|
3919
|
+
type: "button",
|
|
3920
|
+
"aria-label": t("pactor.input.clear"),
|
|
3921
|
+
className: "shrink-0 cursor-pointer text-muted-foreground hover:text-foreground",
|
|
3922
|
+
onClick: handleClear,
|
|
3923
|
+
children: "\xD7"
|
|
3924
|
+
}
|
|
3925
|
+
) : null;
|
|
3926
|
+
const control = allowClear === true ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3927
|
+
"span",
|
|
3928
|
+
{
|
|
3929
|
+
className: cn("flex items-center gap-1", !inFormRoot && className),
|
|
3930
|
+
style: inFormRoot ? void 0 : style,
|
|
3931
|
+
children: [
|
|
3932
|
+
input,
|
|
3933
|
+
clearButton
|
|
3934
|
+
]
|
|
3935
|
+
}
|
|
3936
|
+
) : input;
|
|
3856
3937
|
if (inForm && form && name) {
|
|
3857
|
-
const fieldValue = form.values[name];
|
|
3858
3938
|
const error = form.errors[name];
|
|
3859
3939
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3860
3940
|
"div",
|
|
@@ -3871,37 +3951,13 @@ function Input2({
|
|
|
3871
3951
|
children: label
|
|
3872
3952
|
}
|
|
3873
3953
|
) : null,
|
|
3874
|
-
|
|
3875
|
-
Input,
|
|
3876
|
-
{
|
|
3877
|
-
id: controlId,
|
|
3878
|
-
type,
|
|
3879
|
-
value: typeof fieldValue === "string" ? fieldValue : "",
|
|
3880
|
-
placeholder,
|
|
3881
|
-
disabled,
|
|
3882
|
-
onChange: (event) => {
|
|
3883
|
-
form.setValue(name, event.target.value);
|
|
3884
|
-
onChange?.(event.target.value);
|
|
3885
|
-
}
|
|
3886
|
-
}
|
|
3887
|
-
),
|
|
3954
|
+
control,
|
|
3888
3955
|
error ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
|
|
3889
3956
|
]
|
|
3890
3957
|
}
|
|
3891
3958
|
);
|
|
3892
3959
|
}
|
|
3893
|
-
return
|
|
3894
|
-
Input,
|
|
3895
|
-
{
|
|
3896
|
-
type,
|
|
3897
|
-
value: value ?? "",
|
|
3898
|
-
placeholder,
|
|
3899
|
-
disabled,
|
|
3900
|
-
className,
|
|
3901
|
-
style,
|
|
3902
|
-
onChange: (event) => onChange?.(event.target.value)
|
|
3903
|
-
}
|
|
3904
|
-
);
|
|
3960
|
+
return control;
|
|
3905
3961
|
}
|
|
3906
3962
|
|
|
3907
3963
|
// src/ui/input-group.tsx
|
|
@@ -4061,7 +4117,7 @@ function InputOTP2({
|
|
|
4061
4117
|
}
|
|
4062
4118
|
|
|
4063
4119
|
// src/components/components/Item/index.tsx
|
|
4064
|
-
var
|
|
4120
|
+
var import_runtime13 = require("@pactor-app/runtime");
|
|
4065
4121
|
|
|
4066
4122
|
// src/ui/item.tsx
|
|
4067
4123
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
@@ -4142,7 +4198,7 @@ function Item2({
|
|
|
4142
4198
|
className,
|
|
4143
4199
|
style
|
|
4144
4200
|
}) {
|
|
4145
|
-
const { renderChildren } = (0,
|
|
4201
|
+
const { renderChildren } = (0, import_runtime13.useRenderer)();
|
|
4146
4202
|
const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
|
|
4147
4203
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Item, { className, style, children: [
|
|
4148
4204
|
mediaNodes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
|
|
@@ -4203,10 +4259,10 @@ function Label2({ text, htmlFor, className, style }) {
|
|
|
4203
4259
|
|
|
4204
4260
|
// src/components/components/Layout/index.tsx
|
|
4205
4261
|
var import_core = require("@pactor-app/core");
|
|
4206
|
-
var
|
|
4262
|
+
var import_runtime14 = require("@pactor-app/runtime");
|
|
4207
4263
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4208
4264
|
function Layout({ direction, className, style, dslChildren }) {
|
|
4209
|
-
const { renderChildren, context } = (0,
|
|
4265
|
+
const { renderChildren, context } = (0, import_runtime14.useRenderer)();
|
|
4210
4266
|
const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
|
|
4211
4267
|
(child) => !(0, import_core.isDslSourceRef)(child) && resolveRootType(child, context) === "Sider"
|
|
4212
4268
|
) : false;
|
|
@@ -4327,7 +4383,7 @@ function RailTooltip({
|
|
|
4327
4383
|
}
|
|
4328
4384
|
|
|
4329
4385
|
// src/components/components/Sidebar/index.tsx
|
|
4330
|
-
var
|
|
4386
|
+
var import_runtime15 = require("@pactor-app/runtime");
|
|
4331
4387
|
var import_react18 = require("react");
|
|
4332
4388
|
|
|
4333
4389
|
// src/ui/sidebar.tsx
|
|
@@ -4864,7 +4920,7 @@ function useSidebarDrawer() {
|
|
|
4864
4920
|
}
|
|
4865
4921
|
function useOptionalRenderer() {
|
|
4866
4922
|
try {
|
|
4867
|
-
return (0,
|
|
4923
|
+
return (0, import_runtime15.useRenderer)();
|
|
4868
4924
|
} catch {
|
|
4869
4925
|
return null;
|
|
4870
4926
|
}
|
|
@@ -4971,7 +5027,7 @@ function SidebarInner({
|
|
|
4971
5027
|
drawer = true,
|
|
4972
5028
|
children
|
|
4973
5029
|
}) {
|
|
4974
|
-
const { t } = (0,
|
|
5030
|
+
const { t } = (0, import_runtime15.useI18n)();
|
|
4975
5031
|
const isMobile = useIsMobile();
|
|
4976
5032
|
const { state, setOpenMobile, toggleSidebar } = useSidebar();
|
|
4977
5033
|
const collapsed = state === "collapsed";
|
|
@@ -5749,13 +5805,13 @@ function Pagination2({
|
|
|
5749
5805
|
}
|
|
5750
5806
|
|
|
5751
5807
|
// src/components/components/Popover/index.tsx
|
|
5752
|
-
var
|
|
5808
|
+
var import_runtime16 = require("@pactor-app/runtime");
|
|
5753
5809
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5754
5810
|
function isDslNode3(value) {
|
|
5755
5811
|
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
5756
5812
|
}
|
|
5757
5813
|
function Popover2({ content, children, className, style }) {
|
|
5758
|
-
const { renderChildren } = (0,
|
|
5814
|
+
const { renderChildren } = (0, import_runtime16.useRenderer)();
|
|
5759
5815
|
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Popover, { children: [
|
|
5760
5816
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5761
5817
|
PopoverTrigger,
|
|
@@ -5961,7 +6017,7 @@ function RadioGroup2({
|
|
|
5961
6017
|
}
|
|
5962
6018
|
|
|
5963
6019
|
// src/components/components/Resizable/index.tsx
|
|
5964
|
-
var
|
|
6020
|
+
var import_runtime17 = require("@pactor-app/runtime");
|
|
5965
6021
|
var import_react22 = require("react");
|
|
5966
6022
|
|
|
5967
6023
|
// src/ui/resizable.tsx
|
|
@@ -6014,7 +6070,7 @@ function Resizable({
|
|
|
6014
6070
|
className,
|
|
6015
6071
|
style
|
|
6016
6072
|
}) {
|
|
6017
|
-
const { renderChildren } = (0,
|
|
6073
|
+
const { renderChildren } = (0, import_runtime17.useRenderer)();
|
|
6018
6074
|
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: [
|
|
6019
6075
|
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ResizableHandle, { withHandle: true }) : null,
|
|
6020
6076
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
@@ -6106,7 +6162,7 @@ function ScrollArea2({
|
|
|
6106
6162
|
}
|
|
6107
6163
|
|
|
6108
6164
|
// src/components/components/Select/index.tsx
|
|
6109
|
-
var
|
|
6165
|
+
var import_runtime18 = require("@pactor-app/runtime");
|
|
6110
6166
|
var import_react23 = require("react");
|
|
6111
6167
|
|
|
6112
6168
|
// src/ui/select.tsx
|
|
@@ -6255,7 +6311,7 @@ function Select2({
|
|
|
6255
6311
|
style
|
|
6256
6312
|
}) {
|
|
6257
6313
|
const form = useFormContext();
|
|
6258
|
-
const { t } = (0,
|
|
6314
|
+
const { t } = (0, import_runtime18.useI18n)();
|
|
6259
6315
|
const controlId = (0, import_react23.useId)();
|
|
6260
6316
|
const inForm = form?.inForm === true && typeof name === "string" && name !== "";
|
|
6261
6317
|
(0, import_react23.useEffect)(() => {
|
|
@@ -6580,7 +6636,7 @@ function Slider2({
|
|
|
6580
6636
|
}
|
|
6581
6637
|
|
|
6582
6638
|
// src/components/components/Sonner/index.tsx
|
|
6583
|
-
var
|
|
6639
|
+
var import_runtime19 = require("@pactor-app/runtime");
|
|
6584
6640
|
var import_react25 = require("react");
|
|
6585
6641
|
|
|
6586
6642
|
// src/ui/toast.tsx
|
|
@@ -6660,7 +6716,7 @@ function Toaster({ className }) {
|
|
|
6660
6716
|
// src/components/components/Sonner/index.tsx
|
|
6661
6717
|
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
6662
6718
|
function Sonner({ className, style }) {
|
|
6663
|
-
const { context } = (0,
|
|
6719
|
+
const { context } = (0, import_runtime19.useRenderer)();
|
|
6664
6720
|
(0, import_react25.useEffect)(() => {
|
|
6665
6721
|
const { actions } = context;
|
|
6666
6722
|
if (actions.has("toast")) {
|
|
@@ -6813,7 +6869,7 @@ function Switch2({
|
|
|
6813
6869
|
}
|
|
6814
6870
|
|
|
6815
6871
|
// src/components/components/Table/index.tsx
|
|
6816
|
-
var
|
|
6872
|
+
var import_runtime20 = require("@pactor-app/runtime");
|
|
6817
6873
|
var import_react27 = require("react");
|
|
6818
6874
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
6819
6875
|
function renderCellValue2(value) {
|
|
@@ -6835,8 +6891,8 @@ function Table3({
|
|
|
6835
6891
|
className,
|
|
6836
6892
|
style
|
|
6837
6893
|
}) {
|
|
6838
|
-
const { renderChildren } = (0,
|
|
6839
|
-
const { t } = (0,
|
|
6894
|
+
const { renderChildren } = (0, import_runtime20.useRenderer)();
|
|
6895
|
+
const { t } = (0, import_runtime20.useI18n)();
|
|
6840
6896
|
const [current, setCurrent] = (0, import_react27.useState)(1);
|
|
6841
6897
|
const pageSize = pagination === false ? void 0 : pagination?.pageSize;
|
|
6842
6898
|
const total = dataSource.length;
|
|
@@ -6902,10 +6958,11 @@ function Table3({
|
|
|
6902
6958
|
}
|
|
6903
6959
|
|
|
6904
6960
|
// src/components/components/Tabs/index.tsx
|
|
6905
|
-
var
|
|
6961
|
+
var import_runtime21 = require("@pactor-app/runtime");
|
|
6906
6962
|
|
|
6907
6963
|
// src/ui/tabs.tsx
|
|
6908
6964
|
var import_tabs = require("@base-ui/react/tabs");
|
|
6965
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
6909
6966
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
6910
6967
|
function Tabs({
|
|
6911
6968
|
className,
|
|
@@ -6920,18 +6977,31 @@ function Tabs({
|
|
|
6920
6977
|
}
|
|
6921
6978
|
);
|
|
6922
6979
|
}
|
|
6980
|
+
var tabsListVariants = (0, import_class_variance_authority7.cva)(
|
|
6981
|
+
"group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground",
|
|
6982
|
+
{
|
|
6983
|
+
variants: {
|
|
6984
|
+
variant: {
|
|
6985
|
+
default: "h-9 rounded-lg bg-muted p-[3px]",
|
|
6986
|
+
line: "h-auto gap-1 rounded-none border-b border-border bg-transparent p-0"
|
|
6987
|
+
}
|
|
6988
|
+
},
|
|
6989
|
+
defaultVariants: {
|
|
6990
|
+
variant: "default"
|
|
6991
|
+
}
|
|
6992
|
+
}
|
|
6993
|
+
);
|
|
6923
6994
|
function TabsList({
|
|
6924
6995
|
className,
|
|
6996
|
+
variant,
|
|
6925
6997
|
...props
|
|
6926
6998
|
}) {
|
|
6927
6999
|
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
6928
7000
|
import_tabs.Tabs.List,
|
|
6929
7001
|
{
|
|
6930
7002
|
"data-slot": "tabs-list",
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
className
|
|
6934
|
-
),
|
|
7003
|
+
"data-variant": variant ?? "default",
|
|
7004
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
6935
7005
|
...props
|
|
6936
7006
|
}
|
|
6937
7007
|
);
|
|
@@ -6945,7 +7015,12 @@ function TabsTrigger({
|
|
|
6945
7015
|
{
|
|
6946
7016
|
"data-slot": "tabs-trigger",
|
|
6947
7017
|
className: cn(
|
|
6948
|
-
"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
|
|
7018
|
+
"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",
|
|
7019
|
+
// default 变体:激活态胶囊(边框 + 卡片底 + 阴影)
|
|
7020
|
+
"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",
|
|
7021
|
+
// line 变体:下划线指示——弱化未激活文字,激活态底部 2px 主色线
|
|
7022
|
+
//(叠在 List 的底边轨道上),无底色/圆角/阴影
|
|
7023
|
+
"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",
|
|
6949
7024
|
className
|
|
6950
7025
|
),
|
|
6951
7026
|
...props
|
|
@@ -6968,8 +7043,8 @@ function TabsContent({
|
|
|
6968
7043
|
|
|
6969
7044
|
// src/components/components/Tabs/index.tsx
|
|
6970
7045
|
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
6971
|
-
function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
6972
|
-
const { renderChildren } = (0,
|
|
7046
|
+
function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
|
|
7047
|
+
const { renderChildren } = (0, import_runtime21.useRenderer)();
|
|
6973
7048
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
6974
7049
|
Tabs,
|
|
6975
7050
|
{
|
|
@@ -6979,7 +7054,7 @@ function Tabs2({ items = [], activeKey, onChange, className, style }) {
|
|
|
6979
7054
|
className,
|
|
6980
7055
|
style,
|
|
6981
7056
|
children: [
|
|
6982
|
-
/* @__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)) }),
|
|
7057
|
+
/* @__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)) }),
|
|
6983
7058
|
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsContent, { value: item.key, children: renderChildren(item.children) }, item.key))
|
|
6984
7059
|
]
|
|
6985
7060
|
}
|
|
@@ -7094,9 +7169,9 @@ function Textarea2({
|
|
|
7094
7169
|
|
|
7095
7170
|
// src/ui/toggle.tsx
|
|
7096
7171
|
var import_toggle = require("@base-ui/react/toggle");
|
|
7097
|
-
var
|
|
7172
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
7098
7173
|
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
7099
|
-
var toggleVariants = (0,
|
|
7174
|
+
var toggleVariants = (0, import_class_variance_authority8.cva)(
|
|
7100
7175
|
"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",
|
|
7101
7176
|
{
|
|
7102
7177
|
variants: {
|
|
@@ -7271,9 +7346,9 @@ function Tooltip3({ content, children, className, style }) {
|
|
|
7271
7346
|
}
|
|
7272
7347
|
|
|
7273
7348
|
// src/ui/typography.tsx
|
|
7274
|
-
var
|
|
7349
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
7275
7350
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
7276
|
-
var typographyVariants = (0,
|
|
7351
|
+
var typographyVariants = (0, import_class_variance_authority9.cva)("", {
|
|
7277
7352
|
variants: {
|
|
7278
7353
|
variant: {
|
|
7279
7354
|
h1: "scroll-m-20 text-4xl font-extrabold tracking-tight text-balance",
|
|
@@ -7391,7 +7466,7 @@ var builtinComponents = {
|
|
|
7391
7466
|
Tooltip: Tooltip3,
|
|
7392
7467
|
HoverCard: HoverCard2,
|
|
7393
7468
|
// 复合类扩展组件(第三批)
|
|
7394
|
-
Calendar:
|
|
7469
|
+
Calendar: Calendar3,
|
|
7395
7470
|
DatePicker,
|
|
7396
7471
|
InputOTP: InputOTP2,
|
|
7397
7472
|
Combobox: Combobox2,
|