baaz-custom-components 2.0.0 → 2.0.3
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +38 -33
- package/dist/index.mjs +38 -33
- package/dist/styles/theme.css +129 -0
- package/package.json +8 -4
package/dist/index.d.mts
CHANGED
|
@@ -18,7 +18,9 @@ interface NavbarProps {
|
|
|
18
18
|
data?: NavbarData;
|
|
19
19
|
userData?: UserData;
|
|
20
20
|
onLogout?: () => void;
|
|
21
|
+
logoSrc?: string;
|
|
22
|
+
avatarSrc?: string;
|
|
21
23
|
}
|
|
22
|
-
declare function Navbar({ data, userData, onLogout }: NavbarProps): react.JSX.Element;
|
|
24
|
+
declare function Navbar({ data, userData, onLogout, logoSrc, avatarSrc }: NavbarProps): react.JSX.Element;
|
|
23
25
|
|
|
24
26
|
export { Navbar, type NavbarData, type NavbarMenuItem, type UserData };
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ interface NavbarProps {
|
|
|
18
18
|
data?: NavbarData;
|
|
19
19
|
userData?: UserData;
|
|
20
20
|
onLogout?: () => void;
|
|
21
|
+
logoSrc?: string;
|
|
22
|
+
avatarSrc?: string;
|
|
21
23
|
}
|
|
22
|
-
declare function Navbar({ data, userData, onLogout }: NavbarProps): react.JSX.Element;
|
|
24
|
+
declare function Navbar({ data, userData, onLogout, logoSrc, avatarSrc }: NavbarProps): react.JSX.Element;
|
|
23
25
|
|
|
24
26
|
export { Navbar, type NavbarData, type NavbarMenuItem, type UserData };
|
package/dist/index.js
CHANGED
|
@@ -403,10 +403,27 @@ 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
|
+
}
|
|
406
423
|
|
|
407
424
|
// src/components/custom/navbar/user.tsx
|
|
408
425
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
409
|
-
var User = ({ userData, onLogout }) => {
|
|
426
|
+
var User = ({ userData, onLogout, avatarSrc }) => {
|
|
410
427
|
var _a;
|
|
411
428
|
const safeUserData = userData || {
|
|
412
429
|
name: "User",
|
|
@@ -426,7 +443,7 @@ var User = ({ userData, onLogout }) => {
|
|
|
426
443
|
);
|
|
427
444
|
};
|
|
428
445
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DropdownMenu, { 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:
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Avatar, { children: avatarSrc ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarImage, { src: avatarSrc, alt: "Profile" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFallback, { children: "U" }) }) }),
|
|
430
447
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DropdownMenuContent, { className: "w-56", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "p-4", children: [
|
|
431
448
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "font-semibold", children: safeUserData.name }),
|
|
432
449
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-primary text-sm", children: safeUserData.role }),
|
|
@@ -458,37 +475,31 @@ var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
|
458
475
|
function DesktopNavbar({
|
|
459
476
|
data,
|
|
460
477
|
userData,
|
|
461
|
-
onLogout
|
|
478
|
+
onLogout,
|
|
479
|
+
logoSrc,
|
|
480
|
+
avatarSrc
|
|
462
481
|
}) {
|
|
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
|
|
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: [
|
|
464
483
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "left flex gap-2", children: [
|
|
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
|
-
),
|
|
484
|
+
logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_image.default, { src: logoSrc, alt: "Logo", width: 72, height: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "text-primary font-semibold", children: "Logo" }),
|
|
474
485
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenu, { viewport: false, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(NavigationMenuList, { children: [
|
|
475
486
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(NavigationMenuItem, { children: [
|
|
476
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuTrigger, { className: "
|
|
477
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuContent, { className: "
|
|
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: [
|
|
478
489
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Components" }) }),
|
|
479
490
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Documentation" }) })
|
|
480
491
|
] }) }) })
|
|
481
492
|
] }),
|
|
482
493
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(NavigationMenuItem, { children: [
|
|
483
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuTrigger, { className: "
|
|
484
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuContent, { className: "
|
|
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: [
|
|
485
496
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Components" }) }),
|
|
486
497
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_link.default, { href: "#", children: "Documentation" }) })
|
|
487
498
|
] }) }) })
|
|
488
499
|
] })
|
|
489
500
|
] }) })
|
|
490
501
|
] }),
|
|
491
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(user_default, { userData, onLogout })
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(user_default, { userData, onLogout, avatarSrc })
|
|
492
503
|
] }) });
|
|
493
504
|
}
|
|
494
505
|
|
|
@@ -1156,22 +1167,16 @@ var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
|
1156
1167
|
function MobileNavbar({
|
|
1157
1168
|
data,
|
|
1158
1169
|
userData,
|
|
1159
|
-
onLogout
|
|
1170
|
+
onLogout,
|
|
1171
|
+
logoSrc,
|
|
1172
|
+
avatarSrc
|
|
1160
1173
|
}) {
|
|
1161
1174
|
const safeData = data || {};
|
|
1162
1175
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(SidebarProvider, { className: "relative w-full", children: [
|
|
1163
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "fixed top-0 left-0 right-0 z-50 flex
|
|
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: [
|
|
1164
1177
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidebarTrigger, {}),
|
|
1165
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_link2.default, { href: "/", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1166
|
-
|
|
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 })
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_link2.default, { href: "/", children: logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_image2.default, { src: logoSrc, alt: "Logo", width: 72, height: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "text-primary font-semibold", children: "Logo" }) }),
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(user_default, { userData, onLogout, avatarSrc })
|
|
1175
1180
|
] }),
|
|
1176
1181
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppSidebar, { data: safeData }) })
|
|
1177
1182
|
] });
|
|
@@ -1248,13 +1253,13 @@ var defaultUserData = {
|
|
|
1248
1253
|
phone: "9999333399",
|
|
1249
1254
|
location: "India - Delhi"
|
|
1250
1255
|
};
|
|
1251
|
-
function Navbar({ data, userData, onLogout }) {
|
|
1256
|
+
function Navbar({ data, userData, onLogout, logoSrc, avatarSrc }) {
|
|
1252
1257
|
const safeData = data || navbarData || {};
|
|
1253
1258
|
const safeUserData = userData || defaultUserData;
|
|
1254
1259
|
const isMobile = useIsMobile();
|
|
1255
1260
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
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 })
|
|
1261
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MobileNavbar, { data: safeData, userData: safeUserData, onLogout, logoSrc, avatarSrc }),
|
|
1262
|
+
isMobile === false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DesktopNavbar, { userData: safeUserData, onLogout, logoSrc, avatarSrc })
|
|
1258
1263
|
] });
|
|
1259
1264
|
}
|
|
1260
1265
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -370,10 +370,27 @@ 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
|
+
}
|
|
373
390
|
|
|
374
391
|
// src/components/custom/navbar/user.tsx
|
|
375
392
|
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
376
|
-
var User = ({ userData, onLogout }) => {
|
|
393
|
+
var User = ({ userData, onLogout, avatarSrc }) => {
|
|
377
394
|
var _a;
|
|
378
395
|
const safeUserData = userData || {
|
|
379
396
|
name: "User",
|
|
@@ -393,7 +410,7 @@ var User = ({ userData, onLogout }) => {
|
|
|
393
410
|
);
|
|
394
411
|
};
|
|
395
412
|
return /* @__PURE__ */ jsxs3(DropdownMenu, { children: [
|
|
396
|
-
/* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(Avatar, { children: /* @__PURE__ */ jsx6(AvatarImage, { src:
|
|
413
|
+
/* @__PURE__ */ jsx6(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx6(Avatar, { children: avatarSrc ? /* @__PURE__ */ jsx6(AvatarImage, { src: avatarSrc, alt: "Profile" }) : /* @__PURE__ */ jsx6(AvatarFallback, { children: "U" }) }) }),
|
|
397
414
|
/* @__PURE__ */ jsx6(DropdownMenuContent, { className: "w-56", align: "start", children: /* @__PURE__ */ jsxs3("div", { className: "p-4", children: [
|
|
398
415
|
/* @__PURE__ */ jsx6("h1", { className: "font-semibold", children: safeUserData.name }),
|
|
399
416
|
/* @__PURE__ */ jsx6("h3", { className: "text-primary text-sm", children: safeUserData.role }),
|
|
@@ -425,37 +442,31 @@ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
425
442
|
function DesktopNavbar({
|
|
426
443
|
data,
|
|
427
444
|
userData,
|
|
428
|
-
onLogout
|
|
445
|
+
onLogout,
|
|
446
|
+
logoSrc,
|
|
447
|
+
avatarSrc
|
|
429
448
|
}) {
|
|
430
|
-
return /* @__PURE__ */ jsx7("nav", { children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between px-10 py-2
|
|
449
|
+
return /* @__PURE__ */ jsx7("nav", { children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between px-10 py-2 items-center", children: [
|
|
431
450
|
/* @__PURE__ */ jsxs4("div", { className: "left flex gap-2", children: [
|
|
432
|
-
/* @__PURE__ */ jsx7(
|
|
433
|
-
Image2,
|
|
434
|
-
{
|
|
435
|
-
src: "/svg/sidebarIcon.svg",
|
|
436
|
-
alt: "Logo",
|
|
437
|
-
width: 72,
|
|
438
|
-
height: 18
|
|
439
|
-
}
|
|
440
|
-
),
|
|
451
|
+
logoSrc ? /* @__PURE__ */ jsx7(Image2, { src: logoSrc, alt: "Logo", width: 72, height: 18 }) : /* @__PURE__ */ jsx7("div", { className: "text-primary font-semibold", children: "Logo" }),
|
|
441
452
|
/* @__PURE__ */ jsx7(NavigationMenu, { viewport: false, children: /* @__PURE__ */ jsxs4(NavigationMenuList, { children: [
|
|
442
453
|
/* @__PURE__ */ jsxs4(NavigationMenuItem, { children: [
|
|
443
|
-
/* @__PURE__ */ jsx7(NavigationMenuTrigger, { className: "
|
|
444
|
-
/* @__PURE__ */ jsx7(NavigationMenuContent, { className: "
|
|
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: [
|
|
445
456
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Components" }) }),
|
|
446
457
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Documentation" }) })
|
|
447
458
|
] }) }) })
|
|
448
459
|
] }),
|
|
449
460
|
/* @__PURE__ */ jsxs4(NavigationMenuItem, { children: [
|
|
450
|
-
/* @__PURE__ */ jsx7(NavigationMenuTrigger, { className: "
|
|
451
|
-
/* @__PURE__ */ jsx7(NavigationMenuContent, { className: "
|
|
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: [
|
|
452
463
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Components" }) }),
|
|
453
464
|
/* @__PURE__ */ jsx7(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx7(Link2, { href: "#", children: "Documentation" }) })
|
|
454
465
|
] }) }) })
|
|
455
466
|
] })
|
|
456
467
|
] }) })
|
|
457
468
|
] }),
|
|
458
|
-
/* @__PURE__ */ jsx7(user_default, { userData, onLogout })
|
|
469
|
+
/* @__PURE__ */ jsx7(user_default, { userData, onLogout, avatarSrc })
|
|
459
470
|
] }) });
|
|
460
471
|
}
|
|
461
472
|
|
|
@@ -1123,22 +1134,16 @@ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
|
1123
1134
|
function MobileNavbar({
|
|
1124
1135
|
data,
|
|
1125
1136
|
userData,
|
|
1126
|
-
onLogout
|
|
1137
|
+
onLogout,
|
|
1138
|
+
logoSrc,
|
|
1139
|
+
avatarSrc
|
|
1127
1140
|
}) {
|
|
1128
1141
|
const safeData = data || {};
|
|
1129
1142
|
return /* @__PURE__ */ jsxs9(SidebarProvider, { className: "relative w-full", children: [
|
|
1130
|
-
/* @__PURE__ */ jsxs9("header", { className: "fixed top-0 left-0 right-0 z-50 flex
|
|
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: [
|
|
1131
1144
|
/* @__PURE__ */ jsx14(SidebarTrigger, {}),
|
|
1132
|
-
/* @__PURE__ */ jsx14(Link3, { href: "/", children: /* @__PURE__ */ jsx14(
|
|
1133
|
-
|
|
1134
|
-
{
|
|
1135
|
-
src: "/svg/sidebarIcon.svg",
|
|
1136
|
-
alt: "Logo",
|
|
1137
|
-
width: 72,
|
|
1138
|
-
height: 18
|
|
1139
|
-
}
|
|
1140
|
-
) }),
|
|
1141
|
-
/* @__PURE__ */ jsx14(user_default, { userData, onLogout })
|
|
1145
|
+
/* @__PURE__ */ jsx14(Link3, { href: "/", children: logoSrc ? /* @__PURE__ */ jsx14(Image3, { src: logoSrc, alt: "Logo", width: 72, height: 18 }) : /* @__PURE__ */ jsx14("div", { className: "text-primary font-semibold", children: "Logo" }) }),
|
|
1146
|
+
/* @__PURE__ */ jsx14(user_default, { userData, onLogout, avatarSrc })
|
|
1142
1147
|
] }),
|
|
1143
1148
|
/* @__PURE__ */ jsx14(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ jsx14(AppSidebar, { data: safeData }) })
|
|
1144
1149
|
] });
|
|
@@ -1215,13 +1220,13 @@ var defaultUserData = {
|
|
|
1215
1220
|
phone: "9999333399",
|
|
1216
1221
|
location: "India - Delhi"
|
|
1217
1222
|
};
|
|
1218
|
-
function Navbar({ data, userData, onLogout }) {
|
|
1223
|
+
function Navbar({ data, userData, onLogout, logoSrc, avatarSrc }) {
|
|
1219
1224
|
const safeData = data || navbarData || {};
|
|
1220
1225
|
const safeUserData = userData || defaultUserData;
|
|
1221
1226
|
const isMobile = useIsMobile();
|
|
1222
1227
|
return /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
1223
|
-
isMobile && /* @__PURE__ */ jsx15(MobileNavbar, { data: safeData, userData: safeUserData, onLogout }),
|
|
1224
|
-
isMobile === false && /* @__PURE__ */ jsx15(DesktopNavbar, { userData: safeUserData, onLogout })
|
|
1228
|
+
isMobile && /* @__PURE__ */ jsx15(MobileNavbar, { data: safeData, userData: safeUserData, onLogout, logoSrc, avatarSrc }),
|
|
1229
|
+
isMobile === false && /* @__PURE__ */ jsx15(DesktopNavbar, { userData: safeUserData, onLogout, logoSrc, avatarSrc })
|
|
1225
1230
|
] });
|
|
1226
1231
|
}
|
|
1227
1232
|
export {
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baaz-custom-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"private": false,
|
|
5
|
-
"sideEffects":
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"dist/styles/theme.css"
|
|
7
|
+
],
|
|
6
8
|
"main": "dist/index.js",
|
|
7
9
|
"module": "dist/index.mjs",
|
|
8
10
|
"types": "dist/index.d.ts",
|
|
@@ -13,11 +15,13 @@
|
|
|
13
15
|
".": {
|
|
14
16
|
"import": "./dist/index.mjs",
|
|
15
17
|
"types": "./dist/index.d.ts"
|
|
16
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"./styles/theme.css": "./dist/styles/theme.css",
|
|
20
|
+
"./package.json": "./package.json"
|
|
17
21
|
},
|
|
18
22
|
"scripts": {
|
|
19
23
|
"dev": "next dev --turbopack",
|
|
20
|
-
"build": "tsup",
|
|
24
|
+
"build": "tsup && node scripts/copy-styles.cjs",
|
|
21
25
|
"start": "next start",
|
|
22
26
|
"lint": "eslint",
|
|
23
27
|
"release": "sh release.sh"
|