feedback-preview.html
12.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>U+ 反馈提示 · 设计预览</title>
<style>
/* ===== U+ 设计令牌(与 tokens.css 同源,预览用副本) ===== */
:root {
--uj-primary: #2b5ce6;
--uj-surface: #ffffff;
--uj-text-1: #1d2533;
--uj-text-2: #4a5568;
--uj-border: #e6ebf2;
--uj-success: #16a34a;
--uj-success-soft: #e9f7ef;
--uj-success-border: #c6ebd6;
--uj-warning: #d97706;
--uj-warning-soft: #fdf3e5;
--uj-warning-border: #f6dfba;
--uj-error: #e5484d;
--uj-error-soft: #fdedee;
--uj-error-border: #f8cfd1;
--uj-info: #2b5ce6;
--uj-info-soft: #eef3ff;
--uj-info-border: #d6e2fb;
--uj-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05), 0 2px 6px -2px rgba(16, 24, 40, 0.08);
--uj-radius-card: 10px;
--uj-radius-md: 6px;
}
body {
margin: 0;
min-height: 100vh;
background: #f4f6fa;
font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
color: var(--uj-text-1);
padding: 48px 24px;
display: flex;
flex-direction: column;
align-items: center;
gap: 40px;
}
.stage {
width: 100%;
max-width: 520px;
display: flex;
flex-direction: column;
gap: 14px;
}
.stage h2 {
margin: 0 0 4px;
font-size: 15px;
font-weight: 600;
color: var(--uj-text-2);
letter-spacing: 0.02em;
}
/* ===== 下方为 feedback.css 真实规则(与 packages/ui/src/styles/feedback.css 一致) ===== */
/* MESSAGE */
.ant-message .ant-message-notice {
padding: 12px 16px;
border: 1px solid var(--uj-border);
border-radius: var(--uj-radius-card);
background: var(--uj-surface);
box-shadow: var(--uj-shadow-card);
color: var(--uj-text-1);
}
.ant-message .ant-message-notice:has(.ant-message-notice-icon-success) { background: var(--uj-success-soft); border-color: var(--uj-success-border); }
.ant-message .ant-message-notice:has(.ant-message-notice-icon-error) { background: var(--uj-error-soft); border-color: var(--uj-error-border); }
.ant-message .ant-message-notice:has(.ant-message-notice-icon-warning) { background: var(--uj-warning-soft); border-color: var(--uj-warning-border); }
.ant-message .ant-message-notice:has(.ant-message-notice-icon-info),
.ant-message .ant-message-notice:has(.ant-message-notice-icon-loading) { background: var(--uj-info-soft); border-color: var(--uj-info-border); }
.ant-message .ant-message-notice-title { color: var(--uj-text-1); font-weight: 600; }
.ant-message .ant-message-notice-icon {
display: inline-flex; align-items: center; justify-content: center;
width: 22px; height: 22px; border-radius: var(--uj-radius-md);
font-size: 13px; color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
animation: uj-feedback-chip-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ant-message .ant-message-notice-icon-success { background: var(--uj-success); }
.ant-message .ant-message-notice-icon-error { background: var(--uj-error); }
.ant-message .ant-message-notice-icon-warning { background: var(--uj-warning); }
.ant-message .ant-message-notice-icon-info,
.ant-message .ant-message-notice-icon-loading { background: var(--uj-primary); }
/* NOTIFICATION */
.ant-notification .ant-notification-notice {
padding: 14px 16px;
border: 1px solid var(--uj-border);
border-radius: var(--uj-radius-card);
background: var(--uj-surface);
box-shadow: var(--uj-shadow-card);
}
.ant-notification .ant-notification-notice-success { background: var(--uj-success-soft); border-color: var(--uj-success-border); }
.ant-notification .ant-notification-notice-error { background: var(--uj-error-soft); border-color: var(--uj-error-border); }
.ant-notification .ant-notification-notice-warning { background: var(--uj-warning-soft); border-color: var(--uj-warning-border); }
.ant-notification .ant-notification-notice-info,
.ant-notification .ant-notification-notice-open { background: var(--uj-info-soft); border-color: var(--uj-info-border); }
.ant-notification .ant-notification-notice-title { color: var(--uj-text-1); font-weight: 600; }
.ant-notification .ant-notification-notice-description { color: var(--uj-text-2); font-size: 13px; margin-top: 2px; }
.ant-notification .ant-notification-notice-icon {
display: inline-flex; align-items: center; justify-content: center;
width: 26px; height: 26px; border-radius: var(--uj-radius-md);
font-size: 15px; color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
animation: uj-feedback-chip-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ant-notification .ant-notification-notice-icon-success { background: var(--uj-success); }
.ant-notification .ant-notification-notice-icon-error { background: var(--uj-error); }
.ant-notification .ant-notification-notice-icon-warning { background: var(--uj-warning); }
.ant-notification .ant-notification-notice-icon-info,
.ant-notification .ant-notification-notice-icon-loading { background: var(--uj-primary); }
@keyframes uj-feedback-chip-in {
0% { transform: scale(0.4); opacity: 0; }
60% { transform: scale(1.12); opacity: 1; }
100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.ant-message .ant-message-notice-icon,
.ant-notification .ant-notification-notice-icon { animation: none; }
}
/* ===== 预览用布局(仅 demo,不影响真实组件) ===== */
.ant-message-notice-wrapper,
.ant-notification-notice-wrapper { display: flex; align-items: center; gap: 10px; }
.ant-notification-notice-wrapper { align-items: flex-start; }
.ant-notification-notice-section { display: flex; flex-direction: column; flex: auto; min-width: 0; }
.ant-message, .ant-notification { width: 100%; }
.ant-message-notice, .ant-notification-notice { position: relative; }
.ico { width: 1em; height: 1em; display: block; }
</style>
</head>
<body>
<div class="stage">
<h2>MESSAGE(顶部居中 · 单行)</h2>
<div class="ant-message">
<div class="ant-message-notice">
<div class="ant-message-notice-wrapper">
<span class="ant-message-notice-icon ant-message-notice-icon-success"><svg class="ico" viewBox="64 64 896 896" fill="currentColor"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"/></svg></span>
<div class="ant-message-notice-title">导出完成,文件已保存到下载目录</div>
</div>
</div>
</div>
<div class="ant-message">
<div class="ant-message-notice">
<div class="ant-message-notice-wrapper">
<span class="ant-message-notice-icon ant-message-notice-icon-error"><svg class="ico" viewBox="64 64 896 896" fill="currentColor"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66.3-66.3L512 563.4l-99.1-99.1-66.3 66.3-45.1-45.1 66.3-66.3L346.6 356l-66.3-66.3 45.1-45.1 66.3 66.3L512 460.6l99.1-99.1 66.3-66.3 45.1 45.1-66.3 66.3L668.4 460.6l66.3 66.3-45.1 45.1z"/></svg></span>
<div class="ant-message-notice-title">下载失败:合同编号不存在</div>
</div>
</div>
</div>
<div class="ant-message">
<div class="ant-message-notice">
<div class="ant-message-notice-wrapper">
<span class="ant-message-notice-icon ant-message-notice-icon-warning"><svg class="ico" viewBox="64 64 896 896" fill="currentColor"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48 48 0 1 0 0-96 48 48 0 0 0 0 96z"/></svg></span>
<div class="ant-message-notice-title">部分记录校验未通过,请检查后重试</div>
</div>
</div>
</div>
<div class="ant-message">
<div class="ant-message-notice">
<div class="ant-message-notice-wrapper">
<span class="ant-message-notice-icon ant-message-notice-icon-loading"><svg class="ico" viewBox="0 0 1024 1024" fill="currentColor"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.2 101.8 109.9 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"/></svg></span>
<div class="ant-message-notice-title">正在生成导出文件…</div>
</div>
</div>
</div>
</div>
<div class="stage">
<h2>NOTIFICATION(顶部居中 · 带描述,停留较久)</h2>
<div class="ant-notification">
<div class="ant-notification-notice ant-notification-notice-success">
<div class="ant-notification-notice-wrapper">
<span class="ant-notification-notice-icon ant-notification-notice-icon-success"><svg class="ico" viewBox="64 64 896 896" fill="currentColor"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"/></svg></span>
<div class="ant-notification-notice-section">
<div class="ant-notification-notice-title">导出完成</div>
<div class="ant-notification-notice-description">用户积分明细列表导出 · 积分明细列表导出20261113145204.xlsx</div>
</div>
</div>
</div>
</div>
<div class="ant-notification">
<div class="ant-notification-notice ant-notification-notice-error">
<div class="ant-notification-notice-wrapper">
<span class="ant-notification-notice-icon ant-notification-notice-icon-error"><svg class="ico" viewBox="64 64 896 896" fill="currentColor"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66.3-66.3L512 563.4l-99.1-99.1-66.3 66.3-45.1-45.1 66.3-66.3L346.6 356l-66.3-66.3 45.1-45.1 66.3 66.3L512 460.6l99.1-99.1 66.3-66.3 45.1 45.1-66.3 66.3L668.4 460.6l66.3 66.3-45.1 45.1z"/></svg></span>
<div class="ant-notification-notice-section">
<div class="ant-notification-notice-title">下载失败</div>
<div class="ant-notification-notice-description">门店上架导入模板 · 网络连接超时,请稍后重试</div>
</div>
</div>
</div>
</div>
<div class="ant-notification">
<div class="ant-notification-notice ant-notification-notice-warning">
<div class="ant-notification-notice-wrapper">
<span class="ant-notification-notice-icon ant-notification-notice-icon-warning"><svg class="ico" viewBox="64 64 896 896" fill="currentColor"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48 48 0 1 0 0-96 48 48 0 0 0 0 96z"/></svg></span>
<div class="ant-notification-notice-section">
<div class="ant-notification-notice-title">导出即将完成</div>
<div class="ant-notification-notice-description">二手车评估图片打包较大,预计还需 1 分钟</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>