baaz-custom-components 3.0.6 → 3.0.8
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/assets/images/baazLogo.png +0 -0
- package/dist/assets/svg/confirmGreen.svg +0 -0
- package/dist/assets/svg/confirmRed.svg +5 -0
- package/dist/assets/svg/delete.svg +8 -0
- package/dist/assets/svg/mainIcon.svg +9 -0
- package/dist/assets/svg/sidebarIcon.svg +5 -0
- package/dist/assets/svg/upload.svg +4 -0
- package/dist/assets/svg/user.svg +11 -0
- package/dist/index.js +117 -141
- package/dist/index.mjs +100 -124
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -217,6 +217,9 @@ function NavigationMenuLink(_a) {
|
|
|
217
217
|
// src/components/custom/navbar/desktopNavbar.tsx
|
|
218
218
|
import Image2 from "next/image";
|
|
219
219
|
|
|
220
|
+
// src/components/custom/navbar/user.tsx
|
|
221
|
+
import Image from "next/image";
|
|
222
|
+
|
|
220
223
|
// src/components/ui/dropdown-menu.tsx
|
|
221
224
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
222
225
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
@@ -336,43 +339,11 @@ function Button(_a) {
|
|
|
336
339
|
);
|
|
337
340
|
}
|
|
338
341
|
|
|
339
|
-
// src/
|
|
340
|
-
|
|
341
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
342
|
-
function Avatar(_a) {
|
|
343
|
-
var _b = _a, {
|
|
344
|
-
className
|
|
345
|
-
} = _b, props = __objRest(_b, [
|
|
346
|
-
"className"
|
|
347
|
-
]);
|
|
348
|
-
return /* @__PURE__ */ jsx5(
|
|
349
|
-
AvatarPrimitive.Root,
|
|
350
|
-
__spreadValues({
|
|
351
|
-
"data-slot": "avatar",
|
|
352
|
-
className: cn(
|
|
353
|
-
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
354
|
-
className
|
|
355
|
-
)
|
|
356
|
-
}, props)
|
|
357
|
-
);
|
|
358
|
-
}
|
|
359
|
-
function AvatarImage(_a) {
|
|
360
|
-
var _b = _a, {
|
|
361
|
-
className
|
|
362
|
-
} = _b, props = __objRest(_b, [
|
|
363
|
-
"className"
|
|
364
|
-
]);
|
|
365
|
-
return /* @__PURE__ */ jsx5(
|
|
366
|
-
AvatarPrimitive.Image,
|
|
367
|
-
__spreadValues({
|
|
368
|
-
"data-slot": "avatar-image",
|
|
369
|
-
className: cn("aspect-square size-full", className)
|
|
370
|
-
}, props)
|
|
371
|
-
);
|
|
372
|
-
}
|
|
342
|
+
// src/assets/svg/user.svg
|
|
343
|
+
var user_default = 'data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g clip-path="url(%23clip0_3747_24298)">%0A<circle cx="12" cy="12" r="12" fill="%2348546B"/>%0A<path d="M7.5 9.5C7.5 11.981 9.519 14 12 14C14.481 14 16.5 11.981 16.5 9.5C16.5 7.019 14.481 5 12 5C9.519 5 7.5 7.019 7.5 9.5ZM20 24H21V23C21 19.141 17.859 16 14 16H10C6.14 16 3 19.141 3 23V24H20Z" fill="%236E7DFF"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_3747_24298">%0A<rect width="24" height="24" rx="12" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';
|
|
373
344
|
|
|
374
345
|
// src/components/custom/navbar/user.tsx
|
|
375
|
-
import { jsx as
|
|
346
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
376
347
|
var User = ({ userData, onLogout }) => {
|
|
377
348
|
var _a;
|
|
378
349
|
const safeUserData = userData || {
|
|
@@ -393,11 +364,11 @@ var User = ({ userData, onLogout }) => {
|
|
|
393
364
|
);
|
|
394
365
|
};
|
|
395
366
|
return /* @__PURE__ */ jsxs3(DropdownMenu, { children: [
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ jsx5(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx5(Image, { src: user_default, alt: "Profile", width: 32, height: 32 }) }),
|
|
368
|
+
/* @__PURE__ */ jsx5(DropdownMenuContent, { className: "w-56", align: "start", children: /* @__PURE__ */ jsxs3("div", { className: "p-4", children: [
|
|
369
|
+
/* @__PURE__ */ jsx5("h1", { className: "font-semibold", children: safeUserData.name }),
|
|
370
|
+
/* @__PURE__ */ jsx5("h3", { className: "text-primary text-sm", children: safeUserData.role }),
|
|
371
|
+
/* @__PURE__ */ jsx5(Separator2, { className: "my-4" }),
|
|
401
372
|
(_a = [
|
|
402
373
|
{ icon: Mail, text: safeUserData.email },
|
|
403
374
|
{ icon: Phone, text: safeUserData.phone },
|
|
@@ -407,58 +378,65 @@ var User = ({ userData, onLogout }) => {
|
|
|
407
378
|
{
|
|
408
379
|
className: "flex items-center gap-2 text-sm py-1",
|
|
409
380
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ jsx5(Icon, { size: 12 }),
|
|
411
382
|
" ",
|
|
412
383
|
text
|
|
413
384
|
]
|
|
414
385
|
},
|
|
415
386
|
i
|
|
416
387
|
)),
|
|
417
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ jsx5(Button, { className: "w-full mt-4", onClick: handleLogout, children: "Logout" })
|
|
418
389
|
] }) })
|
|
419
390
|
] });
|
|
420
391
|
};
|
|
421
|
-
var
|
|
392
|
+
var user_default2 = User;
|
|
393
|
+
|
|
394
|
+
// src/assets/svg/sidebarIcon.svg
|
|
395
|
+
var sidebarIcon_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="13" viewBox="0 0 48 13" fill="none">%0A <path d="M23.9953 12.5C27.3257 12.5 30.0255 9.81371 30.0255 6.5C30.0255 3.18629 27.3257 0.5 23.9953 0.5C20.6649 0.5 17.9651 3.18629 17.9651 6.5C17.9651 9.81371 20.6649 12.5 23.9953 12.5Z" fill="%23F7941D"/>%0A <path d="M15.2876 6.49978C15.2876 7.27496 15.3922 8.0248 15.584 8.73994C15.592 8.76796 15.5665 8.79331 15.5384 8.7853C10.428 7.39104 5.31906 5.99678 0.210065 4.60385C-0.11042 4.51579 -0.0473957 4.04614 0.285158 4.04614H15.5866C15.6135 4.04614 15.6296 4.06749 15.6229 4.09417C15.4432 4.74528 15.3654 5.28297 15.3292 5.65655C15.2903 6.05815 15.2876 6.38637 15.2876 6.49844V6.49978Z" fill="white"/>%0A <path d="M32.7098 6.49953C32.7098 7.27472 32.6052 8.02455 32.4135 8.7397C32.4054 8.76771 32.4309 8.79306 32.459 8.78506C37.568 7.39079 42.6784 5.99653 47.7874 4.6036C48.1078 4.51554 48.0448 4.0459 47.7123 4.0459H32.4108C32.384 4.0459 32.3679 4.06725 32.3746 4.09393C32.5543 4.74503 32.632 5.28272 32.6682 5.65631C32.7071 6.05791 32.7098 6.38613 32.7098 6.4982V6.49953Z" fill="white"/>%0A</svg>';
|
|
422
396
|
|
|
423
397
|
// src/components/custom/navbar/desktopNavbar.tsx
|
|
424
|
-
import { jsx as
|
|
398
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
425
399
|
function DesktopNavbar({
|
|
426
400
|
navbarData,
|
|
427
401
|
userData,
|
|
428
402
|
onLogout
|
|
429
403
|
}) {
|
|
430
|
-
return /* @__PURE__ */
|
|
404
|
+
return /* @__PURE__ */ jsx6("nav", { children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between px-10 py-2 bg-card items-center", children: [
|
|
431
405
|
/* @__PURE__ */ jsxs4("div", { className: "left flex gap-2", children: [
|
|
432
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ jsx6(
|
|
433
407
|
Image2,
|
|
434
408
|
{
|
|
435
|
-
src:
|
|
409
|
+
src: sidebarIcon_default,
|
|
436
410
|
alt: "Logo",
|
|
437
411
|
width: 72,
|
|
438
412
|
height: 18
|
|
439
413
|
}
|
|
440
414
|
),
|
|
441
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ jsx6(NavigationMenu, { viewport: false, children: /* @__PURE__ */ jsxs4(NavigationMenuList, { children: [
|
|
442
416
|
/* @__PURE__ */ jsxs4(NavigationMenuItem, { children: [
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ jsx6(NavigationMenuTrigger, { className: "bg-card-bg hover:bg-modal-bg", children: "Hub Tool" }),
|
|
418
|
+
/* @__PURE__ */ jsx6(NavigationMenuContent, { className: "bg-card-bg hover:bg-modal-bg", children: /* @__PURE__ */ jsx6("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ jsxs4("li", { children: [
|
|
419
|
+
/* @__PURE__ */ jsx6(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx6(Link2, { href: "#", children: "Components" }) }),
|
|
420
|
+
/* @__PURE__ */ jsx6(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx6(Link2, { href: "#", children: "Documentation" }) })
|
|
447
421
|
] }) }) })
|
|
448
422
|
] }),
|
|
449
423
|
/* @__PURE__ */ jsxs4(NavigationMenuItem, { children: [
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ jsx6(NavigationMenuTrigger, { className: "bg-card-bg hover:bg-modal-bg", children: "Admin" }),
|
|
425
|
+
/* @__PURE__ */ jsx6(NavigationMenuContent, { className: "bg-card-bg hover:bg-modal-bg", children: /* @__PURE__ */ jsx6("ul", { className: "grid w-[200px] gap-4", children: /* @__PURE__ */ jsxs4("li", { children: [
|
|
426
|
+
/* @__PURE__ */ jsx6(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx6(Link2, { href: "#", children: "Components" }) }),
|
|
427
|
+
/* @__PURE__ */ jsx6(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx6(Link2, { href: "#", children: "Documentation" }) })
|
|
454
428
|
] }) }) })
|
|
455
429
|
] })
|
|
456
430
|
] }) })
|
|
457
431
|
] }),
|
|
458
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ jsx6(user_default2, { userData, onLogout })
|
|
459
433
|
] }) });
|
|
460
434
|
}
|
|
461
435
|
|
|
436
|
+
// src/components/custom/navbar/mobileNavbar.tsx
|
|
437
|
+
import Link3 from "next/link";
|
|
438
|
+
import Image3 from "next/image";
|
|
439
|
+
|
|
462
440
|
// src/components/ui/sidebar.tsx
|
|
463
441
|
import * as React2 from "react";
|
|
464
442
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
@@ -468,14 +446,14 @@ import { Menu, X } from "lucide-react";
|
|
|
468
446
|
// src/components/ui/sheet.tsx
|
|
469
447
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
470
448
|
import { XIcon } from "lucide-react";
|
|
471
|
-
import { jsx as
|
|
449
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
472
450
|
function Sheet(_a) {
|
|
473
451
|
var props = __objRest(_a, []);
|
|
474
|
-
return /* @__PURE__ */
|
|
452
|
+
return /* @__PURE__ */ jsx7(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
475
453
|
}
|
|
476
454
|
function SheetPortal(_a) {
|
|
477
455
|
var props = __objRest(_a, []);
|
|
478
|
-
return /* @__PURE__ */
|
|
456
|
+
return /* @__PURE__ */ jsx7(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
479
457
|
}
|
|
480
458
|
function SheetOverlay(_a) {
|
|
481
459
|
var _b = _a, {
|
|
@@ -483,7 +461,7 @@ function SheetOverlay(_a) {
|
|
|
483
461
|
} = _b, props = __objRest(_b, [
|
|
484
462
|
"className"
|
|
485
463
|
]);
|
|
486
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ jsx7(
|
|
487
465
|
SheetPrimitive.Overlay,
|
|
488
466
|
__spreadValues({
|
|
489
467
|
"data-slot": "sheet-overlay",
|
|
@@ -505,7 +483,7 @@ function SheetContent(_a) {
|
|
|
505
483
|
"side"
|
|
506
484
|
]);
|
|
507
485
|
return /* @__PURE__ */ jsxs5(SheetPortal, { children: [
|
|
508
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ jsx7(SheetOverlay, {}),
|
|
509
487
|
/* @__PURE__ */ jsxs5(
|
|
510
488
|
SheetPrimitive.Content,
|
|
511
489
|
__spreadProps(__spreadValues({
|
|
@@ -522,8 +500,8 @@ function SheetContent(_a) {
|
|
|
522
500
|
children: [
|
|
523
501
|
children,
|
|
524
502
|
/* @__PURE__ */ jsxs5(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: [
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ jsx7(XIcon, { className: "size-4" }),
|
|
504
|
+
/* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Close" })
|
|
527
505
|
] })
|
|
528
506
|
]
|
|
529
507
|
})
|
|
@@ -532,7 +510,7 @@ function SheetContent(_a) {
|
|
|
532
510
|
}
|
|
533
511
|
function SheetHeader(_a) {
|
|
534
512
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
535
|
-
return /* @__PURE__ */
|
|
513
|
+
return /* @__PURE__ */ jsx7(
|
|
536
514
|
"div",
|
|
537
515
|
__spreadValues({
|
|
538
516
|
"data-slot": "sheet-header",
|
|
@@ -546,7 +524,7 @@ function SheetTitle(_a) {
|
|
|
546
524
|
} = _b, props = __objRest(_b, [
|
|
547
525
|
"className"
|
|
548
526
|
]);
|
|
549
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ jsx7(
|
|
550
528
|
SheetPrimitive.Title,
|
|
551
529
|
__spreadValues({
|
|
552
530
|
"data-slot": "sheet-title",
|
|
@@ -560,7 +538,7 @@ function SheetDescription(_a) {
|
|
|
560
538
|
} = _b, props = __objRest(_b, [
|
|
561
539
|
"className"
|
|
562
540
|
]);
|
|
563
|
-
return /* @__PURE__ */
|
|
541
|
+
return /* @__PURE__ */ jsx7(
|
|
564
542
|
SheetPrimitive.Description,
|
|
565
543
|
__spreadValues({
|
|
566
544
|
"data-slot": "sheet-description",
|
|
@@ -571,14 +549,14 @@ function SheetDescription(_a) {
|
|
|
571
549
|
|
|
572
550
|
// src/components/ui/tooltip.tsx
|
|
573
551
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
574
|
-
import { jsx as
|
|
552
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
575
553
|
function TooltipProvider(_a) {
|
|
576
554
|
var _b = _a, {
|
|
577
555
|
delayDuration = 0
|
|
578
556
|
} = _b, props = __objRest(_b, [
|
|
579
557
|
"delayDuration"
|
|
580
558
|
]);
|
|
581
|
-
return /* @__PURE__ */
|
|
559
|
+
return /* @__PURE__ */ jsx8(
|
|
582
560
|
TooltipPrimitive.Provider,
|
|
583
561
|
__spreadValues({
|
|
584
562
|
"data-slot": "tooltip-provider",
|
|
@@ -588,11 +566,11 @@ function TooltipProvider(_a) {
|
|
|
588
566
|
}
|
|
589
567
|
function Tooltip(_a) {
|
|
590
568
|
var props = __objRest(_a, []);
|
|
591
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ jsx8(TooltipProvider, { children: /* @__PURE__ */ jsx8(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props)) });
|
|
592
570
|
}
|
|
593
571
|
function TooltipTrigger(_a) {
|
|
594
572
|
var props = __objRest(_a, []);
|
|
595
|
-
return /* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ jsx8(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
596
574
|
}
|
|
597
575
|
function TooltipContent(_a) {
|
|
598
576
|
var _b = _a, {
|
|
@@ -604,7 +582,7 @@ function TooltipContent(_a) {
|
|
|
604
582
|
"sideOffset",
|
|
605
583
|
"children"
|
|
606
584
|
]);
|
|
607
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ jsx8(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs6(
|
|
608
586
|
TooltipPrimitive.Content,
|
|
609
587
|
__spreadProps(__spreadValues({
|
|
610
588
|
"data-slot": "tooltip-content",
|
|
@@ -616,14 +594,14 @@ function TooltipContent(_a) {
|
|
|
616
594
|
}, props), {
|
|
617
595
|
children: [
|
|
618
596
|
children,
|
|
619
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ jsx8(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
620
598
|
]
|
|
621
599
|
})
|
|
622
600
|
) });
|
|
623
601
|
}
|
|
624
602
|
|
|
625
603
|
// src/components/ui/sidebar.tsx
|
|
626
|
-
import { jsx as
|
|
604
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
627
605
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
628
606
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
629
607
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -704,7 +682,7 @@ function SidebarProvider(_a) {
|
|
|
704
682
|
toggleSidebar
|
|
705
683
|
]
|
|
706
684
|
);
|
|
707
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ jsx9(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx9(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx9(
|
|
708
686
|
"div",
|
|
709
687
|
__spreadProps(__spreadValues({
|
|
710
688
|
"data-slot": "sidebar-wrapper",
|
|
@@ -737,7 +715,7 @@ function Sidebar(_a) {
|
|
|
737
715
|
]);
|
|
738
716
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
739
717
|
if (collapsible === "none") {
|
|
740
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsx9(
|
|
741
719
|
"div",
|
|
742
720
|
__spreadProps(__spreadValues({
|
|
743
721
|
"data-slot": "sidebar",
|
|
@@ -751,7 +729,7 @@ function Sidebar(_a) {
|
|
|
751
729
|
);
|
|
752
730
|
}
|
|
753
731
|
if (isMobile) {
|
|
754
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ jsx9(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ jsxs7(
|
|
755
733
|
SheetContent,
|
|
756
734
|
{
|
|
757
735
|
"data-sidebar": "sidebar",
|
|
@@ -764,10 +742,10 @@ function Sidebar(_a) {
|
|
|
764
742
|
side,
|
|
765
743
|
children: [
|
|
766
744
|
/* @__PURE__ */ jsxs7(SheetHeader, { className: "sr-only", children: [
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ jsx9(SheetTitle, { children: "Sidebar" }),
|
|
746
|
+
/* @__PURE__ */ jsx9(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
769
747
|
] }),
|
|
770
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ jsx9("div", { className: "flex h-full w-full flex-col", children })
|
|
771
749
|
]
|
|
772
750
|
}
|
|
773
751
|
) }));
|
|
@@ -782,7 +760,7 @@ function Sidebar(_a) {
|
|
|
782
760
|
"data-side": side,
|
|
783
761
|
"data-slot": "sidebar",
|
|
784
762
|
children: [
|
|
785
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ jsx9(
|
|
786
764
|
"div",
|
|
787
765
|
{
|
|
788
766
|
"data-slot": "sidebar-gap",
|
|
@@ -794,7 +772,7 @@ function Sidebar(_a) {
|
|
|
794
772
|
)
|
|
795
773
|
}
|
|
796
774
|
),
|
|
797
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ jsx9(
|
|
798
776
|
"div",
|
|
799
777
|
__spreadProps(__spreadValues({
|
|
800
778
|
"data-slot": "sidebar-container",
|
|
@@ -806,7 +784,7 @@ function Sidebar(_a) {
|
|
|
806
784
|
className
|
|
807
785
|
)
|
|
808
786
|
}, props), {
|
|
809
|
-
children: /* @__PURE__ */
|
|
787
|
+
children: /* @__PURE__ */ jsx9(
|
|
810
788
|
"div",
|
|
811
789
|
{
|
|
812
790
|
"data-sidebar": "sidebar",
|
|
@@ -845,15 +823,15 @@ function SidebarTrigger(_a) {
|
|
|
845
823
|
}
|
|
846
824
|
}, props), {
|
|
847
825
|
children: [
|
|
848
|
-
openMobile ? /* @__PURE__ */
|
|
849
|
-
/* @__PURE__ */
|
|
826
|
+
openMobile ? /* @__PURE__ */ jsx9(X, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }) : /* @__PURE__ */ jsx9(Menu, { className: "size-[clamp(1.5rem,1.5rem,1.5rem)]" }),
|
|
827
|
+
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
850
828
|
]
|
|
851
829
|
})
|
|
852
830
|
);
|
|
853
831
|
}
|
|
854
832
|
function SidebarInset(_a) {
|
|
855
833
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
856
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ jsx9(
|
|
857
835
|
"main",
|
|
858
836
|
__spreadValues({
|
|
859
837
|
"data-slot": "sidebar-inset",
|
|
@@ -867,7 +845,7 @@ function SidebarInset(_a) {
|
|
|
867
845
|
}
|
|
868
846
|
function SidebarContent(_a) {
|
|
869
847
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
870
|
-
return /* @__PURE__ */
|
|
848
|
+
return /* @__PURE__ */ jsx9(
|
|
871
849
|
"div",
|
|
872
850
|
__spreadValues({
|
|
873
851
|
"data-slot": "sidebar-content",
|
|
@@ -881,7 +859,7 @@ function SidebarContent(_a) {
|
|
|
881
859
|
}
|
|
882
860
|
function SidebarGroup(_a) {
|
|
883
861
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
884
|
-
return /* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ jsx9(
|
|
885
863
|
"div",
|
|
886
864
|
__spreadValues({
|
|
887
865
|
"data-slot": "sidebar-group",
|
|
@@ -895,7 +873,7 @@ function SidebarGroup(_a) {
|
|
|
895
873
|
}
|
|
896
874
|
function SidebarMenu(_a) {
|
|
897
875
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
898
|
-
return /* @__PURE__ */
|
|
876
|
+
return /* @__PURE__ */ jsx9(
|
|
899
877
|
"ul",
|
|
900
878
|
__spreadValues({
|
|
901
879
|
"data-slot": "sidebar-menu",
|
|
@@ -906,7 +884,7 @@ function SidebarMenu(_a) {
|
|
|
906
884
|
}
|
|
907
885
|
function SidebarMenuItem(_a) {
|
|
908
886
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
909
|
-
return /* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ jsx9(
|
|
910
888
|
"li",
|
|
911
889
|
__spreadValues({
|
|
912
890
|
"data-slot": "sidebar-menu-item",
|
|
@@ -953,7 +931,7 @@ function SidebarMenuButton(_a) {
|
|
|
953
931
|
]);
|
|
954
932
|
const Comp = asChild ? Slot2 : "button";
|
|
955
933
|
const { isMobile, state } = useSidebar();
|
|
956
|
-
const button = /* @__PURE__ */
|
|
934
|
+
const button = /* @__PURE__ */ jsx9(
|
|
957
935
|
Comp,
|
|
958
936
|
__spreadValues({
|
|
959
937
|
"data-slot": "sidebar-menu-button",
|
|
@@ -975,8 +953,8 @@ function SidebarMenuButton(_a) {
|
|
|
975
953
|
};
|
|
976
954
|
}
|
|
977
955
|
return /* @__PURE__ */ jsxs7(Tooltip, { children: [
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ jsx9(TooltipTrigger, { asChild: true, children: button }),
|
|
957
|
+
/* @__PURE__ */ jsx9(
|
|
980
958
|
TooltipContent,
|
|
981
959
|
__spreadValues({
|
|
982
960
|
side: "right",
|
|
@@ -988,7 +966,7 @@ function SidebarMenuButton(_a) {
|
|
|
988
966
|
}
|
|
989
967
|
function SidebarMenuSub(_a) {
|
|
990
968
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
991
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ jsx9(
|
|
992
970
|
"ul",
|
|
993
971
|
__spreadValues({
|
|
994
972
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -1007,7 +985,7 @@ function SidebarMenuSubItem(_a) {
|
|
|
1007
985
|
} = _b, props = __objRest(_b, [
|
|
1008
986
|
"className"
|
|
1009
987
|
]);
|
|
1010
|
-
return /* @__PURE__ */
|
|
988
|
+
return /* @__PURE__ */ jsx9(
|
|
1011
989
|
"li",
|
|
1012
990
|
__spreadValues({
|
|
1013
991
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -1029,7 +1007,7 @@ function SidebarMenuSubButton(_a) {
|
|
|
1029
1007
|
"className"
|
|
1030
1008
|
]);
|
|
1031
1009
|
const Comp = asChild ? Slot2 : "a";
|
|
1032
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ jsx9(
|
|
1033
1011
|
Comp,
|
|
1034
1012
|
__spreadValues({
|
|
1035
1013
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -1053,14 +1031,14 @@ import { ChevronRight, CornerDownRight } from "lucide-react";
|
|
|
1053
1031
|
|
|
1054
1032
|
// src/components/ui/collapsible.tsx
|
|
1055
1033
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
1056
|
-
import { jsx as
|
|
1034
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1057
1035
|
function Collapsible(_a) {
|
|
1058
1036
|
var props = __objRest(_a, []);
|
|
1059
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx10(CollapsiblePrimitive.Root, __spreadValues({ "data-slot": "collapsible" }, props));
|
|
1060
1038
|
}
|
|
1061
1039
|
function CollapsibleTrigger2(_a) {
|
|
1062
1040
|
var props = __objRest(_a, []);
|
|
1063
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ jsx10(
|
|
1064
1042
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
1065
1043
|
__spreadValues({
|
|
1066
1044
|
"data-slot": "collapsible-trigger"
|
|
@@ -1069,7 +1047,7 @@ function CollapsibleTrigger2(_a) {
|
|
|
1069
1047
|
}
|
|
1070
1048
|
function CollapsibleContent2(_a) {
|
|
1071
1049
|
var props = __objRest(_a, []);
|
|
1072
|
-
return /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ jsx10(
|
|
1073
1051
|
CollapsiblePrimitive.CollapsibleContent,
|
|
1074
1052
|
__spreadValues({
|
|
1075
1053
|
"data-slot": "collapsible-content"
|
|
@@ -1078,30 +1056,30 @@ function CollapsibleContent2(_a) {
|
|
|
1078
1056
|
}
|
|
1079
1057
|
|
|
1080
1058
|
// src/components/custom/navbar/nav-main.tsx
|
|
1081
|
-
import { jsx as
|
|
1059
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1082
1060
|
function NavMain({ items }) {
|
|
1083
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ jsx11(SidebarGroup, { children: /* @__PURE__ */ jsx11(SidebarMenu, { children: renderMenu(items) }) });
|
|
1084
1062
|
}
|
|
1085
1063
|
function renderMenu(data) {
|
|
1086
1064
|
return Object.entries(data).map(([title, value]) => {
|
|
1087
1065
|
if (typeof value === "string") {
|
|
1088
|
-
return /* @__PURE__ */
|
|
1089
|
-
/* @__PURE__ */
|
|
1090
|
-
/* @__PURE__ */
|
|
1066
|
+
return /* @__PURE__ */ jsx11(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx11(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxs8("a", { href: `/${value}`, children: [
|
|
1067
|
+
/* @__PURE__ */ jsx11(CornerDownRight, {}),
|
|
1068
|
+
/* @__PURE__ */ jsx11("span", { className: "font-light text-sm", children: title })
|
|
1091
1069
|
] }) }) }, title);
|
|
1092
1070
|
}
|
|
1093
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ jsx11(
|
|
1094
1072
|
Collapsible,
|
|
1095
1073
|
{
|
|
1096
1074
|
asChild: true,
|
|
1097
1075
|
defaultOpen: false,
|
|
1098
1076
|
className: "group/collapsible group-data-[state=open]:bg-sidebar-accent group-data-[state=open]:text-sidebar-accent-foreground",
|
|
1099
1077
|
children: /* @__PURE__ */ jsxs8(SidebarMenuItem, { children: [
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ jsx11(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs8(SidebarMenuButton, { tooltip: title, children: [
|
|
1079
|
+
/* @__PURE__ */ jsx11("span", { className: "font-medium text-lg", children: title }),
|
|
1080
|
+
/* @__PURE__ */ jsx11(ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
1103
1081
|
] }) }),
|
|
1104
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ jsx11(CollapsibleContent2, { children: /* @__PURE__ */ jsx11(SidebarMenuSub, { children: renderMenu(value) }) })
|
|
1105
1083
|
] })
|
|
1106
1084
|
},
|
|
1107
1085
|
title
|
|
@@ -1110,16 +1088,14 @@ function renderMenu(data) {
|
|
|
1110
1088
|
}
|
|
1111
1089
|
|
|
1112
1090
|
// src/components/custom/navbar/app-sidebar.tsx
|
|
1113
|
-
import { jsx as
|
|
1091
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1114
1092
|
function AppSidebar(_a) {
|
|
1115
1093
|
var _b = _a, { data } = _b, props = __objRest(_b, ["data"]);
|
|
1116
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ jsx12(Sidebar, __spreadProps(__spreadValues({ collapsible: "icon" }, props), { children: /* @__PURE__ */ jsx12(SidebarContent, { children: /* @__PURE__ */ jsx12(NavMain, { items: data }) }) }));
|
|
1117
1095
|
}
|
|
1118
1096
|
|
|
1119
1097
|
// src/components/custom/navbar/mobileNavbar.tsx
|
|
1120
|
-
import
|
|
1121
|
-
import Link3 from "next/link";
|
|
1122
|
-
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1098
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1123
1099
|
function MobileNavbar({
|
|
1124
1100
|
navbarData,
|
|
1125
1101
|
userData,
|
|
@@ -1128,38 +1104,38 @@ function MobileNavbar({
|
|
|
1128
1104
|
const safeData = navbarData || {};
|
|
1129
1105
|
return /* @__PURE__ */ jsxs9(SidebarProvider, { className: "relative w-full", children: [
|
|
1130
1106
|
/* @__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: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1132
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ jsx13(SidebarTrigger, {}),
|
|
1108
|
+
/* @__PURE__ */ jsx13(Link3, { href: "/", children: /* @__PURE__ */ jsx13(
|
|
1133
1109
|
Image3,
|
|
1134
1110
|
{
|
|
1135
|
-
src:
|
|
1111
|
+
src: sidebarIcon_default,
|
|
1136
1112
|
alt: "Logo",
|
|
1137
1113
|
width: 72,
|
|
1138
1114
|
height: 18
|
|
1139
1115
|
}
|
|
1140
1116
|
) }),
|
|
1141
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ jsx13(user_default2, { userData, onLogout })
|
|
1142
1118
|
] }),
|
|
1143
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ jsx13(SidebarInset, { className: "pt-12", children: /* @__PURE__ */ jsx13(AppSidebar, { data: safeData }) })
|
|
1144
1120
|
] });
|
|
1145
1121
|
}
|
|
1146
1122
|
|
|
1147
1123
|
// src/components/custom/navbar/navbar.tsx
|
|
1148
|
-
import { Fragment, jsx as
|
|
1124
|
+
import { Fragment, jsx as jsx14 } from "react/jsx-runtime";
|
|
1149
1125
|
function Navbar({
|
|
1150
1126
|
navbarData,
|
|
1151
1127
|
userData,
|
|
1152
1128
|
onLogout
|
|
1153
1129
|
}) {
|
|
1154
1130
|
const isMobile = useIsMobile();
|
|
1155
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ jsx14(Fragment, { children: isMobile ? /* @__PURE__ */ jsx14(
|
|
1156
1132
|
MobileNavbar,
|
|
1157
1133
|
{
|
|
1158
1134
|
navbarData,
|
|
1159
1135
|
userData,
|
|
1160
1136
|
onLogout
|
|
1161
1137
|
}
|
|
1162
|
-
) : /* @__PURE__ */
|
|
1138
|
+
) : /* @__PURE__ */ jsx14(
|
|
1163
1139
|
DesktopNavbar,
|
|
1164
1140
|
{
|
|
1165
1141
|
navbarData,
|
|
@@ -1174,5 +1150,5 @@ export {
|
|
|
1174
1150
|
MobileNavbar,
|
|
1175
1151
|
NavMain,
|
|
1176
1152
|
Navbar,
|
|
1177
|
-
|
|
1153
|
+
user_default2 as User
|
|
1178
1154
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baaz-custom-components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"dev": "next dev --turbopack",
|
|
20
20
|
"build:css": "npx @tailwindcss/cli -i ./src/index.css -o ./dist/styles.css --minify",
|
|
21
21
|
"build": "tsup && npm run build:css",
|
|
22
|
+
"postbuild": "cp -r src/assets dist/assets",
|
|
22
23
|
"start": "next start",
|
|
23
24
|
"lint": "eslint",
|
|
24
25
|
"release": "sh release.sh"
|