@lemon-fe/components 0.0.32 → 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.
- package/es/Actions/index.d.ts +3 -2
- package/es/Actions/index.js +29 -28
- package/es/Actions/index.less +26 -51
- package/es/BaseTable/Actions.d.ts +8 -0
- package/es/BaseTable/Actions.js +119 -0
- package/es/BaseTable/ResizeHeaderCell.js +16 -5
- package/es/BaseTable/index.js +63 -19
- package/es/BaseTable/index.less +99 -0
- package/es/BaseTable/typings.d.ts +11 -0
- package/es/DurationPicker/index.js +2 -10
- package/es/DurationPicker/index.less +4 -4
- package/es/Filter/index.js +100 -41
- package/es/Filter/index.less +11 -7
- package/es/Filter/typings.d.ts +3 -2
- package/es/FormLayout/index.less +1 -1
- package/es/Icons/Calendar.d.ts +5 -0
- package/es/Icons/Calendar.js +47 -0
- package/es/Icons/Down.js +10 -5
- package/es/Icons/More.d.ts +5 -0
- package/es/Icons/More.js +44 -0
- package/es/Icons/Search.js +8 -12
- package/es/Icons/index.d.ts +4 -0
- package/es/Icons/index.js +5 -1
- package/es/Layout/index.js +80 -3
- package/es/Layout/index.less +69 -25
- package/es/MainFramework/components/DropMenu/index.less +2 -32
- package/es/MainFramework/components/Menu/index.less +2 -2
- package/es/MainFramework/components/RefreshButton/index.less +2 -32
- package/es/Portal/index.d.ts +12 -0
- package/es/Portal/index.js +72 -0
- package/es/Section/TabBar.d.ts +12 -0
- package/es/Section/TabBar.js +48 -0
- package/es/Section/index.js +38 -53
- package/es/Section/index.less +44 -91
- package/es/SiderTree/TreeNodeTitle.d.ts +1 -1
- package/es/SiderTree/TreeNodeTitle.js +17 -35
- package/es/SiderTree/index.d.ts +3 -1
- package/es/SiderTree/index.js +40 -64
- package/es/SiderTree/index.less +76 -75
- package/es/SymbolIcon/index.d.ts +8 -0
- package/es/SymbolIcon/index.js +32 -0
- package/es/SymbolIcon/index.less +7 -0
- package/es/TabBar/index.d.ts +14 -0
- package/es/TabBar/index.js +52 -0
- package/es/TabBar/index.less +31 -0
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/index.less +4 -35
- package/es/init.js +15 -16
- package/es/overrides.less +136 -0
- package/es/theme.less +1 -8
- package/es/utils.d.ts +2 -0
- package/es/utils.js +14 -0
- package/es/utils.less +53 -0
- package/package.json +3 -3
- package/es/BaseTable/Sort.d.ts +0 -10
- package/es/BaseTable/Sort.js +0 -122
|
@@ -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
|
/**
|
|
@@ -29,4 +36,8 @@ export interface BaseTableProps<T> extends Omit<TableProps<T>, 'columns' | 'scro
|
|
|
29
36
|
x?: number | string | true;
|
|
30
37
|
y?: number | string | true;
|
|
31
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* @description 行操作按钮组
|
|
41
|
+
*/
|
|
42
|
+
rowActions?: (RowAction<T> | null)[];
|
|
32
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
|
|
14
|
-
color:
|
|
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
|
|
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
|
|
34
|
+
flex: 0 0 110px;
|
|
35
35
|
|
|
36
36
|
&::after {
|
|
37
37
|
position: absolute;
|
package/es/Filter/index.js
CHANGED
|
@@ -29,18 +29,27 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
29
29
|
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; }
|
|
30
30
|
|
|
31
31
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
32
|
-
import { Button,
|
|
33
|
-
import { EllipsisOutlined, UnorderedListOutlined } from '@ant-design/icons';
|
|
32
|
+
import { Button, Checkbox, Form, Input, Popover, Space, Dropdown, Menu, Modal, message, Select, Empty, InputNumber } from 'antd';
|
|
34
33
|
import { useDebounce, useRequest } from '@lemon-fe/hooks';
|
|
35
|
-
import
|
|
34
|
+
import Icons from '../Icons';
|
|
36
35
|
import DurationPicker from '../DurationPicker';
|
|
37
36
|
import FormLayout from '../FormLayout';
|
|
38
37
|
import { PREFIX_CLS } from '../constants';
|
|
38
|
+
import TabBar from '../TabBar';
|
|
39
39
|
var components = [{
|
|
40
40
|
type: 'input',
|
|
41
41
|
render: function render(item) {
|
|
42
42
|
return /*#__PURE__*/React.createElement(Input, _objectSpread({}, item.extraProps));
|
|
43
43
|
}
|
|
44
|
+
}, {
|
|
45
|
+
type: 'input-number',
|
|
46
|
+
render: function render(item) {
|
|
47
|
+
return /*#__PURE__*/React.createElement(InputNumber, _objectSpread({
|
|
48
|
+
style: {
|
|
49
|
+
width: '100%'
|
|
50
|
+
}
|
|
51
|
+
}, item.extraProps));
|
|
52
|
+
}
|
|
44
53
|
}, {
|
|
45
54
|
type: 'select',
|
|
46
55
|
render: function render(item) {
|
|
@@ -77,7 +86,8 @@ function Filter(props) {
|
|
|
77
86
|
value = props.value,
|
|
78
87
|
defaultActiveKeys = props.defaultActiveKeys,
|
|
79
88
|
storageKey = props.storageKey,
|
|
80
|
-
onValuesChange = props.onValuesChange
|
|
89
|
+
onValuesChange = props.onValuesChange,
|
|
90
|
+
style = props.style;
|
|
81
91
|
var prefixCls = PREFIX_CLS;
|
|
82
92
|
var defaultValue = useMemo(function () {
|
|
83
93
|
return defaultValueProp || value;
|
|
@@ -337,6 +347,15 @@ function Filter(props) {
|
|
|
337
347
|
|
|
338
348
|
return data;
|
|
339
349
|
}, [keywords, data]);
|
|
350
|
+
|
|
351
|
+
var getColStyle = function getColStyle() {
|
|
352
|
+
var colSpan = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
353
|
+
return {
|
|
354
|
+
width: colSpan * 348,
|
|
355
|
+
padding: '0 8px'
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
|
|
340
359
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
|
|
341
360
|
destroyOnClose: true,
|
|
342
361
|
visible: showModal,
|
|
@@ -364,29 +383,16 @@ function Filter(props) {
|
|
|
364
383
|
onFinish: handleFinish,
|
|
365
384
|
form: form,
|
|
366
385
|
className: "".concat(prefixCls, "-filter"),
|
|
367
|
-
onValuesChange: handleValuesChange
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
376
|
-
style: {
|
|
377
|
-
maxWidth: '1334px'
|
|
378
|
-
}
|
|
379
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
386
|
+
onValuesChange: handleValuesChange,
|
|
387
|
+
style: style
|
|
388
|
+
}, /*#__PURE__*/React.createElement(TabBar, {
|
|
389
|
+
tabs: tabs,
|
|
390
|
+
activeKey: tabs[active].title,
|
|
391
|
+
onTabClick: function onTabClick(_, index) {
|
|
392
|
+
return handleTabChange(index);
|
|
393
|
+
},
|
|
380
394
|
className: "".concat(prefixCls, "-filter-tab-bar")
|
|
381
|
-
},
|
|
382
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
383
|
-
className: "".concat(prefixCls, "-filter-tab").concat(active === index ? '-active' : ''),
|
|
384
|
-
key: item.title,
|
|
385
|
-
onClick: function onClick() {
|
|
386
|
-
return handleTabChange(index);
|
|
387
|
-
}
|
|
388
|
-
}, item.title);
|
|
389
|
-
})), /*#__PURE__*/React.createElement(FormLayout, {
|
|
395
|
+
}), /*#__PURE__*/React.createElement(FormLayout, {
|
|
390
396
|
direction: "row"
|
|
391
397
|
}, data.map(function (item) {
|
|
392
398
|
var visible = activeKeys.has(item.key);
|
|
@@ -396,18 +402,22 @@ function Filter(props) {
|
|
|
396
402
|
return null;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
|
-
return /*#__PURE__*/React.createElement(
|
|
400
|
-
|
|
405
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
406
|
+
style: getColStyle(item.colSpan || target.colSpan),
|
|
401
407
|
key: item.key
|
|
402
408
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
403
409
|
key: item.key,
|
|
404
410
|
name: item.key,
|
|
405
411
|
label: item.hideLabel ? undefined : item.label
|
|
406
412
|
}, target.render(item)));
|
|
407
|
-
})
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
413
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
414
|
+
style: getColStyle()
|
|
415
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
416
|
+
label: /*#__PURE__*/React.createElement(Button, {
|
|
417
|
+
type: "primary",
|
|
418
|
+
htmlType: "submit"
|
|
419
|
+
}, "\u67E5\u8BE2")
|
|
420
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
411
421
|
placement: "bottomRight",
|
|
412
422
|
overlay: /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(Menu.Item, {
|
|
413
423
|
key: "reset",
|
|
@@ -420,10 +430,8 @@ function Filter(props) {
|
|
|
420
430
|
onClick: handleDelete
|
|
421
431
|
}, "\u5220\u9664\u65B9\u6848"))
|
|
422
432
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}
|
|
426
|
-
}, /*#__PURE__*/React.createElement(EllipsisOutlined, null))), /*#__PURE__*/React.createElement(Popover, {
|
|
433
|
+
icon: /*#__PURE__*/React.createElement(Icons.More, null)
|
|
434
|
+
})), /*#__PURE__*/React.createElement(Popover, {
|
|
427
435
|
trigger: "click",
|
|
428
436
|
overlayClassName: "".concat(prefixCls, "-filter-popover"),
|
|
429
437
|
destroyTooltipOnHide: true,
|
|
@@ -431,7 +439,7 @@ function Filter(props) {
|
|
|
431
439
|
placeholder: "\u641C\u7D22\u9009\u9879",
|
|
432
440
|
allowClear: true,
|
|
433
441
|
className: "".concat(prefixCls, "-filter-items-search"),
|
|
434
|
-
suffix: /*#__PURE__*/React.createElement(Search, {
|
|
442
|
+
suffix: /*#__PURE__*/React.createElement(Icons.Search, {
|
|
435
443
|
style: {
|
|
436
444
|
color: '#686868'
|
|
437
445
|
}
|
|
@@ -456,13 +464,64 @@ function Filter(props) {
|
|
|
456
464
|
}))),
|
|
457
465
|
placement: "bottomRight"
|
|
458
466
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
459
|
-
|
|
460
|
-
padding: '4px 8px'
|
|
461
|
-
},
|
|
467
|
+
className: "".concat(prefixCls, "-filter-btn"),
|
|
462
468
|
onClick: function onClick() {
|
|
463
469
|
setKeywords('');
|
|
464
470
|
}
|
|
465
|
-
}, /*#__PURE__*/React.createElement(
|
|
471
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
472
|
+
width: "18",
|
|
473
|
+
height: "18",
|
|
474
|
+
viewBox: "0 0 18 18",
|
|
475
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
476
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
477
|
+
transform: "translate(2 2)",
|
|
478
|
+
fill: "none",
|
|
479
|
+
fillRule: "evenodd"
|
|
480
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
481
|
+
fillOpacity: ".65",
|
|
482
|
+
fill: "currentColor",
|
|
483
|
+
y: "4",
|
|
484
|
+
width: "14",
|
|
485
|
+
height: "1.5",
|
|
486
|
+
rx: ".75"
|
|
487
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
488
|
+
fillOpacity: ".65",
|
|
489
|
+
fill: "currentColor",
|
|
490
|
+
y: "8",
|
|
491
|
+
width: "6",
|
|
492
|
+
height: "1.5",
|
|
493
|
+
rx: ".75"
|
|
494
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
495
|
+
fillOpacity: ".65",
|
|
496
|
+
fill: "currentColor",
|
|
497
|
+
y: "12",
|
|
498
|
+
width: "6",
|
|
499
|
+
height: "1.5",
|
|
500
|
+
rx: ".75"
|
|
501
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
502
|
+
fillOpacity: ".65",
|
|
503
|
+
fill: "currentColor",
|
|
504
|
+
width: "14",
|
|
505
|
+
height: "1.5",
|
|
506
|
+
rx: ".75"
|
|
507
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
508
|
+
transform: "rotate(-45 15.45 -2.157)"
|
|
509
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
510
|
+
strokeOpacity: ".65",
|
|
511
|
+
stroke: "currentColor",
|
|
512
|
+
strokeWidth: "1.5",
|
|
513
|
+
cx: "3",
|
|
514
|
+
cy: "3",
|
|
515
|
+
r: "2.25"
|
|
516
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
517
|
+
strokeOpacity: ".65",
|
|
518
|
+
stroke: "currentColor",
|
|
519
|
+
x: "2.75",
|
|
520
|
+
y: "5.5",
|
|
521
|
+
width: "1",
|
|
522
|
+
height: "2",
|
|
523
|
+
rx: ".5"
|
|
524
|
+
}))))))))))));
|
|
466
525
|
}
|
|
467
526
|
|
|
468
527
|
Filter.setComponents = setComponents;
|
package/es/Filter/index.less
CHANGED
|
@@ -6,14 +6,7 @@
|
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
|
|
8
8
|
&-bar {
|
|
9
|
-
display: flex;
|
|
10
|
-
height: 25px;
|
|
11
9
|
margin-bottom: 16px;
|
|
12
|
-
line-height: 1;
|
|
13
|
-
|
|
14
|
-
& > div + div {
|
|
15
|
-
margin-left: 32px;
|
|
16
|
-
}
|
|
17
10
|
}
|
|
18
11
|
|
|
19
12
|
&-active {
|
|
@@ -34,8 +27,19 @@
|
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
29
|
|
|
30
|
+
&-btn {
|
|
31
|
+
padding: 6px;
|
|
32
|
+
|
|
33
|
+
& > svg {
|
|
34
|
+
display: block;
|
|
35
|
+
width: 18px;
|
|
36
|
+
height: 18px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
37
40
|
&-popover {
|
|
38
41
|
width: 227px;
|
|
42
|
+
padding-top: 0;
|
|
39
43
|
|
|
40
44
|
.ant-popover-arrow {
|
|
41
45
|
display: none;
|
package/es/Filter/typings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormInstance } from 'antd';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import type { FormInstance } from 'antd';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
export interface FilterItemType {
|
|
5
5
|
key: string;
|
|
@@ -18,6 +18,7 @@ export interface FilterProps<T extends Record<string, any> = Record<string, any>
|
|
|
18
18
|
onValuesChange?: (changedValues: Partial<T>, allValues: T, form: FormInstance<T>) => void;
|
|
19
19
|
defaultActiveKeys?: string[];
|
|
20
20
|
storageKey?: string;
|
|
21
|
+
style?: CSSProperties;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export interface ComponentOption {
|
package/es/FormLayout/index.less
CHANGED
|
@@ -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
|
@@ -9,14 +9,19 @@ import Icon from '@ant-design/icons';
|
|
|
9
9
|
|
|
10
10
|
var DownSvg = function DownSvg(props) {
|
|
11
11
|
return /*#__PURE__*/React.createElement("svg", _objectSpread({
|
|
12
|
-
width: "
|
|
13
|
-
height: "
|
|
12
|
+
width: "16",
|
|
13
|
+
height: "16",
|
|
14
14
|
viewBox: "0 0 16 16",
|
|
15
15
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16
16
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
17
|
-
d: "
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
d: "M3.757 5.757 8 10l4.243-4.243",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: "1.5",
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round",
|
|
22
|
+
strokeDasharray: "0,0",
|
|
23
|
+
fill: "none",
|
|
24
|
+
fillRule: "evenodd"
|
|
20
25
|
}));
|
|
21
26
|
};
|
|
22
27
|
|
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/Search.js
CHANGED
|
@@ -11,21 +11,17 @@ var Svg = function Svg(props) {
|
|
|
11
11
|
return /*#__PURE__*/React.createElement("svg", _objectSpread({
|
|
12
12
|
width: "16",
|
|
13
13
|
height: "16",
|
|
14
|
+
viewBox: "0 0 16 16",
|
|
14
15
|
xmlns: "http://www.w3.org/2000/svg"
|
|
15
16
|
}, props), /*#__PURE__*/React.createElement("g", {
|
|
16
|
-
fill: "none",
|
|
17
|
-
fillRule: "evenodd"
|
|
18
|
-
}, /*#__PURE__*/React.createElement("circle", {
|
|
19
|
-
strokeOpacity: ".25",
|
|
20
|
-
stroke: "currentColor",
|
|
21
|
-
strokeWidth: "2",
|
|
22
|
-
cx: "7",
|
|
23
|
-
cy: "7",
|
|
24
|
-
r: "5"
|
|
25
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
26
|
-
fillOpacity: ".15",
|
|
27
17
|
fill: "currentColor",
|
|
28
|
-
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
opacity: ".7"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
d: "M7.5.5a7 7 0 1 1 0 14 7 7 0 0 1 0-14Zm0 1.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z",
|
|
22
|
+
fillRule: "nonzero"
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
d: "M12.03 12.03a.75.75 0 0 1 1.061 0l1.768 1.768a.75.75 0 1 1-1.06 1.06l-1.769-1.767a.75.75 0 0 1 0-1.06Z"
|
|
29
25
|
})));
|
|
30
26
|
};
|
|
31
27
|
|
package/es/Icons/index.d.ts
CHANGED
|
@@ -2,11 +2,15 @@ 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';
|
|
5
7
|
declare const Icons: {
|
|
6
8
|
Search: typeof Search;
|
|
7
9
|
Down: typeof Down;
|
|
8
10
|
Tip: typeof Tip;
|
|
9
11
|
Empty: () => JSX.Element;
|
|
10
12
|
DarkSearch: typeof DarkSearch;
|
|
13
|
+
More: typeof More;
|
|
14
|
+
Calendar: typeof Calendar;
|
|
11
15
|
};
|
|
12
16
|
export default Icons;
|
package/es/Icons/index.js
CHANGED
|
@@ -3,11 +3,15 @@ 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';
|
|
6
8
|
var Icons = {
|
|
7
9
|
Search: Search,
|
|
8
10
|
Down: Down,
|
|
9
11
|
Tip: Tip,
|
|
10
12
|
Empty: Empty,
|
|
11
|
-
DarkSearch: DarkSearch
|
|
13
|
+
DarkSearch: DarkSearch,
|
|
14
|
+
More: More,
|
|
15
|
+
Calendar: Calendar
|
|
12
16
|
};
|
|
13
17
|
export default Icons;
|
package/es/Layout/index.js
CHANGED
|
@@ -1,9 +1,86 @@
|
|
|
1
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
2
|
|
|
3
|
-
|
|
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';
|
|
4
16
|
import classNames from 'classnames';
|
|
5
17
|
import { Spin } from 'antd';
|
|
6
18
|
import { PREFIX_CLS } from '../constants';
|
|
19
|
+
|
|
20
|
+
function Sider(props) {
|
|
21
|
+
var prefixCls = props.prefixCls,
|
|
22
|
+
children = props.children;
|
|
23
|
+
|
|
24
|
+
var _useState = useState(false),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
collapsed = _useState2[0],
|
|
27
|
+
setCollapsed = _useState2[1];
|
|
28
|
+
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: classNames("".concat(prefixCls, "-left"), _defineProperty({}, "".concat(prefixCls, "-left-collapsed"), collapsed))
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "".concat(prefixCls, "-left-body")
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "".concat(prefixCls, "-left-content")
|
|
35
|
+
}, children)), /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "".concat(prefixCls, "-left-collapse"),
|
|
37
|
+
onClick: function onClick() {
|
|
38
|
+
return setCollapsed(!collapsed);
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
41
|
+
width: "12",
|
|
42
|
+
height: "12",
|
|
43
|
+
version: "1.1",
|
|
44
|
+
viewBox: "0 0 12 12"
|
|
45
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
46
|
+
stroke: "none",
|
|
47
|
+
strokeWidth: "1",
|
|
48
|
+
fill: "none",
|
|
49
|
+
fillRule: "evenodd",
|
|
50
|
+
opacity: "1"
|
|
51
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
52
|
+
transform: "translate(-463.000000, -140.000000)"
|
|
53
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
54
|
+
transform: "translate(463.000000, 140.000000)"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
56
|
+
opacity: "0.699999988",
|
|
57
|
+
transform: "translate(2.000000, 2.000000)"
|
|
58
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
59
|
+
d: "M9,0.75 C9,1.16421356 8.66421356,1.5 8.25,1.5 L5.75,1.5 C5.33578644,1.5 5,1.16421356 5,0.75 C5,0.335786438 5.33578644,7.6089797e-17 5.75,0 L8.25,0 C8.66421356,-7.6089797e-17 9,0.335786438 9,0.75 Z",
|
|
60
|
+
id: "Rectangle-393",
|
|
61
|
+
fill: "currentColor",
|
|
62
|
+
fillRule: "nonzero"
|
|
63
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
64
|
+
d: "M9,4 C9,4.41421356 8.66421356,4.75 8.25,4.75 L5.75,4.75 C5.33578644,4.75 5,4.41421356 5,4 C5,3.58578644 5.33578644,3.25 5.75,3.25 L8.25,3.25 C8.66421356,3.25 9,3.58578644 9,4 Z",
|
|
65
|
+
id: "Rectangle-394",
|
|
66
|
+
fill: "currentColor",
|
|
67
|
+
fillRule: "nonzero"
|
|
68
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
69
|
+
d: "M9,7.75 C9,8.16421356 8.66421356,8.5 8.25,8.5 L0.75,8.5 C0.335786438,8.5 5.07265313e-17,8.16421356 0,7.75 C-5.07265313e-17,7.33578644 0.335786438,7 0.75,7 L8.25,7 C8.66421356,7 9,7.33578644 9,7.75 Z",
|
|
70
|
+
id: "Rectangle-395",
|
|
71
|
+
fill: "currentColor",
|
|
72
|
+
fillRule: "nonzero"
|
|
73
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
74
|
+
d: "M4.32842712,0.621320344 L1.32842712,0.621320344 L1.32842712,3.62132034",
|
|
75
|
+
stroke: "currentColor",
|
|
76
|
+
strokeWidth: "1.5",
|
|
77
|
+
strokeLinecap: "round",
|
|
78
|
+
strokeLinejoin: "round",
|
|
79
|
+
strokeDasharray: "0,0",
|
|
80
|
+
transform: "translate(2.828427, 2.121320) rotate(-45.000000) translate(-2.828427, -2.121320) "
|
|
81
|
+
}))))))));
|
|
82
|
+
}
|
|
83
|
+
|
|
7
84
|
export default function Layout(props) {
|
|
8
85
|
var className = props.className,
|
|
9
86
|
style = props.style,
|
|
@@ -23,8 +100,8 @@ export default function Layout(props) {
|
|
|
23
100
|
className: "".concat(prefixCls, "-header")
|
|
24
101
|
}, header) : null, /*#__PURE__*/React.createElement("div", {
|
|
25
102
|
className: "".concat(prefixCls, "-content")
|
|
26
|
-
}, left ? /*#__PURE__*/React.createElement(
|
|
27
|
-
|
|
103
|
+
}, left ? /*#__PURE__*/React.createElement(Sider, {
|
|
104
|
+
prefixCls: prefixCls
|
|
28
105
|
}, left) : null, /*#__PURE__*/React.createElement("div", {
|
|
29
106
|
className: "".concat(prefixCls, "-main")
|
|
30
107
|
}, children)), footer ? /*#__PURE__*/React.createElement("div", {
|