labsense-ui-kit 1.4.24 → 1.4.26

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.
@@ -9928,7 +9928,8 @@ var ButtonDropdown = function ButtonDropdown(_ref) {
9928
9928
  placeholder = _ref$placeholder === void 0 ? 'Select Option' : _ref$placeholder,
9929
9929
  _ref$disabled = _ref.disabled,
9930
9930
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
9931
- width = _ref.width;
9931
+ width = _ref.width,
9932
+ dropDownPosition = _ref.dropDownPosition;
9932
9933
  var _useState = useState(false),
9933
9934
  isOpen = _useState[0],
9934
9935
  setIsOpen = _useState[1];
@@ -9958,15 +9959,17 @@ var ButtonDropdown = function ButtonDropdown(_ref) {
9958
9959
  } else {
9959
9960
  setDropUp(false);
9960
9961
  }
9961
- var dropdownWidth = rect.width;
9962
- var spaceRight = windowWidth - rect.left;
9963
- var spaceLeft = rect.right;
9964
- if (spaceRight < dropdownWidth && spaceLeft > dropdownWidth) {
9965
- setDropdownPosition('right');
9966
- } else if (rect.left < dropdownWidth / 2 && windowWidth - rect.right < dropdownWidth / 2) {
9967
- setDropdownPosition('center');
9968
- } else {
9969
- setDropdownPosition('left');
9962
+ if (!dropDownPosition) {
9963
+ var dropdownWidth = rect.width;
9964
+ var spaceRight = windowWidth - rect.left;
9965
+ var spaceLeft = rect.right;
9966
+ if (spaceRight < dropdownWidth && spaceLeft > dropdownWidth) {
9967
+ setDropdownPosition('right');
9968
+ } else if (rect.left < dropdownWidth / 2 && windowWidth - rect.right < dropdownWidth / 2) {
9969
+ setDropdownPosition('center');
9970
+ } else {
9971
+ setDropdownPosition('left');
9972
+ }
9970
9973
  }
9971
9974
  }
9972
9975
  setIsOpen(function (prev) {
@@ -9998,7 +10001,7 @@ var ButtonDropdown = function ButtonDropdown(_ref) {
9998
10001
  "$top": dropUp ? 'auto' : '126%',
9999
10002
  "$bottom": dropUp ? '126%' : 'auto',
10000
10003
  "$optionsAvailable": options.length > 0,
10001
- "$dropDownPosition": dropdownPosition
10004
+ "$dropDownPosition": dropDownPosition || dropdownPosition
10002
10005
  }, options.map(function (option) {
10003
10006
  return React.createElement(Options, {
10004
10007
  key: option.value,
@@ -11595,7 +11598,7 @@ var SidebarContainer = styled.div(_templateObject3$c || (_templateObject3$c = _t
11595
11598
  var $isMobileOpen = _ref7.$isMobileOpen;
11596
11599
  return $isMobileOpen ? 'visible' : 'hidden';
11597
11600
  });
11598
- var SidebarLink = styled(NavLink)(_templateObject4$9 || (_templateObject4$9 = _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 (_ref8) {
11601
+ var SidebarLink = styled(NavLink)(_templateObject4$9 || (_templateObject4$9 = _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 /* Remove all transitions for instant color changes */\n * {\n transition: none !important;\n }\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\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 }\n }\n"])), function (_ref8) {
11599
11602
  var $padding = _ref8.$padding;
11600
11603
  return $padding;
11601
11604
  }, function (_ref9) {
@@ -11620,7 +11623,7 @@ var SidebarLink = styled(NavLink)(_templateObject4$9 || (_templateObject4$9 = _t
11620
11623
  var theme = _ref15.theme;
11621
11624
  return theme.vms.text.white;
11622
11625
  });
11623
- var IconWrapper$2 = styled.div(_templateObject5$8 || (_templateObject5$8 = _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 (_ref16) {
11626
+ var IconWrapper$2 = styled.div(_templateObject5$8 || (_templateObject5$8 = _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\n /* Ensure icons inherit hover color from parent */\n svg {\n transition: none;\n }\n"])), function (_ref16) {
11624
11627
  var $selected = _ref16.$selected,
11625
11628
  theme = _ref16.theme;
11626
11629
  return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
@@ -11642,7 +11645,7 @@ var StyledContainer = styled(Container)(_templateObject6$8 || (_templateObject6$
11642
11645
  return theme.vms.text.medium;
11643
11646
  });
11644
11647
  var Logo = styled(Container)(_templateObject7$6 || (_templateObject7$6 = _taggedTemplateLiteralLoose(["\n transition: none;\n display: flex;\n width: 100%;\n min-width: max-content;\n align-items: center;\n justify-content: center;\n gap: 10px;\n"])));
11645
- var TextContainer = styled.span(_templateObject8$5 || (_templateObject8$5 = _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\n /* Mobile: Always visible when sidebar is open */\n @media (max-width: ", ") {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n"])), function (_ref22) {
11648
+ var TextContainer = styled.span(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 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\n /* Mobile: Always visible when sidebar is open */\n @media (max-width: ", ") {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n"])), function (_ref22) {
11646
11649
  var $padding = _ref22.$padding;
11647
11650
  return $padding;
11648
11651
  }, function (_ref23) {
@@ -11757,7 +11760,6 @@ var Sidebar = function Sidebar(_ref26) {
11757
11760
  };
11758
11761
  var ChildLink = function ChildLink(_ref28) {
11759
11762
  var child = _ref28.child;
11760
- var themeColors = useTheme$1();
11761
11763
  var location = useLocation();
11762
11764
  var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
11763
11765
  var handleClick = useCallback(function (e) {
@@ -11779,7 +11781,7 @@ var Sidebar = function Sidebar(_ref26) {
11779
11781
  icon: child.icon,
11780
11782
  size: 18,
11781
11783
  weight: child.iconWeight,
11782
- color: active ? themeColors.vms.text.white : themeColors.vms.text.medium
11784
+ color: 'currentColor'
11783
11785
  })), React.createElement(Container, {
11784
11786
  "$width": '100%',
11785
11787
  "$justifyContent": 'space-between',
@@ -11855,7 +11857,7 @@ var Sidebar = function Sidebar(_ref26) {
11855
11857
  icon: item.icon,
11856
11858
  size: 20,
11857
11859
  weight: item.iconWeight,
11858
- color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
11860
+ color: 'currentColor'
11859
11861
  })), getTotalNotifications(item) > 0 && createPortal(React.createElement(NotificationBadge, {
11860
11862
  id: "badge-" + item.id,
11861
11863
  style: {
@@ -11870,7 +11872,7 @@ var Sidebar = function Sidebar(_ref26) {
11870
11872
  cursor: 'pointer',
11871
11873
  icon: isOpen ? 'UpArrow' : 'DownArrow',
11872
11874
  size: 10,
11873
- color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
11875
+ color: 'currentColor'
11874
11876
  })));
11875
11877
  var handleNavClick = useCallback(function (e) {
11876
11878
  if (item.url === location.pathname) {