@luminati-io/uikit 6.3.1 → 6.3.2-beta.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -39305,7 +39305,7 @@ CodeBlock.propTypes = {
|
|
39305
39305
|
var CodeBlockWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
39306
39306
|
displayName: "CodeBlockWrapper",
|
39307
39307
|
componentId: "sc-dgi5hi-0"
|
39308
|
-
})(["", "{border-top-left-radius:0;border-top-right-radius:0;}"], _code_snippet__WEBPACK_IMPORTED_MODULE_4__.
|
39308
|
+
})(["", "{border-top-left-radius:0;border-top-right-radius:0;}"], _code_snippet__WEBPACK_IMPORTED_MODULE_4__.CodeSnippetWrapper);
|
39309
39309
|
var CodeBlockHeader = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
39310
39310
|
displayName: "CodeBlockHeader",
|
39311
39311
|
componentId: "sc-dgi5hi-1"
|
@@ -39340,8 +39340,8 @@ var CodeBlockHeader = styled_components__WEBPACK_IMPORTED_MODULE_2___default().d
|
|
39340
39340
|
"use strict";
|
39341
39341
|
__webpack_require__.r(__webpack_exports__);
|
39342
39342
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
39343
|
-
/* harmony export */
|
39344
|
-
/* harmony export */
|
39343
|
+
/* harmony export */ CodeSnippet: () => (/* binding */ CodeSnippet),
|
39344
|
+
/* harmony export */ CodeSnippetWrapper: () => (/* binding */ CodeSnippetWrapper)
|
39345
39345
|
/* harmony export */ });
|
39346
39346
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
39347
39347
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
@@ -39378,7 +39378,7 @@ var CodeSnippet = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
|
|
39378
39378
|
maxHeight = _ref.maxHeight,
|
39379
39379
|
wrap = _ref.wrap;
|
39380
39380
|
var codeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
39381
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
39381
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeSnippetWrapper, {
|
39382
39382
|
ref: ref,
|
39383
39383
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(null, {}, className, variant),
|
39384
39384
|
style: maxHeight ? {
|
@@ -39415,8 +39415,8 @@ CodeSnippet.propTypes = {
|
|
39415
39415
|
onCopy: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func),
|
39416
39416
|
wrap: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool)
|
39417
39417
|
};
|
39418
|
-
var
|
39419
|
-
displayName: "
|
39418
|
+
var CodeSnippetWrapper = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
39419
|
+
displayName: "CodeSnippetWrapper",
|
39420
39420
|
componentId: "sc-13u859f-0"
|
39421
39421
|
})(["position:relative;min-height:48px;display:flex;border-radius:4px;&.black{background-color:", ";}&.white{background-color:", ";}"], function (_ref2) {
|
39422
39422
|
var color = _ref2.theme.color;
|
@@ -39428,20 +39428,11 @@ var CodeSnipperWrapper = styled_components__WEBPACK_IMPORTED_MODULE_1___default(
|
|
39428
39428
|
var CodeWrapper = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
39429
39429
|
displayName: "CodeWrapper",
|
39430
39430
|
componentId: "sc-13u859f-1"
|
39431
|
-
})(["flex:1;padding
|
39431
|
+
})(["flex:1;padding:", ";overflow:auto;", ""], function (_ref4) {
|
39432
39432
|
var spacing = _ref4.theme.spacing;
|
39433
|
-
return spacing['04'];
|
39434
|
-
}, function (_ref5) {
|
39435
|
-
var spacing = _ref5.theme.spacing;
|
39436
|
-
return spacing['04'];
|
39437
|
-
}, function (_ref6) {
|
39438
|
-
var spacing = _ref6.theme.spacing;
|
39439
39433
|
return spacing['05'];
|
39440
|
-
}, function (
|
39441
|
-
var
|
39442
|
-
return spacing['04'];
|
39443
|
-
}, function (_ref8) {
|
39444
|
-
var scrollbars = _ref8.theme.scrollbars;
|
39434
|
+
}, function (_ref5) {
|
39435
|
+
var scrollbars = _ref5.theme.scrollbars;
|
39445
39436
|
return scrollbars.auto;
|
39446
39437
|
});
|
39447
39438
|
|
@@ -39538,17 +39529,23 @@ var CopyButton = function CopyButton(_ref) {
|
|
39538
39529
|
var StyledButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().button.withConfig({
|
39539
39530
|
displayName: "StyledButton",
|
39540
39531
|
componentId: "sc-kvxvoe-0"
|
39541
|
-
})(["position:absolute;inset-inline-end:
|
39542
|
-
var
|
39543
|
-
|
39544
|
-
return $variant == 'white' ? color.code_bg_icon_white : color.code_bg_icon_black;
|
39532
|
+
})(["position:absolute;inset-inline-end:", ";top:", ";z-index:1;display:flex;padding:8px;align-items:flex-start;border:0 none;border-radius:32px;background:", ";svg{width:16px;height:16px;color:", ";}&:hover,&:active{background:", ";}"], function (_ref2) {
|
39533
|
+
var theme = _ref2.theme;
|
39534
|
+
return theme.spacing['05'];
|
39545
39535
|
}, function (_ref3) {
|
39546
|
-
var
|
39547
|
-
|
39548
|
-
return $variant == 'white' ? color.icon : color.icon_white;
|
39536
|
+
var theme = _ref3.theme;
|
39537
|
+
return theme.spacing['05'];
|
39549
39538
|
}, function (_ref4) {
|
39550
39539
|
var $variant = _ref4.$variant,
|
39551
39540
|
color = _ref4.theme.color;
|
39541
|
+
return $variant == 'white' ? color.code_bg_icon_white : color.code_bg_icon_black;
|
39542
|
+
}, function (_ref5) {
|
39543
|
+
var $variant = _ref5.$variant,
|
39544
|
+
color = _ref5.theme.color;
|
39545
|
+
return $variant == 'white' ? color.icon : color.icon_white;
|
39546
|
+
}, function (_ref6) {
|
39547
|
+
var $variant = _ref6.$variant,
|
39548
|
+
color = _ref6.theme.color;
|
39552
39549
|
return $variant == 'white' ? color.code_bg_icon_white_hover : color.code_bg_icon_black_hover;
|
39553
39550
|
});
|
39554
39551
|
function selectElementText(element) {
|
@@ -40627,7 +40624,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
40627
40624
|
/* harmony export */ useOutsideClick: () => (/* reexport safe */ _use_outside_click__WEBPACK_IMPORTED_MODULE_5__["default"]),
|
40628
40625
|
/* harmony export */ useResize: () => (/* reexport safe */ _use_resize__WEBPACK_IMPORTED_MODULE_6__.useResize),
|
40629
40626
|
/* harmony export */ useScroll: () => (/* reexport safe */ _use_scroll__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
40630
|
-
/* harmony export */
|
40627
|
+
/* harmony export */ useStateWithEffect: () => (/* reexport safe */ _use_state_with_effect__WEBPACK_IMPORTED_MODULE_8__.useStateWithEffect),
|
40628
|
+
/* harmony export */ useWindowSize: () => (/* reexport safe */ _use_window_size__WEBPACK_IMPORTED_MODULE_9__.useWindowSize)
|
40631
40629
|
/* harmony export */ });
|
40632
40630
|
/* harmony import */ var _use_debounced_callback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use_debounced_callback */ "./src/hooks/use_debounced_callback.js");
|
40633
40631
|
/* harmony import */ var _use_did_update__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use_did_update */ "./src/hooks/use_did_update.js");
|
@@ -40637,7 +40635,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
40637
40635
|
/* harmony import */ var _use_outside_click__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./use_outside_click */ "./src/hooks/use_outside_click.js");
|
40638
40636
|
/* harmony import */ var _use_resize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./use_resize */ "./src/hooks/use_resize.js");
|
40639
40637
|
/* harmony import */ var _use_scroll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./use_scroll */ "./src/hooks/use_scroll.js");
|
40640
|
-
/* harmony import */ var
|
40638
|
+
/* harmony import */ var _use_state_with_effect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./use_state_with_effect */ "./src/hooks/use_state_with_effect.js");
|
40639
|
+
/* harmony import */ var _use_window_size__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./use_window_size */ "./src/hooks/use_window_size.js");
|
40641
40640
|
// LICENSE_CODE ZON
|
40642
40641
|
|
40643
40642
|
|
@@ -40653,6 +40652,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
40653
40652
|
|
40654
40653
|
|
40655
40654
|
|
40655
|
+
|
40656
40656
|
/***/ }),
|
40657
40657
|
|
40658
40658
|
/***/ "./src/hooks/use_debounced_callback.js":
|
@@ -40996,6 +40996,43 @@ var useScroll = function useScroll(scrollTarget) {
|
|
40996
40996
|
|
40997
40997
|
/***/ }),
|
40998
40998
|
|
40999
|
+
/***/ "./src/hooks/use_state_with_effect.js":
|
41000
|
+
/*!********************************************!*\
|
41001
|
+
!*** ./src/hooks/use_state_with_effect.js ***!
|
41002
|
+
\********************************************/
|
41003
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
41004
|
+
|
41005
|
+
"use strict";
|
41006
|
+
__webpack_require__.r(__webpack_exports__);
|
41007
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
41008
|
+
/* harmony export */ useStateWithEffect: () => (/* binding */ useStateWithEffect)
|
41009
|
+
/* harmony export */ });
|
41010
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
41011
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
41012
|
+
// LICENSE_CODE ZON
|
41013
|
+
|
41014
|
+
|
41015
|
+
/*jslint react:true*/
|
41016
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
41017
|
+
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."); }
|
41018
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
41019
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
41020
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
41021
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
41022
|
+
|
41023
|
+
var useStateWithEffect = function useStateWithEffect(initialValue) {
|
41024
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialValue),
|
41025
|
+
_useState2 = _slicedToArray(_useState, 2),
|
41026
|
+
value = _useState2[0],
|
41027
|
+
setValue = _useState2[1];
|
41028
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
41029
|
+
return setValue(initialValue);
|
41030
|
+
}, [initialValue]);
|
41031
|
+
return [value, setValue];
|
41032
|
+
};
|
41033
|
+
|
41034
|
+
/***/ }),
|
41035
|
+
|
40999
41036
|
/***/ "./src/hooks/use_window_size.js":
|
41000
41037
|
/*!**************************************!*\
|
41001
41038
|
!*** ./src/hooks/use_window_size.js ***!
|
@@ -41371,12 +41408,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
41371
41408
|
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip/index.js");
|
41372
41409
|
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
|
41373
41410
|
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
41411
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
|
41374
41412
|
// LICENSE_CODE ZON
|
41375
41413
|
|
41376
41414
|
|
41377
41415
|
/*jslint react:true*/
|
41378
41416
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
41379
|
-
var _excluded = ["id", "name", "checked", "onChange", "onClick", "label", "disabled", "tooltip", "indeterminate", "verticalAlign", "className", "classNamePrefix", "tabIndex", "readOnly"];
|
41417
|
+
var _excluded = ["id", "name", "checked", "onChange", "onClick", "label", "disabled", "tooltip", "indeterminate", "verticalAlign", "className", "classNamePrefix", "tabIndex", "readOnly", "tooltipPlacement"];
|
41380
41418
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
41381
41419
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
41382
41420
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
@@ -41390,6 +41428,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
41390
41428
|
|
41391
41429
|
|
41392
41430
|
|
41431
|
+
|
41393
41432
|
var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (_ref, ref) {
|
41394
41433
|
var id = _ref.id,
|
41395
41434
|
name = _ref.name,
|
@@ -41407,6 +41446,7 @@ var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
41407
41446
|
_ref$tabIndex = _ref.tabIndex,
|
41408
41447
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
41409
41448
|
readOnly = _ref.readOnly,
|
41449
|
+
tooltipPlacement = _ref.tooltipPlacement,
|
41410
41450
|
rest = _objectWithoutProperties(_ref, _excluded);
|
41411
41451
|
var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(id);
|
41412
41452
|
var handleClick = function handleClick(evt) {
|
@@ -41416,7 +41456,8 @@ var Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
|
|
41416
41456
|
onChange === null || onChange === void 0 || onChange(newValue, evt);
|
41417
41457
|
};
|
41418
41458
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_4__.Tooltip2, {
|
41419
|
-
tooltip: tooltip
|
41459
|
+
tooltip: tooltip,
|
41460
|
+
tooltipPlacement: tooltipPlacement
|
41420
41461
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CheckboxWrapper, _extends({
|
41421
41462
|
ref: ref
|
41422
41463
|
}, rest, {
|
@@ -41460,7 +41501,8 @@ Checkbox.propTypes = {
|
|
41460
41501
|
classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
41461
41502
|
tabIndex: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
41462
41503
|
readOnly: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
41463
|
-
tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)
|
41504
|
+
tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
41505
|
+
tooltipPlacement: _constants__WEBPACK_IMPORTED_MODULE_7__.PT_TOOLTIP_PLACEMENT
|
41464
41506
|
};
|
41465
41507
|
var CheckboxWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
41466
41508
|
displayName: "CheckboxWrapper",
|
@@ -47366,7 +47408,8 @@ var Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(
|
|
47366
47408
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(null, null, className, classNamePrefix),
|
47367
47409
|
$variant: variant,
|
47368
47410
|
$underline: underline,
|
47369
|
-
$size: size
|
47411
|
+
$size: size,
|
47412
|
+
$classNamePrefix: classNamePrefix
|
47370
47413
|
}), isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, _extends({
|
47371
47414
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(classNamePrefix, {
|
47372
47415
|
'-icon': true,
|
@@ -47422,7 +47465,7 @@ var getLinkProps = function getLinkProps(opt) {
|
|
47422
47465
|
var StyledLink = styled_components__WEBPACK_IMPORTED_MODULE_2___default().a.withConfig({
|
47423
47466
|
displayName: "StyledLink",
|
47424
47467
|
componentId: "sc-1ilmd36-0"
|
47425
|
-
})(["display:inline-flex;align-items:center;justify-content:
|
47468
|
+
})(["display:inline-flex;align-items:center;justify-content:flex-start;text-decoration:none;background:0 none;border:0 none;padding:0;gap:", ";color:", ";[data-label]{text-decoration:", ";}cursor:pointer;&:disabled{cursor:not-allowed;}&:hover:not(:disabled){color:", ";[data-label]{text-decoration:", ";}}&:hover,:visited,:focus{text-decoration:none;}.", "-icon-right{margin-left:auto;}"], function (props) {
|
47426
47469
|
return (0,_utils__WEBPACK_IMPORTED_MODULE_6__.toPixel)(props.$size == 'lg' ? 8 : 4);
|
47427
47470
|
}, function (_ref2) {
|
47428
47471
|
var $variant = _ref2.$variant,
|
@@ -47436,6 +47479,9 @@ var StyledLink = styled_components__WEBPACK_IMPORTED_MODULE_2___default().a.with
|
|
47436
47479
|
return $variant == 'primary' ? color.link_primary_hover : color.link_secondary_hover;
|
47437
47480
|
}, function (props) {
|
47438
47481
|
return props.$underline || props.$variant == 'primary' ? 'underline' : 'none';
|
47482
|
+
}, function (_ref4) {
|
47483
|
+
var $classNamePrefix = _ref4.$classNamePrefix;
|
47484
|
+
return $classNamePrefix;
|
47439
47485
|
});
|
47440
47486
|
var InlineLink = styled_components__WEBPACK_IMPORTED_MODULE_2___default().a.withConfig({
|
47441
47487
|
displayName: "InlineLink",
|
@@ -47543,16 +47589,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
47543
47589
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
47544
47590
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
|
47545
47591
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
|
47546
|
-
/* harmony import */ var
|
47547
|
-
/* harmony import */ var
|
47548
|
-
/* harmony import */ var
|
47549
|
-
/* harmony import */ var
|
47550
|
-
/* harmony import */ var
|
47551
|
-
/* harmony import */ var
|
47552
|
-
/* harmony import */ var
|
47553
|
-
/* harmony import */ var
|
47554
|
-
/* harmony import */ var
|
47555
|
-
/* harmony import */ var
|
47592
|
+
/* harmony import */ var rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/lib/pickAttrs */ "./node_modules/rc-util/lib/pickAttrs.js");
|
47593
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
|
47594
|
+
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
|
47595
|
+
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip/index.js");
|
47596
|
+
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
|
47597
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
47598
|
+
/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./menu */ "./src/menu/menu.js");
|
47599
|
+
/* harmony import */ var _menu_item_divider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./menu_item_divider */ "./src/menu/menu_item_divider.js");
|
47600
|
+
/* harmony import */ var _menu_item_group__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./menu_item_group */ "./src/menu/menu_item_group.js");
|
47601
|
+
/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./shared */ "./src/menu/shared.js");
|
47602
|
+
/* harmony import */ var _menu_item_popup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./menu_item_popup */ "./src/menu/menu_item_popup.js");
|
47556
47603
|
// LICENSE_CODE ZON
|
47557
47604
|
|
47558
47605
|
|
@@ -47576,6 +47623,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
47576
47623
|
|
47577
47624
|
|
47578
47625
|
|
47626
|
+
|
47579
47627
|
var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref, ref) {
|
47580
47628
|
var _ref$type = _ref.type,
|
47581
47629
|
type = _ref$type === void 0 ? 'item' : _ref$type,
|
@@ -47597,7 +47645,7 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
47597
47645
|
icon = _ref.icon,
|
47598
47646
|
iconPlacement = _ref.iconPlacement,
|
47599
47647
|
rest = _objectWithoutProperties(_ref, _excluded);
|
47600
|
-
if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47648
|
+
if (type == 'divider') return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_divider__WEBPACK_IMPORTED_MODULE_10__["default"], {
|
47601
47649
|
ref: ref
|
47602
47650
|
});
|
47603
47651
|
var subItems = buildSubItems(children, {
|
@@ -47605,13 +47653,13 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
47605
47653
|
});
|
47606
47654
|
var isSubMenu = subMenu || subItems;
|
47607
47655
|
if (type == 'group') {
|
47608
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47656
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_group__WEBPACK_IMPORTED_MODULE_11__.MenuItemGroup, _extends({
|
47609
47657
|
ref: ref,
|
47610
47658
|
text: text,
|
47611
47659
|
isFirstItem: isFirstItem
|
47612
47660
|
}, rest), subItems);
|
47613
47661
|
}
|
47614
|
-
var _getIconProps = (0,
|
47662
|
+
var _getIconProps = (0,_utils__WEBPACK_IMPORTED_MODULE_8__.getIconProps)('MenuItem', {
|
47615
47663
|
size: size,
|
47616
47664
|
icon: icon,
|
47617
47665
|
iconPlacement: iconPlacement
|
@@ -47620,23 +47668,23 @@ var MenuItem = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(fu
|
|
47620
47668
|
iconProps = _objectWithoutProperties(_getIconProps, _excluded2);
|
47621
47669
|
var iconColor = disabled ? 'icon_disabled' : variant == 'negative' ? 'icon_error' : 'icon';
|
47622
47670
|
var labelColor = disabled ? 'text_disabled' : variant == 'negative' ? 'text_error' : 'text';
|
47623
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47671
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_12__.MenuItemContainer, {
|
47624
47672
|
ref: ref,
|
47625
47673
|
as: tag,
|
47626
47674
|
role: "menuitem"
|
47627
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47675
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_6__.Tooltip2, {
|
47628
47676
|
tooltip: tooltip
|
47629
47677
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemComp, _extends({}, rest, {
|
47630
47678
|
"aria-disabled": disabled ? true : undefined,
|
47631
47679
|
size: size,
|
47632
47680
|
role: "button",
|
47633
47681
|
subItems: subItems
|
47634
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemLeft, null, isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47682
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemLeft, null, isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_5__.Icon, _extends({}, iconProps, {
|
47635
47683
|
color: iconColor
|
47636
47684
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemRight, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemText, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PrimaryText, {
|
47637
47685
|
$size: size,
|
47638
47686
|
color: labelColor
|
47639
|
-
}, text), !isSubMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, !!tertiaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47687
|
+
}, text), !isSubMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, !!tertiaryText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_7__.Label, {
|
47640
47688
|
variant: "sm",
|
47641
47689
|
whiteSpace: "nowrap",
|
47642
47690
|
color: "text_tertiary"
|
@@ -47654,7 +47702,7 @@ MenuItem.propTypes = {
|
|
47654
47702
|
description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
47655
47703
|
type: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['item', 'divider', 'group']),
|
47656
47704
|
size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg']),
|
47657
|
-
icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(
|
47705
|
+
icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_8__.iconNames),
|
47658
47706
|
// XXX alexanderse: PT.arrayOf(PT.shape(MenuItem.propTypes)) cause parse err
|
47659
47707
|
children: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)),
|
47660
47708
|
variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['default', 'negative']),
|
@@ -47664,7 +47712,7 @@ MenuItem.propTypes = {
|
|
47664
47712
|
tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
47665
47713
|
popupPlacement: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
47666
47714
|
popupClassName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
47667
|
-
popupTrigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([
|
47715
|
+
popupTrigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_constants__WEBPACK_IMPORTED_MODULE_4__.PT_TRIGGER, prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(_constants__WEBPACK_IMPORTED_MODULE_4__.PT_TRIGGER)]),
|
47668
47716
|
popupStyle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
47669
47717
|
};
|
47670
47718
|
var MenuItemComp = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref2, ref) {
|
@@ -47676,9 +47724,9 @@ var MenuItemComp = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef
|
|
47676
47724
|
rest = _objectWithoutProperties(_ref2, _excluded3);
|
47677
47725
|
var button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(MenuItemButton, _extends({
|
47678
47726
|
ref: ref
|
47679
|
-
}, rest));
|
47727
|
+
}, (0,rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__["default"])(rest)));
|
47680
47728
|
if (subItems) {
|
47681
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47729
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_item_popup__WEBPACK_IMPORTED_MODULE_13__.MenuItemPopup, {
|
47682
47730
|
subItems: subItems,
|
47683
47731
|
popupPlacement: popupPlacement,
|
47684
47732
|
popupTrigger: popupTrigger,
|
@@ -47698,7 +47746,7 @@ var MenuItemButton = styled_components__WEBPACK_IMPORTED_MODULE_2___default().di
|
|
47698
47746
|
displayName: "MenuItemButton",
|
47699
47747
|
componentId: "sc-vtiffr-0"
|
47700
47748
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;text-decoration:none;background:0 none;border:0 none;padding:0 12px;box-sizing:border-box;width:100%;min-width:168px;max-width:540px;height:", ";gap:4px;cursor:", ";&:hover{background-color:", ";}&:hover,:visited,:focus{text-decoration:none;}&:active{background-color:", ";}"], function (props) {
|
47701
|
-
return (0,
|
47749
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_8__.toPixel)(sizes[props.size] || sizes.md);
|
47702
47750
|
}, function (props) {
|
47703
47751
|
return props['aria-disabled'] ? 'not-allowed' : 'pointer';
|
47704
47752
|
}, function (_ref3) {
|
@@ -47733,13 +47781,13 @@ var SecondaryIcon = function SecondaryIcon(_ref5) {
|
|
47733
47781
|
});
|
47734
47782
|
return null;
|
47735
47783
|
};
|
47736
|
-
var RightIcon = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(
|
47784
|
+
var RightIcon = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_icon__WEBPACK_IMPORTED_MODULE_5__.Icon).attrs({
|
47737
47785
|
size: 'xs'
|
47738
47786
|
}).withConfig({
|
47739
47787
|
displayName: "RightIcon",
|
47740
47788
|
componentId: "sc-vtiffr-4"
|
47741
47789
|
})(["margin-left:auto;"]);
|
47742
|
-
var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(
|
47790
|
+
var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_7__.Label).attrs(function (props) {
|
47743
47791
|
return {
|
47744
47792
|
variant: props.$size == 'lg' ? 'lg' : 'sm',
|
47745
47793
|
whiteSpace: 'nowrap'
|
@@ -47748,7 +47796,7 @@ var PrimaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typo
|
|
47748
47796
|
displayName: "PrimaryText",
|
47749
47797
|
componentId: "sc-vtiffr-5"
|
47750
47798
|
})(["overflow-x:clip;text-overflow:ellipsis;"]);
|
47751
|
-
var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(
|
47799
|
+
var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_7__.Label).attrs({
|
47752
47800
|
variant: 'sm',
|
47753
47801
|
color: 'text_secondary',
|
47754
47802
|
whiteSpace: 'nowrap'
|
@@ -47756,7 +47804,7 @@ var SecondaryText = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_ty
|
|
47756
47804
|
displayName: "SecondaryText",
|
47757
47805
|
componentId: "sc-vtiffr-6"
|
47758
47806
|
})(["margin-left:auto;"]);
|
47759
|
-
var Description = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(
|
47807
|
+
var Description = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_7__.Label).attrs({
|
47760
47808
|
variant: 'xs',
|
47761
47809
|
color: 'text_tertiary',
|
47762
47810
|
whiteSpace: 'nowrap'
|
@@ -47766,7 +47814,7 @@ var Description = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typo
|
|
47766
47814
|
})(["width:100%;overflow-x:clip;text-overflow:ellipsis;"]);
|
47767
47815
|
var buildSubItems = function buildSubItems(children, itemProps) {
|
47768
47816
|
return Array.isArray(children) && children.length > 0 ? children.map(function (item, ind) {
|
47769
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(
|
47817
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_9__.Menu.Item, _extends({
|
47770
47818
|
key: item.key
|
47771
47819
|
}, item, itemProps, {
|
47772
47820
|
isFirstItem: ind == 0
|
@@ -49417,14 +49465,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
49417
49465
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
|
49418
49466
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
|
49419
49467
|
/* harmony import */ var _rc_component_trigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @rc-component/trigger */ "./node_modules/@rc-component/trigger/es/index.js");
|
49420
|
-
/* harmony import */ var
|
49421
|
-
/* harmony import */ var
|
49422
|
-
/* harmony import */ var
|
49468
|
+
/* harmony import */ var dom_helpers_listen__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-helpers/listen */ "./node_modules/dom-helpers/esm/listen.js");
|
49469
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
49470
|
+
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
|
49471
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.js");
|
49472
|
+
/* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./placements */ "./src/popover/placements.js");
|
49423
49473
|
// LICENSE_CODE ZON
|
49424
49474
|
|
49425
49475
|
|
49426
49476
|
/*jslint react:true*/
|
49427
|
-
var _excluded = ["className", "classNamePrefix", "style", "trigger", "visible", "placement", "popover", "onVisibleChange", "afterVisibleChange", "children"];
|
49477
|
+
var _excluded = ["className", "classNamePrefix", "style", "trigger", "visible", "placement", "popover", "onVisibleChange", "afterVisibleChange", "children", "hideOnScroll", "getScrollDOMNode"];
|
49478
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
49479
|
+
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."); }
|
49480
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
49481
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
49482
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
49483
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
49428
49484
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
49429
49485
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
49430
49486
|
|
@@ -49434,6 +49490,8 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
49434
49490
|
|
49435
49491
|
|
49436
49492
|
|
49493
|
+
|
49494
|
+
|
49437
49495
|
var _Popover = function Popover(_ref) {
|
49438
49496
|
var className = _ref.className,
|
49439
49497
|
_ref$classNamePrefix = _ref.classNamePrefix,
|
@@ -49447,10 +49505,12 @@ var _Popover = function Popover(_ref) {
|
|
49447
49505
|
onVisibleChange = _ref.onVisibleChange,
|
49448
49506
|
afterVisibleChange = _ref.afterVisibleChange,
|
49449
49507
|
children = _ref.children,
|
49508
|
+
hideOnScroll = _ref.hideOnScroll,
|
49509
|
+
getScrollDOMNode = _ref.getScrollDOMNode,
|
49450
49510
|
rest = _objectWithoutProperties(_ref, _excluded);
|
49451
49511
|
var theme = (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.useTheme)();
|
49452
|
-
var mouseEnterDelay = (0,
|
49453
|
-
var mouseLeaveDelay = (0,
|
49512
|
+
var mouseEnterDelay = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(rest.showDelay, _Popover.showDelay);
|
49513
|
+
var mouseLeaveDelay = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(rest.hideDelay, _Popover.hideDelay);
|
49454
49514
|
var popupMotion = {
|
49455
49515
|
motionName: "".concat(classNamePrefix, "-motion"),
|
49456
49516
|
motionAppear: true,
|
@@ -49458,6 +49518,23 @@ var _Popover = function Popover(_ref) {
|
|
49458
49518
|
motionLeave: true,
|
49459
49519
|
motionDeadline: 500
|
49460
49520
|
};
|
49521
|
+
var _useStateWithEffect = (0,_hooks__WEBPACK_IMPORTED_MODULE_7__.useStateWithEffect)(visible),
|
49522
|
+
_useStateWithEffect2 = _slicedToArray(_useStateWithEffect, 2),
|
49523
|
+
popupVisible = _useStateWithEffect2[0],
|
49524
|
+
setPopupVisible = _useStateWithEffect2[1];
|
49525
|
+
var onPopupVisibleChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (value) {
|
49526
|
+
setPopupVisible(value);
|
49527
|
+
onVisibleChange === null || onVisibleChange === void 0 || onVisibleChange(value);
|
49528
|
+
}, [onVisibleChange]);
|
49529
|
+
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
49530
|
+
if (!hideOnScroll || !popupVisible) return;
|
49531
|
+
var htmlElement = typeof getScrollDOMNode == 'function' ? getScrollDOMNode() : window;
|
49532
|
+
if (htmlElement) {
|
49533
|
+
return (0,dom_helpers_listen__WEBPACK_IMPORTED_MODULE_4__["default"])(htmlElement, 'scroll', function () {
|
49534
|
+
return onPopupVisibleChange(false);
|
49535
|
+
});
|
49536
|
+
}
|
49537
|
+
}, [hideOnScroll, popupVisible, getScrollDOMNode, onPopupVisibleChange]);
|
49461
49538
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PopoverStyle, {
|
49462
49539
|
$prefixCls: classNamePrefix,
|
49463
49540
|
$theme: theme
|
@@ -49469,10 +49546,10 @@ var _Popover = function Popover(_ref) {
|
|
49469
49546
|
popupMotion: popupMotion,
|
49470
49547
|
popupClassName: className,
|
49471
49548
|
popupStyle: style,
|
49472
|
-
popupVisible:
|
49473
|
-
onPopupVisibleChange:
|
49474
|
-
builtinPlacements:
|
49475
|
-
zIndex:
|
49549
|
+
popupVisible: popupVisible,
|
49550
|
+
onPopupVisibleChange: onPopupVisibleChange,
|
49551
|
+
builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_8__.placements,
|
49552
|
+
zIndex: _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.popover,
|
49476
49553
|
afterPopupVisibleChange: afterVisibleChange,
|
49477
49554
|
mouseEnterDelay: mouseEnterDelay,
|
49478
49555
|
mouseLeaveDelay: mouseLeaveDelay,
|
@@ -49484,14 +49561,16 @@ _Popover.propTypes = {
|
|
49484
49561
|
className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
49485
49562
|
classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
49486
49563
|
style: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
49487
|
-
trigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([
|
49564
|
+
trigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_constants__WEBPACK_IMPORTED_MODULE_6__.PT_TRIGGER, prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(_constants__WEBPACK_IMPORTED_MODULE_6__.PT_TRIGGER)]),
|
49488
49565
|
visible: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
49489
|
-
placement:
|
49566
|
+
placement: _constants__WEBPACK_IMPORTED_MODULE_6__.PT_TOOLTIP_PLACEMENT,
|
49490
49567
|
popover: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
49491
49568
|
showDelay: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
49492
49569
|
hideDelay: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
49493
49570
|
onVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
49494
|
-
afterVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
49571
|
+
afterVisibleChange: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
49572
|
+
hideOnScroll: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
49573
|
+
getScrollDOMNode: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
49495
49574
|
};
|
49496
49575
|
_Popover.showDelay = 0.1;
|
49497
49576
|
_Popover.hideDelay = 0.1;
|
@@ -61859,6 +61938,153 @@ debounce.debounce = debounce;
|
|
61859
61938
|
module.exports = debounce;
|
61860
61939
|
|
61861
61940
|
|
61941
|
+
/***/ }),
|
61942
|
+
|
61943
|
+
/***/ "./node_modules/dom-helpers/esm/addEventListener.js":
|
61944
|
+
/*!**********************************************************!*\
|
61945
|
+
!*** ./node_modules/dom-helpers/esm/addEventListener.js ***!
|
61946
|
+
\**********************************************************/
|
61947
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
61948
|
+
|
61949
|
+
"use strict";
|
61950
|
+
__webpack_require__.r(__webpack_exports__);
|
61951
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
61952
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
61953
|
+
/* harmony export */ onceSupported: () => (/* binding */ onceSupported),
|
61954
|
+
/* harmony export */ optionsSupported: () => (/* binding */ optionsSupported)
|
61955
|
+
/* harmony export */ });
|
61956
|
+
/* harmony import */ var _canUseDOM__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./canUseDOM */ "./node_modules/dom-helpers/esm/canUseDOM.js");
|
61957
|
+
/* eslint-disable no-return-assign */
|
61958
|
+
|
61959
|
+
var optionsSupported = false;
|
61960
|
+
var onceSupported = false;
|
61961
|
+
|
61962
|
+
try {
|
61963
|
+
var options = {
|
61964
|
+
get passive() {
|
61965
|
+
return optionsSupported = true;
|
61966
|
+
},
|
61967
|
+
|
61968
|
+
get once() {
|
61969
|
+
// eslint-disable-next-line no-multi-assign
|
61970
|
+
return onceSupported = optionsSupported = true;
|
61971
|
+
}
|
61972
|
+
|
61973
|
+
};
|
61974
|
+
|
61975
|
+
if (_canUseDOM__WEBPACK_IMPORTED_MODULE_0__["default"]) {
|
61976
|
+
window.addEventListener('test', options, options);
|
61977
|
+
window.removeEventListener('test', options, true);
|
61978
|
+
}
|
61979
|
+
} catch (e) {
|
61980
|
+
/* */
|
61981
|
+
}
|
61982
|
+
|
61983
|
+
/**
|
61984
|
+
* An `addEventListener` ponyfill, supports the `once` option
|
61985
|
+
*
|
61986
|
+
* @param node the element
|
61987
|
+
* @param eventName the event name
|
61988
|
+
* @param handle the handler
|
61989
|
+
* @param options event options
|
61990
|
+
*/
|
61991
|
+
function addEventListener(node, eventName, handler, options) {
|
61992
|
+
if (options && typeof options !== 'boolean' && !onceSupported) {
|
61993
|
+
var once = options.once,
|
61994
|
+
capture = options.capture;
|
61995
|
+
var wrappedHandler = handler;
|
61996
|
+
|
61997
|
+
if (!onceSupported && once) {
|
61998
|
+
wrappedHandler = handler.__once || function onceHandler(event) {
|
61999
|
+
this.removeEventListener(eventName, onceHandler, capture);
|
62000
|
+
handler.call(this, event);
|
62001
|
+
};
|
62002
|
+
|
62003
|
+
handler.__once = wrappedHandler;
|
62004
|
+
}
|
62005
|
+
|
62006
|
+
node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);
|
62007
|
+
}
|
62008
|
+
|
62009
|
+
node.addEventListener(eventName, handler, options);
|
62010
|
+
}
|
62011
|
+
|
62012
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (addEventListener);
|
62013
|
+
|
62014
|
+
/***/ }),
|
62015
|
+
|
62016
|
+
/***/ "./node_modules/dom-helpers/esm/canUseDOM.js":
|
62017
|
+
/*!***************************************************!*\
|
62018
|
+
!*** ./node_modules/dom-helpers/esm/canUseDOM.js ***!
|
62019
|
+
\***************************************************/
|
62020
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
62021
|
+
|
62022
|
+
"use strict";
|
62023
|
+
__webpack_require__.r(__webpack_exports__);
|
62024
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
62025
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
62026
|
+
/* harmony export */ });
|
62027
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (!!(typeof window !== 'undefined' && window.document && window.document.createElement));
|
62028
|
+
|
62029
|
+
/***/ }),
|
62030
|
+
|
62031
|
+
/***/ "./node_modules/dom-helpers/esm/listen.js":
|
62032
|
+
/*!************************************************!*\
|
62033
|
+
!*** ./node_modules/dom-helpers/esm/listen.js ***!
|
62034
|
+
\************************************************/
|
62035
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
62036
|
+
|
62037
|
+
"use strict";
|
62038
|
+
__webpack_require__.r(__webpack_exports__);
|
62039
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
62040
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
62041
|
+
/* harmony export */ });
|
62042
|
+
/* harmony import */ var _addEventListener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addEventListener */ "./node_modules/dom-helpers/esm/addEventListener.js");
|
62043
|
+
/* harmony import */ var _removeEventListener__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeEventListener */ "./node_modules/dom-helpers/esm/removeEventListener.js");
|
62044
|
+
|
62045
|
+
|
62046
|
+
|
62047
|
+
function listen(node, eventName, handler, options) {
|
62048
|
+
(0,_addEventListener__WEBPACK_IMPORTED_MODULE_0__["default"])(node, eventName, handler, options);
|
62049
|
+
return function () {
|
62050
|
+
(0,_removeEventListener__WEBPACK_IMPORTED_MODULE_1__["default"])(node, eventName, handler, options);
|
62051
|
+
};
|
62052
|
+
}
|
62053
|
+
|
62054
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (listen);
|
62055
|
+
|
62056
|
+
/***/ }),
|
62057
|
+
|
62058
|
+
/***/ "./node_modules/dom-helpers/esm/removeEventListener.js":
|
62059
|
+
/*!*************************************************************!*\
|
62060
|
+
!*** ./node_modules/dom-helpers/esm/removeEventListener.js ***!
|
62061
|
+
\*************************************************************/
|
62062
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
62063
|
+
|
62064
|
+
"use strict";
|
62065
|
+
__webpack_require__.r(__webpack_exports__);
|
62066
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
62067
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
62068
|
+
/* harmony export */ });
|
62069
|
+
/**
|
62070
|
+
* A `removeEventListener` ponyfill
|
62071
|
+
*
|
62072
|
+
* @param node the element
|
62073
|
+
* @param eventName the event name
|
62074
|
+
* @param handle the handler
|
62075
|
+
* @param options event options
|
62076
|
+
*/
|
62077
|
+
function removeEventListener(node, eventName, handler, options) {
|
62078
|
+
var capture = options && typeof options !== 'boolean' ? options.capture : options;
|
62079
|
+
node.removeEventListener(eventName, handler, capture);
|
62080
|
+
|
62081
|
+
if (handler.__once) {
|
62082
|
+
node.removeEventListener(eventName, handler.__once, capture);
|
62083
|
+
}
|
62084
|
+
}
|
62085
|
+
|
62086
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (removeEventListener);
|
62087
|
+
|
61862
62088
|
/***/ }),
|
61863
62089
|
|
61864
62090
|
/***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":
|