@marcoschwartz/lite-ui 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +565 -462
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +545 -443
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ var index_exports = {};
|
|
|
33
33
|
__export(index_exports, {
|
|
34
34
|
ActionMenu: () => ActionMenu,
|
|
35
35
|
Alert: () => Alert,
|
|
36
|
+
AppShell: () => AppShell,
|
|
36
37
|
AppleIcon: () => AppleIcon,
|
|
37
38
|
Avatar: () => Avatar,
|
|
38
39
|
Badge: () => Badge,
|
|
@@ -491,10 +492,11 @@ var Sidebar = ({
|
|
|
491
492
|
}) => {
|
|
492
493
|
const { theme } = useTheme();
|
|
493
494
|
const widthClass = widthClasses[width];
|
|
495
|
+
const borderClass = position === "left" ? "border-r" : "border-l";
|
|
494
496
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
495
497
|
"aside",
|
|
496
498
|
{
|
|
497
|
-
className: `${widthClass} bg-white dark:bg-gray-800
|
|
499
|
+
className: `${widthClass} bg-white dark:bg-gray-800 ${borderClass} border-gray-200 dark:border-gray-700 h-full overflow-y-auto ${className}`,
|
|
498
500
|
children
|
|
499
501
|
}
|
|
500
502
|
);
|
|
@@ -531,10 +533,357 @@ var useSidebar = () => {
|
|
|
531
533
|
return context;
|
|
532
534
|
};
|
|
533
535
|
|
|
534
|
-
// src/components/
|
|
536
|
+
// src/components/AppShell.tsx
|
|
535
537
|
var import_react5 = require("react");
|
|
538
|
+
|
|
539
|
+
// src/icons/icon-utils.tsx
|
|
536
540
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
537
541
|
var sizeClasses2 = {
|
|
542
|
+
xs: "w-3 h-3",
|
|
543
|
+
sm: "w-4 h-4",
|
|
544
|
+
md: "w-5 h-5",
|
|
545
|
+
lg: "w-6 h-6",
|
|
546
|
+
xl: "w-8 h-8"
|
|
547
|
+
};
|
|
548
|
+
var createIcon = (displayName, path, filled = false) => {
|
|
549
|
+
const Icon = ({ size = "md", className = "", color = "currentColor" }) => {
|
|
550
|
+
const sizeClass = sizeClasses2[size];
|
|
551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
552
|
+
"svg",
|
|
553
|
+
{
|
|
554
|
+
className: `${sizeClass} ${className}`,
|
|
555
|
+
fill: filled ? color : "none",
|
|
556
|
+
viewBox: "0 0 24 24",
|
|
557
|
+
stroke: filled ? "none" : color,
|
|
558
|
+
"aria-hidden": "true",
|
|
559
|
+
children: path
|
|
560
|
+
}
|
|
561
|
+
);
|
|
562
|
+
};
|
|
563
|
+
Icon.displayName = displayName;
|
|
564
|
+
return Icon;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
// src/icons/HomeIcon.tsx
|
|
568
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
569
|
+
var HomeIcon = createIcon(
|
|
570
|
+
"HomeIcon",
|
|
571
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" })
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
// src/icons/UserIcon.tsx
|
|
575
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
576
|
+
var UserIcon = createIcon(
|
|
577
|
+
"UserIcon",
|
|
578
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" })
|
|
579
|
+
);
|
|
580
|
+
|
|
581
|
+
// src/icons/SearchIcon.tsx
|
|
582
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
583
|
+
var SearchIcon = createIcon(
|
|
584
|
+
"SearchIcon",
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" })
|
|
586
|
+
);
|
|
587
|
+
|
|
588
|
+
// src/icons/BellIcon.tsx
|
|
589
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
590
|
+
var BellIcon = createIcon(
|
|
591
|
+
"BellIcon",
|
|
592
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" })
|
|
593
|
+
);
|
|
594
|
+
|
|
595
|
+
// src/icons/SettingsIcon.tsx
|
|
596
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
597
|
+
var SettingsIcon = createIcon(
|
|
598
|
+
"SettingsIcon",
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }),
|
|
601
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
602
|
+
] })
|
|
603
|
+
);
|
|
604
|
+
|
|
605
|
+
// src/icons/MenuIcon.tsx
|
|
606
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
607
|
+
var MenuIcon = createIcon(
|
|
608
|
+
"MenuIcon",
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })
|
|
610
|
+
);
|
|
611
|
+
|
|
612
|
+
// src/icons/CloseIcon.tsx
|
|
613
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
614
|
+
var CloseIcon = createIcon(
|
|
615
|
+
"CloseIcon",
|
|
616
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
|
|
617
|
+
);
|
|
618
|
+
|
|
619
|
+
// src/icons/ChevronDownIcon.tsx
|
|
620
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
621
|
+
var ChevronDownIcon = createIcon(
|
|
622
|
+
"ChevronDownIcon",
|
|
623
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
624
|
+
);
|
|
625
|
+
|
|
626
|
+
// src/icons/ChevronRightIcon.tsx
|
|
627
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
628
|
+
var ChevronRightIcon = createIcon(
|
|
629
|
+
"ChevronRightIcon",
|
|
630
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
631
|
+
);
|
|
632
|
+
|
|
633
|
+
// src/icons/CheckIcon.tsx
|
|
634
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
635
|
+
var CheckIcon = createIcon(
|
|
636
|
+
"CheckIcon",
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" })
|
|
638
|
+
);
|
|
639
|
+
|
|
640
|
+
// src/icons/PlusIcon.tsx
|
|
641
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
642
|
+
var PlusIcon = createIcon(
|
|
643
|
+
"PlusIcon",
|
|
644
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" })
|
|
645
|
+
);
|
|
646
|
+
|
|
647
|
+
// src/icons/TrashIcon.tsx
|
|
648
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
649
|
+
var TrashIcon = createIcon(
|
|
650
|
+
"TrashIcon",
|
|
651
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" })
|
|
652
|
+
);
|
|
653
|
+
|
|
654
|
+
// src/icons/EditIcon.tsx
|
|
655
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
656
|
+
var EditIcon = createIcon(
|
|
657
|
+
"EditIcon",
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" })
|
|
659
|
+
);
|
|
660
|
+
|
|
661
|
+
// src/icons/MailIcon.tsx
|
|
662
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
663
|
+
var MailIcon = createIcon(
|
|
664
|
+
"MailIcon",
|
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" })
|
|
666
|
+
);
|
|
667
|
+
|
|
668
|
+
// src/icons/StarIcon.tsx
|
|
669
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
670
|
+
var StarIcon = createIcon(
|
|
671
|
+
"StarIcon",
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" })
|
|
673
|
+
);
|
|
674
|
+
|
|
675
|
+
// src/icons/HeartIcon.tsx
|
|
676
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
677
|
+
var HeartIcon = createIcon(
|
|
678
|
+
"HeartIcon",
|
|
679
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z" })
|
|
680
|
+
);
|
|
681
|
+
|
|
682
|
+
// src/icons/DownloadIcon.tsx
|
|
683
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
684
|
+
var DownloadIcon = createIcon(
|
|
685
|
+
"DownloadIcon",
|
|
686
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" })
|
|
687
|
+
);
|
|
688
|
+
|
|
689
|
+
// src/icons/UploadIcon.tsx
|
|
690
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
691
|
+
var UploadIcon = createIcon(
|
|
692
|
+
"UploadIcon",
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" })
|
|
694
|
+
);
|
|
695
|
+
|
|
696
|
+
// src/icons/CameraIcon.tsx
|
|
697
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
698
|
+
var CameraIcon = createIcon(
|
|
699
|
+
"CameraIcon",
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
703
|
+
] })
|
|
704
|
+
);
|
|
705
|
+
|
|
706
|
+
// src/icons/LockIcon.tsx
|
|
707
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
708
|
+
var LockIcon = createIcon(
|
|
709
|
+
"LockIcon",
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" })
|
|
711
|
+
);
|
|
712
|
+
|
|
713
|
+
// src/icons/CalendarIcon.tsx
|
|
714
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
715
|
+
var CalendarIcon = createIcon(
|
|
716
|
+
"CalendarIcon",
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" })
|
|
718
|
+
);
|
|
719
|
+
|
|
720
|
+
// src/icons/GoogleIcon.tsx
|
|
721
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
722
|
+
var GoogleIcon = createIcon(
|
|
723
|
+
"GoogleIcon",
|
|
724
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }),
|
|
725
|
+
true
|
|
726
|
+
);
|
|
727
|
+
|
|
728
|
+
// src/icons/GitHubIcon.tsx
|
|
729
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
730
|
+
var GitHubIcon = createIcon(
|
|
731
|
+
"GitHubIcon",
|
|
732
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" }),
|
|
733
|
+
true
|
|
734
|
+
);
|
|
735
|
+
|
|
736
|
+
// src/icons/TwitterIcon.tsx
|
|
737
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
738
|
+
var TwitterIcon = createIcon(
|
|
739
|
+
"TwitterIcon",
|
|
740
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }),
|
|
741
|
+
true
|
|
742
|
+
);
|
|
743
|
+
|
|
744
|
+
// src/icons/FacebookIcon.tsx
|
|
745
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
746
|
+
var FacebookIcon = createIcon(
|
|
747
|
+
"FacebookIcon",
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" }),
|
|
749
|
+
true
|
|
750
|
+
);
|
|
751
|
+
|
|
752
|
+
// src/icons/AppleIcon.tsx
|
|
753
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
754
|
+
var AppleIcon = createIcon(
|
|
755
|
+
"AppleIcon",
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { d: "M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }),
|
|
757
|
+
true
|
|
758
|
+
);
|
|
759
|
+
|
|
760
|
+
// src/icons/LinkedInIcon.tsx
|
|
761
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
762
|
+
var LinkedInIcon = createIcon(
|
|
763
|
+
"LinkedInIcon",
|
|
764
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }),
|
|
765
|
+
true
|
|
766
|
+
);
|
|
767
|
+
|
|
768
|
+
// src/icons/YouTubeIcon.tsx
|
|
769
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
770
|
+
var YouTubeIcon = createIcon(
|
|
771
|
+
"YouTubeIcon",
|
|
772
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }),
|
|
773
|
+
true
|
|
774
|
+
);
|
|
775
|
+
|
|
776
|
+
// src/icons/SlackIcon.tsx
|
|
777
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
778
|
+
var SlackIcon = createIcon(
|
|
779
|
+
"SlackIcon",
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { d: "M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" }),
|
|
781
|
+
true
|
|
782
|
+
);
|
|
783
|
+
|
|
784
|
+
// src/components/AppShell.tsx
|
|
785
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
786
|
+
var widthClasses2 = {
|
|
787
|
+
sm: "w-48",
|
|
788
|
+
md: "w-64",
|
|
789
|
+
lg: "w-80"
|
|
790
|
+
};
|
|
791
|
+
var breakpointClasses = {
|
|
792
|
+
sm: "sm",
|
|
793
|
+
md: "md",
|
|
794
|
+
lg: "lg",
|
|
795
|
+
xl: "xl"
|
|
796
|
+
};
|
|
797
|
+
var AppShell = ({
|
|
798
|
+
children,
|
|
799
|
+
navbar,
|
|
800
|
+
header,
|
|
801
|
+
navbarTitle,
|
|
802
|
+
navbarLogo,
|
|
803
|
+
defaultNavbarOpen = false,
|
|
804
|
+
responsive = true,
|
|
805
|
+
className = ""
|
|
806
|
+
}) => {
|
|
807
|
+
const { theme } = useTheme();
|
|
808
|
+
const [isMobileNavbarOpen, setIsMobileNavbarOpen] = (0, import_react5.useState)(defaultNavbarOpen);
|
|
809
|
+
const navbarWidth = navbar?.width || "md";
|
|
810
|
+
const navbarBreakpoint = navbar?.breakpoint || "md";
|
|
811
|
+
const widthClass = widthClasses2[navbarWidth];
|
|
812
|
+
const breakpoint = breakpointClasses[navbarBreakpoint];
|
|
813
|
+
if (!responsive && navbar) {
|
|
814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `min-h-screen flex flex-col ${className}`, children: [
|
|
815
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "w-full", children: header }),
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-1", children: [
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("aside", { className: `${widthClass} bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700 h-full overflow-y-auto`, children: navbar.content }),
|
|
818
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("main", { className: "flex-1 overflow-y-auto", children })
|
|
819
|
+
] })
|
|
820
|
+
] });
|
|
821
|
+
}
|
|
822
|
+
if (!responsive) {
|
|
823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `min-h-screen flex flex-col ${className}`, children: [
|
|
824
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "w-full", children: header }),
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("main", { className: "flex-1 overflow-y-auto", children })
|
|
826
|
+
] });
|
|
827
|
+
}
|
|
828
|
+
if (navbar) {
|
|
829
|
+
const mobileHeaderClass = navbarBreakpoint === "sm" ? "sm:hidden" : navbarBreakpoint === "md" ? "md:hidden" : navbarBreakpoint === "lg" ? "lg:hidden" : "xl:hidden";
|
|
830
|
+
const desktopNavbarClass = navbarBreakpoint === "sm" ? "sm:block" : navbarBreakpoint === "md" ? "md:block" : navbarBreakpoint === "lg" ? "lg:block" : "xl:block";
|
|
831
|
+
const mobileDrawerClass = navbarBreakpoint === "sm" ? "sm:hidden" : navbarBreakpoint === "md" ? "md:hidden" : navbarBreakpoint === "lg" ? "lg:hidden" : "xl:hidden";
|
|
832
|
+
const sidebarWidthClass = navbarWidth === "sm" ? "w-48" : navbarWidth === "lg" ? "w-80" : "w-64";
|
|
833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `min-h-screen flex flex-col bg-gray-50 dark:bg-gray-900 ${className}`, children: [
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `${mobileHeaderClass} sticky top-0 z-30 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-4 py-3 flex items-center justify-between`, children: [
|
|
835
|
+
navbarLogo ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: navbarLogo }) : navbarTitle ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: navbarTitle }) : null,
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
837
|
+
"button",
|
|
838
|
+
{
|
|
839
|
+
className: "p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",
|
|
840
|
+
onClick: () => setIsMobileNavbarOpen(!isMobileNavbarOpen),
|
|
841
|
+
"aria-label": "Toggle menu",
|
|
842
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MenuIcon, { size: "md" })
|
|
843
|
+
}
|
|
844
|
+
)
|
|
845
|
+
] }),
|
|
846
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "w-full", children: header }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-1 min-h-0", children: [
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("aside", { className: `hidden ${desktopNavbarClass} ${sidebarWidthClass} bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700 overflow-y-auto shrink-0`, children: navbar.content }),
|
|
849
|
+
isMobileNavbarOpen && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
851
|
+
"div",
|
|
852
|
+
{
|
|
853
|
+
className: `${mobileDrawerClass} fixed inset-0 z-40 bg-black/60 backdrop-blur-sm animate-in fade-in duration-200`,
|
|
854
|
+
onClick: () => setIsMobileNavbarOpen(false)
|
|
855
|
+
}
|
|
856
|
+
),
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `${mobileDrawerClass} fixed left-0 top-0 bottom-0 z-50 w-64 bg-white dark:bg-gray-800 shadow-2xl animate-in slide-in-from-left duration-300`, children: [
|
|
858
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "p-4 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between", children: [
|
|
859
|
+
navbarLogo ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: navbarLogo }) : navbarTitle ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: navbarTitle }) : null,
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
861
|
+
"button",
|
|
862
|
+
{
|
|
863
|
+
className: "p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",
|
|
864
|
+
onClick: () => setIsMobileNavbarOpen(false),
|
|
865
|
+
"aria-label": "Close menu",
|
|
866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
867
|
+
}
|
|
868
|
+
)
|
|
869
|
+
] }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "overflow-y-auto h-[calc(100vh-73px)]", children: navbar.content })
|
|
871
|
+
] })
|
|
872
|
+
] }),
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("main", { className: "flex-1 overflow-y-auto min-h-screen", children })
|
|
874
|
+
] })
|
|
875
|
+
] });
|
|
876
|
+
}
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `min-h-screen flex flex-col ${className}`, children: [
|
|
878
|
+
header && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "w-full", children: header }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("main", { className: "flex-1 overflow-y-auto", children })
|
|
880
|
+
] });
|
|
881
|
+
};
|
|
882
|
+
|
|
883
|
+
// src/components/Drawer.tsx
|
|
884
|
+
var import_react6 = require("react");
|
|
885
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
886
|
+
var sizeClasses3 = {
|
|
538
887
|
left: {
|
|
539
888
|
sm: "w-64",
|
|
540
889
|
md: "w-80",
|
|
@@ -578,7 +927,7 @@ var Drawer = ({
|
|
|
578
927
|
showCloseButton = true
|
|
579
928
|
}) => {
|
|
580
929
|
const { theme } = useTheme();
|
|
581
|
-
(0,
|
|
930
|
+
(0, import_react6.useEffect)(() => {
|
|
582
931
|
const handleEscape = (e) => {
|
|
583
932
|
if (e.key === "Escape" && isOpen) {
|
|
584
933
|
onClose();
|
|
@@ -594,34 +943,34 @@ var Drawer = ({
|
|
|
594
943
|
};
|
|
595
944
|
}, [isOpen, onClose]);
|
|
596
945
|
if (!isOpen) return null;
|
|
597
|
-
const sizeClass =
|
|
946
|
+
const sizeClass = sizeClasses3[position][size];
|
|
598
947
|
const positionClass = positionClasses[position];
|
|
599
|
-
return /* @__PURE__ */ (0,
|
|
600
|
-
/* @__PURE__ */ (0,
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
601
950
|
"div",
|
|
602
951
|
{
|
|
603
952
|
className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm transition-all duration-200",
|
|
604
953
|
onClick: onClose
|
|
605
954
|
}
|
|
606
955
|
),
|
|
607
|
-
/* @__PURE__ */ (0,
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
608
957
|
"div",
|
|
609
958
|
{
|
|
610
959
|
className: `fixed z-50 ${positionClass} ${sizeClass} bg-white dark:bg-gray-800 shadow-2xl overflow-hidden flex flex-col ${slideClasses[position]}`,
|
|
611
960
|
children: [
|
|
612
|
-
(title || showCloseButton) && /* @__PURE__ */ (0,
|
|
613
|
-
title && /* @__PURE__ */ (0,
|
|
614
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
961
|
+
(title || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700", children: [
|
|
962
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
|
|
963
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
615
964
|
"button",
|
|
616
965
|
{
|
|
617
966
|
onClick: onClose,
|
|
618
967
|
className: "ml-auto text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors",
|
|
619
968
|
"aria-label": "Close drawer",
|
|
620
|
-
children: /* @__PURE__ */ (0,
|
|
969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
621
970
|
}
|
|
622
971
|
)
|
|
623
972
|
] }),
|
|
624
|
-
/* @__PURE__ */ (0,
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-1 p-6 overflow-y-auto", children })
|
|
625
974
|
]
|
|
626
975
|
}
|
|
627
976
|
)
|
|
@@ -629,14 +978,14 @@ var Drawer = ({
|
|
|
629
978
|
};
|
|
630
979
|
|
|
631
980
|
// src/components/TextInput.tsx
|
|
632
|
-
var
|
|
633
|
-
var
|
|
634
|
-
var
|
|
981
|
+
var import_react7 = require("react");
|
|
982
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
983
|
+
var sizeClasses4 = {
|
|
635
984
|
sm: "px-3 py-1.5 text-sm",
|
|
636
985
|
md: "px-4 py-2.5 text-base",
|
|
637
986
|
lg: "px-4 py-3 text-lg"
|
|
638
987
|
};
|
|
639
|
-
var TextInput = (0,
|
|
988
|
+
var TextInput = (0, import_react7.forwardRef)(
|
|
640
989
|
({
|
|
641
990
|
label,
|
|
642
991
|
error,
|
|
@@ -651,16 +1000,16 @@ var TextInput = (0, import_react6.forwardRef)(
|
|
|
651
1000
|
}, ref) => {
|
|
652
1001
|
const { theme, themeName } = useTheme();
|
|
653
1002
|
const baseStyles = theme.select?.base || "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
654
|
-
const sizeStyle =
|
|
1003
|
+
const sizeStyle = sizeClasses4[size];
|
|
655
1004
|
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
656
1005
|
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
657
1006
|
const widthStyle = fullWidth ? "w-full" : "";
|
|
658
1007
|
const paddingWithIcon = leftIcon ? "pl-10" : rightIcon ? "pr-10" : "";
|
|
659
|
-
return /* @__PURE__ */ (0,
|
|
660
|
-
label && /* @__PURE__ */ (0,
|
|
661
|
-
/* @__PURE__ */ (0,
|
|
662
|
-
leftIcon && /* @__PURE__ */ (0,
|
|
663
|
-
/* @__PURE__ */ (0,
|
|
1008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: `${widthStyle} ${className}`, children: [
|
|
1009
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative", children: [
|
|
1011
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: leftIcon }),
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
664
1013
|
"input",
|
|
665
1014
|
{
|
|
666
1015
|
ref,
|
|
@@ -669,27 +1018,27 @@ var TextInput = (0, import_react6.forwardRef)(
|
|
|
669
1018
|
...props
|
|
670
1019
|
}
|
|
671
1020
|
),
|
|
672
|
-
rightIcon && /* @__PURE__ */ (0,
|
|
1021
|
+
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: rightIcon })
|
|
673
1022
|
] }),
|
|
674
|
-
error && /* @__PURE__ */ (0,
|
|
675
|
-
helperText && !error && /* @__PURE__ */ (0,
|
|
1023
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1024
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
676
1025
|
] });
|
|
677
1026
|
}
|
|
678
1027
|
);
|
|
679
1028
|
TextInput.displayName = "TextInput";
|
|
680
1029
|
|
|
681
1030
|
// src/components/ActionMenu.tsx
|
|
682
|
-
var
|
|
683
|
-
var
|
|
1031
|
+
var import_react8 = require("react");
|
|
1032
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
684
1033
|
var ActionMenu = ({
|
|
685
1034
|
items,
|
|
686
1035
|
trigger,
|
|
687
1036
|
position = "right"
|
|
688
1037
|
}) => {
|
|
689
1038
|
const { themeName } = useTheme();
|
|
690
|
-
const [isOpen, setIsOpen] = (0,
|
|
691
|
-
const menuRef = (0,
|
|
692
|
-
(0,
|
|
1039
|
+
const [isOpen, setIsOpen] = (0, import_react8.useState)(false);
|
|
1040
|
+
const menuRef = (0, import_react8.useRef)(null);
|
|
1041
|
+
(0, import_react8.useEffect)(() => {
|
|
693
1042
|
const handleClickOutside = (event) => {
|
|
694
1043
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
695
1044
|
setIsOpen(false);
|
|
@@ -706,33 +1055,33 @@ var ActionMenu = ({
|
|
|
706
1055
|
setIsOpen(false);
|
|
707
1056
|
}
|
|
708
1057
|
};
|
|
709
|
-
const defaultTrigger = /* @__PURE__ */ (0,
|
|
1058
|
+
const defaultTrigger = /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
710
1059
|
"button",
|
|
711
1060
|
{
|
|
712
1061
|
className: "p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",
|
|
713
1062
|
"aria-label": "Open menu",
|
|
714
|
-
children: /* @__PURE__ */ (0,
|
|
1063
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { className: "w-5 h-5 text-gray-600 dark:text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z" }) })
|
|
715
1064
|
}
|
|
716
1065
|
);
|
|
717
1066
|
const menuBaseStyles = themeName === "minimalistic" ? "bg-black border-2 border-white" : "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-lg";
|
|
718
1067
|
const itemBaseStyles = themeName === "minimalistic" ? "text-white hover:bg-white hover:text-black transition-colors duration-200" : "text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors";
|
|
719
1068
|
const positionClass = position === "left" ? "left-0" : "right-0";
|
|
720
|
-
return /* @__PURE__ */ (0,
|
|
721
|
-
/* @__PURE__ */ (0,
|
|
722
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative inline-block", ref: menuRef, children: [
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { onClick: () => setIsOpen(!isOpen), children: trigger || defaultTrigger }),
|
|
1071
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
723
1072
|
"div",
|
|
724
1073
|
{
|
|
725
1074
|
className: `absolute ${positionClass} mt-2 w-56 rounded-lg ${menuBaseStyles} z-50 overflow-hidden`,
|
|
726
1075
|
style: { minWidth: "14rem" },
|
|
727
|
-
children: items.map((item, index) => /* @__PURE__ */ (0,
|
|
1076
|
+
children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
728
1077
|
"button",
|
|
729
1078
|
{
|
|
730
1079
|
onClick: () => handleItemClick(item),
|
|
731
1080
|
disabled: item.disabled,
|
|
732
1081
|
className: `w-full text-left px-4 py-3 flex items-center gap-3 ${itemBaseStyles} ${item.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${item.variant === "danger" ? "text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20" : ""}`,
|
|
733
1082
|
children: [
|
|
734
|
-
item.icon && /* @__PURE__ */ (0,
|
|
735
|
-
/* @__PURE__ */ (0,
|
|
1083
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex-shrink-0", children: item.icon }),
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex-1", children: item.label })
|
|
736
1085
|
]
|
|
737
1086
|
},
|
|
738
1087
|
index
|
|
@@ -743,7 +1092,7 @@ var ActionMenu = ({
|
|
|
743
1092
|
};
|
|
744
1093
|
|
|
745
1094
|
// src/components/Card.tsx
|
|
746
|
-
var
|
|
1095
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
747
1096
|
var paddingClasses = {
|
|
748
1097
|
none: "",
|
|
749
1098
|
sm: "p-4",
|
|
@@ -759,7 +1108,7 @@ var Card = ({
|
|
|
759
1108
|
const { theme } = useTheme();
|
|
760
1109
|
const paddingClass = paddingClasses[padding];
|
|
761
1110
|
const hoverClass = hover ? "hover:shadow-lg transition-shadow duration-200" : "";
|
|
762
|
-
return /* @__PURE__ */ (0,
|
|
1111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
763
1112
|
"div",
|
|
764
1113
|
{
|
|
765
1114
|
className: `bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 ${paddingClass} ${hoverClass} ${className}`,
|
|
@@ -769,7 +1118,7 @@ var Card = ({
|
|
|
769
1118
|
};
|
|
770
1119
|
|
|
771
1120
|
// src/components/Alert.tsx
|
|
772
|
-
var
|
|
1121
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
773
1122
|
var variantStyles = {
|
|
774
1123
|
info: "bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-100",
|
|
775
1124
|
success: "bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-900 dark:text-green-100",
|
|
@@ -792,38 +1141,38 @@ var Alert = ({
|
|
|
792
1141
|
const { theme } = useTheme();
|
|
793
1142
|
const variantClass = variantStyles[variant];
|
|
794
1143
|
const iconClass = iconStyles[variant];
|
|
795
|
-
return /* @__PURE__ */ (0,
|
|
796
|
-
/* @__PURE__ */ (0,
|
|
797
|
-
variant === "info" && /* @__PURE__ */ (0,
|
|
798
|
-
variant === "success" && /* @__PURE__ */ (0,
|
|
799
|
-
variant === "warning" && /* @__PURE__ */ (0,
|
|
800
|
-
variant === "error" && /* @__PURE__ */ (0,
|
|
1144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `rounded-lg border p-4 ${variantClass} ${className}`, role: "alert", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: `flex-shrink-0 ${iconClass}`, children: [
|
|
1146
|
+
variant === "info" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }),
|
|
1147
|
+
variant === "success" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }) }),
|
|
1148
|
+
variant === "warning" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }),
|
|
1149
|
+
variant === "error" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }) })
|
|
801
1150
|
] }),
|
|
802
|
-
/* @__PURE__ */ (0,
|
|
803
|
-
title && /* @__PURE__ */ (0,
|
|
804
|
-
/* @__PURE__ */ (0,
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex-1", children: [
|
|
1152
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "font-semibold mb-1", children: title }),
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "text-sm", children })
|
|
805
1154
|
] }),
|
|
806
|
-
onClose && /* @__PURE__ */ (0,
|
|
1155
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
807
1156
|
"button",
|
|
808
1157
|
{
|
|
809
1158
|
onClick: onClose,
|
|
810
1159
|
className: `flex-shrink-0 ${iconClass} hover:opacity-70 transition-opacity`,
|
|
811
1160
|
"aria-label": "Close alert",
|
|
812
|
-
children: /* @__PURE__ */ (0,
|
|
1161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
813
1162
|
}
|
|
814
1163
|
)
|
|
815
1164
|
] }) });
|
|
816
1165
|
};
|
|
817
1166
|
|
|
818
1167
|
// src/components/Checkbox.tsx
|
|
819
|
-
var
|
|
820
|
-
var
|
|
821
|
-
var Checkbox = (0,
|
|
1168
|
+
var import_react9 = require("react");
|
|
1169
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1170
|
+
var Checkbox = (0, import_react9.forwardRef)(
|
|
822
1171
|
({ label, error, className = "", disabled, ...props }, ref) => {
|
|
823
1172
|
const { theme } = useTheme();
|
|
824
|
-
return /* @__PURE__ */ (0,
|
|
825
|
-
/* @__PURE__ */ (0,
|
|
826
|
-
/* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className, children: [
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer group", children: [
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
827
1176
|
"input",
|
|
828
1177
|
{
|
|
829
1178
|
ref,
|
|
@@ -833,18 +1182,18 @@ var Checkbox = (0, import_react8.forwardRef)(
|
|
|
833
1182
|
...props
|
|
834
1183
|
}
|
|
835
1184
|
),
|
|
836
|
-
label && /* @__PURE__ */ (0,
|
|
1185
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: `text-sm text-gray-700 dark:text-gray-300 ${disabled ? "opacity-50 cursor-not-allowed" : "group-hover:text-gray-900 dark:group-hover:text-gray-100"}`, children: label })
|
|
837
1186
|
] }),
|
|
838
|
-
error && /* @__PURE__ */ (0,
|
|
1187
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error })
|
|
839
1188
|
] });
|
|
840
1189
|
}
|
|
841
1190
|
);
|
|
842
1191
|
Checkbox.displayName = "Checkbox";
|
|
843
1192
|
|
|
844
1193
|
// src/components/Toggle.tsx
|
|
845
|
-
var
|
|
846
|
-
var
|
|
847
|
-
var Toggle = (0,
|
|
1194
|
+
var import_react10 = require("react");
|
|
1195
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1196
|
+
var Toggle = (0, import_react10.forwardRef)(
|
|
848
1197
|
({ label, size = "md", className = "", disabled, checked, ...props }, ref) => {
|
|
849
1198
|
const { theme } = useTheme();
|
|
850
1199
|
const toggleClasses = {
|
|
@@ -862,9 +1211,9 @@ var Toggle = (0, import_react9.forwardRef)(
|
|
|
862
1211
|
}
|
|
863
1212
|
};
|
|
864
1213
|
const currentSize = toggleClasses[size];
|
|
865
|
-
return /* @__PURE__ */ (0,
|
|
866
|
-
/* @__PURE__ */ (0,
|
|
867
|
-
/* @__PURE__ */ (0,
|
|
1214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("label", { className: `inline-flex items-center gap-3 cursor-pointer ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${className}`, children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", children: [
|
|
1216
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
868
1217
|
"input",
|
|
869
1218
|
{
|
|
870
1219
|
ref,
|
|
@@ -875,27 +1224,27 @@ var Toggle = (0, import_react9.forwardRef)(
|
|
|
875
1224
|
...props
|
|
876
1225
|
}
|
|
877
1226
|
),
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
1227
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
879
1228
|
"div",
|
|
880
1229
|
{
|
|
881
1230
|
className: `${currentSize.switch} bg-gray-300 dark:bg-gray-700 peer-focus:ring-2 peer-focus:ring-blue-500 rounded-full peer peer-checked:bg-blue-600 dark:peer-checked:bg-blue-500 transition-colors`
|
|
882
1231
|
}
|
|
883
1232
|
),
|
|
884
|
-
/* @__PURE__ */ (0,
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
885
1234
|
"div",
|
|
886
1235
|
{
|
|
887
1236
|
className: `${currentSize.thumb} bg-white rounded-full shadow-md absolute top-0.5 left-0.5 transition-transform`
|
|
888
1237
|
}
|
|
889
1238
|
)
|
|
890
1239
|
] }),
|
|
891
|
-
label && /* @__PURE__ */ (0,
|
|
1240
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: label })
|
|
892
1241
|
] });
|
|
893
1242
|
}
|
|
894
1243
|
);
|
|
895
1244
|
Toggle.displayName = "Toggle";
|
|
896
1245
|
|
|
897
1246
|
// src/components/Badge.tsx
|
|
898
|
-
var
|
|
1247
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
899
1248
|
var variantStyles2 = {
|
|
900
1249
|
default: "bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",
|
|
901
1250
|
primary: "bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200",
|
|
@@ -918,12 +1267,12 @@ var Badge = ({
|
|
|
918
1267
|
const { theme } = useTheme();
|
|
919
1268
|
const variantClass = variantStyles2[variant];
|
|
920
1269
|
const sizeClass = sizeStyles[size];
|
|
921
|
-
return /* @__PURE__ */ (0,
|
|
1270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: `inline-flex items-center font-medium rounded-full ${variantClass} ${sizeClass} ${className}`, children });
|
|
922
1271
|
};
|
|
923
1272
|
|
|
924
1273
|
// src/components/Spinner.tsx
|
|
925
|
-
var
|
|
926
|
-
var
|
|
1274
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1275
|
+
var sizeClasses5 = {
|
|
927
1276
|
sm: "w-4 h-4 border-2",
|
|
928
1277
|
md: "w-8 h-8 border-2",
|
|
929
1278
|
lg: "w-12 h-12 border-3",
|
|
@@ -940,22 +1289,22 @@ var Spinner = ({
|
|
|
940
1289
|
className = ""
|
|
941
1290
|
}) => {
|
|
942
1291
|
const { theme } = useTheme();
|
|
943
|
-
const sizeClass =
|
|
1292
|
+
const sizeClass = sizeClasses5[size];
|
|
944
1293
|
const colorClass = colorClasses[color];
|
|
945
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
946
1295
|
"div",
|
|
947
1296
|
{
|
|
948
1297
|
className: `inline-block rounded-full animate-spin ${sizeClass} ${colorClass} ${className}`,
|
|
949
1298
|
role: "status",
|
|
950
1299
|
"aria-label": "Loading",
|
|
951
|
-
children: /* @__PURE__ */ (0,
|
|
1300
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "sr-only", children: "Loading..." })
|
|
952
1301
|
}
|
|
953
1302
|
);
|
|
954
1303
|
};
|
|
955
1304
|
|
|
956
1305
|
// src/components/Tabs.tsx
|
|
957
|
-
var
|
|
958
|
-
var
|
|
1306
|
+
var import_react11 = require("react");
|
|
1307
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
959
1308
|
var Tabs = ({
|
|
960
1309
|
tabs,
|
|
961
1310
|
defaultIndex = 0,
|
|
@@ -963,14 +1312,14 @@ var Tabs = ({
|
|
|
963
1312
|
className = ""
|
|
964
1313
|
}) => {
|
|
965
1314
|
const { theme } = useTheme();
|
|
966
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
1315
|
+
const [activeIndex, setActiveIndex] = (0, import_react11.useState)(defaultIndex);
|
|
967
1316
|
const handleTabClick = (index) => {
|
|
968
1317
|
if (tabs[index].disabled) return;
|
|
969
1318
|
setActiveIndex(index);
|
|
970
1319
|
onChange?.(index);
|
|
971
1320
|
};
|
|
972
|
-
return /* @__PURE__ */ (0,
|
|
973
|
-
/* @__PURE__ */ (0,
|
|
1321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className, children: [
|
|
1322
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("nav", { className: "flex gap-8 px-6", "aria-label": "Tabs", children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
974
1323
|
"button",
|
|
975
1324
|
{
|
|
976
1325
|
onClick: () => handleTabClick(index),
|
|
@@ -981,12 +1330,12 @@ var Tabs = ({
|
|
|
981
1330
|
},
|
|
982
1331
|
index
|
|
983
1332
|
)) }) }),
|
|
984
|
-
/* @__PURE__ */ (0,
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: tabs[activeIndex]?.content })
|
|
985
1334
|
] });
|
|
986
1335
|
};
|
|
987
1336
|
|
|
988
1337
|
// src/components/Table.tsx
|
|
989
|
-
var
|
|
1338
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
990
1339
|
function Table({
|
|
991
1340
|
columns,
|
|
992
1341
|
data,
|
|
@@ -996,9 +1345,9 @@ function Table({
|
|
|
996
1345
|
className = ""
|
|
997
1346
|
}) {
|
|
998
1347
|
const { theme } = useTheme();
|
|
999
|
-
return /* @__PURE__ */ (0,
|
|
1000
|
-
/* @__PURE__ */ (0,
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: `overflow-x-auto ${className}`, children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("table", { className: "w-full text-left", children: [
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("thead", { className: "bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tr", { children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1002
1351
|
"th",
|
|
1003
1352
|
{
|
|
1004
1353
|
className: "px-6 py-3 text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",
|
|
@@ -1007,14 +1356,14 @@ function Table({
|
|
|
1007
1356
|
},
|
|
1008
1357
|
column.key
|
|
1009
1358
|
)) }) }),
|
|
1010
|
-
/* @__PURE__ */ (0,
|
|
1359
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tbody", { className: "bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700", children: data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1011
1360
|
"tr",
|
|
1012
1361
|
{
|
|
1013
1362
|
className: `
|
|
1014
1363
|
${striped && rowIndex % 2 === 1 ? "bg-gray-50 dark:bg-gray-800/50" : ""}
|
|
1015
1364
|
${hoverable ? "hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors" : ""}
|
|
1016
1365
|
`,
|
|
1017
|
-
children: columns.map((column) => /* @__PURE__ */ (0,
|
|
1366
|
+
children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1018
1367
|
"td",
|
|
1019
1368
|
{
|
|
1020
1369
|
className: "px-6 py-4 text-sm text-gray-900 dark:text-gray-100",
|
|
@@ -1026,12 +1375,12 @@ function Table({
|
|
|
1026
1375
|
row[keyField] || rowIndex
|
|
1027
1376
|
)) })
|
|
1028
1377
|
] }),
|
|
1029
|
-
data.length === 0 && /* @__PURE__ */ (0,
|
|
1378
|
+
data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-center py-8 text-gray-500 dark:text-gray-400", children: "No data available" })
|
|
1030
1379
|
] });
|
|
1031
1380
|
}
|
|
1032
1381
|
|
|
1033
1382
|
// src/components/Pagination.tsx
|
|
1034
|
-
var
|
|
1383
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1035
1384
|
var Pagination = ({
|
|
1036
1385
|
currentPage,
|
|
1037
1386
|
totalPages,
|
|
@@ -1072,8 +1421,8 @@ var Pagination = ({
|
|
|
1072
1421
|
return range(1, totalPages);
|
|
1073
1422
|
};
|
|
1074
1423
|
const pages = paginationRange();
|
|
1075
|
-
return /* @__PURE__ */ (0,
|
|
1076
|
-
/* @__PURE__ */ (0,
|
|
1424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("nav", { className: `flex items-center gap-1 ${className}`, "aria-label": "Pagination", children: [
|
|
1425
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1077
1426
|
"button",
|
|
1078
1427
|
{
|
|
1079
1428
|
onClick: () => onPageChange(currentPage - 1),
|
|
@@ -1085,7 +1434,7 @@ var Pagination = ({
|
|
|
1085
1434
|
),
|
|
1086
1435
|
pages.map((page, index) => {
|
|
1087
1436
|
if (page === "...") {
|
|
1088
|
-
return /* @__PURE__ */ (0,
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1089
1438
|
"span",
|
|
1090
1439
|
{
|
|
1091
1440
|
className: "px-3 py-2 text-gray-700 dark:text-gray-300",
|
|
@@ -1094,7 +1443,7 @@ var Pagination = ({
|
|
|
1094
1443
|
`dots-${index}`
|
|
1095
1444
|
);
|
|
1096
1445
|
}
|
|
1097
|
-
return /* @__PURE__ */ (0,
|
|
1446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1098
1447
|
"button",
|
|
1099
1448
|
{
|
|
1100
1449
|
onClick: () => onPageChange(page),
|
|
@@ -1106,7 +1455,7 @@ var Pagination = ({
|
|
|
1106
1455
|
page
|
|
1107
1456
|
);
|
|
1108
1457
|
}),
|
|
1109
|
-
/* @__PURE__ */ (0,
|
|
1458
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1110
1459
|
"button",
|
|
1111
1460
|
{
|
|
1112
1461
|
onClick: () => onPageChange(currentPage + 1),
|
|
@@ -1120,17 +1469,17 @@ var Pagination = ({
|
|
|
1120
1469
|
};
|
|
1121
1470
|
|
|
1122
1471
|
// src/components/DatePicker.tsx
|
|
1123
|
-
var
|
|
1124
|
-
var
|
|
1125
|
-
var DatePicker = (0,
|
|
1472
|
+
var import_react12 = require("react");
|
|
1473
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1474
|
+
var DatePicker = (0, import_react12.forwardRef)(
|
|
1126
1475
|
({ label, error, helperText, className = "", disabled, ...props }, ref) => {
|
|
1127
1476
|
const { theme } = useTheme();
|
|
1128
1477
|
const baseStyles = "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 px-4 py-2.5 text-base transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
1129
1478
|
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
1130
1479
|
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
1131
|
-
return /* @__PURE__ */ (0,
|
|
1132
|
-
label && /* @__PURE__ */ (0,
|
|
1133
|
-
/* @__PURE__ */ (0,
|
|
1480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className, children: [
|
|
1481
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1134
1483
|
"input",
|
|
1135
1484
|
{
|
|
1136
1485
|
ref,
|
|
@@ -1140,25 +1489,25 @@ var DatePicker = (0, import_react11.forwardRef)(
|
|
|
1140
1489
|
...props
|
|
1141
1490
|
}
|
|
1142
1491
|
),
|
|
1143
|
-
error && /* @__PURE__ */ (0,
|
|
1144
|
-
helperText && !error && /* @__PURE__ */ (0,
|
|
1492
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1493
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1145
1494
|
] });
|
|
1146
1495
|
}
|
|
1147
1496
|
);
|
|
1148
1497
|
DatePicker.displayName = "DatePicker";
|
|
1149
1498
|
|
|
1150
1499
|
// src/components/TimePicker.tsx
|
|
1151
|
-
var
|
|
1152
|
-
var
|
|
1153
|
-
var TimePicker = (0,
|
|
1500
|
+
var import_react13 = require("react");
|
|
1501
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1502
|
+
var TimePicker = (0, import_react13.forwardRef)(
|
|
1154
1503
|
({ label, error, helperText, className = "", disabled, ...props }, ref) => {
|
|
1155
1504
|
const { theme } = useTheme();
|
|
1156
1505
|
const baseStyles = "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 px-4 py-2.5 text-base transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
1157
1506
|
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
1158
1507
|
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
1159
|
-
return /* @__PURE__ */ (0,
|
|
1160
|
-
label && /* @__PURE__ */ (0,
|
|
1161
|
-
/* @__PURE__ */ (0,
|
|
1508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className, children: [
|
|
1509
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1162
1511
|
"input",
|
|
1163
1512
|
{
|
|
1164
1513
|
ref,
|
|
@@ -1168,25 +1517,25 @@ var TimePicker = (0, import_react12.forwardRef)(
|
|
|
1168
1517
|
...props
|
|
1169
1518
|
}
|
|
1170
1519
|
),
|
|
1171
|
-
error && /* @__PURE__ */ (0,
|
|
1172
|
-
helperText && !error && /* @__PURE__ */ (0,
|
|
1520
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1521
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1173
1522
|
] });
|
|
1174
1523
|
}
|
|
1175
1524
|
);
|
|
1176
1525
|
TimePicker.displayName = "TimePicker";
|
|
1177
1526
|
|
|
1178
1527
|
// src/components/DateTimePicker.tsx
|
|
1179
|
-
var
|
|
1180
|
-
var
|
|
1181
|
-
var DateTimePicker = (0,
|
|
1528
|
+
var import_react14 = require("react");
|
|
1529
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1530
|
+
var DateTimePicker = (0, import_react14.forwardRef)(
|
|
1182
1531
|
({ label, error, helperText, className = "", disabled, ...props }, ref) => {
|
|
1183
1532
|
const { theme } = useTheme();
|
|
1184
1533
|
const baseStyles = "w-full appearance-none rounded-lg border border-gray-300 bg-white text-gray-900 px-4 py-2.5 text-base transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent shadow-sm hover:border-gray-400 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:border-gray-500";
|
|
1185
1534
|
const errorStyles = error ? "border-red-500 focus:ring-red-500 dark:border-red-500" : "";
|
|
1186
1535
|
const disabledStyles = disabled ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900" : "";
|
|
1187
|
-
return /* @__PURE__ */ (0,
|
|
1188
|
-
label && /* @__PURE__ */ (0,
|
|
1189
|
-
/* @__PURE__ */ (0,
|
|
1536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className, children: [
|
|
1537
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1190
1539
|
"input",
|
|
1191
1540
|
{
|
|
1192
1541
|
ref,
|
|
@@ -1196,16 +1545,16 @@ var DateTimePicker = (0, import_react13.forwardRef)(
|
|
|
1196
1545
|
...props
|
|
1197
1546
|
}
|
|
1198
1547
|
),
|
|
1199
|
-
error && /* @__PURE__ */ (0,
|
|
1200
|
-
helperText && !error && /* @__PURE__ */ (0,
|
|
1548
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1549
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1201
1550
|
] });
|
|
1202
1551
|
}
|
|
1203
1552
|
);
|
|
1204
1553
|
DateTimePicker.displayName = "DateTimePicker";
|
|
1205
1554
|
|
|
1206
1555
|
// src/components/Radio.tsx
|
|
1207
|
-
var
|
|
1208
|
-
var
|
|
1556
|
+
var import_react15 = __toESM(require("react"));
|
|
1557
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1209
1558
|
var Radio = ({
|
|
1210
1559
|
name,
|
|
1211
1560
|
options,
|
|
@@ -1216,7 +1565,7 @@ var Radio = ({
|
|
|
1216
1565
|
orientation = "vertical",
|
|
1217
1566
|
className = ""
|
|
1218
1567
|
}) => {
|
|
1219
|
-
const [internalValue, setInternalValue] =
|
|
1568
|
+
const [internalValue, setInternalValue] = import_react15.default.useState(defaultValue || "");
|
|
1220
1569
|
const value = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
1221
1570
|
const handleChange = (optionValue) => {
|
|
1222
1571
|
if (disabled) return;
|
|
@@ -1224,17 +1573,17 @@ var Radio = ({
|
|
|
1224
1573
|
onChange?.(optionValue);
|
|
1225
1574
|
};
|
|
1226
1575
|
const containerClass = orientation === "horizontal" ? "flex flex-wrap gap-4" : "flex flex-col gap-2";
|
|
1227
|
-
return /* @__PURE__ */ (0,
|
|
1576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `${containerClass} ${className}`, role: "radiogroup", children: options.map((option) => {
|
|
1228
1577
|
const isDisabled = disabled || option.disabled;
|
|
1229
1578
|
const isChecked = value === option.value;
|
|
1230
1579
|
const id = `${name}-${option.value}`;
|
|
1231
|
-
return /* @__PURE__ */ (0,
|
|
1580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
1232
1581
|
"label",
|
|
1233
1582
|
{
|
|
1234
1583
|
htmlFor: id,
|
|
1235
1584
|
className: `flex items-center gap-2 cursor-pointer ${isDisabled ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1236
1585
|
children: [
|
|
1237
|
-
/* @__PURE__ */ (0,
|
|
1586
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
1238
1587
|
"input",
|
|
1239
1588
|
{
|
|
1240
1589
|
type: "radio",
|
|
@@ -1247,7 +1596,7 @@ var Radio = ({
|
|
|
1247
1596
|
className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600 cursor-pointer disabled:cursor-not-allowed"
|
|
1248
1597
|
}
|
|
1249
1598
|
),
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-300", children: option.label })
|
|
1251
1600
|
]
|
|
1252
1601
|
},
|
|
1253
1602
|
option.value
|
|
@@ -1256,7 +1605,7 @@ var Radio = ({
|
|
|
1256
1605
|
};
|
|
1257
1606
|
|
|
1258
1607
|
// src/components/ProgressBar.tsx
|
|
1259
|
-
var
|
|
1608
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1260
1609
|
var ProgressBar = ({
|
|
1261
1610
|
value,
|
|
1262
1611
|
max = 100,
|
|
@@ -1278,15 +1627,15 @@ var ProgressBar = ({
|
|
|
1278
1627
|
warning: "bg-yellow-500 dark:bg-yellow-400",
|
|
1279
1628
|
danger: "bg-red-600 dark:bg-red-500"
|
|
1280
1629
|
};
|
|
1281
|
-
return /* @__PURE__ */ (0,
|
|
1282
|
-
(showLabel || label) && /* @__PURE__ */ (0,
|
|
1283
|
-
label && /* @__PURE__ */ (0,
|
|
1284
|
-
showLabel && /* @__PURE__ */ (0,
|
|
1630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `w-full ${className}`, children: [
|
|
1631
|
+
(showLabel || label) && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex justify-between items-center mb-1", children: [
|
|
1632
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: label }),
|
|
1633
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
1285
1634
|
Math.round(percentage),
|
|
1286
1635
|
"%"
|
|
1287
1636
|
] })
|
|
1288
1637
|
] }),
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1290
1639
|
"div",
|
|
1291
1640
|
{
|
|
1292
1641
|
className: `w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden ${sizeClasses6[size]}`,
|
|
@@ -1294,7 +1643,7 @@ var ProgressBar = ({
|
|
|
1294
1643
|
"aria-valuenow": value,
|
|
1295
1644
|
"aria-valuemin": 0,
|
|
1296
1645
|
"aria-valuemax": max,
|
|
1297
|
-
children: /* @__PURE__ */ (0,
|
|
1646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1298
1647
|
"div",
|
|
1299
1648
|
{
|
|
1300
1649
|
className: `${sizeClasses6[size]} ${variantClasses[variant]} rounded-full transition-all duration-300 ease-out`,
|
|
@@ -1307,8 +1656,8 @@ var ProgressBar = ({
|
|
|
1307
1656
|
};
|
|
1308
1657
|
|
|
1309
1658
|
// src/components/Slider.tsx
|
|
1310
|
-
var
|
|
1311
|
-
var
|
|
1659
|
+
var import_react16 = __toESM(require("react"));
|
|
1660
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1312
1661
|
var Slider = ({
|
|
1313
1662
|
value: controlledValue,
|
|
1314
1663
|
defaultValue = 50,
|
|
@@ -1321,7 +1670,7 @@ var Slider = ({
|
|
|
1321
1670
|
label,
|
|
1322
1671
|
className = ""
|
|
1323
1672
|
}) => {
|
|
1324
|
-
const [internalValue, setInternalValue] =
|
|
1673
|
+
const [internalValue, setInternalValue] = import_react16.default.useState(defaultValue);
|
|
1325
1674
|
const value = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
1326
1675
|
const handleChange = (e) => {
|
|
1327
1676
|
const newValue = Number(e.target.value);
|
|
@@ -1329,21 +1678,21 @@ var Slider = ({
|
|
|
1329
1678
|
onChange?.(newValue);
|
|
1330
1679
|
};
|
|
1331
1680
|
const percentage = (value - min) / (max - min) * 100;
|
|
1332
|
-
return /* @__PURE__ */ (0,
|
|
1333
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
1334
|
-
label && /* @__PURE__ */ (0,
|
|
1335
|
-
showValue && /* @__PURE__ */ (0,
|
|
1681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `w-full ${className}`, children: [
|
|
1682
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex justify-between items-center mb-2", children: [
|
|
1683
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("label", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: label }),
|
|
1684
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: value })
|
|
1336
1685
|
] }),
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1338
|
-
/* @__PURE__ */ (0,
|
|
1339
|
-
/* @__PURE__ */ (0,
|
|
1686
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "relative", children: [
|
|
1687
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "absolute inset-0 h-2 bg-gray-200 dark:bg-gray-700 rounded-full top-1/2 -translate-y-1/2" }),
|
|
1688
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1340
1689
|
"div",
|
|
1341
1690
|
{
|
|
1342
1691
|
className: "absolute h-2 bg-blue-600 dark:bg-blue-500 rounded-full top-1/2 -translate-y-1/2 pointer-events-none",
|
|
1343
1692
|
style: { width: `${percentage}%` }
|
|
1344
1693
|
}
|
|
1345
1694
|
),
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
1347
1696
|
"input",
|
|
1348
1697
|
{
|
|
1349
1698
|
type: "range",
|
|
@@ -1365,8 +1714,8 @@ var Slider = ({
|
|
|
1365
1714
|
};
|
|
1366
1715
|
|
|
1367
1716
|
// src/components/Avatar.tsx
|
|
1368
|
-
var
|
|
1369
|
-
var
|
|
1717
|
+
var import_react17 = __toESM(require("react"));
|
|
1718
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1370
1719
|
var Avatar = ({
|
|
1371
1720
|
src,
|
|
1372
1721
|
alt,
|
|
@@ -1376,7 +1725,7 @@ var Avatar = ({
|
|
|
1376
1725
|
className = "",
|
|
1377
1726
|
fallbackColor = "bg-blue-600"
|
|
1378
1727
|
}) => {
|
|
1379
|
-
const [imageError, setImageError] =
|
|
1728
|
+
const [imageError, setImageError] = import_react17.default.useState(false);
|
|
1380
1729
|
const sizeClasses6 = {
|
|
1381
1730
|
xs: "w-6 h-6 text-xs",
|
|
1382
1731
|
sm: "w-8 h-8 text-sm",
|
|
@@ -1394,11 +1743,11 @@ var Avatar = ({
|
|
|
1394
1743
|
};
|
|
1395
1744
|
const showImage = src && !imageError;
|
|
1396
1745
|
const showInitials = !showImage && name;
|
|
1397
|
-
return /* @__PURE__ */ (0,
|
|
1746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1398
1747
|
"div",
|
|
1399
1748
|
{
|
|
1400
1749
|
className: `${sizeClasses6[size]} ${shapeClass} flex items-center justify-center overflow-hidden ${showImage ? "bg-gray-200 dark:bg-gray-700" : `${fallbackColor} text-white`} ${className}`,
|
|
1401
|
-
children: showImage ? /* @__PURE__ */ (0,
|
|
1750
|
+
children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1402
1751
|
"img",
|
|
1403
1752
|
{
|
|
1404
1753
|
src,
|
|
@@ -1406,13 +1755,13 @@ var Avatar = ({
|
|
|
1406
1755
|
className: "w-full h-full object-cover",
|
|
1407
1756
|
onError: () => setImageError(true)
|
|
1408
1757
|
}
|
|
1409
|
-
) : showInitials ? /* @__PURE__ */ (0,
|
|
1758
|
+
) : showInitials ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-semibold select-none", children: getInitials(name) }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1410
1759
|
"svg",
|
|
1411
1760
|
{
|
|
1412
1761
|
className: "w-full h-full text-gray-400 dark:text-gray-600",
|
|
1413
1762
|
fill: "currentColor",
|
|
1414
1763
|
viewBox: "0 0 24 24",
|
|
1415
|
-
children: /* @__PURE__ */ (0,
|
|
1764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" })
|
|
1416
1765
|
}
|
|
1417
1766
|
)
|
|
1418
1767
|
}
|
|
@@ -1420,7 +1769,7 @@ var Avatar = ({
|
|
|
1420
1769
|
};
|
|
1421
1770
|
|
|
1422
1771
|
// src/components/Textarea.tsx
|
|
1423
|
-
var
|
|
1772
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1424
1773
|
var Textarea = ({
|
|
1425
1774
|
label,
|
|
1426
1775
|
error,
|
|
@@ -1447,9 +1796,9 @@ var Textarea = ({
|
|
|
1447
1796
|
bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100
|
|
1448
1797
|
placeholder:text-gray-500 dark:placeholder:text-gray-400
|
|
1449
1798
|
disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-50 dark:disabled:bg-gray-900`;
|
|
1450
|
-
return /* @__PURE__ */ (0,
|
|
1451
|
-
label && /* @__PURE__ */ (0,
|
|
1452
|
-
/* @__PURE__ */ (0,
|
|
1799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `w-full ${className}`, children: [
|
|
1800
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: label }),
|
|
1801
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
1453
1802
|
"textarea",
|
|
1454
1803
|
{
|
|
1455
1804
|
className: `${baseClasses} ${sizeClasses6[size]} ${resizeClasses[resize]}`,
|
|
@@ -1457,272 +1806,25 @@ var Textarea = ({
|
|
|
1457
1806
|
...props
|
|
1458
1807
|
}
|
|
1459
1808
|
),
|
|
1460
|
-
error && /* @__PURE__ */ (0,
|
|
1461
|
-
helperText && !error && /* @__PURE__ */ (0,
|
|
1809
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "mt-1 text-sm text-red-600 dark:text-red-400", children: error }),
|
|
1810
|
+
helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: helperText })
|
|
1462
1811
|
] });
|
|
1463
1812
|
};
|
|
1464
1813
|
|
|
1465
1814
|
// src/components/Toast.tsx
|
|
1466
|
-
var
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1470
|
-
var sizeClasses5 = {
|
|
1471
|
-
xs: "w-3 h-3",
|
|
1472
|
-
sm: "w-4 h-4",
|
|
1473
|
-
md: "w-5 h-5",
|
|
1474
|
-
lg: "w-6 h-6",
|
|
1475
|
-
xl: "w-8 h-8"
|
|
1476
|
-
};
|
|
1477
|
-
var createIcon = (displayName, path, filled = false) => {
|
|
1478
|
-
const Icon = ({ size = "md", className = "", color = "currentColor" }) => {
|
|
1479
|
-
const sizeClass = sizeClasses5[size];
|
|
1480
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1481
|
-
"svg",
|
|
1482
|
-
{
|
|
1483
|
-
className: `${sizeClass} ${className}`,
|
|
1484
|
-
fill: filled ? color : "none",
|
|
1485
|
-
viewBox: "0 0 24 24",
|
|
1486
|
-
stroke: filled ? "none" : color,
|
|
1487
|
-
"aria-hidden": "true",
|
|
1488
|
-
children: path
|
|
1489
|
-
}
|
|
1490
|
-
);
|
|
1491
|
-
};
|
|
1492
|
-
Icon.displayName = displayName;
|
|
1493
|
-
return Icon;
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
|
-
// src/icons/HomeIcon.tsx
|
|
1497
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1498
|
-
var HomeIcon = createIcon(
|
|
1499
|
-
"HomeIcon",
|
|
1500
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" })
|
|
1501
|
-
);
|
|
1502
|
-
|
|
1503
|
-
// src/icons/UserIcon.tsx
|
|
1504
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1505
|
-
var UserIcon = createIcon(
|
|
1506
|
-
"UserIcon",
|
|
1507
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" })
|
|
1508
|
-
);
|
|
1509
|
-
|
|
1510
|
-
// src/icons/SearchIcon.tsx
|
|
1511
|
-
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1512
|
-
var SearchIcon = createIcon(
|
|
1513
|
-
"SearchIcon",
|
|
1514
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" })
|
|
1515
|
-
);
|
|
1516
|
-
|
|
1517
|
-
// src/icons/BellIcon.tsx
|
|
1518
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1519
|
-
var BellIcon = createIcon(
|
|
1520
|
-
"BellIcon",
|
|
1521
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" })
|
|
1522
|
-
);
|
|
1523
|
-
|
|
1524
|
-
// src/icons/SettingsIcon.tsx
|
|
1525
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1526
|
-
var SettingsIcon = createIcon(
|
|
1527
|
-
"SettingsIcon",
|
|
1528
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
1529
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }),
|
|
1530
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
1531
|
-
] })
|
|
1532
|
-
);
|
|
1533
|
-
|
|
1534
|
-
// src/icons/MenuIcon.tsx
|
|
1535
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1536
|
-
var MenuIcon = createIcon(
|
|
1537
|
-
"MenuIcon",
|
|
1538
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })
|
|
1539
|
-
);
|
|
1540
|
-
|
|
1541
|
-
// src/icons/CloseIcon.tsx
|
|
1542
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1543
|
-
var CloseIcon = createIcon(
|
|
1544
|
-
"CloseIcon",
|
|
1545
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })
|
|
1546
|
-
);
|
|
1547
|
-
|
|
1548
|
-
// src/icons/ChevronDownIcon.tsx
|
|
1549
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1550
|
-
var ChevronDownIcon = createIcon(
|
|
1551
|
-
"ChevronDownIcon",
|
|
1552
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
|
|
1553
|
-
);
|
|
1554
|
-
|
|
1555
|
-
// src/icons/ChevronRightIcon.tsx
|
|
1556
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1557
|
-
var ChevronRightIcon = createIcon(
|
|
1558
|
-
"ChevronRightIcon",
|
|
1559
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" })
|
|
1560
|
-
);
|
|
1561
|
-
|
|
1562
|
-
// src/icons/CheckIcon.tsx
|
|
1563
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1564
|
-
var CheckIcon = createIcon(
|
|
1565
|
-
"CheckIcon",
|
|
1566
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" })
|
|
1567
|
-
);
|
|
1568
|
-
|
|
1569
|
-
// src/icons/PlusIcon.tsx
|
|
1570
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1571
|
-
var PlusIcon = createIcon(
|
|
1572
|
-
"PlusIcon",
|
|
1573
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" })
|
|
1574
|
-
);
|
|
1575
|
-
|
|
1576
|
-
// src/icons/TrashIcon.tsx
|
|
1577
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1578
|
-
var TrashIcon = createIcon(
|
|
1579
|
-
"TrashIcon",
|
|
1580
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" })
|
|
1581
|
-
);
|
|
1582
|
-
|
|
1583
|
-
// src/icons/EditIcon.tsx
|
|
1584
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1585
|
-
var EditIcon = createIcon(
|
|
1586
|
-
"EditIcon",
|
|
1587
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" })
|
|
1588
|
-
);
|
|
1589
|
-
|
|
1590
|
-
// src/icons/MailIcon.tsx
|
|
1591
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1592
|
-
var MailIcon = createIcon(
|
|
1593
|
-
"MailIcon",
|
|
1594
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" })
|
|
1595
|
-
);
|
|
1596
|
-
|
|
1597
|
-
// src/icons/StarIcon.tsx
|
|
1598
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1599
|
-
var StarIcon = createIcon(
|
|
1600
|
-
"StarIcon",
|
|
1601
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" })
|
|
1602
|
-
);
|
|
1603
|
-
|
|
1604
|
-
// src/icons/HeartIcon.tsx
|
|
1605
|
-
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1606
|
-
var HeartIcon = createIcon(
|
|
1607
|
-
"HeartIcon",
|
|
1608
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z" })
|
|
1609
|
-
);
|
|
1610
|
-
|
|
1611
|
-
// src/icons/DownloadIcon.tsx
|
|
1612
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1613
|
-
var DownloadIcon = createIcon(
|
|
1614
|
-
"DownloadIcon",
|
|
1615
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" })
|
|
1616
|
-
);
|
|
1617
|
-
|
|
1618
|
-
// src/icons/UploadIcon.tsx
|
|
1619
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1620
|
-
var UploadIcon = createIcon(
|
|
1621
|
-
"UploadIcon",
|
|
1622
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" })
|
|
1623
|
-
);
|
|
1624
|
-
|
|
1625
|
-
// src/icons/CameraIcon.tsx
|
|
1626
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1627
|
-
var CameraIcon = createIcon(
|
|
1628
|
-
"CameraIcon",
|
|
1629
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
1630
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
|
|
1631
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
1632
|
-
] })
|
|
1633
|
-
);
|
|
1634
|
-
|
|
1635
|
-
// src/icons/LockIcon.tsx
|
|
1636
|
-
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1637
|
-
var LockIcon = createIcon(
|
|
1638
|
-
"LockIcon",
|
|
1639
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" })
|
|
1640
|
-
);
|
|
1641
|
-
|
|
1642
|
-
// src/icons/CalendarIcon.tsx
|
|
1643
|
-
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1644
|
-
var CalendarIcon = createIcon(
|
|
1645
|
-
"CalendarIcon",
|
|
1646
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" })
|
|
1647
|
-
);
|
|
1648
|
-
|
|
1649
|
-
// src/icons/GoogleIcon.tsx
|
|
1650
|
-
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1651
|
-
var GoogleIcon = createIcon(
|
|
1652
|
-
"GoogleIcon",
|
|
1653
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }),
|
|
1654
|
-
true
|
|
1655
|
-
);
|
|
1656
|
-
|
|
1657
|
-
// src/icons/GitHubIcon.tsx
|
|
1658
|
-
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1659
|
-
var GitHubIcon = createIcon(
|
|
1660
|
-
"GitHubIcon",
|
|
1661
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" }),
|
|
1662
|
-
true
|
|
1663
|
-
);
|
|
1664
|
-
|
|
1665
|
-
// src/icons/TwitterIcon.tsx
|
|
1666
|
-
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1667
|
-
var TwitterIcon = createIcon(
|
|
1668
|
-
"TwitterIcon",
|
|
1669
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }),
|
|
1670
|
-
true
|
|
1671
|
-
);
|
|
1672
|
-
|
|
1673
|
-
// src/icons/FacebookIcon.tsx
|
|
1674
|
-
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1675
|
-
var FacebookIcon = createIcon(
|
|
1676
|
-
"FacebookIcon",
|
|
1677
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z" }),
|
|
1678
|
-
true
|
|
1679
|
-
);
|
|
1680
|
-
|
|
1681
|
-
// src/icons/AppleIcon.tsx
|
|
1682
|
-
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1683
|
-
var AppleIcon = createIcon(
|
|
1684
|
-
"AppleIcon",
|
|
1685
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }),
|
|
1686
|
-
true
|
|
1687
|
-
);
|
|
1688
|
-
|
|
1689
|
-
// src/icons/LinkedInIcon.tsx
|
|
1690
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1691
|
-
var LinkedInIcon = createIcon(
|
|
1692
|
-
"LinkedInIcon",
|
|
1693
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }),
|
|
1694
|
-
true
|
|
1695
|
-
);
|
|
1696
|
-
|
|
1697
|
-
// src/icons/YouTubeIcon.tsx
|
|
1698
|
-
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1699
|
-
var YouTubeIcon = createIcon(
|
|
1700
|
-
"YouTubeIcon",
|
|
1701
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" }),
|
|
1702
|
-
true
|
|
1703
|
-
);
|
|
1704
|
-
|
|
1705
|
-
// src/icons/SlackIcon.tsx
|
|
1706
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1707
|
-
var SlackIcon = createIcon(
|
|
1708
|
-
"SlackIcon",
|
|
1709
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" }),
|
|
1710
|
-
true
|
|
1711
|
-
);
|
|
1712
|
-
|
|
1713
|
-
// src/components/Toast.tsx
|
|
1714
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1715
|
-
var ToastContext = (0, import_react17.createContext)(void 0);
|
|
1815
|
+
var import_react18 = require("react");
|
|
1816
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1817
|
+
var ToastContext = (0, import_react18.createContext)(void 0);
|
|
1716
1818
|
var useToast = () => {
|
|
1717
|
-
const context = (0,
|
|
1819
|
+
const context = (0, import_react18.useContext)(ToastContext);
|
|
1718
1820
|
if (!context) {
|
|
1719
1821
|
throw new Error("useToast must be used within a ToastProvider");
|
|
1720
1822
|
}
|
|
1721
1823
|
return context;
|
|
1722
1824
|
};
|
|
1723
1825
|
var ToastProvider = ({ children, position = "top-right" }) => {
|
|
1724
|
-
const [toasts, setToasts] = (0,
|
|
1725
|
-
const addToast = (0,
|
|
1826
|
+
const [toasts, setToasts] = (0, import_react18.useState)([]);
|
|
1827
|
+
const addToast = (0, import_react18.useCallback)((toast2) => {
|
|
1726
1828
|
const id = Math.random().toString(36).substring(7);
|
|
1727
1829
|
const newToast = { ...toast2, id };
|
|
1728
1830
|
setToasts((prev) => [...prev, newToast]);
|
|
@@ -1731,7 +1833,7 @@ var ToastProvider = ({ children, position = "top-right" }) => {
|
|
|
1731
1833
|
removeToast(id);
|
|
1732
1834
|
}, duration);
|
|
1733
1835
|
}, []);
|
|
1734
|
-
const removeToast = (0,
|
|
1836
|
+
const removeToast = (0, import_react18.useCallback)((id) => {
|
|
1735
1837
|
setToasts((prev) => prev.filter((toast2) => toast2.id !== id));
|
|
1736
1838
|
}, []);
|
|
1737
1839
|
const positionClasses2 = {
|
|
@@ -1742,9 +1844,9 @@ var ToastProvider = ({ children, position = "top-right" }) => {
|
|
|
1742
1844
|
"top-center": "top-4 left-1/2 -translate-x-1/2",
|
|
1743
1845
|
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2"
|
|
1744
1846
|
};
|
|
1745
|
-
return /* @__PURE__ */ (0,
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ToastContext.Provider, { value: { toasts, addToast, removeToast }, children: [
|
|
1746
1848
|
children,
|
|
1747
|
-
/* @__PURE__ */ (0,
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: `fixed ${positionClasses2[position]} z-50 flex flex-col gap-2 max-w-md`, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ToastItem, { toast: toast2, onClose: () => removeToast(toast2.id) }, toast2.id)) })
|
|
1748
1850
|
] });
|
|
1749
1851
|
};
|
|
1750
1852
|
var ToastItem = ({ toast: toast2, onClose }) => {
|
|
@@ -1755,27 +1857,27 @@ var ToastItem = ({ toast: toast2, onClose }) => {
|
|
|
1755
1857
|
info: "bg-blue-50 dark:bg-blue-900/30 border-blue-500 text-blue-800 dark:text-blue-200"
|
|
1756
1858
|
};
|
|
1757
1859
|
const typeIcons = {
|
|
1758
|
-
success: /* @__PURE__ */ (0,
|
|
1759
|
-
error: /* @__PURE__ */ (0,
|
|
1760
|
-
warning: /* @__PURE__ */ (0,
|
|
1761
|
-
info: /* @__PURE__ */ (0,
|
|
1860
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CheckIcon, { size: "sm", className: "text-green-600 dark:text-green-400" }),
|
|
1861
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CloseIcon, { size: "sm", className: "text-red-600 dark:text-red-400" }),
|
|
1862
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { className: "w-4 h-4 text-yellow-600 dark:text-yellow-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }),
|
|
1863
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { className: "w-4 h-4 text-blue-600 dark:text-blue-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) })
|
|
1762
1864
|
};
|
|
1763
1865
|
const type = toast2.type || "info";
|
|
1764
|
-
return /* @__PURE__ */ (0,
|
|
1866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
1765
1867
|
"div",
|
|
1766
1868
|
{
|
|
1767
1869
|
className: `flex items-start gap-3 p-4 rounded-lg border-l-4 shadow-lg backdrop-blur-sm ${typeStyles[type]} animate-slide-in`,
|
|
1768
1870
|
role: "alert",
|
|
1769
1871
|
children: [
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1772
|
-
/* @__PURE__ */ (0,
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: typeIcons[type] }),
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "flex-1 text-sm font-medium", children: toast2.message }),
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1773
1875
|
"button",
|
|
1774
1876
|
{
|
|
1775
1877
|
onClick: onClose,
|
|
1776
1878
|
className: "flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors",
|
|
1777
1879
|
"aria-label": "Close",
|
|
1778
|
-
children: /* @__PURE__ */ (0,
|
|
1880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(CloseIcon, { size: "sm" })
|
|
1779
1881
|
}
|
|
1780
1882
|
)
|
|
1781
1883
|
]
|
|
@@ -1806,8 +1908,8 @@ var toast = {
|
|
|
1806
1908
|
};
|
|
1807
1909
|
|
|
1808
1910
|
// src/components/Stepper.tsx
|
|
1809
|
-
var
|
|
1810
|
-
var
|
|
1911
|
+
var import_react19 = __toESM(require("react"));
|
|
1912
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1811
1913
|
var Stepper = ({
|
|
1812
1914
|
steps,
|
|
1813
1915
|
currentStep,
|
|
@@ -1815,18 +1917,18 @@ var Stepper = ({
|
|
|
1815
1917
|
className = ""
|
|
1816
1918
|
}) => {
|
|
1817
1919
|
const isHorizontal = orientation === "horizontal";
|
|
1818
|
-
return /* @__PURE__ */ (0,
|
|
1920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: `${isHorizontal ? "flex items-center" : "flex flex-col"} ${className}`, children: steps.map((step, index) => {
|
|
1819
1921
|
const stepNumber = index + 1;
|
|
1820
1922
|
const isActive = stepNumber === currentStep;
|
|
1821
1923
|
const isCompleted = stepNumber < currentStep;
|
|
1822
1924
|
const isLast = index === steps.length - 1;
|
|
1823
|
-
return /* @__PURE__ */ (0,
|
|
1824
|
-
/* @__PURE__ */ (0,
|
|
1825
|
-
/* @__PURE__ */ (0,
|
|
1925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react19.default.Fragment, { children: [
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: `flex ${isHorizontal ? "flex-col items-center" : "flex-row items-start"} ${isHorizontal ? "" : "flex-1"}`, children: [
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1826
1928
|
"div",
|
|
1827
1929
|
{
|
|
1828
1930
|
className: `flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all ${isCompleted ? "bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500" : isActive ? "border-blue-600 bg-white dark:border-blue-500 dark:bg-gray-800" : "border-gray-300 bg-white dark:border-gray-600 dark:bg-gray-800"}`,
|
|
1829
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
1931
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CheckIcon, { size: "sm", className: "text-white" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1830
1932
|
"span",
|
|
1831
1933
|
{
|
|
1832
1934
|
className: `text-sm font-semibold ${isActive ? "text-blue-600 dark:text-blue-400" : "text-gray-500 dark:text-gray-400"}`,
|
|
@@ -1835,18 +1937,18 @@ var Stepper = ({
|
|
|
1835
1937
|
)
|
|
1836
1938
|
}
|
|
1837
1939
|
) }),
|
|
1838
|
-
/* @__PURE__ */ (0,
|
|
1839
|
-
/* @__PURE__ */ (0,
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: `${isHorizontal ? "mt-2 text-center" : "ml-4 pb-8"} ${isLast && !isHorizontal ? "pb-0" : ""}`, children: [
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1840
1942
|
"p",
|
|
1841
1943
|
{
|
|
1842
1944
|
className: `text-sm font-medium ${isActive || isCompleted ? "text-gray-900 dark:text-gray-100" : "text-gray-500 dark:text-gray-400"}`,
|
|
1843
1945
|
children: step.label
|
|
1844
1946
|
}
|
|
1845
1947
|
),
|
|
1846
|
-
step.description && /* @__PURE__ */ (0,
|
|
1948
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: step.description })
|
|
1847
1949
|
] })
|
|
1848
1950
|
] }),
|
|
1849
|
-
!isLast && /* @__PURE__ */ (0,
|
|
1951
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1850
1952
|
"div",
|
|
1851
1953
|
{
|
|
1852
1954
|
className: `${isHorizontal ? "flex-1 h-0.5 mx-4" : "w-0.5 h-full ml-5 -mt-8"} ${isCompleted || isActive && stepNumber < currentStep ? "bg-blue-600 dark:bg-blue-500" : "bg-gray-300 dark:bg-gray-600"}`
|
|
@@ -1857,7 +1959,7 @@ var Stepper = ({
|
|
|
1857
1959
|
};
|
|
1858
1960
|
|
|
1859
1961
|
// src/components/Divider.tsx
|
|
1860
|
-
var
|
|
1962
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1861
1963
|
var Divider = ({
|
|
1862
1964
|
orientation = "horizontal",
|
|
1863
1965
|
variant = "solid",
|
|
@@ -1876,14 +1978,14 @@ var Divider = ({
|
|
|
1876
1978
|
center: "justify-center",
|
|
1877
1979
|
right: "justify-end"
|
|
1878
1980
|
};
|
|
1879
|
-
return /* @__PURE__ */ (0,
|
|
1880
|
-
labelPosition !== "left" && /* @__PURE__ */ (0,
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
1882
|
-
labelPosition !== "right" && /* @__PURE__ */ (0,
|
|
1981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `flex items-center ${alignmentClasses[labelPosition]} ${className}`, role: "separator", children: [
|
|
1982
|
+
labelPosition !== "left" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `flex-1 border-t ${variantClasses[variant]} border-gray-300 dark:border-gray-600` }),
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "px-4 text-sm text-gray-500 dark:text-gray-400", children: label }),
|
|
1984
|
+
labelPosition !== "right" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: `flex-1 border-t ${variantClasses[variant]} border-gray-300 dark:border-gray-600` })
|
|
1883
1985
|
] });
|
|
1884
1986
|
}
|
|
1885
1987
|
if (orientation === "vertical") {
|
|
1886
|
-
return /* @__PURE__ */ (0,
|
|
1988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
1887
1989
|
"div",
|
|
1888
1990
|
{
|
|
1889
1991
|
className: `inline-block h-full border-l ${variantClasses[variant]} border-gray-300 dark:border-gray-600 ${className}`,
|
|
@@ -1892,7 +1994,7 @@ var Divider = ({
|
|
|
1892
1994
|
}
|
|
1893
1995
|
);
|
|
1894
1996
|
}
|
|
1895
|
-
return /* @__PURE__ */ (0,
|
|
1997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
1896
1998
|
"hr",
|
|
1897
1999
|
{
|
|
1898
2000
|
className: `border-t ${variantClasses[variant]} border-gray-300 dark:border-gray-600 ${className}`,
|
|
@@ -1902,8 +2004,8 @@ var Divider = ({
|
|
|
1902
2004
|
};
|
|
1903
2005
|
|
|
1904
2006
|
// src/components/FileUpload.tsx
|
|
1905
|
-
var
|
|
1906
|
-
var
|
|
2007
|
+
var import_react20 = require("react");
|
|
2008
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1907
2009
|
var FileUpload = ({
|
|
1908
2010
|
accept,
|
|
1909
2011
|
multiple = false,
|
|
@@ -1916,9 +2018,9 @@ var FileUpload = ({
|
|
|
1916
2018
|
label,
|
|
1917
2019
|
helperText
|
|
1918
2020
|
}) => {
|
|
1919
|
-
const [files, setFiles] = (0,
|
|
1920
|
-
const [isDragging, setIsDragging] = (0,
|
|
1921
|
-
const fileInputRef = (0,
|
|
2021
|
+
const [files, setFiles] = (0, import_react20.useState)([]);
|
|
2022
|
+
const [isDragging, setIsDragging] = (0, import_react20.useState)(false);
|
|
2023
|
+
const fileInputRef = (0, import_react20.useRef)(null);
|
|
1922
2024
|
const formatFileSize = (bytes) => {
|
|
1923
2025
|
if (bytes === 0) return "0 Bytes";
|
|
1924
2026
|
const k = 1024;
|
|
@@ -1976,9 +2078,9 @@ var FileUpload = ({
|
|
|
1976
2078
|
setFiles(newFiles);
|
|
1977
2079
|
onChange?.(newFiles);
|
|
1978
2080
|
};
|
|
1979
|
-
return /* @__PURE__ */ (0,
|
|
1980
|
-
label && /* @__PURE__ */ (0,
|
|
1981
|
-
/* @__PURE__ */ (0,
|
|
2081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: `w-full ${className}`, children: [
|
|
2082
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: label }),
|
|
2083
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
1982
2084
|
"div",
|
|
1983
2085
|
{
|
|
1984
2086
|
onDrop: handleDrop,
|
|
@@ -1987,7 +2089,7 @@ var FileUpload = ({
|
|
|
1987
2089
|
onClick: handleClick,
|
|
1988
2090
|
className: `relative border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-all ${isDragging ? "border-blue-500 bg-blue-50 dark:bg-blue-900/20" : "border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"} ${disabled ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1989
2091
|
children: [
|
|
1990
|
-
/* @__PURE__ */ (0,
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
1991
2093
|
"input",
|
|
1992
2094
|
{
|
|
1993
2095
|
ref: fileInputRef,
|
|
@@ -1999,14 +2101,14 @@ var FileUpload = ({
|
|
|
1999
2101
|
className: "hidden"
|
|
2000
2102
|
}
|
|
2001
2103
|
),
|
|
2002
|
-
/* @__PURE__ */ (0,
|
|
2003
|
-
/* @__PURE__ */ (0,
|
|
2004
|
-
/* @__PURE__ */ (0,
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2104
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "w-12 h-12 rounded-full bg-gray-100 dark:bg-gray-800 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(UploadIcon, { size: "lg", className: "text-gray-400 dark:text-gray-500" }) }),
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { children: [
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("p", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: [
|
|
2108
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-blue-600 dark:text-blue-400", children: "Click to upload" }),
|
|
2007
2109
|
" or drag and drop"
|
|
2008
2110
|
] }),
|
|
2009
|
-
/* @__PURE__ */ (0,
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: [
|
|
2010
2112
|
accept ? `Accepted: ${accept}` : "Any file type",
|
|
2011
2113
|
maxSize && ` \u2022 Max size: ${formatFileSize(maxSize)}`
|
|
2012
2114
|
] })
|
|
@@ -2015,17 +2117,17 @@ var FileUpload = ({
|
|
|
2015
2117
|
]
|
|
2016
2118
|
}
|
|
2017
2119
|
),
|
|
2018
|
-
helperText && /* @__PURE__ */ (0,
|
|
2019
|
-
files.length > 0 && /* @__PURE__ */ (0,
|
|
2120
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: helperText }),
|
|
2121
|
+
files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
2020
2122
|
"div",
|
|
2021
2123
|
{
|
|
2022
2124
|
className: "flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",
|
|
2023
2125
|
children: [
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
2127
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-sm font-medium text-gray-900 dark:text-gray-100 truncate", children: file.name }),
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: formatFileSize(file.size) })
|
|
2027
2129
|
] }),
|
|
2028
|
-
/* @__PURE__ */ (0,
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
2029
2131
|
"button",
|
|
2030
2132
|
{
|
|
2031
2133
|
onClick: (e) => {
|
|
@@ -2034,7 +2136,7 @@ var FileUpload = ({
|
|
|
2034
2136
|
},
|
|
2035
2137
|
className: "ml-4 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",
|
|
2036
2138
|
"aria-label": "Remove file",
|
|
2037
|
-
children: /* @__PURE__ */ (0,
|
|
2139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(CloseIcon, { size: "sm" })
|
|
2038
2140
|
}
|
|
2039
2141
|
)
|
|
2040
2142
|
]
|
|
@@ -2080,6 +2182,7 @@ function getThemeScript() {
|
|
|
2080
2182
|
0 && (module.exports = {
|
|
2081
2183
|
ActionMenu,
|
|
2082
2184
|
Alert,
|
|
2185
|
+
AppShell,
|
|
2083
2186
|
AppleIcon,
|
|
2084
2187
|
Avatar,
|
|
2085
2188
|
Badge,
|