You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1509 lines
41 KiB
1509 lines
41 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[35874],{
|
|
|
|
/***/ 35874:
|
|
/*!***************************************************************!*\
|
|
!*** ./node_modules/antd/es/dropdown/dropdown.js + 9 modules ***!
|
|
\***************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ dropdown; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/RightOutlined.js + 1 modules
|
|
var RightOutlined = __webpack_require__(18073);
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(4942);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__(97685);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(45987);
|
|
// EXTERNAL MODULE: ./node_modules/@rc-component/trigger/es/index.js + 42 modules
|
|
var es = __webpack_require__(62709);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
var esm_typeof = __webpack_require__(71002);
|
|
// EXTERNAL MODULE: ./node_modules/react-is/index.js
|
|
var react_is = __webpack_require__(59864);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/node_modules/rc-util/es/hooks/useMemo.js
|
|
|
|
function useMemo_useMemo(getValue, condition, shouldUpdate) {
|
|
var cacheRef = React.useRef({});
|
|
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
cacheRef.current.value = getValue();
|
|
cacheRef.current.condition = condition;
|
|
}
|
|
return cacheRef.current.value;
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/node_modules/rc-util/es/ref.js
|
|
|
|
/* eslint-disable no-param-reassign */
|
|
|
|
|
|
|
|
function fillRef(ref, node) {
|
|
if (typeof ref === 'function') {
|
|
ref(node);
|
|
} else if ((0,esm_typeof/* default */.Z)(ref) === 'object' && ref && 'current' in ref) {
|
|
ref.current = node;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Merge refs into one ref function to support ref passing.
|
|
*/
|
|
function composeRef() {
|
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
refs[_key] = arguments[_key];
|
|
}
|
|
var refList = refs.filter(function (ref) {
|
|
return ref;
|
|
});
|
|
if (refList.length <= 1) {
|
|
return refList[0];
|
|
}
|
|
return function (node) {
|
|
refs.forEach(function (ref) {
|
|
fillRef(ref, node);
|
|
});
|
|
};
|
|
}
|
|
function useComposeRef() {
|
|
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
refs[_key2] = arguments[_key2];
|
|
}
|
|
return useMemo(function () {
|
|
return composeRef.apply(void 0, refs);
|
|
}, refs, function (prev, next) {
|
|
return prev.length === next.length && prev.every(function (ref, i) {
|
|
return ref === next[i];
|
|
});
|
|
});
|
|
}
|
|
function supportRef(nodeOrComponent) {
|
|
var _type$prototype, _nodeOrComponent$prot;
|
|
var type = (0,react_is.isMemo)(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
|
|
|
|
// Function component node
|
|
if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) {
|
|
return false;
|
|
}
|
|
|
|
// Class component
|
|
if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
/* eslint-enable */
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/node_modules/rc-util/es/KeyCode.js
|
|
/**
|
|
* @ignore
|
|
* some key-codes definition and utils from closure-library
|
|
* @author yiminghe@gmail.com
|
|
*/
|
|
|
|
var KeyCode = {
|
|
/**
|
|
* MAC_ENTER
|
|
*/
|
|
MAC_ENTER: 3,
|
|
/**
|
|
* BACKSPACE
|
|
*/
|
|
BACKSPACE: 8,
|
|
/**
|
|
* TAB
|
|
*/
|
|
TAB: 9,
|
|
/**
|
|
* NUMLOCK on FF/Safari Mac
|
|
*/
|
|
NUM_CENTER: 12,
|
|
// NUMLOCK on FF/Safari Mac
|
|
/**
|
|
* ENTER
|
|
*/
|
|
ENTER: 13,
|
|
/**
|
|
* SHIFT
|
|
*/
|
|
SHIFT: 16,
|
|
/**
|
|
* CTRL
|
|
*/
|
|
CTRL: 17,
|
|
/**
|
|
* ALT
|
|
*/
|
|
ALT: 18,
|
|
/**
|
|
* PAUSE
|
|
*/
|
|
PAUSE: 19,
|
|
/**
|
|
* CAPS_LOCK
|
|
*/
|
|
CAPS_LOCK: 20,
|
|
/**
|
|
* ESC
|
|
*/
|
|
ESC: 27,
|
|
/**
|
|
* SPACE
|
|
*/
|
|
SPACE: 32,
|
|
/**
|
|
* PAGE_UP
|
|
*/
|
|
PAGE_UP: 33,
|
|
// also NUM_NORTH_EAST
|
|
/**
|
|
* PAGE_DOWN
|
|
*/
|
|
PAGE_DOWN: 34,
|
|
// also NUM_SOUTH_EAST
|
|
/**
|
|
* END
|
|
*/
|
|
END: 35,
|
|
// also NUM_SOUTH_WEST
|
|
/**
|
|
* HOME
|
|
*/
|
|
HOME: 36,
|
|
// also NUM_NORTH_WEST
|
|
/**
|
|
* LEFT
|
|
*/
|
|
LEFT: 37,
|
|
// also NUM_WEST
|
|
/**
|
|
* UP
|
|
*/
|
|
UP: 38,
|
|
// also NUM_NORTH
|
|
/**
|
|
* RIGHT
|
|
*/
|
|
RIGHT: 39,
|
|
// also NUM_EAST
|
|
/**
|
|
* DOWN
|
|
*/
|
|
DOWN: 40,
|
|
// also NUM_SOUTH
|
|
/**
|
|
* PRINT_SCREEN
|
|
*/
|
|
PRINT_SCREEN: 44,
|
|
/**
|
|
* INSERT
|
|
*/
|
|
INSERT: 45,
|
|
// also NUM_INSERT
|
|
/**
|
|
* DELETE
|
|
*/
|
|
DELETE: 46,
|
|
// also NUM_DELETE
|
|
/**
|
|
* ZERO
|
|
*/
|
|
ZERO: 48,
|
|
/**
|
|
* ONE
|
|
*/
|
|
ONE: 49,
|
|
/**
|
|
* TWO
|
|
*/
|
|
TWO: 50,
|
|
/**
|
|
* THREE
|
|
*/
|
|
THREE: 51,
|
|
/**
|
|
* FOUR
|
|
*/
|
|
FOUR: 52,
|
|
/**
|
|
* FIVE
|
|
*/
|
|
FIVE: 53,
|
|
/**
|
|
* SIX
|
|
*/
|
|
SIX: 54,
|
|
/**
|
|
* SEVEN
|
|
*/
|
|
SEVEN: 55,
|
|
/**
|
|
* EIGHT
|
|
*/
|
|
EIGHT: 56,
|
|
/**
|
|
* NINE
|
|
*/
|
|
NINE: 57,
|
|
/**
|
|
* QUESTION_MARK
|
|
*/
|
|
QUESTION_MARK: 63,
|
|
// needs localization
|
|
/**
|
|
* A
|
|
*/
|
|
A: 65,
|
|
/**
|
|
* B
|
|
*/
|
|
B: 66,
|
|
/**
|
|
* C
|
|
*/
|
|
C: 67,
|
|
/**
|
|
* D
|
|
*/
|
|
D: 68,
|
|
/**
|
|
* E
|
|
*/
|
|
E: 69,
|
|
/**
|
|
* F
|
|
*/
|
|
F: 70,
|
|
/**
|
|
* G
|
|
*/
|
|
G: 71,
|
|
/**
|
|
* H
|
|
*/
|
|
H: 72,
|
|
/**
|
|
* I
|
|
*/
|
|
I: 73,
|
|
/**
|
|
* J
|
|
*/
|
|
J: 74,
|
|
/**
|
|
* K
|
|
*/
|
|
K: 75,
|
|
/**
|
|
* L
|
|
*/
|
|
L: 76,
|
|
/**
|
|
* M
|
|
*/
|
|
M: 77,
|
|
/**
|
|
* N
|
|
*/
|
|
N: 78,
|
|
/**
|
|
* O
|
|
*/
|
|
O: 79,
|
|
/**
|
|
* P
|
|
*/
|
|
P: 80,
|
|
/**
|
|
* Q
|
|
*/
|
|
Q: 81,
|
|
/**
|
|
* R
|
|
*/
|
|
R: 82,
|
|
/**
|
|
* S
|
|
*/
|
|
S: 83,
|
|
/**
|
|
* T
|
|
*/
|
|
T: 84,
|
|
/**
|
|
* U
|
|
*/
|
|
U: 85,
|
|
/**
|
|
* V
|
|
*/
|
|
V: 86,
|
|
/**
|
|
* W
|
|
*/
|
|
W: 87,
|
|
/**
|
|
* X
|
|
*/
|
|
X: 88,
|
|
/**
|
|
* Y
|
|
*/
|
|
Y: 89,
|
|
/**
|
|
* Z
|
|
*/
|
|
Z: 90,
|
|
/**
|
|
* META
|
|
*/
|
|
META: 91,
|
|
// WIN_KEY_LEFT
|
|
/**
|
|
* WIN_KEY_RIGHT
|
|
*/
|
|
WIN_KEY_RIGHT: 92,
|
|
/**
|
|
* CONTEXT_MENU
|
|
*/
|
|
CONTEXT_MENU: 93,
|
|
/**
|
|
* NUM_ZERO
|
|
*/
|
|
NUM_ZERO: 96,
|
|
/**
|
|
* NUM_ONE
|
|
*/
|
|
NUM_ONE: 97,
|
|
/**
|
|
* NUM_TWO
|
|
*/
|
|
NUM_TWO: 98,
|
|
/**
|
|
* NUM_THREE
|
|
*/
|
|
NUM_THREE: 99,
|
|
/**
|
|
* NUM_FOUR
|
|
*/
|
|
NUM_FOUR: 100,
|
|
/**
|
|
* NUM_FIVE
|
|
*/
|
|
NUM_FIVE: 101,
|
|
/**
|
|
* NUM_SIX
|
|
*/
|
|
NUM_SIX: 102,
|
|
/**
|
|
* NUM_SEVEN
|
|
*/
|
|
NUM_SEVEN: 103,
|
|
/**
|
|
* NUM_EIGHT
|
|
*/
|
|
NUM_EIGHT: 104,
|
|
/**
|
|
* NUM_NINE
|
|
*/
|
|
NUM_NINE: 105,
|
|
/**
|
|
* NUM_MULTIPLY
|
|
*/
|
|
NUM_MULTIPLY: 106,
|
|
/**
|
|
* NUM_PLUS
|
|
*/
|
|
NUM_PLUS: 107,
|
|
/**
|
|
* NUM_MINUS
|
|
*/
|
|
NUM_MINUS: 109,
|
|
/**
|
|
* NUM_PERIOD
|
|
*/
|
|
NUM_PERIOD: 110,
|
|
/**
|
|
* NUM_DIVISION
|
|
*/
|
|
NUM_DIVISION: 111,
|
|
/**
|
|
* F1
|
|
*/
|
|
F1: 112,
|
|
/**
|
|
* F2
|
|
*/
|
|
F2: 113,
|
|
/**
|
|
* F3
|
|
*/
|
|
F3: 114,
|
|
/**
|
|
* F4
|
|
*/
|
|
F4: 115,
|
|
/**
|
|
* F5
|
|
*/
|
|
F5: 116,
|
|
/**
|
|
* F6
|
|
*/
|
|
F6: 117,
|
|
/**
|
|
* F7
|
|
*/
|
|
F7: 118,
|
|
/**
|
|
* F8
|
|
*/
|
|
F8: 119,
|
|
/**
|
|
* F9
|
|
*/
|
|
F9: 120,
|
|
/**
|
|
* F10
|
|
*/
|
|
F10: 121,
|
|
/**
|
|
* F11
|
|
*/
|
|
F11: 122,
|
|
/**
|
|
* F12
|
|
*/
|
|
F12: 123,
|
|
/**
|
|
* NUMLOCK
|
|
*/
|
|
NUMLOCK: 144,
|
|
/**
|
|
* SEMICOLON
|
|
*/
|
|
SEMICOLON: 186,
|
|
// needs localization
|
|
/**
|
|
* DASH
|
|
*/
|
|
DASH: 189,
|
|
// needs localization
|
|
/**
|
|
* EQUALS
|
|
*/
|
|
EQUALS: 187,
|
|
// needs localization
|
|
/**
|
|
* COMMA
|
|
*/
|
|
COMMA: 188,
|
|
// needs localization
|
|
/**
|
|
* PERIOD
|
|
*/
|
|
PERIOD: 190,
|
|
// needs localization
|
|
/**
|
|
* SLASH
|
|
*/
|
|
SLASH: 191,
|
|
// needs localization
|
|
/**
|
|
* APOSTROPHE
|
|
*/
|
|
APOSTROPHE: 192,
|
|
// needs localization
|
|
/**
|
|
* SINGLE_QUOTE
|
|
*/
|
|
SINGLE_QUOTE: 222,
|
|
// needs localization
|
|
/**
|
|
* OPEN_SQUARE_BRACKET
|
|
*/
|
|
OPEN_SQUARE_BRACKET: 219,
|
|
// needs localization
|
|
/**
|
|
* BACKSLASH
|
|
*/
|
|
BACKSLASH: 220,
|
|
// needs localization
|
|
/**
|
|
* CLOSE_SQUARE_BRACKET
|
|
*/
|
|
CLOSE_SQUARE_BRACKET: 221,
|
|
// needs localization
|
|
/**
|
|
* WIN_KEY
|
|
*/
|
|
WIN_KEY: 224,
|
|
/**
|
|
* MAC_FF_META
|
|
*/
|
|
MAC_FF_META: 224,
|
|
// Firefox (Gecko) fires this for the meta key instead of 91
|
|
/**
|
|
* WIN_IME
|
|
*/
|
|
WIN_IME: 229,
|
|
// ======================== Function ========================
|
|
/**
|
|
* whether text and modified key is entered at the same time.
|
|
*/
|
|
isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {
|
|
var keyCode = e.keyCode;
|
|
if (e.altKey && !e.ctrlKey || e.metaKey ||
|
|
// Function keys don't generate text
|
|
keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
|
|
return false;
|
|
}
|
|
|
|
// The following keys are quite harmless, even in combination with
|
|
// CTRL, ALT or SHIFT.
|
|
switch (keyCode) {
|
|
case KeyCode.ALT:
|
|
case KeyCode.CAPS_LOCK:
|
|
case KeyCode.CONTEXT_MENU:
|
|
case KeyCode.CTRL:
|
|
case KeyCode.DOWN:
|
|
case KeyCode.END:
|
|
case KeyCode.ESC:
|
|
case KeyCode.HOME:
|
|
case KeyCode.INSERT:
|
|
case KeyCode.LEFT:
|
|
case KeyCode.MAC_FF_META:
|
|
case KeyCode.META:
|
|
case KeyCode.NUMLOCK:
|
|
case KeyCode.NUM_CENTER:
|
|
case KeyCode.PAGE_DOWN:
|
|
case KeyCode.PAGE_UP:
|
|
case KeyCode.PAUSE:
|
|
case KeyCode.PRINT_SCREEN:
|
|
case KeyCode.RIGHT:
|
|
case KeyCode.SHIFT:
|
|
case KeyCode.UP:
|
|
case KeyCode.WIN_KEY:
|
|
case KeyCode.WIN_KEY_RIGHT:
|
|
return false;
|
|
default:
|
|
return true;
|
|
}
|
|
},
|
|
/**
|
|
* whether character is entered.
|
|
*/
|
|
isCharacterKey: function isCharacterKey(keyCode) {
|
|
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
|
|
return true;
|
|
}
|
|
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
|
|
return true;
|
|
}
|
|
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
|
|
return true;
|
|
}
|
|
|
|
// Safari sends zero key code for non-latin characters.
|
|
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
|
|
return true;
|
|
}
|
|
switch (keyCode) {
|
|
case KeyCode.SPACE:
|
|
case KeyCode.QUESTION_MARK:
|
|
case KeyCode.NUM_PLUS:
|
|
case KeyCode.NUM_MINUS:
|
|
case KeyCode.NUM_PERIOD:
|
|
case KeyCode.NUM_DIVISION:
|
|
case KeyCode.SEMICOLON:
|
|
case KeyCode.DASH:
|
|
case KeyCode.EQUALS:
|
|
case KeyCode.COMMA:
|
|
case KeyCode.PERIOD:
|
|
case KeyCode.SLASH:
|
|
case KeyCode.APOSTROPHE:
|
|
case KeyCode.SINGLE_QUOTE:
|
|
case KeyCode.OPEN_SQUARE_BRACKET:
|
|
case KeyCode.BACKSLASH:
|
|
case KeyCode.CLOSE_SQUARE_BRACKET:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
};
|
|
/* harmony default export */ var es_KeyCode = (KeyCode);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/node_modules/rc-util/es/raf.js
|
|
var raf = function raf(callback) {
|
|
return +setTimeout(callback, 16);
|
|
};
|
|
var caf = function caf(num) {
|
|
return clearTimeout(num);
|
|
};
|
|
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
|
|
raf = function raf(callback) {
|
|
return window.requestAnimationFrame(callback);
|
|
};
|
|
caf = function caf(handle) {
|
|
return window.cancelAnimationFrame(handle);
|
|
};
|
|
}
|
|
var rafUUID = 0;
|
|
var rafIds = new Map();
|
|
function cleanup(id) {
|
|
rafIds.delete(id);
|
|
}
|
|
var wrapperRaf = function wrapperRaf(callback) {
|
|
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
rafUUID += 1;
|
|
var id = rafUUID;
|
|
function callRef(leftTimes) {
|
|
if (leftTimes === 0) {
|
|
// Clean up
|
|
cleanup(id);
|
|
|
|
// Trigger
|
|
callback();
|
|
} else {
|
|
// Next raf
|
|
var realId = raf(function () {
|
|
callRef(leftTimes - 1);
|
|
});
|
|
|
|
// Bind real raf id
|
|
rafIds.set(id, realId);
|
|
}
|
|
}
|
|
callRef(times);
|
|
return id;
|
|
};
|
|
wrapperRaf.cancel = function (id) {
|
|
var realId = rafIds.get(id);
|
|
cleanup(realId);
|
|
return caf(realId);
|
|
};
|
|
/* harmony default export */ var es_raf = (wrapperRaf);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/hooks/useAccessibility.js
|
|
|
|
|
|
|
|
var ESC = es_KeyCode.ESC,
|
|
TAB = es_KeyCode.TAB;
|
|
function useAccessibility(_ref) {
|
|
var visible = _ref.visible,
|
|
triggerRef = _ref.triggerRef,
|
|
onVisibleChange = _ref.onVisibleChange,
|
|
autoFocus = _ref.autoFocus,
|
|
overlayRef = _ref.overlayRef;
|
|
var focusMenuRef = react.useRef(false);
|
|
var handleCloseMenuAndReturnFocus = function handleCloseMenuAndReturnFocus() {
|
|
if (visible) {
|
|
var _triggerRef$current, _triggerRef$current$f;
|
|
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : (_triggerRef$current$f = _triggerRef$current.focus) === null || _triggerRef$current$f === void 0 ? void 0 : _triggerRef$current$f.call(_triggerRef$current);
|
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(false);
|
|
}
|
|
};
|
|
var focusMenu = function focusMenu() {
|
|
var _overlayRef$current;
|
|
if ((_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.focus) {
|
|
overlayRef.current.focus();
|
|
focusMenuRef.current = true;
|
|
return true;
|
|
}
|
|
return false;
|
|
};
|
|
var handleKeyDown = function handleKeyDown(event) {
|
|
switch (event.keyCode) {
|
|
case ESC:
|
|
handleCloseMenuAndReturnFocus();
|
|
break;
|
|
case TAB:
|
|
{
|
|
var focusResult = false;
|
|
if (!focusMenuRef.current) {
|
|
focusResult = focusMenu();
|
|
}
|
|
if (focusResult) {
|
|
event.preventDefault();
|
|
} else {
|
|
handleCloseMenuAndReturnFocus();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
};
|
|
react.useEffect(function () {
|
|
if (visible) {
|
|
window.addEventListener("keydown", handleKeyDown);
|
|
if (autoFocus) {
|
|
// FIXME: hack with raf
|
|
es_raf(focusMenu, 3);
|
|
}
|
|
return function () {
|
|
window.removeEventListener("keydown", handleKeyDown);
|
|
focusMenuRef.current = false;
|
|
};
|
|
}
|
|
return function () {
|
|
focusMenuRef.current = false;
|
|
};
|
|
}, [visible]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/Overlay.js
|
|
|
|
|
|
var Overlay = /*#__PURE__*/(0,react.forwardRef)(function (props, ref) {
|
|
var overlay = props.overlay,
|
|
arrow = props.arrow,
|
|
prefixCls = props.prefixCls;
|
|
var overlayNode = (0,react.useMemo)(function () {
|
|
var overlayElement;
|
|
if (typeof overlay === 'function') {
|
|
overlayElement = overlay();
|
|
} else {
|
|
overlayElement = overlay;
|
|
}
|
|
return overlayElement;
|
|
}, [overlay]);
|
|
var composedRef = composeRef(ref, overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.ref);
|
|
return /*#__PURE__*/react.createElement(react.Fragment, null, arrow && /*#__PURE__*/react.createElement("div", {
|
|
className: "".concat(prefixCls, "-arrow")
|
|
}), /*#__PURE__*/react.cloneElement(overlayNode, {
|
|
ref: supportRef(overlayNode) ? composedRef : undefined
|
|
}));
|
|
});
|
|
/* harmony default export */ var es_Overlay = (Overlay);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/placements.js
|
|
var autoAdjustOverflow = {
|
|
adjustX: 1,
|
|
adjustY: 1
|
|
};
|
|
var targetOffset = [0, 0];
|
|
var placements = {
|
|
topLeft: {
|
|
points: ['bl', 'tl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, -4],
|
|
targetOffset: targetOffset
|
|
},
|
|
top: {
|
|
points: ['bc', 'tc'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, -4],
|
|
targetOffset: targetOffset
|
|
},
|
|
topRight: {
|
|
points: ['br', 'tr'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, -4],
|
|
targetOffset: targetOffset
|
|
},
|
|
bottomLeft: {
|
|
points: ['tl', 'bl'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, 4],
|
|
targetOffset: targetOffset
|
|
},
|
|
bottom: {
|
|
points: ['tc', 'bc'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, 4],
|
|
targetOffset: targetOffset
|
|
},
|
|
bottomRight: {
|
|
points: ['tr', 'br'],
|
|
overflow: autoAdjustOverflow,
|
|
offset: [0, 4],
|
|
targetOffset: targetOffset
|
|
}
|
|
};
|
|
/* harmony default export */ var es_placements = (placements);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/Dropdown.js
|
|
|
|
|
|
|
|
|
|
var _excluded = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Dropdown(props, ref) {
|
|
var _children$props;
|
|
var _props$arrow = props.arrow,
|
|
arrow = _props$arrow === void 0 ? false : _props$arrow,
|
|
_props$prefixCls = props.prefixCls,
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls,
|
|
transitionName = props.transitionName,
|
|
animation = props.animation,
|
|
align = props.align,
|
|
_props$placement = props.placement,
|
|
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
|
|
_props$placements = props.placements,
|
|
placements = _props$placements === void 0 ? es_placements : _props$placements,
|
|
getPopupContainer = props.getPopupContainer,
|
|
showAction = props.showAction,
|
|
hideAction = props.hideAction,
|
|
overlayClassName = props.overlayClassName,
|
|
overlayStyle = props.overlayStyle,
|
|
visible = props.visible,
|
|
_props$trigger = props.trigger,
|
|
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
|
|
autoFocus = props.autoFocus,
|
|
overlay = props.overlay,
|
|
children = props.children,
|
|
onVisibleChange = props.onVisibleChange,
|
|
otherProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
|
|
var _React$useState = react.useState(),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
triggerVisible = _React$useState2[0],
|
|
setTriggerVisible = _React$useState2[1];
|
|
var mergedVisible = 'visible' in props ? visible : triggerVisible;
|
|
var triggerRef = react.useRef(null);
|
|
var overlayRef = react.useRef(null);
|
|
var childRef = react.useRef(null);
|
|
react.useImperativeHandle(ref, function () {
|
|
return triggerRef.current;
|
|
});
|
|
var handleVisibleChange = function handleVisibleChange(newVisible) {
|
|
setTriggerVisible(newVisible);
|
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(newVisible);
|
|
};
|
|
useAccessibility({
|
|
visible: mergedVisible,
|
|
triggerRef: childRef,
|
|
onVisibleChange: handleVisibleChange,
|
|
autoFocus: autoFocus,
|
|
overlayRef: overlayRef
|
|
});
|
|
var onClick = function onClick(e) {
|
|
var onOverlayClick = props.onOverlayClick;
|
|
setTriggerVisible(false);
|
|
if (onOverlayClick) {
|
|
onOverlayClick(e);
|
|
}
|
|
};
|
|
var getMenuElement = function getMenuElement() {
|
|
return /*#__PURE__*/react.createElement(es_Overlay, {
|
|
ref: overlayRef,
|
|
overlay: overlay,
|
|
prefixCls: prefixCls,
|
|
arrow: arrow
|
|
});
|
|
};
|
|
var getMenuElementOrLambda = function getMenuElementOrLambda() {
|
|
if (typeof overlay === 'function') {
|
|
return getMenuElement;
|
|
}
|
|
return getMenuElement();
|
|
};
|
|
var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() {
|
|
var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger,
|
|
alignPoint = props.alignPoint;
|
|
if ('minOverlayWidthMatchTrigger' in props) {
|
|
return minOverlayWidthMatchTrigger;
|
|
}
|
|
return !alignPoint;
|
|
};
|
|
var getOpenClassName = function getOpenClassName() {
|
|
var openClassName = props.openClassName;
|
|
if (openClassName !== undefined) {
|
|
return openClassName;
|
|
}
|
|
return "".concat(prefixCls, "-open");
|
|
};
|
|
var childrenNode = /*#__PURE__*/react.cloneElement(children, {
|
|
className: classnames_default()((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.className, mergedVisible && getOpenClassName()),
|
|
ref: supportRef(children) ? composeRef(childRef, children.ref) : undefined
|
|
});
|
|
var triggerHideAction = hideAction;
|
|
if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
|
|
triggerHideAction = ['click'];
|
|
}
|
|
return /*#__PURE__*/react.createElement(es/* default */.Z, (0,esm_extends/* default */.Z)({
|
|
builtinPlacements: placements
|
|
}, otherProps, {
|
|
prefixCls: prefixCls,
|
|
ref: triggerRef,
|
|
popupClassName: classnames_default()(overlayClassName, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-show-arrow"), arrow)),
|
|
popupStyle: overlayStyle,
|
|
action: trigger,
|
|
showAction: showAction,
|
|
hideAction: triggerHideAction,
|
|
popupPlacement: placement,
|
|
popupAlign: align,
|
|
popupTransitionName: transitionName,
|
|
popupAnimation: animation,
|
|
popupVisible: mergedVisible,
|
|
stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '',
|
|
popup: getMenuElementOrLambda(),
|
|
onPopupVisibleChange: handleVisibleChange,
|
|
onPopupClick: onClick,
|
|
getPopupContainer: getPopupContainer
|
|
}), childrenNode);
|
|
}
|
|
/* harmony default export */ var es_Dropdown = (/*#__PURE__*/react.forwardRef(Dropdown));
|
|
;// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/index.js
|
|
|
|
/* harmony default export */ var rc_dropdown_es = (es_Dropdown);
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/hooks/useEvent.js
|
|
var useEvent = __webpack_require__(77527);
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/hooks/useMergedState.js
|
|
var useMergedState = __webpack_require__(5663);
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js
|
|
var omit = __webpack_require__(10366);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/PurePanel.js
|
|
var PurePanel = __webpack_require__(8745);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/placements.js
|
|
var _util_placements = __webpack_require__(80636);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
var reactNode = __webpack_require__(96159);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
var context = __webpack_require__(53124);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 11 modules
|
|
var es_menu = __webpack_require__(68508);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/OverrideContext.js
|
|
var OverrideContext = __webpack_require__(76529);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/index.js + 6 modules
|
|
var theme = __webpack_require__(9361);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js + 1 modules
|
|
var style = __webpack_require__(66748);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/dropdown.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Placements = (/* unused pure expression or super */ null && (['topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight', 'top', 'bottom']));
|
|
const dropdown_Dropdown = props => {
|
|
const {
|
|
menu,
|
|
arrow,
|
|
prefixCls: customizePrefixCls,
|
|
children,
|
|
trigger,
|
|
disabled,
|
|
dropdownRender,
|
|
getPopupContainer,
|
|
overlayClassName,
|
|
rootClassName,
|
|
open,
|
|
onOpenChange,
|
|
// Deprecated
|
|
visible,
|
|
onVisibleChange,
|
|
mouseEnterDelay = 0.15,
|
|
mouseLeaveDelay = 0.1,
|
|
autoAdjustOverflow = true,
|
|
placement = '',
|
|
overlay,
|
|
transitionName
|
|
} = props;
|
|
const {
|
|
getPopupContainer: getContextPopupContainer,
|
|
getPrefixCls,
|
|
direction
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
// Warning for deprecated usage
|
|
if (false) {}
|
|
const memoTransitionName = react.useMemo(() => {
|
|
const rootPrefixCls = getPrefixCls();
|
|
if (transitionName !== undefined) {
|
|
return transitionName;
|
|
}
|
|
if (placement.includes('top')) {
|
|
return `${rootPrefixCls}-slide-down`;
|
|
}
|
|
return `${rootPrefixCls}-slide-up`;
|
|
}, [getPrefixCls, placement, transitionName]);
|
|
const memoPlacement = react.useMemo(() => {
|
|
if (!placement) {
|
|
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
}
|
|
if (placement.includes('Center')) {
|
|
const newPlacement = placement.slice(0, placement.indexOf('Center'));
|
|
false ? 0 : void 0;
|
|
return newPlacement;
|
|
}
|
|
return placement;
|
|
}, [placement, direction]);
|
|
if (false) {}
|
|
const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
|
|
const [wrapSSR, hashId] = (0,style/* default */.Z)(prefixCls);
|
|
const {
|
|
token
|
|
} = theme/* default.useToken */.Z.useToken();
|
|
const child = react.Children.only(children);
|
|
const dropdownTrigger = (0,reactNode/* cloneElement */.Tm)(child, {
|
|
className: classnames_default()(`${prefixCls}-trigger`, {
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, child.props.className),
|
|
disabled
|
|
});
|
|
const triggerActions = disabled ? [] : trigger;
|
|
let alignPoint;
|
|
if (triggerActions && triggerActions.includes('contextMenu')) {
|
|
alignPoint = true;
|
|
}
|
|
// =========================== Open ============================
|
|
const [mergedOpen, setOpen] = (0,useMergedState/* default */.Z)(false, {
|
|
value: open !== null && open !== void 0 ? open : visible
|
|
});
|
|
const onInnerOpenChange = (0,useEvent/* default */.Z)(nextOpen => {
|
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(nextOpen);
|
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(nextOpen);
|
|
setOpen(nextOpen);
|
|
});
|
|
// =========================== Overlay ============================
|
|
const overlayClassNameCustomized = classnames_default()(overlayClassName, rootClassName, hashId, {
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
});
|
|
const builtinPlacements = (0,_util_placements/* default */.Z)({
|
|
arrowPointAtCenter: typeof arrow === 'object' && arrow.pointAtCenter,
|
|
autoAdjustOverflow,
|
|
offset: token.marginXXS,
|
|
arrowWidth: arrow ? token.sizePopupArrow : 0,
|
|
borderRadius: token.borderRadius
|
|
});
|
|
const onMenuClick = react.useCallback(() => {
|
|
setOpen(false);
|
|
}, []);
|
|
const renderOverlay = () => {
|
|
// rc-dropdown already can process the function of overlay, but we have check logic here.
|
|
// So we need render the element to check and pass back to rc-dropdown.
|
|
let overlayNode;
|
|
if (menu === null || menu === void 0 ? void 0 : menu.items) {
|
|
overlayNode = /*#__PURE__*/react.createElement(es_menu/* default */.Z, Object.assign({}, menu));
|
|
} else if (typeof overlay === 'function') {
|
|
overlayNode = overlay();
|
|
} else {
|
|
overlayNode = overlay;
|
|
}
|
|
if (dropdownRender) {
|
|
overlayNode = dropdownRender(overlayNode);
|
|
}
|
|
overlayNode = react.Children.only(typeof overlayNode === 'string' ? /*#__PURE__*/react.createElement("span", null, overlayNode) : overlayNode);
|
|
return /*#__PURE__*/react.createElement(OverrideContext/* OverrideProvider */.J, {
|
|
prefixCls: `${prefixCls}-menu`,
|
|
expandIcon: /*#__PURE__*/react.createElement("span", {
|
|
className: `${prefixCls}-menu-submenu-arrow`
|
|
}, /*#__PURE__*/react.createElement(RightOutlined/* default */.Z, {
|
|
className: `${prefixCls}-menu-submenu-arrow-icon`
|
|
})),
|
|
mode: "vertical",
|
|
selectable: false,
|
|
onClick: onMenuClick,
|
|
validator: _ref3 => {
|
|
let {
|
|
mode
|
|
} = _ref3;
|
|
// Warning if use other mode
|
|
false ? 0 : void 0;
|
|
}
|
|
}, overlayNode);
|
|
};
|
|
// ============================ Render ============================
|
|
return wrapSSR( /*#__PURE__*/react.createElement(rc_dropdown_es, Object.assign({
|
|
alignPoint: alignPoint
|
|
}, (0,omit/* default */.Z)(props, ['rootClassName']), {
|
|
mouseEnterDelay: mouseEnterDelay,
|
|
mouseLeaveDelay: mouseLeaveDelay,
|
|
visible: mergedOpen,
|
|
builtinPlacements: builtinPlacements,
|
|
arrow: !!arrow,
|
|
overlayClassName: overlayClassNameCustomized,
|
|
prefixCls: prefixCls,
|
|
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
transitionName: memoTransitionName,
|
|
trigger: triggerActions,
|
|
overlay: renderOverlay,
|
|
placement: memoPlacement,
|
|
onVisibleChange: onInnerOpenChange
|
|
}), dropdownTrigger));
|
|
};
|
|
function postPureProps(props) {
|
|
return Object.assign(Object.assign({}, props), {
|
|
align: {
|
|
overflow: {
|
|
adjustX: false,
|
|
adjustY: false
|
|
}
|
|
}
|
|
});
|
|
}
|
|
// We don't care debug panel
|
|
const dropdown_PurePanel = (0,PurePanel/* default */.Z)(dropdown_Dropdown, 'dropdown', prefixCls => prefixCls, postPureProps);
|
|
/* istanbul ignore next */
|
|
const WrapPurePanel = props => /*#__PURE__*/react.createElement(dropdown_PurePanel, Object.assign({}, props), /*#__PURE__*/react.createElement("span", null));
|
|
dropdown_Dropdown._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel;
|
|
if (false) {}
|
|
/* harmony default export */ var dropdown = (dropdown_Dropdown);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 66748:
|
|
/*!******************************************************************!*\
|
|
!*** ./node_modules/antd/es/dropdown/style/index.js + 1 modules ***!
|
|
\******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ dropdown_style; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/index.js
|
|
var style = __webpack_require__(14747);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/motion/slide.js
|
|
var slide = __webpack_require__(67771);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/motion/move.js
|
|
var move = __webpack_require__(33297);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/motion/zoom.js
|
|
var zoom = __webpack_require__(50438);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/style/placementArrow.js
|
|
var placementArrow = __webpack_require__(97414);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(67968);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(45503);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/style/status.js
|
|
const genStatusStyle = token => {
|
|
const {
|
|
componentCls,
|
|
menuCls,
|
|
colorError,
|
|
colorTextLightSolid
|
|
} = token;
|
|
const itemCls = `${menuCls}-item`;
|
|
return {
|
|
[`${componentCls}, ${componentCls}-menu-submenu`]: {
|
|
[`${menuCls} ${itemCls}`]: {
|
|
[`&${itemCls}-danger:not(${itemCls}-disabled)`]: {
|
|
color: colorError,
|
|
'&:hover': {
|
|
color: colorTextLightSolid,
|
|
backgroundColor: colorError
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
/* harmony default export */ var style_status = (genStatusStyle);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/style/index.js
|
|
|
|
|
|
|
|
|
|
|
|
// =============================== Base ===============================
|
|
const genBaseStyle = token => {
|
|
const {
|
|
componentCls,
|
|
menuCls,
|
|
zIndexPopup,
|
|
dropdownArrowDistance,
|
|
sizePopupArrow,
|
|
antCls,
|
|
iconCls,
|
|
motionDurationMid,
|
|
dropdownPaddingVertical,
|
|
fontSize,
|
|
dropdownEdgeChildPadding,
|
|
colorTextDisabled,
|
|
fontSizeIcon,
|
|
controlPaddingHorizontal,
|
|
colorBgElevated
|
|
} = token;
|
|
return [{
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
position: 'absolute',
|
|
top: -9999,
|
|
left: {
|
|
_skip_check_: true,
|
|
value: -9999
|
|
},
|
|
zIndex: zIndexPopup,
|
|
display: 'block',
|
|
// A placeholder out of dropdown visible range to avoid close when user moving
|
|
'&::before': {
|
|
position: 'absolute',
|
|
insetBlock: -dropdownArrowDistance + sizePopupArrow / 2,
|
|
// insetInlineStart: -7, // FIXME: Seems not work for hidden element
|
|
zIndex: -9999,
|
|
opacity: 0.0001,
|
|
content: '""'
|
|
},
|
|
[`&-trigger${antCls}-btn`]: {
|
|
[`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {
|
|
fontSize: fontSizeIcon
|
|
}
|
|
},
|
|
[`${componentCls}-wrap`]: {
|
|
position: 'relative',
|
|
[`${antCls}-btn > ${iconCls}-down`]: {
|
|
fontSize: fontSizeIcon
|
|
},
|
|
[`${iconCls}-down::before`]: {
|
|
transition: `transform ${motionDurationMid}`
|
|
}
|
|
},
|
|
[`${componentCls}-wrap-open`]: {
|
|
[`${iconCls}-down::before`]: {
|
|
transform: `rotate(180deg)`
|
|
}
|
|
},
|
|
[`
|
|
&-hidden,
|
|
&-menu-hidden,
|
|
&-menu-submenu-hidden
|
|
`]: {
|
|
display: 'none'
|
|
},
|
|
// =============================================================
|
|
// == Motion ==
|
|
// =============================================================
|
|
// When position is not enough for dropdown, the placement will revert.
|
|
// We will handle this with revert motion name.
|
|
[`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,
|
|
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,
|
|
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,
|
|
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,
|
|
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,
|
|
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {
|
|
animationName: slide/* slideUpIn */.fJ
|
|
},
|
|
[`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,
|
|
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,
|
|
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,
|
|
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,
|
|
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,
|
|
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {
|
|
animationName: slide/* slideDownIn */.Qt
|
|
},
|
|
[`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,
|
|
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottom,
|
|
&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomRight`]: {
|
|
animationName: slide/* slideUpOut */.Uw
|
|
},
|
|
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topLeft,
|
|
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-top,
|
|
&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-placement-topRight`]: {
|
|
animationName: slide/* slideDownOut */.ly
|
|
}
|
|
})
|
|
},
|
|
// =============================================================
|
|
// == Arrow style ==
|
|
// =============================================================
|
|
(0,placementArrow/* default */.ZP)(token, {
|
|
colorBg: colorBgElevated,
|
|
limitVerticalRadius: true,
|
|
arrowPlacement: {
|
|
top: true,
|
|
bottom: true
|
|
}
|
|
}), {
|
|
// =============================================================
|
|
// == Menu ==
|
|
// =============================================================
|
|
[`${componentCls} ${menuCls}`]: {
|
|
position: 'relative',
|
|
margin: 0
|
|
},
|
|
[`${menuCls}-submenu-popup`]: {
|
|
position: 'absolute',
|
|
zIndex: zIndexPopup,
|
|
background: 'transparent',
|
|
boxShadow: 'none',
|
|
transformOrigin: '0 0',
|
|
'ul, li': {
|
|
listStyle: 'none',
|
|
margin: 0
|
|
}
|
|
},
|
|
[`${componentCls}, ${componentCls}-menu-submenu`]: {
|
|
[menuCls]: Object.assign(Object.assign({
|
|
padding: dropdownEdgeChildPadding,
|
|
listStyleType: 'none',
|
|
backgroundColor: colorBgElevated,
|
|
backgroundClip: 'padding-box',
|
|
borderRadius: token.borderRadiusLG,
|
|
outline: 'none',
|
|
boxShadow: token.boxShadowSecondary
|
|
}, (0,style/* genFocusStyle */.Qy)(token)), {
|
|
[`${menuCls}-item-group-title`]: {
|
|
padding: `${dropdownPaddingVertical}px ${controlPaddingHorizontal}px`,
|
|
color: token.colorTextDescription,
|
|
transition: `all ${motionDurationMid}`
|
|
},
|
|
// ======================= Item Content =======================
|
|
[`${menuCls}-item`]: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
[`${menuCls}-item-icon`]: {
|
|
minWidth: fontSize,
|
|
marginInlineEnd: token.marginXS,
|
|
fontSize: token.fontSizeSM
|
|
},
|
|
[`${menuCls}-title-content`]: {
|
|
flex: 'auto',
|
|
'> a': {
|
|
color: 'inherit',
|
|
transition: `all ${motionDurationMid}`,
|
|
'&:hover': {
|
|
color: 'inherit'
|
|
},
|
|
'&::after': {
|
|
position: 'absolute',
|
|
inset: 0,
|
|
content: '""'
|
|
}
|
|
}
|
|
},
|
|
// =========================== Item ===========================
|
|
[`${menuCls}-item, ${menuCls}-submenu-title`]: Object.assign(Object.assign({
|
|
clear: 'both',
|
|
margin: 0,
|
|
padding: `${dropdownPaddingVertical}px ${controlPaddingHorizontal}px`,
|
|
color: token.colorText,
|
|
fontWeight: 'normal',
|
|
fontSize,
|
|
lineHeight: token.lineHeight,
|
|
cursor: 'pointer',
|
|
transition: `all ${motionDurationMid}`,
|
|
borderRadius: token.borderRadiusSM,
|
|
[`&:hover, &-active`]: {
|
|
backgroundColor: token.controlItemBgHover
|
|
}
|
|
}, (0,style/* genFocusStyle */.Qy)(token)), {
|
|
'&-selected': {
|
|
color: token.colorPrimary,
|
|
backgroundColor: token.controlItemBgActive,
|
|
'&:hover, &-active': {
|
|
backgroundColor: token.controlItemBgActiveHover
|
|
}
|
|
},
|
|
'&-disabled': {
|
|
color: colorTextDisabled,
|
|
cursor: 'not-allowed',
|
|
'&:hover': {
|
|
color: colorTextDisabled,
|
|
backgroundColor: colorBgElevated,
|
|
cursor: 'not-allowed'
|
|
},
|
|
a: {
|
|
pointerEvents: 'none'
|
|
}
|
|
},
|
|
'&-divider': {
|
|
height: 1,
|
|
margin: `${token.marginXXS}px 0`,
|
|
overflow: 'hidden',
|
|
lineHeight: 0,
|
|
backgroundColor: token.colorSplit
|
|
},
|
|
[`${componentCls}-menu-submenu-expand-icon`]: {
|
|
position: 'absolute',
|
|
insetInlineEnd: token.paddingXS,
|
|
[`${componentCls}-menu-submenu-arrow-icon`]: {
|
|
marginInlineEnd: '0 !important',
|
|
color: token.colorTextDescription,
|
|
fontSize: fontSizeIcon,
|
|
fontStyle: 'normal'
|
|
}
|
|
}
|
|
}),
|
|
[`${menuCls}-item-group-list`]: {
|
|
margin: `0 ${token.marginXS}px`,
|
|
padding: 0,
|
|
listStyle: 'none'
|
|
},
|
|
[`${menuCls}-submenu-title`]: {
|
|
paddingInlineEnd: controlPaddingHorizontal + token.fontSizeSM
|
|
},
|
|
[`${menuCls}-submenu-vertical`]: {
|
|
position: 'relative'
|
|
},
|
|
[`${menuCls}-submenu${menuCls}-submenu-disabled ${componentCls}-menu-submenu-title`]: {
|
|
[`&, ${componentCls}-menu-submenu-arrow-icon`]: {
|
|
color: colorTextDisabled,
|
|
backgroundColor: colorBgElevated,
|
|
cursor: 'not-allowed'
|
|
}
|
|
},
|
|
// https://github.com/ant-design/ant-design/issues/19264
|
|
[`${menuCls}-submenu-selected ${componentCls}-menu-submenu-title`]: {
|
|
color: token.colorPrimary
|
|
}
|
|
})
|
|
}
|
|
},
|
|
// Follow code may reuse in other components
|
|
[(0,slide/* initSlideMotion */.oN)(token, 'slide-up'), (0,slide/* initSlideMotion */.oN)(token, 'slide-down'), (0,move/* initMoveMotion */.Fm)(token, 'move-up'), (0,move/* initMoveMotion */.Fm)(token, 'move-down'), (0,zoom/* initZoomMotion */._y)(token, 'zoom-big')]];
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var dropdown_style = ((0,genComponentStyleHook/* default */.Z)('Dropdown', (token, _ref) => {
|
|
let {
|
|
rootPrefixCls
|
|
} = _ref;
|
|
const {
|
|
marginXXS,
|
|
sizePopupArrow,
|
|
controlHeight,
|
|
fontSize,
|
|
lineHeight,
|
|
paddingXXS,
|
|
componentCls,
|
|
borderRadiusLG
|
|
} = token;
|
|
const dropdownPaddingVertical = (controlHeight - fontSize * lineHeight) / 2;
|
|
const {
|
|
dropdownArrowOffset
|
|
} = (0,placementArrow/* getArrowOffset */.fS)({
|
|
contentRadius: borderRadiusLG
|
|
});
|
|
const dropdownToken = (0,statistic/* merge */.TS)(token, {
|
|
menuCls: `${componentCls}-menu`,
|
|
rootPrefixCls,
|
|
dropdownArrowDistance: sizePopupArrow / 2 + marginXXS,
|
|
dropdownArrowOffset,
|
|
dropdownPaddingVertical,
|
|
dropdownEdgeChildPadding: paddingXXS
|
|
});
|
|
return [genBaseStyle(dropdownToken), style_status(dropdownToken)];
|
|
}, token => ({
|
|
zIndexPopup: token.zIndexPopupBase + 50
|
|
})));
|
|
|
|
/***/ })
|
|
|
|
}]); |