@7shifts/sous-chef 3.90.0 → 3.90.1

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
@@ -7840,7 +7840,9 @@ var DropdownList = function DropdownList(_ref) {
7840
7840
  scrollToItem(highlightItemIndex);
7841
7841
  }
7842
7842
  }
7843
- }, [highlightItemIndex, setFocusOnItem]);
7843
+ // The setFocusOnItem function is not memoized, but it does not need to be included in the dependency array because it does not change between renders.
7844
+ // eslint-disable-next-line react-hooks/exhaustive-deps
7845
+ }, [highlightItemIndex]);
7844
7846
  return React__default["default"].createElement("ul", {
7845
7847
  className: styles$1c['dropdown-list'],
7846
7848
  "data-testid": testId,
@@ -9140,10 +9142,23 @@ var useBackgroundColor = function useBackgroundColor() {
9140
9142
  backgroundColor = _useState[0],
9141
9143
  setBackgroundColor = _useState[1];
9142
9144
  React.useLayoutEffect(function () {
9143
- if (!isInsideModal && !isInsideAccordion && !isInsideCard) {
9144
- var bodyStyles = window.getComputedStyle(document.body);
9145
- setBackgroundColor(bodyStyles.getPropertyValue('background-color'));
9146
- }
9145
+ var performBackgroundColorCheck = function performBackgroundColorCheck() {
9146
+ if (!isInsideModal && !isInsideAccordion && !isInsideCard) {
9147
+ var bodyStyles = window.getComputedStyle(document.body);
9148
+ setBackgroundColor(bodyStyles.getPropertyValue('background-color'));
9149
+ }
9150
+ };
9151
+ var observer = new MutationObserver(function () {
9152
+ performBackgroundColorCheck();
9153
+ });
9154
+ observer.observe(document.body, {
9155
+ attributes: true,
9156
+ attributeFilter: ['class']
9157
+ });
9158
+ performBackgroundColorCheck();
9159
+ return function () {
9160
+ observer.disconnect();
9161
+ };
9147
9162
  }, [isInsideModal, isInsideAccordion, isInsideCard]);
9148
9163
  return "var(--background-color, " + backgroundColor + ")";
9149
9164
  };
@@ -15728,6 +15743,7 @@ exports.Dropdown = Dropdown;
15728
15743
  exports.DropdownList = DropdownList;
15729
15744
  exports.DropdownListDivider = DropdownListDivider;
15730
15745
  exports.DropdownListItem = DropdownListItem;
15746
+ exports.DropdownListItemSelectable = DropdownListItemSelectable;
15731
15747
  exports.EmptyState = EmptyState;
15732
15748
  exports.Form = Form;
15733
15749
  exports.FormFeedback = FormFeedback;