@qlover/create-app 0.3.3 → 0.3.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/package.json +2 -2
  3. package/templates/react-app/README.md +311 -120
  4. package/templates/react-app/config/Identifier.I18n.ts +170 -0
  5. package/templates/react-app/config/common.ts +13 -0
  6. package/templates/react-app/package.json +6 -2
  7. package/templates/react-app/public/locales/en/common.json +25 -1
  8. package/templates/react-app/public/locales/zh/common.json +25 -1
  9. package/templates/react-app/src/App.tsx +5 -4
  10. package/templates/react-app/src/base/apis/AiApi.ts +4 -4
  11. package/templates/react-app/src/base/apis/feApi/FeApiAdapter.ts +2 -2
  12. package/templates/react-app/src/base/apis/userApi/UserApiAdapter.ts +2 -2
  13. package/templates/react-app/src/base/cases/AppConfig.ts +103 -0
  14. package/templates/react-app/src/base/cases/{appError/AppError.ts → AppError.ts} +0 -3
  15. package/templates/react-app/src/base/cases/DialogHandler.ts +86 -0
  16. package/templates/react-app/src/base/cases/RouterLoader.ts +166 -0
  17. package/templates/react-app/src/base/port/InteractionHubInterface.ts +94 -0
  18. package/templates/react-app/src/base/services/I18nService.ts +19 -0
  19. package/templates/react-app/src/base/types/deprecated-antd.d.ts +60 -0
  20. package/templates/react-app/src/core/IOC.ts +6 -1
  21. package/templates/react-app/src/core/bootstrap.ts +21 -31
  22. package/templates/react-app/src/core/globals.ts +8 -1
  23. package/templates/react-app/src/core/registers/RegisterGlobals.ts +11 -7
  24. package/templates/react-app/src/core/registers/index.ts +1 -2
  25. package/templates/react-app/src/pages/base/About.tsx +114 -1
  26. package/templates/react-app/src/pages/base/Executor.tsx +10 -15
  27. package/templates/react-app/src/styles/css/antd-themes/_default.css +239 -0
  28. package/templates/react-app/src/styles/css/antd-themes/dark.css +176 -0
  29. package/templates/react-app/src/styles/css/antd-themes/index.css +3 -0
  30. package/templates/react-app/src/styles/css/antd-themes/no-context.css +34 -0
  31. package/templates/react-app/src/styles/css/antd-themes/pink.css +199 -0
  32. package/templates/react-app/src/styles/css/index.css +3 -0
  33. package/templates/react-app/src/styles/css/themes/_default.css +10 -181
  34. package/templates/react-app/src/styles/css/themes/dark.css +10 -135
  35. package/templates/react-app/src/styles/css/themes/pink.css +10 -141
  36. package/templates/react-app/src/uikit/components/RouterRenderComponent.tsx +1 -1
  37. package/templates/react-app/src/uikit/controllers/RouterController.ts +1 -1
  38. package/templates/react-app/src/uikit/controllers/UserController.ts +1 -1
  39. package/templates/react-app/tsconfig.json +3 -2
  40. package/templates/react-app/tsconfig.node.json +2 -1
  41. package/templates/react-app/vite.config.ts +70 -2
  42. package/templates/react-app/src/base/cases/router-loader/index.ts +0 -90
  43. package/templates/react-app/src/core/AppConfig.ts +0 -36
@@ -1,13 +1,4 @@
1
- import {
2
- Button,
3
- Progress,
4
- Tag,
5
- Space,
6
- Card,
7
- message,
8
- Input,
9
- Select
10
- } from 'antd';
1
+ import { Button, Progress, Tag, Space, Card, Input, Select } from 'antd';
11
2
  import { useBaseRoutePage } from '@/uikit/contexts/BaseRouteContext';
12
3
  import { useState, useEffect } from 'react';
13
4
  import { IOC } from '@/core/IOC';
@@ -97,7 +88,9 @@ export default function Executor() {
97
88
  // 监听 helloState 变化,更新任务状态
98
89
  useEffect(() => {
99
90
  if (helloState.result) {
100
- message.success(t(i18nKeys.PAGE_EXECUTOR_PLUGIN_TEST_SUCCESS));
91
+ IOC('DialogHandler').success(
92
+ t(i18nKeys.PAGE_EXECUTOR_PLUGIN_TEST_SUCCESS)
93
+ );
101
94
  // 更新任务状态
102
95
  setTasks((prevTasks) =>
103
96
  prevTasks.map((task) =>
@@ -112,7 +105,7 @@ export default function Executor() {
112
105
  )
113
106
  );
114
107
  } else if (helloState.error) {
115
- message.error(t(i18nKeys.PAGE_EXECUTOR_PLUGIN_TEST_FAILURE));
108
+ IOC('DialogHandler').error(t(i18nKeys.PAGE_EXECUTOR_PLUGIN_TEST_FAILURE));
116
109
  // 更新任务状态
117
110
  setTasks((prevTasks) =>
118
111
  prevTasks.map((task) =>
@@ -181,7 +174,7 @@ export default function Executor() {
181
174
  )
182
175
  );
183
176
 
184
- message.success(
177
+ IOC('DialogHandler').success(
185
178
  t(i18nKeys.PAGE_EXECUTOR_TASK_SUCCESS, { name: task.name })
186
179
  );
187
180
  } catch {
@@ -191,7 +184,7 @@ export default function Executor() {
191
184
  )
192
185
  );
193
186
 
194
- message.error(
187
+ IOC('DialogHandler').error(
195
188
  t(i18nKeys.PAGE_EXECUTOR_TASK_FAILURE, { name: task.name })
196
189
  );
197
190
  }
@@ -209,7 +202,9 @@ export default function Executor() {
209
202
 
210
203
  const handleCreateTask = () => {
211
204
  if (!customUrl) {
212
- message.error(t(i18nKeys.PAGE_EXECUTOR_CUSTOM_TASK_URL_REQUIRED));
205
+ IOC('DialogHandler').error(
206
+ t(i18nKeys.PAGE_EXECUTOR_CUSTOM_TASK_URL_REQUIRED)
207
+ );
213
208
  return;
214
209
  }
215
210
 
@@ -0,0 +1,239 @@
1
+ /* custom variables - for antd and custom css */
2
+ html,
3
+ .fe-theme {
4
+ /* Antd 主色调相关变量 - 浅蓝色主题 */
5
+ --fe-color-primary: #60a5fa; /* blue-400 */
6
+ --fe-color-primary-hover: #3b82f6; /* blue-500 */
7
+ --fe-color-primary-active: #2563eb; /* blue-600 */
8
+ --fe-color-primary-bg: rgba(
9
+ 96,
10
+ 165,
11
+ 250,
12
+ 0.1
13
+ ); /* blue-400 with 0.1 opacity */
14
+ --fe-color-primary-border: #60a5fa; /* blue-400 */
15
+ --fe-color-primary-text: #60a5fa; /* blue-400 */
16
+ --fe-color-primary-text-hover: #3b82f6; /* blue-500 */
17
+ --fe-color-primary-text-active: #2563eb; /* blue-600 */
18
+ --fe-color-primary-deprecated-bg: #60a5fa; /* blue-400 */
19
+ --fe-color-primary-deprecated-border: #60a5fa; /* blue-400 */
20
+
21
+ /* 状态色 */
22
+ --fe-color-success: #52c41a;
23
+ --fe-color-warning: #faad14;
24
+ /* 警告信息相关颜色 */
25
+ --fe-color-warning-bg: #fffbe6;
26
+ --fe-color-warning-bg-hover: #fff1b8;
27
+ --fe-color-warning-border: #ffe58f;
28
+ --fe-color-warning-border-hover: #ffd666;
29
+ --fe-color-warning-hover: #ffd666;
30
+ --fe-color-warning-active: #d48806;
31
+ --fe-color-warning-text-hover: #ffc53d;
32
+ --fe-color-warning-text: #faad14;
33
+ --fe-color-warning-text-active: #d48806;
34
+ --fe-color-error: #ff4d4f;
35
+ --fe-color-info: var(--fe-color-primary);
36
+ --fe-color-link: var(--fe-color-primary);
37
+
38
+ /* Antd 基础变量 */
39
+ --fe-color-bg-container: rgb(255 255 255);
40
+ --fe-color-bg-elevated: rgb(248 250 252);
41
+ --fe-color-text-heading: rgb(15 23 42); /* slate-900 用于标题文本 */
42
+ --fe-color-text: rgba(15 23 42 / 0.85);
43
+ --fe-color-text-secondary: rgba(15 23 42 / 0.45);
44
+ --fe-color-text-tertiary: rgba(15 23 42 / 0.35);
45
+ --fe-color-text-quaternary: rgba(15 23 42 / 0.15);
46
+ --fe-color-text-placeholder: rgba(15 23 42 / 0.25);
47
+ --fe-color-border: rgb(226 232 240);
48
+
49
+ /* Antd 组件通用变量 */
50
+ --fe-line-width: 1px;
51
+ --fe-line-type: solid;
52
+ --fe-border-radius: 6px;
53
+ --fe-motion-duration-mid: 0.2s;
54
+ --fe-line-height: 1.5715;
55
+
56
+ /* Motion 动画变量 */
57
+ --fe-motion-duration-slow: 0.3s;
58
+ --fe-motion-duration-normal: 0.2s;
59
+ --fe-motion-duration-fast: 0.1s;
60
+
61
+ /* Antd 图标相关变量 */
62
+ --fe-color-icon: rgba(0, 0, 0, 0.45); /* 默认图标颜色 */
63
+ --fe-color-icon-hover: rgba(0, 0, 0, 0.88); /* 图标悬停颜色 */
64
+ --fe-color-icon-active: var(--fe-color-primary); /* 图标激活颜色 */
65
+ --fe-color-icon-disabled: rgba(0, 0, 0, 0.25); /* 禁用状态图标颜色 */
66
+
67
+ /* Antd Input 组件变量 */
68
+ .ant-input,
69
+ .ant-input-css-var {
70
+ /* Input 内边距 */
71
+ --fe-input-padding-block: 4px;
72
+ --fe-input-padding-block-sm: 0px;
73
+ --fe-input-padding-block-lg: 7px;
74
+ --fe-input-padding-inline: 11px;
75
+ --fe-input-padding-inline-sm: 7px;
76
+ --fe-input-padding-inline-lg: 11px;
77
+
78
+ /* Input 字体大小 */
79
+ --fe-input-input-font-size: 14px;
80
+ --fe-input-input-font-size-lg: 16px;
81
+ --fe-input-input-font-size-sm: 14px;
82
+
83
+ /* Input 交互状态 */
84
+ --fe-input-hover-border-color: #4096ff;
85
+ --fe-input-active-border-color: #1677ff;
86
+ --fe-input-active-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
87
+ --fe-input-error-active-shadow: 0 0 0 2px rgba(255, 38, 5, 0.06);
88
+ --fe-input-warning-active-shadow: 0 0 0 2px rgba(255, 215, 5, 0.1);
89
+ --fe-input-hover-bg: #ffffff;
90
+ --fe-input-active-bg: #ffffff;
91
+ --fe-input-addon-bg: rgba(0, 0, 0, 0.02);
92
+ }
93
+
94
+ /* Antd Button 组件变量 */
95
+ .ant-btn,
96
+ .ant-btn-css-var {
97
+ /* 基础样式 */
98
+ --fe-button-font-weight: 400;
99
+ --fe-button-padding-inline: 15px;
100
+ --fe-button-padding-inline-lg: 15px;
101
+ --fe-button-padding-inline-sm: 7px;
102
+ --fe-button-padding-block: 4px;
103
+ --fe-button-padding-block-sm: 0px;
104
+ --fe-button-padding-block-lg: 7px;
105
+
106
+ /* 字体大小 */
107
+ --fe-button-content-font-size: 14px;
108
+ --fe-button-content-font-size-sm: 14px;
109
+ --fe-button-content-font-size-lg: 16px;
110
+ --fe-button-content-line-height: 1.5714285714285714;
111
+ --fe-button-content-line-height-sm: 1.5714285714285714;
112
+ --fe-button-content-line-height-lg: 1.5;
113
+
114
+ /* 浅蓝色主题 */
115
+ --fe-button-primary-color: #fff;
116
+ --fe-button-primary-bg: #60a5fa; /* blue-400 */
117
+ --fe-button-primary-hover-bg: #3b82f6; /* blue-500 */
118
+ --fe-button-primary-active-bg: #2563eb; /* blue-600 */
119
+ --fe-button-primary-shadow: 0 2px 0 rgba(37, 99, 235, 0.1);
120
+
121
+ /* 默认按钮 */
122
+ --fe-button-default-color: rgba(0, 0, 0, 0.88);
123
+ --fe-button-default-bg: #ffffff;
124
+ --fe-button-default-border-color: #d9d9d9;
125
+ --fe-button-default-hover-bg: #ffffff;
126
+ --fe-button-default-hover-color: #60a5fa;
127
+ --fe-button-default-hover-border-color: #60a5fa;
128
+ --fe-button-default-active-bg: #ffffff;
129
+ --fe-button-default-active-color: #2563eb;
130
+ --fe-button-default-active-border-color: #2563eb;
131
+ --fe-button-default-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
132
+
133
+ /* 其他状态 */
134
+ --fe-button-danger-color: #fff;
135
+ --fe-button-danger-shadow: 0 2px 0 rgba(255, 38, 5, 0.06);
136
+ --fe-button-border-color-disabled: #d9d9d9;
137
+ --fe-button-text-hover-bg: rgba(0, 0, 0, 0.04);
138
+ }
139
+
140
+ /* Antd Select 组件变量 */
141
+ .ant-select,
142
+ .ant-select-css-var {
143
+ --fe-select-internal_fixed_item_margin: 2px;
144
+ --fe-select-z-index-popup: 1050;
145
+ --fe-select-option-selected-color: rgba(0, 0, 0, 0.88);
146
+ --fe-select-option-selected-font-weight: 600;
147
+ --fe-select-option-selected-bg: var(--fe-color-primary-bg);
148
+ --fe-select-option-active-bg: rgba(0, 0, 0, 0.04);
149
+ --fe-select-option-padding: 5px 12px;
150
+ --fe-select-option-font-size: 14px;
151
+ --fe-select-option-line-height: 1.5714285714285714;
152
+ --fe-select-option-height: 32px;
153
+ --fe-select-selector-bg: var(--fe-color-bg-container);
154
+ --fe-select-clear-bg: var(--fe-color-bg-container);
155
+ --fe-select-single-item-height-lg: 40px;
156
+ --fe-select-multiple-item-bg: rgba(0, 0, 0, 0.06);
157
+ --fe-select-multiple-item-border-color: transparent;
158
+ --fe-select-multiple-item-height: 24px;
159
+ --fe-select-multiple-item-height-sm: 16px;
160
+ --fe-select-multiple-item-height-lg: 32px;
161
+ --fe-select-multiple-selector-bg-disabled: rgba(0, 0, 0, 0.04);
162
+ --fe-select-multiple-item-color-disabled: rgba(0, 0, 0, 0.25);
163
+ --fe-select-multiple-item-border-color-disabled: transparent;
164
+ --fe-select-show-arrow-padding-inline-end: 18px;
165
+ --fe-select-hover-border-color: var(--fe-color-primary);
166
+ --fe-select-active-border-color: var(--fe-color-primary-active);
167
+ --fe-select-active-outline-color: var(--fe-color-primary-bg);
168
+ --fe-select-select-affix-padding: 4px;
169
+ }
170
+
171
+ /* Antd Tag 组件变量 */
172
+ .ant-tag,
173
+ .ant-tag-css-var {
174
+ --fe-tag-default-bg: var(--fe-color-bg-container);
175
+ --fe-tag-default-color: var(--fe-color-text);
176
+ --fe-tag-default-border-color: var(--fe-color-border);
177
+ --fe-tag-font-size: 12px;
178
+ --fe-tag-line-height: 20px;
179
+ --fe-tag-height: 22px;
180
+ --fe-tag-padding-horizontal: 7px;
181
+ --fe-tag-margin: 0 8px 0 0;
182
+ --fe-tag-border-radius: 4px;
183
+ }
184
+
185
+ /* Antd Progress 组件变量 */
186
+ .ant-progress,
187
+ .ant-progress-css-var {
188
+ --fe-progress-default-color: var(--fe-color-primary);
189
+ --fe-progress-remaining-color: var(--fe-color-bg-elevated);
190
+ --fe-progress-text-color: var(--fe-color-text);
191
+ --fe-progress-line-font-size: 14px;
192
+ --fe-progress-circle-font-size: 14px;
193
+ --fe-progress-circle-text-color: var(--fe-color-text);
194
+ --fe-progress-circle-trail-color: var(--fe-color-bg-elevated);
195
+ --fe-progress-circle-stroke-width: 6px;
196
+ --fe-progress-line-stroke-width: 8px;
197
+ }
198
+
199
+ /* Antd Modal 组件变量 */
200
+ .ant-modal,
201
+ .ant-modal-css-var {
202
+ --fe-modal-footer-bg: transparent;
203
+ --fe-modal-header-bg: var(--fe-color-bg-container);
204
+ --fe-modal-title-line-height: var(--fe-line-height);
205
+ --fe-modal-title-font-size: 16px;
206
+ --fe-modal-content-bg: var(--fe-color-bg-container);
207
+ --fe-modal-title-color: var(--fe-color-text);
208
+ --fe-modal-content-padding: 20px 24px;
209
+ --fe-modal-header-padding: 0px;
210
+ --fe-modal-header-border-bottom: none;
211
+ --fe-modal-header-margin-bottom: 8px;
212
+ --fe-modal-body-padding: 0px;
213
+ --fe-modal-footer-padding: 0px;
214
+ --fe-modal-footer-border-top: none;
215
+ --fe-modal-footer-border-radius: var(--fe-border-radius);
216
+ --fe-modal-footer-margin-top: 12px;
217
+ --fe-modal-confirm-body-padding: 0px;
218
+ --fe-modal-confirm-icon-margin-inline-end: 12px;
219
+ --fe-modal-confirm-btns-margin-top: 12px;
220
+ }
221
+
222
+ /* Antd Message 组件变量 */
223
+ .ant-message,
224
+ .ant-message-css-var {
225
+ --fe-message-z-index-popup: 2010;
226
+ --fe-message-content-bg: var(--fe-color-bg-container);
227
+ --fe-message-content-padding: 9px 12px;
228
+ --fe-message-notice-content-padding: 10px 16px;
229
+ --fe-message-notice-content-bg: var(--fe-color-bg-container);
230
+ --fe-message-notice-content-shadow:
231
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12),
232
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05);
233
+ --fe-message-success-color: #52c41a;
234
+ --fe-message-error-color: #ff4d4f;
235
+ --fe-message-warning-color: #faad14;
236
+ --fe-message-info-color: var(--fe-color-primary);
237
+ --fe-message-loading-color: var(--fe-color-primary);
238
+ }
239
+ }
@@ -0,0 +1,176 @@
1
+ [data-theme='dark'],
2
+ [data-theme='dark'] .fe-theme {
3
+ /* Antd 主色调相关变量 - 紫色主题 */
4
+ --fe-color-primary: #9333ea; /* purple-600 */
5
+ --fe-color-primary-hover: #a855f7; /* purple-500 */
6
+ --fe-color-primary-active: #7e22ce; /* purple-700 */
7
+ --fe-color-primary-bg: rgba(
8
+ 147,
9
+ 51,
10
+ 234,
11
+ 0.1
12
+ ); /* purple-600 with 0.1 opacity */
13
+ --fe-color-primary-border: #9333ea; /* purple-600 */
14
+ --fe-color-primary-text: #a855f7; /* purple-500 - 文字用亮一点的紫色 */
15
+ --fe-color-primary-text-hover: #c084fc; /* purple-400 */
16
+ --fe-color-primary-text-active: #9333ea; /* purple-600 */
17
+ --fe-color-primary-deprecated-bg: #9333ea; /* purple-600 */
18
+ --fe-color-primary-deprecated-border: #9333ea; /* purple-600 */
19
+
20
+ /* 状态色 */
21
+ --fe-color-success: #52c41a;
22
+ --fe-color-warning: #faad14;
23
+ /* 警告信息相关颜色 - 暗色主题 */
24
+ --fe-color-warning-bg: rgba(250, 173, 20, 0.15);
25
+ --fe-color-warning-bg-hover: rgba(250, 173, 20, 0.25);
26
+ --fe-color-warning-border: rgba(250, 173, 20, 0.3);
27
+ --fe-color-warning-border-hover: #d48806;
28
+ --fe-color-warning-hover: #d48806;
29
+ --fe-color-warning-active: #ad6800;
30
+ --fe-color-warning-text-hover: #ffc53d;
31
+ --fe-color-warning-text: #faad14;
32
+ --fe-color-warning-text-active: #d48806;
33
+ --fe-color-error: #ff4d4f;
34
+ --fe-color-info: var(--fe-color-primary);
35
+ --fe-color-link: var(--fe-color-primary);
36
+
37
+ /* Antd 基础变量 */
38
+ --fe-color-bg-container: rgb(30 41 59);
39
+ --fe-color-bg-elevated: rgb(51 65 85);
40
+ --fe-color-text-heading: rgb(241 245 249); /* slate-100 用于暗色主题标题文本 */
41
+ --fe-color-text: rgba(255, 255, 255, 0.85);
42
+ --fe-color-text-secondary: rgba(255, 255, 255, 0.45);
43
+ --fe-color-text-tertiary: rgba(255, 255, 255, 0.35);
44
+ --fe-color-text-quaternary: rgba(255, 255, 255, 0.15);
45
+ --fe-color-text-placeholder: rgba(255, 255, 255, 0.25);
46
+ --fe-color-border: rgb(51 65 85);
47
+
48
+ /* Antd 图标相关变量 */
49
+ --fe-color-icon: rgba(255, 255, 255, 0.45); /* 暗色主题下的图标颜色 */
50
+ --fe-color-icon-hover: rgba(255, 255, 255, 0.85); /* 暗色主题下图标悬停颜色 */
51
+ --fe-color-icon-active: var(--fe-color-primary); /* 使用主题紫色 */
52
+ --fe-color-icon-disabled: rgba(255, 255, 255, 0.25); /* 暗色主题下禁用状态 */
53
+
54
+ /* Antd Input 组件变量 */
55
+ .ant-input,
56
+ .ant-input-css-var {
57
+ /* Input 交互状态 */
58
+ --fe-input-hover-border-color: #4096ff;
59
+ --fe-input-active-border-color: #1677ff;
60
+ --fe-input-active-shadow: 0 0 0 2px rgba(5, 145, 255, 0.2);
61
+ --fe-input-hover-bg: rgb(51 65 85);
62
+ --fe-input-active-bg: rgb(51 65 85);
63
+ --fe-input-addon-bg: rgba(255, 255, 255, 0.02);
64
+ }
65
+
66
+ /* Antd Button 组件变量 */
67
+ .ant-btn,
68
+ .ant-btn-css-var {
69
+ /* 紫色主题 */
70
+ --fe-button-primary-color: #fff;
71
+ --fe-button-primary-bg: #8b5cf6; /* violet-500 */
72
+ --fe-button-primary-hover-bg: #7c3aed; /* violet-600 */
73
+ --fe-button-primary-active-bg: #6d28d9; /* violet-700 */
74
+ --fe-button-primary-shadow: 0 2px 0 rgba(109, 40, 217, 0.2);
75
+
76
+ /* 默认按钮 */
77
+ --fe-button-default-color: rgba(255, 255, 255, 0.85);
78
+ --fe-button-default-bg: rgb(30 41 59); /* slate-800 */
79
+ --fe-button-default-border-color: rgb(51 65 85); /* slate-700 */
80
+ --fe-button-default-hover-bg: rgb(30 41 59);
81
+ --fe-button-default-hover-color: #8b5cf6;
82
+ --fe-button-default-hover-border-color: #8b5cf6;
83
+ --fe-button-default-active-bg: rgb(30 41 59);
84
+ --fe-button-default-active-color: #6d28d9;
85
+ --fe-button-default-active-border-color: #6d28d9;
86
+ --fe-button-default-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
87
+
88
+ /* 其他状态 */
89
+ --fe-button-text-hover-bg: rgba(255, 255, 255, 0.08);
90
+ --fe-button-border-color-disabled: rgb(51 65 85);
91
+ }
92
+
93
+ /* Antd Select 组件变量 */
94
+ .ant-select,
95
+ .ant-select-css-var {
96
+ --fe-select-internal_fixed_item_margin: 2px;
97
+ --fe-select-z-index-popup: 1050;
98
+ --fe-select-option-selected-color: rgba(255, 255, 255, 0.88);
99
+ --fe-select-option-selected-font-weight: 600;
100
+ --fe-select-option-selected-bg: var(--fe-color-primary-bg);
101
+ --fe-select-option-active-bg: rgba(255, 255, 255, 0.08);
102
+ --fe-select-option-padding: 5px 12px;
103
+ --fe-select-option-font-size: 14px;
104
+ --fe-select-option-line-height: 1.5714285714285714;
105
+ --fe-select-option-height: 32px;
106
+ --fe-select-selector-bg: var(--fe-color-bg-container);
107
+ --fe-select-clear-bg: var(--fe-color-bg-container);
108
+ --fe-select-single-item-height-lg: 40px;
109
+ --fe-select-multiple-item-bg: rgba(255, 255, 255, 0.08);
110
+ --fe-select-multiple-item-border-color: transparent;
111
+ --fe-select-multiple-item-height: 24px;
112
+ --fe-select-multiple-item-height-sm: 16px;
113
+ --fe-select-multiple-item-height-lg: 32px;
114
+ --fe-select-multiple-selector-bg-disabled: rgba(255, 255, 255, 0.08);
115
+ --fe-select-multiple-item-color-disabled: rgba(255, 255, 255, 0.25);
116
+ --fe-select-multiple-item-border-color-disabled: transparent;
117
+ --fe-select-show-arrow-padding-inline-end: 18px;
118
+ --fe-select-hover-border-color: var(--fe-color-primary);
119
+ --fe-select-active-border-color: var(--fe-color-primary-active);
120
+ --fe-select-active-outline-color: var(--fe-color-primary-bg);
121
+ --fe-select-select-affix-padding: 4px;
122
+ }
123
+
124
+ /* Antd Tag 组件变量 */
125
+ .ant-tag,
126
+ .ant-tag-css-var {
127
+ --fe-tag-default-bg: var(--fe-color-bg-container);
128
+ --fe-tag-default-color: var(--fe-color-text);
129
+ --fe-tag-default-border-color: var(--fe-color-border);
130
+ --fe-tag-font-size: 12px;
131
+ --fe-tag-line-height: 20px;
132
+ --fe-tag-height: 22px;
133
+ --fe-tag-padding-horizontal: 7px;
134
+ --fe-tag-margin: 0 8px 0 0;
135
+ --fe-tag-border-radius: 4px;
136
+ }
137
+
138
+ /* Antd Progress 组件变量 */
139
+ .ant-progress,
140
+ .ant-progress-css-var {
141
+ --fe-progress-default-color: var(--fe-color-primary);
142
+ --fe-progress-remaining-color: var(--fe-color-bg-elevated);
143
+ --fe-progress-text-color: var(--fe-color-text);
144
+ --fe-progress-line-font-size: 14px;
145
+ --fe-progress-circle-font-size: 14px;
146
+ --fe-progress-circle-text-color: var(--fe-color-text);
147
+ --fe-progress-circle-trail-color: var(--fe-color-bg-elevated);
148
+ --fe-progress-circle-stroke-width: 6px;
149
+ --fe-progress-line-stroke-width: 8px;
150
+ }
151
+
152
+ /* Antd Message 组件变量 */
153
+ .ant-message,
154
+ .ant-message-css-var {
155
+ --fe-message-z-index-popup: 2010;
156
+ --fe-message-content-bg: rgb(51 65 85); /* slate-700,比容器背景色深一点 */
157
+ --fe-message-content-padding: 9px 12px;
158
+ --fe-message-notice-content-padding: 10px 16px;
159
+ --fe-message-notice-content-bg: rgb(51 65 85);
160
+ --fe-message-notice-content-shadow:
161
+ 0 6px 16px 0 rgba(0, 0, 0, 0.25), 0 3px 6px -4px rgba(0, 0, 0, 0.3),
162
+ 0 9px 28px 8px rgba(0, 0, 0, 0.2);
163
+ --fe-message-notice-content-border: 1px solid rgb(71 85 105); /* slate-600,添加边框 */
164
+ --fe-message-success-color: #52c41a;
165
+ --fe-message-error-color: #ff4d4f;
166
+ --fe-message-warning-color: #faad14;
167
+ --fe-message-info-color: var(--fe-color-primary);
168
+ --fe-message-loading-color: var(--fe-color-primary);
169
+ --fe-message-text-color: rgba(
170
+ 255,
171
+ 255,
172
+ 255,
173
+ 0.85
174
+ ); /* 确保文字在深色背景上清晰可见 */
175
+ }
176
+ }
@@ -0,0 +1,3 @@
1
+ @import './_default.css';
2
+ @import './dark.css';
3
+ @import './pink.css';
@@ -0,0 +1,34 @@
1
+ /*
2
+ 这里是 Antd Message 和 Notification 静态组件变量
3
+ 因为静态组件是全局样式,应用不上antd context样式主题变量,需要在这里覆盖
4
+ */
5
+ .ant-message:not(.fe-theme) {
6
+ color: var(--fe-color-text);
7
+
8
+ .ant-message-notice-wrapper .ant-message-notice-content {
9
+ background: var(--fe-message-content-bg);
10
+ }
11
+
12
+ .ant-message-notice-wrapper .ant-message-info > .anticon,
13
+ .ant-message-notice-wrapper .ant-message-loading > .anticon {
14
+ color: var(--fe-color-info);
15
+ }
16
+ }
17
+
18
+ .ant-notification:not(.fe-theme) {
19
+ .ant-notification-notice-wrapper {
20
+ background: var(--fe-color-bg-elevated);
21
+ }
22
+
23
+ .ant-notification-notice-wrapper .ant-notification-notice-close {
24
+ color: var(--fe-color-icon);
25
+ }
26
+
27
+ .ant-notification-notice-wrapper .ant-notification-notice-message {
28
+ color: var(--fe-color-text-heading);
29
+ }
30
+
31
+ .ant-notification-notice-wrapper .ant-notification-notice-description {
32
+ color: var(--fe-color-text);
33
+ }
34
+ }