jett.admin.npmpackage 1.0.7 → 1.0.9
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 +117 -15
- package/dist/index.js +48 -9
- package/dist/index.mjs +48 -9
- package/package.json +4 -2
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;
|
|
@@ -254,15 +251,27 @@
|
|
|
254
251
|
.absolute {
|
|
255
252
|
position: absolute;
|
|
256
253
|
}
|
|
254
|
+
.fixed {
|
|
255
|
+
position: fixed;
|
|
256
|
+
}
|
|
257
257
|
.relative {
|
|
258
258
|
position: relative;
|
|
259
259
|
}
|
|
260
260
|
.sticky {
|
|
261
261
|
position: sticky;
|
|
262
262
|
}
|
|
263
|
+
.inset-0 {
|
|
264
|
+
inset: calc(var(--spacing) * 0);
|
|
265
|
+
}
|
|
266
|
+
.top-0 {
|
|
267
|
+
top: calc(var(--spacing) * 0);
|
|
268
|
+
}
|
|
263
269
|
.top-full {
|
|
264
270
|
top: 100%;
|
|
265
271
|
}
|
|
272
|
+
.right-0 {
|
|
273
|
+
right: calc(var(--spacing) * 0);
|
|
274
|
+
}
|
|
266
275
|
.bottom-0 {
|
|
267
276
|
bottom: calc(var(--spacing) * 0);
|
|
268
277
|
}
|
|
@@ -293,6 +302,9 @@
|
|
|
293
302
|
.mb-6 {
|
|
294
303
|
margin-bottom: calc(var(--spacing) * 6);
|
|
295
304
|
}
|
|
305
|
+
.ml-\[20px\] {
|
|
306
|
+
margin-left: 20px;
|
|
307
|
+
}
|
|
296
308
|
.ml-\[40px\] {
|
|
297
309
|
margin-left: 40px;
|
|
298
310
|
}
|
|
@@ -311,6 +323,9 @@
|
|
|
311
323
|
.inline-flex {
|
|
312
324
|
display: inline-flex;
|
|
313
325
|
}
|
|
326
|
+
.table {
|
|
327
|
+
display: table;
|
|
328
|
+
}
|
|
314
329
|
.h-2 {
|
|
315
330
|
height: calc(var(--spacing) * 2);
|
|
316
331
|
}
|
|
@@ -323,6 +338,12 @@
|
|
|
323
338
|
.h-10 {
|
|
324
339
|
height: calc(var(--spacing) * 10);
|
|
325
340
|
}
|
|
341
|
+
.h-\[40px\] {
|
|
342
|
+
height: 40px;
|
|
343
|
+
}
|
|
344
|
+
.h-\[90px\] {
|
|
345
|
+
height: 90px;
|
|
346
|
+
}
|
|
326
347
|
.h-auto {
|
|
327
348
|
height: auto;
|
|
328
349
|
}
|
|
@@ -341,6 +362,9 @@
|
|
|
341
362
|
.min-h-\[50px\] {
|
|
342
363
|
min-height: 50px;
|
|
343
364
|
}
|
|
365
|
+
.min-h-full {
|
|
366
|
+
min-height: 100%;
|
|
367
|
+
}
|
|
344
368
|
.w-4 {
|
|
345
369
|
width: calc(var(--spacing) * 4);
|
|
346
370
|
}
|
|
@@ -353,21 +377,33 @@
|
|
|
353
377
|
.w-11 {
|
|
354
378
|
width: calc(var(--spacing) * 11);
|
|
355
379
|
}
|
|
356
|
-
.w-24 {
|
|
357
|
-
width: calc(var(--spacing) * 24);
|
|
358
|
-
}
|
|
359
380
|
.w-72 {
|
|
360
381
|
width: calc(var(--spacing) * 72);
|
|
361
382
|
}
|
|
383
|
+
.w-\[108px\] {
|
|
384
|
+
width: 108px;
|
|
385
|
+
}
|
|
362
386
|
.w-full {
|
|
363
387
|
width: 100%;
|
|
364
388
|
}
|
|
389
|
+
.min-w-\[100\%\] {
|
|
390
|
+
min-width: 100%;
|
|
391
|
+
}
|
|
365
392
|
.flex-1 {
|
|
366
393
|
flex: 1;
|
|
367
394
|
}
|
|
368
395
|
.shrink-0 {
|
|
369
396
|
flex-shrink: 0;
|
|
370
397
|
}
|
|
398
|
+
.table-fixed {
|
|
399
|
+
table-layout: fixed;
|
|
400
|
+
}
|
|
401
|
+
.caption-bottom {
|
|
402
|
+
caption-side: bottom;
|
|
403
|
+
}
|
|
404
|
+
.border-collapse {
|
|
405
|
+
border-collapse: collapse;
|
|
406
|
+
}
|
|
371
407
|
.translate-x-1 {
|
|
372
408
|
--tw-translate-x: calc(var(--spacing) * 1);
|
|
373
409
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -376,6 +412,10 @@
|
|
|
376
412
|
--tw-translate-x: calc(var(--spacing) * 6);
|
|
377
413
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
378
414
|
}
|
|
415
|
+
.translate-x-\[100\%\] {
|
|
416
|
+
--tw-translate-x: 100%;
|
|
417
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
418
|
+
}
|
|
379
419
|
.rotate-180 {
|
|
380
420
|
rotate: 180deg;
|
|
381
421
|
}
|
|
@@ -394,6 +434,9 @@
|
|
|
394
434
|
.flex-col {
|
|
395
435
|
flex-direction: column;
|
|
396
436
|
}
|
|
437
|
+
.flex-col-reverse {
|
|
438
|
+
flex-direction: column-reverse;
|
|
439
|
+
}
|
|
397
440
|
.flex-wrap {
|
|
398
441
|
flex-wrap: wrap;
|
|
399
442
|
}
|
|
@@ -423,9 +466,18 @@
|
|
|
423
466
|
text-overflow: ellipsis;
|
|
424
467
|
white-space: nowrap;
|
|
425
468
|
}
|
|
469
|
+
.overflow-auto {
|
|
470
|
+
overflow: auto;
|
|
471
|
+
}
|
|
426
472
|
.overflow-hidden {
|
|
427
473
|
overflow: hidden;
|
|
428
474
|
}
|
|
475
|
+
.overflow-x-auto {
|
|
476
|
+
overflow-x: auto;
|
|
477
|
+
}
|
|
478
|
+
.overflow-x-hidden {
|
|
479
|
+
overflow-x: hidden;
|
|
480
|
+
}
|
|
429
481
|
.overflow-y-auto {
|
|
430
482
|
overflow-y: auto;
|
|
431
483
|
}
|
|
@@ -474,6 +526,9 @@
|
|
|
474
526
|
.border-\[\#e5e5e5\] {
|
|
475
527
|
border-color: #e5e5e5;
|
|
476
528
|
}
|
|
529
|
+
.border-\[\#e6e6e6\] {
|
|
530
|
+
border-color: #e6e6e6;
|
|
531
|
+
}
|
|
477
532
|
.border-\[hsl\(0_0\%_89\.8\%\)\] {
|
|
478
533
|
border-color: hsl(0 0% 89.8%);
|
|
479
534
|
}
|
|
@@ -492,9 +547,18 @@
|
|
|
492
547
|
.border-red-500 {
|
|
493
548
|
border-color: var(--color-red-500);
|
|
494
549
|
}
|
|
550
|
+
.bg-\[\#fafafa\] {
|
|
551
|
+
background-color: #fafafa;
|
|
552
|
+
}
|
|
495
553
|
.bg-black {
|
|
496
554
|
background-color: var(--color-black);
|
|
497
555
|
}
|
|
556
|
+
.bg-black\/80 {
|
|
557
|
+
background-color: color-mix(in srgb, #000 80%, transparent);
|
|
558
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
559
|
+
background-color: color-mix(in oklab, var(--color-black) 80%, transparent);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
498
562
|
.bg-blue-600 {
|
|
499
563
|
background-color: var(--color-blue-600);
|
|
500
564
|
}
|
|
@@ -555,15 +619,20 @@
|
|
|
555
619
|
.py-2 {
|
|
556
620
|
padding-block: calc(var(--spacing) * 2);
|
|
557
621
|
}
|
|
622
|
+
.py-3 {
|
|
623
|
+
padding-block: calc(var(--spacing) * 3);
|
|
624
|
+
}
|
|
558
625
|
.pt-2 {
|
|
559
626
|
padding-top: calc(var(--spacing) * 2);
|
|
560
627
|
}
|
|
561
628
|
.text-center {
|
|
562
629
|
text-align: center;
|
|
563
630
|
}
|
|
564
|
-
.text-
|
|
565
|
-
|
|
566
|
-
|
|
631
|
+
.text-left {
|
|
632
|
+
text-align: left;
|
|
633
|
+
}
|
|
634
|
+
.text-right {
|
|
635
|
+
text-align: right;
|
|
567
636
|
}
|
|
568
637
|
.text-lg {
|
|
569
638
|
font-size: var(--text-lg);
|
|
@@ -599,10 +668,6 @@
|
|
|
599
668
|
--tw-font-weight: 600;
|
|
600
669
|
font-weight: 600;
|
|
601
670
|
}
|
|
602
|
-
.font-bold {
|
|
603
|
-
--tw-font-weight: var(--font-weight-bold);
|
|
604
|
-
font-weight: var(--font-weight-bold);
|
|
605
|
-
}
|
|
606
671
|
.font-medium {
|
|
607
672
|
--tw-font-weight: var(--font-weight-medium);
|
|
608
673
|
font-weight: var(--font-weight-medium);
|
|
@@ -611,8 +676,8 @@
|
|
|
611
676
|
--tw-font-weight: var(--font-weight-semibold);
|
|
612
677
|
font-weight: var(--font-weight-semibold);
|
|
613
678
|
}
|
|
614
|
-
.text-\[\#
|
|
615
|
-
color: #
|
|
679
|
+
.text-\[\#3f3f46cc\] {
|
|
680
|
+
color: #3f3f46cc;
|
|
616
681
|
}
|
|
617
682
|
.text-\[\#737373\] {
|
|
618
683
|
color: #737373;
|
|
@@ -731,6 +796,10 @@
|
|
|
731
796
|
.delay-75 {
|
|
732
797
|
transition-delay: 75ms;
|
|
733
798
|
}
|
|
799
|
+
.duration-200 {
|
|
800
|
+
--tw-duration: 200ms;
|
|
801
|
+
transition-duration: 200ms;
|
|
802
|
+
}
|
|
734
803
|
.duration-300 {
|
|
735
804
|
--tw-duration: 300ms;
|
|
736
805
|
transition-duration: 300ms;
|
|
@@ -779,6 +848,13 @@
|
|
|
779
848
|
}
|
|
780
849
|
}
|
|
781
850
|
}
|
|
851
|
+
.hover\:bg-\[\#f4f4f5\] {
|
|
852
|
+
&:hover {
|
|
853
|
+
@media (hover: hover) {
|
|
854
|
+
background-color: #f4f4f5;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
782
858
|
.hover\:bg-gray-100 {
|
|
783
859
|
&:hover {
|
|
784
860
|
@media (hover: hover) {
|
|
@@ -842,6 +918,30 @@
|
|
|
842
918
|
outline-style: none;
|
|
843
919
|
}
|
|
844
920
|
}
|
|
921
|
+
.sm\:flex-row {
|
|
922
|
+
@media (width >= 40rem) {
|
|
923
|
+
flex-direction: row;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
.sm\:justify-end {
|
|
927
|
+
@media (width >= 40rem) {
|
|
928
|
+
justify-content: flex-end;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
.sm\:space-x-2 {
|
|
932
|
+
@media (width >= 40rem) {
|
|
933
|
+
:where(& > :not(:last-child)) {
|
|
934
|
+
--tw-space-x-reverse: 0;
|
|
935
|
+
margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));
|
|
936
|
+
margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
.md\:min-w-\[576px\] {
|
|
941
|
+
@media (width >= 48rem) {
|
|
942
|
+
min-width: 576px;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
845
945
|
}
|
|
846
946
|
@property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }
|
|
847
947
|
@property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }
|
|
@@ -870,6 +970,7 @@
|
|
|
870
970
|
@property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
|
|
871
971
|
@property --tw-duration { syntax: "*"; inherits: false; }
|
|
872
972
|
@property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
|
|
973
|
+
@property --tw-space-x-reverse { syntax: "*"; inherits: false; initial-value: 0; }
|
|
873
974
|
@layer properties {
|
|
874
975
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
875
976
|
*,
|
|
@@ -903,6 +1004,7 @@
|
|
|
903
1004
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
904
1005
|
--tw-duration: initial;
|
|
905
1006
|
--tw-outline-style: solid;
|
|
1007
|
+
--tw-space-x-reverse: 0;
|
|
906
1008
|
}
|
|
907
1009
|
}
|
|
908
1010
|
}
|
package/dist/index.js
CHANGED
|
@@ -435,9 +435,46 @@ 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
|
-
|
|
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.BaggageClaim, label: "Trips", onClick: () => {
|
|
447
|
+
}, isDropDown: false },
|
|
448
|
+
{ Icon: import_lucide_react4.Users, label: "Admin Users", onClick: () => {
|
|
449
|
+
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
450
|
+
} }, { label: "Role", onclick: () => {
|
|
451
|
+
} }] },
|
|
452
|
+
{ Icon: import_lucide_react4.Banknote, label: "Corporate", onClick: () => {
|
|
453
|
+
}, isDropDown: false },
|
|
454
|
+
{ Icon: import_lucide_react4.Globe, label: "TMC Entities", onClick: () => {
|
|
455
|
+
}, isDropDown: false },
|
|
456
|
+
{ Icon: import_lucide_react4.Globe, label: "Reports", onClick: () => {
|
|
457
|
+
}, isDropDown: false },
|
|
458
|
+
{ Icon: import_lucide_react4.TrendingUp, label: "Revenue Management", onClick: () => {
|
|
459
|
+
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
460
|
+
} }, { label: "Role", onclick: () => {
|
|
461
|
+
} }] },
|
|
462
|
+
{ Icon: import_lucide_react4.FileText, label: "Finance", onClick: () => {
|
|
463
|
+
}, isDropDown: true },
|
|
464
|
+
{ Icon: import_lucide_react4.FileKey2, label: "Master Configuration", onClick: () => {
|
|
465
|
+
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
466
|
+
} }, { label: "Role", onclick: () => {
|
|
467
|
+
} }] }
|
|
468
|
+
];
|
|
469
|
+
var additionalItemsConstant = [
|
|
470
|
+
{ Icon: import_lucide_react4.LifeBuoy, label: "Support", onclick: () => {
|
|
471
|
+
} },
|
|
472
|
+
{ Icon: import_lucide_react4.Cog, label: "Settings", onclick: () => {
|
|
473
|
+
} }
|
|
474
|
+
];
|
|
475
|
+
|
|
476
|
+
// src/sideBar/SideBar.jsx
|
|
477
|
+
var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) => {
|
|
441
478
|
const handleIconRotate = (e, index) => {
|
|
442
479
|
let dropDownIcon = e.currentTarget.children[2];
|
|
443
480
|
if (!dropDownIcon) return;
|
|
@@ -458,23 +495,25 @@ var AppSideBar = ({ sideBarHeading, username, role, navItems, additionalItems })
|
|
|
458
495
|
optionsContainer.classList.add("max-h-0");
|
|
459
496
|
}
|
|
460
497
|
};
|
|
461
|
-
|
|
498
|
+
const navItemsLocal = navItems ?? navItemsConstant;
|
|
499
|
+
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
500
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { className: "w-72 bg-[#fafafa] border-r border-gray-200 flex flex-col p-4 h-full" }, /* @__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: sideBarLogo, 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", null, navItemsLocal == null ? void 0 : navItemsLocal.map((item, index) => {
|
|
462
501
|
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
502
|
item.onClick && item.onClick(e);
|
|
464
503
|
handleIconRotate(e, index);
|
|
465
|
-
} }, /* @__PURE__ */ import_react11.default.createElement(item.Icon, { width: 20, height: 20, color: "
|
|
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-[40px] max-h-0 overflow-hidden flex flex-col", id: `dropDownOptions-${index}` }, item.options.map((options) => {
|
|
466
505
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
467
506
|
"div",
|
|
468
507
|
{
|
|
469
|
-
className: "p-2 rounded-lg hover:bg-gray-100 text-
|
|
508
|
+
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] font-medium text-sm",
|
|
470
509
|
onClick: () => options.onclick && options.onclick()
|
|
471
510
|
},
|
|
472
511
|
options.label
|
|
473
512
|
);
|
|
474
513
|
})));
|
|
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-
|
|
514
|
+
})), /* @__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
|
+
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" }))));
|
|
478
517
|
};
|
|
479
518
|
|
|
480
519
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -520,7 +559,7 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
520
559
|
// src/Table/CustomTable.jsx
|
|
521
560
|
var import_react13 = __toESM(require("react"));
|
|
522
561
|
var CustomTable = ({ tableHeader, setIsAllChecked, isAllChecked, children }) => {
|
|
523
|
-
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" }, /* @__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: "
|
|
562
|
+
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: () => {
|
|
524
563
|
setIsAllChecked(!isAllChecked);
|
|
525
564
|
} })), tableHeader.map((header, index) => {
|
|
526
565
|
return /* @__PURE__ */ import_react13.default.createElement("th", { className: `px-4 py-3 text-sm font-medium ${index == tableHeader.length - 1 ? "text-right" : "text-left"}`, key: header + index }, header);
|
package/dist/index.mjs
CHANGED
|
@@ -388,9 +388,46 @@ 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
|
-
|
|
393
|
+
|
|
394
|
+
// ConstantUI.js
|
|
395
|
+
import { Home, BaggageClaim, Users, Banknote, Globe, TrendingUp, FileText, FileKey2, LifeBuoy, Cog } from "lucide-react";
|
|
396
|
+
var navItemsConstant = [
|
|
397
|
+
{ Icon: Home, label: "Home", onClick: () => {
|
|
398
|
+
}, isDropDown: false },
|
|
399
|
+
{ Icon: BaggageClaim, label: "Trips", onClick: () => {
|
|
400
|
+
}, isDropDown: false },
|
|
401
|
+
{ Icon: Users, label: "Admin Users", onClick: () => {
|
|
402
|
+
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
403
|
+
} }, { label: "Role", onclick: () => {
|
|
404
|
+
} }] },
|
|
405
|
+
{ Icon: Banknote, label: "Corporate", onClick: () => {
|
|
406
|
+
}, isDropDown: false },
|
|
407
|
+
{ Icon: Globe, label: "TMC Entities", onClick: () => {
|
|
408
|
+
}, isDropDown: false },
|
|
409
|
+
{ Icon: Globe, label: "Reports", onClick: () => {
|
|
410
|
+
}, isDropDown: false },
|
|
411
|
+
{ Icon: TrendingUp, label: "Revenue Management", onClick: () => {
|
|
412
|
+
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
413
|
+
} }, { label: "Role", onclick: () => {
|
|
414
|
+
} }] },
|
|
415
|
+
{ Icon: FileText, label: "Finance", onClick: () => {
|
|
416
|
+
}, isDropDown: true },
|
|
417
|
+
{ Icon: FileKey2, label: "Master Configuration", onClick: () => {
|
|
418
|
+
}, isDropDown: true, options: [{ label: "Users", onclick: () => {
|
|
419
|
+
} }, { label: "Role", onclick: () => {
|
|
420
|
+
} }] }
|
|
421
|
+
];
|
|
422
|
+
var additionalItemsConstant = [
|
|
423
|
+
{ Icon: LifeBuoy, label: "Support", onclick: () => {
|
|
424
|
+
} },
|
|
425
|
+
{ Icon: Cog, label: "Settings", onclick: () => {
|
|
426
|
+
} }
|
|
427
|
+
];
|
|
428
|
+
|
|
429
|
+
// src/sideBar/SideBar.jsx
|
|
430
|
+
var AppSideBar = ({ username, role, navItems, additionalItems, sideBarLogo }) => {
|
|
394
431
|
const handleIconRotate = (e, index) => {
|
|
395
432
|
let dropDownIcon = e.currentTarget.children[2];
|
|
396
433
|
if (!dropDownIcon) return;
|
|
@@ -411,23 +448,25 @@ var AppSideBar = ({ sideBarHeading, username, role, navItems, additionalItems })
|
|
|
411
448
|
optionsContainer.classList.add("max-h-0");
|
|
412
449
|
}
|
|
413
450
|
};
|
|
414
|
-
|
|
451
|
+
const navItemsLocal = navItems ?? navItemsConstant;
|
|
452
|
+
const additionalItemsLocal = additionalItems ?? additionalItemsConstant;
|
|
453
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "w-72 bg-[#fafafa] border-r border-gray-200 flex flex-col p-4 h-full" }, /* @__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: sideBarLogo, 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", null, navItemsLocal == null ? void 0 : navItemsLocal.map((item, index) => {
|
|
415
454
|
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
455
|
item.onClick && item.onClick(e);
|
|
417
456
|
handleIconRotate(e, index);
|
|
418
|
-
} }, /* @__PURE__ */ React11.createElement(item.Icon, { width: 20, height: 20, color: "
|
|
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-[40px] max-h-0 overflow-hidden flex flex-col", id: `dropDownOptions-${index}` }, item.options.map((options) => {
|
|
419
458
|
return /* @__PURE__ */ React11.createElement(
|
|
420
459
|
"div",
|
|
421
460
|
{
|
|
422
|
-
className: "p-2 rounded-lg hover:bg-gray-100 text-
|
|
461
|
+
className: "p-2 rounded-lg hover:bg-gray-100 text-[#3f3f46cc] font-medium text-sm",
|
|
423
462
|
onClick: () => options.onclick && options.onclick()
|
|
424
463
|
},
|
|
425
464
|
options.label
|
|
426
465
|
);
|
|
427
466
|
})));
|
|
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-
|
|
467
|
+
})), /* @__PURE__ */ React11.createElement("div", { className: "border-t border-[#e5e5e5] mt-4" }, (additionalItemsLocal == null ? void 0 : additionalItemsLocal.length) > 0 && additionalItemsLocal.map((item, index) => {
|
|
468
|
+
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" }))));
|
|
431
470
|
};
|
|
432
471
|
|
|
433
472
|
// src/RightSheet/RightSheet.jsx
|
|
@@ -473,7 +512,7 @@ var RightSheet = ({ open, setOpen, children, callBack }) => {
|
|
|
473
512
|
// src/Table/CustomTable.jsx
|
|
474
513
|
import React13 from "react";
|
|
475
514
|
var CustomTable = ({ tableHeader, setIsAllChecked, isAllChecked, children }) => {
|
|
476
|
-
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" }, /* @__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: "
|
|
515
|
+
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: () => {
|
|
477
516
|
setIsAllChecked(!isAllChecked);
|
|
478
517
|
} })), tableHeader.map((header, index) => {
|
|
479
518
|
return /* @__PURE__ */ React13.createElement("th", { className: `px-4 py-3 text-sm font-medium ${index == tableHeader.length - 1 ? "text-right" : "text-left"}`, key: header + index }, header);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jett.admin.npmpackage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "
|
|
17
|
+
"build:css": "postcss src/index.css -o dist/index.css",
|
|
18
|
+
"build": "npm run build:css && tsup src/index.js --format esm,cjs"
|
|
18
19
|
},
|
|
19
20
|
"peerDependencies": {
|
|
20
21
|
"react": ">=18",
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"autoprefixer": "^10.4.21",
|
|
32
33
|
"postcss": "^8.5.6",
|
|
34
|
+
"postcss-cli": "^11.0.1",
|
|
33
35
|
"tailwindcss": "^4.1.13",
|
|
34
36
|
"typescript": "^5.9.2",
|
|
35
37
|
"vite": "^7.1.5"
|