jett.admin.npmpackage 1.0.8 → 1.0.10
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 +26 -18
- package/dist/index.js +79 -15
- package/dist/index.mjs +79 -15
- package/dist/sidebarLogo-S4TNJORM.webp +0 -0
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -47,11 +47,8 @@
|
|
|
47
47
|
--text-sm--line-height: calc(1.25 / 0.875);
|
|
48
48
|
--text-lg: 1.125rem;
|
|
49
49
|
--text-lg--line-height: calc(1.75 / 1.125);
|
|
50
|
-
--text-2xl: 1.5rem;
|
|
51
|
-
--text-2xl--line-height: calc(2 / 1.5);
|
|
52
50
|
--font-weight-medium: 500;
|
|
53
51
|
--font-weight-semibold: 600;
|
|
54
|
-
--font-weight-bold: 700;
|
|
55
52
|
--radius-sm: 0.25rem;
|
|
56
53
|
--radius-md: 0.375rem;
|
|
57
54
|
--radius-lg: 0.5rem;
|
|
@@ -305,8 +302,8 @@
|
|
|
305
302
|
.mb-6 {
|
|
306
303
|
margin-bottom: calc(var(--spacing) * 6);
|
|
307
304
|
}
|
|
308
|
-
.ml-\[
|
|
309
|
-
margin-left:
|
|
305
|
+
.ml-\[20px\] {
|
|
306
|
+
margin-left: 20px;
|
|
310
307
|
}
|
|
311
308
|
.ml-auto {
|
|
312
309
|
margin-left: auto;
|
|
@@ -338,9 +335,15 @@
|
|
|
338
335
|
.h-10 {
|
|
339
336
|
height: calc(var(--spacing) * 10);
|
|
340
337
|
}
|
|
338
|
+
.h-\[40px\] {
|
|
339
|
+
height: 40px;
|
|
340
|
+
}
|
|
341
341
|
.h-\[90px\] {
|
|
342
342
|
height: 90px;
|
|
343
343
|
}
|
|
344
|
+
.h-\[100vh\] {
|
|
345
|
+
height: 100vh;
|
|
346
|
+
}
|
|
344
347
|
.h-auto {
|
|
345
348
|
height: auto;
|
|
346
349
|
}
|
|
@@ -353,6 +356,9 @@
|
|
|
353
356
|
.max-h-60 {
|
|
354
357
|
max-height: calc(var(--spacing) * 60);
|
|
355
358
|
}
|
|
359
|
+
.max-h-\[100vh\] {
|
|
360
|
+
max-height: 100vh;
|
|
361
|
+
}
|
|
356
362
|
.min-h-10 {
|
|
357
363
|
min-height: calc(var(--spacing) * 10);
|
|
358
364
|
}
|
|
@@ -374,12 +380,12 @@
|
|
|
374
380
|
.w-11 {
|
|
375
381
|
width: calc(var(--spacing) * 11);
|
|
376
382
|
}
|
|
377
|
-
.w-24 {
|
|
378
|
-
width: calc(var(--spacing) * 24);
|
|
379
|
-
}
|
|
380
383
|
.w-72 {
|
|
381
384
|
width: calc(var(--spacing) * 72);
|
|
382
385
|
}
|
|
386
|
+
.w-\[108px\] {
|
|
387
|
+
width: 108px;
|
|
388
|
+
}
|
|
383
389
|
.w-full {
|
|
384
390
|
width: 100%;
|
|
385
391
|
}
|
|
@@ -544,6 +550,9 @@
|
|
|
544
550
|
.border-red-500 {
|
|
545
551
|
border-color: var(--color-red-500);
|
|
546
552
|
}
|
|
553
|
+
.bg-\[\#fafafa\] {
|
|
554
|
+
background-color: #fafafa;
|
|
555
|
+
}
|
|
547
556
|
.bg-black {
|
|
548
557
|
background-color: var(--color-black);
|
|
549
558
|
}
|
|
@@ -628,10 +637,6 @@
|
|
|
628
637
|
.text-right {
|
|
629
638
|
text-align: right;
|
|
630
639
|
}
|
|
631
|
-
.text-2xl {
|
|
632
|
-
font-size: var(--text-2xl);
|
|
633
|
-
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
634
|
-
}
|
|
635
640
|
.text-lg {
|
|
636
641
|
font-size: var(--text-lg);
|
|
637
642
|
line-height: var(--tw-leading, var(--text-lg--line-height));
|
|
@@ -666,10 +671,6 @@
|
|
|
666
671
|
--tw-font-weight: 600;
|
|
667
672
|
font-weight: 600;
|
|
668
673
|
}
|
|
669
|
-
.font-bold {
|
|
670
|
-
--tw-font-weight: var(--font-weight-bold);
|
|
671
|
-
font-weight: var(--font-weight-bold);
|
|
672
|
-
}
|
|
673
674
|
.font-medium {
|
|
674
675
|
--tw-font-weight: var(--font-weight-medium);
|
|
675
676
|
font-weight: var(--font-weight-medium);
|
|
@@ -678,8 +679,8 @@
|
|
|
678
679
|
--tw-font-weight: var(--font-weight-semibold);
|
|
679
680
|
font-weight: var(--font-weight-semibold);
|
|
680
681
|
}
|
|
681
|
-
.text-\[\#
|
|
682
|
-
color: #
|
|
682
|
+
.text-\[\#3f3f46cc\] {
|
|
683
|
+
color: #3f3f46cc;
|
|
683
684
|
}
|
|
684
685
|
.text-\[\#737373\] {
|
|
685
686
|
color: #737373;
|
|
@@ -850,6 +851,13 @@
|
|
|
850
851
|
}
|
|
851
852
|
}
|
|
852
853
|
}
|
|
854
|
+
.hover\:bg-\[\#f4f4f5\] {
|
|
855
|
+
&:hover {
|
|
856
|
+
@media (hover: hover) {
|
|
857
|
+
background-color: #f4f4f5;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
853
861
|
.hover\:bg-gray-100 {
|
|
854
862
|
&:hover {
|
|
855
863
|
@media (hover: hover) {
|
package/dist/index.js
CHANGED
|
@@ -435,10 +435,56 @@ var CustomUpload = ({
|
|
|
435
435
|
};
|
|
436
436
|
|
|
437
437
|
// src/sideBar/SideBar.jsx
|
|
438
|
-
var
|
|
438
|
+
var import_lucide_react5 = require("lucide-react");
|
|
439
439
|
var import_react11 = __toESM(require("react"));
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
|
|
441
|
+
// ConstantUI.js
|
|
442
|
+
var import_lucide_react4 = require("lucide-react");
|
|
443
|
+
var navItemsConstant = [
|
|
444
|
+
{ Icon: import_lucide_react4.Home, label: "Home", onClick: () => {
|
|
445
|
+
}, isDropDown: false },
|
|
446
|
+
{ Icon: import_lucide_react4.Handshake, label: "Supplier Ecosystem", onClick: () => {
|
|
447
|
+
}, isDropDown: true, options: [{ label: "Suppliers", onClick: () => {
|
|
448
|
+
} }] },
|
|
449
|
+
{ Icon: import_lucide_react4.Building, label: "Consumer Ecosystem", onClick: () => {
|
|
450
|
+
}, options: [{ label: "Corporate", onClick: () => {
|
|
451
|
+
} }, { label: "Trips", onClick: () => {
|
|
452
|
+
} }, { label: "Reports", onClick: () => {
|
|
453
|
+
} }, { label: "Tags", onClick: () => {
|
|
454
|
+
} }], isDropDown: true },
|
|
455
|
+
{ Icon: import_lucide_react4.Banknote, label: "Finance", onClick: () => {
|
|
456
|
+
}, isDropDown: true, options: [{ label: "Invoices", onClick: () => {
|
|
457
|
+
} }, { label: "Ledger", onClick: () => {
|
|
458
|
+
} }, { label: "Payments", onClick: () => {
|
|
459
|
+
} }] },
|
|
460
|
+
{ Icon: import_lucide_react4.DollarSign, label: "Revenue Management", onClick: () => {
|
|
461
|
+
}, isDropDown: true, options: [{ label: "Pricing Policy", onClick: () => {
|
|
462
|
+
} }, { label: "Offers", onClick: () => {
|
|
463
|
+
} }, { label: "Vouchers", onClick: () => {
|
|
464
|
+
} }, { label: "Supplier Deals", onClick: () => {
|
|
465
|
+
} }, { label: "Subscription Plans", onClick: () => {
|
|
466
|
+
} }] },
|
|
467
|
+
{ Icon: import_lucide_react4.Cog, label: "Settings", onClick: () => {
|
|
468
|
+
}, isDropDown: true, options: [{ label: "Admin user Management", isDropDown: true, onClick: () => {
|
|
469
|
+
}, options: [{ label: "Admin Users", onClick: () => {
|
|
470
|
+
} }, { label: "Admin User Attributes", onClick: () => {
|
|
471
|
+
} }] }, { label: "TMC Markets", onClick: () => {
|
|
472
|
+
} }, { label: "Permissions", onClick: () => {
|
|
473
|
+
} }, { label: "Report Configurations", onClick: () => {
|
|
474
|
+
} }, { label: "Whitelabelling", onClick: () => {
|
|
475
|
+
} }] }
|
|
476
|
+
];
|
|
477
|
+
var additionalItemsConstant = [
|
|
478
|
+
{ Icon: import_lucide_react4.LifeBuoy, label: "Help", onclick: () => {
|
|
479
|
+
} }
|
|
480
|
+
];
|
|
481
|
+
|
|
482
|
+
// src/assests/logo/sidebarlogo.webp
|
|
483
|
+
var sidebarlogo_default = "./sidebarlogo-S4TNJORM.webp";
|
|
484
|
+
|
|
485
|
+
// src/sideBar/SideBar.jsx
|
|
486
|
+
var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) => {
|
|
487
|
+
const handleIconRotate = (e, index, additionalKey) => {
|
|
442
488
|
let dropDownIcon = e.currentTarget.children[2];
|
|
443
489
|
if (!dropDownIcon) return;
|
|
444
490
|
if (dropDownIcon.classList.contains("rotate-180")) {
|
|
@@ -447,7 +493,7 @@ var AppSideBar = ({ sideBarHeading, username, role, navItems, additionalItems })
|
|
|
447
493
|
dropDownIcon.classList.add("transition-all");
|
|
448
494
|
dropDownIcon.classList.add("rotate-180");
|
|
449
495
|
}
|
|
450
|
-
const optionsContainer = document.getElementById(`dropDownOptions-${index}`);
|
|
496
|
+
const optionsContainer = document.getElementById(`dropDownOptions-${index}${additionalKey ? `-${additionalKey}` : ""}`);
|
|
451
497
|
if (!optionsContainer) return;
|
|
452
498
|
optionsContainer.classList.add("transition-all");
|
|
453
499
|
if (optionsContainer.classList.contains("max-h-0")) {
|
|
@@ -458,23 +504,42 @@ var AppSideBar = ({ sideBarHeading, username, role, navItems, additionalItems })
|
|
|
458
504
|
optionsContainer.classList.add("max-h-0");
|
|
459
505
|
}
|
|
460
506
|
};
|
|
461
|
-
|
|
507
|
+
const navItemsLocal = navItems ?? navItemsConstant;
|
|
508
|
+
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
509
|
+
const sideBarLogoLocal = sideBarLogo ?? sidebarlogo_default;
|
|
510
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-72 bg-[#fafafa] border-r border-gray-200 flex flex-col p-4 h-full max-h-[100vh]" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "p-2 mb-4" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-[108px] h-[40px] flex items-center \r\n justify-center" }, /* @__PURE__ */ import_react11.default.createElement("img", { src: sideBarLogoLocal, alt: "sidebarLogo", width: 108, height: 40 }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mb-6" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex ml-[20px] items-center gap-2 mb-2" }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.Globe, { width: 20, height: 20, color: "#18181b" }), /* @__PURE__ */ import_react11.default.createElement("h3", { className: "text-[#3f3f46cc] font-medium" }, "Data Centers")), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement(CustomAutocomplete, { options: [] }))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "overflow-y-auto" }, /* @__PURE__ */ import_react11.default.createElement("div", null, navItemsLocal == null ? void 0 : navItemsLocal.map((item, index) => {
|
|
462
511
|
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer", onClick: (e) => {
|
|
463
512
|
item.onClick && item.onClick(e);
|
|
464
513
|
handleIconRotate(e, index);
|
|
465
|
-
} }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20, color: "
|
|
466
|
-
return /* @__PURE__ */ import_react11.default.createElement(
|
|
514
|
+
} }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20, color: "#18181b" }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-[#3f3f46cc]" }, item.label), item.isDropDown && /* @__PURE__ */ import_react11.default.createElement("div", { className: `ml-auto transition-all delay-75` }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.ChevronDown, { width: 20, height: 20 }))), item.options && item.options.length > 0 && /* @__PURE__ */ import_react11.default.createElement("div", { className: "ml-[20px] max-h-0 overflow-hidden flex flex-col", id: `dropDownOptions-${index}` }, item.options.map((options, optionsIndex) => {
|
|
515
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react11.default.createElement(
|
|
467
516
|
"div",
|
|
468
517
|
{
|
|
469
|
-
className: "p-2
|
|
470
|
-
onClick: () =>
|
|
518
|
+
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer",
|
|
519
|
+
onClick: (e) => {
|
|
520
|
+
options.onclick && options.onclick();
|
|
521
|
+
options.isDropDown && handleIconRotate(e, optionsIndex, "subOption");
|
|
522
|
+
}
|
|
471
523
|
},
|
|
472
|
-
|
|
473
|
-
|
|
524
|
+
/* @__PURE__ */ import_react11.default.createElement("div", null),
|
|
525
|
+
/* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-sm text-[#3f3f46cc]" }, options.label),
|
|
526
|
+
options.isDropDown && /* @__PURE__ */ import_react11.default.createElement("div", { className: `ml-auto transition-all delay-75` }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.ChevronDown, { width: 20, height: 20 }))
|
|
527
|
+
), options.options && options.options.length > 1 && /* @__PURE__ */ import_react11.default.createElement("div", { className: "ml-[20px] max-h-0 overflow-hidden flex flex-col", id: `dropDownOptions-${optionsIndex}-subOption` }, options.options.map((subOption) => {
|
|
528
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
529
|
+
"div",
|
|
530
|
+
{
|
|
531
|
+
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] font-medium text-sm",
|
|
532
|
+
onClick: (e) => {
|
|
533
|
+
subOption.onclick && options.onclick();
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
subOption.label
|
|
537
|
+
);
|
|
538
|
+
})));
|
|
474
539
|
})));
|
|
475
|
-
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (
|
|
476
|
-
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20, color: "
|
|
477
|
-
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mt-auto bg-
|
|
540
|
+
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
541
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20, color: "#18181b" }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-[#3f3f46cc]" }, item.label));
|
|
542
|
+
}))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mt-auto bg-[#fafafa] border-t border-[#e5e5e5] sticky bottom-0 pt-2" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] cursor-pointer" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "relative flex shrink-0 overflow-hidden rounded-full h-10 w-10" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-muted" }, username && username.split("")[0])), /* @__PURE__ */ import_react11.default.createElement("div", null, /* @__PURE__ */ import_react11.default.createElement("p", { className: "font-semibold" }, username), /* @__PURE__ */ import_react11.default.createElement("p", { className: "text-sm text-[#3f3f46cc]" }, role))), /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.LogOut, { color: "#18181b" }))));
|
|
478
543
|
};
|
|
479
544
|
|
|
480
545
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -519,7 +584,6 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
519
584
|
|
|
520
585
|
// src/Table/CustomTable.jsx
|
|
521
586
|
var import_react13 = __toESM(require("react"));
|
|
522
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
523
587
|
var CustomTable = ({ tableHeader, setIsAllChecked, isAllChecked, children }) => {
|
|
524
588
|
return /* @__PURE__ */ import_react13.default.createElement("div", { className: "border border-[#e5e5e5] rounded-lg overflow-x-auto" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "w-full relative overflow-x-auto" }, /* @__PURE__ */ import_react13.default.createElement("table", { className: "w-full caption-bottom text-sm overflow-x-auto bg-white table-fixed border-collapse" }, /* @__PURE__ */ import_react13.default.createElement("thead", { className: "border-b border-[#e5e5e5]" }, /* @__PURE__ */ import_react13.default.createElement("tr", { className: "transition-colors text-[#737373] hover:bg-muted/50 \r\n data-[state=selected]:bg-muted" }, /* @__PURE__ */ import_react13.default.createElement("th", { className: "px-4 py-3 text-left" }, /* @__PURE__ */ import_react13.default.createElement(CustomCheckbox, { checked: isAllChecked, onChange: () => {
|
|
525
589
|
setIsAllChecked(!isAllChecked);
|
package/dist/index.mjs
CHANGED
|
@@ -388,10 +388,56 @@ var CustomUpload = ({
|
|
|
388
388
|
};
|
|
389
389
|
|
|
390
390
|
// src/sideBar/SideBar.jsx
|
|
391
|
-
import { ChevronDown as ChevronDown2, LogOut } from "lucide-react";
|
|
391
|
+
import { ChevronDown as ChevronDown2, Globe as Globe2, LogOut } from "lucide-react";
|
|
392
392
|
import React11 from "react";
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
|
|
394
|
+
// ConstantUI.js
|
|
395
|
+
import { Home, BaggageClaim, Users, Banknote, Globe, TrendingUp, FileText, FileKey2, LifeBuoy, Cog, Building, Handshake, DollarSign } from "lucide-react";
|
|
396
|
+
var navItemsConstant = [
|
|
397
|
+
{ Icon: Home, label: "Home", onClick: () => {
|
|
398
|
+
}, isDropDown: false },
|
|
399
|
+
{ Icon: Handshake, label: "Supplier Ecosystem", onClick: () => {
|
|
400
|
+
}, isDropDown: true, options: [{ label: "Suppliers", onClick: () => {
|
|
401
|
+
} }] },
|
|
402
|
+
{ Icon: Building, label: "Consumer Ecosystem", onClick: () => {
|
|
403
|
+
}, options: [{ label: "Corporate", onClick: () => {
|
|
404
|
+
} }, { label: "Trips", onClick: () => {
|
|
405
|
+
} }, { label: "Reports", onClick: () => {
|
|
406
|
+
} }, { label: "Tags", onClick: () => {
|
|
407
|
+
} }], isDropDown: true },
|
|
408
|
+
{ Icon: Banknote, label: "Finance", onClick: () => {
|
|
409
|
+
}, isDropDown: true, options: [{ label: "Invoices", onClick: () => {
|
|
410
|
+
} }, { label: "Ledger", onClick: () => {
|
|
411
|
+
} }, { label: "Payments", onClick: () => {
|
|
412
|
+
} }] },
|
|
413
|
+
{ Icon: DollarSign, label: "Revenue Management", onClick: () => {
|
|
414
|
+
}, isDropDown: true, options: [{ label: "Pricing Policy", onClick: () => {
|
|
415
|
+
} }, { label: "Offers", onClick: () => {
|
|
416
|
+
} }, { label: "Vouchers", onClick: () => {
|
|
417
|
+
} }, { label: "Supplier Deals", onClick: () => {
|
|
418
|
+
} }, { label: "Subscription Plans", onClick: () => {
|
|
419
|
+
} }] },
|
|
420
|
+
{ Icon: Cog, label: "Settings", onClick: () => {
|
|
421
|
+
}, isDropDown: true, options: [{ label: "Admin user Management", isDropDown: true, onClick: () => {
|
|
422
|
+
}, options: [{ label: "Admin Users", onClick: () => {
|
|
423
|
+
} }, { label: "Admin User Attributes", onClick: () => {
|
|
424
|
+
} }] }, { label: "TMC Markets", onClick: () => {
|
|
425
|
+
} }, { label: "Permissions", onClick: () => {
|
|
426
|
+
} }, { label: "Report Configurations", onClick: () => {
|
|
427
|
+
} }, { label: "Whitelabelling", onClick: () => {
|
|
428
|
+
} }] }
|
|
429
|
+
];
|
|
430
|
+
var additionalItemsConstant = [
|
|
431
|
+
{ Icon: LifeBuoy, label: "Help", onclick: () => {
|
|
432
|
+
} }
|
|
433
|
+
];
|
|
434
|
+
|
|
435
|
+
// src/assests/logo/sidebarlogo.webp
|
|
436
|
+
var sidebarlogo_default = "./sidebarlogo-S4TNJORM.webp";
|
|
437
|
+
|
|
438
|
+
// src/sideBar/SideBar.jsx
|
|
439
|
+
var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) => {
|
|
440
|
+
const handleIconRotate = (e, index, additionalKey) => {
|
|
395
441
|
let dropDownIcon = e.currentTarget.children[2];
|
|
396
442
|
if (!dropDownIcon) return;
|
|
397
443
|
if (dropDownIcon.classList.contains("rotate-180")) {
|
|
@@ -400,7 +446,7 @@ var AppSideBar = ({ sideBarHeading, username, role, navItems, additionalItems })
|
|
|
400
446
|
dropDownIcon.classList.add("transition-all");
|
|
401
447
|
dropDownIcon.classList.add("rotate-180");
|
|
402
448
|
}
|
|
403
|
-
const optionsContainer = document.getElementById(`dropDownOptions-${index}`);
|
|
449
|
+
const optionsContainer = document.getElementById(`dropDownOptions-${index}${additionalKey ? `-${additionalKey}` : ""}`);
|
|
404
450
|
if (!optionsContainer) return;
|
|
405
451
|
optionsContainer.classList.add("transition-all");
|
|
406
452
|
if (optionsContainer.classList.contains("max-h-0")) {
|
|
@@ -411,23 +457,42 @@ var AppSideBar = ({ sideBarHeading, username, role, navItems, additionalItems })
|
|
|
411
457
|
optionsContainer.classList.add("max-h-0");
|
|
412
458
|
}
|
|
413
459
|
};
|
|
414
|
-
|
|
460
|
+
const navItemsLocal = navItems ?? navItemsConstant;
|
|
461
|
+
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
462
|
+
const sideBarLogoLocal = sideBarLogo ?? sidebarlogo_default;
|
|
463
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "w-72 bg-[#fafafa] border-r border-gray-200 flex flex-col p-4 h-full max-h-[100vh]" }, /* @__PURE__ */ React11.createElement("div", { className: "p-2 mb-4" }, /* @__PURE__ */ React11.createElement("div", { className: "w-[108px] h-[40px] flex items-center \r\n justify-center" }, /* @__PURE__ */ React11.createElement("img", { src: sideBarLogoLocal, alt: "sidebarLogo", width: 108, height: 40 }))), /* @__PURE__ */ React11.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React11.createElement("div", { className: "flex ml-[20px] items-center gap-2 mb-2" }, /* @__PURE__ */ React11.createElement(Globe2, { width: 20, height: 20, color: "#18181b" }), /* @__PURE__ */ React11.createElement("h3", { className: "text-[#3f3f46cc] font-medium" }, "Data Centers")), /* @__PURE__ */ React11.createElement("div", null, /* @__PURE__ */ React11.createElement(CustomAutocomplete, { options: [] }))), /* @__PURE__ */ React11.createElement("div", { className: "overflow-y-auto" }, /* @__PURE__ */ React11.createElement("div", null, navItemsLocal == null ? void 0 : navItemsLocal.map((item, index) => {
|
|
415
464
|
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer", onClick: (e) => {
|
|
416
465
|
item.onClick && item.onClick(e);
|
|
417
466
|
handleIconRotate(e, index);
|
|
418
|
-
} }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20, color: "
|
|
419
|
-
return /* @__PURE__ */ React11.createElement(
|
|
467
|
+
} }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20, color: "#18181b" }), /* @__PURE__ */ React11.createElement("span", { className: "font-medium text-[#3f3f46cc]" }, item.label), item.isDropDown && /* @__PURE__ */ React11.createElement("div", { className: `ml-auto transition-all delay-75` }, /* @__PURE__ */ React11.createElement(ChevronDown2, { width: 20, height: 20 }))), item.options && item.options.length > 0 && /* @__PURE__ */ React11.createElement("div", { className: "ml-[20px] max-h-0 overflow-hidden flex flex-col", id: `dropDownOptions-${index}` }, item.options.map((options, optionsIndex) => {
|
|
468
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "" }, /* @__PURE__ */ React11.createElement(
|
|
420
469
|
"div",
|
|
421
470
|
{
|
|
422
|
-
className: "p-2
|
|
423
|
-
onClick: () =>
|
|
471
|
+
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer",
|
|
472
|
+
onClick: (e) => {
|
|
473
|
+
options.onclick && options.onclick();
|
|
474
|
+
options.isDropDown && handleIconRotate(e, optionsIndex, "subOption");
|
|
475
|
+
}
|
|
424
476
|
},
|
|
425
|
-
|
|
426
|
-
|
|
477
|
+
/* @__PURE__ */ React11.createElement("div", null),
|
|
478
|
+
/* @__PURE__ */ React11.createElement("span", { className: "font-medium text-sm text-[#3f3f46cc]" }, options.label),
|
|
479
|
+
options.isDropDown && /* @__PURE__ */ React11.createElement("div", { className: `ml-auto transition-all delay-75` }, /* @__PURE__ */ React11.createElement(ChevronDown2, { width: 20, height: 20 }))
|
|
480
|
+
), options.options && options.options.length > 1 && /* @__PURE__ */ React11.createElement("div", { className: "ml-[20px] max-h-0 overflow-hidden flex flex-col", id: `dropDownOptions-${optionsIndex}-subOption` }, options.options.map((subOption) => {
|
|
481
|
+
return /* @__PURE__ */ React11.createElement(
|
|
482
|
+
"div",
|
|
483
|
+
{
|
|
484
|
+
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] font-medium text-sm",
|
|
485
|
+
onClick: (e) => {
|
|
486
|
+
subOption.onclick && options.onclick();
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
subOption.label
|
|
490
|
+
);
|
|
491
|
+
})));
|
|
427
492
|
})));
|
|
428
|
-
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (
|
|
429
|
-
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20, color: "
|
|
430
|
-
})), /* @__PURE__ */ React11.createElement("div", { className: "mt-auto bg-
|
|
493
|
+
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
494
|
+
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20, color: "#18181b" }), /* @__PURE__ */ React11.createElement("span", { className: "font-medium text-[#3f3f46cc]" }, item.label));
|
|
495
|
+
}))), /* @__PURE__ */ React11.createElement("div", { className: "mt-auto bg-[#fafafa] border-t border-[#e5e5e5] sticky bottom-0 pt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] cursor-pointer" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React11.createElement("span", { className: "relative flex shrink-0 overflow-hidden rounded-full h-10 w-10" }, /* @__PURE__ */ React11.createElement("span", { className: "flex h-full w-full items-center justify-center rounded-full bg-muted" }, username && username.split("")[0])), /* @__PURE__ */ React11.createElement("div", null, /* @__PURE__ */ React11.createElement("p", { className: "font-semibold" }, username), /* @__PURE__ */ React11.createElement("p", { className: "text-sm text-[#3f3f46cc]" }, role))), /* @__PURE__ */ React11.createElement(LogOut, { color: "#18181b" }))));
|
|
431
496
|
};
|
|
432
497
|
|
|
433
498
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -472,7 +537,6 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
472
537
|
|
|
473
538
|
// src/Table/CustomTable.jsx
|
|
474
539
|
import React13 from "react";
|
|
475
|
-
import clsx2 from "clsx";
|
|
476
540
|
var CustomTable = ({ tableHeader, setIsAllChecked, isAllChecked, children }) => {
|
|
477
541
|
return /* @__PURE__ */ React13.createElement("div", { className: "border border-[#e5e5e5] rounded-lg overflow-x-auto" }, /* @__PURE__ */ React13.createElement("div", { className: "w-full relative overflow-x-auto" }, /* @__PURE__ */ React13.createElement("table", { className: "w-full caption-bottom text-sm overflow-x-auto bg-white table-fixed border-collapse" }, /* @__PURE__ */ React13.createElement("thead", { className: "border-b border-[#e5e5e5]" }, /* @__PURE__ */ React13.createElement("tr", { className: "transition-colors text-[#737373] hover:bg-muted/50 \r\n data-[state=selected]:bg-muted" }, /* @__PURE__ */ React13.createElement("th", { className: "px-4 py-3 text-left" }, /* @__PURE__ */ React13.createElement(CustomCheckbox, { checked: isAllChecked, onChange: () => {
|
|
478
542
|
setIsAllChecked(!isAllChecked);
|
|
Binary file
|