@luminati-io/uikit 3.0.14 → 3.0.15
Sign up to get free protection for your applications and to get access to all the features.
@@ -27165,7 +27165,7 @@ var StyledFooterWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default
|
|
27165
27165
|
displayName: "StyledFooterWrapper",
|
27166
27166
|
componentId: "sc-1nggvo0-3"
|
27167
27167
|
})(["border-top:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_4);
|
27168
|
-
var ModalBase = function
|
27168
|
+
var ModalBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
27169
27169
|
var id = props.id,
|
27170
27170
|
className = props.className,
|
27171
27171
|
testId = props['data-testid'],
|
@@ -27179,9 +27179,11 @@ var ModalBase = function ModalBase(props) {
|
|
27179
27179
|
className: className,
|
27180
27180
|
size: size,
|
27181
27181
|
box_shadow: shadow,
|
27182
|
-
"data-testid": testId
|
27182
|
+
"data-testid": testId,
|
27183
|
+
ref: ref
|
27183
27184
|
}, header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledHeaderWrapper, null, header), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledContentWrapper, null, content), footer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledFooterWrapper, null, footer));
|
27184
|
-
};
|
27185
|
+
});
|
27186
|
+
ModalBase.displayName = 'ModalBase';
|
27185
27187
|
ModalBase.propTypes = {
|
27186
27188
|
size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg', 'full']),
|
27187
27189
|
shadow: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['none', 'sm', 'md', 'lg']),
|
@@ -27260,7 +27262,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
27260
27262
|
|
27261
27263
|
|
27262
27264
|
|
27263
|
-
var General = function
|
27265
|
+
var General = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
27264
27266
|
var id = props.id,
|
27265
27267
|
className = props.className,
|
27266
27268
|
title = props.title,
|
@@ -27297,9 +27299,11 @@ var General = function General(props) {
|
|
27297
27299
|
shadow: shadow,
|
27298
27300
|
header: header,
|
27299
27301
|
content: content,
|
27300
|
-
footer: footer
|
27302
|
+
footer: footer,
|
27303
|
+
ref: ref
|
27301
27304
|
});
|
27302
|
-
};
|
27305
|
+
});
|
27306
|
+
General.displayName = 'General';
|
27303
27307
|
General.propTypes = {
|
27304
27308
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
27305
27309
|
subtitle: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
@@ -27471,7 +27475,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
27471
27475
|
|
27472
27476
|
|
27473
27477
|
/*jslint react:true*/
|
27474
|
-
var _excluded = ["show", "zIndex", "onOutsideClick"];
|
27478
|
+
var _excluded = ["show", "zIndex", "onOutsideClick", "swallowOutsideClick"];
|
27475
27479
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
27476
27480
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
27477
27481
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -27494,6 +27498,8 @@ var withBackdrop = function withBackdrop(Comp) {
|
|
27494
27498
|
_props$zIndex = props.zIndex,
|
27495
27499
|
zIndex = _props$zIndex === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.backdrop : _props$zIndex,
|
27496
27500
|
onOutsideClick = props.onOutsideClick,
|
27501
|
+
_props$swallowOutside = props.swallowOutsideClick,
|
27502
|
+
swallowOutsideClick = _props$swallowOutside === void 0 ? true : _props$swallowOutside,
|
27497
27503
|
restProps = _objectWithoutProperties(props, _excluded);
|
27498
27504
|
var popperElement = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
27499
27505
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
@@ -27525,11 +27531,14 @@ var withBackdrop = function withBackdrop(Comp) {
|
|
27525
27531
|
}, [show]);
|
27526
27532
|
var hideAndStopEvt = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
27527
27533
|
if (!visible) return;
|
27528
|
-
|
27529
|
-
|
27530
|
-
|
27531
|
-
|
27534
|
+
if (swallowOutsideClick) {
|
27535
|
+
evt.stopPropagation();
|
27536
|
+
evt.preventDefault();
|
27537
|
+
}
|
27538
|
+
if (onOutsideClick) onOutsideClick(evt);
|
27539
|
+
}, [visible, swallowOutsideClick, onOutsideClick]);
|
27532
27540
|
(0,_hooks__WEBPACK_IMPORTED_MODULE_5__.useOutsideClick)(popperElement.current, hideAndStopEvt);
|
27541
|
+
console.log(popperElement);
|
27533
27542
|
if (!mount) return null;
|
27534
27543
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopupContainer, {
|
27535
27544
|
zIndex: zIndex
|