@lemon-fe/components 0.1.0-alpha.0 → 0.1.0

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.
Files changed (47) hide show
  1. package/es/Actions/index.js +21 -13
  2. package/es/Actions/index.less +25 -25
  3. package/es/BaseTable/Actions.d.ts +8 -0
  4. package/es/BaseTable/Actions.js +119 -0
  5. package/es/BaseTable/index.js +21 -29
  6. package/es/BaseTable/index.less +58 -2
  7. package/es/BaseTable/typings.d.ts +8 -4
  8. package/es/DurationPicker/index.js +2 -10
  9. package/es/DurationPicker/index.less +4 -4
  10. package/es/Filter/index.js +4 -7
  11. package/es/Filter/index.less +1 -0
  12. package/es/FormLayout/index.less +1 -1
  13. package/es/Icons/Calendar.d.ts +5 -0
  14. package/es/Icons/Calendar.js +47 -0
  15. package/es/Icons/Down.js +0 -1
  16. package/es/Icons/More.d.ts +5 -0
  17. package/es/Icons/More.js +44 -0
  18. package/es/Icons/index.d.ts +4 -0
  19. package/es/Icons/index.js +5 -1
  20. package/es/Layout/index.less +0 -4
  21. package/es/MainFramework/components/{DownBar → DropMenu}/index.d.ts +1 -1
  22. package/es/MainFramework/components/DropMenu/index.js +104 -0
  23. package/es/MainFramework/components/DropMenu/index.less +59 -0
  24. package/es/MainFramework/components/Menu/index.js +4 -8
  25. package/es/MainFramework/components/Menu/index.less +3 -3
  26. package/es/MainFramework/components/RefreshButton/index.d.ts +5 -0
  27. package/es/MainFramework/components/RefreshButton/index.js +72 -0
  28. package/es/MainFramework/components/RefreshButton/index.less +30 -0
  29. package/es/MainFramework/components/TabBar/index.js +64 -3
  30. package/es/MainFramework/components/TabBar/index.less +14 -0
  31. package/es/MainFramework/index.d.ts +3 -0
  32. package/es/MainFramework/index.js +12 -57
  33. package/es/MainFramework/index.less +10 -3
  34. package/es/SiderTree/index.less +12 -4
  35. package/es/SymbolIcon/index.d.ts +8 -0
  36. package/es/SymbolIcon/index.js +32 -0
  37. package/es/SymbolIcon/index.less +7 -0
  38. package/es/index.d.ts +1 -0
  39. package/es/index.js +2 -1
  40. package/es/index.less +3 -123
  41. package/es/init.js +4 -1
  42. package/es/overrides.less +136 -0
  43. package/es/theme.less +1 -8
  44. package/es/utils.less +53 -0
  45. package/package.json +3 -3
  46. package/es/MainFramework/components/DownBar/index.js +0 -84
  47. package/es/MainFramework/components/DownBar/index.less +0 -108
@@ -24,9 +24,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
24
 
25
25
  import React, { Fragment, useState } from 'react';
26
26
  import { Space, Dropdown, Menu, Button, Popover } from 'antd';
27
- import { EllipsisOutlined } from '@ant-design/icons';
28
27
  import classNames from 'classnames';
29
- import Down from '../Icons/Down';
28
+ import Icons from '../Icons';
30
29
  import { PREFIX_CLS } from '../constants';
31
30
 
32
31
  function Actions(props) {
@@ -97,7 +96,15 @@ function Actions(props) {
97
96
  disabled: disabled,
98
97
  overlay: overlay,
99
98
  onClick: handleClick,
100
- icon: icon
99
+ buttonsRender: function buttonsRender(_ref) {
100
+ var _ref2 = _slicedToArray(_ref, 2),
101
+ leftBtn = _ref2[0],
102
+ _ = _ref2[1];
103
+
104
+ return [leftBtn, /*#__PURE__*/React.createElement(Button, {
105
+ icon: /*#__PURE__*/React.createElement(Icons.More, null)
106
+ })];
107
+ }
101
108
  }, text);
102
109
  }
103
110
 
@@ -108,7 +115,12 @@ function Actions(props) {
108
115
  }, /*#__PURE__*/React.createElement(Button, _objectSpread({
109
116
  disabled: disabled,
110
117
  icon: icon
111
- }, rest), text, /*#__PURE__*/React.createElement(Down, null)));
118
+ }, rest), text, /*#__PURE__*/React.createElement(Icons.Down, {
119
+ style: {
120
+ opacity: 0.7,
121
+ fontSize: 16
122
+ }
123
+ })));
112
124
  }
113
125
 
114
126
  return /*#__PURE__*/React.createElement(Button, _objectSpread({
@@ -123,11 +135,7 @@ function Actions(props) {
123
135
  onVisibleChange: setVisible,
124
136
  visible: visible,
125
137
  trigger: "click",
126
- content: /*#__PURE__*/React.createElement("ul", {
127
- className: "".concat(prefixCls, "-actions-popover-list")
128
- }, collapsedBtns.map(function (item, index) {
129
- var _classNames;
130
-
138
+ content: collapsedBtns.map(function (item, index) {
131
139
  if (item === null) {
132
140
  return item;
133
141
  }
@@ -139,8 +147,8 @@ function Actions(props) {
139
147
  }
140
148
 
141
149
  var disabled = item.disabled;
142
- return /*#__PURE__*/React.createElement("li", {
143
- className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-actions-popover-item-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-actions-popover-item"), !disabled), _classNames)),
150
+ return /*#__PURE__*/React.createElement("div", {
151
+ className: classNames("".concat(prefixCls, "-actions-popover-item"), _defineProperty({}, "".concat(prefixCls, "-actions-popover-item-disabled"), disabled)),
144
152
  key: index,
145
153
  onClick: function onClick() {
146
154
  if (!disabled) {
@@ -153,9 +161,9 @@ function Actions(props) {
153
161
  }
154
162
  }
155
163
  }, item.text);
156
- }))
164
+ })
157
165
  }, /*#__PURE__*/React.createElement(Button, {
158
- icon: /*#__PURE__*/React.createElement(EllipsisOutlined, null)
166
+ icon: /*#__PURE__*/React.createElement(Icons.More, null)
159
167
  })) : null));
160
168
  }
161
169
 
@@ -6,11 +6,16 @@
6
6
  padding-top: 0;
7
7
  }
8
8
 
9
- & .ant-popover-inner-content {
9
+ .ant-popover-inner {
10
+ padding: 8px 0;
11
+ border-radius: 8px;
12
+ }
13
+
14
+ .ant-popover-inner-content {
10
15
  padding: 0;
11
16
  }
12
17
 
13
- & .ant-popover-arrow {
18
+ .ant-popover-arrow {
14
19
  display: none;
15
20
  }
16
21
 
@@ -21,31 +26,22 @@
21
26
 
22
27
  &-item {
23
28
  box-sizing: border-box;
24
- width: 124px;
29
+ width: 120px;
25
30
  height: 38px;
26
- padding: 8px;
27
- color: #646464;
28
- line-height: 22px;
29
- text-align: left;
31
+ padding: 0 16px;
32
+ color: #333;
33
+ line-height: 38px;
30
34
  list-style: none;
31
- border-radius: 2px;
32
35
  cursor: pointer;
36
+ transition: background-color 0.2s;
33
37
 
34
38
  &:hover {
35
- color: .primary(1) [];
36
- background: .primary(0.08) [];
39
+ background-color: #eee;
37
40
  }
38
41
 
39
42
  &-disabled {
40
- box-sizing: border-box;
41
- width: 124px;
42
- height: 38px;
43
- padding: 8px;
44
43
  color: rgba(0, 0, 0, 0.25);
45
- line-height: 22px;
46
- text-align: left;
47
- list-style: none;
48
- border-radius: 2px;
44
+ background-color: #fff !important;
49
45
  cursor: not-allowed;
50
46
  }
51
47
  }
@@ -54,17 +50,21 @@
54
50
  .ant-btn:not(.ant-btn-icon-only) {
55
51
  min-width: 80px;
56
52
  padding: 4px 12px;
57
- }
58
53
 
59
- .ant-btn-default:not(:disabled) {
60
- background-color: #fff;
54
+ .@{prefixCls}-symbol-icon {
55
+ margin-right: 8px;
56
+ font-size: 20px;
57
+ vertical-align: -5px;
58
+ }
59
+ }
61
60
 
62
- .anticon {
63
- color: rgba(51, 51, 51, 0.7);
61
+ .ant-btn-default {
62
+ .@{prefixCls}-symbol-icon {
63
+ opacity: 0.7;
64
64
  }
65
65
 
66
- &:hover .anticon {
67
- color: var(--ant-primary-color);
66
+ &:not(:disabled) {
67
+ background-color: #fff;
68
68
  }
69
69
  }
70
70
  }
@@ -0,0 +1,8 @@
1
+ import type { RowAction } from './typings';
2
+ interface Props<T> {
3
+ actions: (RowAction<T> | null)[];
4
+ row: T;
5
+ index: number;
6
+ }
7
+ export default function Actions<T>(props: Props<T>): JSX.Element;
8
+ export {};
@@ -0,0 +1,119 @@
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, { useRef, useState } from 'react';
16
+ import classNames from 'classnames';
17
+ import { createPortal } from 'react-dom';
18
+ import { PREFIX_CLS } from '../constants';
19
+ import Icons from '../Icons';
20
+ export default function Actions(props) {
21
+ var actions = props.actions,
22
+ row = props.row,
23
+ index = props.index;
24
+
25
+ var _useState = useState(null),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ pop = _useState2[0],
28
+ setPop = _useState2[1];
29
+
30
+ var _useState3 = useState(false),
31
+ _useState4 = _slicedToArray(_useState3, 2),
32
+ visible = _useState4[0],
33
+ setVisible = _useState4[1];
34
+
35
+ var prefixCls = "".concat(PREFIX_CLS, "-table-operator");
36
+ var ref = useRef(null);
37
+
38
+ var openPop = function openPop(data) {
39
+ setPop(data);
40
+ setTimeout(function () {
41
+ setVisible(true);
42
+ }, 16);
43
+ };
44
+
45
+ var closePop = function closePop() {
46
+ if (visible === false) {
47
+ setPop(null);
48
+ return;
49
+ }
50
+
51
+ if (ref.current !== null) {
52
+ var node = ref.current;
53
+ setVisible(false);
54
+
55
+ var handler = function handler() {
56
+ node.removeEventListener('transitionend', handler);
57
+ setPop(null);
58
+ };
59
+
60
+ node.addEventListener('transitionend', handler);
61
+ }
62
+ };
63
+
64
+ return /*#__PURE__*/React.createElement("div", {
65
+ className: prefixCls,
66
+ onMouseLeave: closePop
67
+ }, actions.map(function (item) {
68
+ if (item === null) {
69
+ return null;
70
+ }
71
+
72
+ var dropDown = item.dropDown ? item.dropDown.filter(function (item) {
73
+ return item !== null;
74
+ }) : [];
75
+ return /*#__PURE__*/React.createElement("button", {
76
+ className: "".concat(prefixCls, "-item"),
77
+ key: item.text,
78
+ disabled: item.disabled,
79
+ onClick: function onClick(e) {
80
+ if (dropDown.length > 0) {
81
+ var rect = e.target.getBoundingClientRect();
82
+ openPop({
83
+ top: rect.top + rect.height,
84
+ right: document.body.clientWidth - rect.right,
85
+ items: dropDown
86
+ });
87
+ } else {
88
+ var _item$onClick;
89
+
90
+ (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, row, index);
91
+ }
92
+ }
93
+ }, item.text, dropDown.length > 0 && /*#__PURE__*/React.createElement(Icons.Down, null));
94
+ }), pop !== null && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
95
+ className: "".concat(prefixCls, "-popover"),
96
+ style: {
97
+ top: pop.top,
98
+ right: pop.right
99
+ }
100
+ }, /*#__PURE__*/React.createElement("div", {
101
+ ref: ref,
102
+ className: classNames("".concat(prefixCls, "-popover-items"), {
103
+ animated: visible
104
+ })
105
+ }, pop.items.map(function (item) {
106
+ return /*#__PURE__*/React.createElement("div", {
107
+ className: classNames("".concat(prefixCls, "-popover-item"), _defineProperty({}, "".concat(prefixCls, "-popover-item-disabled"), item.disabled)),
108
+ key: item.text,
109
+ onClick: function onClick() {
110
+ if (!item.disabled) {
111
+ var _item$onClick2;
112
+
113
+ closePop();
114
+ (_item$onClick2 = item.onClick) === null || _item$onClick2 === void 0 ? void 0 : _item$onClick2.call(item, row, index);
115
+ }
116
+ }
117
+ }, item.text);
118
+ }))), document.body));
119
+ }
@@ -42,6 +42,7 @@ import ResizeHeaderCell from './ResizeHeaderCell';
42
42
  import { PREFIX_CLS } from '../constants';
43
43
  import VirtualList from './VirtualBody';
44
44
  import BaseTableContext from './BaseTableContext';
45
+ import Actions from './Actions';
45
46
 
46
47
  function formatSummary(summary) {
47
48
  if (!summary) {
@@ -114,11 +115,9 @@ function BaseTable(props) {
114
115
  _useState4 = _slicedToArray(_useState3, 2),
115
116
  colsState = _useState4[0],
116
117
  setColsState = _useState4[1];
117
-
118
- var actions = useRef(rowActions);
119
- actions.current = rowActions;
120
118
  /** auto scroll y */
121
119
 
120
+
122
121
  var calcScrollY = function calcScrollY() {
123
122
  var wrapper = fullTableRef.current;
124
123
 
@@ -306,34 +305,27 @@ function BaseTable(props) {
306
305
  /** row actions */
307
306
 
308
307
 
309
- if (rowActions !== undefined && rowActions.length > 0) {
310
- var actionCol = {
311
- title: '',
312
- className: "".concat(PREFIX_CLS, "-table-operator-column"),
313
- width: 1,
314
- fixed: 'right',
315
- render: function render(_, row, index) {
316
- var _actions$current;
317
-
318
- return /*#__PURE__*/React.createElement("div", {
319
- className: "".concat(PREFIX_CLS, "-table-operator")
320
- }, (_actions$current = actions.current) === null || _actions$current === void 0 ? void 0 : _actions$current.map(function (item) {
321
- return /*#__PURE__*/React.createElement("button", {
322
- className: "".concat(PREFIX_CLS, "-table-operator-item"),
323
- key: item.title,
324
- onClick: function onClick() {
325
- item.onClick(row, index);
326
- }
327
- }, item.title);
328
- }));
329
- }
330
- };
331
- formatedColumns.push(actionCol);
332
- flattenColumns.push(actionCol);
333
- }
308
+ useMemo(function () {
309
+ if (rowActions !== undefined && rowActions.length > 0) {
310
+ var actionCol = {
311
+ title: '',
312
+ className: "".concat(PREFIX_CLS, "-table-operator-column"),
313
+ width: 1,
314
+ fixed: 'right',
315
+ render: function render(_, row, index) {
316
+ return /*#__PURE__*/React.createElement(Actions, {
317
+ actions: rowActions,
318
+ row: row,
319
+ index: index
320
+ });
321
+ }
322
+ };
323
+ formatedColumns.push(actionCol);
324
+ flattenColumns.push(actionCol);
325
+ }
326
+ }, [rowActions, flattenColumns, formatedColumns]);
334
327
  /** virtualize scroll */
335
328
 
336
-
337
329
  var _useMemo3 = useMemo(function () {
338
330
  return {
339
331
  components: _objectSpread({
@@ -49,7 +49,7 @@
49
49
  color: @text-color;
50
50
  font-size: @font-size-base;
51
51
 
52
- .ant-table-tbody > tr:hover > td > &-operator {
52
+ .ant-table-cell-row-hover &-operator {
53
53
  display: flex;
54
54
  }
55
55
 
@@ -62,9 +62,20 @@
62
62
  align-items: center;
63
63
  justify-content: flex-end;
64
64
  height: 100%;
65
- padding: 0 !important;
65
+ padding-left: 16px;
66
66
  white-space: nowrap;
67
67
  background-color: @table-row-hover-bg;
68
+ background-clip: content-box;
69
+
70
+ &::before {
71
+ position: absolute;
72
+ top: 0;
73
+ left: 0;
74
+ width: 16px;
75
+ height: 100%;
76
+ background: linear-gradient(90deg, rgba(248, 248, 248, 0) 0%, @table-row-hover-bg 100%);
77
+ content: '';
78
+ }
68
79
 
69
80
  &-column::after {
70
81
  display: none !important;
@@ -80,8 +91,18 @@
80
91
  border-radius: 4px;
81
92
  outline: none;
82
93
  cursor: pointer;
94
+ transition: background-color 0.2s;
83
95
  user-select: none;
84
96
 
97
+ &:disabled {
98
+ color: rgba(51, 51, 51, 0.5);
99
+ cursor: not-allowed;
100
+
101
+ &:hover {
102
+ background-color: rgba(51, 51, 51, 0.06);
103
+ }
104
+ }
105
+
85
106
  &:hover {
86
107
  background-color: .primary(0.12) [];
87
108
  }
@@ -90,6 +111,41 @@
90
111
  color: .primary(0.8) [];
91
112
  }
92
113
  }
114
+
115
+ &-popover {
116
+ position: absolute;
117
+ z-index: 1000;
118
+ width: 120px;
119
+
120
+ &-items {
121
+ transform: scale(0.6);
122
+ transform-origin: 100% 0;
123
+ opacity: 0;
124
+ transition: transform 0.2s, opacity 0.2s;
125
+ pointer-events: none;
126
+
127
+ .popoverInner();
128
+
129
+ &.animated {
130
+ transform: scale(1);
131
+ opacity: 1;
132
+ pointer-events: visible;
133
+ }
134
+ }
135
+
136
+ &-item {
137
+ text-align: left;
138
+ background-color: #fff;
139
+ border: none;
140
+ outline: none;
141
+ .popoverItem();
142
+
143
+ &-disabled {
144
+ color: rgba(51, 51, 51, 0.5);
145
+ cursor: not-allowed;
146
+ }
147
+ }
148
+ }
93
149
  }
94
150
 
95
151
  &-resizable-handle {
@@ -7,6 +7,13 @@ export type ColumnGroupType<T> = TableColumnGroupType<T>;
7
7
 
8
8
  export type ColumnsType<T> = TableColumnsType<T>;
9
9
 
10
+ export interface RowAction<T> {
11
+ text: string;
12
+ onClick?: (row: T, index: number) => void;
13
+ disabled?: boolean;
14
+ dropDown?: (RowAction<T> | null)[];
15
+ }
16
+
10
17
  export interface BaseTableProps<T> extends Omit<TableProps<T>, 'columns' | 'scroll'> {
11
18
  defaultColumnProps?: Partial<ColumnType<T>>;
12
19
  /**
@@ -32,8 +39,5 @@ export interface BaseTableProps<T> extends Omit<TableProps<T>, 'columns' | 'scro
32
39
  /**
33
40
  * @description 行操作按钮组
34
41
  */
35
- rowActions?: {
36
- title: string;
37
- onClick: (row: T, index: number) => void;
38
- }[];
42
+ rowActions?: (RowAction<T> | null)[];
39
43
  }
@@ -205,11 +205,7 @@ export default function DurationPicker(props) {
205
205
  }))
206
206
  }, /*#__PURE__*/React.createElement("div", {
207
207
  className: "".concat(prefixCls, "-duration-type")
208
- }, (_result$type = result.type) === null || _result$type === void 0 ? void 0 : _result$type.label, /*#__PURE__*/React.createElement(Down, {
209
- style: {
210
- color: '#BFBFBF'
211
- }
212
- }))), /*#__PURE__*/React.createElement("div", {
208
+ }, (_result$type = result.type) === null || _result$type === void 0 ? void 0 : _result$type.label, /*#__PURE__*/React.createElement(Down, null))), /*#__PURE__*/React.createElement("div", {
213
209
  className: "".concat(prefixCls, "-duration-picker")
214
210
  }, /*#__PURE__*/React.createElement(Dropdown, {
215
211
  overlay: /*#__PURE__*/React.createElement(Menu, null, options.map(function (item) {
@@ -222,11 +218,7 @@ export default function DurationPicker(props) {
222
218
  }))
223
219
  }, /*#__PURE__*/React.createElement("div", {
224
220
  className: "".concat(prefixCls, "-duration-option")
225
- }, (_result$option = result.option) === null || _result$option === void 0 ? void 0 : _result$option.label, /*#__PURE__*/React.createElement(Down, {
226
- style: {
227
- color: '#BFBFBF'
228
- }
229
- }))), /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
221
+ }, (_result$option = result.option) === null || _result$option === void 0 ? void 0 : _result$option.label, /*#__PURE__*/React.createElement(Down, null))), /*#__PURE__*/React.createElement(DatePicker.RangePicker, {
230
222
  value: result.dates,
231
223
  onChange: handleChangeDates,
232
224
  disabled: ((_result$option2 = result.option) === null || _result$option2 === void 0 ? void 0 : _result$option2.value) !== null
@@ -10,8 +10,8 @@
10
10
  align-items: center;
11
11
  justify-content: space-between;
12
12
  height: 100%;
13
- padding: 0 12px 0 16px;
14
- color: #686868;
13
+ padding: 0 8px;
14
+ color: rgba(51, 51, 51, 0.7);
15
15
  font-size: 14px;
16
16
  text-align: center;
17
17
  cursor: pointer;
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  &-type.ant-dropdown-trigger {
26
- flex: 0 0 138px;
26
+ flex: 0 0 124px;
27
27
  margin-right: 8px;
28
28
  border: 1px solid @select-border-color;
29
29
  border-radius: @border-radius-base;
@@ -31,7 +31,7 @@
31
31
 
32
32
  &-option.ant-dropdown-trigger {
33
33
  position: relative;
34
- flex: 0 0 122px;
34
+ flex: 0 0 110px;
35
35
 
36
36
  &::after {
37
37
  position: absolute;
@@ -30,9 +30,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
30
30
 
31
31
  import React, { useEffect, useMemo, useState } from 'react';
32
32
  import { Button, Checkbox, Form, Input, Popover, Space, Dropdown, Menu, Modal, message, Select, Empty, InputNumber } from 'antd';
33
- import { EllipsisOutlined } from '@ant-design/icons';
34
33
  import { useDebounce, useRequest } from '@lemon-fe/hooks';
35
- import Search from '../Icons/Search';
34
+ import Icons from '../Icons';
36
35
  import DurationPicker from '../DurationPicker';
37
36
  import FormLayout from '../FormLayout';
38
37
  import { PREFIX_CLS } from '../constants';
@@ -431,10 +430,8 @@ function Filter(props) {
431
430
  onClick: handleDelete
432
431
  }, "\u5220\u9664\u65B9\u6848"))
433
432
  }, /*#__PURE__*/React.createElement(Button, {
434
- style: {
435
- padding: '4px 8px'
436
- }
437
- }, /*#__PURE__*/React.createElement(EllipsisOutlined, null))), /*#__PURE__*/React.createElement(Popover, {
433
+ icon: /*#__PURE__*/React.createElement(Icons.More, null)
434
+ })), /*#__PURE__*/React.createElement(Popover, {
438
435
  trigger: "click",
439
436
  overlayClassName: "".concat(prefixCls, "-filter-popover"),
440
437
  destroyTooltipOnHide: true,
@@ -442,7 +439,7 @@ function Filter(props) {
442
439
  placeholder: "\u641C\u7D22\u9009\u9879",
443
440
  allowClear: true,
444
441
  className: "".concat(prefixCls, "-filter-items-search"),
445
- suffix: /*#__PURE__*/React.createElement(Search, {
442
+ suffix: /*#__PURE__*/React.createElement(Icons.Search, {
446
443
  style: {
447
444
  color: '#686868'
448
445
  }
@@ -69,6 +69,7 @@
69
69
  &-items {
70
70
  max-height: 400px;
71
71
  padding: 0 20px;
72
+ overflow: auto;
72
73
  }
73
74
 
74
75
  &-item {
@@ -35,7 +35,7 @@
35
35
  }
36
36
 
37
37
  &-label > label::after {
38
- margin: 0 @spaceX / 2 0 0;
38
+ margin: 0 8px 0 0;
39
39
  content: '';
40
40
  }
41
41
 
@@ -0,0 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+ export default function Down(props: {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ }): JSX.Element;
@@ -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
@@ -17,7 +17,6 @@ var DownSvg = function DownSvg(props) {
17
17
  d: "M3.757 5.757 8 10l4.243-4.243",
18
18
  stroke: "currentColor",
19
19
  strokeWidth: "1.5",
20
- opacity: ".7",
21
20
  strokeLinecap: "round",
22
21
  strokeLinejoin: "round",
23
22
  strokeDasharray: "0,0",
@@ -0,0 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+ export default function More(props: {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ }): JSX.Element;