baaz-custom-components 3.2.10 → 3.2.12
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 +7 -0
- package/dist/index.js +207 -140
- package/dist/index.mjs +188 -121
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -704,12 +704,13 @@ function buildFullHref(base, child) {
|
|
|
704
704
|
return new URL(child, base).toString();
|
|
705
705
|
}
|
|
706
706
|
function isRouteActive(fullHref, currentPathname) {
|
|
707
|
-
const
|
|
707
|
+
const hrefPathRaw = extractPathname(fullHref);
|
|
708
708
|
const hrefOrigin = extractOrigin(fullHref);
|
|
709
709
|
const currentOrigin = getCurrentOrigin();
|
|
710
710
|
if (hrefOrigin && currentOrigin && hrefOrigin !== currentOrigin) {
|
|
711
711
|
return false;
|
|
712
712
|
}
|
|
713
|
+
const hrefPath = hrefPathRaw.endsWith("/-") ? hrefPathRaw.slice(0, -2) : hrefPathRaw;
|
|
713
714
|
return currentPathname === hrefPath || currentPathname.startsWith(hrefPath + "/");
|
|
714
715
|
}
|
|
715
716
|
function treeContainsPath({
|
|
@@ -748,9 +749,63 @@ function treeContainsPath({
|
|
|
748
749
|
}
|
|
749
750
|
return false;
|
|
750
751
|
}
|
|
752
|
+
function getDeepestActiveChildren(data, base, pathname) {
|
|
753
|
+
let result = null;
|
|
754
|
+
function dfs(routes, parentBase) {
|
|
755
|
+
for (const node of routes) {
|
|
756
|
+
if (typeof node.routes === "string") {
|
|
757
|
+
const full = buildFullHref(parentBase, node.routes);
|
|
758
|
+
let hrefPath = extractPathname(full);
|
|
759
|
+
if (hrefPath.endsWith("/-")) hrefPath = hrefPath.slice(0, -2);
|
|
760
|
+
if (pathname === hrefPath || pathname.startsWith(hrefPath + "/")) {
|
|
761
|
+
}
|
|
762
|
+
} else {
|
|
763
|
+
const firstChild = node.routes[0];
|
|
764
|
+
const maybePath = typeof firstChild.routes === "string" ? firstChild.routes : "";
|
|
765
|
+
const full = buildFullHref(parentBase, maybePath);
|
|
766
|
+
let hrefPath = extractPathname(full);
|
|
767
|
+
if (hrefPath.endsWith("/-")) hrefPath = hrefPath.slice(0, -2);
|
|
768
|
+
if (pathname.startsWith(hrefPath)) {
|
|
769
|
+
result = { base: parentBase, children: node.routes };
|
|
770
|
+
dfs(node.routes, parentBase);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
dfs(data, base);
|
|
776
|
+
return result;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// src/components/custom/navbar/sub-nav.tsx
|
|
780
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
781
|
+
function SubNav({
|
|
782
|
+
base,
|
|
783
|
+
childrenRoutes,
|
|
784
|
+
router
|
|
785
|
+
}) {
|
|
786
|
+
const pathname = typeof window !== "undefined" ? window.location.pathname : "";
|
|
787
|
+
if (!childrenRoutes || childrenRoutes.length === 0) return null;
|
|
788
|
+
return /* @__PURE__ */ jsx9("div", { className: "bg-transparent border rounded-md px-2 py-1 shadow-lg flex gap-2", children: childrenRoutes.map((child) => {
|
|
789
|
+
if (typeof child.routes !== "string") return null;
|
|
790
|
+
const href = buildFullHref(base, child.routes);
|
|
791
|
+
const active = isRouteActive(href, pathname);
|
|
792
|
+
return /* @__PURE__ */ jsx9(
|
|
793
|
+
"button",
|
|
794
|
+
{
|
|
795
|
+
onClick: () => router.push(href),
|
|
796
|
+
className: cn(
|
|
797
|
+
"px-3 py-1 text-sm rounded-md whitespace-nowrap cursor-pointer",
|
|
798
|
+
active ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-primary"
|
|
799
|
+
),
|
|
800
|
+
children: child.label
|
|
801
|
+
},
|
|
802
|
+
child.label
|
|
803
|
+
);
|
|
804
|
+
}) });
|
|
805
|
+
}
|
|
751
806
|
|
|
752
807
|
// src/components/custom/navbar/customMenu.tsx
|
|
753
|
-
import { Fragment, jsx as
|
|
808
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
754
809
|
function isLeaf(value) {
|
|
755
810
|
return typeof value === "string";
|
|
756
811
|
}
|
|
@@ -759,11 +814,11 @@ function MenuItems({
|
|
|
759
814
|
base,
|
|
760
815
|
router
|
|
761
816
|
}) {
|
|
762
|
-
return /* @__PURE__ */
|
|
817
|
+
return /* @__PURE__ */ jsx10(Fragment, { children: data.map((value) => {
|
|
763
818
|
if (isLeaf(value.routes)) {
|
|
764
819
|
const fullPath = buildFullHref(base, value.routes);
|
|
765
820
|
const active = isRouteActive(fullPath, router.pathname);
|
|
766
|
-
return /* @__PURE__ */
|
|
821
|
+
return /* @__PURE__ */ jsx10(
|
|
767
822
|
MenubarItem,
|
|
768
823
|
{
|
|
769
824
|
onClick: () => router.push(fullPath),
|
|
@@ -782,7 +837,7 @@ function MenuItems({
|
|
|
782
837
|
pathname: router.pathname
|
|
783
838
|
});
|
|
784
839
|
return /* @__PURE__ */ jsxs7(MenubarSub, { children: [
|
|
785
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ jsx10(
|
|
786
841
|
MenubarSubTrigger,
|
|
787
842
|
{
|
|
788
843
|
className: cn(
|
|
@@ -791,7 +846,7 @@ function MenuItems({
|
|
|
791
846
|
children: value.label
|
|
792
847
|
}
|
|
793
848
|
),
|
|
794
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ jsx10(MenubarSubContent, { children: /* @__PURE__ */ jsx10(
|
|
795
850
|
MenuItems,
|
|
796
851
|
{
|
|
797
852
|
data: value.routes,
|
|
@@ -807,56 +862,68 @@ function MenuList({
|
|
|
807
862
|
router
|
|
808
863
|
}) {
|
|
809
864
|
const { name, url, routes } = entry;
|
|
865
|
+
const pathname = router.pathname;
|
|
810
866
|
const isGroupActive = treeContainsPath({
|
|
811
867
|
data: routes,
|
|
812
868
|
base: url,
|
|
813
|
-
pathname
|
|
869
|
+
pathname
|
|
814
870
|
});
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
871
|
+
const sub = getDeepestActiveChildren(routes, url, pathname);
|
|
872
|
+
return /* @__PURE__ */ jsxs7("div", { className: "relative inline-block", children: [
|
|
873
|
+
/* @__PURE__ */ jsx10(Menubar, { className: "bg-transparent border-none", children: /* @__PURE__ */ jsxs7(MenubarMenu, { children: [
|
|
874
|
+
/* @__PURE__ */ jsxs7(
|
|
875
|
+
MenubarTrigger,
|
|
876
|
+
{
|
|
877
|
+
className: cn(
|
|
878
|
+
"cursor-pointer group inline-flex items-center",
|
|
879
|
+
isGroupActive && "bg-accent text-accent-foreground"
|
|
880
|
+
),
|
|
881
|
+
children: [
|
|
882
|
+
name,
|
|
883
|
+
/* @__PURE__ */ jsx10(ChevronDown, { size: 16, className: "ml-1 inline-block" })
|
|
884
|
+
]
|
|
885
|
+
}
|
|
886
|
+
),
|
|
887
|
+
/* @__PURE__ */ jsx10(MenubarContent, { children: /* @__PURE__ */ jsx10(MenuItems, { data: routes, base: url, router }) })
|
|
888
|
+
] }) }),
|
|
889
|
+
sub ? /* @__PURE__ */ jsx10("div", { className: "absolute left-0 top-12 z-40", children: /* @__PURE__ */ jsx10(
|
|
890
|
+
SubNav,
|
|
818
891
|
{
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
),
|
|
823
|
-
children: [
|
|
824
|
-
name,
|
|
825
|
-
/* @__PURE__ */ jsx9(ChevronDown, { size: 16, className: "ml-1 inline-block" })
|
|
826
|
-
]
|
|
892
|
+
base: sub.base,
|
|
893
|
+
childrenRoutes: sub.children,
|
|
894
|
+
router
|
|
827
895
|
}
|
|
828
|
-
)
|
|
829
|
-
|
|
830
|
-
] }) });
|
|
896
|
+
) }) : null
|
|
897
|
+
] });
|
|
831
898
|
}
|
|
832
899
|
|
|
833
900
|
// src/components/custom/navbar/notifications.tsx
|
|
834
901
|
import { BellDot } from "lucide-react";
|
|
835
|
-
import { jsx as
|
|
902
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
836
903
|
var Notifications = ({
|
|
837
904
|
notificationData,
|
|
838
905
|
notificationHandler
|
|
839
906
|
}) => {
|
|
840
907
|
return /* @__PURE__ */ jsxs8(DropdownMenu, { onOpenChange: (open) => open && notificationHandler(), children: [
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ jsx11(DropdownMenuTrigger, { className: "cursor-pointer", asChild: true, children: /* @__PURE__ */ jsx11(BellDot, { size: 24 }) }),
|
|
909
|
+
/* @__PURE__ */ jsx11(
|
|
843
910
|
DropdownMenuContent,
|
|
844
911
|
{
|
|
845
912
|
className: "w-80 h-96 bg-card-foreground",
|
|
846
913
|
align: "start",
|
|
847
|
-
children: /* @__PURE__ */
|
|
914
|
+
children: /* @__PURE__ */ jsx11(ScrollArea, { className: "w-full h-full", children: (notificationData == null ? void 0 : notificationData.length) == 0 ? /* @__PURE__ */ jsx11("h1", { className: "text-center flex items-center justify-center h-80 w-full", children: "No Notifications" }) : notificationData == null ? void 0 : notificationData.map((data, index) => /* @__PURE__ */ jsxs8("div", { children: [
|
|
848
915
|
/* @__PURE__ */ jsxs8("div", { className: "flex py-4 px-5 gap-6", children: [
|
|
849
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ jsx11("div", { className: "w-3 h-3 mt-2 bg-accent rounded-full flex-shrink-0" }),
|
|
850
917
|
/* @__PURE__ */ jsxs8("div", { className: " flex gap-2 flex-col text-sm", children: [
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
/* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ jsx11("h2", { className: "font-semibold text-base", children: data == null ? void 0 : data.topic }),
|
|
919
|
+
/* @__PURE__ */ jsx11("h3", { children: data == null ? void 0 : data.heading }),
|
|
920
|
+
/* @__PURE__ */ jsx11("h2", { children: data == null ? void 0 : data.trail }),
|
|
921
|
+
/* @__PURE__ */ jsx11("h1", { className: " bg-background rounded-sm p-2", children: data == null ? void 0 : data.body }),
|
|
922
|
+
/* @__PURE__ */ jsx11("h3", { className: "bg-white/10 rounded-sm p-1 px-3 w-fit text-md font-semibold text-accent tracking-[0.25rem]", children: data == null ? void 0 : data.otp }),
|
|
923
|
+
/* @__PURE__ */ jsx11("h4", { className: "text-xs", children: formatDateAndTime(data == null ? void 0 : data.time) })
|
|
857
924
|
] })
|
|
858
925
|
] }),
|
|
859
|
-
index < (notificationData == null ? void 0 : notificationData.length) - 1 && /* @__PURE__ */
|
|
926
|
+
index < (notificationData == null ? void 0 : notificationData.length) - 1 && /* @__PURE__ */ jsx11(Separator2, { className: "my-2" })
|
|
860
927
|
] }, data.otp)) })
|
|
861
928
|
}
|
|
862
929
|
)
|
|
@@ -865,7 +932,7 @@ var Notifications = ({
|
|
|
865
932
|
var notifications_default = Notifications;
|
|
866
933
|
|
|
867
934
|
// src/components/custom/navbar/desktopNavbar.tsx
|
|
868
|
-
import { jsx as
|
|
935
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
869
936
|
function DesktopNavbar({
|
|
870
937
|
navbarData,
|
|
871
938
|
userData,
|
|
@@ -877,9 +944,9 @@ function DesktopNavbar({
|
|
|
877
944
|
hubIdEnable,
|
|
878
945
|
hubIdChangeHandler
|
|
879
946
|
}) {
|
|
880
|
-
return /* @__PURE__ */
|
|
947
|
+
return /* @__PURE__ */ jsx12("nav", { children: /* @__PURE__ */ jsxs9("div", { className: "flex justify-between px-10 py-2 bg-card items-center border-b-1", children: [
|
|
881
948
|
/* @__PURE__ */ jsxs9("div", { className: "left flex gap-4 items-center", children: [
|
|
882
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ jsx12(
|
|
883
950
|
"img",
|
|
884
951
|
{
|
|
885
952
|
src: sidebarIcon_default.src || sidebarIcon_default,
|
|
@@ -888,7 +955,7 @@ function DesktopNavbar({
|
|
|
888
955
|
height: 18
|
|
889
956
|
}
|
|
890
957
|
),
|
|
891
|
-
navbarData == null ? void 0 : navbarData.map((entry) => /* @__PURE__ */
|
|
958
|
+
navbarData == null ? void 0 : navbarData.map((entry) => /* @__PURE__ */ jsx12(
|
|
892
959
|
MenuList,
|
|
893
960
|
{
|
|
894
961
|
entry,
|
|
@@ -898,8 +965,8 @@ function DesktopNavbar({
|
|
|
898
965
|
))
|
|
899
966
|
] }),
|
|
900
967
|
/* @__PURE__ */ jsxs9("div", { className: "flex gap-4 items-center", children: [
|
|
901
|
-
/* @__PURE__ */
|
|
902
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ jsx12(notifications_default, { notificationData, notificationHandler }),
|
|
969
|
+
/* @__PURE__ */ jsx12(user_default2, { userData, onLogout, hubIdChangeHandler, hubDetails, hubIdEnable })
|
|
903
970
|
] })
|
|
904
971
|
] }) });
|
|
905
972
|
}
|
|
@@ -913,14 +980,14 @@ import { Menu as Menu2, X } from "lucide-react";
|
|
|
913
980
|
// src/components/ui/sheet.tsx
|
|
914
981
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
915
982
|
import { XIcon } from "lucide-react";
|
|
916
|
-
import { jsx as
|
|
983
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
917
984
|
function Sheet(_a) {
|
|
918
985
|
var props = __objRest(_a, []);
|
|
919
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ jsx13(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
920
987
|
}
|
|
921
988
|
function SheetPortal(_a) {
|
|
922
989
|
var props = __objRest(_a, []);
|
|
923
|
-
return /* @__PURE__ */
|
|
990
|
+
return /* @__PURE__ */ jsx13(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
924
991
|
}
|
|
925
992
|
function SheetOverlay(_a) {
|
|
926
993
|
var _b = _a, {
|
|
@@ -928,7 +995,7 @@ function SheetOverlay(_a) {
|
|
|
928
995
|
} = _b, props = __objRest(_b, [
|
|
929
996
|
"className"
|
|
930
997
|
]);
|
|
931
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ jsx13(
|
|
932
999
|
SheetPrimitive.Overlay,
|
|
933
1000
|
__spreadValues({
|
|
934
1001
|
"data-slot": "sheet-overlay",
|
|
@@ -950,7 +1017,7 @@ function SheetContent(_a) {
|
|
|
950
1017
|
"side"
|
|
951
1018
|
]);
|
|
952
1019
|
return /* @__PURE__ */ jsxs10(SheetPortal, { children: [
|
|
953
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsx13(SheetOverlay, {}),
|
|
954
1021
|
/* @__PURE__ */ jsxs10(
|
|
955
1022
|
SheetPrimitive.Content,
|
|
956
1023
|
__spreadProps(__spreadValues({
|
|
@@ -967,8 +1034,8 @@ function SheetContent(_a) {
|
|
|
967
1034
|
children: [
|
|
968
1035
|
children,
|
|
969
1036
|
/* @__PURE__ */ jsxs10(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: [
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ jsx13(XIcon, { className: "size-4" }),
|
|
1038
|
+
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Close" })
|
|
972
1039
|
] })
|
|
973
1040
|
]
|
|
974
1041
|
})
|
|
@@ -977,7 +1044,7 @@ function SheetContent(_a) {
|
|
|
977
1044
|
}
|
|
978
1045
|
function SheetHeader(_a) {
|
|
979
1046
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
980
|
-
return /* @__PURE__ */
|
|
1047
|
+
return /* @__PURE__ */ jsx13(
|
|
981
1048
|
"div",
|
|
982
1049
|
__spreadValues({
|
|
983
1050
|
"data-slot": "sheet-header",
|
|
@@ -991,7 +1058,7 @@ function SheetTitle(_a) {
|
|
|
991
1058
|
} = _b, props = __objRest(_b, [
|
|
992
1059
|
"className"
|
|
993
1060
|
]);
|
|
994
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ jsx13(
|
|
995
1062
|
SheetPrimitive.Title,
|
|
996
1063
|
__spreadValues({
|
|
997
1064
|
"data-slot": "sheet-title",
|
|
@@ -1005,7 +1072,7 @@ function SheetDescription(_a) {
|
|
|
1005
1072
|
} = _b, props = __objRest(_b, [
|
|
1006
1073
|
"className"
|
|
1007
1074
|
]);
|
|
1008
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ jsx13(
|
|
1009
1076
|
SheetPrimitive.Description,
|
|
1010
1077
|
__spreadValues({
|
|
1011
1078
|
"data-slot": "sheet-description",
|
|
@@ -1016,14 +1083,14 @@ function SheetDescription(_a) {
|
|
|
1016
1083
|
|
|
1017
1084
|
// src/components/ui/tooltip.tsx
|
|
1018
1085
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
1019
|
-
import { jsx as
|
|
1086
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1020
1087
|
function TooltipProvider(_a) {
|
|
1021
1088
|
var _b = _a, {
|
|
1022
1089
|
delayDuration = 0
|
|
1023
1090
|
} = _b, props = __objRest(_b, [
|
|
1024
1091
|
"delayDuration"
|
|
1025
1092
|
]);
|
|
1026
|
-
return /* @__PURE__ */
|
|
1093
|
+
return /* @__PURE__ */ jsx14(
|
|
1027
1094
|
TooltipPrimitive.Provider,
|
|
1028
1095
|
__spreadValues({
|
|
1029
1096
|
"data-slot": "tooltip-provider",
|
|
@@ -1033,11 +1100,11 @@ function TooltipProvider(_a) {
|
|
|
1033
1100
|
}
|
|
1034
1101
|
function Tooltip(_a) {
|
|
1035
1102
|
var props = __objRest(_a, []);
|
|
1036
|
-
return /* @__PURE__ */
|
|
1103
|
+
return /* @__PURE__ */ jsx14(TooltipProvider, { children: /* @__PURE__ */ jsx14(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
1037
1104
|
}
|
|
1038
1105
|
function TooltipTrigger(_a) {
|
|
1039
1106
|
var props = __objRest(_a, []);
|
|
1040
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsx14(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
1041
1108
|
}
|
|
1042
1109
|
function TooltipContent(_a) {
|
|
1043
1110
|
var _b = _a, {
|
|
@@ -1049,7 +1116,7 @@ function TooltipContent(_a) {
|
|
|
1049
1116
|
"sideOffset",
|
|
1050
1117
|
"children"
|
|
1051
1118
|
]);
|
|
1052
|
-
return /* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ jsx14(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs11(
|
|
1053
1120
|
TooltipPrimitive.Content,
|
|
1054
1121
|
__spreadProps(__spreadValues({
|
|
1055
1122
|
"data-slot": "tooltip-content",
|
|
@@ -1061,14 +1128,14 @@ function TooltipContent(_a) {
|
|
|
1061
1128
|
}, props), {
|
|
1062
1129
|
children: [
|
|
1063
1130
|
children,
|
|
1064
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ jsx14(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
1065
1132
|
]
|
|
1066
1133
|
})
|
|
1067
1134
|
) });
|
|
1068
1135
|
}
|
|
1069
1136
|
|
|
1070
1137
|
// src/components/ui/sidebar.tsx
|
|
1071
|
-
import { jsx as
|
|
1138
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1072
1139
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1073
1140
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1074
1141
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -1149,7 +1216,7 @@ function SidebarProvider(_a) {
|
|
|
1149
1216
|
toggleSidebar
|
|
1150
1217
|
]
|
|
1151
1218
|
);
|
|
1152
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ jsx15(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx15(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx15(
|
|
1153
1220
|
"div",
|
|
1154
1221
|
__spreadProps(__spreadValues({
|
|
1155
1222
|
"data-slot": "sidebar-wrapper",
|
|
@@ -1182,7 +1249,7 @@ function Sidebar(_a) {
|
|
|
1182
1249
|
]);
|
|
1183
1250
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1184
1251
|
if (collapsible === "none") {
|
|
1185
|
-
return /* @__PURE__ */
|
|
1252
|
+
return /* @__PURE__ */ jsx15(
|
|
1186
1253
|
"div",
|
|
1187
1254
|
__spreadProps(__spreadValues({
|
|
1188
1255
|
"data-slot": "sidebar",
|
|
@@ -1196,7 +1263,7 @@ function Sidebar(_a) {
|
|
|
1196
1263
|
);
|
|
1197
1264
|
}
|
|
1198
1265
|
if (isMobile) {
|
|
1199
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ jsx15(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ jsxs12(
|
|
1200
1267
|
SheetContent,
|
|
1201
1268
|
{
|
|
1202
1269
|
"data-sidebar": "sidebar",
|
|
@@ -1209,10 +1276,10 @@ function Sidebar(_a) {
|
|
|
1209
1276
|
side,
|
|
1210
1277
|
children: [
|
|
1211
1278
|
/* @__PURE__ */ jsxs12(SheetHeader, { className: "sr-only", children: [
|
|
1212
|
-
/* @__PURE__ */
|
|
1213
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ jsx15(SheetTitle, { children: "Sidebar" }),
|
|
1280
|
+
/* @__PURE__ */ jsx15(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1214
1281
|
] }),
|
|
1215
|
-
/* @__PURE__ */
|
|
1282
|
+
/* @__PURE__ */ jsx15("div", { className: "flex h-full w-full flex-col", children })
|
|
1216
1283
|
]
|
|
1217
1284
|
}
|
|
1218
1285
|
) }));
|
|
@@ -1227,7 +1294,7 @@ function Sidebar(_a) {
|
|
|
1227
1294
|
"data-side": side,
|
|
1228
1295
|
"data-slot": "sidebar",
|
|
1229
1296
|
children: [
|
|
1230
|
-
/* @__PURE__ */
|
|
1297
|
+
/* @__PURE__ */ jsx15(
|
|
1231
1298
|
"div",
|
|
1232
1299
|
{
|
|
1233
1300
|
"data-slot": "sidebar-gap",
|
|
@@ -1239,7 +1306,7 @@ function Sidebar(_a) {
|
|
|
1239
1306
|
)
|
|
1240
1307
|
}
|
|
1241
1308
|
),
|
|
1242
|
-
/* @__PURE__ */
|
|
1309
|
+
/* @__PURE__ */ jsx15(
|
|
1243
1310
|
"div",
|
|
1244
1311
|
__spreadProps(__spreadValues({
|
|
1245
1312
|
"data-slot": "sidebar-container",
|
|
@@ -1251,7 +1318,7 @@ function Sidebar(_a) {
|
|
|
1251
1318
|
className
|
|
1252
1319
|
)
|
|
1253
1320
|
}, props), {
|
|
1254
|
-
children: /* @__PURE__ */
|
|
1321
|
+
children: /* @__PURE__ */ jsx15(
|
|
1255
1322
|
"div",
|
|
1256
1323
|
{
|
|
1257
1324
|
"data-sidebar": "sidebar",
|
|
@@ -1290,15 +1357,15 @@ function SidebarTrigger(_a) {
|
|
|
1290
1357
|
}
|
|
1291
1358
|
}, props), {
|
|
1292
1359
|
children: [
|
|
1293
|
-
openMobile ? /* @__PURE__ */
|
|
1294
|
-
/* @__PURE__ */
|
|
1360
|
+
openMobile ? /* @__PURE__ */ jsx15(X, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }) : /* @__PURE__ */ jsx15(Menu2, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }),
|
|
1361
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1295
1362
|
]
|
|
1296
1363
|
})
|
|
1297
1364
|
);
|
|
1298
1365
|
}
|
|
1299
1366
|
function SidebarInset(_a) {
|
|
1300
1367
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1301
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ jsx15(
|
|
1302
1369
|
"main",
|
|
1303
1370
|
__spreadValues({
|
|
1304
1371
|
"data-slot": "sidebar-inset",
|
|
@@ -1312,7 +1379,7 @@ function SidebarInset(_a) {
|
|
|
1312
1379
|
}
|
|
1313
1380
|
function SidebarContent(_a) {
|
|
1314
1381
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1315
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ jsx15(
|
|
1316
1383
|
"div",
|
|
1317
1384
|
__spreadValues({
|
|
1318
1385
|
"data-slot": "sidebar-content",
|
|
@@ -1326,7 +1393,7 @@ function SidebarContent(_a) {
|
|
|
1326
1393
|
}
|
|
1327
1394
|
function SidebarGroup(_a) {
|
|
1328
1395
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1329
|
-
return /* @__PURE__ */
|
|
1396
|
+
return /* @__PURE__ */ jsx15(
|
|
1330
1397
|
"div",
|
|
1331
1398
|
__spreadValues({
|
|
1332
1399
|
"data-slot": "sidebar-group",
|
|
@@ -1340,7 +1407,7 @@ function SidebarGroup(_a) {
|
|
|
1340
1407
|
}
|
|
1341
1408
|
function SidebarMenu(_a) {
|
|
1342
1409
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1343
|
-
return /* @__PURE__ */
|
|
1410
|
+
return /* @__PURE__ */ jsx15(
|
|
1344
1411
|
"ul",
|
|
1345
1412
|
__spreadValues({
|
|
1346
1413
|
"data-slot": "sidebar-menu",
|
|
@@ -1351,7 +1418,7 @@ function SidebarMenu(_a) {
|
|
|
1351
1418
|
}
|
|
1352
1419
|
function SidebarMenuItem(_a) {
|
|
1353
1420
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1354
|
-
return /* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsx15(
|
|
1355
1422
|
"li",
|
|
1356
1423
|
__spreadValues({
|
|
1357
1424
|
"data-slot": "sidebar-menu-item",
|
|
@@ -1398,7 +1465,7 @@ function SidebarMenuButton(_a) {
|
|
|
1398
1465
|
]);
|
|
1399
1466
|
const Comp = asChild ? Slot2 : "button";
|
|
1400
1467
|
const { isMobile, state } = useSidebar();
|
|
1401
|
-
const button = /* @__PURE__ */
|
|
1468
|
+
const button = /* @__PURE__ */ jsx15(
|
|
1402
1469
|
Comp,
|
|
1403
1470
|
__spreadValues({
|
|
1404
1471
|
"data-slot": "sidebar-menu-button",
|
|
@@ -1420,8 +1487,8 @@ function SidebarMenuButton(_a) {
|
|
|
1420
1487
|
};
|
|
1421
1488
|
}
|
|
1422
1489
|
return /* @__PURE__ */ jsxs12(Tooltip, { children: [
|
|
1423
|
-
/* @__PURE__ */
|
|
1424
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: button }),
|
|
1491
|
+
/* @__PURE__ */ jsx15(
|
|
1425
1492
|
TooltipContent,
|
|
1426
1493
|
__spreadValues({
|
|
1427
1494
|
side: "right",
|
|
@@ -1433,7 +1500,7 @@ function SidebarMenuButton(_a) {
|
|
|
1433
1500
|
}
|
|
1434
1501
|
function SidebarMenuSub(_a) {
|
|
1435
1502
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1436
|
-
return /* @__PURE__ */
|
|
1503
|
+
return /* @__PURE__ */ jsx15(
|
|
1437
1504
|
"ul",
|
|
1438
1505
|
__spreadValues({
|
|
1439
1506
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -1452,7 +1519,7 @@ function SidebarMenuSubItem(_a) {
|
|
|
1452
1519
|
} = _b, props = __objRest(_b, [
|
|
1453
1520
|
"className"
|
|
1454
1521
|
]);
|
|
1455
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ jsx15(
|
|
1456
1523
|
"li",
|
|
1457
1524
|
__spreadValues({
|
|
1458
1525
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -1474,7 +1541,7 @@ function SidebarMenuSubButton(_a) {
|
|
|
1474
1541
|
"className"
|
|
1475
1542
|
]);
|
|
1476
1543
|
const Comp = asChild ? Slot2 : "a";
|
|
1477
|
-
return /* @__PURE__ */
|
|
1544
|
+
return /* @__PURE__ */ jsx15(
|
|
1478
1545
|
Comp,
|
|
1479
1546
|
__spreadValues({
|
|
1480
1547
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -1498,14 +1565,14 @@ import { ChevronRight, CornerDownRight } from "lucide-react";
|
|
|
1498
1565
|
|
|
1499
1566
|
// src/components/ui/collapsible.tsx
|
|
1500
1567
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1501
|
-
import { jsx as
|
|
1568
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1502
1569
|
function Collapsible(_a) {
|
|
1503
1570
|
var props = __objRest(_a, []);
|
|
1504
|
-
return /* @__PURE__ */
|
|
1571
|
+
return /* @__PURE__ */ jsx16(CollapsiblePrimitive.Root, __spreadValues({ "data-slot": "collapsible" }, props));
|
|
1505
1572
|
}
|
|
1506
1573
|
function CollapsibleTrigger2(_a) {
|
|
1507
1574
|
var props = __objRest(_a, []);
|
|
1508
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ jsx16(
|
|
1509
1576
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
1510
1577
|
__spreadValues({
|
|
1511
1578
|
"data-slot": "collapsible-trigger"
|
|
@@ -1514,7 +1581,7 @@ function CollapsibleTrigger2(_a) {
|
|
|
1514
1581
|
}
|
|
1515
1582
|
function CollapsibleContent2(_a) {
|
|
1516
1583
|
var props = __objRest(_a, []);
|
|
1517
|
-
return /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ jsx16(
|
|
1518
1585
|
CollapsiblePrimitive.CollapsibleContent,
|
|
1519
1586
|
__spreadValues({
|
|
1520
1587
|
"data-slot": "collapsible-content"
|
|
@@ -1523,36 +1590,36 @@ function CollapsibleContent2(_a) {
|
|
|
1523
1590
|
}
|
|
1524
1591
|
|
|
1525
1592
|
// src/components/custom/navbar/nav-main.tsx
|
|
1526
|
-
import { jsx as
|
|
1593
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1527
1594
|
function NavMain({
|
|
1528
1595
|
items,
|
|
1529
1596
|
router
|
|
1530
1597
|
}) {
|
|
1531
|
-
return /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ jsx17(SidebarGroup, { children: /* @__PURE__ */ jsx17(SidebarMenu, { children: items.map((entry) => {
|
|
1532
1599
|
const isGroupActive = treeContainsPath({
|
|
1533
1600
|
data: entry.routes,
|
|
1534
1601
|
base: entry.url,
|
|
1535
1602
|
pathname: router.pathname
|
|
1536
1603
|
});
|
|
1537
|
-
return /* @__PURE__ */
|
|
1604
|
+
return /* @__PURE__ */ jsx17(
|
|
1538
1605
|
Collapsible,
|
|
1539
1606
|
{
|
|
1540
1607
|
asChild: true,
|
|
1541
1608
|
defaultOpen: isGroupActive,
|
|
1542
1609
|
className: "group/collapsible group-data-[state=open]:bg-sidebar-accent group-data-[state=open]:text-sidebar-accent-foreground",
|
|
1543
1610
|
children: /* @__PURE__ */ jsxs13(SidebarMenuItem, { children: [
|
|
1544
|
-
/* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ jsx17(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
1545
1612
|
SidebarMenuButton,
|
|
1546
1613
|
{
|
|
1547
1614
|
tooltip: entry.name,
|
|
1548
1615
|
className: isGroupActive ? "bg-sidebar-accent text-sidebar-accent-foreground" : void 0,
|
|
1549
1616
|
children: [
|
|
1550
|
-
/* @__PURE__ */
|
|
1551
|
-
/* @__PURE__ */
|
|
1617
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium text-lg", children: entry.name }),
|
|
1618
|
+
/* @__PURE__ */ jsx17(ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
1552
1619
|
]
|
|
1553
1620
|
}
|
|
1554
1621
|
) }),
|
|
1555
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ jsx17(CollapsibleContent2, { children: /* @__PURE__ */ jsx17(SidebarMenuSub, { children: renderMenu(
|
|
1556
1623
|
entry.routes,
|
|
1557
1624
|
entry.url,
|
|
1558
1625
|
router
|
|
@@ -1569,30 +1636,30 @@ function renderMenu(data, base, router) {
|
|
|
1569
1636
|
if (typeof routes === "string") {
|
|
1570
1637
|
const fullPath = buildFullHref(base, routes);
|
|
1571
1638
|
const active = isRouteActive(fullPath, router.pathname);
|
|
1572
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ jsx17(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs13(
|
|
1573
1640
|
SidebarMenuSubButton,
|
|
1574
1641
|
{
|
|
1575
1642
|
onClick: () => router.push(fullPath),
|
|
1576
1643
|
className: `cursor-pointer ${active ? "bg-sidebar-accent text-sidebar-accent-foreground" : ""}`,
|
|
1577
1644
|
children: [
|
|
1578
|
-
/* @__PURE__ */
|
|
1579
|
-
/* @__PURE__ */
|
|
1645
|
+
/* @__PURE__ */ jsx17(CornerDownRight, {}),
|
|
1646
|
+
/* @__PURE__ */ jsx17("span", { className: "font-light text-sm", children: label })
|
|
1580
1647
|
]
|
|
1581
1648
|
}
|
|
1582
1649
|
) }, label);
|
|
1583
1650
|
}
|
|
1584
|
-
return /* @__PURE__ */
|
|
1651
|
+
return /* @__PURE__ */ jsx17(
|
|
1585
1652
|
Collapsible,
|
|
1586
1653
|
{
|
|
1587
1654
|
asChild: true,
|
|
1588
1655
|
defaultOpen: false,
|
|
1589
1656
|
className: "group/collapsible group-data-[state=open]:bg-sidebar-accent group-data-[state=open]:text-sidebar-accent-foreground",
|
|
1590
1657
|
children: /* @__PURE__ */ jsxs13(SidebarMenuItem, { children: [
|
|
1591
|
-
/* @__PURE__ */
|
|
1592
|
-
/* @__PURE__ */
|
|
1593
|
-
/* @__PURE__ */
|
|
1658
|
+
/* @__PURE__ */ jsx17(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs13(SidebarMenuButton, { tooltip: label, children: [
|
|
1659
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium text-base", children: label }),
|
|
1660
|
+
/* @__PURE__ */ jsx17(ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
1594
1661
|
] }) }),
|
|
1595
|
-
/* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ jsx17(CollapsibleContent2, { children: /* @__PURE__ */ jsx17(SidebarMenuSub, { children: renderMenu(routes, base, router) }) })
|
|
1596
1663
|
] })
|
|
1597
1664
|
},
|
|
1598
1665
|
label
|
|
@@ -1601,14 +1668,14 @@ function renderMenu(data, base, router) {
|
|
|
1601
1668
|
}
|
|
1602
1669
|
|
|
1603
1670
|
// src/components/custom/navbar/app-sidebar.tsx
|
|
1604
|
-
import { jsx as
|
|
1671
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1605
1672
|
function AppSidebar(_a) {
|
|
1606
1673
|
var _b = _a, { data, router } = _b, props = __objRest(_b, ["data", "router"]);
|
|
1607
|
-
return /* @__PURE__ */
|
|
1674
|
+
return /* @__PURE__ */ jsx18(Sidebar, __spreadProps(__spreadValues({ collapsible: "icon" }, props), { children: /* @__PURE__ */ jsx18(SidebarContent, { children: /* @__PURE__ */ jsx18(NavMain, { items: data, router }) }) }));
|
|
1608
1675
|
}
|
|
1609
1676
|
|
|
1610
1677
|
// src/components/custom/navbar/mobileNavbar.tsx
|
|
1611
|
-
import { jsx as
|
|
1678
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1612
1679
|
function MobileNavbar({
|
|
1613
1680
|
navbarData,
|
|
1614
1681
|
userData,
|
|
@@ -1624,8 +1691,8 @@ function MobileNavbar({
|
|
|
1624
1691
|
const safeData = navbarData || {};
|
|
1625
1692
|
return /* @__PURE__ */ jsxs14(SidebarProvider, { className: "relative w-full", children: [
|
|
1626
1693
|
/* @__PURE__ */ jsxs14("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: [
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1694
|
+
/* @__PURE__ */ jsx19(SidebarTrigger, {}),
|
|
1695
|
+
/* @__PURE__ */ jsx19(
|
|
1629
1696
|
"img",
|
|
1630
1697
|
{
|
|
1631
1698
|
src: ((_a = sidebarIcon_default) == null ? void 0 : _a.src) || sidebarIcon_default,
|
|
@@ -1635,16 +1702,16 @@ function MobileNavbar({
|
|
|
1635
1702
|
}
|
|
1636
1703
|
),
|
|
1637
1704
|
/* @__PURE__ */ jsxs14("div", { className: "flex gap-4 items-center", children: [
|
|
1638
|
-
/* @__PURE__ */
|
|
1639
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ jsx19(notifications_default, { notificationData, notificationHandler }),
|
|
1706
|
+
/* @__PURE__ */ jsx19(user_default2, { userData, onLogout, hubIdChangeHandler, hubDetails, hubIdEnable })
|
|
1640
1707
|
] })
|
|
1641
1708
|
] }),
|
|
1642
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsx19(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ jsx19(AppSidebar, { data: safeData, router }) })
|
|
1643
1710
|
] });
|
|
1644
1711
|
}
|
|
1645
1712
|
|
|
1646
1713
|
// src/components/custom/navbar/navbar.tsx
|
|
1647
|
-
import { jsx as
|
|
1714
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1648
1715
|
function Navbar({
|
|
1649
1716
|
navbarData,
|
|
1650
1717
|
userData,
|
|
@@ -1662,7 +1729,7 @@ function Navbar({
|
|
|
1662
1729
|
setMounted(true);
|
|
1663
1730
|
}, []);
|
|
1664
1731
|
if (!mounted) return null;
|
|
1665
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ jsx20("div", { className: "baaz-custom-components-navbar", children: isMobile ? /* @__PURE__ */ jsx20(
|
|
1666
1733
|
MobileNavbar,
|
|
1667
1734
|
{
|
|
1668
1735
|
navbarData,
|
|
@@ -1675,7 +1742,7 @@ function Navbar({
|
|
|
1675
1742
|
hubIdChangeHandler,
|
|
1676
1743
|
notificationHandler
|
|
1677
1744
|
}
|
|
1678
|
-
) : /* @__PURE__ */
|
|
1745
|
+
) : /* @__PURE__ */ jsx20(
|
|
1679
1746
|
DesktopNavbar,
|
|
1680
1747
|
{
|
|
1681
1748
|
navbarData,
|
|
@@ -1697,14 +1764,14 @@ import { Slash } from "lucide-react";
|
|
|
1697
1764
|
// src/components/ui/breadcrumb.tsx
|
|
1698
1765
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1699
1766
|
import { ChevronRight as ChevronRight2, MoreHorizontal } from "lucide-react";
|
|
1700
|
-
import { jsx as
|
|
1767
|
+
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1701
1768
|
function Breadcrumb(_a) {
|
|
1702
1769
|
var props = __objRest(_a, []);
|
|
1703
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ jsx21("nav", __spreadValues({ "aria-label": "breadcrumb", "data-slot": "breadcrumb" }, props));
|
|
1704
1771
|
}
|
|
1705
1772
|
function BreadcrumbList(_a) {
|
|
1706
1773
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1707
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ jsx21(
|
|
1708
1775
|
"ol",
|
|
1709
1776
|
__spreadValues({
|
|
1710
1777
|
"data-slot": "breadcrumb-list",
|
|
@@ -1717,7 +1784,7 @@ function BreadcrumbList(_a) {
|
|
|
1717
1784
|
}
|
|
1718
1785
|
function BreadcrumbItem(_a) {
|
|
1719
1786
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1720
|
-
return /* @__PURE__ */
|
|
1787
|
+
return /* @__PURE__ */ jsx21(
|
|
1721
1788
|
"li",
|
|
1722
1789
|
__spreadValues({
|
|
1723
1790
|
"data-slot": "breadcrumb-item",
|
|
@@ -1734,7 +1801,7 @@ function BreadcrumbLink(_a) {
|
|
|
1734
1801
|
"className"
|
|
1735
1802
|
]);
|
|
1736
1803
|
const Comp = asChild ? Slot3 : "a";
|
|
1737
|
-
return /* @__PURE__ */
|
|
1804
|
+
return /* @__PURE__ */ jsx21(
|
|
1738
1805
|
Comp,
|
|
1739
1806
|
__spreadValues({
|
|
1740
1807
|
"data-slot": "breadcrumb-link",
|
|
@@ -1750,7 +1817,7 @@ function BreadcrumbSeparator(_a) {
|
|
|
1750
1817
|
"children",
|
|
1751
1818
|
"className"
|
|
1752
1819
|
]);
|
|
1753
|
-
return /* @__PURE__ */
|
|
1820
|
+
return /* @__PURE__ */ jsx21(
|
|
1754
1821
|
"li",
|
|
1755
1822
|
__spreadProps(__spreadValues({
|
|
1756
1823
|
"data-slot": "breadcrumb-separator",
|
|
@@ -1758,13 +1825,13 @@ function BreadcrumbSeparator(_a) {
|
|
|
1758
1825
|
"aria-hidden": "true",
|
|
1759
1826
|
className: cn("[&>svg]:size-3.5", className)
|
|
1760
1827
|
}, props), {
|
|
1761
|
-
children: children != null ? children : /* @__PURE__ */
|
|
1828
|
+
children: children != null ? children : /* @__PURE__ */ jsx21(ChevronRight2, {})
|
|
1762
1829
|
})
|
|
1763
1830
|
);
|
|
1764
1831
|
}
|
|
1765
1832
|
|
|
1766
1833
|
// src/components/custom/breadcrumb/index.tsx
|
|
1767
|
-
import { jsx as
|
|
1834
|
+
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1768
1835
|
var CustomBreadcrumb = ({
|
|
1769
1836
|
layoutName,
|
|
1770
1837
|
includeFrom = 0,
|
|
@@ -1773,16 +1840,16 @@ var CustomBreadcrumb = ({
|
|
|
1773
1840
|
const completeUrl = pathname.split("/").filter(Boolean);
|
|
1774
1841
|
const urls = pathname.split("/").filter(Boolean).slice(includeFrom);
|
|
1775
1842
|
const activeClassName = "text-primary";
|
|
1776
|
-
return /* @__PURE__ */
|
|
1777
|
-
/* @__PURE__ */
|
|
1778
|
-
urls.length > 0 && /* @__PURE__ */
|
|
1843
|
+
return /* @__PURE__ */ jsx22(Breadcrumb, { children: /* @__PURE__ */ jsxs16(BreadcrumbList, { children: [
|
|
1844
|
+
/* @__PURE__ */ jsx22(BreadcrumbItem, { children: /* @__PURE__ */ jsx22("h2", { className: "text-base", children: capitalizeFirstLetter(layoutName) }) }),
|
|
1845
|
+
urls.length > 0 && /* @__PURE__ */ jsx22(BreadcrumbSeparator, { children: /* @__PURE__ */ jsx22(Slash, { className: "!h-md !w-md" }) }),
|
|
1779
1846
|
urls.map((url, index) => {
|
|
1780
1847
|
const href = buildUrl(
|
|
1781
1848
|
completeUrl,
|
|
1782
1849
|
index + includeFrom
|
|
1783
1850
|
);
|
|
1784
1851
|
return /* @__PURE__ */ jsxs16(BreadcrumbItem, { children: [
|
|
1785
|
-
/* @__PURE__ */
|
|
1852
|
+
/* @__PURE__ */ jsx22(
|
|
1786
1853
|
BreadcrumbLink,
|
|
1787
1854
|
{
|
|
1788
1855
|
href,
|
|
@@ -1790,7 +1857,7 @@ var CustomBreadcrumb = ({
|
|
|
1790
1857
|
children: capitalizeFirstLetter(url)
|
|
1791
1858
|
}
|
|
1792
1859
|
),
|
|
1793
|
-
index < urls.length - 1 && /* @__PURE__ */
|
|
1860
|
+
index < urls.length - 1 && /* @__PURE__ */ jsx22(BreadcrumbSeparator, { children: /* @__PURE__ */ jsx22(Slash, { className: "!h-md !w-md" }) })
|
|
1794
1861
|
] }, index);
|
|
1795
1862
|
})
|
|
1796
1863
|
] }) });
|