@morlay/ui-conversation-manager 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,256 +0,0 @@
1
- import { styling, type CSSProps } from "@morlay/dsh-client-ui-primitives/client";
2
-
3
- const spin = styling.keyframes({
4
- from: { transform: "rotate(0deg)" },
5
- to: { transform: "rotate(360deg)" },
6
- });
7
-
8
- // 「对话管理」页面的样式表(官方 --dsw-* 变量 + 我们的 css-in-js 层):页面根是纵向 flex 且**自己不滚**,
9
- // 页头(标题 / tab 条 / 导入 / 清理)与搜索行固定在顶部,只有 `scroll` 那层随内容滚;除滚动层外的项都
10
- // `flex: none`,否则内容变长时会被压到 min-content(官方 Input 的 32px 高会被压成一行文字高)。
11
- export const styles = {
12
- page: {
13
- display: "flex",
14
- flexDirection: "column",
15
- gap: "12px",
16
- boxSizing: "border-box",
17
- width: "100%",
18
- height: "100%",
19
- padding: "24px 28px",
20
- overflow: "hidden",
21
- color: "var(--dsw-alias-label-primary)",
22
- },
23
- // 页面里唯一的滚动容器:提示 / 空态 / 列表 / 分页(或 usage 视图)都在它里面。
24
- scroll: {
25
- display: "flex",
26
- flexDirection: "column",
27
- gap: "12px",
28
- flex: "1 1 auto",
29
- minHeight: "0",
30
- overflowY: "auto",
31
- },
32
- header: {
33
- display: "flex",
34
- alignItems: "center",
35
- justifyContent: "space-between",
36
- gap: "12px",
37
- flex: "none",
38
- },
39
- headerActions: {
40
- display: "flex",
41
- alignItems: "center",
42
- gap: "8px",
43
- flex: "none",
44
- },
45
- title: {
46
- margin: "0",
47
- fontSize: "16px",
48
- lineHeight: "24px",
49
- fontWeight: "500",
50
- },
51
- // 与官方会话头部的 tab 条同形(ConversationRoot.module.css 的 .tabs/.tab/.tabActive):
52
- // 时间范围与维度切换共用这一套,选中态是品牌蓝文字 + 2px 下划线。
53
- tabs: {
54
- position: "relative",
55
- zIndex: "1",
56
- display: "flex",
57
- gap: "36px",
58
- marginTop: "10px",
59
- paddingLeft: "8px",
60
- flex: "none",
61
- },
62
- tab: {
63
- position: "relative",
64
- padding: "0 0 9px",
65
- border: "none",
66
- background: "transparent",
67
- fontSize: "13px",
68
- lineHeight: "16px",
69
- fontWeight: "500",
70
- color: "var(--dsw-alias-label-tertiary)",
71
- cursor: "pointer",
72
- "&::after": {
73
- content: "''",
74
- position: "absolute",
75
- right: "0",
76
- bottom: "-1px",
77
- left: "0",
78
- height: "2px",
79
- borderRadius: "2px",
80
- background: "transparent",
81
- },
82
- },
83
- tabActive: {
84
- color: "var(--dsw-alias-state-business-primary)",
85
- "&::after": {
86
- background: "var(--dsw-alias-state-business-primary)",
87
- },
88
- },
89
- usage: {
90
- display: "flex",
91
- flexDirection: "column",
92
- gap: "12px",
93
- flex: "none",
94
- },
95
- // 一行用量:label 在上,下面是横向排布的单项(每个单项内部上下)。
96
- usageRow: {
97
- display: "flex",
98
- flexDirection: "column",
99
- gap: "6px",
100
- padding: "10px 12px",
101
- border: "1px solid var(--dsw-alias-border-l1)",
102
- borderRadius: "10px",
103
- background: "var(--dsw-alias-bg-base)",
104
- flex: "none",
105
- },
106
- usageRowLabel: {
107
- overflow: "hidden",
108
- fontSize: "12px",
109
- lineHeight: "18px",
110
- color: "var(--dsw-alias-label-tertiary)",
111
- textOverflow: "ellipsis",
112
- whiteSpace: "nowrap",
113
- },
114
- usageMetrics: {
115
- display: "flex",
116
- flexDirection: "row",
117
- flexWrap: "wrap",
118
- gap: "6px 20px",
119
- },
120
- usageMetric: {
121
- display: "flex",
122
- flexDirection: "column",
123
- gap: "2px",
124
- },
125
- usageMetricLabel: {
126
- fontSize: "12px",
127
- lineHeight: "18px",
128
- color: "var(--dsw-alias-label-tertiary)",
129
- },
130
- usageMetricValue: {
131
- fontSize: "16px",
132
- lineHeight: "24px",
133
- fontWeight: "500",
134
- fontVariantNumeric: "tabular-nums",
135
- },
136
- usageList: {
137
- display: "flex",
138
- flexDirection: "column",
139
- gap: "4px",
140
- margin: "0",
141
- padding: "0",
142
- listStyle: "none",
143
- flex: "none",
144
- },
145
- filters: {
146
- display: "flex",
147
- alignItems: "center",
148
- gap: "16px",
149
- flex: "none",
150
- },
151
- // 官方 Input 的 wrap 是 inline-flex:这里只补宽度,其余样式仍归官方。
152
- search: {
153
- width: "360px",
154
- maxWidth: "100%",
155
- flex: "none",
156
- },
157
- list: {
158
- display: "flex",
159
- flexDirection: "column",
160
- gap: "4px",
161
- margin: "0",
162
- padding: "0",
163
- listStyle: "none",
164
- flex: "none",
165
- },
166
- row: {
167
- display: "flex",
168
- alignItems: "center",
169
- justifyContent: "space-between",
170
- gap: "16px",
171
- padding: "10px 12px",
172
- border: "1px solid var(--dsw-alias-border-l1)",
173
- borderRadius: "10px",
174
- background: "var(--dsw-alias-bg-base)",
175
- flex: "none",
176
- },
177
- identity: {
178
- display: "flex",
179
- flexDirection: "column",
180
- gap: "2px",
181
- minWidth: "0",
182
- },
183
- titleLine: {
184
- display: "flex",
185
- alignItems: "center",
186
- gap: "8px",
187
- minWidth: "0",
188
- },
189
- rowTitle: {
190
- overflow: "hidden",
191
- fontSize: "13px",
192
- lineHeight: "20px",
193
- textOverflow: "ellipsis",
194
- whiteSpace: "nowrap",
195
- },
196
- meta: {
197
- fontSize: "12px",
198
- lineHeight: "18px",
199
- color: "var(--dsw-alias-label-tertiary)",
200
- },
201
- actions: {
202
- display: "flex",
203
- alignItems: "center",
204
- gap: "8px",
205
- flex: "none",
206
- },
207
- pagination: {
208
- display: "flex",
209
- alignItems: "center",
210
- justifyContent: "flex-end",
211
- gap: "8px",
212
- marginTop: "4px",
213
- flex: "none",
214
- },
215
- paginationLabel: {
216
- fontSize: "12px",
217
- lineHeight: "18px",
218
- color: "var(--dsw-alias-label-tertiary)",
219
- fontVariantNumeric: "tabular-nums",
220
- },
221
- status: {
222
- margin: "0",
223
- fontSize: "13px",
224
- lineHeight: "20px",
225
- color: "var(--dsw-alias-label-tertiary)",
226
- flex: "none",
227
- },
228
- failure: {
229
- margin: "0",
230
- fontSize: "13px",
231
- lineHeight: "20px",
232
- color: "var(--dsw-alias-label-error, var(--dsw-alias-label-primary))",
233
- flex: "none",
234
- },
235
- blocking: {
236
- display: "flex",
237
- flexDirection: "column",
238
- alignItems: "center",
239
- gap: "14px",
240
- padding: "32px 40px",
241
- color: "var(--dsw-alias-label-primary)",
242
- },
243
- spinner: {
244
- width: "28px",
245
- height: "28px",
246
- border: "2px solid var(--dsw-alias-border-l2)",
247
- borderTopColor: "var(--dsw-alias-label-primary)",
248
- borderRadius: "50%",
249
- animation: `${spin} 900ms linear infinite`,
250
- },
251
- blockingText: {
252
- margin: "0",
253
- fontSize: "13px",
254
- lineHeight: "20px",
255
- },
256
- } satisfies Record<string, CSSProps>;