labsense-ui-kit 1.2.92 → 1.2.94

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.js CHANGED
@@ -9274,86 +9274,71 @@ var ProgressBar = function ProgressBar(_ref3) {
9274
9274
  };
9275
9275
 
9276
9276
  var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$7, _templateObject7$5;
9277
- var SidebarContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width: ", ";\n max-width: ", ";\n height: 100vh;\n background: ", ";\n transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n align-items: start;\n padding: 20px;\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n z-index: 10;\n justify-content: space-between;\n"])), function (_ref) {
9278
- var $isExpanded = _ref.$isExpanded;
9279
- return $isExpanded ? 'max-content' : '68px';
9280
- }, function (_ref2) {
9281
- var $isExpanded = _ref2.$isExpanded;
9282
- return $isExpanded ? '400px' : '68px';
9283
- }, function (_ref3) {
9284
- var $background = _ref3.$background,
9285
- theme = _ref3.theme;
9277
+ var SidebarContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width: 68px;\n max-width: 68px;\n height: 100vh;\n background: ", ";\n transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n align-items: start;\n padding: 20px;\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n z-index: 10;\n justify-content: space-between;\n\n /* Expand on hover */\n &:hover {\n width: max-content;\n max-width: 400px;\n\n /* You can also add a class for children */\n span, .expandable {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n }\n"])), function (_ref) {
9278
+ var $background = _ref.$background,
9279
+ theme = _ref.theme;
9286
9280
  return $background || theme.vms.accent.softBlue;
9287
9281
  });
9288
- var SidebarLink = styled__default(reactRouterDom.NavLink)(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n text-decoration: none;\n transition: none;\n padding: ", ";\n color: ", ";\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n\n /* Active link state */\n &.active {\n color: ", ";\n background: ", ";\n \n /* Make icons white when active */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref4) {
9289
- var $padding = _ref4.$padding;
9282
+ var SidebarLink = styled__default(reactRouterDom.NavLink)(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n text-decoration: none;\n transition: none;\n padding: ", ";\n color: ", ";\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n\n /* Active link state */\n &.active {\n color: ", ";\n background: ", ";\n \n /* Make icons white when active */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref2) {
9283
+ var $padding = _ref2.$padding;
9290
9284
  return $padding;
9285
+ }, function (_ref3) {
9286
+ var theme = _ref3.theme;
9287
+ return theme.vms.text.medium;
9288
+ }, function (_ref4) {
9289
+ var theme = _ref4.theme;
9290
+ return theme.vms.text.white;
9291
9291
  }, function (_ref5) {
9292
9292
  var theme = _ref5.theme;
9293
- return theme.vms.text.medium;
9293
+ return theme.vms["default"].primary;
9294
9294
  }, function (_ref6) {
9295
9295
  var theme = _ref6.theme;
9296
9296
  return theme.vms.text.white;
9297
9297
  }, function (_ref7) {
9298
9298
  var theme = _ref7.theme;
9299
- return theme.vms["default"].primary;
9299
+ return theme.vms.text.white;
9300
9300
  }, function (_ref8) {
9301
9301
  var theme = _ref8.theme;
9302
- return theme.vms.text.white;
9302
+ return theme.vms["default"].primary;
9303
9303
  }, function (_ref9) {
9304
9304
  var theme = _ref9.theme;
9305
9305
  return theme.vms.text.white;
9306
- }, function (_ref10) {
9307
- var theme = _ref10.theme;
9308
- return theme.vms["default"].primary;
9309
- }, function (_ref11) {
9310
- var theme = _ref11.theme;
9311
- return theme.vms.text.white;
9312
9306
  });
9313
- var IconWrapper$2 = styled__default.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n background: ", ";\n transition: none;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref12) {
9314
- var $selected = _ref12.$selected,
9315
- theme = _ref12.theme;
9307
+ var IconWrapper$2 = styled__default.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n background: ", ";\n transition: none;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref10) {
9308
+ var $selected = _ref10.$selected,
9309
+ theme = _ref10.theme;
9316
9310
  return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
9317
9311
  });
9318
- var StyledContainer = styled__default(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n \n &:hover {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n \n &.active {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref13) {
9319
- var theme = _ref13.theme;
9312
+ var StyledContainer = styled__default(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n \n &:hover {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n \n &.active {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref11) {
9313
+ var theme = _ref11.theme;
9320
9314
  return theme.vms.text.white;
9321
- }, function (_ref14) {
9322
- var theme = _ref14.theme;
9315
+ }, function (_ref12) {
9316
+ var theme = _ref12.theme;
9323
9317
  return theme.vms.text.white;
9324
9318
  });
9325
9319
  var Logo = styled__default.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n display: flex;\n width: 100%;\n min-width: max-content;\n height: 32px;\n align-items: center;\n justify-content: center;\n gap: 10px;\n"])));
9326
- var TextContainer = styled__default.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n opacity: ", ";\n visibility: ", ";\n transition: none;\n transform: ", ";\n"])), function (_ref15) {
9327
- var $padding = _ref15.$padding;
9320
+ var TextContainer = styled__default.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: all 0.3s ease;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n\n ", ":hover & {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n"])), function (_ref13) {
9321
+ var $padding = _ref13.$padding;
9328
9322
  return $padding;
9329
- }, function (_ref16) {
9330
- var $fontSize = _ref16.$fontSize;
9323
+ }, function (_ref14) {
9324
+ var $fontSize = _ref14.$fontSize;
9331
9325
  return $fontSize || '20px';
9332
- }, function (_ref17) {
9333
- var $fontWeight = _ref17.$fontWeight;
9326
+ }, function (_ref15) {
9327
+ var $fontWeight = _ref15.$fontWeight;
9334
9328
  return $fontWeight || '500';
9335
- }, function (_ref18) {
9336
- var $isExpanded = _ref18.$isExpanded;
9337
- return $isExpanded ? 1 : 0;
9338
- }, function (_ref19) {
9339
- var $isExpanded = _ref19.$isExpanded;
9340
- return $isExpanded ? 'visible' : 'hidden';
9341
- }, function (_ref20) {
9342
- var $isExpanded = _ref20.$isExpanded;
9343
- return $isExpanded ? 'translateX(0)' : 'translateX(-10px)';
9344
- });
9345
- var NotificationBadge = styled__default.div(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteralLoose(["\n position: ", ";\n top: -4px;\n right: -4px;\n background: red;\n color: white;\n font-size: 10px;\n font-weight: bold;\n border-radius: 50%;\n padding: 2px 5px;\n min-width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref21) {
9346
- var $position = _ref21.$position;
9329
+ }, SidebarContainer);
9330
+ var NotificationBadge = styled__default.div(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteralLoose(["\n position: ", ";\n top: -4px;\n right: -4px;\n background: red;\n color: white;\n font-size: 10px;\n font-weight: bold;\n border-radius: 50%;\n padding: 2px 5px;\n min-width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref16) {
9331
+ var $position = _ref16.$position;
9347
9332
  return $position || 'absolute';
9348
9333
  });
9349
- var Sidebar = function Sidebar(_ref22) {
9350
- var logo = _ref22.logo,
9351
- content = _ref22.content,
9352
- background = _ref22.background,
9353
- ProfileContent = _ref22.ProfileContent,
9354
- _ref22$isExpanded = _ref22.isExpanded,
9355
- isExpanded = _ref22$isExpanded === void 0 ? false : _ref22$isExpanded,
9356
- setIsExpanded = _ref22.setIsExpanded;
9334
+ var Sidebar = function Sidebar(_ref17) {
9335
+ var logo = _ref17.logo,
9336
+ content = _ref17.content,
9337
+ background = _ref17.background,
9338
+ ProfileContent = _ref17.ProfileContent,
9339
+ _ref17$isExpanded = _ref17.isExpanded,
9340
+ isExpanded = _ref17$isExpanded === void 0 ? false : _ref17$isExpanded,
9341
+ setIsExpanded = _ref17.setIsExpanded;
9357
9342
  var location = reactRouterDom.useLocation();
9358
9343
  var _useState = React.useState({}),
9359
9344
  openMenus = _useState[0],
@@ -9391,9 +9376,8 @@ var Sidebar = function Sidebar(_ref22) {
9391
9376
  return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
9392
9377
  }));
9393
9378
  };
9394
- var ChildLink = React__default.memo(function (_ref23) {
9395
- var child = _ref23.child,
9396
- isExpanded = _ref23.isExpanded;
9379
+ var ChildLink = React__default.memo(function (_ref18) {
9380
+ var child = _ref18.child;
9397
9381
  var themeColors = styled.useTheme();
9398
9382
  var location = reactRouterDom.useLocation();
9399
9383
  var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
@@ -9411,6 +9395,7 @@ var Sidebar = function Sidebar(_ref22) {
9411
9395
  }, React__default.createElement(IconWrapper$2, {
9412
9396
  "$selected": active
9413
9397
  }, React__default.createElement(Icon, {
9398
+ cursor: 'pointer',
9414
9399
  icon: child.icon,
9415
9400
  size: 18,
9416
9401
  weight: child.iconWeight,
@@ -9420,7 +9405,6 @@ var Sidebar = function Sidebar(_ref22) {
9420
9405
  "$justifyContent": 'space-between',
9421
9406
  "$gap": '5px'
9422
9407
  }, React__default.createElement(TextContainer, {
9423
- "$isExpanded": isExpanded,
9424
9408
  "$fontSize": '12px'
9425
9409
  }, child.label), _getTotalNotifications(child) > 0 && React__default.createElement(NotificationBadge, {
9426
9410
  "$position": 'unset'
@@ -9439,14 +9423,14 @@ var Sidebar = function Sidebar(_ref22) {
9439
9423
  });
9440
9424
  }));
9441
9425
  };
9442
- var SidebarItem = React__default.memo(function (_ref24) {
9443
- var item = _ref24.item,
9444
- isActive = _ref24.isActive,
9445
- isOpen = _ref24.isOpen,
9446
- hasChildren = _ref24.hasChildren,
9447
- isExpanded = _ref24.isExpanded,
9448
- onToggle = _ref24.onToggle,
9449
- renderChildLinks = _ref24.renderChildLinks;
9426
+ var SidebarItem = React__default.memo(function (_ref19) {
9427
+ var item = _ref19.item,
9428
+ isActive = _ref19.isActive,
9429
+ isOpen = _ref19.isOpen,
9430
+ hasChildren = _ref19.hasChildren,
9431
+ isExpanded = _ref19.isExpanded,
9432
+ onToggle = _ref19.onToggle,
9433
+ renderChildLinks = _ref19.renderChildLinks;
9450
9434
  var themeColors = styled.useTheme();
9451
9435
  var activeClass = isActive ? 'active' : '';
9452
9436
  var handleClick = React__default.useCallback(function () {
@@ -9475,21 +9459,21 @@ var Sidebar = function Sidebar(_ref22) {
9475
9459
  }, React__default.createElement(IconWrapper$2, {
9476
9460
  "$selected": !!isActive
9477
9461
  }, React__default.createElement(Icon, {
9462
+ cursor: 'pointer',
9478
9463
  icon: item.icon,
9479
9464
  size: 20,
9480
9465
  weight: item.iconWeight,
9481
9466
  color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
9482
9467
  })), _getTotalNotifications(item) > 0 && React__default.createElement(NotificationBadge, null, _getTotalNotifications(item) > 99 ? '99+' : _getTotalNotifications(item))), React__default.createElement(TextContainer, {
9483
- "$isExpanded": isExpanded,
9484
9468
  "$fontSize": '14px'
9485
9469
  }, item.label)), hasChildren && React__default.createElement(Container, {
9486
9470
  "$padding": '9px',
9487
9471
  "$opacity": isExpanded ? 1 : 0
9488
9472
  }, React__default.createElement(Icon, {
9473
+ cursor: 'pointer',
9489
9474
  icon: isOpen ? 'UpArrow' : 'DownArrow',
9490
9475
  size: 10,
9491
- color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium,
9492
- cursor: 'pointer'
9476
+ color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
9493
9477
  })));
9494
9478
  var handleNavClick = React__default.useCallback(function (e) {
9495
9479
  if (item.url === location.pathname) {
@@ -9524,7 +9508,6 @@ var Sidebar = function Sidebar(_ref22) {
9524
9508
  }, [setIsExpanded]);
9525
9509
  return React__default.createElement(SidebarContainer, {
9526
9510
  "$background": background,
9527
- "$isExpanded": isExpanded,
9528
9511
  onMouseEnter: function onMouseEnter() {
9529
9512
  return handleSidebarExpansion(true);
9530
9513
  },
@@ -9534,14 +9517,12 @@ var Sidebar = function Sidebar(_ref22) {
9534
9517
  }, React__default.createElement(Container, {
9535
9518
  "$flexDirection": 'column',
9536
9519
  "$gap": '28px',
9537
- "$width": '100%'
9520
+ "$width": '100%',
9521
+ "$overflow": 'hidden'
9538
9522
  }, logo && (logo.icon ? React__default.createElement(Logo, null, React__default.createElement(Icon, {
9539
9523
  icon: logo.icon,
9540
9524
  color: logo.iconColor
9541
- }), React__default.createElement(TextContainer, {
9542
- "$isExpanded": isExpanded,
9543
- "$fontWeight": '700'
9544
- }, logo.name)) : logo.imageDetails && React__default.createElement(Logo, null, React__default.createElement("img", {
9525
+ }), React__default.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React__default.createElement(Logo, null, React__default.createElement("img", {
9545
9526
  src: logo.imageDetails.url,
9546
9527
  alt: logo.imageDetails.altText,
9547
9528
  width: logo.imageDetails.width,