jett.admin.npmpackage 1.0.9 → 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 +6 -3
- package/dist/index.js +58 -32
- package/dist/index.mjs +59 -33
- package/dist/sidebarLogo-S4TNJORM.webp +0 -0
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -305,9 +305,6 @@
|
|
|
305
305
|
.ml-\[20px\] {
|
|
306
306
|
margin-left: 20px;
|
|
307
307
|
}
|
|
308
|
-
.ml-\[40px\] {
|
|
309
|
-
margin-left: 40px;
|
|
310
|
-
}
|
|
311
308
|
.ml-auto {
|
|
312
309
|
margin-left: auto;
|
|
313
310
|
}
|
|
@@ -344,6 +341,9 @@
|
|
|
344
341
|
.h-\[90px\] {
|
|
345
342
|
height: 90px;
|
|
346
343
|
}
|
|
344
|
+
.h-\[100vh\] {
|
|
345
|
+
height: 100vh;
|
|
346
|
+
}
|
|
347
347
|
.h-auto {
|
|
348
348
|
height: auto;
|
|
349
349
|
}
|
|
@@ -356,6 +356,9 @@
|
|
|
356
356
|
.max-h-60 {
|
|
357
357
|
max-height: calc(var(--spacing) * 60);
|
|
358
358
|
}
|
|
359
|
+
.max-h-\[100vh\] {
|
|
360
|
+
max-height: 100vh;
|
|
361
|
+
}
|
|
359
362
|
.min-h-10 {
|
|
360
363
|
min-height: calc(var(--spacing) * 10);
|
|
361
364
|
}
|
package/dist/index.js
CHANGED
|
@@ -443,39 +443,48 @@ var import_lucide_react4 = require("lucide-react");
|
|
|
443
443
|
var navItemsConstant = [
|
|
444
444
|
{ Icon: import_lucide_react4.Home, label: "Home", onClick: () => {
|
|
445
445
|
}, isDropDown: false },
|
|
446
|
-
{ Icon: import_lucide_react4.
|
|
447
|
-
}, isDropDown:
|
|
448
|
-
{ Icon: import_lucide_react4.Users, label: "Admin Users", onClick: () => {
|
|
449
|
-
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
450
|
-
} }, { label: "Role", onclick: () => {
|
|
446
|
+
{ Icon: import_lucide_react4.Handshake, label: "Supplier Ecosystem", onClick: () => {
|
|
447
|
+
}, isDropDown: true, options: [{ label: "Suppliers", onClick: () => {
|
|
451
448
|
} }] },
|
|
452
|
-
{ Icon: import_lucide_react4.
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
}, isDropDown:
|
|
458
|
-
{ Icon: import_lucide_react4.
|
|
459
|
-
}, isDropDown: true, options: [{ label: "
|
|
460
|
-
} }, { label: "
|
|
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: () => {
|
|
461
466
|
} }] },
|
|
462
|
-
{ Icon: import_lucide_react4.
|
|
463
|
-
}, isDropDown: true
|
|
464
|
-
|
|
465
|
-
}
|
|
466
|
-
} }, { label: "
|
|
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: () => {
|
|
467
475
|
} }] }
|
|
468
476
|
];
|
|
469
477
|
var additionalItemsConstant = [
|
|
470
|
-
{ Icon: import_lucide_react4.LifeBuoy, label: "
|
|
471
|
-
} },
|
|
472
|
-
{ Icon: import_lucide_react4.Cog, label: "Settings", onclick: () => {
|
|
478
|
+
{ Icon: import_lucide_react4.LifeBuoy, label: "Help", onclick: () => {
|
|
473
479
|
} }
|
|
474
480
|
];
|
|
475
481
|
|
|
482
|
+
// src/assests/logo/sidebarlogo.webp
|
|
483
|
+
var sidebarlogo_default = "./sidebarlogo-S4TNJORM.webp";
|
|
484
|
+
|
|
476
485
|
// src/sideBar/SideBar.jsx
|
|
477
486
|
var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) => {
|
|
478
|
-
const handleIconRotate = (e, index) => {
|
|
487
|
+
const handleIconRotate = (e, index, additionalKey) => {
|
|
479
488
|
let dropDownIcon = e.currentTarget.children[2];
|
|
480
489
|
if (!dropDownIcon) return;
|
|
481
490
|
if (dropDownIcon.classList.contains("rotate-180")) {
|
|
@@ -484,7 +493,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
484
493
|
dropDownIcon.classList.add("transition-all");
|
|
485
494
|
dropDownIcon.classList.add("rotate-180");
|
|
486
495
|
}
|
|
487
|
-
const optionsContainer = document.getElementById(`dropDownOptions-${index}`);
|
|
496
|
+
const optionsContainer = document.getElementById(`dropDownOptions-${index}${additionalKey ? `-${additionalKey}` : ""}`);
|
|
488
497
|
if (!optionsContainer) return;
|
|
489
498
|
optionsContainer.classList.add("transition-all");
|
|
490
499
|
if (optionsContainer.classList.contains("max-h-0")) {
|
|
@@ -497,23 +506,40 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
497
506
|
};
|
|
498
507
|
const navItemsLocal = navItems ?? navItemsConstant;
|
|
499
508
|
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
500
|
-
|
|
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) => {
|
|
501
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) => {
|
|
502
512
|
item.onClick && item.onClick(e);
|
|
503
513
|
handleIconRotate(e, index);
|
|
504
|
-
} }, /* @__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-[
|
|
505
|
-
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(
|
|
506
516
|
"div",
|
|
507
517
|
{
|
|
508
|
-
className: "p-2
|
|
509
|
-
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
|
+
}
|
|
510
523
|
},
|
|
511
|
-
|
|
512
|
-
|
|
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
|
+
})));
|
|
513
539
|
})));
|
|
514
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) => {
|
|
515
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));
|
|
516
|
-
})), /* @__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" }))));
|
|
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" }))));
|
|
517
543
|
};
|
|
518
544
|
|
|
519
545
|
// src/RightSheet/RightSheet.jsx
|
package/dist/index.mjs
CHANGED
|
@@ -392,43 +392,52 @@ import { ChevronDown as ChevronDown2, Globe as Globe2, LogOut } from "lucide-rea
|
|
|
392
392
|
import React11 from "react";
|
|
393
393
|
|
|
394
394
|
// ConstantUI.js
|
|
395
|
-
import { Home, BaggageClaim, Users, Banknote, Globe, TrendingUp, FileText, FileKey2, LifeBuoy, Cog } from "lucide-react";
|
|
395
|
+
import { Home, BaggageClaim, Users, Banknote, Globe, TrendingUp, FileText, FileKey2, LifeBuoy, Cog, Building, Handshake, DollarSign } from "lucide-react";
|
|
396
396
|
var navItemsConstant = [
|
|
397
397
|
{ Icon: Home, label: "Home", onClick: () => {
|
|
398
398
|
}, isDropDown: false },
|
|
399
|
-
{ Icon:
|
|
400
|
-
}, isDropDown:
|
|
401
|
-
{ Icon: Users, label: "Admin Users", onClick: () => {
|
|
402
|
-
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
403
|
-
} }, { label: "Role", onclick: () => {
|
|
399
|
+
{ Icon: Handshake, label: "Supplier Ecosystem", onClick: () => {
|
|
400
|
+
}, isDropDown: true, options: [{ label: "Suppliers", onClick: () => {
|
|
404
401
|
} }] },
|
|
405
|
-
{ Icon:
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
|
|
410
|
-
}, isDropDown:
|
|
411
|
-
{ Icon:
|
|
412
|
-
}, isDropDown: true, options: [{ label: "
|
|
413
|
-
} }, { label: "
|
|
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: () => {
|
|
414
419
|
} }] },
|
|
415
|
-
{ Icon:
|
|
416
|
-
}, isDropDown: true
|
|
417
|
-
|
|
418
|
-
}
|
|
419
|
-
} }, { label: "
|
|
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: () => {
|
|
420
428
|
} }] }
|
|
421
429
|
];
|
|
422
430
|
var additionalItemsConstant = [
|
|
423
|
-
{ Icon: LifeBuoy, label: "
|
|
424
|
-
} },
|
|
425
|
-
{ Icon: Cog, label: "Settings", onclick: () => {
|
|
431
|
+
{ Icon: LifeBuoy, label: "Help", onclick: () => {
|
|
426
432
|
} }
|
|
427
433
|
];
|
|
428
434
|
|
|
435
|
+
// src/assests/logo/sidebarlogo.webp
|
|
436
|
+
var sidebarlogo_default = "./sidebarlogo-S4TNJORM.webp";
|
|
437
|
+
|
|
429
438
|
// src/sideBar/SideBar.jsx
|
|
430
439
|
var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) => {
|
|
431
|
-
const handleIconRotate = (e, index) => {
|
|
440
|
+
const handleIconRotate = (e, index, additionalKey) => {
|
|
432
441
|
let dropDownIcon = e.currentTarget.children[2];
|
|
433
442
|
if (!dropDownIcon) return;
|
|
434
443
|
if (dropDownIcon.classList.contains("rotate-180")) {
|
|
@@ -437,7 +446,7 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
437
446
|
dropDownIcon.classList.add("transition-all");
|
|
438
447
|
dropDownIcon.classList.add("rotate-180");
|
|
439
448
|
}
|
|
440
|
-
const optionsContainer = document.getElementById(`dropDownOptions-${index}`);
|
|
449
|
+
const optionsContainer = document.getElementById(`dropDownOptions-${index}${additionalKey ? `-${additionalKey}` : ""}`);
|
|
441
450
|
if (!optionsContainer) return;
|
|
442
451
|
optionsContainer.classList.add("transition-all");
|
|
443
452
|
if (optionsContainer.classList.contains("max-h-0")) {
|
|
@@ -450,23 +459,40 @@ var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) =>
|
|
|
450
459
|
};
|
|
451
460
|
const navItemsLocal = navItems ?? navItemsConstant;
|
|
452
461
|
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
453
|
-
|
|
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) => {
|
|
454
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) => {
|
|
455
465
|
item.onClick && item.onClick(e);
|
|
456
466
|
handleIconRotate(e, index);
|
|
457
|
-
} }, /* @__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-[
|
|
458
|
-
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(
|
|
459
469
|
"div",
|
|
460
470
|
{
|
|
461
|
-
className: "p-2
|
|
462
|
-
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
|
+
}
|
|
463
476
|
},
|
|
464
|
-
|
|
465
|
-
|
|
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
|
+
})));
|
|
466
492
|
})));
|
|
467
493
|
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
468
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));
|
|
469
|
-
})), /* @__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" }))));
|
|
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" }))));
|
|
470
496
|
};
|
|
471
497
|
|
|
472
498
|
// src/RightSheet/RightSheet.jsx
|
|
Binary file
|