@activecollab/components 1.0.410 → 1.0.412

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
@@ -15481,7 +15481,7 @@
15481
15481
  return isFirst.current;
15482
15482
  };
15483
15483
 
15484
- var _excluded$i = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper", "onClose", "onClear"];
15484
+ var _excluded$i = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper", "onClose", "onClear", "onDeselect"];
15485
15485
  var ComboBox = function ComboBox(_ref) {
15486
15486
  var _comboBoxRef$current2, _comboBoxRef$current3;
15487
15487
  var _ref$options = _ref.options,
@@ -15514,6 +15514,7 @@
15514
15514
  scrollWrapper = _ref.scrollWrapper,
15515
15515
  onClose = _ref.onClose,
15516
15516
  onClear = _ref.onClear,
15517
+ onDeselect = _ref.onDeselect,
15517
15518
  prop = _objectWithoutProperties(_ref, _excluded$i);
15518
15519
  var selectedName = React.useMemo(function () {
15519
15520
  var value = "";
@@ -15632,15 +15633,16 @@
15632
15633
  }, [type, renderOption]);
15633
15634
  var handleDeselect = React.useCallback(function (e) {
15634
15635
  e.stopPropagation();
15635
- if (type === "multiple") {
15636
+ if (typeof onDeselect === "function") {
15637
+ onDeselect();
15638
+ } else if (type === "multiple") {
15636
15639
  onChange === null || onChange === void 0 ? void 0 : onChange([]);
15637
- onClear === null || onClear === void 0 ? void 0 : onClear();
15638
15640
  } else {
15639
15641
  onChange === null || onChange === void 0 ? void 0 : onChange("");
15640
- onClear === null || onClear === void 0 ? void 0 : onClear();
15641
15642
  }
15643
+ onClear === null || onClear === void 0 ? void 0 : onClear();
15642
15644
  setOpen(false);
15643
- }, [type, onChange, onClear]);
15645
+ }, [type, onChange, onClear, onDeselect]);
15644
15646
  var handleMouseDown = React.useCallback(function (e) {
15645
15647
  e.preventDefault();
15646
15648
  }, []);
@@ -17372,7 +17374,8 @@
17372
17374
  onClose = _ref.onClose,
17373
17375
  _ref$disableCloseOnEs = _ref.disableCloseOnEsc,
17374
17376
  disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs,
17375
- children = _ref.children;
17377
+ children = _ref.children,
17378
+ dialogClassName = _ref.dialogClassName;
17376
17379
  var childrenCollection = React.useMemo(function () {
17377
17380
  return React__default["default"].Children.toArray(children);
17378
17381
  }, [children]);
@@ -17437,7 +17440,8 @@
17437
17440
  ref: ref,
17438
17441
  open: open,
17439
17442
  onClose: onClose,
17440
- disableCloseOnEsc: disableCloseOnEsc
17443
+ disableCloseOnEsc: disableCloseOnEsc,
17444
+ className: dialogClassName
17441
17445
  }, renderActiveStep));
17442
17446
  });
17443
17447
  Wizard.displayName = "Wizard";