baaz-custom-components 3.2.11 → 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 +205 -139
- package/dist/index.mjs +186 -120
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -783,9 +783,63 @@ function treeContainsPath({
|
|
|
783
783
|
}
|
|
784
784
|
return false;
|
|
785
785
|
}
|
|
786
|
+
function getDeepestActiveChildren(data, base, pathname) {
|
|
787
|
+
let result = null;
|
|
788
|
+
function dfs(routes, parentBase) {
|
|
789
|
+
for (const node of routes) {
|
|
790
|
+
if (typeof node.routes === "string") {
|
|
791
|
+
const full = buildFullHref(parentBase, node.routes);
|
|
792
|
+
let hrefPath = extractPathname(full);
|
|
793
|
+
if (hrefPath.endsWith("/-")) hrefPath = hrefPath.slice(0, -2);
|
|
794
|
+
if (pathname === hrefPath || pathname.startsWith(hrefPath + "/")) {
|
|
795
|
+
}
|
|
796
|
+
} else {
|
|
797
|
+
const firstChild = node.routes[0];
|
|
798
|
+
const maybePath = typeof firstChild.routes === "string" ? firstChild.routes : "";
|
|
799
|
+
const full = buildFullHref(parentBase, maybePath);
|
|
800
|
+
let hrefPath = extractPathname(full);
|
|
801
|
+
if (hrefPath.endsWith("/-")) hrefPath = hrefPath.slice(0, -2);
|
|
802
|
+
if (pathname.startsWith(hrefPath)) {
|
|
803
|
+
result = { base: parentBase, children: node.routes };
|
|
804
|
+
dfs(node.routes, parentBase);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
dfs(data, base);
|
|
810
|
+
return result;
|
|
811
|
+
}
|
|
786
812
|
|
|
787
|
-
// src/components/custom/navbar/
|
|
813
|
+
// src/components/custom/navbar/sub-nav.tsx
|
|
788
814
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
815
|
+
function SubNav({
|
|
816
|
+
base,
|
|
817
|
+
childrenRoutes,
|
|
818
|
+
router
|
|
819
|
+
}) {
|
|
820
|
+
const pathname = typeof window !== "undefined" ? window.location.pathname : "";
|
|
821
|
+
if (!childrenRoutes || childrenRoutes.length === 0) return null;
|
|
822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-transparent border rounded-md px-2 py-1 shadow-lg flex gap-2", children: childrenRoutes.map((child) => {
|
|
823
|
+
if (typeof child.routes !== "string") return null;
|
|
824
|
+
const href = buildFullHref(base, child.routes);
|
|
825
|
+
const active = isRouteActive(href, pathname);
|
|
826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
827
|
+
"button",
|
|
828
|
+
{
|
|
829
|
+
onClick: () => router.push(href),
|
|
830
|
+
className: cn(
|
|
831
|
+
"px-3 py-1 text-sm rounded-md whitespace-nowrap cursor-pointer",
|
|
832
|
+
active ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-primary"
|
|
833
|
+
),
|
|
834
|
+
children: child.label
|
|
835
|
+
},
|
|
836
|
+
child.label
|
|
837
|
+
);
|
|
838
|
+
}) });
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// src/components/custom/navbar/customMenu.tsx
|
|
842
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
789
843
|
function isLeaf(value) {
|
|
790
844
|
return typeof value === "string";
|
|
791
845
|
}
|
|
@@ -794,11 +848,11 @@ function MenuItems({
|
|
|
794
848
|
base,
|
|
795
849
|
router
|
|
796
850
|
}) {
|
|
797
|
-
return /* @__PURE__ */ (0,
|
|
851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: data.map((value) => {
|
|
798
852
|
if (isLeaf(value.routes)) {
|
|
799
853
|
const fullPath = buildFullHref(base, value.routes);
|
|
800
854
|
const active = isRouteActive(fullPath, router.pathname);
|
|
801
|
-
return /* @__PURE__ */ (0,
|
|
855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
802
856
|
MenubarItem,
|
|
803
857
|
{
|
|
804
858
|
onClick: () => router.push(fullPath),
|
|
@@ -816,8 +870,8 @@ function MenuItems({
|
|
|
816
870
|
base,
|
|
817
871
|
pathname: router.pathname
|
|
818
872
|
});
|
|
819
|
-
return /* @__PURE__ */ (0,
|
|
820
|
-
/* @__PURE__ */ (0,
|
|
873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MenubarSub, { children: [
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
821
875
|
MenubarSubTrigger,
|
|
822
876
|
{
|
|
823
877
|
className: cn(
|
|
@@ -826,7 +880,7 @@ function MenuItems({
|
|
|
826
880
|
children: value.label
|
|
827
881
|
}
|
|
828
882
|
),
|
|
829
|
-
/* @__PURE__ */ (0,
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenubarSubContent, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
830
884
|
MenuItems,
|
|
831
885
|
{
|
|
832
886
|
data: value.routes,
|
|
@@ -842,56 +896,68 @@ function MenuList({
|
|
|
842
896
|
router
|
|
843
897
|
}) {
|
|
844
898
|
const { name, url, routes } = entry;
|
|
899
|
+
const pathname = router.pathname;
|
|
845
900
|
const isGroupActive = treeContainsPath({
|
|
846
901
|
data: routes,
|
|
847
902
|
base: url,
|
|
848
|
-
pathname
|
|
903
|
+
pathname
|
|
849
904
|
});
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
905
|
+
const sub = getDeepestActiveChildren(routes, url, pathname);
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative inline-block", children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Menubar, { className: "bg-transparent border-none", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MenubarMenu, { children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
909
|
+
MenubarTrigger,
|
|
910
|
+
{
|
|
911
|
+
className: cn(
|
|
912
|
+
"cursor-pointer group inline-flex items-center",
|
|
913
|
+
isGroupActive && "bg-accent text-accent-foreground"
|
|
914
|
+
),
|
|
915
|
+
children: [
|
|
916
|
+
name,
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.ChevronDown, { size: 16, className: "ml-1 inline-block" })
|
|
918
|
+
]
|
|
919
|
+
}
|
|
920
|
+
),
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenubarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenuItems, { data: routes, base: url, router }) })
|
|
922
|
+
] }) }),
|
|
923
|
+
sub ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "absolute left-0 top-12 z-40", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
924
|
+
SubNav,
|
|
853
925
|
{
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
),
|
|
858
|
-
children: [
|
|
859
|
-
name,
|
|
860
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react5.ChevronDown, { size: 16, className: "ml-1 inline-block" })
|
|
861
|
-
]
|
|
926
|
+
base: sub.base,
|
|
927
|
+
childrenRoutes: sub.children,
|
|
928
|
+
router
|
|
862
929
|
}
|
|
863
|
-
)
|
|
864
|
-
|
|
865
|
-
] }) });
|
|
930
|
+
) }) : null
|
|
931
|
+
] });
|
|
866
932
|
}
|
|
867
933
|
|
|
868
934
|
// src/components/custom/navbar/notifications.tsx
|
|
869
935
|
var import_lucide_react6 = require("lucide-react");
|
|
870
|
-
var
|
|
936
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
871
937
|
var Notifications = ({
|
|
872
938
|
notificationData,
|
|
873
939
|
notificationHandler
|
|
874
940
|
}) => {
|
|
875
|
-
return /* @__PURE__ */ (0,
|
|
876
|
-
/* @__PURE__ */ (0,
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DropdownMenu, { onOpenChange: (open) => open && notificationHandler(), children: [
|
|
942
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuTrigger, { className: "cursor-pointer", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react6.BellDot, { size: 24 }) }),
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
878
944
|
DropdownMenuContent,
|
|
879
945
|
{
|
|
880
946
|
className: "w-80 h-96 bg-card-foreground",
|
|
881
947
|
align: "start",
|
|
882
|
-
children: /* @__PURE__ */ (0,
|
|
883
|
-
/* @__PURE__ */ (0,
|
|
884
|
-
/* @__PURE__ */ (0,
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
887
|
-
/* @__PURE__ */ (0,
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
889
|
-
/* @__PURE__ */ (0,
|
|
890
|
-
/* @__PURE__ */ (0,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ScrollArea, { className: "w-full h-full", children: (notificationData == null ? void 0 : notificationData.length) == 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("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__ */ (0, import_jsx_runtime11.jsxs)("div", { children: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex py-4 px-5 gap-6", children: [
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-3 h-3 mt-2 bg-accent rounded-full flex-shrink-0" }),
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: " flex gap-2 flex-col text-sm", children: [
|
|
952
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h2", { className: "font-semibold text-base", children: data == null ? void 0 : data.topic }),
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { children: data == null ? void 0 : data.heading }),
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h2", { children: data == null ? void 0 : data.trail }),
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { className: " bg-background rounded-sm p-2", children: data == null ? void 0 : data.body }),
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("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 }),
|
|
957
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h4", { className: "text-xs", children: formatDateAndTime(data == null ? void 0 : data.time) })
|
|
892
958
|
] })
|
|
893
959
|
] }),
|
|
894
|
-
index < (notificationData == null ? void 0 : notificationData.length) - 1 && /* @__PURE__ */ (0,
|
|
960
|
+
index < (notificationData == null ? void 0 : notificationData.length) - 1 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Separator2, { className: "my-2" })
|
|
895
961
|
] }, data.otp)) })
|
|
896
962
|
}
|
|
897
963
|
)
|
|
@@ -900,7 +966,7 @@ var Notifications = ({
|
|
|
900
966
|
var notifications_default = Notifications;
|
|
901
967
|
|
|
902
968
|
// src/components/custom/navbar/desktopNavbar.tsx
|
|
903
|
-
var
|
|
969
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
904
970
|
function DesktopNavbar({
|
|
905
971
|
navbarData,
|
|
906
972
|
userData,
|
|
@@ -912,9 +978,9 @@ function DesktopNavbar({
|
|
|
912
978
|
hubIdEnable,
|
|
913
979
|
hubIdChangeHandler
|
|
914
980
|
}) {
|
|
915
|
-
return /* @__PURE__ */ (0,
|
|
916
|
-
/* @__PURE__ */ (0,
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex justify-between px-10 py-2 bg-card items-center border-b-1", children: [
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "left flex gap-4 items-center", children: [
|
|
983
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
918
984
|
"img",
|
|
919
985
|
{
|
|
920
986
|
src: sidebarIcon_default.src || sidebarIcon_default,
|
|
@@ -923,7 +989,7 @@ function DesktopNavbar({
|
|
|
923
989
|
height: 18
|
|
924
990
|
}
|
|
925
991
|
),
|
|
926
|
-
navbarData == null ? void 0 : navbarData.map((entry) => /* @__PURE__ */ (0,
|
|
992
|
+
navbarData == null ? void 0 : navbarData.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
927
993
|
MenuList,
|
|
928
994
|
{
|
|
929
995
|
entry,
|
|
@@ -932,9 +998,9 @@ function DesktopNavbar({
|
|
|
932
998
|
entry.name
|
|
933
999
|
))
|
|
934
1000
|
] }),
|
|
935
|
-
/* @__PURE__ */ (0,
|
|
936
|
-
/* @__PURE__ */ (0,
|
|
937
|
-
/* @__PURE__ */ (0,
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex gap-4 items-center", children: [
|
|
1002
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(notifications_default, { notificationData, notificationHandler }),
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(user_default2, { userData, onLogout, hubIdChangeHandler, hubDetails, hubIdEnable })
|
|
938
1004
|
] })
|
|
939
1005
|
] }) });
|
|
940
1006
|
}
|
|
@@ -948,14 +1014,14 @@ var import_lucide_react8 = require("lucide-react");
|
|
|
948
1014
|
// src/components/ui/sheet.tsx
|
|
949
1015
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
950
1016
|
var import_lucide_react7 = require("lucide-react");
|
|
951
|
-
var
|
|
1017
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
952
1018
|
function Sheet(_a) {
|
|
953
1019
|
var props = __objRest(_a, []);
|
|
954
|
-
return /* @__PURE__ */ (0,
|
|
1020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
955
1021
|
}
|
|
956
1022
|
function SheetPortal(_a) {
|
|
957
1023
|
var props = __objRest(_a, []);
|
|
958
|
-
return /* @__PURE__ */ (0,
|
|
1024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
959
1025
|
}
|
|
960
1026
|
function SheetOverlay(_a) {
|
|
961
1027
|
var _b = _a, {
|
|
@@ -963,7 +1029,7 @@ function SheetOverlay(_a) {
|
|
|
963
1029
|
} = _b, props = __objRest(_b, [
|
|
964
1030
|
"className"
|
|
965
1031
|
]);
|
|
966
|
-
return /* @__PURE__ */ (0,
|
|
1032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
967
1033
|
SheetPrimitive.Overlay,
|
|
968
1034
|
__spreadValues({
|
|
969
1035
|
"data-slot": "sheet-overlay",
|
|
@@ -984,9 +1050,9 @@ function SheetContent(_a) {
|
|
|
984
1050
|
"children",
|
|
985
1051
|
"side"
|
|
986
1052
|
]);
|
|
987
|
-
return /* @__PURE__ */ (0,
|
|
988
|
-
/* @__PURE__ */ (0,
|
|
989
|
-
/* @__PURE__ */ (0,
|
|
1053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(SheetPortal, { children: [
|
|
1054
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SheetOverlay, {}),
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
990
1056
|
SheetPrimitive.Content,
|
|
991
1057
|
__spreadProps(__spreadValues({
|
|
992
1058
|
"data-slot": "sheet-content",
|
|
@@ -1001,9 +1067,9 @@ function SheetContent(_a) {
|
|
|
1001
1067
|
}, props), {
|
|
1002
1068
|
children: [
|
|
1003
1069
|
children,
|
|
1004
|
-
/* @__PURE__ */ (0,
|
|
1005
|
-
/* @__PURE__ */ (0,
|
|
1006
|
-
/* @__PURE__ */ (0,
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(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: [
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.XIcon, { className: "size-4" }),
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1007
1073
|
] })
|
|
1008
1074
|
]
|
|
1009
1075
|
})
|
|
@@ -1012,7 +1078,7 @@ function SheetContent(_a) {
|
|
|
1012
1078
|
}
|
|
1013
1079
|
function SheetHeader(_a) {
|
|
1014
1080
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1015
|
-
return /* @__PURE__ */ (0,
|
|
1081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1016
1082
|
"div",
|
|
1017
1083
|
__spreadValues({
|
|
1018
1084
|
"data-slot": "sheet-header",
|
|
@@ -1026,7 +1092,7 @@ function SheetTitle(_a) {
|
|
|
1026
1092
|
} = _b, props = __objRest(_b, [
|
|
1027
1093
|
"className"
|
|
1028
1094
|
]);
|
|
1029
|
-
return /* @__PURE__ */ (0,
|
|
1095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1030
1096
|
SheetPrimitive.Title,
|
|
1031
1097
|
__spreadValues({
|
|
1032
1098
|
"data-slot": "sheet-title",
|
|
@@ -1040,7 +1106,7 @@ function SheetDescription(_a) {
|
|
|
1040
1106
|
} = _b, props = __objRest(_b, [
|
|
1041
1107
|
"className"
|
|
1042
1108
|
]);
|
|
1043
|
-
return /* @__PURE__ */ (0,
|
|
1109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1044
1110
|
SheetPrimitive.Description,
|
|
1045
1111
|
__spreadValues({
|
|
1046
1112
|
"data-slot": "sheet-description",
|
|
@@ -1051,14 +1117,14 @@ function SheetDescription(_a) {
|
|
|
1051
1117
|
|
|
1052
1118
|
// src/components/ui/tooltip.tsx
|
|
1053
1119
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
1054
|
-
var
|
|
1120
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1055
1121
|
function TooltipProvider(_a) {
|
|
1056
1122
|
var _b = _a, {
|
|
1057
1123
|
delayDuration = 0
|
|
1058
1124
|
} = _b, props = __objRest(_b, [
|
|
1059
1125
|
"delayDuration"
|
|
1060
1126
|
]);
|
|
1061
|
-
return /* @__PURE__ */ (0,
|
|
1127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1062
1128
|
TooltipPrimitive.Provider,
|
|
1063
1129
|
__spreadValues({
|
|
1064
1130
|
"data-slot": "tooltip-provider",
|
|
@@ -1068,11 +1134,11 @@ function TooltipProvider(_a) {
|
|
|
1068
1134
|
}
|
|
1069
1135
|
function Tooltip(_a) {
|
|
1070
1136
|
var props = __objRest(_a, []);
|
|
1071
|
-
return /* @__PURE__ */ (0,
|
|
1137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
1072
1138
|
}
|
|
1073
1139
|
function TooltipTrigger(_a) {
|
|
1074
1140
|
var props = __objRest(_a, []);
|
|
1075
|
-
return /* @__PURE__ */ (0,
|
|
1141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
1076
1142
|
}
|
|
1077
1143
|
function TooltipContent(_a) {
|
|
1078
1144
|
var _b = _a, {
|
|
@@ -1084,7 +1150,7 @@ function TooltipContent(_a) {
|
|
|
1084
1150
|
"sideOffset",
|
|
1085
1151
|
"children"
|
|
1086
1152
|
]);
|
|
1087
|
-
return /* @__PURE__ */ (0,
|
|
1153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1088
1154
|
TooltipPrimitive.Content,
|
|
1089
1155
|
__spreadProps(__spreadValues({
|
|
1090
1156
|
"data-slot": "tooltip-content",
|
|
@@ -1096,14 +1162,14 @@ function TooltipContent(_a) {
|
|
|
1096
1162
|
}, props), {
|
|
1097
1163
|
children: [
|
|
1098
1164
|
children,
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
1100
1166
|
]
|
|
1101
1167
|
})
|
|
1102
1168
|
) });
|
|
1103
1169
|
}
|
|
1104
1170
|
|
|
1105
1171
|
// src/components/ui/sidebar.tsx
|
|
1106
|
-
var
|
|
1172
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1107
1173
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1108
1174
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1109
1175
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -1184,7 +1250,7 @@ function SidebarProvider(_a) {
|
|
|
1184
1250
|
toggleSidebar
|
|
1185
1251
|
]
|
|
1186
1252
|
);
|
|
1187
|
-
return /* @__PURE__ */ (0,
|
|
1253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1188
1254
|
"div",
|
|
1189
1255
|
__spreadProps(__spreadValues({
|
|
1190
1256
|
"data-slot": "sidebar-wrapper",
|
|
@@ -1217,7 +1283,7 @@ function Sidebar(_a) {
|
|
|
1217
1283
|
]);
|
|
1218
1284
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1219
1285
|
if (collapsible === "none") {
|
|
1220
|
-
return /* @__PURE__ */ (0,
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1221
1287
|
"div",
|
|
1222
1288
|
__spreadProps(__spreadValues({
|
|
1223
1289
|
"data-slot": "sidebar",
|
|
@@ -1231,7 +1297,7 @@ function Sidebar(_a) {
|
|
|
1231
1297
|
);
|
|
1232
1298
|
}
|
|
1233
1299
|
if (isMobile) {
|
|
1234
|
-
return /* @__PURE__ */ (0,
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1235
1301
|
SheetContent,
|
|
1236
1302
|
{
|
|
1237
1303
|
"data-sidebar": "sidebar",
|
|
@@ -1243,16 +1309,16 @@ function Sidebar(_a) {
|
|
|
1243
1309
|
},
|
|
1244
1310
|
side,
|
|
1245
1311
|
children: [
|
|
1246
|
-
/* @__PURE__ */ (0,
|
|
1247
|
-
/* @__PURE__ */ (0,
|
|
1248
|
-
/* @__PURE__ */ (0,
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
1313
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1249
1315
|
] }),
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
1251
1317
|
]
|
|
1252
1318
|
}
|
|
1253
1319
|
) }));
|
|
1254
1320
|
}
|
|
1255
|
-
return /* @__PURE__ */ (0,
|
|
1321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1256
1322
|
"div",
|
|
1257
1323
|
{
|
|
1258
1324
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -1262,7 +1328,7 @@ function Sidebar(_a) {
|
|
|
1262
1328
|
"data-side": side,
|
|
1263
1329
|
"data-slot": "sidebar",
|
|
1264
1330
|
children: [
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1331
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1266
1332
|
"div",
|
|
1267
1333
|
{
|
|
1268
1334
|
"data-slot": "sidebar-gap",
|
|
@@ -1274,7 +1340,7 @@ function Sidebar(_a) {
|
|
|
1274
1340
|
)
|
|
1275
1341
|
}
|
|
1276
1342
|
),
|
|
1277
|
-
/* @__PURE__ */ (0,
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1278
1344
|
"div",
|
|
1279
1345
|
__spreadProps(__spreadValues({
|
|
1280
1346
|
"data-slot": "sidebar-container",
|
|
@@ -1286,7 +1352,7 @@ function Sidebar(_a) {
|
|
|
1286
1352
|
className
|
|
1287
1353
|
)
|
|
1288
1354
|
}, props), {
|
|
1289
|
-
children: /* @__PURE__ */ (0,
|
|
1355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1290
1356
|
"div",
|
|
1291
1357
|
{
|
|
1292
1358
|
"data-sidebar": "sidebar",
|
|
@@ -1310,7 +1376,7 @@ function SidebarTrigger(_a) {
|
|
|
1310
1376
|
"onClick"
|
|
1311
1377
|
]);
|
|
1312
1378
|
const { toggleSidebar, openMobile } = useSidebar();
|
|
1313
|
-
return /* @__PURE__ */ (0,
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1314
1380
|
"button",
|
|
1315
1381
|
__spreadProps(__spreadValues({
|
|
1316
1382
|
"data-sidebar": "trigger",
|
|
@@ -1325,15 +1391,15 @@ function SidebarTrigger(_a) {
|
|
|
1325
1391
|
}
|
|
1326
1392
|
}, props), {
|
|
1327
1393
|
children: [
|
|
1328
|
-
openMobile ? /* @__PURE__ */ (0,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1394
|
+
openMobile ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.X, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.Menu, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }),
|
|
1395
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1330
1396
|
]
|
|
1331
1397
|
})
|
|
1332
1398
|
);
|
|
1333
1399
|
}
|
|
1334
1400
|
function SidebarInset(_a) {
|
|
1335
1401
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1336
|
-
return /* @__PURE__ */ (0,
|
|
1402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1337
1403
|
"main",
|
|
1338
1404
|
__spreadValues({
|
|
1339
1405
|
"data-slot": "sidebar-inset",
|
|
@@ -1347,7 +1413,7 @@ function SidebarInset(_a) {
|
|
|
1347
1413
|
}
|
|
1348
1414
|
function SidebarContent(_a) {
|
|
1349
1415
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1350
|
-
return /* @__PURE__ */ (0,
|
|
1416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1351
1417
|
"div",
|
|
1352
1418
|
__spreadValues({
|
|
1353
1419
|
"data-slot": "sidebar-content",
|
|
@@ -1361,7 +1427,7 @@ function SidebarContent(_a) {
|
|
|
1361
1427
|
}
|
|
1362
1428
|
function SidebarGroup(_a) {
|
|
1363
1429
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1364
|
-
return /* @__PURE__ */ (0,
|
|
1430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1365
1431
|
"div",
|
|
1366
1432
|
__spreadValues({
|
|
1367
1433
|
"data-slot": "sidebar-group",
|
|
@@ -1375,7 +1441,7 @@ function SidebarGroup(_a) {
|
|
|
1375
1441
|
}
|
|
1376
1442
|
function SidebarMenu(_a) {
|
|
1377
1443
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1378
|
-
return /* @__PURE__ */ (0,
|
|
1444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1379
1445
|
"ul",
|
|
1380
1446
|
__spreadValues({
|
|
1381
1447
|
"data-slot": "sidebar-menu",
|
|
@@ -1386,7 +1452,7 @@ function SidebarMenu(_a) {
|
|
|
1386
1452
|
}
|
|
1387
1453
|
function SidebarMenuItem(_a) {
|
|
1388
1454
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1389
|
-
return /* @__PURE__ */ (0,
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1390
1456
|
"li",
|
|
1391
1457
|
__spreadValues({
|
|
1392
1458
|
"data-slot": "sidebar-menu-item",
|
|
@@ -1433,7 +1499,7 @@ function SidebarMenuButton(_a) {
|
|
|
1433
1499
|
]);
|
|
1434
1500
|
const Comp = asChild ? import_react_slot2.Slot : "button";
|
|
1435
1501
|
const { isMobile, state } = useSidebar();
|
|
1436
|
-
const button = /* @__PURE__ */ (0,
|
|
1502
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1437
1503
|
Comp,
|
|
1438
1504
|
__spreadValues({
|
|
1439
1505
|
"data-slot": "sidebar-menu-button",
|
|
@@ -1454,9 +1520,9 @@ function SidebarMenuButton(_a) {
|
|
|
1454
1520
|
children: tooltip
|
|
1455
1521
|
};
|
|
1456
1522
|
}
|
|
1457
|
-
return /* @__PURE__ */ (0,
|
|
1458
|
-
/* @__PURE__ */ (0,
|
|
1459
|
-
/* @__PURE__ */ (0,
|
|
1523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
1524
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
1525
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1460
1526
|
TooltipContent,
|
|
1461
1527
|
__spreadValues({
|
|
1462
1528
|
side: "right",
|
|
@@ -1468,7 +1534,7 @@ function SidebarMenuButton(_a) {
|
|
|
1468
1534
|
}
|
|
1469
1535
|
function SidebarMenuSub(_a) {
|
|
1470
1536
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1471
|
-
return /* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1472
1538
|
"ul",
|
|
1473
1539
|
__spreadValues({
|
|
1474
1540
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -1487,7 +1553,7 @@ function SidebarMenuSubItem(_a) {
|
|
|
1487
1553
|
} = _b, props = __objRest(_b, [
|
|
1488
1554
|
"className"
|
|
1489
1555
|
]);
|
|
1490
|
-
return /* @__PURE__ */ (0,
|
|
1556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1491
1557
|
"li",
|
|
1492
1558
|
__spreadValues({
|
|
1493
1559
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -1509,7 +1575,7 @@ function SidebarMenuSubButton(_a) {
|
|
|
1509
1575
|
"className"
|
|
1510
1576
|
]);
|
|
1511
1577
|
const Comp = asChild ? import_react_slot2.Slot : "a";
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1513
1579
|
Comp,
|
|
1514
1580
|
__spreadValues({
|
|
1515
1581
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -1533,14 +1599,14 @@ var import_lucide_react9 = require("lucide-react");
|
|
|
1533
1599
|
|
|
1534
1600
|
// src/components/ui/collapsible.tsx
|
|
1535
1601
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
1536
|
-
var
|
|
1602
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1537
1603
|
function Collapsible(_a) {
|
|
1538
1604
|
var props = __objRest(_a, []);
|
|
1539
|
-
return /* @__PURE__ */ (0,
|
|
1605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CollapsiblePrimitive.Root, __spreadValues({ "data-slot": "collapsible" }, props));
|
|
1540
1606
|
}
|
|
1541
1607
|
function CollapsibleTrigger2(_a) {
|
|
1542
1608
|
var props = __objRest(_a, []);
|
|
1543
|
-
return /* @__PURE__ */ (0,
|
|
1609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1544
1610
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
1545
1611
|
__spreadValues({
|
|
1546
1612
|
"data-slot": "collapsible-trigger"
|
|
@@ -1549,7 +1615,7 @@ function CollapsibleTrigger2(_a) {
|
|
|
1549
1615
|
}
|
|
1550
1616
|
function CollapsibleContent2(_a) {
|
|
1551
1617
|
var props = __objRest(_a, []);
|
|
1552
|
-
return /* @__PURE__ */ (0,
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1553
1619
|
CollapsiblePrimitive.CollapsibleContent,
|
|
1554
1620
|
__spreadValues({
|
|
1555
1621
|
"data-slot": "collapsible-content"
|
|
@@ -1558,36 +1624,36 @@ function CollapsibleContent2(_a) {
|
|
|
1558
1624
|
}
|
|
1559
1625
|
|
|
1560
1626
|
// src/components/custom/navbar/nav-main.tsx
|
|
1561
|
-
var
|
|
1627
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1562
1628
|
function NavMain({
|
|
1563
1629
|
items,
|
|
1564
1630
|
router
|
|
1565
1631
|
}) {
|
|
1566
|
-
return /* @__PURE__ */ (0,
|
|
1632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SidebarGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SidebarMenu, { children: items.map((entry) => {
|
|
1567
1633
|
const isGroupActive = treeContainsPath({
|
|
1568
1634
|
data: entry.routes,
|
|
1569
1635
|
base: entry.url,
|
|
1570
1636
|
pathname: router.pathname
|
|
1571
1637
|
});
|
|
1572
|
-
return /* @__PURE__ */ (0,
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1573
1639
|
Collapsible,
|
|
1574
1640
|
{
|
|
1575
1641
|
asChild: true,
|
|
1576
1642
|
defaultOpen: isGroupActive,
|
|
1577
1643
|
className: "group/collapsible group-data-[state=open]:bg-sidebar-accent group-data-[state=open]:text-sidebar-accent-foreground",
|
|
1578
|
-
children: /* @__PURE__ */ (0,
|
|
1579
|
-
/* @__PURE__ */ (0,
|
|
1644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SidebarMenuItem, { children: [
|
|
1645
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1580
1646
|
SidebarMenuButton,
|
|
1581
1647
|
{
|
|
1582
1648
|
tooltip: entry.name,
|
|
1583
1649
|
className: isGroupActive ? "bg-sidebar-accent text-sidebar-accent-foreground" : void 0,
|
|
1584
1650
|
children: [
|
|
1585
|
-
/* @__PURE__ */ (0,
|
|
1586
|
-
/* @__PURE__ */ (0,
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-medium text-lg", children: entry.name }),
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
1587
1653
|
]
|
|
1588
1654
|
}
|
|
1589
1655
|
) }),
|
|
1590
|
-
/* @__PURE__ */ (0,
|
|
1656
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CollapsibleContent2, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SidebarMenuSub, { children: renderMenu(
|
|
1591
1657
|
entry.routes,
|
|
1592
1658
|
entry.url,
|
|
1593
1659
|
router
|
|
@@ -1604,30 +1670,30 @@ function renderMenu(data, base, router) {
|
|
|
1604
1670
|
if (typeof routes === "string") {
|
|
1605
1671
|
const fullPath = buildFullHref(base, routes);
|
|
1606
1672
|
const active = isRouteActive(fullPath, router.pathname);
|
|
1607
|
-
return /* @__PURE__ */ (0,
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SidebarMenuSubItem, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1608
1674
|
SidebarMenuSubButton,
|
|
1609
1675
|
{
|
|
1610
1676
|
onClick: () => router.push(fullPath),
|
|
1611
1677
|
className: `cursor-pointer ${active ? "bg-sidebar-accent text-sidebar-accent-foreground" : ""}`,
|
|
1612
1678
|
children: [
|
|
1613
|
-
/* @__PURE__ */ (0,
|
|
1614
|
-
/* @__PURE__ */ (0,
|
|
1679
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.CornerDownRight, {}),
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-light text-sm", children: label })
|
|
1615
1681
|
]
|
|
1616
1682
|
}
|
|
1617
1683
|
) }, label);
|
|
1618
1684
|
}
|
|
1619
|
-
return /* @__PURE__ */ (0,
|
|
1685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1620
1686
|
Collapsible,
|
|
1621
1687
|
{
|
|
1622
1688
|
asChild: true,
|
|
1623
1689
|
defaultOpen: false,
|
|
1624
1690
|
className: "group/collapsible group-data-[state=open]:bg-sidebar-accent group-data-[state=open]:text-sidebar-accent-foreground",
|
|
1625
|
-
children: /* @__PURE__ */ (0,
|
|
1626
|
-
/* @__PURE__ */ (0,
|
|
1627
|
-
/* @__PURE__ */ (0,
|
|
1628
|
-
/* @__PURE__ */ (0,
|
|
1691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SidebarMenuItem, { children: [
|
|
1692
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(SidebarMenuButton, { tooltip: label, children: [
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-medium text-base", children: label }),
|
|
1694
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
1629
1695
|
] }) }),
|
|
1630
|
-
/* @__PURE__ */ (0,
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CollapsibleContent2, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SidebarMenuSub, { children: renderMenu(routes, base, router) }) })
|
|
1631
1697
|
] })
|
|
1632
1698
|
},
|
|
1633
1699
|
label
|
|
@@ -1636,14 +1702,14 @@ function renderMenu(data, base, router) {
|
|
|
1636
1702
|
}
|
|
1637
1703
|
|
|
1638
1704
|
// src/components/custom/navbar/app-sidebar.tsx
|
|
1639
|
-
var
|
|
1705
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1640
1706
|
function AppSidebar(_a) {
|
|
1641
1707
|
var _b = _a, { data, router } = _b, props = __objRest(_b, ["data", "router"]);
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Sidebar, __spreadProps(__spreadValues({ collapsible: "icon" }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SidebarContent, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NavMain, { items: data, router }) }) }));
|
|
1643
1709
|
}
|
|
1644
1710
|
|
|
1645
1711
|
// src/components/custom/navbar/mobileNavbar.tsx
|
|
1646
|
-
var
|
|
1712
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1647
1713
|
function MobileNavbar({
|
|
1648
1714
|
navbarData,
|
|
1649
1715
|
userData,
|
|
@@ -1657,10 +1723,10 @@ function MobileNavbar({
|
|
|
1657
1723
|
}) {
|
|
1658
1724
|
var _a;
|
|
1659
1725
|
const safeData = navbarData || {};
|
|
1660
|
-
return /* @__PURE__ */ (0,
|
|
1661
|
-
/* @__PURE__ */ (0,
|
|
1662
|
-
/* @__PURE__ */ (0,
|
|
1663
|
-
/* @__PURE__ */ (0,
|
|
1726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(SidebarProvider, { className: "relative w-full", children: [
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("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: [
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SidebarTrigger, {}),
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1664
1730
|
"img",
|
|
1665
1731
|
{
|
|
1666
1732
|
src: ((_a = sidebarIcon_default) == null ? void 0 : _a.src) || sidebarIcon_default,
|
|
@@ -1669,17 +1735,17 @@ function MobileNavbar({
|
|
|
1669
1735
|
height: 18
|
|
1670
1736
|
}
|
|
1671
1737
|
),
|
|
1672
|
-
/* @__PURE__ */ (0,
|
|
1673
|
-
/* @__PURE__ */ (0,
|
|
1674
|
-
/* @__PURE__ */ (0,
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-4 items-center", children: [
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(notifications_default, { notificationData, notificationHandler }),
|
|
1740
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(user_default2, { userData, onLogout, hubIdChangeHandler, hubDetails, hubIdEnable })
|
|
1675
1741
|
] })
|
|
1676
1742
|
] }),
|
|
1677
|
-
/* @__PURE__ */ (0,
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppSidebar, { data: safeData, router }) })
|
|
1678
1744
|
] });
|
|
1679
1745
|
}
|
|
1680
1746
|
|
|
1681
1747
|
// src/components/custom/navbar/navbar.tsx
|
|
1682
|
-
var
|
|
1748
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1683
1749
|
function Navbar({
|
|
1684
1750
|
navbarData,
|
|
1685
1751
|
userData,
|
|
@@ -1697,7 +1763,7 @@ function Navbar({
|
|
|
1697
1763
|
setMounted(true);
|
|
1698
1764
|
}, []);
|
|
1699
1765
|
if (!mounted) return null;
|
|
1700
|
-
return /* @__PURE__ */ (0,
|
|
1766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "baaz-custom-components-navbar", children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1701
1767
|
MobileNavbar,
|
|
1702
1768
|
{
|
|
1703
1769
|
navbarData,
|
|
@@ -1710,7 +1776,7 @@ function Navbar({
|
|
|
1710
1776
|
hubIdChangeHandler,
|
|
1711
1777
|
notificationHandler
|
|
1712
1778
|
}
|
|
1713
|
-
) : /* @__PURE__ */ (0,
|
|
1779
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1714
1780
|
DesktopNavbar,
|
|
1715
1781
|
{
|
|
1716
1782
|
navbarData,
|
|
@@ -1732,14 +1798,14 @@ var import_lucide_react11 = require("lucide-react");
|
|
|
1732
1798
|
// src/components/ui/breadcrumb.tsx
|
|
1733
1799
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1734
1800
|
var import_lucide_react10 = require("lucide-react");
|
|
1735
|
-
var
|
|
1801
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1736
1802
|
function Breadcrumb(_a) {
|
|
1737
1803
|
var props = __objRest(_a, []);
|
|
1738
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("nav", __spreadValues({ "aria-label": "breadcrumb", "data-slot": "breadcrumb" }, props));
|
|
1739
1805
|
}
|
|
1740
1806
|
function BreadcrumbList(_a) {
|
|
1741
1807
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1742
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1743
1809
|
"ol",
|
|
1744
1810
|
__spreadValues({
|
|
1745
1811
|
"data-slot": "breadcrumb-list",
|
|
@@ -1752,7 +1818,7 @@ function BreadcrumbList(_a) {
|
|
|
1752
1818
|
}
|
|
1753
1819
|
function BreadcrumbItem(_a) {
|
|
1754
1820
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1755
|
-
return /* @__PURE__ */ (0,
|
|
1821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1756
1822
|
"li",
|
|
1757
1823
|
__spreadValues({
|
|
1758
1824
|
"data-slot": "breadcrumb-item",
|
|
@@ -1769,7 +1835,7 @@ function BreadcrumbLink(_a) {
|
|
|
1769
1835
|
"className"
|
|
1770
1836
|
]);
|
|
1771
1837
|
const Comp = asChild ? import_react_slot3.Slot : "a";
|
|
1772
|
-
return /* @__PURE__ */ (0,
|
|
1838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1773
1839
|
Comp,
|
|
1774
1840
|
__spreadValues({
|
|
1775
1841
|
"data-slot": "breadcrumb-link",
|
|
@@ -1785,7 +1851,7 @@ function BreadcrumbSeparator(_a) {
|
|
|
1785
1851
|
"children",
|
|
1786
1852
|
"className"
|
|
1787
1853
|
]);
|
|
1788
|
-
return /* @__PURE__ */ (0,
|
|
1854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1789
1855
|
"li",
|
|
1790
1856
|
__spreadProps(__spreadValues({
|
|
1791
1857
|
"data-slot": "breadcrumb-separator",
|
|
@@ -1793,13 +1859,13 @@ function BreadcrumbSeparator(_a) {
|
|
|
1793
1859
|
"aria-hidden": "true",
|
|
1794
1860
|
className: cn("[&>svg]:size-3.5", className)
|
|
1795
1861
|
}, props), {
|
|
1796
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
1862
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronRight, {})
|
|
1797
1863
|
})
|
|
1798
1864
|
);
|
|
1799
1865
|
}
|
|
1800
1866
|
|
|
1801
1867
|
// src/components/custom/breadcrumb/index.tsx
|
|
1802
|
-
var
|
|
1868
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1803
1869
|
var CustomBreadcrumb = ({
|
|
1804
1870
|
layoutName,
|
|
1805
1871
|
includeFrom = 0,
|
|
@@ -1808,16 +1874,16 @@ var CustomBreadcrumb = ({
|
|
|
1808
1874
|
const completeUrl = pathname.split("/").filter(Boolean);
|
|
1809
1875
|
const urls = pathname.split("/").filter(Boolean).slice(includeFrom);
|
|
1810
1876
|
const activeClassName = "text-primary";
|
|
1811
|
-
return /* @__PURE__ */ (0,
|
|
1812
|
-
/* @__PURE__ */ (0,
|
|
1813
|
-
urls.length > 0 && /* @__PURE__ */ (0,
|
|
1877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Breadcrumb, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(BreadcrumbList, { children: [
|
|
1878
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { className: "text-base", children: capitalizeFirstLetter(layoutName) }) }),
|
|
1879
|
+
urls.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react11.Slash, { className: "!h-md !w-md" }) }),
|
|
1814
1880
|
urls.map((url, index) => {
|
|
1815
1881
|
const href = buildUrl(
|
|
1816
1882
|
completeUrl,
|
|
1817
1883
|
index + includeFrom
|
|
1818
1884
|
);
|
|
1819
|
-
return /* @__PURE__ */ (0,
|
|
1820
|
-
/* @__PURE__ */ (0,
|
|
1885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(BreadcrumbItem, { children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1821
1887
|
BreadcrumbLink,
|
|
1822
1888
|
{
|
|
1823
1889
|
href,
|
|
@@ -1825,7 +1891,7 @@ var CustomBreadcrumb = ({
|
|
|
1825
1891
|
children: capitalizeFirstLetter(url)
|
|
1826
1892
|
}
|
|
1827
1893
|
),
|
|
1828
|
-
index < urls.length - 1 && /* @__PURE__ */ (0,
|
|
1894
|
+
index < urls.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react11.Slash, { className: "!h-md !w-md" }) })
|
|
1829
1895
|
] }, index);
|
|
1830
1896
|
})
|
|
1831
1897
|
] }) });
|