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