labsense-ui-kit 1.3.75 → 1.3.77

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.
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect, useCallback, useState, useId } from 'react';
1
+ import React, { useRef, useEffect, useCallback, useState, useLayoutEffect, useId } from 'react';
2
2
  import styled, { css, useTheme as useTheme$1, keyframes, styled as styled$1 } from 'styled-components';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { toast } from 'react-hot-toast';
@@ -6886,6 +6886,39 @@ var useNotification = function useNotification() {
6886
6886
  };
6887
6887
  };
6888
6888
 
6889
+ var useWindowSize = function useWindowSize() {
6890
+ var _useState = useState([window.innerWidth, window.innerHeight]),
6891
+ size = _useState[0],
6892
+ setSize = _useState[1];
6893
+ useLayoutEffect(function () {
6894
+ function updateSize() {
6895
+ setSize([window.innerWidth, window.innerHeight]);
6896
+ }
6897
+ window.addEventListener('resize', updateSize);
6898
+ updateSize();
6899
+ return function () {
6900
+ return window.removeEventListener('resize', updateSize);
6901
+ };
6902
+ }, []);
6903
+ return size;
6904
+ };
6905
+
6906
+ var breakpoints = {
6907
+ xs: 576,
6908
+ sm: 768,
6909
+ md: 992,
6910
+ lg: 1280
6911
+ };
6912
+ var getResponsiveFlags = function getResponsiveFlags(width) {
6913
+ return {
6914
+ isXS: width < breakpoints.xs,
6915
+ isSM: width < breakpoints.sm && width >= breakpoints.xs,
6916
+ isMD: width < breakpoints.md && width >= breakpoints.sm,
6917
+ isLG: width < breakpoints.lg && width >= breakpoints.md,
6918
+ isXL: width >= breakpoints.lg
6919
+ };
6920
+ };
6921
+
6889
6922
  var _templateObject$3, _templateObject2$3;
6890
6923
  var TooltipWrapper = styled.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n"])));
6891
6924
  var TooltipText = styled.span(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n visibility: ", ";\n opacity: ", ";\n transition: opacity 0.2s ease-in-out;\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: 8px;\n padding: 8px 16px;\n font-size: ", ";\n font-weight: ", ";\n max-width: 300px;\n width: max-content;\n position: fixed;\n z-index: 999;\n pointer-events: none;\n"])), function (_ref) {
@@ -10764,48 +10797,49 @@ var ProgressBar = function ProgressBar(_ref3) {
10764
10797
  }));
10765
10798
  };
10766
10799
 
10767
- var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$8, _templateObject7$6;
10768
- 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: 998;\n justify-content: space-between;\n gap: 24px;\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) {
10769
- var $background = _ref.$background,
10770
- theme = _ref.theme;
10800
+ var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$8, _templateObject7$6, _templateObject8$5, _templateObject9$5;
10801
+ var MOBILE_BREAKPOINT = '768px';
10802
+ var Overlay = styled.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n display: none;\n \n @media (max-width: ", ") {\n display: block;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 997;\n opacity: ", ";\n visibility: ", ";\n transition: opacity 0.3s ease, visibility 0.3s ease;\n }\n"])), MOBILE_BREAKPOINT, function (_ref) {
10803
+ var $isOpen = _ref.$isOpen;
10804
+ return $isOpen ? 1 : 0;
10805
+ }, function (_ref2) {
10806
+ var $isOpen = _ref2.$isOpen;
10807
+ return $isOpen ? 'visible' : 'hidden';
10808
+ });
10809
+ var HamburgerButton = styled.button(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: none;\n \n @media (max-width: ", ") {\n display: flex;\n position: fixed;\n top: 20px;\n left: 20px;\n z-index: 999;\n background: ", ";\n border: none;\n border-radius: 8px;\n padding: 12px;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s ease;\n\n &:active {\n transform: scale(0.95);\n }\n }\n"])), MOBILE_BREAKPOINT, function (_ref3) {
10810
+ var $background = _ref3.$background,
10811
+ theme = _ref3.theme;
10771
10812
  return $background || theme.vms.accent.softBlue;
10772
10813
  });
10773
- 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) {
10774
- var $padding = _ref2.$padding;
10775
- return $padding;
10776
- }, function (_ref3) {
10777
- var theme = _ref3.theme;
10778
- return theme.vms.text.medium;
10779
- }, function (_ref4) {
10780
- var theme = _ref4.theme;
10781
- return theme.vms.text.white;
10782
- }, function (_ref5) {
10783
- var theme = _ref5.theme;
10784
- return theme.vms["default"].primary;
10814
+ var SidebarContainer = styled.div(_templateObject3$c || (_templateObject3$c = _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: 998;\n justify-content: space-between;\n gap: 24px;\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\n /* Mobile styles */\n @media (max-width: ", ") {\n transform: translateX(", ");\n transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n width: 280px;\n max-width: 280px;\n box-shadow: ", ";\n\n /* Always show text on mobile when open */\n span, .expandable {\n opacity: ", ";\n visibility: ", ";\n transform: translateX(0);\n }\n\n /* Disable hover expansion on mobile */\n &:hover {\n width: 280px;\n max-width: 280px;\n }\n }\n"])), function (_ref4) {
10815
+ var $background = _ref4.$background,
10816
+ theme = _ref4.theme;
10817
+ return $background || theme.vms.accent.softBlue;
10818
+ }, MOBILE_BREAKPOINT, function (_ref5) {
10819
+ var $isMobileOpen = _ref5.$isMobileOpen;
10820
+ return $isMobileOpen ? '0' : '-100%';
10785
10821
  }, function (_ref6) {
10786
- var theme = _ref6.theme;
10787
- return theme.vms.text.white;
10822
+ var $isMobileOpen = _ref6.$isMobileOpen;
10823
+ return $isMobileOpen ? '2px 0 8px rgba(0, 0, 0, 0.15)' : 'none';
10788
10824
  }, function (_ref7) {
10789
- var theme = _ref7.theme;
10790
- return theme.vms.text.white;
10825
+ var $isMobileOpen = _ref7.$isMobileOpen;
10826
+ return $isMobileOpen ? 1 : 0;
10791
10827
  }, function (_ref8) {
10792
- var theme = _ref8.theme;
10793
- return theme.vms["default"].primary;
10794
- }, function (_ref9) {
10795
- var theme = _ref9.theme;
10796
- return theme.vms.text.white;
10797
- });
10798
- 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) {
10799
- var $selected = _ref10.$selected,
10800
- theme = _ref10.theme;
10801
- return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
10828
+ var $isMobileOpen = _ref8.$isMobileOpen;
10829
+ return $isMobileOpen ? 'visible' : 'hidden';
10802
10830
  });
10803
- var StyledContainer = styled(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n\n svg {\n transition: none;\n }\n\n /* Parent hover / active */\n &:hover,\n &.active {\n svg {\n color: ", " !important;\n }\n }\n\n /* 2nd child reacts ONLY when parent is hovered */\n &:hover > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n\n /* Default state for 2nd child */\n > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n"])), function (_ref11) {
10831
+ 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 (_ref9) {
10832
+ var $padding = _ref9.$padding;
10833
+ return $padding;
10834
+ }, function (_ref10) {
10835
+ var theme = _ref10.theme;
10836
+ return theme.vms.text.medium;
10837
+ }, function (_ref11) {
10804
10838
  var theme = _ref11.theme;
10805
10839
  return theme.vms.text.white;
10806
10840
  }, function (_ref12) {
10807
10841
  var theme = _ref12.theme;
10808
- return theme.vms.text.white;
10842
+ return theme.vms["default"].primary;
10809
10843
  }, function (_ref13) {
10810
10844
  var theme = _ref13.theme;
10811
10845
  return theme.vms.text.white;
@@ -10814,38 +10848,68 @@ var StyledContainer = styled(Container)(_templateObject4$9 || (_templateObject4$
10814
10848
  return theme.vms.text.white;
10815
10849
  }, function (_ref15) {
10816
10850
  var theme = _ref15.theme;
10851
+ return theme.vms["default"].primary;
10852
+ }, function (_ref16) {
10853
+ var theme = _ref16.theme;
10854
+ return theme.vms.text.white;
10855
+ });
10856
+ 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 (_ref17) {
10857
+ var $selected = _ref17.$selected,
10858
+ theme = _ref17.theme;
10859
+ return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
10860
+ });
10861
+ var StyledContainer = styled(Container)(_templateObject6$8 || (_templateObject6$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n\n svg {\n transition: none;\n }\n\n /* Parent hover / active */\n &:hover,\n &.active {\n svg {\n color: ", " !important;\n }\n }\n\n /* 2nd child reacts ONLY when parent is hovered */\n &:hover > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n\n /* Default state for 2nd child */\n > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n"])), function (_ref18) {
10862
+ var theme = _ref18.theme;
10863
+ return theme.vms.text.white;
10864
+ }, function (_ref19) {
10865
+ var theme = _ref19.theme;
10866
+ return theme.vms.text.white;
10867
+ }, function (_ref20) {
10868
+ var theme = _ref20.theme;
10869
+ return theme.vms.text.white;
10870
+ }, function (_ref21) {
10871
+ var theme = _ref21.theme;
10872
+ return theme.vms.text.white;
10873
+ }, function (_ref22) {
10874
+ var theme = _ref22.theme;
10817
10875
  return theme.vms.text.medium;
10818
10876
  });
10819
- 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"])));
10820
- var TextContainer = styled.span(_templateObject6$8 || (_templateObject6$8 = _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 (_ref16) {
10821
- var $padding = _ref16.$padding;
10877
+ var Logo = styled.div(_templateObject7$6 || (_templateObject7$6 = _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"])));
10878
+ 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 (_ref23) {
10879
+ var $padding = _ref23.$padding;
10822
10880
  return $padding;
10823
- }, function (_ref17) {
10824
- var $fontSize = _ref17.$fontSize;
10881
+ }, function (_ref24) {
10882
+ var $fontSize = _ref24.$fontSize;
10825
10883
  return $fontSize || '20px';
10826
- }, function (_ref18) {
10827
- var $fontWeight = _ref18.$fontWeight;
10884
+ }, function (_ref25) {
10885
+ var $fontWeight = _ref25.$fontWeight;
10828
10886
  return $fontWeight || '500';
10829
- }, SidebarContainer);
10830
- var NotificationBadge = styled.div(_templateObject7$6 || (_templateObject7$6 = _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 z-index: 100;\n width: max-content;\n"])), function (_ref19) {
10831
- var $position = _ref19.$position;
10887
+ }, SidebarContainer, MOBILE_BREAKPOINT);
10888
+ var NotificationBadge = styled.div(_templateObject9$5 || (_templateObject9$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 z-index: 100;\n width: max-content;\n"])), function (_ref26) {
10889
+ var $position = _ref26.$position;
10832
10890
  return $position || 'absolute';
10833
10891
  });
10834
- var Sidebar = function Sidebar(_ref20) {
10835
- var logo = _ref20.logo,
10836
- content = _ref20.content,
10837
- background = _ref20.background,
10838
- ProfileContent = _ref20.ProfileContent,
10839
- _ref20$isExpanded = _ref20.isExpanded,
10840
- isExpanded = _ref20$isExpanded === void 0 ? false : _ref20$isExpanded,
10841
- setIsExpanded = _ref20.setIsExpanded;
10892
+ var Sidebar = function Sidebar(_ref27) {
10893
+ var logo = _ref27.logo,
10894
+ content = _ref27.content,
10895
+ background = _ref27.background,
10896
+ ProfileContent = _ref27.ProfileContent,
10897
+ _ref27$isExpanded = _ref27.isExpanded,
10898
+ isExpanded = _ref27$isExpanded === void 0 ? false : _ref27$isExpanded,
10899
+ setIsExpanded = _ref27.setIsExpanded;
10842
10900
  var location = useLocation();
10843
10901
  var _useState = useState({}),
10844
10902
  openMenus = _useState[0],
10845
10903
  setOpenMenus = _useState[1];
10904
+ var _useState2 = useState(false),
10905
+ isMobileOpen = _useState2[0],
10906
+ setIsMobileOpen = _useState2[1];
10907
+ var _useState3 = useState(false),
10908
+ isMobile = _useState3[0],
10909
+ setIsMobile = _useState3[1];
10846
10910
  var isExpandedRef = useRef(isExpanded);
10847
10911
  var sidebarRef = useRef(null);
10848
- var _useState2 = useState(function () {
10912
+ var _useState4 = useState(function () {
10849
10913
  var container = document.getElementById('badge-portal-container');
10850
10914
  if (!container) {
10851
10915
  container = document.createElement('div');
@@ -10857,16 +10921,39 @@ var Sidebar = function Sidebar(_ref20) {
10857
10921
  }
10858
10922
  return container;
10859
10923
  }),
10860
- badgePortalContainer = _useState2[0];
10924
+ badgePortalContainer = _useState4[0];
10925
+ useEffect(function () {
10926
+ var checkMobile = function checkMobile() {
10927
+ setIsMobile(window.innerWidth <= 768);
10928
+ };
10929
+ checkMobile();
10930
+ window.addEventListener('resize', checkMobile);
10931
+ return function () {
10932
+ window.removeEventListener('resize', checkMobile);
10933
+ };
10934
+ }, []);
10861
10935
  useEffect(function () {
10862
10936
  isExpandedRef.current = isExpanded;
10863
10937
  if (!isExpanded) setOpenMenus({});
10864
10938
  }, [isExpanded]);
10939
+ var toggleMobileMenu = useCallback(function () {
10940
+ setIsMobileOpen(function (prev) {
10941
+ return !prev;
10942
+ });
10943
+ }, []);
10944
+ var closeMobileMenu = useCallback(function () {
10945
+ if (isMobile) {
10946
+ setIsMobileOpen(false);
10947
+ }
10948
+ }, [isMobile]);
10949
+ var handleOverlayClick = useCallback(function () {
10950
+ setIsMobileOpen(false);
10951
+ }, []);
10865
10952
  var toggleMenu = function toggleMenu(id) {
10866
10953
  setOpenMenus(function (prev) {
10867
- var _ref21;
10954
+ var _ref28;
10868
10955
  var isCurrentlyOpen = !!prev[id];
10869
- return isCurrentlyOpen ? {} : (_ref21 = {}, _ref21[id] = true, _ref21);
10956
+ return isCurrentlyOpen ? {} : (_ref28 = {}, _ref28[id] = true, _ref28);
10870
10957
  });
10871
10958
  };
10872
10959
  var getTotalNotifications = useCallback(function (item) {
@@ -10891,8 +10978,8 @@ var Sidebar = function Sidebar(_ref20) {
10891
10978
  return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
10892
10979
  }));
10893
10980
  };
10894
- var ChildLink = function ChildLink(_ref22) {
10895
- var child = _ref22.child;
10981
+ var ChildLink = function ChildLink(_ref29) {
10982
+ var child = _ref29.child;
10896
10983
  var themeColors = useTheme$1();
10897
10984
  var location = useLocation();
10898
10985
  var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
@@ -10900,6 +10987,7 @@ var Sidebar = function Sidebar(_ref20) {
10900
10987
  if (child.url && child.url === location.pathname) {
10901
10988
  e.preventDefault();
10902
10989
  }
10990
+ closeMobileMenu();
10903
10991
  }, [child.url, location.pathname]);
10904
10992
  return React.createElement(SidebarLink, {
10905
10993
  to: child.url || '#',
@@ -10938,14 +11026,14 @@ var Sidebar = function Sidebar(_ref20) {
10938
11026
  });
10939
11027
  }));
10940
11028
  };
10941
- var SidebarItem = function SidebarItem(_ref23) {
10942
- var item = _ref23.item,
10943
- isActive = _ref23.isActive,
10944
- isOpen = _ref23.isOpen,
10945
- hasChildren = _ref23.hasChildren,
10946
- isExpanded = _ref23.isExpanded,
10947
- onToggle = _ref23.onToggle,
10948
- renderChildLinks = _ref23.renderChildLinks;
11029
+ var SidebarItem = function SidebarItem(_ref30) {
11030
+ var item = _ref30.item,
11031
+ isActive = _ref30.isActive,
11032
+ isOpen = _ref30.isOpen,
11033
+ hasChildren = _ref30.hasChildren,
11034
+ isExpanded = _ref30.isExpanded,
11035
+ onToggle = _ref30.onToggle,
11036
+ renderChildLinks = _ref30.renderChildLinks;
10949
11037
  var themeColors = useTheme$1();
10950
11038
  var activeClass = isActive ? 'active' : '';
10951
11039
  var handleClick = useCallback(function () {
@@ -11010,6 +11098,7 @@ var Sidebar = function Sidebar(_ref20) {
11010
11098
  if (item.url === location.pathname) {
11011
11099
  e.preventDefault();
11012
11100
  }
11101
+ closeMobileMenu();
11013
11102
  }, [item.url]);
11014
11103
  return item.url ? React.createElement(SidebarLink, {
11015
11104
  to: item.url,
@@ -11042,6 +11131,7 @@ var Sidebar = function Sidebar(_ref20) {
11042
11131
  var sidebar = sidebarRef.current;
11043
11132
  if (!sidebar) return;
11044
11133
  if (typeof ResizeObserver === 'undefined') return;
11134
+ if (isMobile) return;
11045
11135
  var resizeObserver = new ResizeObserver(function (entries) {
11046
11136
  for (var _iterator = _createForOfIteratorHelperLoose(entries), _step; !(_step = _iterator()).done;) {
11047
11137
  var entry = _step.value;
@@ -11057,7 +11147,7 @@ var Sidebar = function Sidebar(_ref20) {
11057
11147
  return function () {
11058
11148
  resizeObserver.disconnect();
11059
11149
  };
11060
- }, [handleSidebarExpansion]);
11150
+ }, [handleSidebarExpansion, isMobile]);
11061
11151
  useEffect(function () {
11062
11152
  var updateBadgePositions = function updateBadgePositions() {
11063
11153
  content.forEach(function (item) {
@@ -11078,9 +11168,22 @@ var Sidebar = function Sidebar(_ref20) {
11078
11168
  window.removeEventListener('resize', updateBadgePositions);
11079
11169
  };
11080
11170
  }, [content, isExpanded, getTotalNotifications]);
11081
- return React.createElement(SidebarContainer, {
11171
+ var themeColors = useTheme$1();
11172
+ return React.createElement(React.Fragment, null, React.createElement(HamburgerButton, {
11173
+ "$background": background,
11174
+ onClick: toggleMobileMenu,
11175
+ "aria-label": "Toggle menu"
11176
+ }, React.createElement(Icon, {
11177
+ icon: isMobileOpen ? 'X' : 'Hamburger',
11178
+ size: 24,
11179
+ color: themeColors.vms.text.white
11180
+ })), React.createElement(Overlay, {
11181
+ "$isOpen": isMobileOpen,
11182
+ onClick: handleOverlayClick
11183
+ }), React.createElement(SidebarContainer, {
11082
11184
  ref: sidebarRef,
11083
- "$background": background
11185
+ "$background": background,
11186
+ "$isMobileOpen": isMobileOpen
11084
11187
  }, React.createElement(Container, {
11085
11188
  "$flexDirection": 'column',
11086
11189
  "$gap": '28px',
@@ -11111,13 +11214,13 @@ var Sidebar = function Sidebar(_ref20) {
11111
11214
  isActive: active,
11112
11215
  isOpen: isOpen,
11113
11216
  hasChildren: hasChildren,
11114
- isExpanded: isExpanded,
11217
+ isExpanded: isMobile ? isMobileOpen : isExpanded,
11115
11218
  onToggle: function onToggle() {
11116
11219
  return toggleMenu(item.id);
11117
11220
  },
11118
11221
  renderChildLinks: renderChildLinks
11119
11222
  });
11120
- }))), ProfileContent);
11223
+ }))), ProfileContent));
11121
11224
  };
11122
11225
 
11123
11226
  var _templateObject$o, _templateObject2$k, _templateObject3$d, _templateObject4$a;
@@ -12303,5 +12406,5 @@ var themes = {
12303
12406
  dark: dark
12304
12407
  };
12305
12408
 
12306
- export { Badge, Breadcrumbs, ButtonComponent as Button, ButtonCarousel, ButtonDropdown, CheckBox, CircularLoader, CircularProgress, Container, DatePicker, DropdownMenu$1 as DropdownMenu, Icon, IconTooltip, InternalTabs, Loader$1 as Loader, MultiSelectDropdown, OptionComponent, Options, Pagination, ProgressBar, SearchBox, SelectOption, SelectedOption, Sidebar, Span, Table, TableCell, TableRow, Tabs, TextArea, TextField, TextFieldWithDropdown, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getCurrentTheme, getSystemTimezoneAbbreviation, themes, timeAgo, timeStringToSeconds, useClickOutside, useCopyToClipboard, UseCustomModal as useCustomModal, useNotification, useTheme };
12409
+ export { Badge, Breadcrumbs, ButtonComponent as Button, ButtonCarousel, ButtonDropdown, CheckBox, CircularLoader, CircularProgress, Container, DatePicker, DropdownMenu$1 as DropdownMenu, Icon, IconTooltip, InternalTabs, Loader$1 as Loader, MultiSelectDropdown, OptionComponent, Options, Pagination, ProgressBar, SearchBox, SelectOption, SelectedOption, Sidebar, Span, Table, TableCell, TableRow, Tabs, TextArea, TextField, TextFieldWithDropdown, convertEpochToDateString, convertEpochToOnlyDate, convertToEpoch, formatCalendarDateTime, formatDate, formatEpochToIST, formatTimestamp, getCurrentTheme, getResponsiveFlags, getSystemTimezoneAbbreviation, themes, timeAgo, timeStringToSeconds, useClickOutside, useCopyToClipboard, UseCustomModal as useCustomModal, useNotification, useTheme, useWindowSize };
12307
12410
  //# sourceMappingURL=index.modern.js.map