@activecollab/components 1.0.317 → 1.0.318

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
@@ -474,7 +474,7 @@
474
474
  return React.useContext(MenuContext);
475
475
  };
476
476
 
477
- var _excluded$1f = ["children", "anchorEl", "open", "style", "transition", "placement", "strategy"];
477
+ var _excluded$1f = ["children", "anchorEl", "open", "style", "transition", "placement", "strategy", "afterWrite"];
478
478
  var Popper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
479
479
  var children = _ref.children,
480
480
  anchorEl = _ref.anchorEl,
@@ -487,6 +487,7 @@
487
487
  initialPlacement = _ref$placement === void 0 ? "bottom" : _ref$placement,
488
488
  _ref$strategy = _ref.strategy,
489
489
  strategy = _ref$strategy === void 0 ? "absolute" : _ref$strategy,
490
+ afterWrite = _ref.afterWrite,
490
491
  rest = _objectWithoutProperties(_ref, _excluded$1f);
491
492
  var _useState = React.useState(true),
492
493
  _useState2 = _slicedToArray(_useState, 2),
@@ -512,9 +513,15 @@
512
513
  popperRef.current = core.createPopper(anchorEl, ownRef.current, {
513
514
  placement: placement,
514
515
  onFirstUpdate: handlePopperUpdate,
515
- strategy: strategy
516
+ strategy: strategy,
517
+ modifiers: [{
518
+ phase: "afterWrite",
519
+ enabled: typeof afterWrite === "function",
520
+ name: "popper-after-write",
521
+ fn: afterWrite
522
+ }]
516
523
  });
517
- }, [anchorEl, open, placement, strategy]);
524
+ }, [afterWrite, anchorEl, open, placement, strategy]);
518
525
  var handleClose = function handleClose() {
519
526
  if (!popperRef.current) {
520
527
  return;
@@ -779,7 +786,8 @@
779
786
  popperClassName = _ref.popperClassName,
780
787
  backgroundElementClass = _ref.backgroundElementClass,
781
788
  _ref$windowAbsolutely = _ref.windowAbsolutelyPositioned,
782
- windowAbsolutelyPositioned = _ref$windowAbsolutely === void 0 ? false : _ref$windowAbsolutely;
789
+ windowAbsolutelyPositioned = _ref$windowAbsolutely === void 0 ? false : _ref$windowAbsolutely,
790
+ onPopperOpen = _ref.onPopperOpen;
783
791
  var _useState = React.useState(defaultOpen),
784
792
  _useState2 = _slicedToArray(_useState, 2),
785
793
  open = _useState2[0],
@@ -844,7 +852,8 @@
844
852
  open: childNode ? open : false,
845
853
  placement: position,
846
854
  className: popperClassName,
847
- tabIndex: -1
855
+ tabIndex: -1,
856
+ afterWrite: onPopperOpen
848
857
  }, /*#__PURE__*/React__default["default"].createElement(StyledMenu$2, {
849
858
  className: classNames__default["default"]("c-simple-menu__paper", "c-simple-menu__".concat(mode), menuClassName, className),
850
859
  $mode: mode,
@@ -11220,7 +11229,11 @@
11220
11229
  target: target,
11221
11230
  mode: mode,
11222
11231
  open: open,
11223
- position: position
11232
+ position: position,
11233
+ onPopperOpen: function onPopperOpen() {
11234
+ var _elementRef$current;
11235
+ return elementRef === null || elementRef === void 0 ? void 0 : (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.focus();
11236
+ }
11224
11237
  };
11225
11238
  }
11226
11239
  return {
@@ -11281,7 +11294,6 @@
11281
11294
  ref: formRef
11282
11295
  }, /*#__PURE__*/React__default["default"].createElement(StyledSelectInput, {
11283
11296
  ref: handleRef,
11284
- autoFocus: true,
11285
11297
  placeholder: placeholder
11286
11298
  }), actionIcon && actionLabel && /*#__PURE__*/React__default["default"].createElement(Tooltip, {
11287
11299
  popperTooltipStyle: {