@zykj2024/much-library 1.0.12-beta.4 → 1.0.12-beta.5
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,6 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import { useSortable } from '@dnd-kit/sortable';
|
3
3
|
import { Button, Typography } from 'antd';
|
4
|
+
import { MenuOutlined } from 'much-icons';
|
4
5
|
import { McIconFont } from "../../..";
|
5
6
|
import { memo, useMemo } from 'react';
|
6
7
|
import "../../index.css";
|
@@ -53,9 +54,7 @@ var SelectedItem = function SelectedItem(_ref) {
|
|
53
54
|
children: [sortable && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, listeners), {}, {
|
54
55
|
className: "mc-group-panel__selected-item__drag",
|
55
56
|
type: "text",
|
56
|
-
icon: /*#__PURE__*/_jsx(
|
57
|
-
type: "icon-MenuOutlined"
|
58
|
-
})
|
57
|
+
icon: /*#__PURE__*/_jsx(MenuOutlined, {})
|
59
58
|
})), /*#__PURE__*/_jsx(Typography.Paragraph, {
|
60
59
|
style: {
|
61
60
|
margin: '0 auto 0 4px'
|
@@ -29,6 +29,7 @@
|
|
29
29
|
}
|
30
30
|
.mc-group-panel__card-body {
|
31
31
|
height: calc(100% - 40px);
|
32
|
+
overflow: auto;
|
32
33
|
padding: 8px;
|
33
34
|
}
|
34
35
|
.mc-group-panel__options {
|
@@ -49,6 +50,7 @@
|
|
49
50
|
-webkit-box-flex: 1;
|
50
51
|
-ms-flex: 1 1 44%;
|
51
52
|
flex: 1 1 44%;
|
53
|
+
overflow: auto;
|
52
54
|
}
|
53
55
|
.mc-group-panel__options-items {
|
54
56
|
-webkit-box-flex: 1;
|
@@ -65,23 +67,23 @@
|
|
65
67
|
padding: 0 8px;
|
66
68
|
}
|
67
69
|
.mc-group-panel__checkbox-wrapper {
|
68
|
-
width:
|
70
|
+
width: 100%;
|
69
71
|
height: 40px;
|
70
72
|
line-height: 40px;
|
71
73
|
padding: 0 12px;
|
74
|
+
display: -webkit-box;
|
75
|
+
display: -ms-flexbox;
|
76
|
+
display: flex;
|
77
|
+
-webkit-box-align: center;
|
78
|
+
-ms-flex-align: center;
|
79
|
+
align-items: center;
|
72
80
|
}
|
73
|
-
.mc-group-panel__checkbox-wrapper
|
74
|
-
max-width: 100%;
|
75
|
-
}
|
76
|
-
.mc-group-panel__checkbox-wrapper .ant-checkbox-wrapper .ant-checkbox + span {
|
77
|
-
overflow: hidden;
|
78
|
-
}
|
79
|
-
.mc-group-panel__checkbox-wrapper:not(:first-child):hover {
|
81
|
+
.mc-group-panel__checkbox-wrapper:not(.mc-group-panel__check-all):hover {
|
80
82
|
background: #f6f6f6;
|
81
83
|
cursor: pointer;
|
82
84
|
}
|
83
85
|
.mc-group-panel__checkbox {
|
84
|
-
width:
|
86
|
+
width: 100%;
|
85
87
|
height: 40px;
|
86
88
|
-webkit-box-align: center;
|
87
89
|
-ms-flex-align: center;
|
@@ -101,7 +103,7 @@
|
|
101
103
|
width: 240px;
|
102
104
|
}
|
103
105
|
.mc-group-panel__selected-item {
|
104
|
-
width:
|
106
|
+
width: 100%;
|
105
107
|
height: 40px;
|
106
108
|
display: -webkit-box;
|
107
109
|
display: -ms-flexbox;
|
@@ -4,8 +4,8 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import { DndContext } from '@dnd-kit/core';
|
5
5
|
import { SortableContext, arrayMove, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
6
6
|
import { Button, Checkbox, Empty, Input, Typography } from 'antd';
|
7
|
+
import debounce from 'lodash/debounce';
|
7
8
|
import { SearchOutlined } from 'much-icons';
|
8
|
-
import { Utils } from "./..";
|
9
9
|
import { useEffect, useMemo, useState } from 'react';
|
10
10
|
import SelectedItem from "./comps/SelectedItem";
|
11
11
|
import "./index.css";
|
@@ -122,26 +122,26 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
122
122
|
setGroupMap(_groupMap);
|
123
123
|
setActiveGroup(_options === null || _options === void 0 || (_options$2 = _options[0]) === null || _options$2 === void 0 ? void 0 : _options$2.value);
|
124
124
|
};
|
125
|
-
return
|
125
|
+
return debounce(fn, 350);
|
126
126
|
}, [options]);
|
127
|
-
var echo = function echo(value) {
|
128
|
-
var _inexistentItemMap = {};
|
129
|
-
value === null || value === void 0 || value.forEach(function (item) {
|
130
|
-
var v = labelInValue ? item.value : item,
|
131
|
-
l = labelInValue ? item.label || item.value : item;
|
132
|
-
if (!itemMap[v]) _inexistentItemMap[v] = {
|
133
|
-
value: v,
|
134
|
-
label: l
|
135
|
-
};
|
136
|
-
});
|
137
|
-
setSelected(value ? labelInValue ? value.map(function (item) {
|
138
|
-
return item.value;
|
139
|
-
}) : value : []);
|
140
|
-
setInexistentItemMap(_inexistentItemMap);
|
141
|
-
};
|
142
127
|
|
143
128
|
/* 回显 */
|
144
129
|
useEffect(function () {
|
130
|
+
var echo = function echo(value) {
|
131
|
+
var _inexistentItemMap = {};
|
132
|
+
value === null || value === void 0 || value.forEach(function (item) {
|
133
|
+
var v = labelInValue ? item.value : item,
|
134
|
+
l = labelInValue ? item.label || item.value : item;
|
135
|
+
if (!itemMap[v]) _inexistentItemMap[v] = {
|
136
|
+
value: v,
|
137
|
+
label: l
|
138
|
+
};
|
139
|
+
});
|
140
|
+
setSelected(value ? labelInValue ? value.map(function (item) {
|
141
|
+
return item.value;
|
142
|
+
}) : value : []);
|
143
|
+
setInexistentItemMap(_inexistentItemMap);
|
144
|
+
};
|
145
145
|
echo(value);
|
146
146
|
}, [value]);
|
147
147
|
|
@@ -189,9 +189,7 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
189
189
|
onChange: function onChange(e) {
|
190
190
|
var v = e.target.value.trim();
|
191
191
|
setSearchValue(v);
|
192
|
-
|
193
|
-
debounceSearch(v);
|
194
|
-
}
|
192
|
+
v !== searchValue && debounceSearch(v);
|
195
193
|
}
|
196
194
|
})
|
197
195
|
}), _options.length > 0 ? /*#__PURE__*/_jsxs("div", {
|
@@ -199,7 +197,7 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
199
197
|
children: [/*#__PURE__*/_jsxs("div", {
|
200
198
|
className: "mc-group-panel__options-groups",
|
201
199
|
children: [/*#__PURE__*/_jsx("div", {
|
202
|
-
className: "mc-group-panel__checkbox-wrapper",
|
200
|
+
className: "mc-group-panel__checkbox-wrapper mc-group-panel__check-all",
|
203
201
|
children: /*#__PURE__*/_jsx(Checkbox, {
|
204
202
|
checked: allValues.length > 0 && allValues.every(function (v) {
|
205
203
|
return selected.includes(v);
|
@@ -221,7 +219,7 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
221
219
|
className: "mc-group-panel__options-list",
|
222
220
|
children: _options.map(function (item) {
|
223
221
|
var _groupMap$item$value, _groupMap$item$value2;
|
224
|
-
return /*#__PURE__*/
|
222
|
+
return /*#__PURE__*/_jsxs("div", {
|
225
223
|
className: "mc-group-panel__checkbox-wrapper",
|
226
224
|
style: {
|
227
225
|
background: activeGroup === item.value ? '#EAEEFE' : ''
|
@@ -229,7 +227,7 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
229
227
|
onClick: function onClick() {
|
230
228
|
return setActiveGroup(item.value);
|
231
229
|
},
|
232
|
-
children: /*#__PURE__*/_jsx(Checkbox, {
|
230
|
+
children: [/*#__PURE__*/_jsx(Checkbox, {
|
233
231
|
checked: ((_groupMap$item$value = groupMap[item.value]) === null || _groupMap$item$value === void 0 ? void 0 : _groupMap$item$value.length) > 0 && groupMap[item.value].every(function (_ref2) {
|
234
232
|
var value = _ref2.value;
|
235
233
|
return selected.includes(value);
|
@@ -255,16 +253,18 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
255
253
|
}));
|
256
254
|
},
|
257
255
|
disabled: disabled,
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
256
|
+
onClick: function onClick(e) {
|
257
|
+
return e.stopPropagation();
|
258
|
+
}
|
259
|
+
}), /*#__PURE__*/_jsx(Typography.Paragraph, {
|
260
|
+
style: {
|
261
|
+
margin: '0 0 0 8px'
|
262
|
+
},
|
263
|
+
ellipsis: {
|
264
|
+
tooltip: item.label
|
265
|
+
},
|
266
|
+
children: item.label
|
267
|
+
})]
|
268
268
|
}, item.value);
|
269
269
|
})
|
270
270
|
})]
|
@@ -272,7 +272,7 @@ var McGroupPanel = function McGroupPanel(props) {
|
|
272
272
|
className: "mc-group-panel__options-items",
|
273
273
|
children: ((_groupMap$activeGroup = groupMap[activeGroup]) === null || _groupMap$activeGroup === void 0 ? void 0 : _groupMap$activeGroup.length) > 0 ? /*#__PURE__*/_jsxs(_Fragment, {
|
274
274
|
children: [/*#__PURE__*/_jsx("div", {
|
275
|
-
className: "mc-group-panel__checkbox-wrapper",
|
275
|
+
className: "mc-group-panel__checkbox-wrapper mc-group-panel__check-all",
|
276
276
|
children: /*#__PURE__*/_jsx(Checkbox, {
|
277
277
|
checked: ((_groupMap$activeGroup2 = groupMap[activeGroup]) === null || _groupMap$activeGroup2 === void 0 ? void 0 : _groupMap$activeGroup2.length) > 0 && groupMap[activeGroup].every(function (_ref7) {
|
278
278
|
var value = _ref7.value;
|
@@ -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.ant-modal .ant-modal-content {\n padding: 24px;\n}\n.ant-modal .ant-modal-header {\n margin-bottom:24px;\n}\n.ant-modal .ant-modal-footer {\n margin-top: 24px;\n}\n.ant-modal .ant-modal-content {\n top: 16px;\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\n// <====================== Card ======================>\n.ant-card-type-inner .ant-card-head {\n border-bottom-width: 0;\n background: #FAFAFA;\n}\n\n.ant-table-sticky-scroll-bar {\n opacity: 0.5;\n height: 6px;\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 box-sizing: border-box;\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.ant-modal .ant-modal-content {\n padding: 24px;\n}\n.ant-modal .ant-modal-header {\n margin-bottom:24px;\n}\n.ant-modal .ant-modal-footer {\n margin-top: 24px;\n}\n.ant-modal .ant-modal-content {\n top: 16px;\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\n// <====================== Card ======================>\n.ant-card-type-inner .ant-card-head {\n border-bottom-width: 0;\n background: #FAFAFA;\n}\n\n.ant-table-sticky-scroll-bar {\n opacity: 0.5;\n height: 6px;\n}\n"])), function (props) {
|
6
6
|
return props.layout;
|
7
7
|
}, function (props) {
|
8
8
|
return props.font.Regular;
|