@lemon-fe/components 0.1.0-alpha.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Actions/index.js +21 -13
- package/es/Actions/index.less +25 -25
- package/es/BaseTable/Actions.d.ts +8 -0
- package/es/BaseTable/Actions.js +129 -0
- package/es/BaseTable/empty.png +0 -0
- package/es/BaseTable/index.d.ts +1 -0
- package/es/BaseTable/index.js +31 -30
- package/es/BaseTable/index.less +69 -2
- package/es/BaseTable/typings.d.ts +8 -4
- package/es/DurationPicker/index.js +2 -10
- package/es/DurationPicker/index.less +4 -4
- package/es/Filter/index.js +4 -7
- package/es/Filter/index.less +1 -0
- package/es/FormLayout/index.less +2 -1
- package/es/Icons/BigTip/error.png +0 -0
- package/es/Icons/BigTip/index.d.ts +6 -0
- package/es/Icons/BigTip/index.js +50 -0
- package/es/Icons/BigTip/info.png +0 -0
- package/es/Icons/BigTip/success.png +0 -0
- package/es/Icons/BigTip/warning.png +0 -0
- package/es/Icons/Calendar.d.ts +5 -0
- package/es/Icons/Calendar.js +47 -0
- package/es/Icons/Down.js +0 -1
- package/es/Icons/More.d.ts +5 -0
- package/es/Icons/More.js +44 -0
- package/es/Icons/index.d.ts +6 -0
- package/es/Icons/index.js +7 -1
- package/es/Layout/index.less +0 -4
- package/es/MainFramework/components/{DownBar → DropMenu}/index.d.ts +1 -1
- package/es/MainFramework/components/DropMenu/index.js +104 -0
- package/es/MainFramework/components/DropMenu/index.less +59 -0
- package/es/MainFramework/components/Menu/index.js +4 -8
- package/es/MainFramework/components/Menu/index.less +3 -3
- package/es/MainFramework/components/RefreshButton/index.d.ts +5 -0
- package/es/MainFramework/components/RefreshButton/index.js +72 -0
- package/es/MainFramework/components/RefreshButton/index.less +30 -0
- package/es/MainFramework/components/TabBar/index.js +64 -3
- package/es/MainFramework/components/TabBar/index.less +14 -0
- package/es/MainFramework/index.d.ts +3 -0
- package/es/MainFramework/index.js +12 -57
- package/es/MainFramework/index.less +10 -3
- package/es/SiderTree/empty.png +0 -0
- package/es/SiderTree/index.js +7 -4
- package/es/SiderTree/index.less +32 -4
- package/es/SymbolIcon/index.d.ts +8 -0
- package/es/SymbolIcon/index.js +32 -0
- package/es/SymbolIcon/index.less +7 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/index.less +3 -123
- package/es/init.js +13 -18
- package/es/overrides.less +131 -0
- package/es/theme.less +1 -8
- package/es/utils.less +53 -0
- package/package.json +4 -4
- package/es/MainFramework/components/DownBar/index.js +0 -84
- package/es/MainFramework/components/DownBar/index.less +0 -108
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var _excluded = ["type"];
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import success from './success.png';
|
|
15
|
+
import error from './error.png';
|
|
16
|
+
import info from './info.png';
|
|
17
|
+
import warning from './warning.png';
|
|
18
|
+
export default function BigTip(props) {
|
|
19
|
+
var _props$type = props.type,
|
|
20
|
+
type = _props$type === void 0 ? 'success' : _props$type,
|
|
21
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
22
|
+
|
|
23
|
+
var src;
|
|
24
|
+
|
|
25
|
+
switch (type) {
|
|
26
|
+
case 'warning':
|
|
27
|
+
src = warning;
|
|
28
|
+
break;
|
|
29
|
+
|
|
30
|
+
case 'error':
|
|
31
|
+
src = error;
|
|
32
|
+
break;
|
|
33
|
+
|
|
34
|
+
case 'info':
|
|
35
|
+
src = info;
|
|
36
|
+
break;
|
|
37
|
+
|
|
38
|
+
case 'success':
|
|
39
|
+
default:
|
|
40
|
+
src = success;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return /*#__PURE__*/React.createElement("img", _objectSpread({
|
|
44
|
+
src: src,
|
|
45
|
+
style: {
|
|
46
|
+
width: 48,
|
|
47
|
+
height: 48
|
|
48
|
+
}
|
|
49
|
+
}, restProps));
|
|
50
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Icon from '@ant-design/icons';
|
|
9
|
+
|
|
10
|
+
var CalendarSvg = function CalendarSvg(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("svg", _objectSpread({
|
|
12
|
+
width: "16",
|
|
13
|
+
height: "16",
|
|
14
|
+
viewBox: "0 0 16 16",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
16
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
17
|
+
fill: "none",
|
|
18
|
+
fillRule: "evenodd"
|
|
19
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M5.25 1a.75.75 0 0 1 .75.75V4H4.5V1.75A.75.75 0 0 1 5.25 1ZM10.75 1a.75.75 0 0 1 .75.75V4H10V1.75a.75.75 0 0 1 .75-.75Z",
|
|
21
|
+
fill: "currentColor"
|
|
22
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeWidth: "1.5",
|
|
25
|
+
x: "1.75",
|
|
26
|
+
y: "3.75",
|
|
27
|
+
width: "12.5",
|
|
28
|
+
height: "10.5",
|
|
29
|
+
rx: "2"
|
|
30
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
31
|
+
fill: "currentColor",
|
|
32
|
+
x: "6",
|
|
33
|
+
y: "8",
|
|
34
|
+
width: "4",
|
|
35
|
+
height: "1.5",
|
|
36
|
+
rx: ".75"
|
|
37
|
+
})));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default function Down(props) {
|
|
41
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread({
|
|
42
|
+
style: {
|
|
43
|
+
pointerEvents: 'none'
|
|
44
|
+
},
|
|
45
|
+
component: CalendarSvg
|
|
46
|
+
}, props));
|
|
47
|
+
}
|
package/es/Icons/Down.js
CHANGED
package/es/Icons/More.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Icon from '@ant-design/icons';
|
|
9
|
+
|
|
10
|
+
var MoreSvg = function MoreSvg(props) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("svg", _objectSpread({
|
|
12
|
+
width: "18",
|
|
13
|
+
height: "18",
|
|
14
|
+
viewBox: "0 0 18 18",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
16
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
"fill-rule": "evenodd"
|
|
19
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
20
|
+
opacity: ".7",
|
|
21
|
+
cx: "15",
|
|
22
|
+
cy: "9",
|
|
23
|
+
r: "1.5"
|
|
24
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
25
|
+
opacity: ".7",
|
|
26
|
+
cx: "9",
|
|
27
|
+
cy: "9",
|
|
28
|
+
r: "1.5"
|
|
29
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
30
|
+
opacity: ".7",
|
|
31
|
+
cx: "3",
|
|
32
|
+
cy: "9",
|
|
33
|
+
r: "1.5"
|
|
34
|
+
})));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default function More(props) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread({
|
|
39
|
+
style: {
|
|
40
|
+
pointerEvents: 'none'
|
|
41
|
+
},
|
|
42
|
+
component: MoreSvg
|
|
43
|
+
}, props));
|
|
44
|
+
}
|
package/es/Icons/index.d.ts
CHANGED
|
@@ -2,11 +2,17 @@ import Down from './Down';
|
|
|
2
2
|
import Search from './Search';
|
|
3
3
|
import Tip from './Tip';
|
|
4
4
|
import DarkSearch from './DarkSearch';
|
|
5
|
+
import More from './More';
|
|
6
|
+
import Calendar from './Calendar';
|
|
7
|
+
import BigTip from './BigTip';
|
|
5
8
|
declare const Icons: {
|
|
6
9
|
Search: typeof Search;
|
|
7
10
|
Down: typeof Down;
|
|
8
11
|
Tip: typeof Tip;
|
|
9
12
|
Empty: () => JSX.Element;
|
|
10
13
|
DarkSearch: typeof DarkSearch;
|
|
14
|
+
More: typeof More;
|
|
15
|
+
Calendar: typeof Calendar;
|
|
16
|
+
BigTip: typeof BigTip;
|
|
11
17
|
};
|
|
12
18
|
export default Icons;
|
package/es/Icons/index.js
CHANGED
|
@@ -3,11 +3,17 @@ import Search from './Search';
|
|
|
3
3
|
import Tip from './Tip';
|
|
4
4
|
import Empty from './Empty';
|
|
5
5
|
import DarkSearch from './DarkSearch';
|
|
6
|
+
import More from './More';
|
|
7
|
+
import Calendar from './Calendar';
|
|
8
|
+
import BigTip from './BigTip';
|
|
6
9
|
var Icons = {
|
|
7
10
|
Search: Search,
|
|
8
11
|
Down: Down,
|
|
9
12
|
Tip: Tip,
|
|
10
13
|
Empty: Empty,
|
|
11
|
-
DarkSearch: DarkSearch
|
|
14
|
+
DarkSearch: DarkSearch,
|
|
15
|
+
More: More,
|
|
16
|
+
Calendar: Calendar,
|
|
17
|
+
BigTip: BigTip
|
|
12
18
|
};
|
|
13
19
|
export default Icons;
|
package/es/Layout/index.less
CHANGED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
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."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
15
|
+
import React, { useState } from 'react';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
|
+
import { PREFIX_CLS as prefixCls } from '../../../constants';
|
|
18
|
+
import { Popover } from 'antd';
|
|
19
|
+
export default function DropMenu(props) {
|
|
20
|
+
var tabs = props.tabs,
|
|
21
|
+
active = props.active,
|
|
22
|
+
_props$visible = props.visible,
|
|
23
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
24
|
+
onClick = props.onClick,
|
|
25
|
+
onClose = props.onClose;
|
|
26
|
+
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
popVisible = _useState2[0],
|
|
30
|
+
setPopVisible = _useState2[1];
|
|
31
|
+
|
|
32
|
+
var handleClose = function handleClose(e, index) {
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
onClose(index);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var handleClick = function handleClick(index) {
|
|
38
|
+
onClick(index);
|
|
39
|
+
setPopVisible(false);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
43
|
+
visible: popVisible,
|
|
44
|
+
onVisibleChange: setPopVisible,
|
|
45
|
+
overlayClassName: "".concat(prefixCls, "-nav-menu-pop"),
|
|
46
|
+
trigger: "click",
|
|
47
|
+
placement: "bottomRight",
|
|
48
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: "".concat(prefixCls, "-nav-menu-tabs")
|
|
50
|
+
}, tabs.map(function (item, index) {
|
|
51
|
+
var key = item.title;
|
|
52
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
className: classNames("".concat(prefixCls, "-nav-menu-tab"), _defineProperty({}, "".concat(prefixCls, "-nav-menu-tab-active"), index === active)),
|
|
54
|
+
onClick: function onClick() {
|
|
55
|
+
return handleClick(index);
|
|
56
|
+
},
|
|
57
|
+
key: key
|
|
58
|
+
}, item.title, item.closable !== false && /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: "".concat(prefixCls, "-nav-menu-tab-close"),
|
|
60
|
+
onClick: function onClick(e) {
|
|
61
|
+
return handleClose(e, index);
|
|
62
|
+
}
|
|
63
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
64
|
+
width: "14",
|
|
65
|
+
height: "14",
|
|
66
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
67
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
68
|
+
fill: "none",
|
|
69
|
+
fillRule: "evenodd"
|
|
70
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
71
|
+
fill: "currentColor"
|
|
72
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
73
|
+
fillRule: "nonzero"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
75
|
+
d: "M7.74992318,2.75006802 L7.74992318,11.250068 C7.74992318,11.6642816 7.41413675,12.000068 6.99992318,12.000068 C6.58570962,12.000068 6.24992318,11.6642816 6.24992318,11.250068 L6.24992318,2.75006802 C6.24992318,2.33585446 6.58570962,2.00006802 6.99992318,2.00006802 C7.41413675,2.00006802 7.74992318,2.33585446 7.74992318,2.75006802 Z",
|
|
76
|
+
transform: "translate(-367.000000, -21.000000) translate(367.000000, 21.000000) translate(6.999923, 7.000068) rotate(45.000000) translate(-6.999923, -7.000068)"
|
|
77
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
78
|
+
d: "M7.74994595,2.75007682 L7.74994595,11.2500768 C7.74994595,11.6642904 7.41415952,12.0000768 6.99994595,12.0000768 C6.58573239,12.0000768 6.24994595,11.6642904 6.24994595,11.2500768 L6.24994595,2.75007682 C6.24994595,2.33586325 6.58573239,2.00007682 6.99994595,2.00007682 C7.41415952,2.00007682 7.74994595,2.33586325 7.74994595,2.75007682 Z",
|
|
79
|
+
transform: "translate(-367.000000, -21.000000) translate(367.000000, 21.000000) translate(6.999946, 7.000077) rotate(-45.000000) translate(-6.999946, -7.000077)"
|
|
80
|
+
})))))));
|
|
81
|
+
}))
|
|
82
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: classNames("".concat(prefixCls, "-nav-menu-drop-icon"), _defineProperty({}, "".concat(prefixCls, "-nav-menu-drop-icon-active"), popVisible)),
|
|
84
|
+
style: visible ? {
|
|
85
|
+
visibility: 'visible'
|
|
86
|
+
} : {
|
|
87
|
+
visibility: 'hidden'
|
|
88
|
+
}
|
|
89
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
90
|
+
width: "20",
|
|
91
|
+
height: "20",
|
|
92
|
+
viewBox: "0 0 20 20",
|
|
93
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
94
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
95
|
+
d: "M5.757 7.757 10 12l4.243-4.243",
|
|
96
|
+
stroke: "currentColor",
|
|
97
|
+
strokeWidth: "1.5",
|
|
98
|
+
strokeLinecap: "round",
|
|
99
|
+
strokeLinejoin: "round",
|
|
100
|
+
strokeDasharray: "0,0",
|
|
101
|
+
fill: "none",
|
|
102
|
+
fillRule: "evenodd"
|
|
103
|
+
}))));
|
|
104
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.@{prefixCls}-nav-menu {
|
|
2
|
+
&-pop {
|
|
3
|
+
.popover(160px);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&-tabs {
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&-tab {
|
|
11
|
+
.popoverItem();
|
|
12
|
+
|
|
13
|
+
&:hover {
|
|
14
|
+
background-color: #eee;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-active {
|
|
18
|
+
color: @primary-color;
|
|
19
|
+
background-color: .primary(0.1) [] !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-close {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 10px;
|
|
25
|
+
right: 12px;
|
|
26
|
+
display: none;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
width: 16px;
|
|
29
|
+
height: 16px;
|
|
30
|
+
padding: 1px;
|
|
31
|
+
line-height: 1;
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
color: @primary-color;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:hover &-close {
|
|
39
|
+
display: block;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-drop-icon {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
width: 34px;
|
|
48
|
+
height: 34px;
|
|
49
|
+
color: #6d6d6d;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
|
|
53
|
+
&:hover,
|
|
54
|
+
&-active {
|
|
55
|
+
color: #333;
|
|
56
|
+
background-color: #f7f7f7;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -406,7 +406,7 @@ export default function Menu(props) {
|
|
|
406
406
|
overflow: 'hidden'
|
|
407
407
|
}
|
|
408
408
|
}, item.name), /*#__PURE__*/React.createElement("div", {
|
|
409
|
-
className:
|
|
409
|
+
className: "".concat(prefixCls, "-menu-item-favorite"),
|
|
410
410
|
onClick: function onClick(e) {
|
|
411
411
|
toggleFavorite(e, item);
|
|
412
412
|
}
|
|
@@ -544,11 +544,11 @@ export default function Menu(props) {
|
|
|
544
544
|
strokeDasharray: "0,0",
|
|
545
545
|
transform: "translate(-274.000000, -57.000000) translate(284.000000, 67.000000) scale(-1, 1) translate(-284.000000, -67.000000) translate(274.000000, 57.000000) translate(8.535522, 10.000000) rotate(-45.000000) translate(-8.535522, -10.000000)"
|
|
546
546
|
})))))), menus.map(function (item, index) {
|
|
547
|
-
var
|
|
547
|
+
var _classNames5;
|
|
548
548
|
|
|
549
549
|
return /*#__PURE__*/React.createElement("div", {
|
|
550
550
|
key: index,
|
|
551
|
-
className: classNames("".concat(prefixCls, "-menu-top-item"), (
|
|
551
|
+
className: classNames("".concat(prefixCls, "-menu-top-item"), (_classNames5 = {}, _defineProperty(_classNames5, "".concat(prefixCls, "-menu-top-item-active"), activeMenu !== undefined && activeMenu.path[0] === index), _defineProperty(_classNames5, "".concat(prefixCls, "-menu-top-item-popover-active"), item === popover), _classNames5)),
|
|
552
552
|
onClick: function onClick() {
|
|
553
553
|
return handleClick(item);
|
|
554
554
|
},
|
|
@@ -587,11 +587,7 @@ export default function Menu(props) {
|
|
|
587
587
|
className: "".concat(prefixCls, "-menu-icon")
|
|
588
588
|
}, favoriteIcon), /*#__PURE__*/React.createElement("div", {
|
|
589
589
|
className: "".concat(prefixCls, "-menu-title")
|
|
590
|
-
}, "\u6536\u85CF")), /*#__PURE__*/React.createElement("div", {
|
|
591
|
-
className: classNames("".concat(prefixCls, "-menu-divider-div"), _defineProperty({}, "".concat(prefixCls, "-menu-divider-div-collapsed"), collapsed))
|
|
592
|
-
}, /*#__PURE__*/React.createElement(Divider, {
|
|
593
|
-
className: "".concat(prefixCls, "-menu-divider")
|
|
594
|
-
}))), false && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
590
|
+
}, "\u6536\u85CF"))), false && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
595
591
|
className: "".concat(prefixCls, "-menu-gutter")
|
|
596
592
|
}), collapsed ? /*#__PURE__*/React.createElement("div", {
|
|
597
593
|
className: "".concat(prefixCls, "-menu-top-item"),
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
|
|
168
168
|
& > span {
|
|
169
169
|
margin-top: 24px;
|
|
170
|
-
color: #
|
|
170
|
+
color: #333;
|
|
171
171
|
font-weight: 400;
|
|
172
172
|
font-size: 14px;
|
|
173
173
|
line-height: 22px;
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
&-favorite {
|
|
216
216
|
display: none;
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
&:hover {
|
|
219
219
|
display: block;
|
|
220
220
|
}
|
|
221
221
|
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
|
|
264
264
|
&-other-title {
|
|
265
265
|
margin: 0 0 8px 16px;
|
|
266
|
-
color: #
|
|
266
|
+
color: #000;
|
|
267
267
|
font-weight: 400;
|
|
268
268
|
font-size: 14px;
|
|
269
269
|
line-height: 22px;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
|
|
5
|
+
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."); }
|
|
6
|
+
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
|
|
9
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
|
+
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
|
|
15
|
+
import { Popover } from 'antd';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
|
+
import React, { useState } from 'react';
|
|
18
|
+
import { PREFIX_CLS as prefixCls } from '../../../constants';
|
|
19
|
+
export default function RefreshButton(props) {
|
|
20
|
+
var onRefresh = props.onRefresh,
|
|
21
|
+
onCloseOther = props.onCloseOther,
|
|
22
|
+
onCloseAll = props.onCloseAll;
|
|
23
|
+
|
|
24
|
+
var _useState = useState(false),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
popVisible = _useState2[0],
|
|
27
|
+
setPopVisible = _useState2[1];
|
|
28
|
+
|
|
29
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
30
|
+
visible: popVisible,
|
|
31
|
+
onVisibleChange: setPopVisible,
|
|
32
|
+
trigger: "click",
|
|
33
|
+
overlayClassName: "".concat(prefixCls, "-refresh-down-pop"),
|
|
34
|
+
placement: "bottomRight",
|
|
35
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "".concat(prefixCls, "-refresh-down-tabs")
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "".concat(prefixCls, "-refresh-down-tab"),
|
|
39
|
+
onClick: function onClick() {
|
|
40
|
+
onRefresh();
|
|
41
|
+
setPopVisible(false);
|
|
42
|
+
}
|
|
43
|
+
}, "\u5237\u65B0\u5F53\u524D\u9875"), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "".concat(prefixCls, "-refresh-down-tab"),
|
|
45
|
+
onClick: function onClick() {
|
|
46
|
+
onCloseOther();
|
|
47
|
+
setPopVisible(false);
|
|
48
|
+
}
|
|
49
|
+
}, "\u5173\u95ED\u5176\u4ED6\u9875"), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "".concat(prefixCls, "-refresh-down-tab"),
|
|
51
|
+
onClick: function onClick() {
|
|
52
|
+
onCloseAll();
|
|
53
|
+
setPopVisible(false);
|
|
54
|
+
}
|
|
55
|
+
}, "\u5173\u95ED\u5168\u90E8\u9875"))
|
|
56
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
+
className: classNames("".concat(prefixCls, "-refresh-button-icon"), _defineProperty({}, "".concat(prefixCls, "-refresh-button-icon-active"), popVisible))
|
|
58
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
59
|
+
width: "20",
|
|
60
|
+
height: "20",
|
|
61
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
62
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
63
|
+
d: "M17 10.06a7 7 0 0 1-13.033 3.492V17m-.96-7.33a7 7 0 0 1 12.884-3.453V3",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
strokeWidth: "1.5",
|
|
66
|
+
opacity: ".9",
|
|
67
|
+
strokeLinecap: "round",
|
|
68
|
+
strokeLinejoin: "round",
|
|
69
|
+
fill: "none",
|
|
70
|
+
fillRule: "evenodd"
|
|
71
|
+
}))));
|
|
72
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.@{prefixCls}-refresh-button-icon {
|
|
2
|
+
width: 34px;
|
|
3
|
+
height: 34px;
|
|
4
|
+
margin-left: 7px;
|
|
5
|
+
padding: 7px;
|
|
6
|
+
color: #6d6d6d;
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
transition: background-color 0.2s;
|
|
10
|
+
|
|
11
|
+
&:hover,
|
|
12
|
+
&-active {
|
|
13
|
+
color: #333;
|
|
14
|
+
background-color: #f3f3f3;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.@{prefixCls}-refresh-down {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
line-height: 1;
|
|
22
|
+
|
|
23
|
+
&-tab {
|
|
24
|
+
.popoverItem();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-pop {
|
|
28
|
+
.popover();
|
|
29
|
+
}
|
|
30
|
+
}
|