@luminati-io/uikit 3.5.8 → 3.5.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -31607,12 +31607,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
31607
31607
|
"use strict";
|
31608
31608
|
__webpack_require__.r(__webpack_exports__);
|
31609
31609
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
31610
|
-
/* harmony export */
|
31611
|
-
/* harmony export */
|
31612
|
-
/* harmony export */ withPopover: () => (/* reexport safe */ _with_popover__WEBPACK_IMPORTED_MODULE_0__["default"])
|
31610
|
+
/* harmony export */ getDisplayName: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_0__.getDisplayName),
|
31611
|
+
/* harmony export */ withPopover: () => (/* reexport safe */ _with_popover__WEBPACK_IMPORTED_MODULE_1__.withPopover)
|
31613
31612
|
/* harmony export */ });
|
31614
|
-
/* harmony import */ var
|
31615
|
-
/* harmony import */ var
|
31613
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./src/hoc/util.js");
|
31614
|
+
/* harmony import */ var _with_popover__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./with_popover */ "./src/hoc/with_popover.js");
|
31616
31615
|
// LICENSE_CODE ZON
|
31617
31616
|
|
31618
31617
|
|
@@ -31620,10 +31619,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
31620
31619
|
|
31621
31620
|
|
31622
31621
|
|
31623
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
31624
|
-
withPopover: _with_popover__WEBPACK_IMPORTED_MODULE_0__["default"]
|
31625
|
-
});
|
31626
|
-
|
31627
31622
|
/***/ }),
|
31628
31623
|
|
31629
31624
|
/***/ "./src/hoc/util.js":
|
@@ -31656,7 +31651,7 @@ var getDisplayName = function getDisplayName(Comp) {
|
|
31656
31651
|
"use strict";
|
31657
31652
|
__webpack_require__.r(__webpack_exports__);
|
31658
31653
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
31659
|
-
/* harmony export */
|
31654
|
+
/* harmony export */ withPopover: () => (/* binding */ withPopover)
|
31660
31655
|
/* harmony export */ });
|
31661
31656
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
31662
31657
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
@@ -31705,6 +31700,8 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
31705
31700
|
zIndex = popoverOptions.zIndex,
|
31706
31701
|
wrapperClassName = popoverOptions.wrapperClassName,
|
31707
31702
|
wrapperStyle = popoverOptions.wrapperStyle,
|
31703
|
+
popoverClassName = popoverOptions.popoverClassName,
|
31704
|
+
popoverStyle = popoverOptions.popoverStyle,
|
31708
31705
|
interactive = popoverOptions.interactive,
|
31709
31706
|
delay = popoverOptions.delay;
|
31710
31707
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
|
@@ -31717,24 +31714,24 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
31717
31714
|
setPopperElement = _useState4[1];
|
31718
31715
|
var _useStateWithCallback = useStateWithCallback(false, onOpenChange),
|
31719
31716
|
_useStateWithCallback2 = _slicedToArray(_useStateWithCallback, 2),
|
31720
|
-
|
31721
|
-
|
31717
|
+
isOpen = _useStateWithCallback2[0],
|
31718
|
+
setIsOpen = _useStateWithCallback2[1];
|
31722
31719
|
var timer = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
31723
|
-
var
|
31720
|
+
var closeDelay = delay || DEFAULT_CLOSE_DELAY;
|
31724
31721
|
var showPopover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
31725
31722
|
clearTimeout(timer.current);
|
31726
31723
|
timer.current = setTimeout(function () {
|
31727
|
-
return
|
31724
|
+
return setIsOpen(true);
|
31728
31725
|
}, interactive ? delay : 0);
|
31729
|
-
}, []);
|
31726
|
+
}, [interactive, delay]);
|
31730
31727
|
var hidePopover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
31731
31728
|
clearTimeout(timer.current);
|
31732
31729
|
timer.current = setTimeout(function () {
|
31733
|
-
return
|
31734
|
-
}, interactive ?
|
31735
|
-
}, []);
|
31730
|
+
return setIsOpen(false);
|
31731
|
+
}, interactive ? closeDelay : 0);
|
31732
|
+
}, [interactive, closeDelay]);
|
31736
31733
|
var togglePopover = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
31737
|
-
return
|
31734
|
+
return setIsOpen(function (v) {
|
31738
31735
|
return !v;
|
31739
31736
|
});
|
31740
31737
|
}, []);
|
@@ -31762,11 +31759,21 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
31762
31759
|
};
|
31763
31760
|
}, [showPopover, hidePopover, togglePopover, update, forceUpdate]);
|
31764
31761
|
var hideAndStopEvt = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
31765
|
-
if (!
|
31762
|
+
if (!isOpen) return;
|
31766
31763
|
evt.stopPropagation();
|
31767
31764
|
evt.preventDefault();
|
31768
31765
|
hidePopover();
|
31769
|
-
}, [
|
31766
|
+
}, [isOpen, hidePopover]);
|
31767
|
+
var onPointerEnter = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
31768
|
+
var _compProps$onPointerE;
|
31769
|
+
if (interactive) showPopover();
|
31770
|
+
(_compProps$onPointerE = compProps.onPointerEnter) === null || _compProps$onPointerE === void 0 || _compProps$onPointerE.call(compProps, evt);
|
31771
|
+
}, [interactive, showPopover, compProps.onPointerEnter]);
|
31772
|
+
var onPointerLeave = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
31773
|
+
var _compProps$onPointerL;
|
31774
|
+
if (interactive) hidePopover();
|
31775
|
+
(_compProps$onPointerL = compProps.onPointerLeave) === null || _compProps$onPointerL === void 0 || _compProps$onPointerL.call(compProps, evt);
|
31776
|
+
}, [interactive, hidePopover, compProps.onPointerLeave]);
|
31770
31777
|
(0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useOutsideClick)([referenceElement, popperElement], hideAndStopEvt);
|
31771
31778
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RefCompContainer, {
|
31772
31779
|
ref: setReferenceElement,
|
@@ -31775,14 +31782,16 @@ var withPopover = function withPopover(Comp, PopoverComp) {
|
|
31775
31782
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, _extends({
|
31776
31783
|
ref: ref
|
31777
31784
|
}, compProps, {
|
31785
|
+
isOpen: isOpen,
|
31778
31786
|
popover: popoverApi,
|
31779
|
-
onPointerEnter:
|
31780
|
-
onPointerLeave:
|
31781
|
-
}))),
|
31787
|
+
onPointerEnter: onPointerEnter,
|
31788
|
+
onPointerLeave: onPointerLeave
|
31789
|
+
}))), isOpen && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverContainer, {
|
31782
31790
|
ref: setPopperElement,
|
31783
|
-
|
31791
|
+
className: popoverClassName,
|
31792
|
+
style: assign({}, popoverStyle, styles.popper),
|
31784
31793
|
attributes: attributes.popper,
|
31785
|
-
visible:
|
31794
|
+
visible: isOpen,
|
31786
31795
|
portalTarget: portalTarget,
|
31787
31796
|
zIndex: zIndex
|
31788
31797
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverComp, _extends({}, restPopoverProps, {
|
@@ -31829,7 +31838,6 @@ var useStateWithCallback = function useStateWithCallback(initialValue, callback)
|
|
31829
31838
|
}, [value, callback]);
|
31830
31839
|
return [value, setValue];
|
31831
31840
|
};
|
31832
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (withPopover);
|
31833
31841
|
|
31834
31842
|
/***/ }),
|
31835
31843
|
|
@@ -33222,7 +33230,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
33222
33230
|
/* harmony import */ var react_day_picker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-day-picker */ "./node_modules/react-day-picker/dist/index.esm.js");
|
33223
33231
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! styled-components */ "styled-components");
|
33224
33232
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
|
33225
|
-
/* harmony import */ var
|
33233
|
+
/* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
|
33226
33234
|
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
33227
33235
|
/* harmony import */ var _translation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../translation */ "./src/translation.js");
|
33228
33236
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
|
@@ -33393,7 +33401,7 @@ var PickerPopover = function PickerPopover(props) {
|
|
33393
33401
|
}));
|
33394
33402
|
};
|
33395
33403
|
PickerPopover.displayName = 'PickerPopover';
|
33396
|
-
var Picker = (0,
|
33404
|
+
var Picker = (0,_hoc__WEBPACK_IMPORTED_MODULE_4__.withPopover)(PickerField, PickerPopover, {
|
33397
33405
|
placement: 'bottom',
|
33398
33406
|
zIndex: _constants__WEBPACK_IMPORTED_MODULE_7__.Z_INDEX.datepicker
|
33399
33407
|
});
|