baaz-custom-components 2.0.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +33 -38
- package/dist/index.mjs +33 -38
- package/package.json +23 -9
- package/dist/styles/theme.css +0 -129
package/dist/index.d.mts
CHANGED
|
@@ -18,9 +18,7 @@ interface NavbarProps {
|
|
|
18
18
|
data?: NavbarData;
|
|
19
19
|
userData?: UserData;
|
|
20
20
|
onLogout?: () => void;
|
|
21
|
-
logoSrc?: string;
|
|
22
|
-
avatarSrc?: string;
|
|
23
21
|
}
|
|
24
|
-
declare function Navbar({ data, userData, onLogout
|
|
22
|
+
declare function Navbar({ data, userData, onLogout }: NavbarProps): react.JSX.Element;
|
|
25
23
|
|
|
26
24
|
export { Navbar, type NavbarData, type NavbarMenuItem, type UserData };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,9 +18,7 @@ interface NavbarProps {
|
|
|
18
18
|
data?: NavbarData;
|
|
19
19
|
userData?: UserData;
|
|
20
20
|
onLogout?: () => void;
|
|
21
|
-
logoSrc?: string;
|
|
22
|
-
avatarSrc?: string;
|
|
23
21
|
}
|
|
24
|
-
declare function Navbar({ data, userData, onLogout
|
|
22
|
+
declare function Navbar({ data, userData, onLogout }: NavbarProps): react.JSX.Element;
|
|
25
23
|
|
|
26
24
|
export { Navbar, type NavbarData, type NavbarMenuItem, type UserData };
|
package/dist/index.js
CHANGED
|
@@ -403,27 +403,10 @@ function AvatarImage(_a) {
|
|
|
403
403
|
}, props)
|
|
404
404
|
);
|
|
405
405
|
}
|
|
406
|
-
function AvatarFallback(_a) {
|
|
407
|
-
var _b = _a, {
|
|
408
|
-
className
|
|
409
|
-
} = _b, props = __objRest(_b, [
|
|
410
|
-
"className"
|
|
411
|
-
]);
|
|
412
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
413
|
-
AvatarPrimitive.Fallback,
|
|
414
|
-
__spreadValues({
|
|
415
|
-
"data-slot": "avatar-fallback",
|
|
416
|
-
className: cn(
|
|
417
|
-
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
418
|
-
className
|
|
419
|
-
)
|
|
420
|
-
}, props)
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
406
|
|
|
424
407
|
// src/components/custom/navbar/user.tsx
|
|
425
408
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
426
|
-
var User = ({ userData, onLogout
|
|
409
|
+
var User = ({ userData, onLogout }) => {
|
|
427
410
|
var _a;
|
|
428
411
|
const safeUserData = userData || {
|
|
429
412
|
name: "User",
|
|
@@ -443,7 +426,7 @@ var User = ({ userData, onLogout, avatarSrc }) => {
|
|
|
443
426
|
);
|
|
444
427
|
};
|
|
445
428
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DropdownMenu, { children: [
|
|
446
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Avatar, { children:
|
|
429
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Avatar, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarImage, { src: "/svg/user.svg", alt: "Profile" }) }) }),
|
|
447
430
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuContent, { className: "w-56", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "p-4", children: [
|
|
448
431
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "font-semibold", children: safeUserData.name }),
|
|
449
432
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-primary text-sm", children: safeUserData.role }),
|
|
@@ -475,31 +458,37 @@ var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
|
475
458
|
function DesktopNavbar({
|
|
476
459
|
data,
|
|
477
460
|
userData,
|
|
478
|
-
onLogout
|
|
479
|
-
logoSrc,
|
|
480
|
-
avatarSrc
|
|
461
|
+
onLogout
|
|
481
462
|
}) {
|
|
482
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("nav", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex justify-between px-10 py-2 items-center", children: [
|
|
463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("nav", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex justify-between px-10 py-2 bg-card items-center", children: [
|
|
483
464
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "left flex gap-2", children: [
|
|
484
|
-
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
466
|
+
import_image.default,
|
|
467
|
+
{
|
|
468
|
+
src: "/svg/sidebarIcon.svg",
|
|
469
|
+
alt: "Logo",
|
|
470
|
+
width: 72,
|
|
471
|
+
height: 18
|
|
472
|
+
}
|
|
473
|
+
),
|
|
485
474
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenu, { viewport: false, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(NavigationMenuList, { children: [
|
|
486
475
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(NavigationMenuItem, { children: [
|
|
487
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuTrigger, { className: "hover:bg-modal-bg", children: "Hub Tool" }),
|
|
488
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuContent, { className: "hover:bg-modal-bg", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { children: [
|
|
476
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuTrigger, { className: "bg-card-bg hover:bg-modal-bg", children: "Hub Tool" }),
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuContent, { className: "bg-card-bg hover:bg-modal-bg", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { children: [
|
|
489
478
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Components" }) }),
|
|
490
479
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Documentation" }) })
|
|
491
480
|
] }) }) })
|
|
492
481
|
] }),
|
|
493
482
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(NavigationMenuItem, { children: [
|
|
494
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuTrigger, { className: "hover:bg-modal-bg", children: "Admin" }),
|
|
495
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuContent, { className: "hover:bg-modal-bg", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { children: [
|
|
483
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuTrigger, { className: "bg-card-bg hover:bg-modal-bg", children: "Admin" }),
|
|
484
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuContent, { className: "bg-card-bg hover:bg-modal-bg", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { children: [
|
|
496
485
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Components" }) }),
|
|
497
486
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Documentation" }) })
|
|
498
487
|
] }) }) })
|
|
499
488
|
] })
|
|
500
489
|
] }) })
|
|
501
490
|
] }),
|
|
502
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(user_default, { userData, onLogout
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(user_default, { userData, onLogout })
|
|
503
492
|
] }) });
|
|
504
493
|
}
|
|
505
494
|
|
|
@@ -1167,16 +1156,22 @@ var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
|
1167
1156
|
function MobileNavbar({
|
|
1168
1157
|
data,
|
|
1169
1158
|
userData,
|
|
1170
|
-
onLogout
|
|
1171
|
-
logoSrc,
|
|
1172
|
-
avatarSrc
|
|
1159
|
+
onLogout
|
|
1173
1160
|
}) {
|
|
1174
1161
|
const safeData = data || {};
|
|
1175
1162
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(SidebarProvider, { className: "relative w-full", children: [
|
|
1176
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "fixed top-0 left-0 right-0 z-50 flex 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: [
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.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: [
|
|
1177
1164
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidebarTrigger, {}),
|
|
1178
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_link2.default, { href: "/", children:
|
|
1179
|
-
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_link2.default, { href: "/", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1166
|
+
import_image2.default,
|
|
1167
|
+
{
|
|
1168
|
+
src: "/svg/sidebarIcon.svg",
|
|
1169
|
+
alt: "Logo",
|
|
1170
|
+
width: 72,
|
|
1171
|
+
height: 18
|
|
1172
|
+
}
|
|
1173
|
+
) }),
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(user_default, { userData, onLogout })
|
|
1180
1175
|
] }),
|
|
1181
1176
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppSidebar, { data: safeData }) })
|
|
1182
1177
|
] });
|
|
@@ -1253,13 +1248,13 @@ var defaultUserData = {
|
|
|
1253
1248
|
phone: "9999333399",
|
|
1254
1249
|
location: "India - Delhi"
|
|
1255
1250
|
};
|
|
1256
|
-
function Navbar({ data, userData, onLogout
|
|
1251
|
+
function Navbar({ data, userData, onLogout }) {
|
|
1257
1252
|
const safeData = data || navbarData || {};
|
|
1258
1253
|
const safeUserData = userData || defaultUserData;
|
|
1259
1254
|
const isMobile = useIsMobile();
|
|
1260
1255
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1261
|
-
isMobile && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MobileNavbar, { data: safeData, userData: safeUserData, onLogout
|
|
1262
|
-
isMobile === false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DesktopNavbar, { userData: safeUserData, onLogout
|
|
1256
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MobileNavbar, { data: safeData, userData: safeUserData, onLogout }),
|
|
1257
|
+
isMobile === false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DesktopNavbar, { userData: safeUserData, onLogout })
|
|
1263
1258
|
] });
|
|
1264
1259
|
}
|
|
1265
1260
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -370,27 +370,10 @@ function AvatarImage(_a) {
|
|
|
370
370
|
}, props)
|
|
371
371
|
);
|
|
372
372
|
}
|
|
373
|
-
function AvatarFallback(_a) {
|
|
374
|
-
var _b = _a, {
|
|
375
|
-
className
|
|
376
|
-
} = _b, props = __objRest(_b, [
|
|
377
|
-
"className"
|
|
378
|
-
]);
|
|
379
|
-
return /* @__PURE__ */ jsx5(
|
|
380
|
-
AvatarPrimitive.Fallback,
|
|
381
|
-
__spreadValues({
|
|
382
|
-
"data-slot": "avatar-fallback",
|
|
383
|
-
className: cn(
|
|
384
|
-
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
385
|
-
className
|
|
386
|
-
)
|
|
387
|
-
}, props)
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
373
|
|
|
391
374
|
// src/components/custom/navbar/user.tsx
|
|
392
375
|
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
393
|
-
var User = ({ userData, onLogout
|
|
376
|
+
var User = ({ userData, onLogout }) => {
|
|
394
377
|
var _a;
|
|
395
378
|
const safeUserData = userData || {
|
|
396
379
|
name: "User",
|
|
@@ -410,7 +393,7 @@ var User = ({ userData, onLogout, avatarSrc }) => {
|
|
|
410
393
|
);
|
|
411
394
|
};
|
|
412
395
|
return /* @__PURE__ */ jsxs3(DropdownMenu, { children: [
|
|
413
|
-
/* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(Avatar, { children:
|
|
396
|
+
/* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(Avatar, { children: /* @__PURE__ */ jsx6(AvatarImage, { src: "/svg/user.svg", alt: "Profile" }) }) }),
|
|
414
397
|
/* @__PURE__ */ jsx6(DropdownMenuContent, { className: "w-56", align: "start", children: /* @__PURE__ */ jsxs3("div", { className: "p-4", children: [
|
|
415
398
|
/* @__PURE__ */ jsx6("h1", { className: "font-semibold", children: safeUserData.name }),
|
|
416
399
|
/* @__PURE__ */ jsx6("h3", { className: "text-primary text-sm", children: safeUserData.role }),
|
|
@@ -442,31 +425,37 @@ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
442
425
|
function DesktopNavbar({
|
|
443
426
|
data,
|
|
444
427
|
userData,
|
|
445
|
-
onLogout
|
|
446
|
-
logoSrc,
|
|
447
|
-
avatarSrc
|
|
428
|
+
onLogout
|
|
448
429
|
}) {
|
|
449
|
-
return /* @__PURE__ */ jsx7("nav", { children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between px-10 py-2 items-center", children: [
|
|
430
|
+
return /* @__PURE__ */ jsx7("nav", { children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between px-10 py-2 bg-card items-center", children: [
|
|
450
431
|
/* @__PURE__ */ jsxs4("div", { className: "left flex gap-2", children: [
|
|
451
|
-
|
|
432
|
+
/* @__PURE__ */ jsx7(
|
|
433
|
+
Image2,
|
|
434
|
+
{
|
|
435
|
+
src: "/svg/sidebarIcon.svg",
|
|
436
|
+
alt: "Logo",
|
|
437
|
+
width: 72,
|
|
438
|
+
height: 18
|
|
439
|
+
}
|
|
440
|
+
),
|
|
452
441
|
/* @__PURE__ */ jsx7(NavigationMenu, { viewport: false, children: /* @__PURE__ */ jsxs4(NavigationMenuList, { children: [
|
|
453
442
|
/* @__PURE__ */ jsxs4(NavigationMenuItem, { children: [
|
|
454
|
-
/* @__PURE__ */ jsx7(NavigationMenuTrigger, { className: "hover:bg-modal-bg", children: "Hub Tool" }),
|
|
455
|
-
/* @__PURE__ */ jsx7(NavigationMenuContent, { className: "hover:bg-modal-bg", children: /* @__PURE__ */ jsx7("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ jsxs4("li", { children: [
|
|
443
|
+
/* @__PURE__ */ jsx7(NavigationMenuTrigger, { className: "bg-card-bg hover:bg-modal-bg", children: "Hub Tool" }),
|
|
444
|
+
/* @__PURE__ */ jsx7(NavigationMenuContent, { className: "bg-card-bg hover:bg-modal-bg", children: /* @__PURE__ */ jsx7("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ jsxs4("li", { children: [
|
|
456
445
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Components" }) }),
|
|
457
446
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Documentation" }) })
|
|
458
447
|
] }) }) })
|
|
459
448
|
] }),
|
|
460
449
|
/* @__PURE__ */ jsxs4(NavigationMenuItem, { children: [
|
|
461
|
-
/* @__PURE__ */ jsx7(NavigationMenuTrigger, { className: "hover:bg-modal-bg", children: "Admin" }),
|
|
462
|
-
/* @__PURE__ */ jsx7(NavigationMenuContent, { className: "hover:bg-modal-bg", children: /* @__PURE__ */ jsx7("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ jsxs4("li", { children: [
|
|
450
|
+
/* @__PURE__ */ jsx7(NavigationMenuTrigger, { className: "bg-card-bg hover:bg-modal-bg", children: "Admin" }),
|
|
451
|
+
/* @__PURE__ */ jsx7(NavigationMenuContent, { className: "bg-card-bg hover:bg-modal-bg", children: /* @__PURE__ */ jsx7("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ jsxs4("li", { children: [
|
|
463
452
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Components" }) }),
|
|
464
453
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Documentation" }) })
|
|
465
454
|
] }) }) })
|
|
466
455
|
] })
|
|
467
456
|
] }) })
|
|
468
457
|
] }),
|
|
469
|
-
/* @__PURE__ */ jsx7(user_default, { userData, onLogout
|
|
458
|
+
/* @__PURE__ */ jsx7(user_default, { userData, onLogout })
|
|
470
459
|
] }) });
|
|
471
460
|
}
|
|
472
461
|
|
|
@@ -1134,16 +1123,22 @@ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
|
1134
1123
|
function MobileNavbar({
|
|
1135
1124
|
data,
|
|
1136
1125
|
userData,
|
|
1137
|
-
onLogout
|
|
1138
|
-
logoSrc,
|
|
1139
|
-
avatarSrc
|
|
1126
|
+
onLogout
|
|
1140
1127
|
}) {
|
|
1141
1128
|
const safeData = data || {};
|
|
1142
1129
|
return /* @__PURE__ */ jsxs9(SidebarProvider, { className: "relative w-full", children: [
|
|
1143
|
-
/* @__PURE__ */ jsxs9("header", { className: "fixed top-0 left-0 right-0 z-50 flex 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: [
|
|
1130
|
+
/* @__PURE__ */ jsxs9("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: [
|
|
1144
1131
|
/* @__PURE__ */ jsx14(SidebarTrigger, {}),
|
|
1145
|
-
/* @__PURE__ */ jsx14(Link3, { href: "/", children:
|
|
1146
|
-
|
|
1132
|
+
/* @__PURE__ */ jsx14(Link3, { href: "/", children: /* @__PURE__ */ jsx14(
|
|
1133
|
+
Image3,
|
|
1134
|
+
{
|
|
1135
|
+
src: "/svg/sidebarIcon.svg",
|
|
1136
|
+
alt: "Logo",
|
|
1137
|
+
width: 72,
|
|
1138
|
+
height: 18
|
|
1139
|
+
}
|
|
1140
|
+
) }),
|
|
1141
|
+
/* @__PURE__ */ jsx14(user_default, { userData, onLogout })
|
|
1147
1142
|
] }),
|
|
1148
1143
|
/* @__PURE__ */ jsx14(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ jsx14(AppSidebar, { data: safeData }) })
|
|
1149
1144
|
] });
|
|
@@ -1220,13 +1215,13 @@ var defaultUserData = {
|
|
|
1220
1215
|
phone: "9999333399",
|
|
1221
1216
|
location: "India - Delhi"
|
|
1222
1217
|
};
|
|
1223
|
-
function Navbar({ data, userData, onLogout
|
|
1218
|
+
function Navbar({ data, userData, onLogout }) {
|
|
1224
1219
|
const safeData = data || navbarData || {};
|
|
1225
1220
|
const safeUserData = userData || defaultUserData;
|
|
1226
1221
|
const isMobile = useIsMobile();
|
|
1227
1222
|
return /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
1228
|
-
isMobile && /* @__PURE__ */ jsx15(MobileNavbar, { data: safeData, userData: safeUserData, onLogout
|
|
1229
|
-
isMobile === false && /* @__PURE__ */ jsx15(DesktopNavbar, { userData: safeUserData, onLogout
|
|
1223
|
+
isMobile && /* @__PURE__ */ jsx15(MobileNavbar, { data: safeData, userData: safeUserData, onLogout }),
|
|
1224
|
+
isMobile === false && /* @__PURE__ */ jsx15(DesktopNavbar, { userData: safeUserData, onLogout })
|
|
1230
1225
|
] });
|
|
1231
1226
|
}
|
|
1232
1227
|
export {
|
package/package.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baaz-custom-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"private": false,
|
|
5
|
-
"sideEffects":
|
|
6
|
-
"dist/styles/theme.css"
|
|
7
|
-
],
|
|
5
|
+
"sideEffects": false,
|
|
8
6
|
"main": "dist/index.js",
|
|
9
7
|
"module": "dist/index.mjs",
|
|
10
8
|
"types": "dist/index.d.ts",
|
|
@@ -15,13 +13,11 @@
|
|
|
15
13
|
".": {
|
|
16
14
|
"import": "./dist/index.mjs",
|
|
17
15
|
"types": "./dist/index.d.ts"
|
|
18
|
-
}
|
|
19
|
-
"./styles/theme.css": "./dist/styles/theme.css",
|
|
20
|
-
"./package.json": "./package.json"
|
|
16
|
+
}
|
|
21
17
|
},
|
|
22
18
|
"scripts": {
|
|
23
19
|
"dev": "next dev --turbopack",
|
|
24
|
-
"build": "tsup
|
|
20
|
+
"build": "tsup",
|
|
25
21
|
"start": "next start",
|
|
26
22
|
"lint": "eslint",
|
|
27
23
|
"release": "sh release.sh"
|
|
@@ -29,9 +25,27 @@
|
|
|
29
25
|
"peerDependencies": {
|
|
30
26
|
"next": ">=13.0.0",
|
|
31
27
|
"react": ">=18.0.0",
|
|
32
|
-
"react-dom": ">=18.0.0"
|
|
28
|
+
"react-dom": ">=18.0.0",
|
|
29
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
30
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
31
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
32
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
33
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
34
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
35
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
36
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
37
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
38
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
39
|
+
"class-variance-authority": "^0.7.1",
|
|
40
|
+
"clsx": "^2.1.1",
|
|
41
|
+
"lucide-react": "^0.542.0",
|
|
42
|
+
"tailwind-merge": "^3.3.1",
|
|
43
|
+
"tailwindcss-animate": "^1.0.7"
|
|
33
44
|
},
|
|
34
45
|
"dependencies": {
|
|
46
|
+
"next": ">=13.0.0",
|
|
47
|
+
"react": ">=18.0.0",
|
|
48
|
+
"react-dom": ">=18.0.0",
|
|
35
49
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
36
50
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
37
51
|
"@radix-ui/react-dialog": "^1.1.15",
|
package/dist/styles/theme.css
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
baaz-custom-components theme variables
|
|
3
|
-
Import this once in your app root (layout.tsx/_app.tsx):
|
|
4
|
-
import "baaz-custom-components/dist/styles/theme.css";
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@theme inline {
|
|
8
|
-
--color-background: var(--background);
|
|
9
|
-
--color-foreground: var(--foreground);
|
|
10
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
11
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
12
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
13
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
14
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
15
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
16
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
17
|
-
--color-sidebar: var(--sidebar);
|
|
18
|
-
--color-chart-5: var(--chart-5);
|
|
19
|
-
--color-chart-4: var(--chart-4);
|
|
20
|
-
--color-chart-3: var(--chart-3);
|
|
21
|
-
--color-chart-2: var(--chart-2);
|
|
22
|
-
--color-chart-1: var(--chart-1);
|
|
23
|
-
--color-ring: var(--ring);
|
|
24
|
-
--color-input: var(--input);
|
|
25
|
-
--color-border: var(--border);
|
|
26
|
-
--color-destructive: var(--destructive);
|
|
27
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
28
|
-
--color-accent: var(--accent);
|
|
29
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
30
|
-
--color-muted: var(--muted);
|
|
31
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
32
|
-
--color-secondary: var(--secondary);
|
|
33
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
34
|
-
--color-primary: var(--primary);
|
|
35
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
36
|
-
--color-popover: var(--popover);
|
|
37
|
-
--color-card-foreground: var(--card-foreground);
|
|
38
|
-
--color-card: var(--card);
|
|
39
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
40
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
41
|
-
--radius-lg: var(--radius);
|
|
42
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:root {
|
|
46
|
-
--radius: 0.625rem;
|
|
47
|
-
|
|
48
|
-
--background: oklch(0.2758 0.0182 262.2); /* --screen-bg */
|
|
49
|
-
--card: oklch(0.3378 0.0223 256.39); /* --card-bg */
|
|
50
|
-
--card-foreground: oklch(0.3906 0.033 257.09); /* --modal-bg */
|
|
51
|
-
--popover: oklch(0.3906 0.033 257.09); /* --modal-bg */
|
|
52
|
-
--popover-foreground: oklch(0.9851 0 0); /* --text-color */
|
|
53
|
-
|
|
54
|
-
--foreground: oklch(0.9851 0 0); /* --text-color */
|
|
55
|
-
|
|
56
|
-
--primary: oklch(0.6437 0.1913 274.74); /* --primary-bg */
|
|
57
|
-
--primary-foreground: oklch(0.9851 0 0); /* --text-color */
|
|
58
|
-
|
|
59
|
-
--secondary: oklch(0.6437 0.1913 274.74);
|
|
60
|
-
--secondary-foreground: oklch(0.9851 0 0);
|
|
61
|
-
--muted: oklch(0.6437 0.1913 274.74);
|
|
62
|
-
--muted-foreground: oklch(0.9851 0 0);
|
|
63
|
-
--accent: oklch(0.6437 0.1913 274.74);
|
|
64
|
-
--accent-foreground: oklch(0.9851 0 0);
|
|
65
|
-
|
|
66
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
67
|
-
|
|
68
|
-
--border: oklch(0.4448 0.0409 263.25); /* --stroke-color */
|
|
69
|
-
--input: oklch(0.4448 0.0409 263.25); /* --stroke-color */
|
|
70
|
-
--ring: oklch(0.7122 0 0); /* --stroke-color2 */
|
|
71
|
-
|
|
72
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
73
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
74
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
75
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
76
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
77
|
-
|
|
78
|
-
--sidebar: oklch(0.3378 0.0223 256.39); /* card-bg */
|
|
79
|
-
--sidebar-foreground: oklch(0.9851 0 0); /* text-color */
|
|
80
|
-
--sidebar-primary: oklch(0.6437 0.1913 274.74); /* primary-bg */
|
|
81
|
-
--sidebar-primary-foreground: oklch(0.9851 0 0);
|
|
82
|
-
--sidebar-accent: oklch(0.6437 0.1913 274.74);
|
|
83
|
-
--sidebar-accent-foreground: oklch(0.9851 0 0);
|
|
84
|
-
--sidebar-border: oklch(0.4448 0.0409 263.25); /* stroke-color */
|
|
85
|
-
--sidebar-ring: oklch(0.7122 0 0); /* stroke-color2 */
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.dark {
|
|
89
|
-
--radius: 0.625rem;
|
|
90
|
-
|
|
91
|
-
--background: oklch(0.2758 0.0182 262.2); /* --screen-bg */
|
|
92
|
-
--card: oklch(0.3378 0.0223 256.39); /* --card-bg */
|
|
93
|
-
--card-foreground: oklch(0.3906 0.033 257.09); /* --modal-bg */
|
|
94
|
-
--popover: oklch(0.3906 0.033 257.09); /* --modal-bg */
|
|
95
|
-
--popover-foreground: oklch(0.9851 0 0); /* --text-color */
|
|
96
|
-
|
|
97
|
-
--foreground: oklch(0.9851 0 0); /* --text-color */
|
|
98
|
-
|
|
99
|
-
--primary: oklch(0.6437 0.1913 274.74); /* --primary-bg */
|
|
100
|
-
--primary-foreground: oklch(0.9851 0 0); /* --text-color */
|
|
101
|
-
|
|
102
|
-
--secondary: oklch(0.6437 0.1913 274.74);
|
|
103
|
-
--secondary-foreground: oklch(0.9851 0 0);
|
|
104
|
-
--muted: oklch(0.6437 0.1913 274.74);
|
|
105
|
-
--muted-foreground: oklch(0.9851 0 0);
|
|
106
|
-
--accent: oklch(0.6437 0.1913 274.74);
|
|
107
|
-
--accent-foreground: oklch(0.9851 0 0);
|
|
108
|
-
|
|
109
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
110
|
-
|
|
111
|
-
--border: oklch(0.4448 0.0409 263.25); /* --stroke-color */
|
|
112
|
-
--input: oklch(0.4448 0.0409 263.25); /* --stroke-color */
|
|
113
|
-
--ring: oklch(0.7122 0 0); /* --stroke-color2 */
|
|
114
|
-
|
|
115
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
116
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
117
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
118
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
119
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
120
|
-
|
|
121
|
-
--sidebar: oklch(0.3378 0.0223 256.39); /* card-bg */
|
|
122
|
-
--sidebar-foreground: oklch(0.9851 0 0); /* text-color */
|
|
123
|
-
--sidebar-primary: oklch(0.6437 0.1913 274.74); /* primary-bg */
|
|
124
|
-
--sidebar-primary-foreground: oklch(0.9851 0 0);
|
|
125
|
-
--sidebar-accent: oklch(0.6437 0.1913 274.74);
|
|
126
|
-
--sidebar-accent-foreground: oklch(0.9851 0 0);
|
|
127
|
-
--sidebar-border: oklch(0.4448 0.0409 263.25); /* stroke-color */
|
|
128
|
-
--sidebar-ring: oklch(0.7122 0 0); /* stroke-color2 */
|
|
129
|
-
}
|