@zykj2024/much-library 1.1.6-beta.1 → 1.1.7-beta.1

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 (49) hide show
  1. package/dist/McContainer/demo/generic.d.ts +8 -0
  2. package/dist/McContainer/demo/generic.js +91 -0
  3. package/dist/McContainer/index.d.ts +147 -108
  4. package/dist/McContainer/index.js +16 -7
  5. package/dist/McEllipsis/demo/base.d.ts +6 -0
  6. package/dist/McEllipsis/demo/base.js +22 -0
  7. package/dist/McEllipsis/demo/middle.d.ts +6 -0
  8. package/dist/McEllipsis/demo/middle.js +24 -0
  9. package/dist/McEllipsis/demo/table.d.ts +5 -0
  10. package/dist/McEllipsis/demo/table.js +93 -0
  11. package/dist/McEllipsis/demo/tooltip-size.d.ts +6 -0
  12. package/dist/McEllipsis/demo/tooltip-size.js +20 -0
  13. package/dist/McEllipsis/demo/tooltip.d.ts +6 -0
  14. package/dist/McEllipsis/demo/tooltip.js +53 -0
  15. package/dist/McEllipsis/index.css +4 -0
  16. package/dist/McEllipsis/index.d.ts +40 -0
  17. package/dist/McEllipsis/index.js +115 -0
  18. package/dist/McGroupPanel/index.css +8 -3
  19. package/dist/McGroupPanel/index.d.ts +1 -0
  20. package/dist/McGroupPanel/index.js +156 -141
  21. package/dist/McInputNumber/index.d.ts +3 -0
  22. package/dist/McInputNumber/index.js +16 -9
  23. package/dist/McListSelect/comps/ListSelect.d.ts +67 -0
  24. package/dist/McListSelect/comps/ListSelect.js +289 -0
  25. package/dist/McListSelect/comps/ListSelectPanel.d.ts +138 -0
  26. package/dist/McListSelect/comps/ListSelectPanel.js +451 -0
  27. package/dist/McListSelect/comps/SelectedItem.d.ts +17 -0
  28. package/dist/McListSelect/comps/SelectedItem.js +76 -0
  29. package/dist/McListSelect/demo/base.d.ts +6 -0
  30. package/dist/McListSelect/demo/base.js +125 -0
  31. package/dist/McListSelect/demo/inexistent.d.ts +6 -0
  32. package/dist/McListSelect/demo/inexistent.js +111 -0
  33. package/dist/McListSelect/demo/layout.d.ts +6 -0
  34. package/dist/McListSelect/demo/layout.js +70 -0
  35. package/dist/McListSelect/demo/other.d.ts +6 -0
  36. package/dist/McListSelect/demo/other.js +68 -0
  37. package/dist/McListSelect/demo/panel-inexistent.d.ts +6 -0
  38. package/dist/McListSelect/demo/panel-inexistent.js +86 -0
  39. package/dist/McListSelect/index.css +273 -0
  40. package/dist/McListSelect/index.d.ts +10 -0
  41. package/dist/McListSelect/index.js +5 -0
  42. package/dist/McListSelect/mock/index.d.ts +1 -0
  43. package/dist/McListSelect/mock/index.js +27 -0
  44. package/dist/McModalProvider/index.d.ts +2 -2
  45. package/dist/McThemeConfig/layoutStyle.d.ts +1 -1
  46. package/dist/McThemeConfig/layoutStyle.js +1 -1
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.js +3 -0
  49. package/package.json +3 -1
@@ -0,0 +1,111 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ /**
5
+ * title: 不存在值的回显
6
+ * description: 设置 `inexistent` 为 true,执行不存在值的处理逻辑,若需保留原值,需设置 `reserveOriginalValue` 为 true,涉及回显场景时,建议将 `labelInValue` 设置为 true
7
+ */
8
+
9
+ import { McListSelect } from "../..";
10
+ import { useEffect, useState } from 'react';
11
+ import { mockList } from "../mock";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ export default (function () {
16
+ var _useState = useState(),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ options = _useState2[0],
19
+ setOptions = _useState2[1];
20
+ var _useState3 = useState([{
21
+ value: 'xxx',
22
+ label: 'XXX'
23
+ }, {
24
+ value: 'v2',
25
+ label: '选项2'
26
+ }]),
27
+ _useState4 = _slicedToArray(_useState3, 2),
28
+ value1 = _useState4[0],
29
+ setValue1 = _useState4[1];
30
+ var _useState5 = useState([{
31
+ value: 'xxx',
32
+ label: 'XXX'
33
+ }, {
34
+ value: 'v2',
35
+ label: '选项2'
36
+ }]),
37
+ _useState6 = _slicedToArray(_useState5, 2),
38
+ value2 = _useState6[0],
39
+ setValue2 = _useState6[1];
40
+ var initOptions = /*#__PURE__*/function () {
41
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
42
+ var _data$records;
43
+ var _yield$mockList, data;
44
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
45
+ while (1) switch (_context.prev = _context.next) {
46
+ case 0:
47
+ _context.next = 2;
48
+ return mockList({
49
+ current: 1,
50
+ pageSize: 999
51
+ });
52
+ case 2:
53
+ _yield$mockList = _context.sent;
54
+ data = _yield$mockList.data;
55
+ setOptions(data === null || data === void 0 || (_data$records = data.records) === null || _data$records === void 0 ? void 0 : _data$records.map(function (_ref2) {
56
+ var id = _ref2.id,
57
+ name = _ref2.name;
58
+ return {
59
+ value: id,
60
+ label: name
61
+ };
62
+ }));
63
+ case 5:
64
+ case "end":
65
+ return _context.stop();
66
+ }
67
+ }, _callee);
68
+ }));
69
+ return function initOptions() {
70
+ return _ref.apply(this, arguments);
71
+ };
72
+ }();
73
+ useEffect(function () {
74
+ initOptions();
75
+ }, []);
76
+ return /*#__PURE__*/_jsxs(_Fragment, {
77
+ children: [/*#__PURE__*/_jsxs("div", {
78
+ style: {
79
+ fontSize: 14,
80
+ marginBottom: 8
81
+ },
82
+ children: ["\u5F53\u524D\u503C\uFF08\u4E0D\u4FDD\u7559\u539F\u503C\uFF09\uFF1A", JSON.stringify(value1)]
83
+ }), /*#__PURE__*/_jsx(McListSelect, {
84
+ options: options,
85
+ labelInValue: true,
86
+ inexistent: true,
87
+ value: value1,
88
+ onChange: function onChange(v) {
89
+ console.log('onChange1~', v);
90
+ setValue1(v);
91
+ }
92
+ }), /*#__PURE__*/_jsxs("div", {
93
+ style: {
94
+ fontSize: 14,
95
+ marginBottom: 8
96
+ },
97
+ children: ["\u5F53\u524D\u503C\uFF08\u4FDD\u7559\u539F\u503C\uFF09\uFF1A", JSON.stringify(value2)]
98
+ }), /*#__PURE__*/_jsx(McListSelect, {
99
+ options: options,
100
+ labelInValue: true,
101
+ inexistent: {
102
+ reserveOriginalValue: true
103
+ },
104
+ value: value2,
105
+ onChange: function onChange(v) {
106
+ console.log('onChange2~', v);
107
+ setValue2(v);
108
+ }
109
+ })]
110
+ });
111
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * title: 已选项布局方式
3
+ * description: 设置 `selectedLayout` 展示不同的布局方式,若设置为 sortable,可实现拖拽排序功能
4
+ */
5
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
6
+ export default _default;
@@ -0,0 +1,70 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ /**
5
+ * title: 已选项布局方式
6
+ * description: 设置 `selectedLayout` 展示不同的布局方式,若设置为 sortable,可实现拖拽排序功能
7
+ */
8
+
9
+ import { McListSelect } from "../..";
10
+ import { useEffect, useState } from 'react';
11
+ import { mockList } from "../mock";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ export default (function () {
16
+ var _useState = useState(),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ options = _useState2[0],
19
+ setOptions = _useState2[1];
20
+ var initOptions = /*#__PURE__*/function () {
21
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22
+ var _data$records;
23
+ var _yield$mockList, data;
24
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25
+ while (1) switch (_context.prev = _context.next) {
26
+ case 0:
27
+ _context.next = 2;
28
+ return mockList({
29
+ current: 1,
30
+ pageSize: 999
31
+ });
32
+ case 2:
33
+ _yield$mockList = _context.sent;
34
+ data = _yield$mockList.data;
35
+ setOptions(data === null || data === void 0 || (_data$records = data.records) === null || _data$records === void 0 ? void 0 : _data$records.map(function (_ref2) {
36
+ var id = _ref2.id,
37
+ name = _ref2.name;
38
+ return {
39
+ value: id,
40
+ label: name
41
+ };
42
+ }));
43
+ case 5:
44
+ case "end":
45
+ return _context.stop();
46
+ }
47
+ }, _callee);
48
+ }));
49
+ return function initOptions() {
50
+ return _ref.apply(this, arguments);
51
+ };
52
+ }();
53
+ useEffect(function () {
54
+ initOptions();
55
+ }, []);
56
+ return /*#__PURE__*/_jsxs(_Fragment, {
57
+ children: [/*#__PURE__*/_jsx(McListSelect, {
58
+ options: options,
59
+ label: "\u6BCF\u9879\u72EC\u5360\u4E00\u884C"
60
+ }), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx(McListSelect, {
61
+ options: options,
62
+ label: "\u884C\u5185\u5E03\u5C40",
63
+ selectedLayout: "inline"
64
+ }), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx(McListSelect, {
65
+ options: options,
66
+ label: "\u6BCF\u9879\u72EC\u5360\u4E00\u884C\u4E14\u53EF\u6392\u5E8F",
67
+ selectedLayout: "sortable"
68
+ })]
69
+ });
70
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * title: 常规属性
3
+ * description: 设置 `maxTagCount` 为 undefined 显示全部 tag<br>通过 `title` 设置标题<br>设置 `disabled` 为 true 禁用组件
4
+ */
5
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
6
+ export default _default;
@@ -0,0 +1,68 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ /**
5
+ * title: 常规属性
6
+ * description: 设置 `maxTagCount` 为 undefined 显示全部 tag<br>通过 `title` 设置标题<br>设置 `disabled` 为 true 禁用组件
7
+ */
8
+
9
+ import { McListSelect } from "../..";
10
+ import { useEffect, useState } from 'react';
11
+ import { mockList } from "../mock";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { Fragment as _Fragment } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ export default (function () {
16
+ var _useState = useState(),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ options = _useState2[0],
19
+ setOptions = _useState2[1];
20
+ var initOptions = /*#__PURE__*/function () {
21
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22
+ var _data$records;
23
+ var _yield$mockList, data;
24
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25
+ while (1) switch (_context.prev = _context.next) {
26
+ case 0:
27
+ _context.next = 2;
28
+ return mockList({
29
+ current: 1,
30
+ pageSize: 999
31
+ });
32
+ case 2:
33
+ _yield$mockList = _context.sent;
34
+ data = _yield$mockList.data;
35
+ setOptions(data === null || data === void 0 || (_data$records = data.records) === null || _data$records === void 0 ? void 0 : _data$records.map(function (_ref2) {
36
+ var id = _ref2.id,
37
+ name = _ref2.name;
38
+ return {
39
+ value: id,
40
+ label: name
41
+ };
42
+ }));
43
+ case 5:
44
+ case "end":
45
+ return _context.stop();
46
+ }
47
+ }, _callee);
48
+ }));
49
+ return function initOptions() {
50
+ return _ref.apply(this, arguments);
51
+ };
52
+ }();
53
+ useEffect(function () {
54
+ initOptions();
55
+ }, []);
56
+ return /*#__PURE__*/_jsxs(_Fragment, {
57
+ children: [/*#__PURE__*/_jsx(McListSelect, {
58
+ options: options,
59
+ maxTagCount: undefined
60
+ }), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx(McListSelect, {
61
+ options: options,
62
+ title: "\u81EA\u5B9A\u4E49\u6807\u9898"
63
+ }), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx(McListSelect, {
64
+ options: options,
65
+ disabled: true
66
+ })]
67
+ });
68
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * title: 面板使用
3
+ * description: 下拉菜单面板可单独使用,其使用方法与 `McListSelect` 基本无异<br>注:`inexistent` 的配置项里没有 `reserveOriginalValue`,取而代之的是 `reserved`,设置为 true,则保留不存在的项并禁止其移除
4
+ */
5
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
6
+ export default _default;
@@ -0,0 +1,86 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ /**
5
+ * title: 面板使用
6
+ * description: 下拉菜单面板可单独使用,其使用方法与 `McListSelect` 基本无异<br>注:`inexistent` 的配置项里没有 `reserveOriginalValue`,取而代之的是 `reserved`,设置为 true,则保留不存在的项并禁止其移除
7
+ */
8
+
9
+ import { McListSelect } from "../..";
10
+ import { useEffect, useState } from 'react';
11
+ import { mockList } from "../mock";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ export default (function () {
16
+ var _useState = useState(),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ options = _useState2[0],
19
+ setOptions = _useState2[1];
20
+ var _useState3 = useState([{
21
+ value: 'xxx',
22
+ label: 'XXX'
23
+ }, {
24
+ value: 'v2',
25
+ label: '选项2'
26
+ }]),
27
+ _useState4 = _slicedToArray(_useState3, 2),
28
+ value = _useState4[0],
29
+ setValue = _useState4[1];
30
+ var initOptions = /*#__PURE__*/function () {
31
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
32
+ var _data$records;
33
+ var _yield$mockList, data;
34
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
35
+ while (1) switch (_context.prev = _context.next) {
36
+ case 0:
37
+ _context.next = 2;
38
+ return mockList({
39
+ current: 1,
40
+ pageSize: 999
41
+ });
42
+ case 2:
43
+ _yield$mockList = _context.sent;
44
+ data = _yield$mockList.data;
45
+ setOptions(data === null || data === void 0 || (_data$records = data.records) === null || _data$records === void 0 ? void 0 : _data$records.map(function (_ref2) {
46
+ var id = _ref2.id,
47
+ name = _ref2.name;
48
+ return {
49
+ value: id,
50
+ label: name
51
+ };
52
+ }));
53
+ case 5:
54
+ case "end":
55
+ return _context.stop();
56
+ }
57
+ }, _callee);
58
+ }));
59
+ return function initOptions() {
60
+ return _ref.apply(this, arguments);
61
+ };
62
+ }();
63
+ useEffect(function () {
64
+ initOptions();
65
+ }, []);
66
+ return /*#__PURE__*/_jsxs(_Fragment, {
67
+ children: [/*#__PURE__*/_jsxs("div", {
68
+ style: {
69
+ fontSize: 14,
70
+ marginBottom: 8
71
+ },
72
+ children: ["\u5F53\u524D\u503C\uFF1A", JSON.stringify(value)]
73
+ }), /*#__PURE__*/_jsx(McListSelect.Panel, {
74
+ options: options,
75
+ labelInValue: true,
76
+ inexistent: {
77
+ reserved: true
78
+ },
79
+ value: value,
80
+ onChange: function onChange(v) {
81
+ console.log('onChange~', v);
82
+ setValue(v);
83
+ }
84
+ })]
85
+ });
86
+ });
@@ -0,0 +1,273 @@
1
+ .mc-list-select {
2
+ width: 100%;
3
+ }
4
+ .mc-list-select__label {
5
+ position: absolute;
6
+ top: 0;
7
+ left: 11px;
8
+ z-index: 2;
9
+ display: -webkit-box;
10
+ display: -ms-flexbox;
11
+ display: flex;
12
+ -webkit-box-align: center;
13
+ -ms-flex-align: center;
14
+ align-items: center;
15
+ height: 100%;
16
+ color: #262626;
17
+ font-size: 14px;
18
+ }
19
+ .mc-list-select__label::after {
20
+ margin-left: 2px;
21
+ content: '\FF1A';
22
+ }
23
+ .mc-list-select__label.mc-list-select--disabled {
24
+ color: rgba(0, 0, 0, 0.25);
25
+ cursor: no-drop;
26
+ }
27
+ .mc-list-select__content {
28
+ width: 100%;
29
+ height: 100%;
30
+ }
31
+ .mc-list-select__content.ant-select .ant-select-selector {
32
+ padding-left: var(--selector-pl);
33
+ }
34
+ .mc-list-select__content.ant-select .ant-select-selector .ant-select-selection-overflow-item-rest .ant-select-selection-item {
35
+ padding-left: 4px;
36
+ color: #fff;
37
+ background: #325cf7;
38
+ }
39
+ .mc-list-select__content.ant-select .ant-select-selector .ant-select-selection-overflow-item-rest .ant-select-selection-item .ant-select-selection-item-content {
40
+ margin-right: 0;
41
+ }
42
+ .mc-list-select__content.ant-select .ant-select-selector .ant-select-selection-item[title*='「'][title$='」'] {
43
+ color: var(--inexistent-color);
44
+ }
45
+ .mc-list-select__content.ant-select.ant-select-single .ant-select-selector .ant-select-selection-search {
46
+ left: var(--selector-pl);
47
+ }
48
+ .mc-list-select__content.ant-select.ant-select-multiple .ant-select-selector .ant-select-selection-placeholder {
49
+ left: var(--selector-pl);
50
+ }
51
+ .mc-list-select__content.ant-select.ant-select-multiple .ant-select-selector .ant-select-selection-search {
52
+ margin-left: 0;
53
+ }
54
+ .mc-list-select.mc-list-select--inline .ant-select-selection-overflow-item:not(
55
+ .ant-select-selection-overflow-item-rest,
56
+ .ant-select-selection-overflow-item-suffix
57
+ ) {
58
+ -webkit-box-flex: 1;
59
+ -ms-flex: 1;
60
+ flex: 1;
61
+ min-width: 0;
62
+ margin-right: 4px;
63
+ }
64
+ .mc-list-select__dropdown-footer {
65
+ display: -webkit-box;
66
+ display: -ms-flexbox;
67
+ display: flex;
68
+ -webkit-box-align: center;
69
+ -ms-flex-align: center;
70
+ align-items: center;
71
+ -webkit-box-pack: end;
72
+ -ms-flex-pack: end;
73
+ justify-content: flex-end;
74
+ height: 48px;
75
+ -webkit-column-gap: 8px;
76
+ -moz-column-gap: 8px;
77
+ column-gap: 8px;
78
+ }
79
+ .mc-list-select-panel {
80
+ width: 560px;
81
+ display: -webkit-box;
82
+ display: -ms-flexbox;
83
+ display: flex;
84
+ height: 400px;
85
+ -webkit-column-gap: 8px;
86
+ -moz-column-gap: 8px;
87
+ column-gap: 8px;
88
+ position: relative;
89
+ }
90
+ .mc-list-select-panel__title {
91
+ font-weight: 500;
92
+ }
93
+ .mc-list-select-panel__card {
94
+ display: -webkit-box;
95
+ display: -ms-flexbox;
96
+ display: flex;
97
+ -webkit-box-orient: vertical;
98
+ -webkit-box-direction: normal;
99
+ -ms-flex-direction: column;
100
+ flex-direction: column;
101
+ height: 100%;
102
+ overflow: hidden;
103
+ border: 1px solid #d9d9d9;
104
+ border-radius: 4px;
105
+ }
106
+ .mc-list-select-panel__card__header {
107
+ display: -webkit-box;
108
+ display: -ms-flexbox;
109
+ display: flex;
110
+ -webkit-box-align: center;
111
+ -ms-flex-align: center;
112
+ align-items: center;
113
+ -webkit-box-pack: justify;
114
+ -ms-flex-pack: justify;
115
+ justify-content: space-between;
116
+ height: 40px;
117
+ padding: 0 12px;
118
+ background: #fafafa;
119
+ }
120
+ .mc-list-select-panel__card__search {
121
+ padding: 8px 12px;
122
+ }
123
+ .mc-list-select-panel__card__search .mc-search {
124
+ width: 100%;
125
+ }
126
+ .mc-list-select-panel__card__checkall {
127
+ height: 40px;
128
+ }
129
+ .mc-list-select-panel__card__checkall__inner {
130
+ -webkit-box-align: center;
131
+ -ms-flex-align: center;
132
+ align-items: center;
133
+ width: 100%;
134
+ height: 40px;
135
+ padding: 0 12px;
136
+ }
137
+ .mc-list-select-panel__card__checkall__inner:hover {
138
+ background: #EAEEFE;
139
+ }
140
+ .mc-list-select-panel__card__checkall__inner .ant-checkbox + span {
141
+ width: calc(100% - 16px);
142
+ padding-right: 0;
143
+ }
144
+ .mc-list-select-panel__card__footer {
145
+ display: -webkit-box;
146
+ display: -ms-flexbox;
147
+ display: flex;
148
+ -webkit-box-align: center;
149
+ -ms-flex-align: center;
150
+ align-items: center;
151
+ -webkit-box-pack: end;
152
+ -ms-flex-pack: end;
153
+ justify-content: flex-end;
154
+ height: 40px;
155
+ padding: 0 7px 0 12px;
156
+ }
157
+ .mc-list-select-panel__card__footer .ant-pagination {
158
+ width: 100%;
159
+ }
160
+ .mc-list-select-panel__card__footer .ant-pagination .ant-pagination-total-text {
161
+ margin-right: auto;
162
+ }
163
+ .mc-list-select-panel__card__footer .ant-pagination .ant-pagination-item-link {
164
+ display: -webkit-box;
165
+ display: -ms-flexbox;
166
+ display: flex;
167
+ -webkit-box-align: center;
168
+ -ms-flex-align: center;
169
+ align-items: center;
170
+ -webkit-box-pack: center;
171
+ -ms-flex-pack: center;
172
+ justify-content: center;
173
+ }
174
+ .mc-list-select-panel__card__footer .ant-pagination .ant-pagination-simple-pager input {
175
+ background: #f0f2f5;
176
+ }
177
+ .mc-list-select-panel__card__footer .ant-pagination .ant-pagination-simple-pager input:not(:hover, :focus) {
178
+ border-color: #f0f2f5;
179
+ }
180
+ .mc-list-select-panel__card__left {
181
+ width: 312px;
182
+ }
183
+ .mc-list-select-panel__card__left .mc-list-select-panel__card__empty {
184
+ margin-top: 60px;
185
+ }
186
+ .mc-list-select-panel__card__right {
187
+ width: 240px;
188
+ }
189
+ .mc-list-select-panel__card__right .mc-list-select-panel__card__empty {
190
+ margin-top: 148px;
191
+ }
192
+ .mc-list-select-panel__options {
193
+ -webkit-box-flex: 1;
194
+ -ms-flex: 1;
195
+ flex: 1;
196
+ overflow: auto;
197
+ }
198
+ .mc-list-select-panel__option {
199
+ -webkit-box-align: center;
200
+ -ms-flex-align: center;
201
+ align-items: center;
202
+ width: 100%;
203
+ height: 40px;
204
+ padding: 0 12px;
205
+ }
206
+ .mc-list-select-panel__option:hover {
207
+ background: #F5F5F5;
208
+ }
209
+ .mc-list-select-panel__option .ant-checkbox + span {
210
+ width: calc(100% - 16px);
211
+ padding-right: 0;
212
+ }
213
+ .mc-list-select-panel__selected-list-wrapper {
214
+ -webkit-box-flex: 1;
215
+ -ms-flex: 1;
216
+ flex: 1;
217
+ padding: 8px;
218
+ overflow: auto;
219
+ }
220
+ .mc-list-select-panel__selected-list {
221
+ display: -webkit-box;
222
+ display: -ms-flexbox;
223
+ display: flex;
224
+ -ms-flex-wrap: wrap;
225
+ flex-wrap: wrap;
226
+ gap: 8px;
227
+ }
228
+ .mc-list-select-panel__selected-item {
229
+ position: relative;
230
+ display: -webkit-box;
231
+ display: -ms-flexbox;
232
+ display: flex;
233
+ -webkit-box-align: center;
234
+ -ms-flex-align: center;
235
+ align-items: center;
236
+ width: 100%;
237
+ height: 40px;
238
+ padding: 0 8px;
239
+ overflow: hidden;
240
+ background: #f5f5f5;
241
+ border-radius: 4px;
242
+ }
243
+ .mc-list-select-panel__selected-item__drag {
244
+ -ms-flex-negative: 0;
245
+ flex-shrink: 0;
246
+ margin-left: -4px;
247
+ color: #8c8c8c;
248
+ }
249
+ .mc-list-select-panel__selected-item__drag:hover {
250
+ background: rgba(38, 38, 38, 0.15) !important;
251
+ cursor: move;
252
+ }
253
+ .mc-list-select-panel__selected-item__remove {
254
+ -ms-flex-negative: 0;
255
+ flex-shrink: 0;
256
+ margin-left: 8px;
257
+ color: #8c8c8c;
258
+ }
259
+ .mc-list-select-panel__selected-item__remove:hover {
260
+ color: #262626;
261
+ cursor: pointer;
262
+ }
263
+ .mc-list-select-panel--disabled {
264
+ position: absolute;
265
+ top: 0;
266
+ right: 0;
267
+ bottom: 0;
268
+ left: 0;
269
+ z-index: 9;
270
+ background: rgba(228, 228, 228, 0.3);
271
+ border-radius: 4px;
272
+ cursor: no-drop;
273
+ }
@@ -0,0 +1,10 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import type { McListSelectProps, McListSelectRef } from './comps/ListSelect';
3
+ import ListSelectPanel from './comps/ListSelectPanel';
4
+ export type { McListSelectProps, McListSelectRef } from './comps/ListSelect';
5
+ export type { McListSelectFetchOptions, McListSelectPanelProps, McListSelectPanelRef, } from './comps/ListSelectPanel';
6
+ type CompoundedComponent = ForwardRefExoticComponent<McListSelectProps & RefAttributes<McListSelectRef>> & {
7
+ Panel: typeof ListSelectPanel;
8
+ };
9
+ declare const McListSelect: CompoundedComponent;
10
+ export default McListSelect;
@@ -0,0 +1,5 @@
1
+ import ListSelect from "./comps/ListSelect";
2
+ import ListSelectPanel from "./comps/ListSelectPanel";
3
+ var McListSelect = ListSelect;
4
+ McListSelect.Panel = ListSelectPanel;
5
+ export default McListSelect;
@@ -0,0 +1 @@
1
+ export declare const mockList: ({ current, pageSize, keyword }: any) => Promise<unknown>;
@@ -0,0 +1,27 @@
1
+ /* 获取备选数据 */
2
+ export var mockList = function mockList(_ref) {
3
+ var current = _ref.current,
4
+ pageSize = _ref.pageSize,
5
+ keyword = _ref.keyword;
6
+ var list = [];
7
+ for (var i = 0; i < 1000; i++) {
8
+ list.push({
9
+ id: 'v' + i,
10
+ name: ((i + 1) % 7 === 0 ? '超长的文本选项一二三四五六七八九十一二三四五六七八九十' : '选项') + i
11
+ });
12
+ }
13
+ var _list = list.filter(function (_ref2) {
14
+ var name = _ref2.name;
15
+ return keyword ? name.includes(keyword) : true;
16
+ });
17
+ return new Promise(function (resolve) {
18
+ setTimeout(function () {
19
+ resolve({
20
+ data: {
21
+ records: _list.slice((current - 1) * pageSize, current * pageSize),
22
+ total: _list.length
23
+ }
24
+ });
25
+ }, 500);
26
+ });
27
+ };