baaz-custom-components 3.1.3 → 3.1.4
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.css +11 -0
- package/dist/index.js +212 -97
- package/dist/index.mjs +210 -95
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -477,31 +477,146 @@ function MenuList({
|
|
|
477
477
|
] }) });
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
-
// src/components/custom/
|
|
480
|
+
// src/components/custom/breadcrumb/index.tsx
|
|
481
|
+
import { Slash } from "lucide-react";
|
|
482
|
+
import { usePathname as usePathname2 } from "next/navigation";
|
|
483
|
+
|
|
484
|
+
// src/components/ui/breadcrumb.tsx
|
|
485
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
486
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
481
487
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
488
|
+
function Breadcrumb(_a) {
|
|
489
|
+
var props = __objRest(_a, []);
|
|
490
|
+
return /* @__PURE__ */ jsx7("nav", __spreadValues({ "aria-label": "breadcrumb", "data-slot": "breadcrumb" }, props));
|
|
491
|
+
}
|
|
492
|
+
function BreadcrumbList(_a) {
|
|
493
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
494
|
+
return /* @__PURE__ */ jsx7(
|
|
495
|
+
"ol",
|
|
496
|
+
__spreadValues({
|
|
497
|
+
"data-slot": "breadcrumb-list",
|
|
498
|
+
className: cn(
|
|
499
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
500
|
+
className
|
|
501
|
+
)
|
|
502
|
+
}, props)
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
function BreadcrumbItem(_a) {
|
|
506
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
507
|
+
return /* @__PURE__ */ jsx7(
|
|
508
|
+
"li",
|
|
509
|
+
__spreadValues({
|
|
510
|
+
"data-slot": "breadcrumb-item",
|
|
511
|
+
className: cn("inline-flex items-center gap-1.5", className)
|
|
512
|
+
}, props)
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
function BreadcrumbLink(_a) {
|
|
516
|
+
var _b = _a, {
|
|
517
|
+
asChild,
|
|
518
|
+
className
|
|
519
|
+
} = _b, props = __objRest(_b, [
|
|
520
|
+
"asChild",
|
|
521
|
+
"className"
|
|
522
|
+
]);
|
|
523
|
+
const Comp = asChild ? Slot2 : "a";
|
|
524
|
+
return /* @__PURE__ */ jsx7(
|
|
525
|
+
Comp,
|
|
526
|
+
__spreadValues({
|
|
527
|
+
"data-slot": "breadcrumb-link",
|
|
528
|
+
className: cn("hover:text-foreground transition-colors", className)
|
|
529
|
+
}, props)
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
function BreadcrumbSeparator(_a) {
|
|
533
|
+
var _b = _a, {
|
|
534
|
+
children,
|
|
535
|
+
className
|
|
536
|
+
} = _b, props = __objRest(_b, [
|
|
537
|
+
"children",
|
|
538
|
+
"className"
|
|
539
|
+
]);
|
|
540
|
+
return /* @__PURE__ */ jsx7(
|
|
541
|
+
"li",
|
|
542
|
+
__spreadProps(__spreadValues({
|
|
543
|
+
"data-slot": "breadcrumb-separator",
|
|
544
|
+
role: "presentation",
|
|
545
|
+
"aria-hidden": "true",
|
|
546
|
+
className: cn("[&>svg]:size-3.5", className)
|
|
547
|
+
}, props), {
|
|
548
|
+
children: children != null ? children : /* @__PURE__ */ jsx7(ChevronRight, {})
|
|
549
|
+
})
|
|
550
|
+
);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// src/utils/helper.ts
|
|
554
|
+
var buildUrl = (urls, index) => {
|
|
555
|
+
return `/${urls.slice(0, index + 1).join("/")}`;
|
|
556
|
+
};
|
|
557
|
+
var capitalizeFirstLetter = (text, splitter = "-") => {
|
|
558
|
+
return text.split(splitter).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
// src/components/custom/breadcrumb/index.tsx
|
|
562
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
563
|
+
var CustomBreadcrumb = ({ layoutName, includeFrom = 0 }) => {
|
|
564
|
+
const pathname = usePathname2();
|
|
565
|
+
const completeUrl = pathname.split("/").filter(Boolean);
|
|
566
|
+
const urls = pathname.split("/").filter(Boolean).slice(includeFrom);
|
|
567
|
+
const activeClassName = "!text-primary";
|
|
568
|
+
return /* @__PURE__ */ jsx8(Breadcrumb, { children: /* @__PURE__ */ jsxs6(BreadcrumbList, { children: [
|
|
569
|
+
/* @__PURE__ */ jsx8(BreadcrumbItem, { children: /* @__PURE__ */ jsx8("h2", { className: "text-text !text-xxl font-semibold", children: layoutName }) }),
|
|
570
|
+
urls.length > 0 && /* @__PURE__ */ jsx8(BreadcrumbSeparator, { children: /* @__PURE__ */ jsx8(Slash, { className: "!h-md !w-md" }) }),
|
|
571
|
+
urls.map((url, index) => {
|
|
572
|
+
const href = buildUrl(
|
|
573
|
+
completeUrl,
|
|
574
|
+
index + includeFrom
|
|
575
|
+
);
|
|
576
|
+
return /* @__PURE__ */ jsxs6(BreadcrumbItem, { children: [
|
|
577
|
+
/* @__PURE__ */ jsx8(
|
|
578
|
+
BreadcrumbLink,
|
|
579
|
+
{
|
|
580
|
+
href,
|
|
581
|
+
className: `!font-light !text-md !text-off-white ${index >= urls.length - 1 && activeClassName}`,
|
|
582
|
+
children: capitalizeFirstLetter(url)
|
|
583
|
+
}
|
|
584
|
+
),
|
|
585
|
+
index < urls.length - 1 && /* @__PURE__ */ jsx8(BreadcrumbSeparator, { children: /* @__PURE__ */ jsx8(Slash, { className: "!h-md !w-md" }) })
|
|
586
|
+
] }, index);
|
|
587
|
+
})
|
|
588
|
+
] }) });
|
|
589
|
+
};
|
|
590
|
+
var breadcrumb_default = CustomBreadcrumb;
|
|
591
|
+
|
|
592
|
+
// src/components/custom/navbar/menuList.tsx
|
|
593
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
482
594
|
function DesktopNavbar({
|
|
483
595
|
navbarData,
|
|
484
596
|
userData,
|
|
485
597
|
onLogout
|
|
486
598
|
}) {
|
|
487
|
-
return /* @__PURE__ */
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
599
|
+
return /* @__PURE__ */ jsxs7("nav", { className: "", children: [
|
|
600
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between px-10 py-2 bg-card items-center border-b-1", children: [
|
|
601
|
+
/* @__PURE__ */ jsxs7("div", { className: "left flex gap-4 items-center", children: [
|
|
602
|
+
/* @__PURE__ */ jsx9(Image2, { src: sidebarIcon_default, alt: "Logo", width: 72, height: 18 }),
|
|
603
|
+
Object.keys(navbarData).map((menuKey) => {
|
|
604
|
+
const value = navbarData[menuKey];
|
|
605
|
+
if (typeof value === "string") return null;
|
|
606
|
+
return /* @__PURE__ */ jsx9(
|
|
607
|
+
MenuList,
|
|
608
|
+
{
|
|
609
|
+
menuKey,
|
|
610
|
+
menuData: value
|
|
611
|
+
},
|
|
612
|
+
menuKey
|
|
613
|
+
);
|
|
614
|
+
})
|
|
615
|
+
] }),
|
|
616
|
+
/* @__PURE__ */ jsx9(user_default2, { userData, onLogout })
|
|
502
617
|
] }),
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
] })
|
|
618
|
+
/* @__PURE__ */ jsx9("div", { className: "px-10 py-2", children: /* @__PURE__ */ jsx9(breadcrumb_default, { layoutName: "Navbar Links", includeFrom: 1 }) })
|
|
619
|
+
] });
|
|
505
620
|
}
|
|
506
621
|
|
|
507
622
|
// src/components/custom/navbar/mobileNavbar.tsx
|
|
@@ -510,21 +625,21 @@ import Image3 from "next/image";
|
|
|
510
625
|
|
|
511
626
|
// src/components/ui/sidebar.tsx
|
|
512
627
|
import * as React2 from "react";
|
|
513
|
-
import { Slot as
|
|
628
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
514
629
|
import { cva as cva2 } from "class-variance-authority";
|
|
515
630
|
import { Menu as Menu2, X } from "lucide-react";
|
|
516
631
|
|
|
517
632
|
// src/components/ui/sheet.tsx
|
|
518
633
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
519
634
|
import { XIcon } from "lucide-react";
|
|
520
|
-
import { jsx as
|
|
635
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
521
636
|
function Sheet(_a) {
|
|
522
637
|
var props = __objRest(_a, []);
|
|
523
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
524
639
|
}
|
|
525
640
|
function SheetPortal(_a) {
|
|
526
641
|
var props = __objRest(_a, []);
|
|
527
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
528
643
|
}
|
|
529
644
|
function SheetOverlay(_a) {
|
|
530
645
|
var _b = _a, {
|
|
@@ -532,7 +647,7 @@ function SheetOverlay(_a) {
|
|
|
532
647
|
} = _b, props = __objRest(_b, [
|
|
533
648
|
"className"
|
|
534
649
|
]);
|
|
535
|
-
return /* @__PURE__ */
|
|
650
|
+
return /* @__PURE__ */ jsx10(
|
|
536
651
|
SheetPrimitive.Overlay,
|
|
537
652
|
__spreadValues({
|
|
538
653
|
"data-slot": "sheet-overlay",
|
|
@@ -553,9 +668,9 @@ function SheetContent(_a) {
|
|
|
553
668
|
"children",
|
|
554
669
|
"side"
|
|
555
670
|
]);
|
|
556
|
-
return /* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
/* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ jsxs8(SheetPortal, { children: [
|
|
672
|
+
/* @__PURE__ */ jsx10(SheetOverlay, {}),
|
|
673
|
+
/* @__PURE__ */ jsxs8(
|
|
559
674
|
SheetPrimitive.Content,
|
|
560
675
|
__spreadProps(__spreadValues({
|
|
561
676
|
"data-slot": "sheet-content",
|
|
@@ -570,9 +685,9 @@ function SheetContent(_a) {
|
|
|
570
685
|
}, props), {
|
|
571
686
|
children: [
|
|
572
687
|
children,
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ jsxs8(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
689
|
+
/* @__PURE__ */ jsx10(XIcon, { className: "size-4" }),
|
|
690
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Close" })
|
|
576
691
|
] })
|
|
577
692
|
]
|
|
578
693
|
})
|
|
@@ -581,7 +696,7 @@ function SheetContent(_a) {
|
|
|
581
696
|
}
|
|
582
697
|
function SheetHeader(_a) {
|
|
583
698
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
584
|
-
return /* @__PURE__ */
|
|
699
|
+
return /* @__PURE__ */ jsx10(
|
|
585
700
|
"div",
|
|
586
701
|
__spreadValues({
|
|
587
702
|
"data-slot": "sheet-header",
|
|
@@ -595,7 +710,7 @@ function SheetTitle(_a) {
|
|
|
595
710
|
} = _b, props = __objRest(_b, [
|
|
596
711
|
"className"
|
|
597
712
|
]);
|
|
598
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ jsx10(
|
|
599
714
|
SheetPrimitive.Title,
|
|
600
715
|
__spreadValues({
|
|
601
716
|
"data-slot": "sheet-title",
|
|
@@ -609,7 +724,7 @@ function SheetDescription(_a) {
|
|
|
609
724
|
} = _b, props = __objRest(_b, [
|
|
610
725
|
"className"
|
|
611
726
|
]);
|
|
612
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsx10(
|
|
613
728
|
SheetPrimitive.Description,
|
|
614
729
|
__spreadValues({
|
|
615
730
|
"data-slot": "sheet-description",
|
|
@@ -620,14 +735,14 @@ function SheetDescription(_a) {
|
|
|
620
735
|
|
|
621
736
|
// src/components/ui/tooltip.tsx
|
|
622
737
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
623
|
-
import { jsx as
|
|
738
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
624
739
|
function TooltipProvider(_a) {
|
|
625
740
|
var _b = _a, {
|
|
626
741
|
delayDuration = 0
|
|
627
742
|
} = _b, props = __objRest(_b, [
|
|
628
743
|
"delayDuration"
|
|
629
744
|
]);
|
|
630
|
-
return /* @__PURE__ */
|
|
745
|
+
return /* @__PURE__ */ jsx11(
|
|
631
746
|
TooltipPrimitive.Provider,
|
|
632
747
|
__spreadValues({
|
|
633
748
|
"data-slot": "tooltip-provider",
|
|
@@ -637,11 +752,11 @@ function TooltipProvider(_a) {
|
|
|
637
752
|
}
|
|
638
753
|
function Tooltip(_a) {
|
|
639
754
|
var props = __objRest(_a, []);
|
|
640
|
-
return /* @__PURE__ */
|
|
755
|
+
return /* @__PURE__ */ jsx11(TooltipProvider, { children: /* @__PURE__ */ jsx11(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
641
756
|
}
|
|
642
757
|
function TooltipTrigger(_a) {
|
|
643
758
|
var props = __objRest(_a, []);
|
|
644
|
-
return /* @__PURE__ */
|
|
759
|
+
return /* @__PURE__ */ jsx11(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
645
760
|
}
|
|
646
761
|
function TooltipContent(_a) {
|
|
647
762
|
var _b = _a, {
|
|
@@ -653,7 +768,7 @@ function TooltipContent(_a) {
|
|
|
653
768
|
"sideOffset",
|
|
654
769
|
"children"
|
|
655
770
|
]);
|
|
656
|
-
return /* @__PURE__ */
|
|
771
|
+
return /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs9(
|
|
657
772
|
TooltipPrimitive.Content,
|
|
658
773
|
__spreadProps(__spreadValues({
|
|
659
774
|
"data-slot": "tooltip-content",
|
|
@@ -665,14 +780,14 @@ function TooltipContent(_a) {
|
|
|
665
780
|
}, props), {
|
|
666
781
|
children: [
|
|
667
782
|
children,
|
|
668
|
-
/* @__PURE__ */
|
|
783
|
+
/* @__PURE__ */ jsx11(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
669
784
|
]
|
|
670
785
|
})
|
|
671
786
|
) });
|
|
672
787
|
}
|
|
673
788
|
|
|
674
789
|
// src/components/ui/sidebar.tsx
|
|
675
|
-
import { jsx as
|
|
790
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
676
791
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
677
792
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
678
793
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -753,7 +868,7 @@ function SidebarProvider(_a) {
|
|
|
753
868
|
toggleSidebar
|
|
754
869
|
]
|
|
755
870
|
);
|
|
756
|
-
return /* @__PURE__ */
|
|
871
|
+
return /* @__PURE__ */ jsx12(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx12(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx12(
|
|
757
872
|
"div",
|
|
758
873
|
__spreadProps(__spreadValues({
|
|
759
874
|
"data-slot": "sidebar-wrapper",
|
|
@@ -786,7 +901,7 @@ function Sidebar(_a) {
|
|
|
786
901
|
]);
|
|
787
902
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
788
903
|
if (collapsible === "none") {
|
|
789
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsx12(
|
|
790
905
|
"div",
|
|
791
906
|
__spreadProps(__spreadValues({
|
|
792
907
|
"data-slot": "sidebar",
|
|
@@ -800,7 +915,7 @@ function Sidebar(_a) {
|
|
|
800
915
|
);
|
|
801
916
|
}
|
|
802
917
|
if (isMobile) {
|
|
803
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ jsx12(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ jsxs10(
|
|
804
919
|
SheetContent,
|
|
805
920
|
{
|
|
806
921
|
"data-sidebar": "sidebar",
|
|
@@ -812,16 +927,16 @@ function Sidebar(_a) {
|
|
|
812
927
|
},
|
|
813
928
|
side,
|
|
814
929
|
children: [
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ jsxs10(SheetHeader, { className: "sr-only", children: [
|
|
931
|
+
/* @__PURE__ */ jsx12(SheetTitle, { children: "Sidebar" }),
|
|
932
|
+
/* @__PURE__ */ jsx12(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
818
933
|
] }),
|
|
819
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ jsx12("div", { className: "flex h-full w-full flex-col", children })
|
|
820
935
|
]
|
|
821
936
|
}
|
|
822
937
|
) }));
|
|
823
938
|
}
|
|
824
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ jsxs10(
|
|
825
940
|
"div",
|
|
826
941
|
{
|
|
827
942
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -831,7 +946,7 @@ function Sidebar(_a) {
|
|
|
831
946
|
"data-side": side,
|
|
832
947
|
"data-slot": "sidebar",
|
|
833
948
|
children: [
|
|
834
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ jsx12(
|
|
835
950
|
"div",
|
|
836
951
|
{
|
|
837
952
|
"data-slot": "sidebar-gap",
|
|
@@ -843,7 +958,7 @@ function Sidebar(_a) {
|
|
|
843
958
|
)
|
|
844
959
|
}
|
|
845
960
|
),
|
|
846
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ jsx12(
|
|
847
962
|
"div",
|
|
848
963
|
__spreadProps(__spreadValues({
|
|
849
964
|
"data-slot": "sidebar-container",
|
|
@@ -855,7 +970,7 @@ function Sidebar(_a) {
|
|
|
855
970
|
className
|
|
856
971
|
)
|
|
857
972
|
}, props), {
|
|
858
|
-
children: /* @__PURE__ */
|
|
973
|
+
children: /* @__PURE__ */ jsx12(
|
|
859
974
|
"div",
|
|
860
975
|
{
|
|
861
976
|
"data-sidebar": "sidebar",
|
|
@@ -879,7 +994,7 @@ function SidebarTrigger(_a) {
|
|
|
879
994
|
"onClick"
|
|
880
995
|
]);
|
|
881
996
|
const { toggleSidebar, openMobile } = useSidebar();
|
|
882
|
-
return /* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsxs10(
|
|
883
998
|
"button",
|
|
884
999
|
__spreadProps(__spreadValues({
|
|
885
1000
|
"data-sidebar": "trigger",
|
|
@@ -894,15 +1009,15 @@ function SidebarTrigger(_a) {
|
|
|
894
1009
|
}
|
|
895
1010
|
}, props), {
|
|
896
1011
|
children: [
|
|
897
|
-
openMobile ? /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
1012
|
+
openMobile ? /* @__PURE__ */ jsx12(X, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }) : /* @__PURE__ */ jsx12(Menu2, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }),
|
|
1013
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
899
1014
|
]
|
|
900
1015
|
})
|
|
901
1016
|
);
|
|
902
1017
|
}
|
|
903
1018
|
function SidebarInset(_a) {
|
|
904
1019
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
905
|
-
return /* @__PURE__ */
|
|
1020
|
+
return /* @__PURE__ */ jsx12(
|
|
906
1021
|
"main",
|
|
907
1022
|
__spreadValues({
|
|
908
1023
|
"data-slot": "sidebar-inset",
|
|
@@ -916,7 +1031,7 @@ function SidebarInset(_a) {
|
|
|
916
1031
|
}
|
|
917
1032
|
function SidebarContent(_a) {
|
|
918
1033
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
919
|
-
return /* @__PURE__ */
|
|
1034
|
+
return /* @__PURE__ */ jsx12(
|
|
920
1035
|
"div",
|
|
921
1036
|
__spreadValues({
|
|
922
1037
|
"data-slot": "sidebar-content",
|
|
@@ -930,7 +1045,7 @@ function SidebarContent(_a) {
|
|
|
930
1045
|
}
|
|
931
1046
|
function SidebarGroup(_a) {
|
|
932
1047
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
933
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ jsx12(
|
|
934
1049
|
"div",
|
|
935
1050
|
__spreadValues({
|
|
936
1051
|
"data-slot": "sidebar-group",
|
|
@@ -944,7 +1059,7 @@ function SidebarGroup(_a) {
|
|
|
944
1059
|
}
|
|
945
1060
|
function SidebarMenu(_a) {
|
|
946
1061
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
947
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsx12(
|
|
948
1063
|
"ul",
|
|
949
1064
|
__spreadValues({
|
|
950
1065
|
"data-slot": "sidebar-menu",
|
|
@@ -955,7 +1070,7 @@ function SidebarMenu(_a) {
|
|
|
955
1070
|
}
|
|
956
1071
|
function SidebarMenuItem(_a) {
|
|
957
1072
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
958
|
-
return /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ jsx12(
|
|
959
1074
|
"li",
|
|
960
1075
|
__spreadValues({
|
|
961
1076
|
"data-slot": "sidebar-menu-item",
|
|
@@ -1000,9 +1115,9 @@ function SidebarMenuButton(_a) {
|
|
|
1000
1115
|
"tooltip",
|
|
1001
1116
|
"className"
|
|
1002
1117
|
]);
|
|
1003
|
-
const Comp = asChild ?
|
|
1118
|
+
const Comp = asChild ? Slot3 : "button";
|
|
1004
1119
|
const { isMobile, state } = useSidebar();
|
|
1005
|
-
const button = /* @__PURE__ */
|
|
1120
|
+
const button = /* @__PURE__ */ jsx12(
|
|
1006
1121
|
Comp,
|
|
1007
1122
|
__spreadValues({
|
|
1008
1123
|
"data-slot": "sidebar-menu-button",
|
|
@@ -1023,9 +1138,9 @@ function SidebarMenuButton(_a) {
|
|
|
1023
1138
|
children: tooltip
|
|
1024
1139
|
};
|
|
1025
1140
|
}
|
|
1026
|
-
return /* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
/* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ jsxs10(Tooltip, { children: [
|
|
1142
|
+
/* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: button }),
|
|
1143
|
+
/* @__PURE__ */ jsx12(
|
|
1029
1144
|
TooltipContent,
|
|
1030
1145
|
__spreadValues({
|
|
1031
1146
|
side: "right",
|
|
@@ -1037,7 +1152,7 @@ function SidebarMenuButton(_a) {
|
|
|
1037
1152
|
}
|
|
1038
1153
|
function SidebarMenuSub(_a) {
|
|
1039
1154
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1040
|
-
return /* @__PURE__ */
|
|
1155
|
+
return /* @__PURE__ */ jsx12(
|
|
1041
1156
|
"ul",
|
|
1042
1157
|
__spreadValues({
|
|
1043
1158
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -1056,7 +1171,7 @@ function SidebarMenuSubItem(_a) {
|
|
|
1056
1171
|
} = _b, props = __objRest(_b, [
|
|
1057
1172
|
"className"
|
|
1058
1173
|
]);
|
|
1059
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ jsx12(
|
|
1060
1175
|
"li",
|
|
1061
1176
|
__spreadValues({
|
|
1062
1177
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -1077,8 +1192,8 @@ function SidebarMenuSubButton(_a) {
|
|
|
1077
1192
|
"isActive",
|
|
1078
1193
|
"className"
|
|
1079
1194
|
]);
|
|
1080
|
-
const Comp = asChild ?
|
|
1081
|
-
return /* @__PURE__ */
|
|
1195
|
+
const Comp = asChild ? Slot3 : "a";
|
|
1196
|
+
return /* @__PURE__ */ jsx12(
|
|
1082
1197
|
Comp,
|
|
1083
1198
|
__spreadValues({
|
|
1084
1199
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -1098,18 +1213,18 @@ function SidebarMenuSubButton(_a) {
|
|
|
1098
1213
|
}
|
|
1099
1214
|
|
|
1100
1215
|
// src/components/custom/navbar/nav-main.tsx
|
|
1101
|
-
import { ChevronRight, CornerDownRight } from "lucide-react";
|
|
1216
|
+
import { ChevronRight as ChevronRight2, CornerDownRight } from "lucide-react";
|
|
1102
1217
|
|
|
1103
1218
|
// src/components/ui/collapsible.tsx
|
|
1104
1219
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1105
|
-
import { jsx as
|
|
1220
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1106
1221
|
function Collapsible(_a) {
|
|
1107
1222
|
var props = __objRest(_a, []);
|
|
1108
|
-
return /* @__PURE__ */
|
|
1223
|
+
return /* @__PURE__ */ jsx13(CollapsiblePrimitive.Root, __spreadValues({ "data-slot": "collapsible" }, props));
|
|
1109
1224
|
}
|
|
1110
1225
|
function CollapsibleTrigger2(_a) {
|
|
1111
1226
|
var props = __objRest(_a, []);
|
|
1112
|
-
return /* @__PURE__ */
|
|
1227
|
+
return /* @__PURE__ */ jsx13(
|
|
1113
1228
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
1114
1229
|
__spreadValues({
|
|
1115
1230
|
"data-slot": "collapsible-trigger"
|
|
@@ -1118,7 +1233,7 @@ function CollapsibleTrigger2(_a) {
|
|
|
1118
1233
|
}
|
|
1119
1234
|
function CollapsibleContent2(_a) {
|
|
1120
1235
|
var props = __objRest(_a, []);
|
|
1121
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ jsx13(
|
|
1122
1237
|
CollapsiblePrimitive.CollapsibleContent,
|
|
1123
1238
|
__spreadValues({
|
|
1124
1239
|
"data-slot": "collapsible-content"
|
|
@@ -1127,30 +1242,30 @@ function CollapsibleContent2(_a) {
|
|
|
1127
1242
|
}
|
|
1128
1243
|
|
|
1129
1244
|
// src/components/custom/navbar/nav-main.tsx
|
|
1130
|
-
import { jsx as
|
|
1245
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1131
1246
|
function NavMain({ items }) {
|
|
1132
|
-
return /* @__PURE__ */
|
|
1247
|
+
return /* @__PURE__ */ jsx14(SidebarGroup, { children: /* @__PURE__ */ jsx14(SidebarMenu, { children: renderMenu(items) }) });
|
|
1133
1248
|
}
|
|
1134
1249
|
function renderMenu(data) {
|
|
1135
1250
|
return Object.entries(data).map(([title, value]) => {
|
|
1136
1251
|
if (typeof value === "string") {
|
|
1137
|
-
return /* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1252
|
+
return /* @__PURE__ */ jsx14(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx14(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxs11("a", { href: `/${value}`, children: [
|
|
1253
|
+
/* @__PURE__ */ jsx14(CornerDownRight, {}),
|
|
1254
|
+
/* @__PURE__ */ jsx14("span", { className: "font-light text-sm", children: title })
|
|
1140
1255
|
] }) }) }, title);
|
|
1141
1256
|
}
|
|
1142
|
-
return /* @__PURE__ */
|
|
1257
|
+
return /* @__PURE__ */ jsx14(
|
|
1143
1258
|
Collapsible,
|
|
1144
1259
|
{
|
|
1145
1260
|
asChild: true,
|
|
1146
1261
|
defaultOpen: false,
|
|
1147
1262
|
className: "group/collapsible group-data-[state=open]:bg-sidebar-accent group-data-[state=open]:text-sidebar-accent-foreground",
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1263
|
+
children: /* @__PURE__ */ jsxs11(SidebarMenuItem, { children: [
|
|
1264
|
+
/* @__PURE__ */ jsx14(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs11(SidebarMenuButton, { tooltip: title, children: [
|
|
1265
|
+
/* @__PURE__ */ jsx14("span", { className: "font-medium text-lg", children: title }),
|
|
1266
|
+
/* @__PURE__ */ jsx14(ChevronRight2, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
1152
1267
|
] }) }),
|
|
1153
|
-
/* @__PURE__ */
|
|
1268
|
+
/* @__PURE__ */ jsx14(CollapsibleContent2, { children: /* @__PURE__ */ jsx14(SidebarMenuSub, { children: renderMenu(value) }) })
|
|
1154
1269
|
] })
|
|
1155
1270
|
},
|
|
1156
1271
|
title
|
|
@@ -1159,32 +1274,32 @@ function renderMenu(data) {
|
|
|
1159
1274
|
}
|
|
1160
1275
|
|
|
1161
1276
|
// src/components/custom/navbar/app-sidebar.tsx
|
|
1162
|
-
import { jsx as
|
|
1277
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1163
1278
|
function AppSidebar(_a) {
|
|
1164
1279
|
var _b = _a, { data } = _b, props = __objRest(_b, ["data"]);
|
|
1165
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ jsx15(Sidebar, __spreadProps(__spreadValues({ collapsible: "icon" }, props), { children: /* @__PURE__ */ jsx15(SidebarContent, { children: /* @__PURE__ */ jsx15(NavMain, { items: data }) }) }));
|
|
1166
1281
|
}
|
|
1167
1282
|
|
|
1168
1283
|
// src/components/custom/navbar/mobileNavbar.tsx
|
|
1169
|
-
import { jsx as
|
|
1284
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1170
1285
|
function MobileNavbar({
|
|
1171
1286
|
navbarData,
|
|
1172
1287
|
userData,
|
|
1173
1288
|
onLogout
|
|
1174
1289
|
}) {
|
|
1175
1290
|
const safeData = navbarData || {};
|
|
1176
|
-
return /* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
/* @__PURE__ */
|
|
1180
|
-
/* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ jsxs12(SidebarProvider, { className: "relative w-full", children: [
|
|
1292
|
+
/* @__PURE__ */ jsxs12("header", { className: "fixed top-0 left-0 right-0 z-50 flex bg-card h-12 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 justify-between px-4 w-full border-b-1", children: [
|
|
1293
|
+
/* @__PURE__ */ jsx16(SidebarTrigger, {}),
|
|
1294
|
+
/* @__PURE__ */ jsx16(Link, { href: "/", children: /* @__PURE__ */ jsx16(Image3, { src: sidebarIcon_default, alt: "Logo", width: 72, height: 18 }) }),
|
|
1295
|
+
/* @__PURE__ */ jsx16(user_default2, { userData, onLogout })
|
|
1181
1296
|
] }),
|
|
1182
|
-
/* @__PURE__ */
|
|
1297
|
+
/* @__PURE__ */ jsx16(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ jsx16(AppSidebar, { data: safeData }) })
|
|
1183
1298
|
] });
|
|
1184
1299
|
}
|
|
1185
1300
|
|
|
1186
1301
|
// src/components/custom/navbar/navbar.tsx
|
|
1187
|
-
import { Fragment as Fragment2, jsx as
|
|
1302
|
+
import { Fragment as Fragment2, jsx as jsx17 } from "react/jsx-runtime";
|
|
1188
1303
|
function Navbar({
|
|
1189
1304
|
navbarData,
|
|
1190
1305
|
userData,
|
|
@@ -1196,14 +1311,14 @@ function Navbar({
|
|
|
1196
1311
|
setMounted(true);
|
|
1197
1312
|
}, []);
|
|
1198
1313
|
if (!mounted) return null;
|
|
1199
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ jsx17(Fragment2, { children: isMobile ? /* @__PURE__ */ jsx17(
|
|
1200
1315
|
MobileNavbar,
|
|
1201
1316
|
{
|
|
1202
1317
|
navbarData,
|
|
1203
1318
|
userData,
|
|
1204
1319
|
onLogout
|
|
1205
1320
|
}
|
|
1206
|
-
) : /* @__PURE__ */
|
|
1321
|
+
) : /* @__PURE__ */ jsx17(
|
|
1207
1322
|
DesktopNavbar,
|
|
1208
1323
|
{
|
|
1209
1324
|
navbarData,
|