jett.admin.npmpackage 2.0.2 → 2.0.4
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 +14 -0
- package/dist/index.js +16 -3
- package/dist/index.mjs +17 -3
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
monospace;
|
|
24
24
|
--color-red-50: oklch(97.1% 0.013 17.38);
|
|
25
25
|
--color-red-100: oklch(93.6% 0.032 17.717);
|
|
26
|
+
--color-red-400: oklch(70.4% 0.191 22.216);
|
|
26
27
|
--color-red-500: oklch(63.7% 0.237 25.331);
|
|
27
28
|
--color-red-800: oklch(44.4% 0.177 26.899);
|
|
28
29
|
--color-red-900: oklch(39.6% 0.141 25.723);
|
|
@@ -877,6 +878,9 @@
|
|
|
877
878
|
.text-yellow-800 {
|
|
878
879
|
color: var(--color-yellow-800);
|
|
879
880
|
}
|
|
881
|
+
.opacity-70 {
|
|
882
|
+
opacity: 70%;
|
|
883
|
+
}
|
|
880
884
|
.shadow {
|
|
881
885
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
882
886
|
box-shadow:
|
|
@@ -1230,6 +1234,11 @@
|
|
|
1230
1234
|
background-color: var(--color-yellow-900);
|
|
1231
1235
|
}
|
|
1232
1236
|
}
|
|
1237
|
+
.dark\:\!text-\[\#a1a1aa\] {
|
|
1238
|
+
&:where(.dark, .dark *) {
|
|
1239
|
+
color: #a1a1aa !important;
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1233
1242
|
.dark\:text-\[\#71717a\] {
|
|
1234
1243
|
&:where(.dark, .dark *) {
|
|
1235
1244
|
color: #71717a;
|
|
@@ -1270,6 +1279,11 @@
|
|
|
1270
1279
|
color: var(--color-red-100);
|
|
1271
1280
|
}
|
|
1272
1281
|
}
|
|
1282
|
+
.dark\:text-red-400 {
|
|
1283
|
+
&:where(.dark, .dark *) {
|
|
1284
|
+
color: var(--color-red-400);
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1273
1287
|
.dark\:text-white {
|
|
1274
1288
|
&:where(.dark, .dark *) {
|
|
1275
1289
|
color: var(--color-white);
|
package/dist/index.js
CHANGED
|
@@ -881,6 +881,12 @@ var AppSideBar = ({
|
|
|
881
881
|
return true;
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
+
if (normalizedMenuPath === "/supplierdeals" && normalizedCurrentPath === "/orgselector") {
|
|
885
|
+
const currentPathParam = new URLSearchParams(currentSearch).get("path");
|
|
886
|
+
if (currentPathParam === "supplier-deals") {
|
|
887
|
+
return true;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
884
890
|
if (normalizedMenuPath === "/trips") {
|
|
885
891
|
if (normalizedCurrentPath.startsWith("/tripdetails") || normalizedCurrentPath.startsWith("/offline")) {
|
|
886
892
|
return true;
|
|
@@ -1081,14 +1087,21 @@ var AppSideBar = ({
|
|
|
1081
1087
|
const subMenuKey = `menu-${index}-option-${optionsIndex}`;
|
|
1082
1088
|
const isSubMenuOpen = isMenuOpen(subMenuKey);
|
|
1083
1089
|
const isSubActive = activeMenuPath === subMenuKey || (activeMenuPath == null ? void 0 : activeMenuPath.startsWith(`${subMenuKey}-`));
|
|
1090
|
+
const isDisabled = options.isDisabled;
|
|
1084
1091
|
return /* @__PURE__ */ import_react12.default.createElement("div", { key: optionsIndex, className: "" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
1085
1092
|
"div",
|
|
1086
1093
|
{
|
|
1087
|
-
className: `flex items-center gap-3 py-2 px-3 ml-4 mr-2 hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] text-gray-600 dark:text-[#a1a1aa] cursor-pointer
|
|
1088
|
-
onClick: (e) =>
|
|
1094
|
+
className: `group flex items-center gap-3 py-2 px-3 ml-4 mr-2 rounded-md transition-colors duration-200 ${isDisabled ? "cursor-not-allowed opacity-70 text-gray-400 dark:text-gray-500" : `hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] text-gray-600 dark:text-[#a1a1aa] cursor-pointer ${isSubActive ? "bg-[#f4f4f5] dark:bg-[#27272a]" : ""}`}`,
|
|
1095
|
+
onClick: (e) => {
|
|
1096
|
+
if (isDisabled) {
|
|
1097
|
+
e.preventDefault();
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
handleSubMenuClick(options, optionsIndex, index, e);
|
|
1101
|
+
}
|
|
1089
1102
|
},
|
|
1090
1103
|
/* @__PURE__ */ import_react12.default.createElement("div", null),
|
|
1091
|
-
/* @__PURE__ */ import_react12.default.createElement("span", { className:
|
|
1104
|
+
/* @__PURE__ */ import_react12.default.createElement("span", { className: `!font-medium !text-[15px] ${isDisabled ? "!text-[#3f3f46cc] dark:!text-[#a1a1aa]" : "!text-[#3f3f46cc] dark:!text-[#a1a1aa]"}` }, options.label),
|
|
1092
1105
|
options.isDropDown && /* @__PURE__ */ import_react12.default.createElement(
|
|
1093
1106
|
"div",
|
|
1094
1107
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -393,6 +393,7 @@ var CustomUpload = ({
|
|
|
393
393
|
// src/sideBar/SideBar.jsx
|
|
394
394
|
import {
|
|
395
395
|
ChevronDown as ChevronDown3,
|
|
396
|
+
CircleSlash,
|
|
396
397
|
Globe,
|
|
397
398
|
LogOut,
|
|
398
399
|
Menu,
|
|
@@ -847,6 +848,12 @@ var AppSideBar = ({
|
|
|
847
848
|
return true;
|
|
848
849
|
}
|
|
849
850
|
}
|
|
851
|
+
if (normalizedMenuPath === "/supplierdeals" && normalizedCurrentPath === "/orgselector") {
|
|
852
|
+
const currentPathParam = new URLSearchParams(currentSearch).get("path");
|
|
853
|
+
if (currentPathParam === "supplier-deals") {
|
|
854
|
+
return true;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
850
857
|
if (normalizedMenuPath === "/trips") {
|
|
851
858
|
if (normalizedCurrentPath.startsWith("/tripdetails") || normalizedCurrentPath.startsWith("/offline")) {
|
|
852
859
|
return true;
|
|
@@ -1047,14 +1054,21 @@ var AppSideBar = ({
|
|
|
1047
1054
|
const subMenuKey = `menu-${index}-option-${optionsIndex}`;
|
|
1048
1055
|
const isSubMenuOpen = isMenuOpen(subMenuKey);
|
|
1049
1056
|
const isSubActive = activeMenuPath === subMenuKey || (activeMenuPath == null ? void 0 : activeMenuPath.startsWith(`${subMenuKey}-`));
|
|
1057
|
+
const isDisabled = options.isDisabled;
|
|
1050
1058
|
return /* @__PURE__ */ React12.createElement("div", { key: optionsIndex, className: "" }, /* @__PURE__ */ React12.createElement(
|
|
1051
1059
|
"div",
|
|
1052
1060
|
{
|
|
1053
|
-
className: `flex items-center gap-3 py-2 px-3 ml-4 mr-2 hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] text-gray-600 dark:text-[#a1a1aa] cursor-pointer
|
|
1054
|
-
onClick: (e) =>
|
|
1061
|
+
className: `group flex items-center gap-3 py-2 px-3 ml-4 mr-2 rounded-md transition-colors duration-200 ${isDisabled ? "cursor-not-allowed opacity-70 text-gray-400 dark:text-gray-500" : `hover:bg-[#f4f4f5] dark:hover:bg-[#27272a] text-gray-600 dark:text-[#a1a1aa] cursor-pointer ${isSubActive ? "bg-[#f4f4f5] dark:bg-[#27272a]" : ""}`}`,
|
|
1062
|
+
onClick: (e) => {
|
|
1063
|
+
if (isDisabled) {
|
|
1064
|
+
e.preventDefault();
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
handleSubMenuClick(options, optionsIndex, index, e);
|
|
1068
|
+
}
|
|
1055
1069
|
},
|
|
1056
1070
|
/* @__PURE__ */ React12.createElement("div", null),
|
|
1057
|
-
/* @__PURE__ */ React12.createElement("span", { className:
|
|
1071
|
+
/* @__PURE__ */ React12.createElement("span", { className: `!font-medium !text-[15px] ${isDisabled ? "!text-[#3f3f46cc] dark:!text-[#a1a1aa]" : "!text-[#3f3f46cc] dark:!text-[#a1a1aa]"}` }, options.label),
|
|
1058
1072
|
options.isDropDown && /* @__PURE__ */ React12.createElement(
|
|
1059
1073
|
"div",
|
|
1060
1074
|
{
|