@visns-studio/visns-components 4.10.10 → 4.10.11

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/package.json CHANGED
@@ -75,7 +75,7 @@
75
75
  "react-dom": "^17.0.0 || ^18.0.0"
76
76
  },
77
77
  "name": "@visns-studio/visns-components",
78
- "version": "4.10.10",
78
+ "version": "4.10.11",
79
79
  "description": "Various packages to assist in the development of our Custom Applications.",
80
80
  "main": "src/index.js",
81
81
  "files": [
@@ -236,6 +236,10 @@ function Navigation({
236
236
  };
237
237
 
238
238
  const renderSetting = (n) => {
239
+ const isActive = location.pathname === n.url; // Check if current path matches setting URL
240
+
241
+ console.info(location.pathname, n);
242
+
239
243
  const iconComponents = {
240
244
  bug: Bug,
241
245
  calendar: Calendar,
@@ -245,15 +249,18 @@ function Navigation({
245
249
  signOut: SignOut,
246
250
  };
247
251
 
252
+ const IconComponent = iconComponents[n.icon];
253
+ const settingClasses = isActive ? `${styles.active}` : ''; // Add active class if URLs match
254
+
248
255
  if (n.id === 'notifications') {
249
256
  return (
250
- <li>
257
+ <li className={settingClasses}>
251
258
  <Notification setSystemAuth={setSystemAuth} />
252
259
  </li>
253
260
  );
254
261
  } else if (n.id === 'switchAccount') {
255
262
  return (
256
- <li>
263
+ <li className={settingClasses}>
257
264
  <SwitchAccount
258
265
  setSystemAuth={setSystemAuth}
259
266
  setting={n}
@@ -262,9 +269,8 @@ function Navigation({
262
269
  </li>
263
270
  );
264
271
  } else if (n.id === 'logout') {
265
- const IconComponent = iconComponents[n.icon];
266
272
  return (
267
- <li>
273
+ <li className={settingClasses}>
268
274
  <button
269
275
  title={n.label}
270
276
  data-tooltip-id="system-tooltip"
@@ -276,10 +282,8 @@ function Navigation({
276
282
  </li>
277
283
  );
278
284
  } else {
279
- const IconComponent = iconComponents[n.icon];
280
-
281
285
  return (
282
- <li>
286
+ <li className={settingClasses}>
283
287
  <Link
284
288
  to={n.url}
285
289
  data-tooltip-id="system-tooltip"
@@ -22,31 +22,6 @@
22
22
  }
23
23
  }
24
24
 
25
- .vs-datagrid--row:hover {
26
- .InovuaReactDataGrid__row-cell-wrap {
27
- background: rgb(240, 240, 240) !important;
28
- cursor: pointer;
29
- }
30
- }
31
-
32
- .InovuaReactDataGrid {
33
- letter-spacing: 0.015rem !important;
34
- color: black !important;
35
- }
36
-
37
- .InovuaReactDataGrid__header {
38
- color: var(--primary-color) !important;
39
- }
40
-
41
- .InovuaReactDataGrid__row-hover-target:hover {
42
- color: black !important;
43
- background: rgb(240, 240, 240) !important;
44
- }
45
-
46
- .InovuaReactDataGrid__row:hover {
47
- cursor: pointer;
48
- }
49
-
50
25
  #smartTableSearchInput {
51
26
  background: #eeeeee;
52
27
  border: 1px solid rgba(var(--table-color-rgb), 1.1);
@@ -238,12 +238,15 @@
238
238
  align-items: center;
239
239
  }
240
240
 
241
- > ul a:hover {
241
+ /* Hover and Active States for <a> */
242
+ > ul a:hover,
243
+ > ul a.active {
242
244
  background: var(--primary-color-lighter);
243
245
  transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
244
246
  }
245
247
 
246
- > ul a:hover svg {
248
+ > ul a:hover svg,
249
+ > ul a.active svg {
247
250
  color: var(--highlight-color);
248
251
  transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
249
252
  }
@@ -263,12 +266,15 @@
263
266
  appearance: none;
264
267
  }
265
268
 
266
- button:hover {
269
+ /* Hover and Active States for button */
270
+ button:hover,
271
+ button.active {
267
272
  background: var(--primary-color-lighter);
268
273
  transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
269
274
  }
270
275
 
271
- button:hover svg {
276
+ button:hover svg,
277
+ button.active svg {
272
278
  color: var(--highlight-color);
273
279
  transition: all 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
274
280
  }