baseui 10.7.2 → 10.7.3

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.
@@ -447,14 +447,16 @@ class PopoverInner extends React.Component {
447
447
  },
448
448
  onPopperUpdate: this.onPopperUpdate,
449
449
  placement: this.state.placement
450
- }, /*#__PURE__*/React.createElement(FocusLock, {
450
+ }, this.props.focusLock ? /*#__PURE__*/React.createElement(FocusLock, {
451
451
  disabled: !this.props.focusLock,
452
452
  noFocusGuards: false // see popover-focus-loop.scenario.js for why hover cannot return focus
453
453
  ,
454
454
  returnFocus: !this.isHoverTrigger() && this.props.returnFocus,
455
455
  autoFocus: this.state.autoFocusAfterPositioning,
456
456
  focusOptions: this.props.focusOptions
457
- }, !this.props.focusLock && this.state.autoFocusAfterPositioning ? /*#__PURE__*/React.createElement(MoveFocusInside, null, this.renderPopover(renderedContent)) : this.renderPopover(renderedContent)))));
457
+ }, this.renderPopover(renderedContent)) : /*#__PURE__*/React.createElement(MoveFocusInside, {
458
+ disabled: !this.props.autoFocus && !this.state.autoFocusAfterPositioning
459
+ }, this.renderPopover(renderedContent)))));
458
460
  } else {
459
461
  rendered.push( /*#__PURE__*/React.createElement(Hidden, {
460
462
  key: "hidden-layer"
@@ -510,14 +510,16 @@ var PopoverInner = /*#__PURE__*/function (_React$Component) {
510
510
  popperOptions: _objectSpread(_objectSpread({}, defaultPopperOptions), this.props.popperOptions),
511
511
  onPopperUpdate: this.onPopperUpdate,
512
512
  placement: this.state.placement
513
- }, /*#__PURE__*/React.createElement(FocusLock, {
513
+ }, this.props.focusLock ? /*#__PURE__*/React.createElement(FocusLock, {
514
514
  disabled: !this.props.focusLock,
515
515
  noFocusGuards: false // see popover-focus-loop.scenario.js for why hover cannot return focus
516
516
  ,
517
517
  returnFocus: !this.isHoverTrigger() && this.props.returnFocus,
518
518
  autoFocus: this.state.autoFocusAfterPositioning,
519
519
  focusOptions: this.props.focusOptions
520
- }, !this.props.focusLock && this.state.autoFocusAfterPositioning ? /*#__PURE__*/React.createElement(MoveFocusInside, null, this.renderPopover(renderedContent)) : this.renderPopover(renderedContent)))));
520
+ }, this.renderPopover(renderedContent)) : /*#__PURE__*/React.createElement(MoveFocusInside, {
521
+ disabled: !this.props.autoFocus && !this.state.autoFocusAfterPositioning
522
+ }, this.renderPopover(renderedContent)))));
521
523
  } else {
522
524
  rendered.push( /*#__PURE__*/React.createElement(Hidden, {
523
525
  key: "hidden-layer"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "10.7.2",
3
+ "version": "10.7.3",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",
@@ -525,14 +525,16 @@ var PopoverInner = /*#__PURE__*/function (_React$Component) {
525
525
  popperOptions: _objectSpread(_objectSpread({}, defaultPopperOptions), this.props.popperOptions),
526
526
  onPopperUpdate: this.onPopperUpdate,
527
527
  placement: this.state.placement
528
- }, /*#__PURE__*/React.createElement(_reactFocusLock.default, {
528
+ }, this.props.focusLock ? /*#__PURE__*/React.createElement(_reactFocusLock.default, {
529
529
  disabled: !this.props.focusLock,
530
530
  noFocusGuards: false // see popover-focus-loop.scenario.js for why hover cannot return focus
531
531
  ,
532
532
  returnFocus: !this.isHoverTrigger() && this.props.returnFocus,
533
533
  autoFocus: this.state.autoFocusAfterPositioning,
534
534
  focusOptions: this.props.focusOptions
535
- }, !this.props.focusLock && this.state.autoFocusAfterPositioning ? /*#__PURE__*/React.createElement(_reactFocusLock.MoveFocusInside, null, this.renderPopover(renderedContent)) : this.renderPopover(renderedContent)))));
535
+ }, this.renderPopover(renderedContent)) : /*#__PURE__*/React.createElement(_reactFocusLock.MoveFocusInside, {
536
+ disabled: !this.props.autoFocus && !this.state.autoFocusAfterPositioning
537
+ }, this.renderPopover(renderedContent)))));
536
538
  } else {
537
539
  rendered.push( /*#__PURE__*/React.createElement(_styledComponents.Hidden, {
538
540
  key: "hidden-layer"
@@ -470,23 +470,27 @@ class PopoverInner extends React.Component<
470
470
  onPopperUpdate={this.onPopperUpdate}
471
471
  placement={this.state.placement}
472
472
  >
473
- <FocusLock
474
- disabled={!this.props.focusLock}
475
- noFocusGuards={false}
476
- // see popover-focus-loop.scenario.js for why hover cannot return focus
477
- returnFocus={!this.isHoverTrigger() && this.props.returnFocus}
478
- autoFocus={this.state.autoFocusAfterPositioning}
479
- focusOptions={this.props.focusOptions}
480
- >
481
- {!this.props.focusLock &&
482
- this.state.autoFocusAfterPositioning ? (
483
- <MoveFocusInside>
484
- {this.renderPopover(renderedContent)}
485
- </MoveFocusInside>
486
- ) : (
487
- this.renderPopover(renderedContent)
488
- )}
489
- </FocusLock>
473
+ {this.props.focusLock ? (
474
+ <FocusLock
475
+ disabled={!this.props.focusLock}
476
+ noFocusGuards={false}
477
+ // see popover-focus-loop.scenario.js for why hover cannot return focus
478
+ returnFocus={!this.isHoverTrigger() && this.props.returnFocus}
479
+ autoFocus={this.state.autoFocusAfterPositioning}
480
+ focusOptions={this.props.focusOptions}
481
+ >
482
+ {this.renderPopover(renderedContent)}
483
+ </FocusLock>
484
+ ) : (
485
+ <MoveFocusInside
486
+ disabled={
487
+ !this.props.autoFocus &&
488
+ !this.state.autoFocusAfterPositioning
489
+ }
490
+ >
491
+ {this.renderPopover(renderedContent)}
492
+ </MoveFocusInside>
493
+ )}
490
494
  </TetherBehavior>
491
495
  </Layer>,
492
496
  );