@zat-design/sisyphus-react 3.1.4 → 3.1.5-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dumi/theme/builtins/Alert.tsx +19 -0
- package/.dumi/theme/builtins/Previewer.tsx +232 -0
- package/.dumi/theme/builtins/SourceCode.tsx +64 -0
- package/.dumi/theme/hooks/useCodeSandbox.tsx +197 -0
- package/.dumi/theme/hooks/useTheme.tsx +707 -0
- package/.dumi/theme/layouts/BasicLayout.tsx +88 -0
- package/.dumi/theme/layouts/components/Dark.less +157 -0
- package/.dumi/theme/layouts/components/Dark.tsx +78 -0
- package/.dumi/theme/layouts/components/Navbar.tsx +83 -0
- package/.dumi/theme/layouts/components/SideMenu.tsx +61 -0
- package/.dumi/theme/layouts/index.tsx +26 -0
- package/.dumi/theme/layouts/layout.less +87 -0
- package/.dumi/theme/typings.d.ts +7 -0
- package/dist/index.esm.css +122 -249
- package/es/ProAction/index.less +3 -2
- package/es/ProConfigProvider/index.d.ts +2 -0
- package/es/ProConfigProvider/index.js +18 -2
- package/es/ProDrawerForm/index.js +5 -3
- package/es/ProDrawerForm/style/index.less +15 -11
- package/es/ProEditLabel/style/index.less +2 -2
- package/es/ProEditTable/style/index.less +15 -8
- package/es/ProEditTable/utils/config.js +11 -4
- package/es/ProEnum/style/index.less +1 -1
- package/es/ProForm/components/base/RangePicker/index.js +0 -3
- package/es/ProForm/components/base/TextArea/index.less +1 -1
- package/es/ProForm/components/combination/Container/style/index.less +0 -1
- package/es/ProForm/components/combination/FormList/style/index.less +20 -19
- package/es/ProForm/components/combination/Group/index.js +2 -2
- package/es/ProForm/components/combination/ProAddressBar/index.js +81 -61
- package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +75 -13
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/es/ProForm/components/render/RenderFields.js +10 -5
- package/es/ProForm/components/render/propsType.d.ts +5 -4
- package/es/ProForm/index.js +5 -0
- package/es/ProForm/style/index.less +55 -169
- package/es/ProForm/utils/useShouldUpdate.js +16 -16
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
- package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/es/ProLayout/components/ProHeader/components/index.js +2 -1
- package/es/ProLayout/components/ProHeader/index.js +4 -2
- package/es/ProLayout/components/ProHeader/style/index.less +16 -7
- package/es/ProStep/style/index.less +0 -1
- package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/es/ProTable/components/RenderColumn/index.js +41 -25
- package/es/ProTable/index.js +3 -2
- package/es/ProTable/propsType.d.ts +2 -0
- package/es/ProTable/style/index.less +14 -1
- package/es/ProTable/utils.d.ts +1 -1
- package/es/ProTable/utils.js +258 -201
- package/es/ProTabs/style/index.less +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +1 -1
- package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/index.js +24 -17
- package/es/ProThemeTools/propsType.d.ts +8 -6
- package/es/ProThemeTools/style/index.less +2 -2
- package/es/ProThemeTools/utils/index.d.ts +7 -0
- package/es/ProThemeTools/utils/index.js +19 -1
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/components/SearchTitle.js +11 -1
- package/es/ProTree/components/Tree.js +6 -1
- package/es/ProTree/style/index.less +193 -141
- package/es/ProTreeModal/style/index.less +2 -6
- package/es/ProUpload/style/index.less +41 -39
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/locale/en_US.d.ts +69 -0
- package/es/locale/en_US.js +68 -0
- package/es/locale/index.d.ts +7 -0
- package/es/locale/index.js +21 -0
- package/es/locale/zh_CN.d.ts +69 -0
- package/es/locale/zh_CN.js +68 -0
- package/es/old/ProEditableTable/style/index.less +1 -2
- package/es/style/components.less +0 -1
- package/es/style/core/normalize.less +1 -1
- package/es/style/theme/antd.less +3 -4
- package/es/style/theme/index.less +80 -79
- package/es/style/theme/tokens.less +1 -0
- package/lib/ProAction/index.less +3 -2
- package/lib/ProConfigProvider/index.d.ts +2 -0
- package/lib/ProConfigProvider/index.js +17 -2
- package/lib/ProDrawerForm/index.js +5 -3
- package/lib/ProDrawerForm/style/index.less +15 -11
- package/lib/ProEditLabel/style/index.less +2 -2
- package/lib/ProEditTable/style/index.less +15 -8
- package/lib/ProEditTable/utils/config.js +11 -4
- package/lib/ProEnum/style/index.less +1 -1
- package/lib/ProForm/components/base/RangePicker/index.js +0 -3
- package/lib/ProForm/components/base/TextArea/index.less +1 -1
- package/lib/ProForm/components/combination/Container/style/index.less +0 -1
- package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
- package/lib/ProForm/components/combination/Group/index.js +2 -2
- package/lib/ProForm/components/combination/ProAddressBar/index.js +76 -58
- package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +75 -13
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/lib/ProForm/components/render/RenderFields.js +9 -4
- package/lib/ProForm/components/render/propsType.d.ts +5 -4
- package/lib/ProForm/index.js +5 -0
- package/lib/ProForm/style/index.less +55 -169
- package/lib/ProForm/utils/useShouldUpdate.js +16 -16
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
- package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
- package/lib/ProLayout/components/ProHeader/index.js +4 -2
- package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
- package/lib/ProStep/style/index.less +0 -1
- package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/lib/ProTable/components/RenderColumn/index.js +38 -24
- package/lib/ProTable/index.js +3 -2
- package/lib/ProTable/propsType.d.ts +2 -0
- package/lib/ProTable/style/index.less +14 -1
- package/lib/ProTable/utils.d.ts +1 -1
- package/lib/ProTable/utils.js +258 -201
- package/lib/ProTabs/style/index.less +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
- package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/index.js +23 -16
- package/lib/ProThemeTools/propsType.d.ts +8 -6
- package/lib/ProThemeTools/style/index.less +2 -2
- package/lib/ProThemeTools/utils/index.d.ts +7 -0
- package/lib/ProThemeTools/utils/index.js +20 -2
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/components/SearchTitle.js +11 -1
- package/lib/ProTree/components/Tree.js +6 -1
- package/lib/ProTree/style/index.less +193 -141
- package/lib/ProTreeModal/style/index.less +2 -6
- package/lib/ProUpload/style/index.less +41 -39
- package/lib/index.d.ts +2 -1
- package/lib/index.js +13 -1
- package/lib/locale/en_US.d.ts +69 -0
- package/lib/locale/en_US.js +74 -0
- package/lib/locale/index.d.ts +7 -0
- package/lib/locale/index.js +28 -0
- package/lib/locale/zh_CN.d.ts +69 -0
- package/lib/locale/zh_CN.js +74 -0
- package/lib/old/ProEditableTable/style/index.less +1 -2
- package/lib/style/components.less +0 -1
- package/lib/style/core/normalize.less +1 -1
- package/lib/style/theme/antd.less +3 -4
- package/lib/style/theme/index.less +80 -79
- package/lib/style/theme/tokens.less +1 -0
- package/package.json +2 -2
- package/typings.d.ts +2 -0
- package/es/old/ProBackBtn/style/index.less +0 -19
- package/lib/old/ProBackBtn/style/index.less +0 -19
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import { usePrefersColor } from '@umijs/preset-dumi/lib/theme'
|
|
2
|
+
import { Button, Popover, Radio, Space } from 'antd'
|
|
3
|
+
import { BgColorsOutlined } from '@ant-design/icons'
|
|
4
|
+
import React, { useState, useEffect } from 'react'
|
|
5
|
+
|
|
6
|
+
function loadCss(target, cb) {
|
|
7
|
+
let before = document.querySelectorAll('.amiya-theme')
|
|
8
|
+
let css = document.createElement('style')
|
|
9
|
+
css.innerHTML = target.style
|
|
10
|
+
css.className = 'amiya-theme'
|
|
11
|
+
document.getElementsByTagName('head')[0].appendChild(css)
|
|
12
|
+
css.onload = () => {
|
|
13
|
+
// 删除之前存在的
|
|
14
|
+
if (before.length) {
|
|
15
|
+
before.forEach(node => node.parentElement.removeChild(node))
|
|
16
|
+
}
|
|
17
|
+
cb()
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export let linkList = [
|
|
22
|
+
{
|
|
23
|
+
dark: false,
|
|
24
|
+
name: 'default',
|
|
25
|
+
cn: '默认',
|
|
26
|
+
color: '#1890ff',
|
|
27
|
+
style: `:root {
|
|
28
|
+
--ant-primary-color: rgb(24, 144, 255);
|
|
29
|
+
--ant-primary-color-disabled: #bae7ff;
|
|
30
|
+
--ant-primary-color-hover: #40a9ff;
|
|
31
|
+
--ant-primary-color-active: #0050b3;
|
|
32
|
+
--ant-primary-color-outline: rgba(24, 144, 255, 0.2);
|
|
33
|
+
--ant-primary-color-deprecated-bg: #bae7ff;
|
|
34
|
+
--ant-primary-color-deprecated-border: #69c0ff;
|
|
35
|
+
--ant-primary-1: #e6f7ff;
|
|
36
|
+
--ant-primary-2: #bae7ff;
|
|
37
|
+
--ant-primary-3: #91d5ff;
|
|
38
|
+
--ant-primary-4: #69c0ff;
|
|
39
|
+
--ant-primary-5: #40a9ff;
|
|
40
|
+
--ant-primary-6: #1890ff;
|
|
41
|
+
--ant-primary-7: #096dd9;
|
|
42
|
+
--ant-primary-8: #0050b3;
|
|
43
|
+
--ant-primary-9: #003a8c;
|
|
44
|
+
--ant-primary-10: #002766;
|
|
45
|
+
--ant-primary-color-deprecated-l-35: rgb(202, 230, 255);
|
|
46
|
+
--ant-primary-color-deprecated-l-20: rgb(126, 193, 255);
|
|
47
|
+
--ant-primary-color-deprecated-t-20: rgb(70, 166, 255);
|
|
48
|
+
--ant-primary-color-deprecated-t-50: rgb(140, 200, 255);
|
|
49
|
+
--ant-primary-color-deprecated-f-12: rgba(24, 144, 255, 0.12);
|
|
50
|
+
--ant-primary-color-active-deprecated-f-30: rgba(230, 247, 255, 0.3);
|
|
51
|
+
--ant-primary-color-active-deprecated-d-02: rgb(220, 244, 255);
|
|
52
|
+
}`
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
dark: false,
|
|
56
|
+
name: 'cyan',
|
|
57
|
+
cn: '明青',
|
|
58
|
+
color: '#13c2c2',
|
|
59
|
+
style: `:root {
|
|
60
|
+
--ant-primary-color: rgb(19, 194, 194);
|
|
61
|
+
--ant-primary-color-disabled: #b5f5ec;
|
|
62
|
+
--ant-primary-color-hover: #36cfc9;
|
|
63
|
+
--ant-primary-color-active: #006d75;
|
|
64
|
+
--ant-primary-color-outline: rgba(19, 194, 194, 0.2);
|
|
65
|
+
--ant-primary-color-deprecated-bg: #b5f5ec;
|
|
66
|
+
--ant-primary-color-deprecated-border: #5cdbd3;
|
|
67
|
+
--ant-primary-1: #e6fffb;
|
|
68
|
+
--ant-primary-2: #b5f5ec;
|
|
69
|
+
--ant-primary-3: #87e8de;
|
|
70
|
+
--ant-primary-4: #5cdbd3;
|
|
71
|
+
--ant-primary-5: #36cfc9;
|
|
72
|
+
--ant-primary-6: #13c2c2;
|
|
73
|
+
--ant-primary-7: #08979c;
|
|
74
|
+
--ant-primary-8: #006d75;
|
|
75
|
+
--ant-primary-9: #00474f;
|
|
76
|
+
--ant-primary-10: #002329;
|
|
77
|
+
--ant-primary-color-deprecated-l-35: rgb(147, 244, 244);
|
|
78
|
+
--ant-primary-color-deprecated-l-20: rgb(77, 238, 238);
|
|
79
|
+
--ant-primary-color-deprecated-t-20: rgb(66, 206, 206);
|
|
80
|
+
--ant-primary-color-deprecated-t-50: rgb(137, 225, 225);
|
|
81
|
+
--ant-primary-color-deprecated-f-12: rgba(19, 194, 194, 0.12);
|
|
82
|
+
--ant-primary-color-active-deprecated-f-30: rgba(230, 255, 251, 0.3);
|
|
83
|
+
--ant-primary-color-active-deprecated-d-02: rgb(220, 255, 249);
|
|
84
|
+
}`
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
dark: false,
|
|
88
|
+
name: 'dust',
|
|
89
|
+
cn: '薄暮',
|
|
90
|
+
color: '#f5222d',
|
|
91
|
+
style: `:root {
|
|
92
|
+
--ant-primary-color: rgb(245, 34, 45);
|
|
93
|
+
--ant-primary-color-disabled: #ffccc7;
|
|
94
|
+
--ant-primary-color-hover: #ff4d4f;
|
|
95
|
+
--ant-primary-color-active: #a8071a;
|
|
96
|
+
--ant-primary-color-outline: rgba(245, 34, 45, 0.2);
|
|
97
|
+
--ant-primary-color-deprecated-bg: #ffccc7;
|
|
98
|
+
--ant-primary-color-deprecated-border: #ff7875;
|
|
99
|
+
--ant-primary-1: #fff1f0;
|
|
100
|
+
--ant-primary-2: #ffccc7;
|
|
101
|
+
--ant-primary-3: #ffa39e;
|
|
102
|
+
--ant-primary-4: #ff7875;
|
|
103
|
+
--ant-primary-5: #ff4d4f;
|
|
104
|
+
--ant-primary-6: #f5222d;
|
|
105
|
+
--ant-primary-7: #cf1322;
|
|
106
|
+
--ant-primary-8: #a8071a;
|
|
107
|
+
--ant-primary-9: #820014;
|
|
108
|
+
--ant-primary-10: #5c0011;
|
|
109
|
+
--ant-primary-color-deprecated-l-35: rgb(253, 205, 207);
|
|
110
|
+
--ant-primary-color-deprecated-l-20: rgb(249, 132, 138);
|
|
111
|
+
--ant-primary-color-deprecated-t-20: rgb(247, 78, 87);
|
|
112
|
+
--ant-primary-color-deprecated-t-50: rgb(250, 145, 150);
|
|
113
|
+
--ant-primary-color-deprecated-f-12: rgba(245, 34, 45, 0.12);
|
|
114
|
+
--ant-primary-color-active-deprecated-f-30: rgba(255, 241, 240, 0.3);
|
|
115
|
+
--ant-primary-color-active-deprecated-d-02: rgb(255, 231, 230);
|
|
116
|
+
}`
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
dark: false,
|
|
120
|
+
name: 'geekblue',
|
|
121
|
+
cn: '极客蓝',
|
|
122
|
+
color: '#2f54eb',
|
|
123
|
+
style: `
|
|
124
|
+
--ant-primary-color: rgb(47, 84, 235);
|
|
125
|
+
--ant-primary-color-disabled: #d6e4ff;
|
|
126
|
+
--ant-primary-color-hover: #597ef7;
|
|
127
|
+
--ant-primary-color-active: #10239e;
|
|
128
|
+
--ant-primary-color-outline: rgba(47, 84, 235, 0.2);
|
|
129
|
+
--ant-primary-color-deprecated-bg: #d6e4ff;
|
|
130
|
+
--ant-primary-color-deprecated-border: #85a5ff;
|
|
131
|
+
--ant-primary-1: #f0f5ff;
|
|
132
|
+
--ant-primary-2: #d6e4ff;
|
|
133
|
+
--ant-primary-3: #adc6ff;
|
|
134
|
+
--ant-primary-4: #85a5ff;
|
|
135
|
+
--ant-primary-5: #597ef7;
|
|
136
|
+
--ant-primary-6: #2f54eb;
|
|
137
|
+
--ant-primary-7: #1d39c4;
|
|
138
|
+
--ant-primary-8: #10239e;
|
|
139
|
+
--ant-primary-9: #061178;
|
|
140
|
+
--ant-primary-10: #030852;
|
|
141
|
+
--ant-primary-color-deprecated-l-35: rgb(210, 218, 251);
|
|
142
|
+
--ant-primary-color-deprecated-l-20: rgb(140, 160, 244);
|
|
143
|
+
--ant-primary-color-deprecated-t-20: rgb(89, 118, 239);
|
|
144
|
+
--ant-primary-color-deprecated-t-50: rgb(151, 170, 245);
|
|
145
|
+
--ant-primary-color-deprecated-f-12: rgba(47, 84, 235, 0.12);
|
|
146
|
+
--ant-primary-color-active-deprecated-f-30: rgba(240, 245, 255, 0.3);
|
|
147
|
+
--ant-primary-color-active-deprecated-d-02: rgb(230, 238, 255);
|
|
148
|
+
`
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
dark: false,
|
|
152
|
+
name: 'green',
|
|
153
|
+
cn: '极光绿',
|
|
154
|
+
color: '#52c41a',
|
|
155
|
+
style: `
|
|
156
|
+
--ant-primary-color: rgb(82, 196, 26);
|
|
157
|
+
--ant-primary-color-disabled: #d9f7be;
|
|
158
|
+
--ant-primary-color-hover: #73d13d;
|
|
159
|
+
--ant-primary-color-active: #237804;
|
|
160
|
+
--ant-primary-color-outline: rgba(82, 196, 26, 0.2);
|
|
161
|
+
--ant-primary-color-deprecated-bg: #d9f7be;
|
|
162
|
+
--ant-primary-color-deprecated-border: #95de64;
|
|
163
|
+
--ant-primary-1: #f6ffed;
|
|
164
|
+
--ant-primary-2: #d9f7be;
|
|
165
|
+
--ant-primary-3: #b7eb8f;
|
|
166
|
+
--ant-primary-4: #95de64;
|
|
167
|
+
--ant-primary-5: #73d13d;
|
|
168
|
+
--ant-primary-6: #52c41a;
|
|
169
|
+
--ant-primary-7: #389e0d;
|
|
170
|
+
--ant-primary-8: #237804;
|
|
171
|
+
--ant-primary-9: #135200;
|
|
172
|
+
--ant-primary-10: #092b00;
|
|
173
|
+
--ant-primary-color-deprecated-l-35: rgb(186, 242, 158);
|
|
174
|
+
--ant-primary-color-deprecated-l-20: rgb(138, 233, 91);
|
|
175
|
+
--ant-primary-color-deprecated-t-20: rgb(117, 208, 72);
|
|
176
|
+
--ant-primary-color-deprecated-t-50: rgb(169, 226, 141);
|
|
177
|
+
--ant-primary-color-deprecated-f-12: rgba(82, 196, 26, 0.12);
|
|
178
|
+
--ant-primary-color-active-deprecated-f-30: rgba(246, 255, 237, 0.3);
|
|
179
|
+
--ant-primary-color-active-deprecated-d-02: rgb(241, 255, 227);
|
|
180
|
+
`
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
dark: false,
|
|
184
|
+
name: 'purple',
|
|
185
|
+
cn: '酱紫',
|
|
186
|
+
color: '#722ed1',
|
|
187
|
+
style: `
|
|
188
|
+
--ant-primary-color: rgb(114, 46, 209);
|
|
189
|
+
--ant-primary-color-disabled: #efdbff;
|
|
190
|
+
--ant-primary-color-hover: #9254de;
|
|
191
|
+
--ant-primary-color-active: #391085;
|
|
192
|
+
--ant-primary-color-outline: rgba(114, 46, 209, 0.2);
|
|
193
|
+
--ant-primary-color-deprecated-bg: #efdbff;
|
|
194
|
+
--ant-primary-color-deprecated-border: #b37feb;
|
|
195
|
+
--ant-primary-1: #f9f0ff;
|
|
196
|
+
--ant-primary-2: #efdbff;
|
|
197
|
+
--ant-primary-3: #d3adf7;
|
|
198
|
+
--ant-primary-4: #b37feb;
|
|
199
|
+
--ant-primary-5: #9254de;
|
|
200
|
+
--ant-primary-6: #722ed1;
|
|
201
|
+
--ant-primary-7: #531dab;
|
|
202
|
+
--ant-primary-8: #391085;
|
|
203
|
+
--ant-primary-9: #22075e;
|
|
204
|
+
--ant-primary-10: #120338;
|
|
205
|
+
--ant-primary-color-deprecated-l-35: rgb(213, 192, 241);
|
|
206
|
+
--ant-primary-color-deprecated-l-20: rgb(170, 130, 227);
|
|
207
|
+
--ant-primary-color-deprecated-t-20: rgb(142, 88, 218);
|
|
208
|
+
--ant-primary-color-deprecated-t-50: rgb(185, 151, 232);
|
|
209
|
+
--ant-primary-color-deprecated-f-12: rgba(114, 46, 209, 0.12);
|
|
210
|
+
--ant-primary-color-active-deprecated-f-30: rgba(249, 240, 255, 0.3);
|
|
211
|
+
--ant-primary-color-active-deprecated-d-02: rgb(245, 230, 255);
|
|
212
|
+
`
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
dark: false,
|
|
216
|
+
name: 'sunset',
|
|
217
|
+
cn: '日暮',
|
|
218
|
+
color: '#fa8c16',
|
|
219
|
+
style: `
|
|
220
|
+
--ant-primary-color: rgb(250, 173, 20);
|
|
221
|
+
--ant-primary-color-disabled: #fff1b8;
|
|
222
|
+
--ant-primary-color-hover: #ffc53d;
|
|
223
|
+
--ant-primary-color-active: #ad6800;
|
|
224
|
+
--ant-primary-color-outline: rgba(250, 173, 20, 0.2);
|
|
225
|
+
--ant-primary-color-deprecated-bg: #fff1b8;
|
|
226
|
+
--ant-primary-color-deprecated-border: #ffd666;
|
|
227
|
+
--ant-primary-1: #fffbe6;
|
|
228
|
+
--ant-primary-2: #fff1b8;
|
|
229
|
+
--ant-primary-3: #ffe58f;
|
|
230
|
+
--ant-primary-4: #ffd666;
|
|
231
|
+
--ant-primary-5: #ffc53d;
|
|
232
|
+
--ant-primary-6: #faad14;
|
|
233
|
+
--ant-primary-7: #d48806;
|
|
234
|
+
--ant-primary-8: #ad6800;
|
|
235
|
+
--ant-primary-9: #874d00;
|
|
236
|
+
--ant-primary-10: #613400;
|
|
237
|
+
--ant-primary-color-deprecated-l-35: rgb(254, 234, 195);
|
|
238
|
+
--ant-primary-color-deprecated-l-20: rgb(252, 208, 120);
|
|
239
|
+
--ant-primary-color-deprecated-t-20: rgb(251, 189, 67);
|
|
240
|
+
--ant-primary-color-deprecated-t-50: rgb(253, 214, 138);
|
|
241
|
+
--ant-primary-color-deprecated-f-12: rgba(250, 173, 20, 0.12);
|
|
242
|
+
--ant-primary-color-active-deprecated-f-30: rgba(255, 251, 230, 0.3);
|
|
243
|
+
--ant-primary-color-active-deprecated-d-02: rgb(255, 249, 220);
|
|
244
|
+
`
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
dark: false,
|
|
248
|
+
name: 'volcano',
|
|
249
|
+
cn: '火山',
|
|
250
|
+
color: '#fa541c',
|
|
251
|
+
style: `
|
|
252
|
+
--ant-primary-color: rgb(250, 84, 28);
|
|
253
|
+
--ant-primary-color-disabled: #ffd8bf;
|
|
254
|
+
--ant-primary-color-hover: #ff7a45;
|
|
255
|
+
--ant-primary-color-active: #ad2102;
|
|
256
|
+
--ant-primary-color-outline: rgba(250, 84, 28, 0.2);
|
|
257
|
+
--ant-primary-color-deprecated-bg: #ffd8bf;
|
|
258
|
+
--ant-primary-color-deprecated-border: #ff9c6e;
|
|
259
|
+
--ant-primary-1: #fff2e8;
|
|
260
|
+
--ant-primary-2: #ffd8bf;
|
|
261
|
+
--ant-primary-3: #ffbb96;
|
|
262
|
+
--ant-primary-4: #ff9c6e;
|
|
263
|
+
--ant-primary-5: #ff7a45;
|
|
264
|
+
--ant-primary-6: #fa541c;
|
|
265
|
+
--ant-primary-7: #d4380d;
|
|
266
|
+
--ant-primary-8: #ad2102;
|
|
267
|
+
--ant-primary-9: #871400;
|
|
268
|
+
--ant-primary-10: #610b00;
|
|
269
|
+
--ant-primary-color-deprecated-l-35: rgb(254, 216, 203);
|
|
270
|
+
--ant-primary-color-deprecated-l-20: rgb(252, 159, 128);
|
|
271
|
+
--ant-primary-color-deprecated-t-20: rgb(251, 118, 73);
|
|
272
|
+
--ant-primary-color-deprecated-t-50: rgb(253, 170, 142);
|
|
273
|
+
--ant-primary-color-deprecated-f-12: rgba(250, 84, 28, 0.12);
|
|
274
|
+
--ant-primary-color-active-deprecated-f-30: rgba(255, 242, 232, 0.3);
|
|
275
|
+
--ant-primary-color-active-deprecated-d-02: rgb(255, 236, 222);
|
|
276
|
+
`
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
dark: true,
|
|
280
|
+
name: 'dark',
|
|
281
|
+
cn: '默认',
|
|
282
|
+
color: '#1890ff',
|
|
283
|
+
style: `
|
|
284
|
+
--darkreader-bg--ant-primary-color: #1765ae;
|
|
285
|
+
--darkreader-text--ant-primary-color: #409fe7;
|
|
286
|
+
--darkreader-border--ant-primary-color: #165d9d;
|
|
287
|
+
--ant-primary-color-disabled: #bae7ff;
|
|
288
|
+
--darkreader-bg--ant-primary-color-hover: #165f99;
|
|
289
|
+
--darkreader-text--ant-primary-color-hover: #59ace8;
|
|
290
|
+
--darkreader-border--ant-primary-color-hover: #165c94;
|
|
291
|
+
--darkreader-bg--ant-primary-color-active: #144785;
|
|
292
|
+
--darkreader-text--ant-primary-color-active: #70b2e9;
|
|
293
|
+
--darkreader-border--ant-primary-color-active: #175fb6;
|
|
294
|
+
--darkreader-bg--ant-primary-color-outline: rgba(23, 101, 174, 0.2);
|
|
295
|
+
--ant-primary-color-deprecated-bg: #bae7ff;
|
|
296
|
+
--ant-primary-color-deprecated-border: #69c0ff;
|
|
297
|
+
--darkreader-bg--ant-primary-1: #113545;
|
|
298
|
+
--darkreader-bg--ant-primary-2: #363838;
|
|
299
|
+
--darkreader-border--ant-primary-3: #155780;
|
|
300
|
+
--ant-primary-4: #69c0ff;
|
|
301
|
+
--darkreader-bg--ant-primary-5: #165f99;
|
|
302
|
+
--darkreader-text--ant-primary-5: #59ace8;
|
|
303
|
+
--darkreader-border--ant-primary-5: #165c94;
|
|
304
|
+
--darkreader-bg--ant-primary-6: #1765ae;
|
|
305
|
+
--darkreader-text--ant-primary-6: #409fe7;
|
|
306
|
+
--darkreader-bg--ant-primary-7: #1c5ca0;
|
|
307
|
+
--darkreader-text--ant-primary-7: #5da6e2;
|
|
308
|
+
--darkreader-border--ant-primary-7: #1c5ea5;
|
|
309
|
+
--ant-primary-8: #0050b3;
|
|
310
|
+
--ant-primary-9: #003a8c;
|
|
311
|
+
--ant-primary-10: #002766;
|
|
312
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #323434;
|
|
313
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #154f84;
|
|
314
|
+
--ant-primary-color-deprecated-t-20: rgb(70, 166, 255);
|
|
315
|
+
--ant-primary-color-deprecated-t-50: rgb(140, 200, 255);
|
|
316
|
+
--ant-primary-color-deprecated-f-12: rgba(24, 144, 255, 0.12);
|
|
317
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(17, 53, 69, 0.3);
|
|
318
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #12394a;
|
|
319
|
+
`
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
dark: true,
|
|
323
|
+
name: 'dark-cyan',
|
|
324
|
+
cn: '明青',
|
|
325
|
+
color: '#13c2c2',
|
|
326
|
+
style: `
|
|
327
|
+
--darkreader-bg--ant-primary-color: #279794;
|
|
328
|
+
--darkreader-text--ant-primary-color: #5fe1dd;
|
|
329
|
+
--darkreader-border--ant-primary-color: #2ba8a4;
|
|
330
|
+
--ant-primary-color-disabled: #b5f5ec;
|
|
331
|
+
--darkreader-bg--ant-primary-color-hover: #3c9e97;
|
|
332
|
+
--darkreader-text--ant-primary-color-hover: #5dcbc2;
|
|
333
|
+
--darkreader-border--ant-primary-color-hover: #368d86;
|
|
334
|
+
--darkreader-bg--ant-primary-color-active: #155a5e;
|
|
335
|
+
--darkreader-text--ant-primary-color-active: #8aebed;
|
|
336
|
+
--darkreader-border--ant-primary-color-active: #1fc3cb;
|
|
337
|
+
--darkreader-bg--ant-primary-color-outline: rgba(39, 151, 148, 0.2);
|
|
338
|
+
--ant-primary-color-deprecated-bg: #b5f5ec;
|
|
339
|
+
--ant-primary-color-deprecated-border: #5cdbd3;
|
|
340
|
+
--darkreader-bg--ant-primary-1: #134740;
|
|
341
|
+
--darkreader-bg--ant-primary-2: #1f5c54;
|
|
342
|
+
--darkreader-border--ant-primary-3: #2b7a6e;
|
|
343
|
+
--ant-primary-4: #5cdbd3;
|
|
344
|
+
--darkreader-bg--ant-primary-5: #3c9e97;
|
|
345
|
+
--darkreader-text--ant-primary-5: #5dcbc2;
|
|
346
|
+
--darkreader-border--ant-primary-5: #368d86;
|
|
347
|
+
--darkreader-bg--ant-primary-6: #279794;
|
|
348
|
+
--darkreader-text--ant-primary-6: #5fe1dd;
|
|
349
|
+
--darkreader-bg--ant-primary-7: #1d7979;
|
|
350
|
+
--darkreader-text--ant-primary-7: #74e7e6;
|
|
351
|
+
--darkreader-border--ant-primary-7: #26b5b7;
|
|
352
|
+
--ant-primary-8: #006d75;
|
|
353
|
+
--ant-primary-9: #00474f;
|
|
354
|
+
--ant-primary-10: #002329;
|
|
355
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #20706d;
|
|
356
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #26908d;
|
|
357
|
+
--ant-primary-color-deprecated-t-20: rgb(66, 206, 206);
|
|
358
|
+
--ant-primary-color-deprecated-t-50: rgb(137, 225, 225);
|
|
359
|
+
--ant-primary-color-deprecated-f-12: rgba(19, 194, 194, 0.12);
|
|
360
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(19, 71, 64, 0.3);
|
|
361
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #134d44;
|
|
362
|
+
}
|
|
363
|
+
`
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
dark: true,
|
|
367
|
+
name: 'dark-dust',
|
|
368
|
+
cn: '薄暮',
|
|
369
|
+
color: '#f5222d',
|
|
370
|
+
style: `
|
|
371
|
+
--darkreader-bg--ant-primary-color: #a71a1f;
|
|
372
|
+
--darkreader-text--ant-primary-color: #e24348;
|
|
373
|
+
--darkreader-border--ant-primary-color: #99191e;
|
|
374
|
+
--ant-primary-color-disabled: #ffccc7;
|
|
375
|
+
--darkreader-bg--ant-primary-color-hover: #931212;
|
|
376
|
+
--darkreader-text--ant-primary-color-hover: #ec5b59;
|
|
377
|
+
--darkreader-border--ant-primary-color-hover: #901212;
|
|
378
|
+
--darkreader-bg--ant-primary-color-active: #7f1721;
|
|
379
|
+
--darkreader-text--ant-primary-color-active: #e7636f;
|
|
380
|
+
--darkreader-border--ant-primary-color-active: #b21b2a;
|
|
381
|
+
--darkreader-bg--ant-primary-color-outline: rgba(167, 26, 31, 0.2);
|
|
382
|
+
--ant-primary-color-deprecated-bg: #ffccc7;
|
|
383
|
+
--ant-primary-color-deprecated-border: #ff7875;
|
|
384
|
+
--darkreader-bg--ant-primary-1: #40120e;
|
|
385
|
+
--darkreader-bg--ant-primary-2: #56170f;
|
|
386
|
+
--darkreader-border--ant-primary-3: #7c1710;
|
|
387
|
+
--ant-primary-4: #ff7875;
|
|
388
|
+
--darkreader-bg--ant-primary-5: #931212;
|
|
389
|
+
--darkreader-text--ant-primary-5: #ec5b59;
|
|
390
|
+
--darkreader-border--ant-primary-5: #901212;
|
|
391
|
+
--darkreader-bg--ant-primary-6: #a71a1f;
|
|
392
|
+
--darkreader-text--ant-primary-6: #e24348;
|
|
393
|
+
--darkreader-bg--ant-primary-7: #9b2028;
|
|
394
|
+
--darkreader-text--ant-primary-7: #db4d55;
|
|
395
|
+
--darkreader-border--ant-primary-7: #9f2129;
|
|
396
|
+
--ant-primary-8: #a8071a;
|
|
397
|
+
--ant-primary-9: #820014;
|
|
398
|
+
--ant-primary-10: #5c0011;
|
|
399
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #501214;
|
|
400
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #7f181b;
|
|
401
|
+
--ant-primary-color-deprecated-t-20: rgb(247, 78, 87);
|
|
402
|
+
--ant-primary-color-deprecated-t-50: rgb(250, 145, 150);
|
|
403
|
+
--ant-primary-color-deprecated-f-12: rgba(245, 34, 45, 0.12);
|
|
404
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(64, 18, 14, 0.3);
|
|
405
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #45120e;
|
|
406
|
+
`
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
dark: true,
|
|
410
|
+
name: 'dark-geekblue',
|
|
411
|
+
cn: '极客蓝',
|
|
412
|
+
color: '#2f54eb',
|
|
413
|
+
style: `
|
|
414
|
+
--darkreader-bg--ant-primary-color: #21399c;
|
|
415
|
+
--darkreader-text--ant-primary-color: #508cd8;
|
|
416
|
+
--darkreader-border--ant-primary-color: #1f358e;
|
|
417
|
+
--ant-primary-color-disabled: #d6e4ff;
|
|
418
|
+
--darkreader-bg--ant-primary-color-hover: #183288;
|
|
419
|
+
--darkreader-text--ant-primary-color-hover: #69a0e2;
|
|
420
|
+
--darkreader-border--ant-primary-color-hover: #183288;
|
|
421
|
+
--darkreader-bg--ant-primary-color-active: #1c2876;
|
|
422
|
+
--darkreader-text--ant-primary-color-active: #7da5dd;
|
|
423
|
+
--darkreader-border--ant-primary-color-active: #2334a6;
|
|
424
|
+
--darkreader-bg--ant-primary-color-outline: rgba(33, 57, 156, 0.2);
|
|
425
|
+
--ant-primary-color-deprecated-bg: #d6e4ff;
|
|
426
|
+
--ant-primary-color-deprecated-border: #85a5ff;
|
|
427
|
+
--darkreader-bg--ant-primary-1: #282929;
|
|
428
|
+
--darkreader-bg--ant-primary-2: #2f3130;
|
|
429
|
+
--darkreader-border--ant-primary-3: #123177;
|
|
430
|
+
--ant-primary-4: #85a5ff;
|
|
431
|
+
--darkreader-bg--ant-primary-5: #183288;
|
|
432
|
+
--darkreader-text--ant-primary-5: #69a0e2;
|
|
433
|
+
--darkreader-border--ant-primary-5: #183288;
|
|
434
|
+
--darkreader-bg--ant-primary-6: #21399c;
|
|
435
|
+
--darkreader-text--ant-primary-6: #508cd8;
|
|
436
|
+
--darkreader-bg--ant-primary-7: #263890;
|
|
437
|
+
--darkreader-text--ant-primary-7: #6a98d4;
|
|
438
|
+
--darkreader-border--ant-primary-7: #283a96;
|
|
439
|
+
--ant-primary-8: #10239e;
|
|
440
|
+
--ant-primary-9: #061178;
|
|
441
|
+
--ant-primary-10: #030852;
|
|
442
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #313333;
|
|
443
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #1c2d78;
|
|
444
|
+
--ant-primary-color-deprecated-t-20: rgb(89, 118, 239);
|
|
445
|
+
--ant-primary-color-deprecated-t-50: rgb(151, 170, 245);
|
|
446
|
+
--ant-primary-color-deprecated-f-12: rgba(47, 84, 235, 0.12);
|
|
447
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(40, 41, 41, 0.3);
|
|
448
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #2a2c2c;
|
|
449
|
+
`
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
dark: true,
|
|
453
|
+
name: 'dark-green',
|
|
454
|
+
cn: '极光绿',
|
|
455
|
+
color: '#52c41a',
|
|
456
|
+
style: `
|
|
457
|
+
--darkreader-bg--ant-primary-color: #509827;
|
|
458
|
+
--darkreader-text--ant-primary-color: #88db57;
|
|
459
|
+
--darkreader-border--ant-primary-color: #54a028;
|
|
460
|
+
--ant-primary-color-disabled: #d9f7be;
|
|
461
|
+
--darkreader-bg--ant-primary-color-hover: #6d9a35;
|
|
462
|
+
--darkreader-text--ant-primary-color-hover: #89cc5a;
|
|
463
|
+
--darkreader-border--ant-primary-color-hover: #558b30;
|
|
464
|
+
--darkreader-bg--ant-primary-color-active: #2c6214;
|
|
465
|
+
--darkreader-text--ant-primary-color-active: #a5ef81;
|
|
466
|
+
--darkreader-border--ant-primary-color-active: #4fc71e;
|
|
467
|
+
--darkreader-bg--ant-primary-color-outline: rgba(80, 152, 39, 0.2);
|
|
468
|
+
--ant-primary-color-deprecated-bg: #d9f7be;
|
|
469
|
+
--ant-primary-color-deprecated-border: #95de64;
|
|
470
|
+
--darkreader-bg--ant-primary-1: #324411;
|
|
471
|
+
--darkreader-bg--ant-primary-2: #42581a;
|
|
472
|
+
--darkreader-border--ant-primary-3: #4c7825;
|
|
473
|
+
--ant-primary-4: #95de64;
|
|
474
|
+
--darkreader-bg--ant-primary-5: #6d9a35;
|
|
475
|
+
--darkreader-text--ant-primary-5: #89cc5a;
|
|
476
|
+
--darkreader-border--ant-primary-5: #558b30;
|
|
477
|
+
--darkreader-bg--ant-primary-6: #509827;
|
|
478
|
+
--darkreader-text--ant-primary-6: #88db57;
|
|
479
|
+
--darkreader-bg--ant-primary-7: #3c7c1c;
|
|
480
|
+
--darkreader-text--ant-primary-7: #96e66b;
|
|
481
|
+
--darkreader-border--ant-primary-7: #53b324;
|
|
482
|
+
--ant-primary-8: #237804;
|
|
483
|
+
--ant-primary-9: #135200;
|
|
484
|
+
--ant-primary-10: #092b00;
|
|
485
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #46691f;
|
|
486
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #498824;
|
|
487
|
+
--ant-primary-color-deprecated-t-20: rgb(117, 208, 72);
|
|
488
|
+
--ant-primary-color-deprecated-t-50: rgb(169, 226, 141);
|
|
489
|
+
--ant-primary-color-deprecated-f-12: rgba(82, 196, 26, 0.12);
|
|
490
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(50, 68, 17, 0.3);
|
|
491
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #354a11;
|
|
492
|
+
`
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
dark: true,
|
|
496
|
+
name: 'dark-purple',
|
|
497
|
+
cn: '酱紫',
|
|
498
|
+
color: '#722ed1',
|
|
499
|
+
style: `
|
|
500
|
+
--darkreader-bg--ant-primary-color: #60339a;
|
|
501
|
+
--darkreader-text--ant-primary-color: #824fc3;
|
|
502
|
+
--darkreader-border--ant-primary-color: #562e88;
|
|
503
|
+
--ant-primary-color-disabled: #efdbff;
|
|
504
|
+
--darkreader-bg--ant-primary-color-hover: #562a87;
|
|
505
|
+
--darkreader-text--ant-primary-color-hover: #9766cd;
|
|
506
|
+
--darkreader-border--ant-primary-color-hover: #522880;
|
|
507
|
+
--darkreader-bg--ant-primary-color-active: #371b66;
|
|
508
|
+
--darkreader-text--ant-primary-color-active: #a07bda;
|
|
509
|
+
--darkreader-border--ant-primary-color-active: #5626aa;
|
|
510
|
+
--darkreader-bg--ant-primary-color-outline: rgba(96, 51, 154, 0.2);
|
|
511
|
+
--ant-primary-color-deprecated-bg: #efdbff;
|
|
512
|
+
--ant-primary-color-deprecated-border: #b37feb;
|
|
513
|
+
--darkreader-bg--ant-primary-1: #282929;
|
|
514
|
+
--darkreader-bg--ant-primary-2: #2d2f2f;
|
|
515
|
+
--darkreader-border--ant-primary-3: #481a70;
|
|
516
|
+
--ant-primary-4: #b37feb;
|
|
517
|
+
--darkreader-bg--ant-primary-5: #562a87;
|
|
518
|
+
--darkreader-text--ant-primary-5: #9766cd;
|
|
519
|
+
--darkreader-border--ant-primary-5: #522880;
|
|
520
|
+
--darkreader-bg--ant-primary-6: #60339a;
|
|
521
|
+
--darkreader-text--ant-primary-6: #824fc3;
|
|
522
|
+
--darkreader-bg--ant-primary-7: #492580;
|
|
523
|
+
--darkreader-text--ant-primary-7: #9065cf;
|
|
524
|
+
--darkreader-border--ant-primary-7: #562a99;
|
|
525
|
+
--ant-primary-8: #391085;
|
|
526
|
+
--ant-primary-9: #22075e;
|
|
527
|
+
--ant-primary-10: #120338;
|
|
528
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #383b3a;
|
|
529
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #492873;
|
|
530
|
+
--ant-primary-color-deprecated-t-20: rgb(142, 88, 218);
|
|
531
|
+
--ant-primary-color-deprecated-t-50: rgb(185, 151, 232);
|
|
532
|
+
--ant-primary-color-deprecated-f-12: rgba(114, 46, 209, 0.12);
|
|
533
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(40, 41, 41, 0.3);
|
|
534
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #2a2c2c;
|
|
535
|
+
`
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
dark: true,
|
|
539
|
+
name: 'dark-sunset',
|
|
540
|
+
cn: '日暮',
|
|
541
|
+
color: '#fa8c16',
|
|
542
|
+
style: `
|
|
543
|
+
--darkreader-bg--ant-primary-color: #b8831b;
|
|
544
|
+
--darkreader-text--ant-primary-color: #eeb23d;
|
|
545
|
+
--darkreader-border--ant-primary-color: #a5771a;
|
|
546
|
+
--ant-primary-color-disabled: #fff1b8;
|
|
547
|
+
--darkreader-bg--ant-primary-color-hover: #a27816;
|
|
548
|
+
--darkreader-text--ant-primary-color-hover: #f4c454;
|
|
549
|
+
--darkreader-border--ant-primary-color-hover: #9c7416;
|
|
550
|
+
--darkreader-bg--ant-primary-color-active: #885a14;
|
|
551
|
+
--darkreader-text--ant-primary-color-active: #f3b860;
|
|
552
|
+
--darkreader-border--ant-primary-color-active: #c17e18;
|
|
553
|
+
--darkreader-bg--ant-primary-color-outline: rgba(184, 131, 27, 0.2);
|
|
554
|
+
--ant-primary-color-deprecated-bg: #fff1b8;
|
|
555
|
+
--ant-primary-color-deprecated-border: #ffd666;
|
|
556
|
+
--darkreader-bg--ant-primary-1: #493f11;
|
|
557
|
+
--darkreader-bg--ant-primary-2: #625113;
|
|
558
|
+
--darkreader-border--ant-primary-3: #876c15;
|
|
559
|
+
--ant-primary-4: #ffd666;
|
|
560
|
+
--darkreader-bg--ant-primary-5: #a27816;
|
|
561
|
+
--darkreader-text--ant-primary-5: #f4c454;
|
|
562
|
+
--darkreader-border--ant-primary-5: #9c7416;
|
|
563
|
+
--darkreader-bg--ant-primary-6: #b8831b;
|
|
564
|
+
--darkreader-text--ant-primary-6: #eeb23d;
|
|
565
|
+
--darkreader-bg--ant-primary-7: #a5711a;
|
|
566
|
+
--darkreader-text--ant-primary-7: #edb14a;
|
|
567
|
+
--darkreader-border--ant-primary-7: #b17a1b;
|
|
568
|
+
--ant-primary-8: #ad6800;
|
|
569
|
+
--ant-primary-9: #874d00;
|
|
570
|
+
--ant-primary-10: #613400;
|
|
571
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #5a4112;
|
|
572
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #8a6417;
|
|
573
|
+
--ant-primary-color-deprecated-t-20: rgb(251, 189, 67);
|
|
574
|
+
--ant-primary-color-deprecated-t-50: rgb(253, 214, 138);
|
|
575
|
+
--ant-primary-color-deprecated-f-12: rgba(250, 173, 20, 0.12);
|
|
576
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(73, 63, 17, 0.3);
|
|
577
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #4e4411;
|
|
578
|
+
`
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
dark: true,
|
|
582
|
+
name: 'dark-volcano',
|
|
583
|
+
cn: '火山',
|
|
584
|
+
color: '#fa541c',
|
|
585
|
+
style: `
|
|
586
|
+
--darkreader-bg--ant-primary-color: #ae3e17;
|
|
587
|
+
--darkreader-text--ant-primary-color: #e86b3d;
|
|
588
|
+
--darkreader-border--ant-primary-color: #9e3a16;
|
|
589
|
+
--ant-primary-color-disabled: #ffd8bf;
|
|
590
|
+
--darkreader-bg--ant-primary-color-hover: #9a3a13;
|
|
591
|
+
--darkreader-text--ant-primary-color-hover: #ef8356;
|
|
592
|
+
--darkreader-border--ant-primary-color-hover: #963913;
|
|
593
|
+
--darkreader-bg--ant-primary-color-active: #842813;
|
|
594
|
+
--darkreader-text--ant-primary-color-active: #ec7a5d;
|
|
595
|
+
--darkreader-border--ant-primary-color-active: #b93415;
|
|
596
|
+
--darkreader-bg--ant-primary-color-outline: rgba(174, 62, 23, 0.2);
|
|
597
|
+
--ant-primary-color-deprecated-bg: #ffd8bf;
|
|
598
|
+
--ant-primary-color-deprecated-border: #ff9c6e;
|
|
599
|
+
--darkreader-bg--ant-primary-1: #462710;
|
|
600
|
+
--darkreader-bg--ant-primary-2: #5b2e11;
|
|
601
|
+
--darkreader-border--ant-primary-3: #813a12;
|
|
602
|
+
--ant-primary-4: #ff9c6e;
|
|
603
|
+
--darkreader-bg--ant-primary-5: #9a3a13;
|
|
604
|
+
--darkreader-text--ant-primary-5: #ef8356;
|
|
605
|
+
--darkreader-border--ant-primary-5: #963913;
|
|
606
|
+
--darkreader-bg--ant-primary-6: #ae3e17;
|
|
607
|
+
--darkreader-text--ant-primary-6: #e86b3d;
|
|
608
|
+
--darkreader-bg--ant-primary-7: #a03a1b;
|
|
609
|
+
--darkreader-text--ant-primary-7: #e26b48;
|
|
610
|
+
--darkreader-border--ant-primary-7: #a63c1c;
|
|
611
|
+
--ant-primary-8: #ad2102;
|
|
612
|
+
--ant-primary-9: #871400;
|
|
613
|
+
--ant-primary-10: #610b00;
|
|
614
|
+
--darkreader-bg--ant-primary-color-deprecated-l-35: #532311;
|
|
615
|
+
--darkreader-border--ant-primary-color-deprecated-l-20: #843214;
|
|
616
|
+
--ant-primary-color-deprecated-t-20: rgb(251, 118, 73);
|
|
617
|
+
--ant-primary-color-deprecated-t-50: rgb(253, 170, 142);
|
|
618
|
+
--ant-primary-color-deprecated-f-12: rgba(250, 84, 28, 0.12);
|
|
619
|
+
--darkreader-bg--ant-primary-color-active-deprecated-f-30: rgba(70, 39, 16, 0.3);
|
|
620
|
+
--darkreader-bg--ant-primary-color-active-deprecated-d-02: #4b2910;
|
|
621
|
+
`
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
|
|
625
|
+
export default function ThemeButton(props) {
|
|
626
|
+
const [name, setName] = useState<string>(localStorage.getItem('AMIYA_COLOR') || 'default')
|
|
627
|
+
const [dumiColor, setDumiColor] = usePrefersColor()
|
|
628
|
+
const [loading, setLoading] = useState(false)
|
|
629
|
+
|
|
630
|
+
const handleThemeChange = (value: string) => {
|
|
631
|
+
setName(value)
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
useEffect(() => {
|
|
635
|
+
let target = linkList.find(item => item.name === name)
|
|
636
|
+
setLoading(true)
|
|
637
|
+
loadCss(target, () => {
|
|
638
|
+
let colorStyle = document.querySelector('#color')
|
|
639
|
+
if (colorStyle) {
|
|
640
|
+
document.head.removeChild(colorStyle)
|
|
641
|
+
}
|
|
642
|
+
let style = document.createElement('style')
|
|
643
|
+
style.id = 'color'
|
|
644
|
+
style.innerHTML = `
|
|
645
|
+
::selection {
|
|
646
|
+
background: ${target.color};
|
|
647
|
+
color: #fff;
|
|
648
|
+
}
|
|
649
|
+
.markdown a,
|
|
650
|
+
.__dumi-default-previewer .ant-alert-content a,
|
|
651
|
+
.ay-search-table-footer-actions a {
|
|
652
|
+
color: ${target.color}!important
|
|
653
|
+
}
|
|
654
|
+
ul[role='slug-list'] li > a.active,
|
|
655
|
+
[data-prefers-color=dark] .__dumi-default-layout-toc li a:hover {
|
|
656
|
+
color: ${target.color}!important;
|
|
657
|
+
}
|
|
658
|
+
.__dumi-default-layout-toc li a.active::before {
|
|
659
|
+
background: ${target.color}!important;
|
|
660
|
+
}
|
|
661
|
+
.__dumi-default-search > ul li a:hover {
|
|
662
|
+
color: ${target.color}!important;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
`
|
|
666
|
+
document.head.appendChild(style)
|
|
667
|
+
localStorage.setItem('AMIYA_COLOR', name)
|
|
668
|
+
if (target.dark) {
|
|
669
|
+
document.body.classList.add('dark')
|
|
670
|
+
setDumiColor('dark')
|
|
671
|
+
} else {
|
|
672
|
+
document.body.classList.remove('dark')
|
|
673
|
+
setDumiColor('light')
|
|
674
|
+
}
|
|
675
|
+
setLoading(false)
|
|
676
|
+
})
|
|
677
|
+
}, [name])
|
|
678
|
+
|
|
679
|
+
return null
|
|
680
|
+
// return (
|
|
681
|
+
// <Popover
|
|
682
|
+
// title="请选择主题色"
|
|
683
|
+
// content={
|
|
684
|
+
// <Radio.Group value={name} onChange={e => handleThemeChange(e.target.value)}>
|
|
685
|
+
// <Space direction="vertical">
|
|
686
|
+
// {linkList.map(link => (
|
|
687
|
+
// <Radio value={link.name} key={link.name}>
|
|
688
|
+
// <Space>
|
|
689
|
+
// <span className="__amiya-theme-color" style={{ background: link.color }}></span>
|
|
690
|
+
// {link.dark ? '暗-' + link.cn : link.cn}
|
|
691
|
+
// </Space>
|
|
692
|
+
// </Radio>
|
|
693
|
+
// ))}
|
|
694
|
+
// </Space>
|
|
695
|
+
// </Radio.Group>
|
|
696
|
+
// }
|
|
697
|
+
// >
|
|
698
|
+
// <Button
|
|
699
|
+
// className="__amiya-theme"
|
|
700
|
+
// shape="circle"
|
|
701
|
+
// type="primary"
|
|
702
|
+
// loading={loading}
|
|
703
|
+
// icon={<BgColorsOutlined />}
|
|
704
|
+
// ></Button>
|
|
705
|
+
// </Popover>
|
|
706
|
+
// )
|
|
707
|
+
}
|