@douyinfe/semi-foundation 2.62.0 → 2.63.0-beta.0

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 (50) hide show
  1. package/chat/chat.scss +598 -0
  2. package/chat/chatBoxActionFoundation.ts +64 -0
  3. package/chat/constants.ts +68 -0
  4. package/chat/foundation.ts +306 -0
  5. package/chat/inputboxFoundation.ts +98 -0
  6. package/chat/rtl.scss +22 -0
  7. package/chat/variables.scss +125 -0
  8. package/input/textareaFoundation.ts +5 -0
  9. package/lib/cjs/chat/chat.css +484 -0
  10. package/lib/cjs/chat/chat.scss +598 -0
  11. package/lib/cjs/chat/chatBoxActionFoundation.d.ts +24 -0
  12. package/lib/cjs/chat/chatBoxActionFoundation.js +49 -0
  13. package/lib/cjs/chat/constants.d.ts +41 -0
  14. package/lib/cjs/chat/constants.js +56 -0
  15. package/lib/cjs/chat/foundation.d.ts +76 -0
  16. package/lib/cjs/chat/foundation.js +275 -0
  17. package/lib/cjs/chat/inputboxFoundation.d.ts +20 -0
  18. package/lib/cjs/chat/inputboxFoundation.js +118 -0
  19. package/lib/cjs/chat/rtl.scss +22 -0
  20. package/lib/cjs/chat/variables.scss +125 -0
  21. package/lib/cjs/input/textareaFoundation.js +7 -0
  22. package/lib/cjs/treeSelect/foundation.d.ts +3 -3
  23. package/lib/cjs/treeSelect/foundation.js +2 -6
  24. package/lib/cjs/upload/foundation.d.ts +1 -0
  25. package/lib/cjs/upload/foundation.js +3 -1
  26. package/lib/cjs/upload/upload.css +4 -0
  27. package/lib/cjs/upload/upload.scss +9 -0
  28. package/lib/es/chat/chat.css +484 -0
  29. package/lib/es/chat/chat.scss +598 -0
  30. package/lib/es/chat/chatBoxActionFoundation.d.ts +24 -0
  31. package/lib/es/chat/chatBoxActionFoundation.js +41 -0
  32. package/lib/es/chat/constants.d.ts +41 -0
  33. package/lib/es/chat/constants.js +51 -0
  34. package/lib/es/chat/foundation.d.ts +76 -0
  35. package/lib/es/chat/foundation.js +267 -0
  36. package/lib/es/chat/inputboxFoundation.d.ts +20 -0
  37. package/lib/es/chat/inputboxFoundation.js +110 -0
  38. package/lib/es/chat/rtl.scss +22 -0
  39. package/lib/es/chat/variables.scss +125 -0
  40. package/lib/es/input/textareaFoundation.js +7 -0
  41. package/lib/es/treeSelect/foundation.d.ts +3 -3
  42. package/lib/es/treeSelect/foundation.js +2 -6
  43. package/lib/es/upload/foundation.d.ts +1 -0
  44. package/lib/es/upload/foundation.js +3 -1
  45. package/lib/es/upload/upload.css +4 -0
  46. package/lib/es/upload/upload.scss +9 -0
  47. package/package.json +3 -3
  48. package/treeSelect/foundation.ts +3 -9
  49. package/upload/foundation.ts +4 -2
  50. package/upload/upload.scss +9 -0
@@ -0,0 +1,484 @@
1
+ /* shadow */
2
+ /* sizing */
3
+ /* spacing */
4
+ .semi-chat {
5
+ padding-top: 12px;
6
+ padding-bottom: 12px;
7
+ display: flex;
8
+ flex-direction: column;
9
+ height: 100%;
10
+ max-width: 800px;
11
+ position: relative;
12
+ overflow: hidden;
13
+ }
14
+ .semi-chat-inner {
15
+ display: flex;
16
+ flex-direction: column;
17
+ height: 100%;
18
+ }
19
+ .semi-chat-dropArea {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ background: rgba(var(--semi-grey-2), 0.9);
26
+ z-index: 10;
27
+ border: 5px dotted var(--semi-color-border);
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ border-radius: 16px;
32
+ }
33
+ .semi-chat-dropArea-text {
34
+ font-size: 48px;
35
+ }
36
+ .semi-chat-content {
37
+ overflow: hidden;
38
+ flex: 1 1;
39
+ position: relative;
40
+ }
41
+ .semi-chat-toast {
42
+ position: absolute;
43
+ top: 0;
44
+ left: 50%;
45
+ transform: translateX(-50%);
46
+ }
47
+ .semi-chat-container {
48
+ padding-left: 16px;
49
+ padding-right: 16px;
50
+ height: 100%;
51
+ overflow: scroll;
52
+ }
53
+ .semi-chat-container-scroll-hidden::-webkit-scrollbar {
54
+ display: none;
55
+ }
56
+ .semi-chat-action {
57
+ position: relative;
58
+ z-index: 1;
59
+ }
60
+ .semi-chat-action-content.semi-button {
61
+ position: absolute;
62
+ bottom: 0;
63
+ left: 50%;
64
+ transform: translateX(-50%);
65
+ display: flex;
66
+ justify-content: center;
67
+ align-items: center;
68
+ background: var(--semi-color-bg-0);
69
+ border: 1px solid var(--semi-color-border);
70
+ }
71
+ .semi-chat-action-content.semi-button-light:not(.semi-button-disabled):hover {
72
+ background: var(--semi-color-tertiary-light-hover);
73
+ border: 1px solid var(--semi-color-border);
74
+ }
75
+ .semi-chat-action-backBottom.semi-button {
76
+ width: 42px;
77
+ height: 42px;
78
+ border-radius: 50%;
79
+ }
80
+ .semi-chat-action-stop.semi-button {
81
+ user-select: none;
82
+ height: 42px;
83
+ border-radius: 21px;
84
+ }
85
+ .semi-chat-divider {
86
+ color: var(--semi-color-text-2);
87
+ font-size: 12px;
88
+ margin-top: 12px;
89
+ margin-bottom: 12px;
90
+ font-weight: 400;
91
+ }
92
+ .semi-chat-chatBox {
93
+ display: flex;
94
+ flex-direction: row;
95
+ margin-top: 8px;
96
+ margin-Bottom: 8px;
97
+ column-gap: 12px;
98
+ }
99
+ .semi-chat-chatBox:hover .semi-chat-chatBox-action:not(.semi-chat-chatBox-action-hidden) {
100
+ visibility: visible;
101
+ }
102
+ .semi-chat-chatBox-right {
103
+ flex-direction: row-reverse;
104
+ }
105
+ .semi-chat-chatBox-right .semi-chat-chatBox-wrap {
106
+ align-items: end;
107
+ }
108
+ .semi-chat-chatBox-avatar {
109
+ flex-shrink: 0;
110
+ }
111
+ .semi-chat-chatBox-avatar-hidden {
112
+ visibility: hidden;
113
+ }
114
+ .semi-chat-chatBox-title {
115
+ line-height: 20px;
116
+ font-size: 16px;
117
+ color: var(--semi-color-text-0);
118
+ font-weight: 400;
119
+ text-overflow: ellipsis;
120
+ }
121
+ .semi-chat-chatBox-action {
122
+ visibility: hidden;
123
+ display: flex;
124
+ align-items: center;
125
+ position: relative;
126
+ column-gap: 10px;
127
+ margin-left: 10px;
128
+ margin-right: 10px;
129
+ }
130
+ .semi-chat-chatBox-action-btn.semi-button {
131
+ height: fit-content;
132
+ }
133
+ .semi-chat-chatBox-action-btn.semi-button.semi-button-with-icon-only {
134
+ padding: 0;
135
+ }
136
+ .semi-chat-chatBox-action-icon-flip {
137
+ transform: scaleY(-1);
138
+ }
139
+ .semi-chat-chatBox-action-show {
140
+ visibility: visible;
141
+ }
142
+ .semi-chat-chatBox-action-delete-wrap {
143
+ display: inline-flex;
144
+ }
145
+ .semi-chat-chatBox-action.semi-chat-chatBox-action-hidden, .semi-chat-chatBox-action:hover.semi-chat-chatBox-action-hidden {
146
+ visibility: hidden;
147
+ }
148
+ .semi-chat-chatBox-action .semi-button-borderless:not(.semi-button-disabled):hover {
149
+ background-color: transparent;
150
+ }
151
+ .semi-chat-chatBox-action .semi-button-tertiary.semi-button-borderless {
152
+ color: var(--semi-color-text-2);
153
+ }
154
+ .semi-chat-chatBox-action .semi-button-tertiary.semi-button-borderless:hover {
155
+ color: var(--semi-color-text-0);
156
+ }
157
+ .semi-chat-chatBox-wrap {
158
+ display: flex;
159
+ flex-direction: column;
160
+ align-items: start;
161
+ position: relative;
162
+ row-gap: 8px;
163
+ }
164
+ .semi-chat-chatBox-content-bubble, .semi-chat-chatBox-content-userBubble {
165
+ padding: 8px 12px;
166
+ border-radius: var(--semi-border-radius-large);
167
+ background-color: var(--semi-color-fill-0);
168
+ }
169
+ .semi-chat-chatBox-content code {
170
+ white-space: pre-wrap;
171
+ }
172
+ .semi-chat-chatBox-content .semi-typography {
173
+ color: var(--semi-color-text-0);
174
+ }
175
+ .semi-chat-chatBox-content .semi-chat-attachment-file {
176
+ background: var(--semi-color-fill-2);
177
+ }
178
+ .semi-chat-chatBox-content .semi-chat-attachment-file, .semi-chat-chatBox-content .semi-chat-attachment-img {
179
+ margin-top: 4px;
180
+ margin-bottom: 4px;
181
+ }
182
+ .semi-chat-chatBox-content-user {
183
+ background: var(--semi-color-primary);
184
+ color: var(--semi-color-white);
185
+ }
186
+ .semi-chat-chatBox-content-user .semi-chat-attachment-file {
187
+ background: var(--semi-color-bg-0);
188
+ }
189
+ .semi-chat-chatBox-content-user .semi-typography, .semi-chat-chatBox-content-user .semi-typography code {
190
+ color: var(--semi-color-white);
191
+ }
192
+ .semi-chat-chatBox-content-user .semi-markdownRender ul, .semi-chat-chatBox-content-user .semi-markdownRender li {
193
+ color: var(--semi-color-white);
194
+ }
195
+ .semi-chat-chatBox-content-user .semi-typography a, .semi-chat-chatBox-content-user .semi-typography a:visited, .semi-chat-chatBox-content-user .semi-typography a:hover {
196
+ color: var(--semi-color-white);
197
+ }
198
+ .semi-chat-chatBox-content-error {
199
+ background: var(--semi-color-danger-hover);
200
+ }
201
+ .semi-chat-chatBox-content-error .semi-typography {
202
+ color: var(--semi-color-white);
203
+ }
204
+ .semi-chat-chatBox-content-loading {
205
+ display: flex;
206
+ align-items: baseline;
207
+ }
208
+ .semi-chat-chatBox-content-loading-item {
209
+ border-radius: 50%;
210
+ height: 8px;
211
+ width: 8px;
212
+ background-color: var(--semi-color-text-0);
213
+ margin: 6px 18px;
214
+ overflow: visible;
215
+ position: relative;
216
+ animation: semi-chat-loading-flashing 0.8s infinite alternate;
217
+ animation-delay: -0.2s;
218
+ animation-timing-function: ease;
219
+ }
220
+ .semi-chat-chatBox-content-loading-item::before {
221
+ content: "";
222
+ border-radius: 50%;
223
+ height: 8px;
224
+ width: 8px;
225
+ background-color: var(--semi-color-text-0);
226
+ position: absolute;
227
+ top: 0;
228
+ left: -15px;
229
+ animation: semi-chat-loading-flashing 0.8s infinite alternate;
230
+ animation-timing-function: ease;
231
+ animation-delay: -0.4s;
232
+ }
233
+ .semi-chat-chatBox-content-loading-item::after {
234
+ content: "";
235
+ border-radius: 50%;
236
+ height: 8px;
237
+ width: 8px;
238
+ background-color: var(--semi-color-text-0);
239
+ position: absolute;
240
+ top: 0;
241
+ left: 15px;
242
+ animation: semi-chat-loading-flashing 0.8s infinite alternate;
243
+ animation-delay: 0s;
244
+ animation-timing-function: ease;
245
+ }
246
+ .semi-chat-chatBox-content pre {
247
+ background-color: transparent;
248
+ }
249
+ .semi-chat-chatBox-content-code {
250
+ border-radius: var(--semi-border-radius-large);
251
+ overflow: hidden;
252
+ }
253
+ .semi-chat-chatBox-content-code .semi-codeHighlight pre {
254
+ word-break: break-all;
255
+ white-space: pre-wrap;
256
+ }
257
+ .semi-chat-chatBox-content-code-topSlot {
258
+ display: flex;
259
+ justify-content: space-between;
260
+ background-color: rgba(var(--semi-grey-4), 1);
261
+ align-items: center;
262
+ padding: 5px 8px;
263
+ color: rgba(var(--semi-white), 1);
264
+ font-size: 12px;
265
+ }
266
+ .semi-chat-chatBox-content-code-topSlot-copy {
267
+ min-width: 150px;
268
+ display: flex;
269
+ justify-content: flex-end;
270
+ }
271
+ .semi-chat-chatBox-content-code-topSlot-copy-wrapper {
272
+ display: flex;
273
+ align-items: center;
274
+ column-gap: 5px;
275
+ cursor: pointer;
276
+ background: transparent;
277
+ border: none;
278
+ color: rgba(var(--semi-white), 1);
279
+ line-height: 16px;
280
+ padding: 5px;
281
+ border-radius: var(--semi-border-radius-large);
282
+ }
283
+ .semi-chat-chatBox-content-code-topSlot-toCopy:hover {
284
+ background: rgba(var(--semi-grey-5), 1);
285
+ }
286
+ .semi-chat-chatBox-content-code .semi-codeHighlight-defaultTheme pre[class*=language-] {
287
+ margin: 0px;
288
+ background: var(--semi-color-bg-0);
289
+ }
290
+ .semi-chat-inputBox {
291
+ padding-left: 16px;
292
+ padding-right: 16px;
293
+ padding-top: 8px;
294
+ padding-bottom: 8px;
295
+ }
296
+ .semi-chat-inputBox-clearButton.semi-button {
297
+ border-radius: 50%;
298
+ width: 48px;
299
+ height: 48px;
300
+ margin-top: 4px;
301
+ margin-bottom: 4px;
302
+ }
303
+ .semi-chat-inputBox-clearButton.semi-button .semi-icon {
304
+ font-size: 30px;
305
+ }
306
+ .semi-chat-inputBox-clearButton.semi-button.semi-button-primary.semi-button-borderless {
307
+ color: var(--semi-color-text-2);
308
+ }
309
+ .semi-chat-inputBox-upload .semi-upload-file-list {
310
+ display: none;
311
+ }
312
+ .semi-chat-inputBox-uploadButton.semi-button {
313
+ width: 32px;
314
+ height: 32px;
315
+ }
316
+ .semi-chat-inputBox-uploadButton.semi-button.semi-button-primary.semi-button-borderless {
317
+ color: var(--semi-color-text-0);
318
+ }
319
+ .semi-chat-inputBox-sendButton.semi-button {
320
+ width: 32px;
321
+ height: 32px;
322
+ }
323
+ .semi-chat-inputBox-sendButton.semi-button-icon {
324
+ transform: rotate(45deg);
325
+ }
326
+ .semi-chat-inputBox-sendButton.semi-button.semi-button-disabled.semi-button-borderless {
327
+ color: var(--semi-color-primary-disabled);
328
+ }
329
+ .semi-chat-inputBox-inner {
330
+ display: flex;
331
+ flex-direction: row;
332
+ align-items: flex-end;
333
+ column-gap: 4px;
334
+ }
335
+ .semi-chat-inputBox-container {
336
+ display: flex;
337
+ flex-direction: row;
338
+ flex-grow: 1;
339
+ border-radius: 16px;
340
+ padding: 11px;
341
+ border: 1px solid var(--semi-color-border);
342
+ align-items: end;
343
+ }
344
+ .semi-chat-inputBox-inputArea {
345
+ flex-grow: 1;
346
+ display: flex;
347
+ flex-direction: column;
348
+ }
349
+ .semi-chat-inputBox-textarea {
350
+ flex-grow: 1;
351
+ }
352
+ .semi-chat-inputBox-textarea.semi-input-textarea-wrapper, .semi-chat-inputBox-textarea.semi-input-textarea-wrapper:hover, .semi-chat-inputBox-textarea.semi-input-textarea-wrapper:active {
353
+ border: none;
354
+ background-color: transparent;
355
+ }
356
+ .semi-chat-attachment {
357
+ display: flex;
358
+ flex-direction: row;
359
+ flex-wrap: wrap;
360
+ column-gap: 10px;
361
+ row-gap: 5px;
362
+ }
363
+ .semi-chat-attachment-item {
364
+ position: relative;
365
+ }
366
+ .semi-chat-attachment-item:hover .semi-chat-inputBox-attachment-clear {
367
+ visibility: visible;
368
+ }
369
+ .semi-chat-attachment-img {
370
+ border-radius: var(--semi-border-radius-medium);
371
+ vertical-align: top;
372
+ }
373
+ .semi-chat-attachment a {
374
+ text-decoration: none;
375
+ color: inherit;
376
+ }
377
+ .semi-chat-attachment-clear {
378
+ position: absolute;
379
+ top: -8px;
380
+ right: -8px;
381
+ color: var(--semi-color-text-2);
382
+ }
383
+ .semi-chat-attachment-process.semi-progress-circle {
384
+ position: absolute;
385
+ top: 50%;
386
+ left: 50%;
387
+ transform: translate(-50%, -50%);
388
+ }
389
+ .semi-chat-attachment-file {
390
+ display: flex;
391
+ flex-direction: row;
392
+ align-items: center;
393
+ height: 50px;
394
+ column-gap: 5px;
395
+ padding: 5px;
396
+ border-radius: var(--semi-border-radius-medium);
397
+ background: var(--semi-color-fill-0);
398
+ text-decoration: none;
399
+ }
400
+ .semi-chat-attachment-file-icon {
401
+ color: var(--semi-color-text-2);
402
+ }
403
+ .semi-chat-attachment-file-info {
404
+ display: flex;
405
+ flex-direction: column;
406
+ }
407
+ .semi-chat-attachment-file-title {
408
+ font-size: 16px;
409
+ color: var(--semi-color-text-0);
410
+ max-width: 90px;
411
+ text-overflow: ellipsis;
412
+ overflow: hidden;
413
+ }
414
+ .semi-chat-attachment-file-metadata {
415
+ font-size: 14px;
416
+ color: var(--semi-color-text-2);
417
+ }
418
+ .semi-chat-attachment-file-type {
419
+ text-transform: uppercase;
420
+ }
421
+ .semi-chat .semi-typography a.semi-chat-attachment-file {
422
+ display: flex;
423
+ }
424
+ .semi-chat .semi-typography a.semi-chat-attachment-file .semi-chat-attachment-file-title {
425
+ color: var(--semi-color-text-0);
426
+ }
427
+ .semi-chat-hints {
428
+ display: flex;
429
+ flex-direction: column;
430
+ row-gap: 10px;
431
+ margin-top: 12px;
432
+ margin-bottom: 12px;
433
+ margin-left: 34px;
434
+ }
435
+ .semi-chat-hint-item {
436
+ cursor: pointer;
437
+ display: flex;
438
+ flex-direction: row;
439
+ column-gap: 20px;
440
+ width: fit-content;
441
+ background: transparent;
442
+ align-items: center;
443
+ border: 1px solid var(--semi-color-border);
444
+ padding: 8px 12px;
445
+ border-radius: var(--semi-border-radius-large);
446
+ }
447
+ .semi-chat-hint-item:hover {
448
+ background-color: var(--semi-color-fill-0);
449
+ }
450
+ .semi-chat-hint-content {
451
+ font-size: 14px;
452
+ color: var(--semi-color-text-1);
453
+ }
454
+ .semi-chat-hint-icon {
455
+ color: var(--semi-color-text-2);
456
+ }
457
+
458
+ @keyframes semi-chat-loading-flashing {
459
+ 0% {
460
+ opacity: 1;
461
+ }
462
+ 50% {
463
+ opacity: 0.1;
464
+ }
465
+ to {
466
+ opacity: 1;
467
+ }
468
+ }
469
+ .semi-rtl .semi-chat,
470
+ .semi-portal-rtl .semi-chat {
471
+ direction: rtl;
472
+ }
473
+ .semi-rtl .semi-chat-hint-icon,
474
+ .semi-portal-rtl .semi-chat-hint-icon {
475
+ transform: scaleX(-1);
476
+ }
477
+ .semi-rtl .semi-chat-inputBox-sendButton-icon,
478
+ .semi-portal-rtl .semi-chat-inputBox-sendButton-icon {
479
+ transform: rotate(225deg);
480
+ }
481
+ .semi-rtl .semi-chat-chatBox-action-icon-redo,
482
+ .semi-portal-rtl .semi-chat-chatBox-action-icon-redo {
483
+ transform: scaleX(-1);
484
+ }