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.
- package/es/popover/popover.js +4 -2
- package/esm/popover/popover.js +4 -2
- package/package.json +1 -1
- package/popover/popover.js +4 -2
- package/popover/popover.js.flow +21 -17
package/es/popover/popover.js
CHANGED
|
@@ -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
|
-
},
|
|
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"
|
package/esm/popover/popover.js
CHANGED
|
@@ -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
|
-
},
|
|
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
package/popover/popover.js
CHANGED
|
@@ -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
|
-
},
|
|
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"
|
package/popover/popover.js.flow
CHANGED
|
@@ -470,23 +470,27 @@ class PopoverInner extends React.Component<
|
|
|
470
470
|
onPopperUpdate={this.onPopperUpdate}
|
|
471
471
|
placement={this.state.placement}
|
|
472
472
|
>
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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
|
);
|