@zykj2024/much-library 1.0.10-beta.9 → 1.0.11

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.
@@ -1,7 +1,33 @@
1
+ .mc-cascader__label {
2
+ color: #262626;
3
+ font-size: 14px;
4
+ position: absolute;
5
+ top: 0;
6
+ left: 11px;
7
+ z-index: 2;
8
+ height: 100%;
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
+ }
16
+ .mc-cascader__label::after {
17
+ content: ':';
18
+ margin-left: 2px;
19
+ }
20
+ .mc-cascader__label.mc-cascader--disabled {
21
+ color: rgba(0, 0, 0, 0.25);
22
+ cursor: no-drop;
23
+ }
1
24
  .mc-cascader__content {
2
25
  width: 100%;
3
26
  height: 100%;
4
27
  }
28
+ .mc-cascader__content.ant-cascader.ant-select .ant-select-selector {
29
+ padding-left: var(--selector-pl);
30
+ }
5
31
  .mc-cascader__content.ant-cascader.ant-select .ant-select-selector .ant-select-selection-overflow-item-rest .ant-select-selection-item {
6
32
  color: #fff;
7
33
  background: #325cf7;
@@ -13,6 +39,12 @@
13
39
  .mc-cascader__content.ant-cascader.ant-select .ant-select-selector .ant-select-selection-item[title*='「'][title$='」'] {
14
40
  color: var(--inexistent-color);
15
41
  }
42
+ .mc-cascader__content.ant-cascader.ant-select.ant-select-single .ant-select-selector .ant-select-selection-search {
43
+ left: var(--selector-pl);
44
+ }
45
+ .mc-cascader__content.ant-cascader.ant-select.ant-select-multiple .ant-select-selector .ant-select-selection-placeholder {
46
+ left: var(--selector-pl);
47
+ }
16
48
  .mc-cascader__content.ant-cascader.ant-select.ant-select-multiple .ant-select-selector .ant-select-selection-search {
17
49
  margin-left: 0;
18
50
  }
@@ -13,7 +13,6 @@ export type McCascaderProps = CascaderProps & {
13
13
  label?: ReactNode;
14
14
  inexistent?: boolean | Inexistent;
15
15
  city?: boolean;
16
- prefix?: string;
17
16
  [key: string]: any;
18
17
  };
19
18
  declare const McCascader: FC<McCascaderProps>;
@@ -2,8 +2,8 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["style", "className", "label", "inexistent", "city", "value", "onChange", "options", "multiple", "disabled", "fieldNames", "maxTagCount", "prefix"];
6
- import { Cascader, Popover } from 'antd';
5
+ var _excluded = ["style", "className", "label", "inexistent", "city", "value", "onChange", "options", "multiple", "disabled", "fieldNames", "maxTagCount"];
6
+ import { Cascader, Divider, Popover } from 'antd';
7
7
  import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
8
8
  import { cityData } from "./city";
9
9
  import "./index.css";
@@ -24,7 +24,6 @@ var McCascader = /*#__PURE__*/forwardRef(function (props, ref) {
24
24
  disabled = props.disabled,
25
25
  fieldNames = props.fieldNames,
26
26
  maxTagCount = props.maxTagCount,
27
- prefix = props.prefix,
28
27
  rest = _objectWithoutProperties(props, _excluded);
29
28
  var _ref = typeof inexistent === 'boolean' ? {} : inexistent,
30
29
  _ref$inexistentText = _ref.inexistentText,
@@ -49,11 +48,27 @@ var McCascader = /*#__PURE__*/forwardRef(function (props, ref) {
49
48
  } : fieldNames;
50
49
  }, [city, fieldNames]);
51
50
 
52
- /* 判断value值是否存在于options中 */
53
- var _useState = useState(),
51
+ /* 获取label宽度 */
52
+ var labelRef = useRef();
53
+ var _useState = useState(11),
54
54
  _useState2 = _slicedToArray(_useState, 2),
55
- cascaderValue = _useState2[0],
56
- setCascaderValue = _useState2[1];
55
+ paddingLeft = _useState2[0],
56
+ setPaddingLeft = _useState2[1];
57
+ var labelResizeObserver = new ResizeObserver(function (entries) {
58
+ setPaddingLeft(entries[0].contentRect.width + 11);
59
+ });
60
+ useEffect(function () {
61
+ labelRef.current && labelResizeObserver.observe(labelRef.current);
62
+ return function () {
63
+ return labelResizeObserver.disconnect();
64
+ };
65
+ }, []);
66
+
67
+ /* 判断value值是否存在于options中 */
68
+ var _useState3 = useState(),
69
+ _useState4 = _slicedToArray(_useState3, 2),
70
+ cascaderValue = _useState4[0],
71
+ setCascaderValue = _useState4[1];
57
72
  var _inexistent = useRef(false);
58
73
  // 获取所有备选项的值列表
59
74
  var _values = useMemo(function () {
@@ -130,32 +145,38 @@ var McCascader = /*#__PURE__*/forwardRef(function (props, ref) {
130
145
  }
131
146
  onChange === null || onChange === void 0 || onChange(_v, _selectedOptions);
132
147
  };
133
- // 原有多余代码,不知缘由,暂时不删
134
- // // 扩展全选功能 (继承原有插槽)
135
- // const dropdownRender = (menus: React.ReactNode,dropdownRender:React.ReactNode) => (
136
- // <div>
137
- // {menus}
138
- // {dropdownRender}
139
- // <Divider style={{ margin: 0 }} />
140
- // <div
141
- // style={{ padding: 8 }}
142
- // onClick={() => {
143
- // // console.log(ref)
144
- // }}>
145
- // 全选
146
- // </div>
147
- // </div>
148
- // )
149
-
150
- return /*#__PURE__*/_jsx("div", {
148
+ // 扩展全选功能 (继承原有插槽)
149
+ var dropdownRender = function dropdownRender(menus, _dropdownRender) {
150
+ return /*#__PURE__*/_jsxs("div", {
151
+ children: [menus, _dropdownRender, /*#__PURE__*/_jsx(Divider, {
152
+ style: {
153
+ margin: 0
154
+ }
155
+ }), /*#__PURE__*/_jsx("div", {
156
+ style: {
157
+ padding: 8
158
+ },
159
+ onClick: function onClick() {
160
+ // console.log(ref)
161
+ },
162
+ children: "\u5168\u9009"
163
+ })]
164
+ });
165
+ };
166
+ return /*#__PURE__*/_jsxs("div", {
151
167
  style: _objectSpread({
168
+ position: label ? 'relative' : 'static',
152
169
  height: multiple ? 'auto' : 32,
170
+ '--selector-pl': "".concat(paddingLeft, "px"),
153
171
  '--inexistent-color': inexistentColor
154
172
  }, style),
155
173
  className: "mc-cascader ".concat(multiple && _maxTagCount === 1 ? 'mc-cascader--inline' : '', " ").concat(className || ''),
156
- children: /*#__PURE__*/_jsx(Cascader, _objectSpread({
174
+ children: [label && /*#__PURE__*/_jsx("span", {
175
+ ref: labelRef,
176
+ className: "mc-cascader__label ".concat(disabled ? 'mc-cascader--disabled' : ''),
177
+ children: label
178
+ }), /*#__PURE__*/_jsx(Cascader, _objectSpread({
157
179
  ref: ref,
158
- prefix: label ? "".concat(label, "\uFF1A") : prefix ? prefix : undefined,
159
180
  className: "mc-cascader__content",
160
181
  value: cascaderValue,
161
182
  onChange: change,
@@ -194,7 +215,7 @@ var McCascader = /*#__PURE__*/forwardRef(function (props, ref) {
194
215
  })
195
216
  });
196
217
  }
197
- }, rest))
218
+ }, rest))]
198
219
  });
199
220
  });
200
221
  export default McCascader;
@@ -2,18 +2,17 @@
2
2
  position: relative;
3
3
  }
4
4
  .mc-container__ceiling {
5
- width: calc(100% - 40px);
5
+ width: calc(100% - 48px);
6
6
  height: 24px;
7
7
  position: absolute;
8
8
  top: 0;
9
- left: 16px;
9
+ left: 24px;
10
10
  z-index: 9;
11
11
  }
12
12
  .mc-container__wrapper {
13
13
  height: 100%;
14
- padding: 24px 24px 50px 16px;
15
- overflow-y: auto;
16
- border-top-right-radius: 12px;
14
+ padding: 24px 24px 64px;
15
+ overflow: auto;
17
16
  }
18
17
  .mc-container__query {
19
18
  display: -webkit-box;
@@ -28,7 +27,7 @@
28
27
  .mc-container__query .mc-select,
29
28
  .mc-container__query .mc-cascader,
30
29
  .mc-container__query .mc-input-number {
31
- width: 270px;
30
+ width: 280px;
32
31
  }
33
32
  .mc-container__query .mc-date-range {
34
33
  width: 330px;
@@ -114,11 +113,11 @@
114
113
  transition: all 0.3s;
115
114
  }
116
115
  .mc-container__pagination {
117
- padding: 8px 0 16px;
116
+ padding: 16px 0 24px;
118
117
  margin: 0 !important;
119
- width: calc(100% - 40px);
118
+ width: calc(100% - 48px);
120
119
  position: absolute;
121
- left: 16px;
120
+ left: 24px;
122
121
  bottom: 0;
123
122
  z-index: 9;
124
123
  }
@@ -1,15 +1,11 @@
1
1
  import { TableProps } from 'antd';
2
2
  import { CSSProperties, FC, ReactElement, ReactNode } from 'react';
3
3
  import './index.less';
4
- export type McContainerPropsType = {
4
+ export type PropsType = {
5
5
  style?: CSSProperties;
6
6
  className?: string;
7
7
  height?: string;
8
8
  backgroundColor?: string;
9
- /**
10
- * 是否展示头部遮罩,默认显示
11
- */
12
- showCell?: boolean;
13
9
  immediateQuery?: boolean;
14
10
  loading?: boolean;
15
11
  queryItems?: ReactElement;
@@ -34,8 +30,6 @@ export type McContainerPropsType = {
34
30
  onCancel?: () => void;
35
31
  tableProps?: TableProps<any>;
36
32
  tableRender?: ReactNode;
37
- /** 折叠事件的回调 */
38
- onCollapse?: (v: boolean) => void;
39
33
  [key: string]: any;
40
34
  };
41
35
  export type McContainerRef = {
@@ -51,5 +45,5 @@ export type McContainerRef = {
51
45
  getQueryParams: () => any;
52
46
  resetQueryParams: () => void;
53
47
  };
54
- declare const McContainer: FC<McContainerPropsType>;
48
+ declare const McContainer: FC<PropsType>;
55
49
  export default McContainer;
@@ -15,8 +15,6 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
15
15
  height = _props$height === void 0 ? 'calc(100vh - 88px)' : _props$height,
16
16
  _props$backgroundColo = props.backgroundColor,
17
17
  backgroundColor = _props$backgroundColo === void 0 ? '#ffffff' : _props$backgroundColo,
18
- _props$showCell = props.showCell,
19
- showCell = _props$showCell === void 0 ? true : _props$showCell,
20
18
  _props$immediateQuery = props.immediateQuery,
21
19
  immediateQuery = _props$immediateQuery === void 0 ? true : _props$immediateQuery,
22
20
  _props$loading = props.loading,
@@ -38,8 +36,7 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
38
36
  batchBtns = props.batchBtns,
39
37
  onCancel = props.onCancel,
40
38
  tableProps = props.tableProps,
41
- tableRender = props.tableRender,
42
- onCollapse = props.onCollapse;
39
+ tableRender = props.tableRender;
43
40
  var _useState = useState(false),
44
41
  _useState2 = _slicedToArray(_useState, 2),
45
42
  collapse = _useState2[0],
@@ -70,9 +67,6 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
70
67
  return actionBarResizeObserver.disconnect();
71
68
  };
72
69
  }, []);
73
- useEffect(function () {
74
- onCollapse === null || onCollapse === void 0 || onCollapse(collapse);
75
- }, [collapse]);
76
70
 
77
71
  // 为设置过name属性的查询项添加value属性和onChange事件,从而收集查询项的值(查询项自身已绑定value属性的除外,需自行编写相关业务逻辑代码进行状态管理)
78
72
  var mapQuerys = function mapQuerys(items) {
@@ -271,7 +265,7 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
271
265
  height: height,
272
266
  backgroundColor: backgroundColor
273
267
  }, style),
274
- children: [showCell && /*#__PURE__*/_jsx("div", {
268
+ children: [/*#__PURE__*/_jsx("div", {
275
269
  className: "mc-container__ceiling",
276
270
  style: {
277
271
  backgroundColor: backgroundColor
@@ -279,7 +273,7 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
279
273
  }), /*#__PURE__*/_jsxs("div", {
280
274
  className: "mc-container__wrapper",
281
275
  style: {
282
- paddingBottom: tableRender || tableRender === null || (tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination) === false ? 16 : 50
276
+ paddingBottom: tableRender || tableRender === null || (tableProps === null || tableProps === void 0 ? void 0 : tableProps.pagination) === false ? 24 : 64
283
277
  },
284
278
  children: [queryRender || queryRender === null ? queryRender : /*#__PURE__*/_jsxs("div", {
285
279
  className: "mc-container__query",
@@ -306,8 +300,7 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
306
300
  style: {
307
301
  marginLeft: 16,
308
302
  fontSize: 12,
309
- padding: 0,
310
- gap: 4
303
+ padding: 0
311
304
  },
312
305
  onClick: function onClick() {
313
306
  return setCollapse(function (os) {
@@ -316,7 +309,8 @@ var McContainer = /*#__PURE__*/forwardRef(function (props, ref) {
316
309
  },
317
310
  children: [collapse ? '展开' : '收起', /*#__PURE__*/_jsx(DoubleLeftOutlined, {
318
311
  style: {
319
- fontSize: 12
312
+ fontSize: 12,
313
+ marginLeft: 2
320
314
  },
321
315
  rotate: collapse ? -90 : 90
322
316
  })]
@@ -10,7 +10,7 @@ declare const shortcutValueMap: {
10
10
  last60days: string[];
11
11
  last90days: string[];
12
12
  };
13
- export declare const SHORTCUT_VALUE_MAP: typeof shortcutValueMap & {
13
+ export declare const SHORTCUTprivateValue_MAP: typeof shortcutValueMap & {
14
14
  [key: string]: any;
15
15
  };
16
16
  export type McDateRangeProps = Omit<RangePickerProps, 'value' | 'onChange'> & {
@@ -18,7 +18,7 @@ var shortcutValueMap = {
18
18
  last60days: [dayjs().add(-59, 'd').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')],
19
19
  last90days: [dayjs().add(-89, 'd').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
20
20
  };
21
- export var SHORTCUT_VALUE_MAP = shortcutValueMap;
21
+ export var SHORTCUTprivateValue_MAP = shortcutValueMap;
22
22
  var McDateRange = /*#__PURE__*/forwardRef(function (props, ref) {
23
23
  var style = props.style,
24
24
  className = props.className,
@@ -42,28 +42,3 @@
42
42
  color: #b3b3b3;
43
43
  font-size: 12px;
44
44
  }
45
- .mc-input .ant-input-wrapper .ant-input-group-addon:nth-child(1)::after,
46
- .mc-input .ant-input-wrapper .ant-input-group-addon:nth-last-child(1)::before {
47
- content: '';
48
- position: absolute;
49
- top: 50%;
50
- /* 居中对齐 */
51
- -webkit-transform: translateY(-50%);
52
- -ms-transform: translateY(-50%);
53
- transform: translateY(-50%);
54
- /* 垂直居中 */
55
- height: 50%;
56
- /* 竖线高度为输入框高度的 50% */
57
- width: 1px;
58
- /* 竖线宽度 */
59
- background-color: #d8d8d8;
60
- /* 竖线颜色 */
61
- }
62
- .mc-input .ant-input-wrapper .ant-input-group-addon:nth-child(1)::after {
63
- right: 0;
64
- /* 定位到右侧 */
65
- }
66
- .mc-input .ant-input-wrapper .ant-input-group-addon:nth-last-child(1)::before {
67
- left: 0;
68
- /* 定位到右侧 */
69
- }
@@ -130,7 +130,6 @@ export default (function () {
130
130
  return _ref3.apply(this, arguments);
131
131
  };
132
132
  }()),
133
- searchInPanel: true,
134
133
  multiple: true,
135
134
  onChange: setMultipleValue
136
135
  }), /*#__PURE__*/_jsx(McSelect, {
@@ -1,7 +1,33 @@
1
+ .mc-select__label {
2
+ color: #262626;
3
+ font-size: 14px;
4
+ position: absolute;
5
+ top: 0;
6
+ left: 11px;
7
+ z-index: 2;
8
+ height: 100%;
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
+ }
16
+ .mc-select__label::after {
17
+ content: ':';
18
+ margin-left: 2px;
19
+ }
20
+ .mc-select__label.mc-select--disabled {
21
+ color: rgba(0, 0, 0, 0.25);
22
+ cursor: no-drop;
23
+ }
1
24
  .mc-select__content {
2
25
  width: 100%;
3
26
  height: 100%;
4
27
  }
28
+ .mc-select__content.ant-select .ant-select-selector {
29
+ padding-left: var(--selector-pl);
30
+ }
5
31
  .mc-select__content.ant-select .ant-select-selector .ant-select-selection-overflow-item-rest .ant-select-selection-item {
6
32
  color: #fff;
7
33
  background: #325cf7;
@@ -13,6 +39,12 @@
13
39
  .mc-select__content.ant-select .ant-select-selector .ant-select-selection-item[title*='「'][title$='」'] {
14
40
  color: var(--inexistent-color);
15
41
  }
42
+ .mc-select__content.ant-select.ant-select-single .ant-select-selector .ant-select-selection-search {
43
+ left: var(--selector-pl);
44
+ }
45
+ .mc-select__content.ant-select.ant-select-multiple .ant-select-selector .ant-select-selection-placeholder {
46
+ left: var(--selector-pl);
47
+ }
16
48
  .mc-select__content.ant-select.ant-select-multiple .ant-select-selector .ant-select-selection-search {
17
49
  margin-left: 0;
18
50
  }
@@ -25,7 +25,6 @@ export type FetchOptions = (params: {
25
25
  export type McSelectProps = Omit<SelectProps, 'mode' | 'fieldNames'> & {
26
26
  style?: CSSProperties;
27
27
  className?: string;
28
- /** 外部控制展示的options */
29
28
  toFilterOptions?: (options: Option[]) => Option[];
30
29
  name?: string;
31
30
  label?: ReactNode;
@@ -36,14 +35,6 @@ export type McSelectProps = Omit<SelectProps, 'mode' | 'fieldNames'> & {
36
35
  pageSize?: number;
37
36
  extra?: any;
38
37
  options?: Option[];
39
- /** 仅多选生效。默认为false,在下拉框中展示搜索框,会影响回车生成新标签等功能 */
40
- searchInPanel?: boolean;
41
- /** 搜索框提示文字 */
42
- searchInPanelPlaceholder?: string;
43
- /** 仅多选+("非远程"或"远程+labelvalue"")生效。默认为false,将选中项置顶。 */
44
- pinSelectedOptions?: boolean;
45
- /** antd 5.22.0新加的属性 */
46
- prefix?: string;
47
38
  };
48
39
  declare const McSelect: FC<McSelectProps>;
49
40
  export default McSelect;
@@ -3,45 +3,13 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
7
- import _typeof from "@babel/runtime/helpers/esm/typeof";
8
- var _excluded = ["style", "className", "label", "multiple", "changeOnHidden", "inexistent", "fetchOptions", "pageSize", "extra", "value", "onChange", "labelInValue", "options", "disabled", "maxTagCount", "onSearch", "onPopupScroll", "onBlur", "onDropdownVisibleChange", "toFilterOptions", "searchInPanel", "pinSelectedOptions", "searchInPanelPlaceholder", "prefix"];
6
+ var _excluded = ["style", "className", "label", "multiple", "changeOnHidden", "inexistent", "fetchOptions", "pageSize", "extra", "value", "onChange", "labelInValue", "options", "disabled", "maxTagCount", "onSearch", "onPopupScroll", "onBlur", "onDropdownVisibleChange", "toFilterOptions"];
9
7
  import { Empty, Popover, Select, Spin } from 'antd';
10
8
  import { debounce } from "../Utils";
11
9
  import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
12
- import PanelSearchInput from "./components/PanelSearchInput";
13
10
  import "./index.css";
14
11
  import { jsx as _jsx } from "react/jsx-runtime";
15
- import { Fragment as _Fragment } from "react/jsx-runtime";
16
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
- // 将已选的option置顶
18
- var createPinedSelectedOptions = function createPinedSelectedOptions(options, selectedValues) {
19
- if (!options || options.length === 0) return [];
20
- if (!selectedValues || selectedValues.length === 0) return options;
21
- var isLabelInValue = _typeof(selectedValues[0]) === 'object';
22
- if (isLabelInValue) {
23
- var unselectedOptions = options.filter(function (o) {
24
- return !selectedValues.some(function (v) {
25
- return v.value === o.value;
26
- });
27
- });
28
- return [].concat(_toConsumableArray(selectedValues), _toConsumableArray(unselectedOptions));
29
- } else {
30
- var _options$filter;
31
- // options中找不到的就不展示
32
- var selectedOptions = selectedValues.map(function (v) {
33
- return options.find(function (o) {
34
- return o.value === v;
35
- });
36
- }).filter(function (o) {
37
- return Boolean(o);
38
- });
39
- var _unselectedOptions = (_options$filter = options.filter(function (x) {
40
- return !selectedValues.includes(x.value);
41
- })) !== null && _options$filter !== void 0 ? _options$filter : [];
42
- return [].concat(_toConsumableArray(selectedOptions), _toConsumableArray(_unselectedOptions));
43
- }
44
- };
45
13
  var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
46
14
  var style = props.style,
47
15
  className = props.className,
@@ -65,12 +33,6 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
65
33
  onBlur = props.onBlur,
66
34
  onDropdownVisibleChange = props.onDropdownVisibleChange,
67
35
  toFilterOptions = props.toFilterOptions,
68
- _props$searchInPanel = props.searchInPanel,
69
- searchInPanel = _props$searchInPanel === void 0 ? false : _props$searchInPanel,
70
- _props$pinSelectedOpt = props.pinSelectedOptions,
71
- pinSelectedOptions = _props$pinSelectedOpt === void 0 ? false : _props$pinSelectedOpt,
72
- searchInPanelPlaceholder = props.searchInPanelPlaceholder,
73
- prefix = props.prefix,
74
36
  rest = _objectWithoutProperties(props, _excluded);
75
37
  var _ref = typeof inexistent === 'boolean' ? {} : inexistent,
76
38
  _ref$inexistentText = _ref.inexistentText,
@@ -83,25 +45,41 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
83
45
  return props.hasOwnProperty('maxTagCount') ? maxTagCount : 1;
84
46
  }, [maxTagCount]);
85
47
 
86
- /* 基础数据 */
87
- var _useState = useState(),
48
+ /* 获取label宽度 */
49
+ var labelRef = useRef();
50
+ var _useState = useState(11),
88
51
  _useState2 = _slicedToArray(_useState, 2),
89
- selectValue = _useState2[0],
90
- setSelectValue = _useState2[1];
91
- var _selectValue = useRef();
92
- var _useState3 = useState([]),
52
+ paddingLeft = _useState2[0],
53
+ setPaddingLeft = _useState2[1];
54
+ var labelResizeObserver = new ResizeObserver(function (entries) {
55
+ setPaddingLeft(entries[0].contentRect.width + 11);
56
+ });
57
+ useEffect(function () {
58
+ labelRef.current && labelResizeObserver.observe(labelRef.current);
59
+ return function () {
60
+ return labelResizeObserver.disconnect();
61
+ };
62
+ }, []);
63
+
64
+ /* 基础数据 */
65
+ var _useState3 = useState(),
93
66
  _useState4 = _slicedToArray(_useState3, 2),
94
- selectOptions = _useState4[0],
95
- setSelectOptions = _useState4[1];
96
- var _selectOptions = useRef([]);
97
- var _useState5 = useState(''),
67
+ selectValue = _useState4[0],
68
+ setSelectValue = _useState4[1];
69
+ var _selectValue = useRef();
70
+ var _useState5 = useState([]),
98
71
  _useState6 = _slicedToArray(_useState5, 2),
99
- searchValue = _useState6[0],
100
- setSearchValue = _useState6[1];
101
- var _useState7 = useState(false),
72
+ selectOptions = _useState6[0],
73
+ setSelectOptions = _useState6[1];
74
+ var _selectOptions = useRef([]);
75
+ var _useState7 = useState(''),
102
76
  _useState8 = _slicedToArray(_useState7, 2),
103
- fetching = _useState8[0],
104
- setFetching = _useState8[1];
77
+ searchValue = _useState8[0],
78
+ setSearchValue = _useState8[1];
79
+ var _useState9 = useState(false),
80
+ _useState10 = _slicedToArray(_useState9, 2),
81
+ fetching = _useState10[0],
82
+ setFetching = _useState10[1];
105
83
  var _extra = useRef(null);
106
84
  var _current = useRef(1);
107
85
  var _maxPage = useRef(1);
@@ -110,19 +88,7 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
110
88
  var _oldValue = useRef();
111
89
  var _changeOption = useRef();
112
90
  var _inexistent = useRef(false);
113
- var panelSearchInputRef = useRef(null);
114
- var useDefaultSearch = !(multiple && searchInPanel);
115
- var optionWithPriority = useMemo(function () {
116
- if (pinSelectedOptions && multiple) {
117
- if (fetchOptions && !labelInValue) {
118
- console.warn('远程搜索下,pinSelectedOptions只支持labelInValue模式,建议修改');
119
- } else {
120
- return createPinedSelectedOptions(selectOptions, selectValue);
121
- }
122
- }
123
- return selectOptions;
124
- }, [selectOptions, selectValue]);
125
- var filteredOptions = toFilterOptions ? toFilterOptions(optionWithPriority) : optionWithPriority; // 只要有render就需要重新生成options
91
+ var filteredOptions = toFilterOptions ? toFilterOptions(selectOptions) : selectOptions; // 只要有render就需要重新生成options
126
92
 
127
93
  // 监听值和备选项的变化(赋值备选项,执行不存在值的判断逻辑)
128
94
  useEffect(function () {
@@ -250,7 +216,7 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
250
216
 
251
217
  // 文本框值变化时回调
252
218
  var search = function search(v) {
253
- var _v = (v === null || v === void 0 ? void 0 : v.trim()) || '';
219
+ var _v = v.trim();
254
220
  setSearchValue(_v);
255
221
  if (fetchOptions) {
256
222
  debounceSearcher(_v, 1);
@@ -290,16 +256,13 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
290
256
  }
291
257
  onPopupScroll === null || onPopupScroll === void 0 || onPopupScroll(e);
292
258
  };
293
- var clearSearchData = function clearSearchData() {
294
- setSearchValue('');
295
- loadOptions('', 1);
296
- };
297
259
 
298
260
  // 失去焦点时的回调(若为异步分页查询,需重置查询)
299
261
  var blur = function blur(e) {
300
262
  // 若当前文本框有值,则清空文本框并重置查询
301
- if (useDefaultSearch && searchValue) {
302
- clearSearchData();
263
+ if (searchValue) {
264
+ setSearchValue('');
265
+ loadOptions('', 1);
303
266
  }
304
267
  onBlur === null || onBlur === void 0 || onBlur(e);
305
268
  };
@@ -316,57 +279,30 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
316
279
  }
317
280
  }
318
281
  }
319
- // 新版搜索交互逻辑
320
- if (!useDefaultSearch) {
321
- if (open) {
322
- var _panelSearchInputRef$;
323
- (_panelSearchInputRef$ = panelSearchInputRef.current) === null || _panelSearchInputRef$ === void 0 || _panelSearchInputRef$.focus();
324
- } else if (searchValue) {
325
- // 避免界面抖动
326
- setTimeout(clearSearchData, 200);
327
- }
328
- }
329
282
  onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(open);
330
283
  };
331
- var renderDropdownPanel = function renderDropdownPanel(menu) {
332
- if (!multiple || !searchInPanel) {
333
- return menu;
334
- }
335
- return /*#__PURE__*/_jsxs(_Fragment, {
336
- children: [/*#__PURE__*/_jsx(PanelSearchInput, {
337
- ref: panelSearchInputRef,
338
- placeholder: searchInPanelPlaceholder,
339
- searchValue: searchValue,
340
- onSearch: search
341
- }), menu, filteredOptions.length > 0 && fetching && /*#__PURE__*/_jsx("div", {
342
- style: {
343
- color: '#999',
344
- fontSize: 12,
345
- textAlign: 'center'
346
- },
347
- children: "\u52A0\u8F7D\u4E2D..."
348
- })]
349
- });
350
- };
351
- return /*#__PURE__*/_jsx("div", {
284
+ return /*#__PURE__*/_jsxs("div", {
352
285
  style: _objectSpread({
353
286
  position: label ? 'relative' : 'static',
354
287
  height: multiple ? 'auto' : 32,
288
+ '--selector-pl': "".concat(paddingLeft, "px"),
355
289
  '--inexistent-color': inexistentColor
356
290
  }, style),
357
291
  className: "mc-select ".concat(multiple && _maxTagCount === 1 ? 'mc-select--inline' : '', " ").concat(className || ''),
358
- children: /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
292
+ children: [label && /*#__PURE__*/_jsx("span", {
293
+ ref: labelRef,
294
+ className: "mc-select__label ".concat(disabled ? 'mc-select--disabled' : ''),
295
+ children: label
296
+ }), /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
359
297
  ref: ref,
360
298
  className: "mc-select__content",
361
299
  value: selectValue,
362
- prefix: label ? "".concat(label, "\uFF1A") : prefix ? prefix : undefined,
363
300
  onChange: change,
364
301
  labelInValue: labelInValue,
365
302
  options: filteredOptions,
366
303
  disabled: disabled,
367
304
  placeholder: "\u8BF7\u9009\u62E9",
368
- showSearch: useDefaultSearch // 否则会和panel中的search冲突
369
- ,
305
+ showSearch: true,
370
306
  optionFilterProp: "label",
371
307
  allowClear: true,
372
308
  maxTagCount: _maxTagCount,
@@ -396,8 +332,8 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
396
332
  });
397
333
  },
398
334
  filterOption: fetchOptions ? false : true,
399
- searchValue: useDefaultSearch ? searchValue : undefined,
400
- onSearch: useDefaultSearch ? search : undefined,
335
+ searchValue: searchValue,
336
+ onSearch: search,
401
337
  loading: fetching,
402
338
  notFoundContent: fetching ? /*#__PURE__*/_jsx(Spin, {
403
339
  size: "small"
@@ -406,12 +342,11 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
406
342
  }),
407
343
  onPopupScroll: popupScroll,
408
344
  onBlur: blur,
409
- onDropdownVisibleChange: dropdownVisibleChange,
410
- dropdownRender: renderDropdownPanel
345
+ onDropdownVisibleChange: dropdownVisibleChange
411
346
  }, rest), {}, {
412
347
  mode: multiple ? 'multiple' : undefined,
413
348
  fieldNames: undefined
414
- }))
349
+ }))]
415
350
  });
416
351
  });
417
352
  export default McSelect;
@@ -33,7 +33,7 @@
33
33
  "Radio": {
34
34
  "buttonLineBg": "rgb(216, 216, 216)",
35
35
  "buttonLineHeight": 16,
36
- "buttonCheckedBorderColorDisabled": "rgb(216, 216, 216)"
36
+ "buttonCheckedBorderColorDisabled": "#B3B3B3"
37
37
  }
38
38
  }
39
39
  }
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject;
3
3
  // @ts-nocheck
4
4
  import { createGlobalStyle } from 'antd-style';
5
- var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n// <====================== Layout ======================>\n\n", "\n\n// <====================== Font ======================>\n\n@font-face {\n font-family: 'SourceHanSansCN';\n src: url(", ");\n}\n\nbody * {\n font-family: 'SourceHanSansCN';\n}\n\n// <====================== Button ======================>\n\n// primary\n.ant-btn-primary[disabled]{\n background: ", ";\n color: ", ";\n opacity: 0.3;\n}\n\n// default\n.ant-btn-default[disabled] {\n border-color: ", " !important;\n}\n\n// danger\n.ant-btn-default.ant-btn-dangerous,.ant-btn-default[data-danger],\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n color: ", ";\n background: ", ";\n border-color:", ";\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color:", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n opacity: 0.4;\n}\n\n// secondary\n.ant-btn-default[data-secondary],\n// modal\u3001drawer\u3001popconfirm footer\n.ant-modal-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-drawer-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-popconfirm-buttons .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous){\n background: ", ";\n border-color: ", ";\n\n &:hover {\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n border-color: ", " !important;\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-secondary][disabled] {\n color: ", " ;\n background: ", ";\n border-color: ", " !important;\n\n &:hover {\n color: ", ";\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// add\n.ant-btn-default[data-add] {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-add][disabled] {\n opacity: 0.4;\n color: ", ";\n\n &:hover {\n background: ", " !important;\n color: ", " !important;\n }\n\n &:active{\n background: ", " !important;\n color: ", " !important;\n }\n}\n\n//dashed\n.ant-btn-dashed {\n background: ", " !important;\n border-color: ", " !important;\n}\n\n.ant-btn-dashed:not([disabled]) {\n &:hover {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// dashed danger\n.ant-btn-dashed.ant-btn-dangerous,\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n opacity: 0.4;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// ghost\n.ant-btn-background-ghost:not([disabled]) {\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// link\n.ant-btn-link:not([disabled]) {\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n\n }\n}\n\n.ant-btn-link[disabled] {\n color: ", " !important;\n opacity: 0.3;\n}\n\n// link danger\n.ant-btn-link.ant-btn-dangerous {\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n\n.ant-btn-link.ant-btn-dangerous:disabled {\n color: ", " !important;\n opacity: 0.3;\n}\n\n\n\n// <====================== Drawer ======================>\n\n.ant-drawer .ant-drawer-header{\n border-bottom: none;\n padding: 23px 24px;\n .ant-drawer-header-title {\n flex-direction: row-reverse;\n .ant-drawer-close {\n margin: -4px;\n }\n }\n}\n// Drawer \u5BBD\u9AD8 \u4E1A\u52A1\u65B9\u81EA\u884C\u5B9E\u73B0\n//.ant-drawer .ant-drawer-content-wrapper {\n// min-width: 480px\n//}\n.ant-drawer .ant-drawer-body{\n padding: 0 24px;\n}\n.ant-drawer .ant-drawer-footer{\n border-top: none;\n padding: 24px;\n}\n\n// <====================== Modal ======================>\n\n.ant-modal .ant-modal-header {\n margin-bottom:24px;\n}\n\n.ant-modal-body {\n overflow-y: auto\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1280px\u4E14\u5C0F\u4E8E1366px\u7684\u65F6\u5019\u6267\u884C,1280-1366*/\n@media screen and (min-width:1280px) and (max-width: 1366px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 80px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 40px;\n }\n }\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1440px\u4E14\u5C0F\u4E8E1600px\u7684\u65F6\u5019\u6267\u884C,1440-1600*/\n@media screen and (min-width:1440px) and (max-width:1600px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 80px;\n }\n }\n}\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1680px\u4E14\u5C0F\u4E8E1920px\u7684\u65F6\u5019\u6267\u884C,1680-1920*/\n@media screen and (min-width:1680px) and (max-width:2560px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 150px;\n }\n }\n}\n\n// <====================== Tabs ======================>\n\n.ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n text-shadow: unset;\n}\n.ant-tabs-card {\n .ant-tabs-nav {\n margin: 0;\n &::before {\n border: none;\n }\n .ant-tabs-nav-wrap {\n background: transparent;\n .ant-tabs-nav-list {\n background: ", ";\n border-top-right-radius: ", "px;\n .ant-tabs-tab {\n position: relative;\n border: ", ";\n border-radius: ", "px ", "px 0px 0px;\n &::after {\n position: absolute;\n top: 11px;\n right: -1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-nav-add {\n position: relative;\n border: none;\n border-top-right-radius: ", "px;\n &::before {\n position: absolute;\n top: 11px;\n left: 1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-tab-active {\n border: ", ";\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:nth-last-of-type(2) {\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:has(+ .ant-tabs-tab-active) {\n &::after {\n display: none;\n }\n }\n }\n }\n }\n}\n\n// <====================== Pagination ======================>\n\n.ant-pagination {\n display: flex;\n align-items: center;\n\n .ant-pagination-total-text {\n margin-right: auto;\n color: ", ";\n }\n\n .ant-pagination-item.ant-pagination-item-active {\n &:hover {\n border-color: ", ";\n }\n\n &>a {\n color: ", ";\n }\n }\n\n .ant-pagination-options {\n .ant-pagination-options-quick-jumper {\n input {\n background: ", ";\n border-color: ", ";\n padding: 12px;\n\n &:hover {\n border-color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n }\n }\n }\n }\n\n &.ant-pagination-mini li:not(:first-of-type) {\n margin-left: 2px;\n }\n}\n\n// <====================== Radio ======================>\n .ant-radio-group {\n .ant-radio-button-wrapper {\n position: relative;\n border: 1px solid ", ";\n &::before {\n display: none;\n }\n &::after {\n display: inline-block;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 1px;\n height: ", "px;\n background: ", ";\n right: -1px;\n content: '';\n }\n }\n .ant-radio-button-wrapper-checked {\n border: 1px solid ", ";\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:nth-last-of-type(1) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:has(+ .ant-radio-button-wrapper-checked) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper-disabled {\n border: 1px solid ", " !important;\n }\n .ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked {\n border-color: ", " !important;\n }\n}\n// <====================== Collapse ======================>\n.ant-collapse .ant-collapse-content {\n border-top-width: 0px;\n}\n"])), function (props) {
5
+ var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n// <====================== Layout ======================>\n\n", "\n\n// <====================== Font ======================>\n\n@font-face {\n font-family: 'SourceHanSansCN';\n src: url(", ");\n}\n\nbody * {\n font-family: 'SourceHanSansCN';\n}\n\n// <====================== Button ======================>\n\n// primary\n.ant-btn-primary[disabled]{\n background: ", ";\n color: ", ";\n opacity: 0.3;\n}\n\n// default\n.ant-btn-default[disabled] {\n border-color: ", " !important;\n}\n\n// danger\n.ant-btn-default.ant-btn-dangerous,.ant-btn-default[data-danger],\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n color: ", ";\n background: ", ";\n border-color:", ";\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color:", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n opacity: 0.4;\n}\n\n// secondary\n.ant-btn-default[data-secondary],\n// modal\u3001drawer\u3001popconfirm footer\n.ant-modal-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-drawer-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-popconfirm-buttons .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous){\n background: ", ";\n border-color: ", ";\n\n &:hover {\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n border-color: ", " !important;\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-secondary][disabled] {\n color: ", " ;\n background: ", ";\n border-color: ", " !important;\n\n &:hover {\n color: ", ";\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// add\n.ant-btn-default[data-add] {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-add][disabled] {\n opacity: 0.4;\n color: ", ";\n\n &:hover {\n background: ", " !important;\n color: ", " !important;\n }\n\n &:active{\n background: ", " !important;\n color: ", " !important;\n }\n}\n\n//dashed\n.ant-btn-dashed {\n background: ", " !important;\n border-color: ", " !important;\n}\n\n.ant-btn-dashed:not([disabled]) {\n &:hover {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// dashed danger\n.ant-btn-dashed.ant-btn-dangerous,\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n opacity: 0.4;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// ghost\n.ant-btn-background-ghost:not([disabled]) {\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// link\n.ant-btn-link:not([disabled]) {\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n\n }\n}\n\n.ant-btn-link[disabled] {\n color: ", " !important;\n opacity: 0.3;\n}\n\n// link danger\n.ant-btn-link.ant-btn-dangerous {\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n\n.ant-btn-link.ant-btn-dangerous:disabled {\n color: ", " !important;\n opacity: 0.3;\n}\n\n\n\n// <====================== Drawer ======================>\n\n.ant-drawer .ant-drawer-header{\n border-bottom: none;\n padding: 23px 24px;\n .ant-drawer-header-title {\n flex-direction: row-reverse;\n .ant-drawer-close {\n margin: -4px;\n }\n }\n}\n// Drawer \u5BBD\u9AD8 \u4E1A\u52A1\u65B9\u81EA\u884C\u5B9E\u73B0\n//.ant-drawer .ant-drawer-content-wrapper {\n// min-width: 480px\n//}\n.ant-drawer .ant-drawer-body{\n padding: 0 24px;\n}\n.ant-drawer .ant-drawer-footer{\n border-top: none;\n padding: 24px;\n}\n\n// <====================== Modal ======================>\n\n.ant-modal .ant-modal-header {\n margin-bottom:24px;\n}\n\n.ant-modal-body {\n overflow-y: auto\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1280px\u4E14\u5C0F\u4E8E1366px\u7684\u65F6\u5019\u6267\u884C,1280-1366*/\n@media screen and (min-width:1280px) and (max-width: 1366px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 80px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 40px;\n }\n }\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1440px\u4E14\u5C0F\u4E8E1600px\u7684\u65F6\u5019\u6267\u884C,1440-1600*/\n@media screen and (min-width:1440px) and (max-width:1600px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 80px;\n }\n }\n}\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1680px\u4E14\u5C0F\u4E8E1920px\u7684\u65F6\u5019\u6267\u884C,1680-1920*/\n@media screen and (min-width:1680px) and (max-width:2560px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 150px;\n }\n }\n}\n\n// <====================== Tabs ======================>\n\n.ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n text-shadow: unset;\n}\n.ant-tabs-card {\n .ant-tabs-nav {\n &::before {\n border: none;\n }\n .ant-tabs-nav-wrap {\n background: transparent;\n .ant-tabs-nav-list {\n background: ", ";\n border-top-right-radius: ", "px;\n .ant-tabs-tab {\n position: relative;\n border: ", ";\n border-radius: ", "px ", "px 0px 0px;\n &::after {\n position: absolute;\n top: 11px;\n right: -1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-nav-add {\n position: relative;\n border: none;\n border-top-right-radius: ", "px;\n &::before {\n position: absolute;\n top: 11px;\n left: 1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-tab-active {\n border: ", ";\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:nth-last-of-type(2) {\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:has(+ .ant-tabs-tab-active) {\n &::after {\n display: none;\n }\n }\n }\n }\n }\n}\n\n// <====================== Pagination ======================>\n\n.ant-pagination {\n display: flex;\n\n .ant-pagination-total-text {\n margin-right: auto;\n color: ", ";\n }\n\n .ant-pagination-item.ant-pagination-item-active {\n &:hover {\n border-color: ", ";\n }\n\n &>a {\n color: ", ";\n }\n }\n\n &.ant-pagination-mini li:not(:first-of-type) {\n margin-left: 2px;\n }\n}\n\n// <====================== Radio ======================>\n .ant-radio-group {\n .ant-radio-button-wrapper {\n position: relative;\n border: 1px solid ", ";\n &::before {\n display: none;\n }\n &::after {\n display: inline-block;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 1px;\n height: ", "px;\n background: ", ";\n right: -1px;\n content: '';\n }\n }\n .ant-radio-button-wrapper-checked {\n border: 1px solid ", ";\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:nth-last-of-type(1) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:has(+ .ant-radio-button-wrapper-checked) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper-disabled {\n border: 1px solid ", " !important;\n }\n .ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked {\n border-color: ", " !important;\n }\n}\n"])), function (props) {
6
6
  return props.layout;
7
7
  }, function (props) {
8
8
  return props.font.Regular;
@@ -154,14 +154,6 @@ var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _tagge
154
154
  return props.theme.CustomToken.Pagination.itemActiveHoverBorderColor;
155
155
  }, function (props) {
156
156
  return props.theme.CustomToken.Pagination.itemActiveColor;
157
- }, function (props) {
158
- return props.theme.Input.colorBgContainer;
159
- }, function (props) {
160
- return props.theme.Input.colorBorder;
161
- }, function (props) {
162
- return props.theme.Input.hoverBorderColor;
163
- }, function (props) {
164
- return props.theme.Input.hoverBorderColor;
165
157
  }, function (props) {
166
158
  return props.theme.Radio.buttonBg;
167
159
  }, function (props) {
@@ -1,2 +1,2 @@
1
- declare const _default: "\n/* =========== 布局样式 =========== */\n.ant-pro-layout {\n\n /* 侧边菜单 */\n .ant-pro-sider {\n padding: 8px 0 16px 16px;\n background: transparent !important;\n \n .ant-layout-sider-children {\n background: #f0f4f9;\n border-radius: 12px 0 0 12px;\n padding: 0;\n border-right: 0;\n margin-right: 0;\n overflow: hidden;\n \n .ant-pro-sider-menu {\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n font-size: 18px;\n color: #8C8C8C;\n }\n \n [class*='-selected'] .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n \n a {\n transition: color 0s;\n }\n \n &>.ant-menu-item {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:first-of-type {\n margin-top: 0;\n }\n \n &:not(.ant-menu-item-selected):hover {\n color: #325cf7;\n background: transparent !important;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n background: #ffffff;\n }\n }\n \n .ant-menu-submenu {\n .ant-menu-submenu-title {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n }\n \n &:first-of-type .ant-menu-submenu-title {\n margin-top: 0;\n }\n \n &.ant-menu-submenu-selected {\n .ant-menu-submenu-title {\n color: #325cf7;\n }\n }\n \n .ant-menu-sub {\n padding: 0;\n \n .ant-menu-item {\n color: #595959;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n padding-left: 44px !important;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n font-weight: 500;\n background: #ffffff;\n }\n }\n }\n }\n }\n \n .ant-pro-sider-footer {\n text-align: right;\n padding: 0 12px 16px;\n \n .menu-footer-collapse-btn {\n width: 24px;\n height: 24px;\n border-radius: 6px;\n padding: 0;\n border: 0;\n \n .ant-btn-icon .anticon {\n font-size: 14px;\n color: #b3b3b3;\n }\n \n &:not(:hover) {\n background: #ffffff;\n }\n }\n }\n }\n \n &.ant-layout-sider-collapsed .ant-layout-sider-children .ant-pro-sider-menu {\n margin-top: -4px;\n \n .ant-menu-item.ant-menu-item-selected,\n .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title {\n background: #ffffff;\n }\n }\n }\n \n /* 头部区header */\n .ant-pro-layout-container .ant-pro-layout-header {\n border-bottom: 0 !important;\n \n .ant-pro-top-nav-header-main {\n padding-left: 0;\n \n .ant-pro-top-nav-header-menu {\n padding: 0;\n line-height: 48px;\n\n .ant-menu-overflow-item-rest {\n margin: 8px;\n }\n \n .ant-menu-item {\n padding: 0 28px;\n margin: 8px;\n \n &:hover {\n font-weight: 500;\n background: rgba(50, 92, 247, 0.1);\n }\n \n &.ant-menu-item-selected {\n font-weight: bold;\n \n &:hover {\n background: rgba(50, 92, 247, 0.1);\n }\n \n &::after {\n content: '';\n display: block;\n width: 21px;\n height: 4px;\n border-radius: 4px;\n background: #325cf7;\n position: absolute;\n bottom: 0;\n left: calc((100% - 21px) / 2);\n }\n }\n }\n }\n }\n }\n \n /* 内容区main */\n .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 32px);\n margin: 8px 16px 16px;\n padding: 0;\n height: calc(100vh - 88px);\n overflow: auto;\n border-radius: 12px;\n }\n \n .ant-layout-has-sider .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 16px);\n margin-left: 0;\n border-radius: 0 12px 12px 0;\n }\n }";
1
+ declare const _default: "\n/* =========== 布局样式 =========== */\n.ant-pro-layout {\n\n /* 侧边菜单 */\n .ant-pro-sider {\n padding: 8px 0 16px 16px;\n background: transparent !important;\n \n .ant-layout-sider-children {\n background: #f0f4f9;\n border-radius: 12px 0 0 12px;\n padding: 0;\n border-right: 0;\n margin-right: 0;\n overflow: hidden;\n \n .ant-pro-sider-menu {\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n font-size: 18px;\n color: #8C8C8C;\n }\n \n [class*='-selected'] .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n \n a {\n transition: color 0s;\n }\n \n &>.ant-menu-item {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:first-of-type {\n margin-top: 0;\n }\n \n &:not(.ant-menu-item-selected):hover {\n color: #325cf7;\n background: transparent !important;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n background: #ffffff;\n }\n }\n \n .ant-menu-submenu {\n .ant-menu-submenu-title {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n }\n \n &:first-of-type .ant-menu-submenu-title {\n margin-top: 0;\n }\n \n &.ant-menu-submenu-selected {\n .ant-menu-submenu-title {\n color: #325cf7;\n }\n }\n \n .ant-menu-sub {\n padding: 0;\n \n .ant-menu-item {\n color: #595959;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n padding-left: 44px !important;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n font-weight: 500;\n background: #ffffff;\n }\n }\n }\n }\n }\n \n .ant-pro-sider-footer {\n text-align: right;\n padding: 0 12px 16px;\n \n .menu-footer-collapse-btn {\n width: 24px;\n height: 24px;\n border-radius: 6px;\n padding: 0;\n border: 0;\n \n .ant-btn-icon .anticon {\n font-size: 14px;\n color: #b3b3b3;\n }\n \n &:not(:hover) {\n background: #ffffff;\n }\n }\n }\n }\n \n &.ant-layout-sider-collapsed .ant-layout-sider-children .ant-pro-sider-menu {\n margin-top: -4px;\n \n .ant-menu-item.ant-menu-item-selected,\n .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title {\n background: #ffffff;\n }\n }\n }\n \n /* 头部区header */\n .ant-pro-layout-container .ant-pro-layout-header {\n border-bottom: 0 !important;\n \n .ant-pro-top-nav-header-main {\n padding-left: 0;\n \n .ant-pro-top-nav-header-menu {\n padding: 0;\n line-height: 48px;\n \n .ant-menu-item {\n padding: 0 28px;\n margin: 8px;\n \n &:hover {\n font-weight: 500;\n background: rgba(50, 92, 247, 0.1);\n }\n \n &.ant-menu-item-selected {\n font-weight: bold;\n \n &:hover {\n background: rgba(50, 92, 247, 0.1);\n }\n \n &::after {\n content: '';\n display: block;\n width: 21px;\n height: 4px;\n border-radius: 4px;\n background: #325cf7;\n position: absolute;\n bottom: 0;\n left: calc((100% - 21px) / 2);\n }\n }\n }\n }\n }\n }\n \n /* 内容区main */\n .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 32px);\n margin: 8px 16px 16px;\n padding: 0;\n height: calc(100vh - 88px);\n overflow: auto;\n border-radius: 12px;\n }\n \n .ant-layout-has-sider .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 16px);\n margin-left: 0;\n border-radius: 0 12px 12px 0;\n }\n }";
2
2
  export default _default;
@@ -1 +1 @@
1
- export default "\n/* =========== \u5E03\u5C40\u6837\u5F0F =========== */\n.ant-pro-layout {\n\n /* \u4FA7\u8FB9\u83DC\u5355 */\n .ant-pro-sider {\n padding: 8px 0 16px 16px;\n background: transparent !important;\n \n .ant-layout-sider-children {\n background: #f0f4f9;\n border-radius: 12px 0 0 12px;\n padding: 0;\n border-right: 0;\n margin-right: 0;\n overflow: hidden;\n \n .ant-pro-sider-menu {\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n font-size: 18px;\n color: #8C8C8C;\n }\n \n [class*='-selected'] .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n \n a {\n transition: color 0s;\n }\n \n &>.ant-menu-item {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:first-of-type {\n margin-top: 0;\n }\n \n &:not(.ant-menu-item-selected):hover {\n color: #325cf7;\n background: transparent !important;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n background: #ffffff;\n }\n }\n \n .ant-menu-submenu {\n .ant-menu-submenu-title {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n }\n \n &:first-of-type .ant-menu-submenu-title {\n margin-top: 0;\n }\n \n &.ant-menu-submenu-selected {\n .ant-menu-submenu-title {\n color: #325cf7;\n }\n }\n \n .ant-menu-sub {\n padding: 0;\n \n .ant-menu-item {\n color: #595959;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n padding-left: 44px !important;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n font-weight: 500;\n background: #ffffff;\n }\n }\n }\n }\n }\n \n .ant-pro-sider-footer {\n text-align: right;\n padding: 0 12px 16px;\n \n .menu-footer-collapse-btn {\n width: 24px;\n height: 24px;\n border-radius: 6px;\n padding: 0;\n border: 0;\n \n .ant-btn-icon .anticon {\n font-size: 14px;\n color: #b3b3b3;\n }\n \n &:not(:hover) {\n background: #ffffff;\n }\n }\n }\n }\n \n &.ant-layout-sider-collapsed .ant-layout-sider-children .ant-pro-sider-menu {\n margin-top: -4px;\n \n .ant-menu-item.ant-menu-item-selected,\n .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title {\n background: #ffffff;\n }\n }\n }\n \n /* \u5934\u90E8\u533Aheader */\n .ant-pro-layout-container .ant-pro-layout-header {\n border-bottom: 0 !important;\n \n .ant-pro-top-nav-header-main {\n padding-left: 0;\n \n .ant-pro-top-nav-header-menu {\n padding: 0;\n line-height: 48px;\n\n .ant-menu-overflow-item-rest {\n margin: 8px;\n }\n \n .ant-menu-item {\n padding: 0 28px;\n margin: 8px;\n \n &:hover {\n font-weight: 500;\n background: rgba(50, 92, 247, 0.1);\n }\n \n &.ant-menu-item-selected {\n font-weight: bold;\n \n &:hover {\n background: rgba(50, 92, 247, 0.1);\n }\n \n &::after {\n content: '';\n display: block;\n width: 21px;\n height: 4px;\n border-radius: 4px;\n background: #325cf7;\n position: absolute;\n bottom: 0;\n left: calc((100% - 21px) / 2);\n }\n }\n }\n }\n }\n }\n \n /* \u5185\u5BB9\u533Amain */\n .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 32px);\n margin: 8px 16px 16px;\n padding: 0;\n height: calc(100vh - 88px);\n overflow: auto;\n border-radius: 12px;\n }\n \n .ant-layout-has-sider .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 16px);\n margin-left: 0;\n border-radius: 0 12px 12px 0;\n }\n }";
1
+ export default "\n/* =========== \u5E03\u5C40\u6837\u5F0F =========== */\n.ant-pro-layout {\n\n /* \u4FA7\u8FB9\u83DC\u5355 */\n .ant-pro-sider {\n padding: 8px 0 16px 16px;\n background: transparent !important;\n \n .ant-layout-sider-children {\n background: #f0f4f9;\n border-radius: 12px 0 0 12px;\n padding: 0;\n border-right: 0;\n margin-right: 0;\n overflow: hidden;\n \n .ant-pro-sider-menu {\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n font-size: 18px;\n color: #8C8C8C;\n }\n \n [class*='-selected'] .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n \n a {\n transition: color 0s;\n }\n \n &>.ant-menu-item {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:first-of-type {\n margin-top: 0;\n }\n \n &:not(.ant-menu-item-selected):hover {\n color: #325cf7;\n background: transparent !important;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n background: #ffffff;\n }\n }\n \n .ant-menu-submenu {\n .ant-menu-submenu-title {\n color: #262626;\n font-weight: 500;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n }\n \n &:first-of-type .ant-menu-submenu-title {\n margin-top: 0;\n }\n \n &.ant-menu-submenu-selected {\n .ant-menu-submenu-title {\n color: #325cf7;\n }\n }\n \n .ant-menu-sub {\n padding: 0;\n \n .ant-menu-item {\n color: #595959;\n margin: 4px 0;\n width: 100%;\n border-radius: 4px 0 0 4px;\n padding-left: 44px !important;\n \n &:hover {\n color: #325cf7;\n background: transparent;\n \n .ant-pro-base-menu-inline-item-icon .anticon {\n color: #325cf7;\n }\n }\n \n &.ant-menu-item-selected {\n color: #325cf7;\n font-weight: 500;\n background: #ffffff;\n }\n }\n }\n }\n }\n \n .ant-pro-sider-footer {\n text-align: right;\n padding: 0 12px 16px;\n \n .menu-footer-collapse-btn {\n width: 24px;\n height: 24px;\n border-radius: 6px;\n padding: 0;\n border: 0;\n \n .ant-btn-icon .anticon {\n font-size: 14px;\n color: #b3b3b3;\n }\n \n &:not(:hover) {\n background: #ffffff;\n }\n }\n }\n }\n \n &.ant-layout-sider-collapsed .ant-layout-sider-children .ant-pro-sider-menu {\n margin-top: -4px;\n \n .ant-menu-item.ant-menu-item-selected,\n .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title {\n background: #ffffff;\n }\n }\n }\n \n /* \u5934\u90E8\u533Aheader */\n .ant-pro-layout-container .ant-pro-layout-header {\n border-bottom: 0 !important;\n \n .ant-pro-top-nav-header-main {\n padding-left: 0;\n \n .ant-pro-top-nav-header-menu {\n padding: 0;\n line-height: 48px;\n \n .ant-menu-item {\n padding: 0 28px;\n margin: 8px;\n \n &:hover {\n font-weight: 500;\n background: rgba(50, 92, 247, 0.1);\n }\n \n &.ant-menu-item-selected {\n font-weight: bold;\n \n &:hover {\n background: rgba(50, 92, 247, 0.1);\n }\n \n &::after {\n content: '';\n display: block;\n width: 21px;\n height: 4px;\n border-radius: 4px;\n background: #325cf7;\n position: absolute;\n bottom: 0;\n left: calc((100% - 21px) / 2);\n }\n }\n }\n }\n }\n }\n \n /* \u5185\u5BB9\u533Amain */\n .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 32px);\n margin: 8px 16px 16px;\n padding: 0;\n height: calc(100vh - 88px);\n overflow: auto;\n border-radius: 12px;\n }\n \n .ant-layout-has-sider .ant-pro-layout-container .ant-pro-layout-content {\n width: calc(100% - 16px);\n margin-left: 0;\n border-radius: 0 12px 12px 0;\n }\n }";
@@ -8,8 +8,7 @@
8
8
  "colorText": "#262626",
9
9
  "colorTextSecondary": "#595959",
10
10
  "colorTextTertiary": "#8c8c8c",
11
- "colorTextQuaternary": "#b3b3b3",
12
- "controlHeightSM": 26
11
+ "colorTextQuaternary": "#b3b3b3"
13
12
  },
14
13
  "components": {
15
14
  "Button": {
@@ -92,8 +91,8 @@
92
91
  "buttonColor": "rgb(38, 38, 38)",
93
92
  "buttonCheckedBg": "rgba(255, 255, 255, 0.1)",
94
93
  "buttonCheckedBgDisabled": "rgba(255, 255, 255, 0.1)",
95
- "buttonCheckedColorDisabled": "rgb(179, 179, 179)",
96
- "colorBgContainerDisabled": "rgb(245, 245, 245)"
94
+ "buttonCheckedBorderColorDisabled": "#B3B3B3",
95
+ "colorBgContainerDisabled": "#F0F2F5"
97
96
  },
98
97
  "Select": {
99
98
  "selectorBg": "rgb(240, 242, 245)",
@@ -122,7 +121,7 @@
122
121
  "Cascader": {
123
122
  "colorBgContainerDisabled": "rgba(240, 242, 245, 0.5)",
124
123
  "colorSplit": "rgba(5, 5, 5, 0)",
125
- "colorBorder": "rgba(217, 217, 217)"
124
+ "colorBorder": "rgba(217, 217, 217, 0)"
126
125
  },
127
126
  "Switch": {
128
127
  "handleShadow": "-1px 0px 2px 0px rgba(0, 0, 0, 0.1)",
@@ -140,7 +139,7 @@
140
139
  "cardBg": "#F0F4F9",
141
140
  "cardGutter": 0,
142
141
  "cardHeight": 44,
143
- "cardPadding": "12px 32px"
142
+ "cardPadding": "11px 32px"
144
143
  },
145
144
  "Pagination": {
146
145
  "itemActiveBg": "#325CF7",
package/dist/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
+ import McCascader from './McCascader';
2
+ import McContainer from './McContainer';
3
+ import McDateRange from './McDateRange';
1
4
  import McFonts from './McFonts';
2
5
  import McGroupPanel from './McGroupPanel';
3
6
  import McIconFont from './McIconFont';
7
+ import McInput from './McInput';
4
8
  import McInputNumber from './McInputNumber';
5
9
  import McModalProvider from './McModalProvider';
6
10
  import McPeriodSelect from './McPeriodSelect';
@@ -8,20 +12,11 @@ import McPopoverButton from './McPopoverButton';
8
12
  import McPopoverForm from './McPopoverForm';
9
13
  import McProSelect from './McProSelect';
10
14
  import McResult from './McResult';
15
+ import McSelect from './McSelect';
11
16
  import McTag from './McTag';
12
17
  import McLazyLoader from './McLazyLoader';
13
18
  import McThemeConfig from './McThemeConfig';
14
19
  import McTreePanel from './McTreePanel';
15
20
  import McTreeSelect from './McTreeSelect';
16
- export * from './McCascader';
17
- export { default as McCascader } from './McCascader';
18
- export * from './McContainer';
19
- export { default as McContainer } from './McContainer';
20
- export * from './McDateRange';
21
- export { default as McDateRange } from './McDateRange';
22
- export * from './McInput';
23
- export { default as McInput } from './McInput';
24
- export * from './McSelect';
25
- export { default as McSelect } from './McSelect';
26
21
  import * as Utils from './Utils';
27
- export { McFonts, McGroupPanel, McIconFont, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
22
+ export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McSelect, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
package/dist/index.js CHANGED
@@ -1,6 +1,10 @@
1
+ import McCascader from "./McCascader";
2
+ import McContainer from "./McContainer";
3
+ import McDateRange from "./McDateRange";
1
4
  import McFonts from "./McFonts";
2
5
  import McGroupPanel from "./McGroupPanel";
3
6
  import McIconFont from "./McIconFont";
7
+ import McInput from "./McInput";
4
8
  import McInputNumber from "./McInputNumber";
5
9
  import McModalProvider from "./McModalProvider";
6
10
  import McPeriodSelect from "./McPeriodSelect";
@@ -8,20 +12,11 @@ import McPopoverButton from "./McPopoverButton";
8
12
  import McPopoverForm from "./McPopoverForm";
9
13
  import McProSelect from "./McProSelect";
10
14
  import McResult from "./McResult";
15
+ import McSelect from "./McSelect";
11
16
  import McTag from "./McTag";
12
17
  import McLazyLoader from "./McLazyLoader";
13
18
  import McThemeConfig from "./McThemeConfig";
14
19
  import McTreePanel from "./McTreePanel";
15
20
  import McTreeSelect from "./McTreeSelect";
16
- export * from "./McCascader";
17
- export { default as McCascader } from "./McCascader";
18
- export * from "./McContainer";
19
- export { default as McContainer } from "./McContainer";
20
- export * from "./McDateRange";
21
- export { default as McDateRange } from "./McDateRange";
22
- export * from "./McInput";
23
- export { default as McInput } from "./McInput";
24
- export * from "./McSelect";
25
- export { default as McSelect } from "./McSelect";
26
21
  import * as Utils from "./Utils";
27
- export { McFonts, McGroupPanel, McIconFont, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils };
22
+ export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McSelect, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykj2024/much-library",
3
- "version": "1.0.10-beta.9",
3
+ "version": "1.0.11",
4
4
  "description": "react library",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -47,7 +47,7 @@
47
47
  "@babel/runtime": "^7.25.6",
48
48
  "@dnd-kit/core": "^6.1.0",
49
49
  "@dnd-kit/sortable": "^8.0.0",
50
- "antd": ">=5.16.2 <=5.21.5",
50
+ "antd": "^5.16.2",
51
51
  "antd-style": "^3.6.2",
52
52
  "dayjs": "^1.11.12",
53
53
  "lodash": "^4.17.21",
@@ -1,6 +0,0 @@
1
- .mc-search-input__container {
2
- margin: 8px;
3
- }
4
- .mc-search-input {
5
- width: '100%';
6
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- interface PanelSearchInputProps {
4
- placeholder: string | undefined;
5
- searchValue: string | undefined;
6
- onSearch: (e: string | undefined) => void;
7
- }
8
- export interface PanelSearchInputRef {
9
- focus: () => void;
10
- }
11
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<PanelSearchInputProps & import("react").RefAttributes<PanelSearchInputRef>>>;
12
- export default _default;
@@ -1,45 +0,0 @@
1
- import { SearchOutlined } from 'much-icons';
2
- import { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';
3
- import McInput from "../../../McInput";
4
- import "./index.css";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- var PanelSearchInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
- var placeholder = _ref.placeholder,
8
- onSearch = _ref.onSearch,
9
- searchValue = _ref.searchValue;
10
- var inputRef = useRef(null);
11
- var focus = function focus() {
12
- if (inputRef.current) {
13
- setTimeout(function () {
14
- var _inputRef$current;
15
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus({
16
- cursor: 'all'
17
- });
18
- }, 200);
19
- }
20
- };
21
- useEffect(focus, []);
22
- useImperativeHandle(ref, function () {
23
- return {
24
- focus: focus
25
- };
26
- });
27
- return /*#__PURE__*/_jsx("div", {
28
- className: "mc-search-input__container",
29
- children: /*#__PURE__*/_jsx(McInput, {
30
- ref: inputRef,
31
- className: "mc-search-input",
32
- placeholder: placeholder || '请输入搜索内容',
33
- value: searchValue,
34
- onKeyDown: function onKeyDown(e) {
35
- // 避免触发原select的keydown,比如删除选项等不符预期的操作
36
- if (['Backspace', 'Delete', 'Enter'].includes(e.key)) {
37
- e.stopPropagation();
38
- }
39
- },
40
- onChange: onSearch,
41
- suffix: /*#__PURE__*/_jsx(SearchOutlined, {})
42
- })
43
- });
44
- });
45
- export default /*#__PURE__*/memo(PanelSearchInput);