jett.admin.npmpackage 1.0.11 → 1.0.13
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 +58 -9
- package/dist/index.js +150 -51
- package/dist/index.mjs +150 -51
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -381,12 +381,12 @@
|
|
|
381
381
|
.w-11 {
|
|
382
382
|
width: calc(var(--spacing) * 11);
|
|
383
383
|
}
|
|
384
|
-
.w-72 {
|
|
385
|
-
width: calc(var(--spacing) * 72);
|
|
386
|
-
}
|
|
387
384
|
.w-\[108px\] {
|
|
388
385
|
width: 108px;
|
|
389
386
|
}
|
|
387
|
+
.w-\[320px\] {
|
|
388
|
+
width: 320px;
|
|
389
|
+
}
|
|
390
390
|
.w-full {
|
|
391
391
|
width: 100%;
|
|
392
392
|
}
|
|
@@ -959,19 +959,24 @@
|
|
|
959
959
|
min-width: 576px;
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
.dark\:
|
|
962
|
+
.dark\:border-\[\#303036\] {
|
|
963
963
|
&:where(.dark, .dark *) {
|
|
964
|
-
|
|
964
|
+
border-color: #303036;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
.dark\:bg-\[\#1d1d20\] {
|
|
968
|
+
&:where(.dark, .dark *) {
|
|
969
|
+
background-color: #1d1d20;
|
|
965
970
|
}
|
|
966
971
|
}
|
|
967
|
-
.dark\:
|
|
972
|
+
.dark\:bg-transparent {
|
|
968
973
|
&:where(.dark, .dark *) {
|
|
969
|
-
color:
|
|
974
|
+
background-color: transparent;
|
|
970
975
|
}
|
|
971
976
|
}
|
|
972
|
-
.dark\:text
|
|
977
|
+
.dark\:text-\[\#f4f4f5cc\] {
|
|
973
978
|
&:where(.dark, .dark *) {
|
|
974
|
-
color:
|
|
979
|
+
color: #f4f4f5cc;
|
|
975
980
|
}
|
|
976
981
|
}
|
|
977
982
|
.dark\:text-white {
|
|
@@ -979,6 +984,11 @@
|
|
|
979
984
|
color: var(--color-white);
|
|
980
985
|
}
|
|
981
986
|
}
|
|
987
|
+
.dark\:outline-white {
|
|
988
|
+
&:where(.dark, .dark *) {
|
|
989
|
+
outline-color: var(--color-white);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
982
992
|
.dark\:hover\:bg-\[\#27272a\] {
|
|
983
993
|
&:where(.dark, .dark *) {
|
|
984
994
|
&:hover {
|
|
@@ -1056,4 +1066,43 @@
|
|
|
1056
1066
|
}
|
|
1057
1067
|
}
|
|
1058
1068
|
}
|
|
1069
|
+
|
|
1070
|
+
/* src/RightSheet/RightSheet.css */
|
|
1071
|
+
.sheetPopIn {
|
|
1072
|
+
animation: popIn 50ms ease-in-out forwards;
|
|
1073
|
+
}
|
|
1074
|
+
.sheetRightSlide {
|
|
1075
|
+
animation: rightSlide 350ms ease-in-out forwards;
|
|
1076
|
+
}
|
|
1077
|
+
.sheetLeftSlide {
|
|
1078
|
+
animation: sheetLeftSlide 350ms ease-in-out forwards;
|
|
1079
|
+
}
|
|
1080
|
+
@keyframes sheetLeftSlide {
|
|
1081
|
+
0% {
|
|
1082
|
+
transform: translateX(-100%);
|
|
1083
|
+
opacity: 0;
|
|
1084
|
+
}
|
|
1085
|
+
100% {
|
|
1086
|
+
transform: translateX(0);
|
|
1087
|
+
opacity: 1;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
@keyframes rightSlide {
|
|
1091
|
+
0% {
|
|
1092
|
+
transform: translateX(100%);
|
|
1093
|
+
opacity: 0;
|
|
1094
|
+
}
|
|
1095
|
+
100% {
|
|
1096
|
+
transform: translateX(0);
|
|
1097
|
+
opacity: 1;
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
@keyframes popIn {
|
|
1101
|
+
0% {
|
|
1102
|
+
opacity: 0;
|
|
1103
|
+
}
|
|
1104
|
+
100% {
|
|
1105
|
+
opacity: 1;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1059
1108
|
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
|
package/dist/index.js
CHANGED
|
@@ -73,7 +73,7 @@ var CustomButton = ({
|
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
className: cn(
|
|
76
|
-
`cursor-pointer flex items-center py-2 px-3 min-h-10 justify-center border rounded-[6px] border-[#e5e5e5] gap-2`,
|
|
76
|
+
`cursor-pointer flex items-center py-2 px-3 min-h-10 justify-center border rounded-[6px] border-[#e5e5e5] dark:border-[#303036] ${variant == "DANGER" ? "bg-[#ef4444]" : "dark:bg-[#1d1d20]"} gap-2`,
|
|
77
77
|
variantStyles[variant],
|
|
78
78
|
className
|
|
79
79
|
),
|
|
@@ -291,7 +291,7 @@ var CustomInput = ({
|
|
|
291
291
|
return /* @__PURE__ */ import_react6.default.createElement("div", { className: "flex flex-col gap-1 w-full" }, heading && /* @__PURE__ */ import_react6.default.createElement("h3", { className: "text-lg font-semibold" }, heading), /* @__PURE__ */ import_react6.default.createElement(
|
|
292
292
|
"label",
|
|
293
293
|
{
|
|
294
|
-
className: `font-[500] text-sm ${heading ? "text-[#737373]" : "text-black"}`
|
|
294
|
+
className: `font-[500] text-sm ${heading ? "text-[#737373]" : "text-black"} dark:text-white`
|
|
295
295
|
},
|
|
296
296
|
label,
|
|
297
297
|
" ",
|
|
@@ -299,8 +299,9 @@ var CustomInput = ({
|
|
|
299
299
|
), /* @__PURE__ */ import_react6.default.createElement(
|
|
300
300
|
"input",
|
|
301
301
|
{
|
|
302
|
-
className: `border
|
|
303
|
-
focus:outline-2 outline-black outline-offset-2
|
|
302
|
+
className: `border border-gray-200 rounded-md h-10 px-4 py-2 w-full text-[14px]
|
|
303
|
+
focus:outline-2 outline-black dark:outline-white outline-offset-2
|
|
304
|
+
dark:bg-transparent dark:text-white dark:border-[#303036]
|
|
304
305
|
${disabled ? "bg-gray-100 cursor-not-allowed text-gray-500 border-gray-300" : error ? "border-red-500 bg-red-50" : "bg-white border-[hsl(0_0%_89.8%)]"}
|
|
305
306
|
`,
|
|
306
307
|
value,
|
|
@@ -444,41 +445,139 @@ var import_react11 = __toESM(require("react"));
|
|
|
444
445
|
// ConstantUI.js
|
|
445
446
|
var import_lucide_react4 = require("lucide-react");
|
|
446
447
|
var navItemsConstant = [
|
|
447
|
-
{
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
448
|
+
{
|
|
449
|
+
Icon: import_lucide_react4.Home,
|
|
450
|
+
label: "Home",
|
|
451
|
+
onClick: () => {
|
|
452
|
+
window.location.href = "/";
|
|
453
|
+
},
|
|
454
|
+
isDropDown: false
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
Icon: import_lucide_react4.Handshake,
|
|
458
|
+
label: "Supplier Ecosystem",
|
|
459
|
+
onClick: () => {
|
|
460
|
+
},
|
|
461
|
+
isDropDown: true,
|
|
462
|
+
options: [
|
|
463
|
+
{ label: "Suppliers", onClick: () => {
|
|
464
|
+
window.location.href = "/supplier/";
|
|
465
|
+
} }
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
Icon: import_lucide_react4.Building,
|
|
470
|
+
label: "Consumer Ecosystem",
|
|
471
|
+
onClick: () => {
|
|
472
|
+
},
|
|
473
|
+
options: [
|
|
474
|
+
{
|
|
475
|
+
label: "Corporate",
|
|
476
|
+
onClick: () => {
|
|
477
|
+
window.location.href = "/corporate/";
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{ label: "Trips", onClick: () => {
|
|
481
|
+
window.location.href = "/trips/";
|
|
482
|
+
} },
|
|
483
|
+
{ label: "Reports", onClick: () => {
|
|
484
|
+
window.location.href = "/reports/";
|
|
485
|
+
} },
|
|
486
|
+
{
|
|
487
|
+
label: "Tags",
|
|
488
|
+
onClick: () => {
|
|
489
|
+
window.location.href = "/tags/";
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
isDropDown: true
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
Icon: import_lucide_react4.Banknote,
|
|
497
|
+
label: "Finance",
|
|
498
|
+
onClick: () => {
|
|
499
|
+
},
|
|
500
|
+
isDropDown: true,
|
|
501
|
+
options: [
|
|
502
|
+
{ label: "Invoices", onClick: () => {
|
|
503
|
+
window.location.href = "/invoices/";
|
|
504
|
+
} },
|
|
505
|
+
{ label: "Ledger", onClick: () => {
|
|
506
|
+
window.location.href = "/ledger/";
|
|
507
|
+
} },
|
|
508
|
+
{ label: "Payments", onClick: () => {
|
|
509
|
+
window.location.href = "/payments/";
|
|
510
|
+
} }
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
Icon: import_lucide_react4.DollarSign,
|
|
515
|
+
label: "Revenue Management",
|
|
516
|
+
onClick: () => {
|
|
517
|
+
},
|
|
518
|
+
isDropDown: true,
|
|
519
|
+
options: [
|
|
520
|
+
{
|
|
521
|
+
label: "Pricing Policy",
|
|
522
|
+
onClick: () => {
|
|
523
|
+
window.location.href = "/pricing/";
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
{ label: "Offers", onClick: () => {
|
|
527
|
+
window.location.href = "/offers/";
|
|
528
|
+
} },
|
|
529
|
+
{ label: "Vouchers", onClick: () => {
|
|
530
|
+
window.location.href = "/vouchers/";
|
|
531
|
+
} },
|
|
532
|
+
{ label: "Supplier Deals", onClick: () => {
|
|
533
|
+
window.location.href = "/supplierdeals/";
|
|
534
|
+
} },
|
|
535
|
+
{
|
|
536
|
+
label: "Subscription Plans",
|
|
537
|
+
onClick: () => {
|
|
538
|
+
window.location.href = "/subscription/";
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
]
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
Icon: import_lucide_react4.Cog,
|
|
545
|
+
label: "Settings",
|
|
546
|
+
onClick: () => {
|
|
547
|
+
},
|
|
548
|
+
isDropDown: true,
|
|
549
|
+
options: [
|
|
550
|
+
{
|
|
551
|
+
label: "Admin user Management",
|
|
552
|
+
isDropDown: true,
|
|
553
|
+
onClick: () => {
|
|
554
|
+
},
|
|
555
|
+
options: [
|
|
556
|
+
{ label: "Admin Users", onClick: () => {
|
|
557
|
+
window.location.href = "/users/";
|
|
558
|
+
} },
|
|
559
|
+
{ label: "Admin User Attributes", onClick: () => {
|
|
560
|
+
} }
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
{ label: "TMC Markets", onClick: () => {
|
|
564
|
+
window.location.href = "/market/";
|
|
565
|
+
} },
|
|
566
|
+
{ label: "Permissions", onClick: () => {
|
|
567
|
+
window.location.href = "/permissions/";
|
|
568
|
+
} },
|
|
569
|
+
{ label: "Report Configurations", onClick: () => {
|
|
570
|
+
window.location.href = "/reports/";
|
|
571
|
+
} },
|
|
572
|
+
{ label: "Whitelabelling", onClick: () => {
|
|
573
|
+
window.location.href = "/whitelabelling/";
|
|
574
|
+
} }
|
|
575
|
+
]
|
|
576
|
+
}
|
|
479
577
|
];
|
|
480
578
|
var additionalItemsConstant = [
|
|
481
|
-
{ Icon: import_lucide_react4.LifeBuoy, label: "Help",
|
|
579
|
+
{ Icon: import_lucide_react4.LifeBuoy, label: "Help", onClick: () => {
|
|
580
|
+
window.location.href = "/help";
|
|
482
581
|
} }
|
|
483
582
|
];
|
|
484
583
|
|
|
@@ -510,39 +609,39 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
510
609
|
const navItemsLocal = navItems ?? navItemsConstant;
|
|
511
610
|
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
512
611
|
const sideBarLogoLocal = sideBarLogo ?? sidebarlogo_default;
|
|
513
|
-
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-
|
|
514
|
-
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] dark:hover:bg-[#27272a] dark:text-
|
|
612
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-[320px] transition-all ease-in-out delay-100 bg-transparent border-r border-gray-200 dark:border-[#303036] 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 dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.Globe, { width: 20, height: 20 }), /* @__PURE__ */ import_react11.default.createElement("h3", { className: "text-[#3f3f46cc] dark:text-[#f4f4f5cc] 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) => {
|
|
613
|
+
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] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer rounded-lg ml-2", onClick: (e) => {
|
|
515
614
|
item.onClick && item.onClick(e);
|
|
516
615
|
handleIconRotate(e, index);
|
|
517
|
-
} }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-
|
|
616
|
+
} }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, 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) => {
|
|
518
617
|
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react11.default.createElement(
|
|
519
618
|
"div",
|
|
520
619
|
{
|
|
521
|
-
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer",
|
|
620
|
+
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] cursor-pointer",
|
|
522
621
|
onClick: (e) => {
|
|
523
|
-
options.
|
|
622
|
+
options.onClick && options.onClick();
|
|
524
623
|
options.isDropDown && handleIconRotate(e, optionsIndex, "subOption");
|
|
525
624
|
}
|
|
526
625
|
},
|
|
527
626
|
/* @__PURE__ */ import_react11.default.createElement("div", null),
|
|
528
|
-
/* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-sm text-[#3f3f46cc]" }, options.label),
|
|
627
|
+
/* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-sm text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, options.label),
|
|
529
628
|
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 }))
|
|
530
629
|
), 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) => {
|
|
531
630
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
532
631
|
"div",
|
|
533
632
|
{
|
|
534
|
-
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] font-medium text-sm",
|
|
633
|
+
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] font-medium text-sm",
|
|
535
634
|
onClick: (e) => {
|
|
536
|
-
subOption.
|
|
635
|
+
subOption.onClick && options.onClick();
|
|
537
636
|
}
|
|
538
637
|
},
|
|
539
638
|
subOption.label
|
|
540
639
|
);
|
|
541
640
|
})));
|
|
542
641
|
})));
|
|
543
|
-
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
544
|
-
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-
|
|
545
|
-
}))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] 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] dark:text-[#
|
|
642
|
+
})), /* @__PURE__ */ import_react11.default.createElement("div", { className: "border-t border-[#e5e5e5] dark:border-[#303036] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
643
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ import_react11.default.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, item.label));
|
|
644
|
+
}))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ import_react11.default.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] 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] dark:text-[#f4f4f5cc]" }, role))), /* @__PURE__ */ import_react11.default.createElement("div", { className: "text-[#18181b] dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ import_react11.default.createElement(import_lucide_react5.LogOut, null)))));
|
|
546
645
|
};
|
|
547
646
|
|
|
548
647
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -559,9 +658,9 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
559
658
|
};
|
|
560
659
|
}, [open]);
|
|
561
660
|
const handleClose = () => {
|
|
562
|
-
|
|
661
|
+
setVisible(false);
|
|
563
662
|
setTimeout(() => {
|
|
564
|
-
|
|
663
|
+
setOpen(false);
|
|
565
664
|
callBack();
|
|
566
665
|
}, 200);
|
|
567
666
|
};
|
|
@@ -570,7 +669,7 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
570
669
|
"div",
|
|
571
670
|
{
|
|
572
671
|
className: `absolute flex flex-col right-0 top-0 min-h-full min-w-[100%] md:min-w-[576px] bg-white
|
|
573
|
-
${
|
|
672
|
+
${visible ? "sheetRightSlide" : "transition-all duration-200 translate-x-[100%]"} justify-between `,
|
|
574
673
|
onClick: (e) => e.stopPropagation()
|
|
575
674
|
},
|
|
576
675
|
/* @__PURE__ */ import_react12.default.createElement("div", { className: "bg-white min-h-full " }, children),
|
package/dist/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ var CustomButton = ({
|
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
28
|
className: cn(
|
|
29
|
-
`cursor-pointer flex items-center py-2 px-3 min-h-10 justify-center border rounded-[6px] border-[#e5e5e5] gap-2`,
|
|
29
|
+
`cursor-pointer flex items-center py-2 px-3 min-h-10 justify-center border rounded-[6px] border-[#e5e5e5] dark:border-[#303036] ${variant == "DANGER" ? "bg-[#ef4444]" : "dark:bg-[#1d1d20]"} gap-2`,
|
|
30
30
|
variantStyles[variant],
|
|
31
31
|
className
|
|
32
32
|
),
|
|
@@ -244,7 +244,7 @@ var CustomInput = ({
|
|
|
244
244
|
return /* @__PURE__ */ React6.createElement("div", { className: "flex flex-col gap-1 w-full" }, heading && /* @__PURE__ */ React6.createElement("h3", { className: "text-lg font-semibold" }, heading), /* @__PURE__ */ React6.createElement(
|
|
245
245
|
"label",
|
|
246
246
|
{
|
|
247
|
-
className: `font-[500] text-sm ${heading ? "text-[#737373]" : "text-black"}`
|
|
247
|
+
className: `font-[500] text-sm ${heading ? "text-[#737373]" : "text-black"} dark:text-white`
|
|
248
248
|
},
|
|
249
249
|
label,
|
|
250
250
|
" ",
|
|
@@ -252,8 +252,9 @@ var CustomInput = ({
|
|
|
252
252
|
), /* @__PURE__ */ React6.createElement(
|
|
253
253
|
"input",
|
|
254
254
|
{
|
|
255
|
-
className: `border
|
|
256
|
-
focus:outline-2 outline-black outline-offset-2
|
|
255
|
+
className: `border border-gray-200 rounded-md h-10 px-4 py-2 w-full text-[14px]
|
|
256
|
+
focus:outline-2 outline-black dark:outline-white outline-offset-2
|
|
257
|
+
dark:bg-transparent dark:text-white dark:border-[#303036]
|
|
257
258
|
${disabled ? "bg-gray-100 cursor-not-allowed text-gray-500 border-gray-300" : error ? "border-red-500 bg-red-50" : "bg-white border-[hsl(0_0%_89.8%)]"}
|
|
258
259
|
`,
|
|
259
260
|
value,
|
|
@@ -397,41 +398,139 @@ import React11 from "react";
|
|
|
397
398
|
// ConstantUI.js
|
|
398
399
|
import { Home, BaggageClaim, Users, Banknote, Globe, TrendingUp, FileText, FileKey2, LifeBuoy, Cog, Building, Handshake, DollarSign } from "lucide-react";
|
|
399
400
|
var navItemsConstant = [
|
|
400
|
-
{
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
401
|
+
{
|
|
402
|
+
Icon: Home,
|
|
403
|
+
label: "Home",
|
|
404
|
+
onClick: () => {
|
|
405
|
+
window.location.href = "/";
|
|
406
|
+
},
|
|
407
|
+
isDropDown: false
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
Icon: Handshake,
|
|
411
|
+
label: "Supplier Ecosystem",
|
|
412
|
+
onClick: () => {
|
|
413
|
+
},
|
|
414
|
+
isDropDown: true,
|
|
415
|
+
options: [
|
|
416
|
+
{ label: "Suppliers", onClick: () => {
|
|
417
|
+
window.location.href = "/supplier/";
|
|
418
|
+
} }
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
Icon: Building,
|
|
423
|
+
label: "Consumer Ecosystem",
|
|
424
|
+
onClick: () => {
|
|
425
|
+
},
|
|
426
|
+
options: [
|
|
427
|
+
{
|
|
428
|
+
label: "Corporate",
|
|
429
|
+
onClick: () => {
|
|
430
|
+
window.location.href = "/corporate/";
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
{ label: "Trips", onClick: () => {
|
|
434
|
+
window.location.href = "/trips/";
|
|
435
|
+
} },
|
|
436
|
+
{ label: "Reports", onClick: () => {
|
|
437
|
+
window.location.href = "/reports/";
|
|
438
|
+
} },
|
|
439
|
+
{
|
|
440
|
+
label: "Tags",
|
|
441
|
+
onClick: () => {
|
|
442
|
+
window.location.href = "/tags/";
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
isDropDown: true
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
Icon: Banknote,
|
|
450
|
+
label: "Finance",
|
|
451
|
+
onClick: () => {
|
|
452
|
+
},
|
|
453
|
+
isDropDown: true,
|
|
454
|
+
options: [
|
|
455
|
+
{ label: "Invoices", onClick: () => {
|
|
456
|
+
window.location.href = "/invoices/";
|
|
457
|
+
} },
|
|
458
|
+
{ label: "Ledger", onClick: () => {
|
|
459
|
+
window.location.href = "/ledger/";
|
|
460
|
+
} },
|
|
461
|
+
{ label: "Payments", onClick: () => {
|
|
462
|
+
window.location.href = "/payments/";
|
|
463
|
+
} }
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
Icon: DollarSign,
|
|
468
|
+
label: "Revenue Management",
|
|
469
|
+
onClick: () => {
|
|
470
|
+
},
|
|
471
|
+
isDropDown: true,
|
|
472
|
+
options: [
|
|
473
|
+
{
|
|
474
|
+
label: "Pricing Policy",
|
|
475
|
+
onClick: () => {
|
|
476
|
+
window.location.href = "/pricing/";
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
{ label: "Offers", onClick: () => {
|
|
480
|
+
window.location.href = "/offers/";
|
|
481
|
+
} },
|
|
482
|
+
{ label: "Vouchers", onClick: () => {
|
|
483
|
+
window.location.href = "/vouchers/";
|
|
484
|
+
} },
|
|
485
|
+
{ label: "Supplier Deals", onClick: () => {
|
|
486
|
+
window.location.href = "/supplierdeals/";
|
|
487
|
+
} },
|
|
488
|
+
{
|
|
489
|
+
label: "Subscription Plans",
|
|
490
|
+
onClick: () => {
|
|
491
|
+
window.location.href = "/subscription/";
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
Icon: Cog,
|
|
498
|
+
label: "Settings",
|
|
499
|
+
onClick: () => {
|
|
500
|
+
},
|
|
501
|
+
isDropDown: true,
|
|
502
|
+
options: [
|
|
503
|
+
{
|
|
504
|
+
label: "Admin user Management",
|
|
505
|
+
isDropDown: true,
|
|
506
|
+
onClick: () => {
|
|
507
|
+
},
|
|
508
|
+
options: [
|
|
509
|
+
{ label: "Admin Users", onClick: () => {
|
|
510
|
+
window.location.href = "/users/";
|
|
511
|
+
} },
|
|
512
|
+
{ label: "Admin User Attributes", onClick: () => {
|
|
513
|
+
} }
|
|
514
|
+
]
|
|
515
|
+
},
|
|
516
|
+
{ label: "TMC Markets", onClick: () => {
|
|
517
|
+
window.location.href = "/market/";
|
|
518
|
+
} },
|
|
519
|
+
{ label: "Permissions", onClick: () => {
|
|
520
|
+
window.location.href = "/permissions/";
|
|
521
|
+
} },
|
|
522
|
+
{ label: "Report Configurations", onClick: () => {
|
|
523
|
+
window.location.href = "/reports/";
|
|
524
|
+
} },
|
|
525
|
+
{ label: "Whitelabelling", onClick: () => {
|
|
526
|
+
window.location.href = "/whitelabelling/";
|
|
527
|
+
} }
|
|
528
|
+
]
|
|
529
|
+
}
|
|
432
530
|
];
|
|
433
531
|
var additionalItemsConstant = [
|
|
434
|
-
{ Icon: LifeBuoy, label: "Help",
|
|
532
|
+
{ Icon: LifeBuoy, label: "Help", onClick: () => {
|
|
533
|
+
window.location.href = "/help";
|
|
435
534
|
} }
|
|
436
535
|
];
|
|
437
536
|
|
|
@@ -463,39 +562,39 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
463
562
|
const navItemsLocal = navItems ?? navItemsConstant;
|
|
464
563
|
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
465
564
|
const sideBarLogoLocal = sideBarLogo ?? sidebarlogo_default;
|
|
466
|
-
return /* @__PURE__ */ React11.createElement("div", { className: "w-
|
|
467
|
-
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-
|
|
565
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "w-[320px] transition-all ease-in-out delay-100 bg-transparent border-r border-gray-200 dark:border-[#303036] 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 dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ React11.createElement(Globe2, { width: 20, height: 20 }), /* @__PURE__ */ React11.createElement("h3", { className: "text-[#3f3f46cc] dark:text-[#f4f4f5cc] 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) => {
|
|
566
|
+
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer rounded-lg ml-2", onClick: (e) => {
|
|
468
567
|
item.onClick && item.onClick(e);
|
|
469
568
|
handleIconRotate(e, index);
|
|
470
|
-
} }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ React11.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-
|
|
569
|
+
} }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ React11.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, 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) => {
|
|
471
570
|
return /* @__PURE__ */ React11.createElement("div", { className: "" }, /* @__PURE__ */ React11.createElement(
|
|
472
571
|
"div",
|
|
473
572
|
{
|
|
474
|
-
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] cursor-pointer",
|
|
573
|
+
className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] cursor-pointer",
|
|
475
574
|
onClick: (e) => {
|
|
476
|
-
options.
|
|
575
|
+
options.onClick && options.onClick();
|
|
477
576
|
options.isDropDown && handleIconRotate(e, optionsIndex, "subOption");
|
|
478
577
|
}
|
|
479
578
|
},
|
|
480
579
|
/* @__PURE__ */ React11.createElement("div", null),
|
|
481
|
-
/* @__PURE__ */ React11.createElement("span", { className: "font-medium text-sm text-[#3f3f46cc]" }, options.label),
|
|
580
|
+
/* @__PURE__ */ React11.createElement("span", { className: "font-medium text-sm text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, options.label),
|
|
482
581
|
options.isDropDown && /* @__PURE__ */ React11.createElement("div", { className: `ml-auto transition-all delay-75` }, /* @__PURE__ */ React11.createElement(ChevronDown2, { width: 20, height: 20 }))
|
|
483
582
|
), 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) => {
|
|
484
583
|
return /* @__PURE__ */ React11.createElement(
|
|
485
584
|
"div",
|
|
486
585
|
{
|
|
487
|
-
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] font-medium text-sm",
|
|
586
|
+
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] font-medium text-sm",
|
|
488
587
|
onClick: (e) => {
|
|
489
|
-
subOption.
|
|
588
|
+
subOption.onClick && options.onClick();
|
|
490
589
|
}
|
|
491
590
|
},
|
|
492
591
|
subOption.label
|
|
493
592
|
);
|
|
494
593
|
})));
|
|
495
594
|
})));
|
|
496
|
-
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
497
|
-
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-
|
|
498
|
-
}))), /* @__PURE__ */ React11.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] 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] dark:text-[#
|
|
595
|
+
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] dark:border-[#303036] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
596
|
+
return /* @__PURE__ */ React11.createElement("div", { key: index, className: "flex items-center gap-3 p-2 hover:bg-[#f3f4f6] dark:hover:bg-[#27272a] dark:text-[#f4f4f5cc] cursor-pointer", onClick: () => item.onClick && item.onClick() }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20 }), /* @__PURE__ */ React11.createElement("span", { className: "font-medium text-[#3f3f46cc] dark:text-[#f4f4f5cc]" }, item.label));
|
|
597
|
+
}))), /* @__PURE__ */ React11.createElement("div", { className: "mt-auto bg-[#fafafa] dark:bg-transparent sticky bottom-0 pt-2" }, /* @__PURE__ */ React11.createElement("div", { className: "flex items-center justify-between p-2 rounded-lg hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] 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] dark:text-[#f4f4f5cc]" }, role))), /* @__PURE__ */ React11.createElement("div", { className: "text-[#18181b] dark:text-[#f4f4f5cc]" }, /* @__PURE__ */ React11.createElement(LogOut, null)))));
|
|
499
598
|
};
|
|
500
599
|
|
|
501
600
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -512,9 +611,9 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
512
611
|
};
|
|
513
612
|
}, [open]);
|
|
514
613
|
const handleClose = () => {
|
|
515
|
-
|
|
614
|
+
setVisible(false);
|
|
516
615
|
setTimeout(() => {
|
|
517
|
-
|
|
616
|
+
setOpen(false);
|
|
518
617
|
callBack();
|
|
519
618
|
}, 200);
|
|
520
619
|
};
|
|
@@ -523,7 +622,7 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
523
622
|
"div",
|
|
524
623
|
{
|
|
525
624
|
className: `absolute flex flex-col right-0 top-0 min-h-full min-w-[100%] md:min-w-[576px] bg-white
|
|
526
|
-
${
|
|
625
|
+
${visible ? "sheetRightSlide" : "transition-all duration-200 translate-x-[100%]"} justify-between `,
|
|
527
626
|
onClick: (e) => e.stopPropagation()
|
|
528
627
|
},
|
|
529
628
|
/* @__PURE__ */ React12.createElement("div", { className: "bg-white min-h-full " }, children),
|