@zykj2024/much-library 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/McCascader/city.js +909 -0
- package/dist/McCascader/index.css +60 -0
- package/dist/McCascader/index.d.ts +19 -0
- package/dist/McCascader/index.js +221 -0
- package/dist/McContainer/demo/actionBar.d.ts +8 -0
- package/dist/McContainer/demo/actionBar.js +70 -0
- package/dist/McContainer/demo/base.d.ts +8 -0
- package/dist/McContainer/demo/base.js +80 -0
- package/dist/McContainer/demo/batch.d.ts +8 -0
- package/dist/McContainer/demo/batch.js +89 -0
- package/dist/McContainer/demo/collapse.d.ts +8 -0
- package/dist/McContainer/demo/collapse.js +76 -0
- package/dist/McContainer/demo/expand.d.ts +8 -0
- package/dist/McContainer/demo/expand.js +90 -0
- package/dist/McContainer/demo/pagination.d.ts +7 -0
- package/dist/McContainer/demo/pagination.js +93 -0
- package/dist/McContainer/demo/search.d.ts +7 -0
- package/dist/McContainer/demo/search.js +101 -0
- package/dist/McContainer/demo/standard.d.ts +7 -0
- package/dist/McContainer/demo/standard.js +168 -0
- package/dist/McContainer/index.css +123 -0
- package/dist/McContainer/index.d.ts +49 -0
- package/dist/McContainer/index.js +407 -0
- package/dist/McDateRange/demo/base.d.ts +6 -0
- package/dist/McDateRange/demo/base.js +22 -0
- package/dist/McDateRange/demo/cancelPresets.d.ts +6 -0
- package/dist/McDateRange/demo/cancelPresets.js +23 -0
- package/dist/McDateRange/demo/overlap.d.ts +2 -0
- package/dist/McDateRange/demo/overlap.js +32 -0
- package/dist/McDateRange/index.css +31 -0
- package/dist/McDateRange/index.d.ts +28 -0
- package/dist/McDateRange/index.js +167 -0
- package/dist/McFonts/index.d.ts +7 -0
- package/dist/McFonts/index.js +10 -0
- package/dist/McFonts/public/FF DIN Pro Bold.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Bold.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Light.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Medium.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Regular.otf +0 -0
- package/dist/McGroupPanel/comps/SelectedItem/index.d.ts +4 -0
- package/dist/McGroupPanel/comps/SelectedItem/index.js +76 -0
- package/dist/McGroupPanel/index.css +162 -0
- package/dist/McGroupPanel/index.d.ts +29 -0
- package/dist/McGroupPanel/index.js +411 -0
- package/dist/McIconFont/iconfont.js +1 -0
- package/dist/McIconFont/index.d.ts +5 -0
- package/dist/McIconFont/index.js +8 -0
- package/dist/McIcons/business.json +137 -0
- package/dist/McInput/Input.d.ts +19 -0
- package/dist/McInput/Input.js +48 -0
- package/dist/McInput/Search.d.ts +39 -0
- package/dist/McInput/Search.js +81 -0
- package/dist/McInput/TextArea.d.ts +11 -0
- package/dist/McInput/TextArea.js +37 -0
- package/dist/McInput/demo/Input/addonBefore.d.ts +3 -0
- package/dist/McInput/demo/Input/addonBefore.js +67 -0
- package/dist/McInput/demo/Input/base.d.ts +2 -0
- package/dist/McInput/demo/Input/base.js +31 -0
- package/dist/McInput/demo/Input/isTrim.d.ts +2 -0
- package/dist/McInput/demo/Input/isTrim.js +22 -0
- package/dist/McInput/demo/Input/label.d.ts +2 -0
- package/dist/McInput/demo/Input/label.js +26 -0
- package/dist/McInput/demo/Input/ref.d.ts +3 -0
- package/dist/McInput/demo/Input/ref.js +53 -0
- package/dist/McInput/demo/Input/status.d.ts +2 -0
- package/dist/McInput/demo/Input/status.js +23 -0
- package/dist/McInput/demo/Search/search-base.d.ts +2 -0
- package/dist/McInput/demo/Search/search-base.js +38 -0
- package/dist/McInput/demo/TextArea/text-area-base.d.ts +2 -0
- package/dist/McInput/demo/TextArea/text-area-base.js +38 -0
- package/dist/McInput/index.css +44 -0
- package/dist/McInput/index.d.ts +13 -0
- package/dist/McInput/index.js +7 -0
- package/dist/McInputNumber/demo/index.d.ts +2 -0
- package/dist/McInputNumber/demo/index.js +28 -0
- package/dist/McInputNumber/demo/label.d.ts +2 -0
- package/dist/McInputNumber/demo/label.js +26 -0
- package/dist/McInputNumber/demo/precision.d.ts +2 -0
- package/dist/McInputNumber/demo/precision.js +20 -0
- package/dist/McInputNumber/index.css +9 -0
- package/dist/McInputNumber/index.d.ts +13 -0
- package/dist/McInputNumber/index.js +43 -0
- package/dist/McModalProvider/index.d.ts +174 -0
- package/dist/McModalProvider/index.js +498 -0
- package/dist/McPeriodSelect/demo/base.d.ts +6 -0
- package/dist/McPeriodSelect/demo/base.js +19 -0
- package/dist/McPeriodSelect/demo/half.d.ts +6 -0
- package/dist/McPeriodSelect/demo/half.js +20 -0
- package/dist/McPeriodSelect/index.css +189 -0
- package/dist/McPeriodSelect/index.d.ts +13 -0
- package/dist/McPeriodSelect/index.js +305 -0
- package/dist/McPopoverButton/index.d.ts +14 -0
- package/dist/McPopoverButton/index.js +52 -0
- package/dist/McPopoverForm/index.d.ts +14 -0
- package/dist/McPopoverForm/index.js +95 -0
- package/dist/McResult/default.d.ts +1 -0
- package/dist/McResult/default.js +84 -0
- package/dist/McResult/demo/403.d.ts +6 -0
- package/dist/McResult/demo/403.js +17 -0
- package/dist/McResult/demo/404.d.ts +6 -0
- package/dist/McResult/demo/404.js +17 -0
- package/dist/McResult/demo/500.d.ts +6 -0
- package/dist/McResult/demo/500.js +17 -0
- package/dist/McResult/demo/building.d.ts +6 -0
- package/dist/McResult/demo/building.js +12 -0
- package/dist/McResult/demo/empty.d.ts +2 -0
- package/dist/McResult/demo/empty.js +11 -0
- package/dist/McResult/demo/noFunction.d.ts +2 -0
- package/dist/McResult/demo/noFunction.js +11 -0
- package/dist/McResult/demo/noUser.d.ts +6 -0
- package/dist/McResult/demo/noUser.js +12 -0
- package/dist/McResult/demo/preview.d.ts +2 -0
- package/dist/McResult/demo/preview.js +14 -0
- package/dist/McResult/icon.d.ts +25 -0
- package/dist/McResult/icon.js +946 -0
- package/dist/McResult/index.css +20 -0
- package/dist/McResult/index.d.ts +27 -0
- package/dist/McResult/index.js +103 -0
- package/dist/McResult/public/403.svg +164 -0
- package/dist/McResult/public/404.svg +123 -0
- package/dist/McResult/public/500.svg +129 -0
- package/dist/McResult/public/building.svg +127 -0
- package/dist/McResult/public/code403.svg +7 -0
- package/dist/McResult/public/code404.svg +5 -0
- package/dist/McResult/public/code500.svg +5 -0
- package/dist/McResult/public/empty.svg +1 -0
- package/dist/McResult/public/noFunction.svg +1 -0
- package/dist/McResult/public/noUser.svg +90 -0
- package/dist/McSelect/demo/base.d.ts +2 -0
- package/dist/McSelect/demo/base.js +63 -0
- package/dist/McSelect/demo/changeOnHidden.d.ts +2 -0
- package/dist/McSelect/demo/changeOnHidden.js +43 -0
- package/dist/McSelect/demo/dropdownRender.d.ts +7 -0
- package/dist/McSelect/demo/dropdownRender.js +78 -0
- package/dist/McSelect/demo/fetchOptions.d.ts +7 -0
- package/dist/McSelect/demo/fetchOptions.js +210 -0
- package/dist/McSelect/demo/inexistent.d.ts +2 -0
- package/dist/McSelect/demo/inexistent.js +79 -0
- package/dist/McSelect/demo/labelInValue.d.ts +2 -0
- package/dist/McSelect/demo/labelInValue.js +72 -0
- package/dist/McSelect/demo/maxTagCount.d.ts +3 -0
- package/dist/McSelect/demo/maxTagCount.js +51 -0
- package/dist/McSelect/demo/multiple.d.ts +2 -0
- package/dist/McSelect/demo/multiple.js +46 -0
- package/dist/McSelect/demo/optionRender.d.ts +3 -0
- package/dist/McSelect/demo/optionRender.js +51 -0
- package/dist/McSelect/demo/tagRender.d.ts +3 -0
- package/dist/McSelect/demo/tagRender.js +51 -0
- package/dist/McSelect/index.css +60 -0
- package/dist/McSelect/index.d.ts +40 -0
- package/dist/McSelect/index.js +350 -0
- package/dist/McThemeConfig/customToken.json +38 -0
- package/dist/McThemeConfig/demo/button.d.ts +2 -0
- package/dist/McThemeConfig/demo/button.js +226 -0
- package/dist/McThemeConfig/demo/drawer.d.ts +2 -0
- package/dist/McThemeConfig/demo/drawer.js +59 -0
- package/dist/McThemeConfig/demo/modal.d.ts +2 -0
- package/dist/McThemeConfig/demo/modal.js +78 -0
- package/dist/McThemeConfig/demo/radio.d.ts +2 -0
- package/dist/McThemeConfig/demo/radio.js +97 -0
- package/dist/McThemeConfig/demo/switch.d.ts +2 -0
- package/dist/McThemeConfig/demo/switch.js +96 -0
- package/dist/McThemeConfig/demo/tabs.d.ts +2 -0
- package/dist/McThemeConfig/demo/tabs.js +35 -0
- package/dist/McThemeConfig/globalStyle.d.ts +2 -0
- package/dist/McThemeConfig/globalStyle.js +172 -0
- package/dist/McThemeConfig/index.d.ts +9 -0
- package/dist/McThemeConfig/index.js +16 -0
- package/dist/McThemeConfig/layoutStyle.d.ts +2 -0
- package/dist/McThemeConfig/layoutStyle.js +1 -0
- package/dist/McThemeConfig/provider.d.ts +7 -0
- package/dist/McThemeConfig/provider.js +19 -0
- package/dist/McThemeConfig/themeToken.json +149 -0
- package/dist/McTreePanel/SelectedItem.d.ts +4 -0
- package/dist/McTreePanel/SelectedItem.js +75 -0
- package/dist/McTreePanel/demo/base.d.ts +6 -0
- package/dist/McTreePanel/demo/base.js +45 -0
- package/dist/McTreePanel/demo/fieldNames.d.ts +6 -0
- package/dist/McTreePanel/demo/fieldNames.js +37 -0
- package/dist/McTreePanel/demo/inexistent.d.ts +6 -0
- package/dist/McTreePanel/demo/inexistent.js +56 -0
- package/dist/McTreePanel/demo/labelInValue.d.ts +6 -0
- package/dist/McTreePanel/demo/labelInValue.js +56 -0
- package/dist/McTreePanel/demo/sortable.d.ts +6 -0
- package/dist/McTreePanel/demo/sortable.js +34 -0
- package/dist/McTreePanel/index.css +110 -0
- package/dist/McTreePanel/index.d.ts +27 -0
- package/dist/McTreePanel/index.js +315 -0
- package/dist/McTreeSelect/demo/base.d.ts +5 -0
- package/dist/McTreeSelect/demo/base.js +58 -0
- package/dist/McTreeSelect/demo/inexistent.d.ts +5 -0
- package/dist/McTreeSelect/demo/inexistent.js +63 -0
- package/dist/McTreeSelect/demo/label.d.ts +5 -0
- package/dist/McTreeSelect/demo/label.js +60 -0
- package/dist/McTreeSelect/demo/multiple.d.ts +5 -0
- package/dist/McTreeSelect/demo/multiple.js +71 -0
- package/dist/McTreeSelect/index.css +60 -0
- package/dist/McTreeSelect/index.d.ts +13 -0
- package/dist/McTreeSelect/index.js +182 -0
- package/dist/Utils/index.d.ts +4 -0
- package/dist/Utils/index.js +26 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/typings.d.ts +20 -0
- package/package.json +82 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
4
|
+
import { Button, Col, Form, Input, Modal, Radio, Row } from 'antd';
|
5
|
+
import { McModalProvider } from "../..";
|
6
|
+
import { useState } from 'react';
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
10
|
+
var useModal = McModalProvider.useModal;
|
11
|
+
var demoModal = McModalProvider.create(function (_ref) {
|
12
|
+
var title = _ref.title,
|
13
|
+
value = _ref.value;
|
14
|
+
var modal = useModal();
|
15
|
+
var props = _defineProperty({}, "".concat(value), true);
|
16
|
+
return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
17
|
+
title: title,
|
18
|
+
open: modal.visible
|
19
|
+
}, props), {}, {
|
20
|
+
onCancel: function onCancel() {
|
21
|
+
modal.hide();
|
22
|
+
},
|
23
|
+
onOk: function onOk() {
|
24
|
+
modal.hide();
|
25
|
+
},
|
26
|
+
children: new Array(10).fill(0).map(function (_, item) {
|
27
|
+
return /*#__PURE__*/_jsx(Form.Item, {
|
28
|
+
label: "random ".concat(item),
|
29
|
+
children: /*#__PURE__*/_jsx(Input, {
|
30
|
+
value: Math.random() * 100
|
31
|
+
})
|
32
|
+
}, item);
|
33
|
+
})
|
34
|
+
}));
|
35
|
+
});
|
36
|
+
export default (function () {
|
37
|
+
var _useState = useState('data-small'),
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
39
|
+
value = _useState2[0],
|
40
|
+
setValue = _useState2[1];
|
41
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
42
|
+
children: [/*#__PURE__*/_jsxs(Radio.Group, {
|
43
|
+
onChange: function onChange(e) {
|
44
|
+
setValue(e.target.value);
|
45
|
+
},
|
46
|
+
value: value,
|
47
|
+
style: {
|
48
|
+
marginBottom: 10
|
49
|
+
},
|
50
|
+
children: [/*#__PURE__*/_jsx(Radio, {
|
51
|
+
value: "data-small",
|
52
|
+
children: "data-small"
|
53
|
+
}), /*#__PURE__*/_jsx(Radio, {
|
54
|
+
value: "data-medium",
|
55
|
+
children: "data-medium"
|
56
|
+
}), /*#__PURE__*/_jsx(Radio, {
|
57
|
+
value: "data-large",
|
58
|
+
children: "data-large"
|
59
|
+
})]
|
60
|
+
}), /*#__PURE__*/_jsx(Row, {
|
61
|
+
gutter: [16, 20],
|
62
|
+
children: /*#__PURE__*/_jsx(Col, {
|
63
|
+
children: /*#__PURE__*/_jsx(Button, {
|
64
|
+
onClick: function onClick() {
|
65
|
+
McModalProvider.show(demoModal, {
|
66
|
+
title: '编辑弹窗',
|
67
|
+
record: {
|
68
|
+
id: 123
|
69
|
+
},
|
70
|
+
value: value
|
71
|
+
});
|
72
|
+
},
|
73
|
+
children: "Modal"
|
74
|
+
})
|
75
|
+
})
|
76
|
+
})]
|
77
|
+
});
|
78
|
+
});
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import { Radio, Space } from 'antd';
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
4
|
+
export default (function () {
|
5
|
+
return /*#__PURE__*/_jsxs(Space, {
|
6
|
+
direction: "vertical",
|
7
|
+
size: 16,
|
8
|
+
children: [/*#__PURE__*/_jsx(Radio.Group, {
|
9
|
+
defaultValue: 1,
|
10
|
+
options: [{
|
11
|
+
label: '选项一',
|
12
|
+
value: 1
|
13
|
+
}, {
|
14
|
+
label: '选项二',
|
15
|
+
value: 2
|
16
|
+
}]
|
17
|
+
}), /*#__PURE__*/_jsx(Radio.Group, {
|
18
|
+
defaultValue: 1,
|
19
|
+
disabled: true,
|
20
|
+
options: [{
|
21
|
+
label: '选项一',
|
22
|
+
value: 1
|
23
|
+
}, {
|
24
|
+
label: '选项二',
|
25
|
+
value: 2
|
26
|
+
}]
|
27
|
+
}), /*#__PURE__*/_jsx(Radio.Group, {
|
28
|
+
defaultValue: 2,
|
29
|
+
optionType: "button",
|
30
|
+
options: [{
|
31
|
+
label: '选项一',
|
32
|
+
value: 1
|
33
|
+
}, {
|
34
|
+
label: '选项二',
|
35
|
+
value: 2
|
36
|
+
}, {
|
37
|
+
label: '选项三',
|
38
|
+
value: 3
|
39
|
+
}, {
|
40
|
+
label: '选项四',
|
41
|
+
value: 4
|
42
|
+
}, {
|
43
|
+
label: '选项五',
|
44
|
+
value: 5
|
45
|
+
}]
|
46
|
+
}), /*#__PURE__*/_jsx(Radio.Group, {
|
47
|
+
defaultValue: 1,
|
48
|
+
disabled: true,
|
49
|
+
optionType: "button",
|
50
|
+
options: [{
|
51
|
+
label: '选项一',
|
52
|
+
value: 1
|
53
|
+
}, {
|
54
|
+
label: '选项二',
|
55
|
+
value: 2
|
56
|
+
}, {
|
57
|
+
label: '选项三',
|
58
|
+
value: 3
|
59
|
+
}]
|
60
|
+
}), /*#__PURE__*/_jsx(Radio.Group, {
|
61
|
+
defaultValue: 2,
|
62
|
+
optionType: "button",
|
63
|
+
buttonStyle: "solid",
|
64
|
+
options: [{
|
65
|
+
label: '选项一',
|
66
|
+
value: 1
|
67
|
+
}, {
|
68
|
+
label: '选项二',
|
69
|
+
value: 2
|
70
|
+
}, {
|
71
|
+
label: '选项三',
|
72
|
+
value: 3
|
73
|
+
}, {
|
74
|
+
label: '选项四',
|
75
|
+
value: 4
|
76
|
+
}, {
|
77
|
+
label: '选项五',
|
78
|
+
value: 5
|
79
|
+
}]
|
80
|
+
}), /*#__PURE__*/_jsx(Radio.Group, {
|
81
|
+
defaultValue: 1,
|
82
|
+
disabled: true,
|
83
|
+
optionType: "button",
|
84
|
+
buttonStyle: "solid",
|
85
|
+
options: [{
|
86
|
+
label: '选项一',
|
87
|
+
value: 1
|
88
|
+
}, {
|
89
|
+
label: '选项二',
|
90
|
+
value: 2
|
91
|
+
}, {
|
92
|
+
label: '选项三',
|
93
|
+
value: 3
|
94
|
+
}]
|
95
|
+
})]
|
96
|
+
});
|
97
|
+
});
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { Col, Row, Switch } from 'antd';
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
4
|
+
export default (function () {
|
5
|
+
var styles = {
|
6
|
+
marginBottom: 30
|
7
|
+
};
|
8
|
+
return /*#__PURE__*/_jsxs(Row, {
|
9
|
+
gutter: [100, 0],
|
10
|
+
children: [/*#__PURE__*/_jsxs(Col, {
|
11
|
+
children: [/*#__PURE__*/_jsx("div", {
|
12
|
+
style: styles,
|
13
|
+
children: "\u5E38\u89C4"
|
14
|
+
}), /*#__PURE__*/_jsx("div", {
|
15
|
+
style: styles,
|
16
|
+
children: /*#__PURE__*/_jsx(Switch, {})
|
17
|
+
}), /*#__PURE__*/_jsx("div", {
|
18
|
+
style: styles,
|
19
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
20
|
+
disabled: true
|
21
|
+
})
|
22
|
+
}), /*#__PURE__*/_jsx("div", {
|
23
|
+
style: styles,
|
24
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
25
|
+
defaultChecked: true
|
26
|
+
})
|
27
|
+
}), /*#__PURE__*/_jsx("div", {
|
28
|
+
style: styles,
|
29
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
30
|
+
defaultChecked: true,
|
31
|
+
disabled: true
|
32
|
+
})
|
33
|
+
})]
|
34
|
+
}), /*#__PURE__*/_jsxs(Col, {
|
35
|
+
children: [/*#__PURE__*/_jsx("div", {
|
36
|
+
style: styles,
|
37
|
+
children: "\u5E26\u6587\u5B57"
|
38
|
+
}), /*#__PURE__*/_jsx("div", {
|
39
|
+
style: styles,
|
40
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
41
|
+
checkedChildren: "\u5F00\u542F",
|
42
|
+
unCheckedChildren: "\u5173\u95ED"
|
43
|
+
})
|
44
|
+
}), /*#__PURE__*/_jsx("div", {
|
45
|
+
style: styles,
|
46
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
47
|
+
checkedChildren: "\u5F00\u542F",
|
48
|
+
unCheckedChildren: "\u5173\u95ED",
|
49
|
+
disabled: true
|
50
|
+
})
|
51
|
+
}), /*#__PURE__*/_jsx("div", {
|
52
|
+
style: styles,
|
53
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
54
|
+
defaultChecked: true
|
55
|
+
})
|
56
|
+
}), /*#__PURE__*/_jsx("div", {
|
57
|
+
style: styles,
|
58
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
59
|
+
checkedChildren: "\u5F00\u542F",
|
60
|
+
unCheckedChildren: "\u5173\u95ED",
|
61
|
+
defaultChecked: true,
|
62
|
+
disabled: true
|
63
|
+
})
|
64
|
+
})]
|
65
|
+
}), /*#__PURE__*/_jsxs(Col, {
|
66
|
+
children: [/*#__PURE__*/_jsx("div", {
|
67
|
+
style: styles,
|
68
|
+
children: "\u5C0F\u6309\u94AE"
|
69
|
+
}), /*#__PURE__*/_jsx("div", {
|
70
|
+
style: styles,
|
71
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
72
|
+
size: "small"
|
73
|
+
})
|
74
|
+
}), /*#__PURE__*/_jsx("div", {
|
75
|
+
style: styles,
|
76
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
77
|
+
disabled: true,
|
78
|
+
size: "small"
|
79
|
+
})
|
80
|
+
}), /*#__PURE__*/_jsx("div", {
|
81
|
+
style: styles,
|
82
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
83
|
+
defaultChecked: true,
|
84
|
+
size: "small"
|
85
|
+
})
|
86
|
+
}), /*#__PURE__*/_jsx("div", {
|
87
|
+
style: styles,
|
88
|
+
children: /*#__PURE__*/_jsx(Switch, {
|
89
|
+
defaultChecked: true,
|
90
|
+
disabled: true,
|
91
|
+
size: "small"
|
92
|
+
})
|
93
|
+
})]
|
94
|
+
})]
|
95
|
+
});
|
96
|
+
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { Tabs } from 'antd';
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
+
export default (function () {
|
6
|
+
var items = Array.from({
|
7
|
+
length: 5
|
8
|
+
}, function (_, index) {
|
9
|
+
return {
|
10
|
+
label: "item ".concat(index + 1),
|
11
|
+
key: "".concat(index + 1)
|
12
|
+
};
|
13
|
+
});
|
14
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
15
|
+
children: [/*#__PURE__*/_jsx("div", {
|
16
|
+
children: "\u5E38\u89C4"
|
17
|
+
}), /*#__PURE__*/_jsx("div", {
|
18
|
+
children: /*#__PURE__*/_jsx(Tabs, {
|
19
|
+
defaultActiveKey: "1",
|
20
|
+
items: items
|
21
|
+
})
|
22
|
+
}), /*#__PURE__*/_jsx("div", {
|
23
|
+
style: {
|
24
|
+
marginBottom: 16
|
25
|
+
},
|
26
|
+
children: "\u5361\u7247"
|
27
|
+
}), /*#__PURE__*/_jsx("div", {
|
28
|
+
children: /*#__PURE__*/_jsx(Tabs, {
|
29
|
+
defaultActiveKey: "2",
|
30
|
+
type: "card",
|
31
|
+
items: items
|
32
|
+
})
|
33
|
+
})]
|
34
|
+
});
|
35
|
+
});
|
@@ -0,0 +1,172 @@
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
2
|
+
var _templateObject;
|
3
|
+
// @ts-nocheck
|
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}\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 ", ";\n }\n .ant-radio-button-wrapper-checked:has(+ .ant-radio-button-wrapper-disabled) {\n border: 1px solid ", ";\n background: 1px solid ", ";\n }\n}\n"])), function (props) {
|
6
|
+
return props.layout;
|
7
|
+
}, function (props) {
|
8
|
+
return props.font.Regular;
|
9
|
+
}, function (props) {
|
10
|
+
return props.theme.colorPrimary;
|
11
|
+
}, function (props) {
|
12
|
+
return props.theme.CustomToken.Button.primaryColorDisabled;
|
13
|
+
}, function (props) {
|
14
|
+
return props.theme.CustomToken.Button.defaultBorderColorDisable;
|
15
|
+
}, function (props) {
|
16
|
+
return props.theme.colorError;
|
17
|
+
}, function (props) {
|
18
|
+
return props.theme.CustomToken.Button.dangerBg;
|
19
|
+
}, function (props) {
|
20
|
+
return props.theme.CustomToken.Button.dangerBorderColor;
|
21
|
+
}, function (props) {
|
22
|
+
return props.theme.dangerHoverColor;
|
23
|
+
}, function (props) {
|
24
|
+
return props.theme.CustomToken.Button.dangerBg;
|
25
|
+
}, function (props) {
|
26
|
+
return props.theme.CustomToken.Button.dangerBorderColor;
|
27
|
+
}, function (props) {
|
28
|
+
return props.theme.dangerActiveColor;
|
29
|
+
}, function (props) {
|
30
|
+
return props.theme.CustomToken.Button.resetBg;
|
31
|
+
}, function (props) {
|
32
|
+
return props.theme.CustomToken.Button.secondaryBorderColor;
|
33
|
+
}, function (props) {
|
34
|
+
return props.theme.CustomToken.Button.resetBg;
|
35
|
+
}, function (props) {
|
36
|
+
return props.theme.Button.defaultHoverColor;
|
37
|
+
}, function (props) {
|
38
|
+
return props.theme.CustomToken.Button.activeBorderColor;
|
39
|
+
}, function (props) {
|
40
|
+
return props.theme.CustomToken.Button.activeColor;
|
41
|
+
}, function (props) {
|
42
|
+
return props.theme.CustomToken.Button.secondaryColorDisabled;
|
43
|
+
}, function (props) {
|
44
|
+
return props.theme.CustomToken.Button.secondaryBgDisabled;
|
45
|
+
}, function (props) {
|
46
|
+
return props.theme.CustomToken.Button.secondaryBorderColor;
|
47
|
+
}, function (props) {
|
48
|
+
return props.theme.CustomToken.Button.secondaryColorDisabled;
|
49
|
+
}, function (props) {
|
50
|
+
return props.theme.CustomToken.Button.secondaryBgDisabled;
|
51
|
+
}, function (props) {
|
52
|
+
return props.theme.CustomToken.Button.secondaryBorderColor;
|
53
|
+
}, function (props) {
|
54
|
+
return props.theme.CustomToken.Button.secondaryColorDisabled;
|
55
|
+
}, function (props) {
|
56
|
+
return props.theme.CustomToken.Button.secondaryBorderColor;
|
57
|
+
}, function (props) {
|
58
|
+
return props.theme.CustomToken.Button.addBg;
|
59
|
+
}, function (props) {
|
60
|
+
return props.theme.colorPrimary;
|
61
|
+
}, function (props) {
|
62
|
+
return props.theme.CustomToken.Button.addBg;
|
63
|
+
}, function (props) {
|
64
|
+
return props.theme.CustomToken.Button.hoverColor;
|
65
|
+
}, function (props) {
|
66
|
+
return props.theme.CustomToken.Button.addHoverBg;
|
67
|
+
}, function (props) {
|
68
|
+
return props.theme.CustomToken.Button.addHoverBg;
|
69
|
+
}, function (props) {
|
70
|
+
return props.theme.CustomToken.Button.activeColor;
|
71
|
+
}, function (props) {
|
72
|
+
return props.theme.colorPrimary;
|
73
|
+
}, function (props) {
|
74
|
+
return props.theme.CustomToken.Button.addBg;
|
75
|
+
}, function (props) {
|
76
|
+
return props.theme.colorPrimary;
|
77
|
+
}, function (props) {
|
78
|
+
return props.theme.CustomToken.Button.addBg;
|
79
|
+
}, function (props) {
|
80
|
+
return props.theme.colorPrimary;
|
81
|
+
}, function (props) {
|
82
|
+
return props.theme.CustomToken.Button.resetBg;
|
83
|
+
}, function (props) {
|
84
|
+
return props.theme.CustomToken.Button.dashedBorderColor;
|
85
|
+
}, function (props) {
|
86
|
+
return props.theme.CustomToken.Button.resetBg;
|
87
|
+
}, function (props) {
|
88
|
+
return props.theme.CustomToken.Button.hoverColor;
|
89
|
+
}, function (props) {
|
90
|
+
return props.theme.CustomToken.Button.hoverColor;
|
91
|
+
}, function (props) {
|
92
|
+
return props.theme.CustomToken.Button.activeColor;
|
93
|
+
}, function (props) {
|
94
|
+
return props.theme.CustomToken.Button.activeColor;
|
95
|
+
}, function (props) {
|
96
|
+
return props.theme.colorError;
|
97
|
+
}, function (props) {
|
98
|
+
return props.theme.colorError;
|
99
|
+
}, function (props) {
|
100
|
+
return props.theme.colorErrorHover;
|
101
|
+
}, function (props) {
|
102
|
+
return props.theme.colorErrorBorderHover;
|
103
|
+
}, function (props) {
|
104
|
+
return props.theme.colorErrorActive;
|
105
|
+
}, function (props) {
|
106
|
+
return props.theme.colorError;
|
107
|
+
}, function (props) {
|
108
|
+
return props.theme.colorError;
|
109
|
+
}, function (props) {
|
110
|
+
return props.theme.colorError;
|
111
|
+
}, function (props) {
|
112
|
+
return props.theme.colorError;
|
113
|
+
}, function (props) {
|
114
|
+
return props.theme.CustomToken.Button.hoverColor;
|
115
|
+
}, function (props) {
|
116
|
+
return props.theme.CustomToken.Button.hoverColor;
|
117
|
+
}, function (props) {
|
118
|
+
return props.theme.CustomToken.Button.activeColor;
|
119
|
+
}, function (props) {
|
120
|
+
return props.theme.CustomToken.Button.activeColor;
|
121
|
+
}, function (props) {
|
122
|
+
return props.theme.CustomToken.Button.hoverColor;
|
123
|
+
}, function (props) {
|
124
|
+
return props.theme.CustomToken.Button.activeColor;
|
125
|
+
}, function (props) {
|
126
|
+
return props.theme.colorPrimary;
|
127
|
+
}, function (props) {
|
128
|
+
return props.theme.colorErrorHover;
|
129
|
+
}, function (props) {
|
130
|
+
return props.theme.colorErrorActive;
|
131
|
+
}, function (props) {
|
132
|
+
return props.theme.colorError;
|
133
|
+
}, function (props) {
|
134
|
+
return props.theme.CustomToken.Tabs.cardTabListBg;
|
135
|
+
}, function (props) {
|
136
|
+
return props.theme.CustomToken.Tabs.cardTabRadius;
|
137
|
+
}, function (props) {
|
138
|
+
return props.theme.CustomToken.Tabs.cardTabItemBorder;
|
139
|
+
}, function (props) {
|
140
|
+
return props.theme.CustomToken.Tabs.cardTabRadius;
|
141
|
+
}, function (props) {
|
142
|
+
return props.theme.CustomToken.Tabs.cardTabRadius;
|
143
|
+
}, function (props) {
|
144
|
+
return props.theme.CustomToken.Tabs.cardTabItemLineColor;
|
145
|
+
}, function (props) {
|
146
|
+
return props.theme.CustomToken.Tabs.cardTabRadius;
|
147
|
+
}, function (props) {
|
148
|
+
return props.theme.CustomToken.Tabs.cardTabItemLineColor;
|
149
|
+
}, function (props) {
|
150
|
+
return props.theme.CustomToken.Tabs.cardTabItemActiveBorder;
|
151
|
+
}, function (props) {
|
152
|
+
return props.theme.CustomToken.Pagination.totalTextColor;
|
153
|
+
}, function (props) {
|
154
|
+
return props.theme.CustomToken.Pagination.itemActiveHoverBorderColor;
|
155
|
+
}, function (props) {
|
156
|
+
return props.theme.CustomToken.Pagination.itemActiveColor;
|
157
|
+
}, function (props) {
|
158
|
+
return props.theme.Radio.buttonBg;
|
159
|
+
}, function (props) {
|
160
|
+
return props.theme.CustomToken.Radio.buttonLineHeight;
|
161
|
+
}, function (props) {
|
162
|
+
return props.theme.CustomToken.Radio.buttonLineBg;
|
163
|
+
}, function (props) {
|
164
|
+
return props.theme.colorPrimary;
|
165
|
+
}, function (props) {
|
166
|
+
return props.theme.Radio.colorBgContainerDisabled;
|
167
|
+
}, function (props) {
|
168
|
+
return props.theme.Radio.buttonCheckedColorDisabled;
|
169
|
+
}, function (props) {
|
170
|
+
return props.theme.Radio.buttonCheckedBgDisabled;
|
171
|
+
});
|
172
|
+
export default globalStyle;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ThemeConfig } from 'antd/es/config-provider/context';
|
3
|
+
import { IMcThemeProviderProps } from './provider';
|
4
|
+
type McThemeConfigType = ThemeConfig & {
|
5
|
+
ThemeToken: ThemeConfig;
|
6
|
+
Provider: ({ children }: IMcThemeProviderProps) => JSX.Element;
|
7
|
+
};
|
8
|
+
declare const McThemeConfig: McThemeConfigType;
|
9
|
+
export default McThemeConfig;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import { default as CustomToken } from "./customToken.json";
|
3
|
+
import Provider from "./provider";
|
4
|
+
import { default as ThemeToken } from "./themeToken.json";
|
5
|
+
var token = ThemeToken.token,
|
6
|
+
components = ThemeToken.components;
|
7
|
+
var AllToken = {
|
8
|
+
token: token,
|
9
|
+
components: _objectSpread(_objectSpread({}, components), CustomToken)
|
10
|
+
};
|
11
|
+
var McThemeConfig = _objectSpread(_objectSpread({}, AllToken), {}, {
|
12
|
+
// 兼容 1.0.1 默认导出 theme.json
|
13
|
+
ThemeToken: AllToken,
|
14
|
+
Provider: Provider
|
15
|
+
});
|
16
|
+
export default McThemeConfig;
|
@@ -0,0 +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-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
|
+
export default _default;
|
@@ -0,0 +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-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 }";
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ReactElement } from 'react';
|
2
|
+
export interface IMcThemeProviderProps {
|
3
|
+
children: ReactElement;
|
4
|
+
layout?: boolean;
|
5
|
+
}
|
6
|
+
declare const McThemeProvider: ({ children, layout }: IMcThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default McThemeProvider;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ThemeProvider } from 'antd-style';
|
2
|
+
import { McFonts } from "./..";
|
3
|
+
import GlobalStyle from "./globalStyle";
|
4
|
+
import McThemeConfig from "./index";
|
5
|
+
import LayoutStyle from "./layoutStyle";
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
var McThemeProvider = function McThemeProvider(_ref) {
|
9
|
+
var children = _ref.children,
|
10
|
+
layout = _ref.layout;
|
11
|
+
return /*#__PURE__*/_jsxs(ThemeProvider, {
|
12
|
+
theme: McThemeConfig.ThemeToken,
|
13
|
+
children: [/*#__PURE__*/_jsx(GlobalStyle, {
|
14
|
+
font: McFonts,
|
15
|
+
layout: layout ? LayoutStyle : ''
|
16
|
+
}), children]
|
17
|
+
});
|
18
|
+
};
|
19
|
+
export default McThemeProvider;
|