@veltra/desktop 1.0.10 → 1.0.11

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 (49) hide show
  1. package/dist/components/action/action-group.vue.d.ts +1 -1
  2. package/dist/components/action/action.vue.d.ts +3 -3
  3. package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
  4. package/dist/components/batch-edit/batch-edit.vue.d.ts +2 -2
  5. package/dist/components/button/button.vue.d.ts +1 -1
  6. package/dist/components/cascade/cascade.vue.d.ts +6 -6
  7. package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
  8. package/dist/components/code-editor/code-editor.js +2 -0
  9. package/dist/components/code-editor/code-editor.js.map +1 -1
  10. package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
  11. package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
  12. package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
  13. package/dist/components/file-picker/file-picker.vue.d.ts +1 -1
  14. package/dist/components/file-viewer/file-viewer.js +195 -30
  15. package/dist/components/file-viewer/file-viewer.js.map +1 -1
  16. package/dist/components/file-viewer/previewers/docx-previewer.js +7 -5
  17. package/dist/components/file-viewer/previewers/docx-previewer.js.map +1 -1
  18. package/dist/components/file-viewer/previewers/image-previewer.js +6 -6
  19. package/dist/components/file-viewer/previewers/image-previewer.js.map +1 -1
  20. package/dist/components/file-viewer/previewers/pdf-previewer.js +5 -3
  21. package/dist/components/file-viewer/previewers/pdf-previewer.js.map +1 -1
  22. package/dist/components/file-viewer/style2.css +387 -136
  23. package/dist/components/grid-input/grid-input.vue.d.ts +1 -1
  24. package/dist/components/input/input.vue.d.ts +3 -3
  25. package/dist/components/multi-select/multi-select.vue.d.ts +4 -4
  26. package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +7 -7
  27. package/dist/components/notification/notification.vue.d.ts +1 -1
  28. package/dist/components/number-input/number-input.vue.d.ts +1 -1
  29. package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
  30. package/dist/components/password-input/password-input.vue.d.ts +1 -1
  31. package/dist/components/pop-confirm/pop-confirm.vue.d.ts +2 -2
  32. package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
  33. package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
  34. package/dist/components/select/select.vue.d.ts +3 -3
  35. package/dist/components/table/table.vue.d.ts +2 -2
  36. package/dist/components/tabs/tabs-horizontal.vue.d.ts +2 -2
  37. package/dist/components/tabs/tabs-vertical.vue.d.ts +2 -2
  38. package/dist/components/tabs/tabs.vue.d.ts +2 -2
  39. package/dist/components/textarea/textarea.vue.d.ts +4 -4
  40. package/dist/components/tip/tip.vue.d.ts +2 -2
  41. package/dist/components/tree/tree.vue.d.ts +6 -6
  42. package/dist/components/tree-select/tree-select.vue.d.ts +7 -7
  43. package/package.json +13 -12
  44. package/src/components/code-editor/code-editor.vue +2 -0
  45. package/src/components/file-viewer/file-viewer.vue +250 -24
  46. package/src/components/file-viewer/previewers/docx-previewer.vue +4 -3
  47. package/src/components/file-viewer/previewers/image-previewer.vue +4 -5
  48. package/src/components/file-viewer/previewers/pdf-previewer.vue +4 -3
  49. package/src/components/file-viewer/style.scss +503 -161
@@ -2,19 +2,23 @@
2
2
  @use 'pkg:@veltra/styles/functions' as fn;
3
3
 
4
4
  @include m.b(file-viewer) {
5
+ --u-file-viewer-canvas: #101114;
6
+ --u-file-viewer-canvas-soft: #17191f;
7
+ --u-file-viewer-page-shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
8
+
5
9
  position: relative;
6
10
  display: flex;
7
11
  width: 100%;
8
12
  height: 100%;
9
- min-height: 480px;
13
+ min-height: 520px;
10
14
  color: fn.use-var(text-color, main);
11
15
  background: fn.use-var(bg-color, top);
12
- border-radius: 12px;
13
- overflow: hidden;
14
16
  border: 1px solid fn.use-var(border, color);
17
+ border-radius: 8px;
18
+ overflow: hidden;
19
+ box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
15
20
 
16
21
  @include m.e(inner) {
17
- // 内嵌模式下透明包装,直接把子节点暴露为根的 flex 子项
18
22
  display: contents;
19
23
  }
20
24
 
@@ -23,9 +27,9 @@
23
27
  inset: 0;
24
28
  z-index: 2000;
25
29
  display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- padding: clamp(16px, 3vw, 48px);
30
+ align-items: stretch;
31
+ justify-content: stretch;
32
+ padding: 0;
29
33
  min-height: 0;
30
34
  max-height: none;
31
35
  background: transparent;
@@ -33,66 +37,98 @@
33
37
  border-radius: 0;
34
38
  overflow: visible;
35
39
  outline: none;
40
+ box-shadow: none;
36
41
  }
37
42
 
38
- // 模态下的后代覆盖(必须用 & 自拼接,避免 m.e() 误拼为 .is-modal__xxx)
39
43
  &.is-modal &__backdrop {
40
44
  position: absolute;
41
45
  inset: 0;
42
- background: rgba(15, 23, 42, 0.52);
43
- backdrop-filter: blur(6px);
44
- -webkit-backdrop-filter: blur(6px);
46
+ background:
47
+ linear-gradient(180deg, rgba(5, 7, 11, 0.78), rgba(4, 5, 8, 0.94)),
48
+ linear-gradient(
49
+ 90deg,
50
+ rgba(255, 255, 255, 0.06),
51
+ transparent 24%,
52
+ transparent 76%,
53
+ rgba(255, 255, 255, 0.035)
54
+ );
55
+ backdrop-filter: blur(18px) saturate(1.16);
56
+ -webkit-backdrop-filter: blur(18px) saturate(1.16);
45
57
  }
46
58
 
47
59
  &.is-modal &__inner {
60
+ display: contents;
61
+ }
62
+
63
+ &.is-modal &__sidebar,
64
+ &.is-modal &__stage {
48
65
  position: relative;
49
- display: flex;
50
- width: 100%;
51
- height: 100%;
52
- max-width: 1440px;
53
- background: fn.use-var(bg-color, top);
54
- border: 1px solid fn.use-var(border, color);
55
- border-radius: 16px;
56
- overflow: hidden;
57
- box-shadow:
58
- 0 24px 64px rgba(15, 23, 42, 0.32),
59
- 0 2px 8px rgba(15, 23, 42, 0.18);
60
66
  z-index: 1;
67
+ pointer-events: auto;
61
68
  }
62
69
 
63
70
  @include m.e(sidebar) {
64
71
  display: flex;
65
72
  flex-direction: column;
66
- border-right: 1px solid fn.use-var(border, color);
67
- background: fn.use-var(bg-color, middle);
68
73
  flex-shrink: 0;
69
- min-width: 0;
74
+ min-width: 220px;
75
+ max-width: 380px;
76
+ min-height: 0;
77
+ background:
78
+ linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%),
79
+ fn.use-var(bg-color, middle);
80
+ border-right: 1px solid fn.use-var(border, color);
81
+ }
82
+
83
+ &.is-modal &__sidebar {
84
+ color: rgba(255, 255, 255, 0.82);
85
+ background: linear-gradient(
86
+ 90deg,
87
+ rgba(8, 10, 15, 0.76),
88
+ rgba(8, 10, 15, 0.58) 78%,
89
+ rgba(8, 10, 15, 0.34)
90
+ );
91
+ border-right: 1px solid rgba(255, 255, 255, 0.055);
92
+ box-shadow: none;
93
+ backdrop-filter: blur(18px) saturate(1.08);
94
+ -webkit-backdrop-filter: blur(18px) saturate(1.08);
70
95
  }
71
96
 
72
97
  @include m.e(sidebar-head) {
73
98
  display: flex;
99
+ align-items: center;
74
100
  justify-content: space-between;
75
- align-items: baseline;
76
- padding: 18px 20px 10px;
101
+ gap: 12px;
102
+ padding: 14px 12px 6px;
77
103
  color: fn.use-var(text-color, title);
78
104
  }
79
105
 
106
+ &.is-modal &__sidebar-head {
107
+ color: rgba(255, 255, 255, 0.68);
108
+ }
109
+
80
110
  @include m.e(sidebar-title) {
81
- font-size: 13px;
82
- font-weight: 600;
83
- letter-spacing: 0.04em;
84
- text-transform: uppercase;
111
+ font-size: 12px;
112
+ font-weight: 620;
113
+ line-height: 1.2;
85
114
  }
86
115
 
87
116
  @include m.e(sidebar-count) {
88
- font-size: 12px;
117
+ flex-shrink: 0;
118
+ font-size: 11px;
119
+ font-variant-numeric: tabular-nums;
89
120
  color: fn.use-var(text-color, second);
90
121
  }
91
122
 
123
+ &.is-modal &__sidebar-count,
124
+ &.is-modal &__item-size {
125
+ color: rgba(255, 255, 255, 0.48);
126
+ }
127
+
92
128
  @include m.e(list) {
93
129
  flex: 1;
94
130
  min-height: 0;
95
- padding: 4px 10px 16px;
131
+ padding: 4px 8px 12px;
96
132
  }
97
133
 
98
134
  @include m.e(list-empty) {
@@ -104,92 +140,166 @@
104
140
  }
105
141
 
106
142
  @include m.e(item) {
143
+ position: relative;
107
144
  display: flex;
108
- gap: 12px;
109
145
  align-items: center;
110
- padding: 10px 12px;
111
- margin: 2px 0;
112
- border-radius: 8px;
146
+ gap: 12px;
147
+ min-height: 42px;
148
+ padding: 7px 8px 7px 12px;
149
+ margin: 0;
150
+ border-radius: 6px;
113
151
  cursor: pointer;
114
152
  transition:
115
153
  background 0.18s ease,
116
- color 0.18s ease,
117
- transform 0.18s ease;
154
+ color 0.18s ease;
155
+
156
+ &::before {
157
+ position: absolute;
158
+ left: 0;
159
+ top: 8px;
160
+ bottom: 8px;
161
+ width: 2px;
162
+ border-radius: 999px;
163
+ background: fn.use-var(color, primary);
164
+ content: '';
165
+ opacity: 0;
166
+ transform: scaleY(0.45);
167
+ transition:
168
+ opacity 0.18s ease,
169
+ transform 0.18s ease;
170
+ }
118
171
 
119
172
  &:hover {
120
173
  background: fn.use-var(bg-color, hover);
121
174
  }
122
175
 
123
176
  @include m.is(active) {
124
- background: color-mix(in srgb, #{fn.use-var(color, primary)} 14%, transparent);
125
- color: fn.use-var(color, primary);
177
+ background: color-mix(in srgb, #{fn.use-var(color, primary)} 8%, transparent);
178
+
179
+ &::before {
180
+ opacity: 1;
181
+ transform: scaleY(1);
182
+ }
183
+ }
184
+ }
185
+
186
+ &.is-modal &__item {
187
+ color: rgba(255, 255, 255, 0.78);
188
+
189
+ &:hover {
190
+ background: rgba(255, 255, 255, 0.055);
191
+ }
192
+
193
+ @include m.is(active) {
194
+ color: #fff;
195
+ background: rgba(255, 255, 255, 0.07);
196
+
197
+ &::before {
198
+ background: rgba(255, 255, 255, 0.82);
199
+ }
126
200
  }
127
201
  }
128
202
 
129
203
  @include m.e(item-meta) {
130
204
  display: flex;
205
+ flex: 1;
131
206
  flex-direction: column;
207
+ gap: 4px;
132
208
  min-width: 0;
133
- gap: 2px;
134
- flex: 1;
135
209
  }
136
210
 
137
211
  @include m.e(item-name) {
212
+ color: fn.use-var(text-color, title);
138
213
  font-size: 13px;
139
- line-height: 1.4;
214
+ font-weight: 520;
215
+ line-height: 1.35;
216
+
140
217
  @include m.ellipsis;
141
218
  }
142
219
 
220
+ &.is-modal &__item-name {
221
+ color: rgba(255, 255, 255, 0.86);
222
+ }
223
+
143
224
  @include m.e(item-size) {
144
225
  font-size: 11px;
226
+ line-height: 1;
145
227
  color: fn.use-var(text-color, second);
146
228
  }
147
229
 
148
- @include m.e(badge) {
230
+ @include m.e(item-kind) {
149
231
  flex-shrink: 0;
232
+ min-width: 30px;
233
+ color: fn.use-var(text-color, placeholder);
234
+ font-size: 10px;
235
+ font-weight: 720;
236
+ line-height: 1;
237
+ text-align: right;
238
+ }
239
+
240
+ &.is-modal &__item-kind {
241
+ color: rgba(255, 255, 255, 0.38);
242
+ }
243
+
244
+ &.is-modal &__item.is-active &__item-kind {
245
+ color: rgba(255, 255, 255, 0.68);
246
+ }
247
+
248
+ @include m.e(badge) {
249
+ --u-file-viewer-kind: #{fn.use-var(text-color, second)};
250
+
150
251
  display: inline-flex;
151
252
  align-items: center;
152
253
  justify-content: center;
153
- width: 42px;
154
- height: 28px;
155
- border-radius: 6px;
156
- font-size: 11px;
157
- font-weight: 700;
158
- letter-spacing: 0.04em;
159
- color: #fff;
160
- background: fn.use-var(text-color, placeholder);
254
+ flex-shrink: 0;
255
+ width: 40px;
256
+ height: 26px;
257
+ border: 1px solid color-mix(in srgb, var(--u-file-viewer-kind) 28%, transparent);
258
+ border-radius: 7px;
259
+ color: var(--u-file-viewer-kind);
260
+ background: color-mix(in srgb, var(--u-file-viewer-kind) 10%, transparent);
261
+ font-size: 10px;
262
+ font-weight: 760;
263
+ line-height: 1;
264
+ }
161
265
 
162
- @include m.em(badge, image) {
163
- background: #0ea5e9;
164
- }
266
+ @include m.em(badge, image) {
267
+ --u-file-viewer-kind: #0891b2;
268
+ }
165
269
 
166
- @include m.em(badge, video) {
167
- background: #ef4444;
168
- }
270
+ @include m.em(badge, video) {
271
+ --u-file-viewer-kind: #db2777;
272
+ }
169
273
 
170
- @include m.em(badge, pdf) {
171
- background: #dc2626;
172
- }
274
+ @include m.em(badge, pdf) {
275
+ --u-file-viewer-kind: #dc2626;
276
+ }
173
277
 
174
- @include m.em(badge, sheet) {
175
- background: #16a34a;
176
- }
278
+ @include m.em(badge, sheet) {
279
+ --u-file-viewer-kind: #15803d;
280
+ }
177
281
 
178
- @include m.em(badge, docx) {
179
- background: #2563eb;
180
- }
282
+ @include m.em(badge, docx) {
283
+ --u-file-viewer-kind: #2563eb;
284
+ }
181
285
 
182
- @include m.em(badge, text) {
183
- background: #64748b;
184
- }
286
+ @include m.em(badge, text) {
287
+ --u-file-viewer-kind: #64748b;
185
288
  }
186
289
 
187
290
  @include m.e(stage) {
188
- flex: 1;
189
291
  display: flex;
292
+ flex: 1;
190
293
  flex-direction: column;
191
294
  min-width: 0;
192
295
  min-height: 0;
296
+ background: fn.use-var(bg-color, top);
297
+ }
298
+
299
+ &.is-modal &__stage {
300
+ position: relative;
301
+ color: rgba(255, 255, 255, 0.86);
302
+ background: transparent;
193
303
  }
194
304
 
195
305
  @include m.e(stage-head) {
@@ -197,95 +307,247 @@
197
307
  align-items: center;
198
308
  justify-content: space-between;
199
309
  gap: 16px;
200
- padding: 14px 22px;
310
+ min-height: 66px;
311
+ padding: 12px 14px 12px 18px;
312
+ background:
313
+ linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), fn.use-var(bg-color, top);
201
314
  border-bottom: 1px solid fn.use-var(border, color);
202
- background: fn.use-var(bg-color, top);
203
315
  flex-shrink: 0;
204
316
  }
205
317
 
318
+ &.is-modal &__stage-head {
319
+ min-height: 64px;
320
+ color: rgba(255, 255, 255, 0.9);
321
+ background: linear-gradient(
322
+ 180deg,
323
+ rgba(9, 11, 16, 0.72),
324
+ rgba(9, 11, 16, 0.28) 72%,
325
+ transparent
326
+ );
327
+ border-bottom-color: transparent;
328
+ box-shadow: none;
329
+ backdrop-filter: blur(16px) saturate(1.08);
330
+ -webkit-backdrop-filter: blur(16px) saturate(1.08);
331
+ }
332
+
206
333
  @include m.e(stage-title) {
207
334
  display: flex;
208
335
  align-items: center;
336
+ min-width: 0;
209
337
  gap: 12px;
338
+ }
339
+
340
+ @include m.e(stage-copy) {
341
+ display: flex;
342
+ flex-direction: column;
210
343
  min-width: 0;
344
+ gap: 5px;
211
345
  }
212
346
 
213
347
  @include m.e(stage-name) {
214
- font-size: 14px;
215
- font-weight: 600;
216
348
  color: fn.use-var(text-color, title);
349
+ font-size: 14px;
350
+ font-weight: 650;
351
+ line-height: 1.25;
352
+
217
353
  @include m.ellipsis;
218
354
  }
219
355
 
356
+ &.is-modal &__stage-name {
357
+ color: rgba(255, 255, 255, 0.94);
358
+ }
359
+
220
360
  @include m.e(stage-sub) {
221
- font-size: 12px;
361
+ display: flex;
362
+ align-items: center;
363
+ gap: 8px;
364
+ min-width: 0;
222
365
  color: fn.use-var(text-color, second);
223
- flex-shrink: 0;
366
+ font-size: 12px;
367
+ line-height: 1;
368
+
369
+ span + span {
370
+ position: relative;
371
+ padding-left: 8px;
372
+
373
+ &::before {
374
+ position: absolute;
375
+ left: 0;
376
+ top: 50%;
377
+ width: 2px;
378
+ height: 2px;
379
+ border-radius: 50%;
380
+ background: currentColor;
381
+ opacity: 0.55;
382
+ content: '';
383
+ transform: translateY(-50%);
384
+ }
385
+ }
386
+ }
387
+
388
+ &.is-modal &__stage-sub {
389
+ color: rgba(255, 255, 255, 0.52);
224
390
  }
225
391
 
226
392
  @include m.e(stage-actions) {
227
393
  display: flex;
228
- gap: 8px;
394
+ align-items: center;
395
+ justify-content: flex-end;
229
396
  flex-shrink: 0;
397
+ flex-wrap: wrap;
398
+ gap: 8px;
399
+ }
400
+
401
+ @include m.e(action-group) {
402
+ display: inline-flex;
403
+ align-items: center;
404
+ gap: 2px;
405
+ height: 34px;
406
+ padding: 2px;
407
+ border: 1px solid color-mix(in srgb, #{fn.use-var(border, color)} 86%, transparent);
408
+ border-radius: 8px;
409
+ background: fn.use-var(bg-color, middle);
410
+ }
411
+
412
+ &.is-modal &__action-group {
413
+ border-color: rgba(255, 255, 255, 0.08);
414
+ background: rgba(255, 255, 255, 0.055);
415
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.055) inset;
230
416
  }
231
417
 
232
418
  @include m.e(action) {
419
+ display: inline-flex;
420
+ align-items: center;
421
+ justify-content: center;
233
422
  height: 30px;
234
- padding: 0 14px;
423
+ padding: 0 12px;
424
+ border: 1px solid transparent;
235
425
  border-radius: 6px;
236
- border: 1px solid fn.use-var(border, color);
237
426
  background: transparent;
238
- color: inherit;
427
+ color: fn.use-var(text-color, second);
239
428
  font-size: 12px;
429
+ line-height: 1;
240
430
  cursor: pointer;
241
431
  transition:
242
- background 0.18s,
243
- border-color 0.18s,
244
- color 0.18s;
432
+ background 0.16s ease,
433
+ border-color 0.16s ease,
434
+ color 0.16s ease,
435
+ transform 0.16s ease;
245
436
 
246
437
  &:not(:disabled):hover {
247
- border-color: fn.use-var(color, primary);
248
438
  color: fn.use-var(color, primary);
439
+ background: color-mix(in srgb, #{fn.use-var(color, primary)} 10%, transparent);
440
+ }
441
+
442
+ &:not(:disabled):active {
443
+ transform: translateY(1px);
249
444
  }
250
445
 
251
446
  &:disabled {
252
- opacity: 0.45;
447
+ opacity: 0.38;
253
448
  cursor: not-allowed;
254
449
  }
450
+ }
255
451
 
256
- @include m.em(action, primary) {
257
- background: fn.use-var(color, primary);
258
- border-color: fn.use-var(color, primary);
452
+ &.is-modal &__action {
453
+ color: rgba(255, 255, 255, 0.68);
454
+
455
+ &:not(:disabled):hover {
259
456
  color: #fff;
457
+ background: rgba(255, 255, 255, 0.1);
458
+ }
459
+ }
260
460
 
261
- &:not(:disabled):hover {
262
- color: #fff;
263
- filter: brightness(1.05);
264
- }
461
+ @include m.em(action, icon) {
462
+ width: 30px;
463
+ padding: 0;
464
+ }
465
+
466
+ @include m.em(action, primary) {
467
+ color: #fff;
468
+ background: fn.use-var(color, primary);
469
+ border-color: fn.use-var(color, primary);
470
+
471
+ &:not(:disabled):hover {
472
+ color: #fff;
473
+ background: color-mix(in srgb, #{fn.use-var(color, primary)} 88%, #fff);
265
474
  }
475
+ }
266
476
 
267
- @include m.em(action, icon) {
268
- width: 30px;
269
- padding: 0;
270
- display: inline-flex;
271
- align-items: center;
272
- justify-content: center;
273
- margin-left: 4px;
274
- color: fn.use-var(text-color, second);
275
-
276
- &:not(:disabled):hover {
277
- border-color: fn.use-var(color, danger);
278
- color: fn.use-var(color, danger);
279
- }
477
+ &.is-modal &__action--primary {
478
+ color: #06111d;
479
+ background: rgba(255, 255, 255, 0.92);
480
+ border-color: rgba(255, 255, 255, 0.92);
481
+
482
+ &:not(:disabled):hover {
483
+ color: #06111d;
484
+ background: #fff;
280
485
  }
281
486
  }
282
487
 
488
+ @include m.e(zoom-value) {
489
+ min-width: 48px;
490
+ color: fn.use-var(text-color, title);
491
+ font-size: 12px;
492
+ font-variant-numeric: tabular-nums;
493
+ text-align: center;
494
+ user-select: none;
495
+ }
496
+
497
+ &.is-modal &__zoom-value {
498
+ color: rgba(255, 255, 255, 0.84);
499
+ }
500
+
283
501
  @include m.e(body) {
284
502
  position: relative;
285
503
  flex: 1;
286
504
  min-height: 0;
287
- background: fn.use-var(bg-color, bottom);
288
505
  overflow: hidden;
506
+ background:
507
+ linear-gradient(180deg, var(--u-file-viewer-canvas-soft), var(--u-file-viewer-canvas)),
508
+ var(--u-file-viewer-canvas);
509
+ }
510
+
511
+ &.is-modal &__body {
512
+ background:
513
+ linear-gradient(180deg, rgba(13, 16, 23, 0.58), rgba(5, 6, 10, 0.82)),
514
+ linear-gradient(
515
+ 90deg,
516
+ rgba(255, 255, 255, 0.035),
517
+ transparent 22%,
518
+ transparent 78%,
519
+ rgba(255, 255, 255, 0.025)
520
+ );
521
+ box-shadow: none;
522
+ }
523
+
524
+ @include m.e(viewport) {
525
+ position: absolute;
526
+ inset: 0;
527
+ overflow: hidden;
528
+ display: flex;
529
+ align-items: center;
530
+ justify-content: center;
531
+ }
532
+
533
+ @include m.e(previewer) {
534
+ transform-origin: center center;
535
+ transition: transform 0.18s ease;
536
+ will-change: transform;
537
+ }
538
+
539
+ &__viewport.is-pannable {
540
+ cursor: grab;
541
+ touch-action: none;
542
+ }
543
+
544
+ &__viewport.is-dragging {
545
+ cursor: grabbing;
546
+ }
547
+
548
+ &__viewport.is-dragging &__previewer {
549
+ transition: none;
550
+ pointer-events: none;
289
551
  }
290
552
 
291
553
  @include m.e(empty) {
@@ -294,7 +556,7 @@
294
556
  display: flex;
295
557
  align-items: center;
296
558
  justify-content: center;
297
- color: fn.use-var(text-color, second);
559
+ color: rgba(255, 255, 255, 0.68);
298
560
  }
299
561
 
300
562
  @include m.e(image) {
@@ -303,25 +565,28 @@
303
565
  display: flex;
304
566
  align-items: center;
305
567
  justify-content: center;
306
- padding: 24px;
568
+ padding: clamp(20px, 3vw, 44px);
307
569
  user-select: none;
308
570
 
309
571
  img {
310
572
  max-width: 100%;
311
573
  max-height: 100%;
312
574
  object-fit: contain;
313
- transition: transform 0.3s ease;
314
575
  border-radius: 6px;
315
- box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
576
+ background: #fff;
577
+ box-shadow: var(--u-file-viewer-page-shadow);
316
578
  }
579
+ }
317
580
 
318
- @include m.is(actual) {
319
- img {
320
- max-width: none;
321
- max-height: none;
322
- object-fit: none;
323
- cursor: zoom-out;
324
- }
581
+ &.is-modal &__image {
582
+ padding: clamp(18px, 4vw, 64px);
583
+
584
+ img {
585
+ background: rgba(255, 255, 255, 0.02);
586
+ border-radius: 4px;
587
+ box-shadow:
588
+ 0 38px 110px rgba(0, 0, 0, 0.52),
589
+ 0 0 0 1px rgba(255, 255, 255, 0.08);
325
590
  }
326
591
  }
327
592
 
@@ -340,20 +605,30 @@
340
605
  }
341
606
  }
342
607
 
608
+ &.is-modal &__video {
609
+ background: transparent;
610
+ }
611
+
343
612
  @include m.e(text) {
344
613
  position: absolute;
345
614
  inset: 0;
615
+ background: #111318;
616
+ }
617
+
618
+ &.is-modal &__text {
619
+ background: rgba(5, 7, 10, 0.76);
346
620
  }
347
621
 
348
622
  @include m.e(text-pre) {
623
+ min-width: max-content;
349
624
  margin: 0;
350
- padding: 20px 24px;
625
+ padding: 22px 26px;
626
+ color: rgba(255, 255, 255, 0.86);
351
627
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
352
628
  font-size: 12.5px;
353
- line-height: 1.55;
354
- white-space: pre;
629
+ line-height: 1.65;
355
630
  tab-size: 2;
356
- color: fn.use-var(text-color, main);
631
+ white-space: pre;
357
632
  }
358
633
 
359
634
  @include m.e(pdf) {
@@ -365,29 +640,47 @@
365
640
  @include m.e(pdf-viewport) {
366
641
  width: 100%;
367
642
  height: 100%;
368
- background: fn.use-var(bg-color, middle);
643
+ background: transparent;
369
644
  }
370
645
 
371
646
  @include m.e(pdf-page) {
372
- margin: 16px auto;
647
+ margin: 24px auto;
373
648
  background: #fff;
374
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
649
+ box-shadow: var(--u-file-viewer-page-shadow);
650
+ }
651
+
652
+ &.is-modal &__pdf-page {
653
+ margin: clamp(24px, 3vw, 44px) auto;
654
+ box-shadow:
655
+ 0 38px 110px rgba(0, 0, 0, 0.5),
656
+ 0 0 0 1px rgba(255, 255, 255, 0.04);
375
657
  }
376
658
 
377
659
  @include m.e(docx) {
378
660
  position: absolute;
379
661
  inset: 0;
380
- background: fn.use-var(bg-color, middle);
662
+ background: transparent;
381
663
  }
382
664
 
383
665
  @include m.e(docx-body) {
384
- padding: 24px;
666
+ min-height: 100%;
667
+ padding: clamp(22px, 3vw, 44px);
385
668
 
386
669
  :deep(.u-file-viewer__docx-doc) {
387
670
  margin: 0 auto;
388
- background: #fff;
389
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
390
671
  color: #222;
672
+ background: #fff;
673
+ box-shadow: var(--u-file-viewer-page-shadow);
674
+ }
675
+ }
676
+
677
+ &.is-modal &__docx-body {
678
+ padding: clamp(24px, 4vw, 64px);
679
+
680
+ :deep(.u-file-viewer__docx-doc) {
681
+ box-shadow:
682
+ 0 38px 110px rgba(0, 0, 0, 0.5),
683
+ 0 0 0 1px rgba(255, 255, 255, 0.04);
391
684
  }
392
685
  }
393
686
 
@@ -396,22 +689,34 @@
396
689
  inset: 0;
397
690
  display: flex;
398
691
  flex-direction: column;
399
- background: fn.use-var(bg-color, middle);
692
+ background: fn.use-var(bg-color, top);
693
+ }
694
+
695
+ &.is-modal &__sheet {
696
+ background: rgba(8, 10, 14, 0.82);
400
697
  }
401
698
 
402
699
  @include m.e(sheet-note) {
403
700
  padding: 8px 16px;
404
- font-size: 12px;
405
701
  color: fn.use-var(text-color, second);
406
702
  background: fn.use-var(bg-color, top);
407
703
  border-bottom: 1px solid fn.use-var(border, color);
704
+ font-size: 12px;
705
+ line-height: 1.4;
408
706
  flex-shrink: 0;
409
707
  }
410
708
 
709
+ &.is-modal &__sheet-note,
710
+ &.is-modal &__sheet-tabs {
711
+ color: rgba(255, 255, 255, 0.62);
712
+ background: rgba(10, 12, 18, 0.78);
713
+ border-bottom-color: rgba(255, 255, 255, 0.08);
714
+ }
715
+
411
716
  @include m.e(sheet-tabs) {
412
717
  display: flex;
413
- gap: 4px;
414
- padding: 8px 12px;
718
+ gap: 6px;
719
+ padding: 9px 12px;
415
720
  border-bottom: 1px solid fn.use-var(border, color);
416
721
  background: fn.use-var(bg-color, top);
417
722
  flex-shrink: 0;
@@ -422,15 +727,16 @@
422
727
  flex-shrink: 0;
423
728
  height: 28px;
424
729
  padding: 0 12px;
425
- border-radius: 6px;
426
730
  border: 1px solid transparent;
731
+ border-radius: 6px;
427
732
  background: transparent;
428
733
  color: fn.use-var(text-color, second);
429
734
  font-size: 12px;
430
735
  cursor: pointer;
431
736
  transition:
432
- background 0.18s,
433
- color 0.18s;
737
+ background 0.18s ease,
738
+ border-color 0.18s ease,
739
+ color 0.18s ease;
434
740
 
435
741
  &:hover {
436
742
  background: fn.use-var(bg-color, hover);
@@ -438,8 +744,24 @@
438
744
  }
439
745
 
440
746
  @include m.is(active) {
441
- background: color-mix(in srgb, #{fn.use-var(color, primary)} 14%, transparent);
442
747
  color: fn.use-var(color, primary);
748
+ background: color-mix(in srgb, #{fn.use-var(color, primary)} 11%, transparent);
749
+ border-color: color-mix(in srgb, #{fn.use-var(color, primary)} 22%, transparent);
750
+ }
751
+ }
752
+
753
+ &.is-modal &__sheet-tab {
754
+ color: rgba(255, 255, 255, 0.58);
755
+
756
+ &:hover {
757
+ color: rgba(255, 255, 255, 0.88);
758
+ background: rgba(255, 255, 255, 0.07);
759
+ }
760
+
761
+ @include m.is(active) {
762
+ color: #fff;
763
+ background: rgba(255, 255, 255, 0.1);
764
+ border-color: rgba(255, 255, 255, 0.13);
443
765
  }
444
766
  }
445
767
 
@@ -455,17 +777,51 @@
455
777
  display: flex;
456
778
  align-items: center;
457
779
  justify-content: center;
458
- color: fn.use-var(text-color, second);
780
+ color: rgba(255, 255, 255, 0.72);
781
+ background: color-mix(in srgb, var(--u-file-viewer-canvas) 74%, transparent);
459
782
  font-size: 13px;
460
783
  pointer-events: none;
461
784
  }
785
+
786
+ @media (max-width: 720px) {
787
+ &:not(.is-modal) {
788
+ flex-direction: column;
789
+ }
790
+
791
+ &.is-modal {
792
+ flex-direction: column;
793
+ }
794
+
795
+ @include m.e(sidebar) {
796
+ width: 100% !important;
797
+ max-width: none;
798
+ height: 164px;
799
+ border-right: none;
800
+ border-bottom: 1px solid fn.use-var(border, color);
801
+ }
802
+
803
+ &.is-modal &__sidebar {
804
+ border-bottom-color: rgba(255, 255, 255, 0.08);
805
+ border-right: none;
806
+ }
807
+
808
+ @include m.e(stage-head) {
809
+ align-items: flex-start;
810
+ flex-direction: column;
811
+ }
812
+
813
+ @include m.e(stage-actions) {
814
+ justify-content: flex-start;
815
+ width: 100%;
816
+ }
817
+ }
462
818
  }
463
819
 
464
820
  .u-file-viewer-fade-enter-active,
465
821
  .u-file-viewer-fade-leave-active {
466
822
  transition:
467
- opacity 0.22s ease,
468
- transform 0.22s ease;
823
+ opacity 0.2s ease,
824
+ transform 0.2s ease;
469
825
  }
470
826
 
471
827
  .u-file-viewer-fade-enter-from,
@@ -476,29 +832,15 @@
476
832
 
477
833
  .u-file-viewer-modal-enter-active,
478
834
  .u-file-viewer-modal-leave-active {
479
- transition: opacity 0.22s ease;
480
-
481
- .u-file-viewer__inner {
482
- transition:
483
- opacity 0.24s ease,
484
- transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
485
- }
835
+ transition: opacity 0.18s ease;
836
+ will-change: opacity;
837
+ }
486
838
 
487
- .u-file-viewer__backdrop {
488
- transition: opacity 0.22s ease;
489
- }
839
+ .u-file-viewer-modal-leave-active {
840
+ pointer-events: none;
490
841
  }
491
842
 
492
843
  .u-file-viewer-modal-enter-from,
493
844
  .u-file-viewer-modal-leave-to {
494
- opacity: 1;
495
-
496
- .u-file-viewer__inner {
497
- opacity: 0;
498
- transform: translateY(12px) scale(0.985);
499
- }
500
-
501
- .u-file-viewer__backdrop {
502
- opacity: 0;
503
- }
845
+ opacity: 0;
504
846
  }