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.
@@ -9270,86 +9270,71 @@ var ProgressBar = function ProgressBar(_ref3) {
9270
9270
  };
9271
9271
 
9272
9272
  var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$7, _templateObject7$5;
9273
- var SidebarContainer = styled.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) {
9274
- var $isExpanded = _ref.$isExpanded;
9275
- return $isExpanded ? 'max-content' : '68px';
9276
- }, function (_ref2) {
9277
- var $isExpanded = _ref2.$isExpanded;
9278
- return $isExpanded ? '400px' : '68px';
9279
- }, function (_ref3) {
9280
- var $background = _ref3.$background,
9281
- theme = _ref3.theme;
9273
+ var SidebarContainer = styled.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) {
9274
+ var $background = _ref.$background,
9275
+ theme = _ref.theme;
9282
9276
  return $background || theme.vms.accent.softBlue;
9283
9277
  });
9284
- var SidebarLink = styled(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) {
9285
- var $padding = _ref4.$padding;
9278
+ var SidebarLink = styled(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) {
9279
+ var $padding = _ref2.$padding;
9286
9280
  return $padding;
9281
+ }, function (_ref3) {
9282
+ var theme = _ref3.theme;
9283
+ return theme.vms.text.medium;
9284
+ }, function (_ref4) {
9285
+ var theme = _ref4.theme;
9286
+ return theme.vms.text.white;
9287
9287
  }, function (_ref5) {
9288
9288
  var theme = _ref5.theme;
9289
- return theme.vms.text.medium;
9289
+ return theme.vms["default"].primary;
9290
9290
  }, function (_ref6) {
9291
9291
  var theme = _ref6.theme;
9292
9292
  return theme.vms.text.white;
9293
9293
  }, function (_ref7) {
9294
9294
  var theme = _ref7.theme;
9295
- return theme.vms["default"].primary;
9295
+ return theme.vms.text.white;
9296
9296
  }, function (_ref8) {
9297
9297
  var theme = _ref8.theme;
9298
- return theme.vms.text.white;
9298
+ return theme.vms["default"].primary;
9299
9299
  }, function (_ref9) {
9300
9300
  var theme = _ref9.theme;
9301
9301
  return theme.vms.text.white;
9302
- }, function (_ref10) {
9303
- var theme = _ref10.theme;
9304
- return theme.vms["default"].primary;
9305
- }, function (_ref11) {
9306
- var theme = _ref11.theme;
9307
- return theme.vms.text.white;
9308
9302
  });
9309
- var IconWrapper$2 = styled.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) {
9310
- var $selected = _ref12.$selected,
9311
- theme = _ref12.theme;
9303
+ var IconWrapper$2 = styled.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) {
9304
+ var $selected = _ref10.$selected,
9305
+ theme = _ref10.theme;
9312
9306
  return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
9313
9307
  });
9314
- var StyledContainer = styled(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) {
9315
- var theme = _ref13.theme;
9308
+ var StyledContainer = styled(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) {
9309
+ var theme = _ref11.theme;
9316
9310
  return theme.vms.text.white;
9317
- }, function (_ref14) {
9318
- var theme = _ref14.theme;
9311
+ }, function (_ref12) {
9312
+ var theme = _ref12.theme;
9319
9313
  return theme.vms.text.white;
9320
9314
  });
9321
9315
  var Logo = styled.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"])));
9322
- var TextContainer = styled.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) {
9323
- var $padding = _ref15.$padding;
9316
+ var TextContainer = styled.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) {
9317
+ var $padding = _ref13.$padding;
9324
9318
  return $padding;
9325
- }, function (_ref16) {
9326
- var $fontSize = _ref16.$fontSize;
9319
+ }, function (_ref14) {
9320
+ var $fontSize = _ref14.$fontSize;
9327
9321
  return $fontSize || '20px';
9328
- }, function (_ref17) {
9329
- var $fontWeight = _ref17.$fontWeight;
9322
+ }, function (_ref15) {
9323
+ var $fontWeight = _ref15.$fontWeight;
9330
9324
  return $fontWeight || '500';
9331
- }, function (_ref18) {
9332
- var $isExpanded = _ref18.$isExpanded;
9333
- return $isExpanded ? 1 : 0;
9334
- }, function (_ref19) {
9335
- var $isExpanded = _ref19.$isExpanded;
9336
- return $isExpanded ? 'visible' : 'hidden';
9337
- }, function (_ref20) {
9338
- var $isExpanded = _ref20.$isExpanded;
9339
- return $isExpanded ? 'translateX(0)' : 'translateX(-10px)';
9340
- });
9341
- var NotificationBadge = styled.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) {
9342
- var $position = _ref21.$position;
9325
+ }, SidebarContainer);
9326
+ var NotificationBadge = styled.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) {
9327
+ var $position = _ref16.$position;
9343
9328
  return $position || 'absolute';
9344
9329
  });
9345
- var Sidebar = function Sidebar(_ref22) {
9346
- var logo = _ref22.logo,
9347
- content = _ref22.content,
9348
- background = _ref22.background,
9349
- ProfileContent = _ref22.ProfileContent,
9350
- _ref22$isExpanded = _ref22.isExpanded,
9351
- isExpanded = _ref22$isExpanded === void 0 ? false : _ref22$isExpanded,
9352
- setIsExpanded = _ref22.setIsExpanded;
9330
+ var Sidebar = function Sidebar(_ref17) {
9331
+ var logo = _ref17.logo,
9332
+ content = _ref17.content,
9333
+ background = _ref17.background,
9334
+ ProfileContent = _ref17.ProfileContent,
9335
+ _ref17$isExpanded = _ref17.isExpanded,
9336
+ isExpanded = _ref17$isExpanded === void 0 ? false : _ref17$isExpanded,
9337
+ setIsExpanded = _ref17.setIsExpanded;
9353
9338
  var location = useLocation();
9354
9339
  var _useState = useState({}),
9355
9340
  openMenus = _useState[0],
@@ -9387,9 +9372,8 @@ var Sidebar = function Sidebar(_ref22) {
9387
9372
  return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
9388
9373
  }));
9389
9374
  };
9390
- var ChildLink = React.memo(function (_ref23) {
9391
- var child = _ref23.child,
9392
- isExpanded = _ref23.isExpanded;
9375
+ var ChildLink = React.memo(function (_ref18) {
9376
+ var child = _ref18.child;
9393
9377
  var themeColors = useTheme$1();
9394
9378
  var location = useLocation();
9395
9379
  var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
@@ -9407,6 +9391,7 @@ var Sidebar = function Sidebar(_ref22) {
9407
9391
  }, React.createElement(IconWrapper$2, {
9408
9392
  "$selected": active
9409
9393
  }, React.createElement(Icon, {
9394
+ cursor: 'pointer',
9410
9395
  icon: child.icon,
9411
9396
  size: 18,
9412
9397
  weight: child.iconWeight,
@@ -9416,7 +9401,6 @@ var Sidebar = function Sidebar(_ref22) {
9416
9401
  "$justifyContent": 'space-between',
9417
9402
  "$gap": '5px'
9418
9403
  }, React.createElement(TextContainer, {
9419
- "$isExpanded": isExpanded,
9420
9404
  "$fontSize": '12px'
9421
9405
  }, child.label), _getTotalNotifications(child) > 0 && React.createElement(NotificationBadge, {
9422
9406
  "$position": 'unset'
@@ -9435,14 +9419,14 @@ var Sidebar = function Sidebar(_ref22) {
9435
9419
  });
9436
9420
  }));
9437
9421
  };
9438
- var SidebarItem = React.memo(function (_ref24) {
9439
- var item = _ref24.item,
9440
- isActive = _ref24.isActive,
9441
- isOpen = _ref24.isOpen,
9442
- hasChildren = _ref24.hasChildren,
9443
- isExpanded = _ref24.isExpanded,
9444
- onToggle = _ref24.onToggle,
9445
- renderChildLinks = _ref24.renderChildLinks;
9422
+ var SidebarItem = React.memo(function (_ref19) {
9423
+ var item = _ref19.item,
9424
+ isActive = _ref19.isActive,
9425
+ isOpen = _ref19.isOpen,
9426
+ hasChildren = _ref19.hasChildren,
9427
+ isExpanded = _ref19.isExpanded,
9428
+ onToggle = _ref19.onToggle,
9429
+ renderChildLinks = _ref19.renderChildLinks;
9446
9430
  var themeColors = useTheme$1();
9447
9431
  var activeClass = isActive ? 'active' : '';
9448
9432
  var handleClick = React.useCallback(function () {
@@ -9471,21 +9455,21 @@ var Sidebar = function Sidebar(_ref22) {
9471
9455
  }, React.createElement(IconWrapper$2, {
9472
9456
  "$selected": !!isActive
9473
9457
  }, React.createElement(Icon, {
9458
+ cursor: 'pointer',
9474
9459
  icon: item.icon,
9475
9460
  size: 20,
9476
9461
  weight: item.iconWeight,
9477
9462
  color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
9478
9463
  })), _getTotalNotifications(item) > 0 && React.createElement(NotificationBadge, null, _getTotalNotifications(item) > 99 ? '99+' : _getTotalNotifications(item))), React.createElement(TextContainer, {
9479
- "$isExpanded": isExpanded,
9480
9464
  "$fontSize": '14px'
9481
9465
  }, item.label)), hasChildren && React.createElement(Container, {
9482
9466
  "$padding": '9px',
9483
9467
  "$opacity": isExpanded ? 1 : 0
9484
9468
  }, React.createElement(Icon, {
9469
+ cursor: 'pointer',
9485
9470
  icon: isOpen ? 'UpArrow' : 'DownArrow',
9486
9471
  size: 10,
9487
- color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium,
9488
- cursor: 'pointer'
9472
+ color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
9489
9473
  })));
9490
9474
  var handleNavClick = React.useCallback(function (e) {
9491
9475
  if (item.url === location.pathname) {
@@ -9520,7 +9504,6 @@ var Sidebar = function Sidebar(_ref22) {
9520
9504
  }, [setIsExpanded]);
9521
9505
  return React.createElement(SidebarContainer, {
9522
9506
  "$background": background,
9523
- "$isExpanded": isExpanded,
9524
9507
  onMouseEnter: function onMouseEnter() {
9525
9508
  return handleSidebarExpansion(true);
9526
9509
  },
@@ -9530,14 +9513,12 @@ var Sidebar = function Sidebar(_ref22) {
9530
9513
  }, React.createElement(Container, {
9531
9514
  "$flexDirection": 'column',
9532
9515
  "$gap": '28px',
9533
- "$width": '100%'
9516
+ "$width": '100%',
9517
+ "$overflow": 'hidden'
9534
9518
  }, logo && (logo.icon ? React.createElement(Logo, null, React.createElement(Icon, {
9535
9519
  icon: logo.icon,
9536
9520
  color: logo.iconColor
9537
- }), React.createElement(TextContainer, {
9538
- "$isExpanded": isExpanded,
9539
- "$fontWeight": '700'
9540
- }, logo.name)) : logo.imageDetails && React.createElement(Logo, null, React.createElement("img", {
9521
+ }), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo, null, React.createElement("img", {
9541
9522
  src: logo.imageDetails.url,
9542
9523
  alt: logo.imageDetails.altText,
9543
9524
  width: logo.imageDetails.width,