labsense-ui-kit 1.3.78 → 1.3.80

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
@@ -10802,7 +10802,7 @@ var ProgressBar = function ProgressBar(_ref3) {
10802
10802
  };
10803
10803
 
10804
10804
  var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$8, _templateObject7$6, _templateObject8$5, _templateObject9$5;
10805
- var MOBILE_BREAKPOINT = '768px';
10805
+ var MOBILE_BREAKPOINT = '992px';
10806
10806
  var Overlay = styled__default.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) {
10807
10807
  var $isOpen = _ref.$isOpen;
10808
10808
  return $isOpen ? 1 : 0;
@@ -10932,10 +10932,20 @@ var Sidebar = function Sidebar(_ref26) {
10932
10932
  window.removeEventListener('resize', checkMobile);
10933
10933
  };
10934
10934
  }, []);
10935
+ React.useEffect(function () {
10936
+ if (isMobile) {
10937
+ setIsExpanded(true);
10938
+ }
10939
+ }, [isMobile, setIsExpanded]);
10935
10940
  React.useEffect(function () {
10936
10941
  isExpandedRef.current = isExpanded;
10937
10942
  if (!isExpanded) setOpenMenus({});
10938
10943
  }, [isExpanded]);
10944
+ React.useEffect(function () {
10945
+ if (isMobile && !isMobileOpen) {
10946
+ setOpenMenus({});
10947
+ }
10948
+ }, [isMobile, isMobileOpen]);
10939
10949
  var toggleMobileMenu = React.useCallback(function () {
10940
10950
  setIsMobileOpen(function (prev) {
10941
10951
  return !prev;
@@ -11236,7 +11246,7 @@ var Sidebar = function Sidebar(_ref26) {
11236
11246
  isActive: active,
11237
11247
  isOpen: isOpen,
11238
11248
  hasChildren: hasChildren,
11239
- isExpanded: isMobile ? isMobileOpen : isExpanded,
11249
+ isExpanded: isMobile ? true : isExpanded,
11240
11250
  onToggle: function onToggle() {
11241
11251
  return toggleMenu(item.id);
11242
11252
  },