@hexure/ui 1.13.4 → 1.13.5

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/esm/index.js CHANGED
@@ -734,6 +734,9 @@ const MenuWrapper = styled.div `
734
734
  display: inline-block;
735
735
  `;
736
736
  const StyledMoreMenu = styled(MoreMenu) `
737
+ position: fixed;
738
+ top: ${props => props.$top};
739
+ left: ${props => props.$left};
737
740
  position: fixed;
738
741
  top: ${props => props.$top};
739
742
  left: ${props => props.$left};
@@ -762,45 +765,46 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
762
765
  };
763
766
  useEffect(() => {
764
767
  if (showMenu && menuWrapperRef.current) {
765
- const rect = menuWrapperRef.current.getBoundingClientRect();
766
- let top = rect.top;
767
- let left = rect.left;
768
+ const wrapperRect = menuWrapperRef.current.getBoundingClientRect();
769
+ const menuWidthInt = parseInt(menuWidth, 10);
770
+ let top = wrapperRect.top;
771
+ let left = wrapperRect.left;
768
772
  switch (position) {
769
773
  case 'top':
770
- top = rect.top - rect.height;
771
- left = rect.left;
774
+ top = wrapperRect.top - 142; // Menu above the wrapper
775
+ left = wrapperRect.left;
772
776
  break;
773
777
  case 'bottom':
774
- top = rect.bottom;
775
- left = rect.left;
778
+ top = wrapperRect.bottom; // Menu below the wrapper
779
+ left = wrapperRect.left;
776
780
  break;
777
781
  case 'left':
778
- top = rect.top;
779
- left = rect.left - rect.width;
782
+ top = wrapperRect.top;
783
+ left = wrapperRect.left - menuWidthInt; // Menu to the left of the wrapper
780
784
  break;
781
785
  case 'right':
782
- top = rect.top;
783
- left = rect.right;
784
- break;
785
- case 'bottomRight':
786
- top = rect.bottom;
787
- left = rect.left;
786
+ top = wrapperRect.top;
787
+ left = wrapperRect.right; // Menu to the right of the wrapper
788
788
  break;
789
789
  case 'bottomLeft':
790
- top = rect.bottom;
791
- left = rect.right - parseInt(menuWidth, 10);
790
+ top = wrapperRect.bottom;
791
+ left = wrapperRect.right - menuWidthInt;
792
+ break;
793
+ case 'bottomRight':
794
+ top = wrapperRect.bottom;
795
+ left = wrapperRect.left;
792
796
  break;
793
797
  case 'topRight':
794
- top = rect.top - parseInt(menuWidth, 10);
795
- left = rect.left;
798
+ top = wrapperRect.top - 142;
799
+ left = wrapperRect.right - 24;
796
800
  break;
797
801
  case 'topLeft':
798
- top = rect.top - parseInt(menuWidth, 10);
799
- left = rect.right - parseInt(menuWidth, 10);
802
+ top = wrapperRect.top - 142;
803
+ left = wrapperRect.left - 188;
800
804
  break;
801
805
  default:
802
- top = rect.bottom;
803
- left = rect.left;
806
+ top = wrapperRect.bottom;
807
+ left = wrapperRect.left;
804
808
  break;
805
809
  }
806
810
  setMenuPosition({ top: `${top}px`, left: `${left}px` });
@@ -897,8 +901,8 @@ const Input$2 = styled.input `
897
901
  border-color: ${Colors.MEDIUM_GRAY.Hex};
898
902
  }
899
903
  &:disabled + span {
900
- background-color: #fff;
901
- border-color: ${Colors.MEDIUM_GRAY.Hex};
904
+ background-color: #d3d3d3;
905
+ border-color: #d3d3d3;
902
906
  }
903
907
  &:checked + span:after {
904
908
  display: block;
@@ -2306,8 +2310,8 @@ const Input = styled.input `
2306
2310
  display: block;
2307
2311
  }
2308
2312
  &:disabled + span {
2309
- background-color: #fff;
2310
- border-color: ${Colors.MEDIUM_GRAY.Hex};
2313
+ background-color: #d3d3d3;
2314
+ border-color: #d3d3d3;
2311
2315
  }
2312
2316
  &:disabled + span:after {
2313
2317
  background-color: #fff;