@7shifts/sous-chef 2.1.1 → 2.1.2

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.
@@ -235,8 +235,8 @@ var updateMisalignedOverlay = function updateMisalignedOverlay(overlayPosition,
235
235
  if (overlayPosition.left > arrowPosition.left) {
236
236
  left = arrowPosition.left - ARROW_MARGIN;
237
237
  } else if (overlayPosition.left + tooltipRectPosition.width < arrowPosition.left + ARROW_WIDTH) {
238
- left = arrowPosition.left - tooltipRectPosition.width + ARROW_WIDTH + ARROW_MARGIN;
239
- }
238
+ left = arrowPosition.left - tooltipRectPosition.width + ARROW_WIDTH + ARROW_MARGIN;
239
+ }
240
240
 
241
241
  return _extends({}, overlayPosition, {
242
242
  left: left
@@ -1803,9 +1803,6 @@ var IconGrinBeam = function IconGrinBeam(props) {
1803
1803
  "data-testid": "icon-grin-beam",
1804
1804
  style: getIconStyles(props)
1805
1805
  }, props), React__default.createElement("path", {
1806
- fill: "#fff",
1807
- d: "M0 0h20v20H0z"
1808
- }), React__default.createElement("path", {
1809
1806
  d: "M4.746 9.676a.335.335 0 0 0 .375-.145l.383-.664c.31-.535.774-.844 1.27-.844s.96.309 1.27.844l.383.664c.085.145.25.184.375.145a.314.314 0 0 0 .23-.324c-.133-1.645-1.298-2.79-2.258-2.79S4.65 7.707 4.516 9.352a.317.317 0 0 0 .23.324Zm6.452 0a.335.335 0 0 0 .375-.145l.383-.664c.31-.535.774-.844 1.27-.844s.96.309 1.27.844l.383.664c.085.145.25.184.375.145a.314.314 0 0 0 .23-.324c-.133-1.645-1.299-2.79-2.258-2.79-.96 0-2.125 1.145-2.258 2.79a.317.317 0 0 0 .23.324Zm3.766 2.855c-1.218.38-3.029.594-4.964.594-1.935 0-3.746-.215-4.964-.594a.662.662 0 0 0-.617.121.62.62 0 0 0-.213.579c.37 2.148 3.354 3.644 5.798 3.644s5.423-1.496 5.798-3.645a.624.624 0 0 0-.213-.578.66.66 0 0 0-.625-.12ZM10 15.625c-1.411 0-3.105-.637-3.972-1.574 2.319.422 5.63.422 7.948 0-.871.937-2.565 1.574-3.976 1.574ZM10 .312C4.476.313 0 4.649 0 10s4.476 9.688 10 9.688S20 15.351 20 10 15.524.312 10 .312Zm0 18.125c-4.802 0-8.71-3.785-8.71-8.437 0-4.652 3.908-8.438 8.71-8.438 4.802 0 8.71 3.786 8.71 8.438 0 4.652-3.908 8.438-8.71 8.438Z",
1810
1807
  fill: "currentColor"
1811
1808
  }));
@@ -4603,7 +4600,9 @@ var MultiSelectField = function MultiSelectField(_ref) {
4603
4600
  placeholder = _ref.placeholder,
4604
4601
  disabled = _ref.disabled,
4605
4602
  _ref$closeOnSelect = _ref.closeOnSelect,
4606
- closeOnSelect = _ref$closeOnSelect === void 0 ? false : _ref$closeOnSelect;
4603
+ closeOnSelect = _ref$closeOnSelect === void 0 ? false : _ref$closeOnSelect,
4604
+ _ref$menuShouldScroll = _ref.menuShouldScrollIntoView,
4605
+ menuShouldScrollIntoView = _ref$menuShouldScroll === void 0 ? true : _ref$menuShouldScroll;
4607
4606
  var controllers = useMultiSelectFieldControllers({
4608
4607
  name: name,
4609
4608
  id: inputId,
@@ -4641,6 +4640,18 @@ var MultiSelectField = function MultiSelectField(_ref) {
4641
4640
  CustomComponent: UserCustomOption
4642
4641
  }, props));
4643
4642
  } : components.Option
4643
+ },
4644
+ menuShouldScrollIntoView: menuShouldScrollIntoView,
4645
+ menuPlacement: menuShouldScrollIntoView ? 'bottom' : 'auto',
4646
+ menuPosition: menuShouldScrollIntoView ? 'absolute' : 'fixed',
4647
+ closeMenuOnScroll: function closeMenuOnScroll(e) {
4648
+ if (menuShouldScrollIntoView || !e.target) {
4649
+ return false;
4650
+ }
4651
+
4652
+ var target = e.target;
4653
+ var isScrollingTheMenu = typeof target.className === 'string' && target.className.includes('MenuList');
4654
+ return !isScrollingTheMenu;
4644
4655
  }
4645
4656
  }));
4646
4657
  };
@@ -4749,7 +4760,9 @@ var SelectField = function SelectField(_ref) {
4749
4760
  disabled = _ref.disabled,
4750
4761
  prefix = _ref.prefix,
4751
4762
  _ref$asToolbarFilter = _ref.asToolbarFilter,
4752
- asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter;
4763
+ asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
4764
+ _ref$menuShouldScroll = _ref.menuShouldScrollIntoView,
4765
+ menuShouldScrollIntoView = _ref$menuShouldScroll === void 0 ? true : _ref$menuShouldScroll;
4753
4766
  var controllers = useSelectFieldControllers({
4754
4767
  name: name,
4755
4768
  id: inputId,
@@ -4792,6 +4805,18 @@ var SelectField = function SelectField(_ref) {
4792
4805
  CustomPrefixComponent: SelectedOptionPrefix
4793
4806
  }, props));
4794
4807
  } : components.Control
4808
+ },
4809
+ menuShouldScrollIntoView: menuShouldScrollIntoView,
4810
+ menuPlacement: menuShouldScrollIntoView ? 'bottom' : 'auto',
4811
+ menuPosition: menuShouldScrollIntoView ? 'absolute' : 'fixed',
4812
+ closeMenuOnScroll: function closeMenuOnScroll(e) {
4813
+ if (menuShouldScrollIntoView || !e.target) {
4814
+ return false;
4815
+ }
4816
+
4817
+ var target = e.target;
4818
+ var isScrollingTheMenu = typeof target.className === 'string' && target.className.includes('MenuList');
4819
+ return !isScrollingTheMenu;
4795
4820
  }
4796
4821
  })));
4797
4822
  };