@dsh-plugin/dsh-ui-components 0.0.1 → 0.1.0-dev.43613492370

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 (65) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +21 -21
  3. package/README.md +136 -136
  4. package/README.zh_CN.md +136 -136
  5. package/docs/tokens.md +67 -67
  6. package/lib/basic/form.js +49 -49
  7. package/lib/basic/styles.js +391 -391
  8. package/lib/composites/styles.js +427 -427
  9. package/lib/data/styles.js +257 -257
  10. package/lib/display/styles.js +310 -310
  11. package/lib/feedback/styles.js +228 -228
  12. package/lib/foundation/bridge.js +203 -203
  13. package/lib/navigation/styles.js +417 -417
  14. package/package.json +104 -104
  15. package/scripts/check-size.mjs +69 -69
  16. package/scripts/dump-npm-latest.mjs +59 -59
  17. package/scripts/gen-host-tokens.mjs +61 -61
  18. package/scripts/gen-icons.mjs +188 -178
  19. package/scripts/verify-no-literal-colors.mjs +63 -63
  20. package/scripts/verify-tokens.mjs +135 -135
  21. package/src/basic/button.tsx +76 -76
  22. package/src/basic/form.tsx +187 -187
  23. package/src/basic/icon-button.tsx +66 -66
  24. package/src/basic/index.ts +38 -38
  25. package/src/basic/input.tsx +140 -140
  26. package/src/basic/select.tsx +120 -120
  27. package/src/basic/styles.ts +412 -412
  28. package/src/basic/toggle.tsx +116 -116
  29. package/src/composites/data-view.tsx +189 -189
  30. package/src/composites/index.ts +11 -11
  31. package/src/composites/indicator.tsx +90 -90
  32. package/src/composites/menu-select.tsx +230 -230
  33. package/src/composites/panel.tsx +72 -72
  34. package/src/composites/settings.tsx +80 -80
  35. package/src/composites/styles.ts +450 -450
  36. package/src/data/collection.tsx +71 -71
  37. package/src/data/index.ts +39 -39
  38. package/src/data/info.tsx +89 -89
  39. package/src/data/picker.tsx +113 -113
  40. package/src/data/styles.ts +278 -278
  41. package/src/display/container.tsx +67 -67
  42. package/src/display/feedback.tsx +92 -92
  43. package/src/display/index.ts +44 -44
  44. package/src/display/label.tsx +165 -165
  45. package/src/display/overlay.tsx +103 -103
  46. package/src/display/styles.ts +332 -332
  47. package/src/feedback/global.tsx +110 -110
  48. package/src/feedback/index.ts +19 -19
  49. package/src/feedback/inline.tsx +50 -50
  50. package/src/feedback/panel.tsx +93 -93
  51. package/src/feedback/styles.ts +250 -250
  52. package/src/foundation/bridge.ts +318 -318
  53. package/src/foundation/icons.tsx +315 -315
  54. package/src/foundation/index.ts +33 -33
  55. package/src/foundation/palette.ts +153 -153
  56. package/src/foundation/provider.tsx +62 -62
  57. package/src/foundation/style.ts +63 -63
  58. package/src/foundation/tokens.ts +62 -62
  59. package/src/index.ts +18 -18
  60. package/src/navigation/hierarchy.tsx +82 -82
  61. package/src/navigation/index.ts +21 -21
  62. package/src/navigation/indicator.tsx +125 -125
  63. package/src/navigation/menu.tsx +94 -94
  64. package/src/navigation/segmented.tsx +136 -136
  65. package/src/navigation/styles.ts +438 -438
@@ -10,433 +10,433 @@
10
10
  import { injectUiStyle } from '../foundation/style.js';
11
11
  import { G } from '../foundation/tokens.js';
12
12
  /** DSH 专属组合件样式表。 */
13
- export const COMPOSITES_CSS = `
14
- /* ── 设置页卡片 ─────────────────────────────────────────────────── */
15
- .dsh-settings-card {
16
- display: flex;
17
- flex-direction: column;
18
- gap: 16px;
19
- padding: 16px;
20
- box-sizing: border-box;
21
- border-radius: var(--dsw-radius-xl, 20px);
22
- background-color: var(--dsw-alias-settings-card-fill, var(--dsw-alias-bg-layer-2));
23
- border: 0.5px solid var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l4));
24
- }
25
-
26
- .dsh-settings-card__title {
27
- margin: 0;
28
- font-size: 15px;
29
- line-height: 22px;
30
- font-weight: 500;
31
- color: var(--dsw-alias-label-primary);
32
- }
33
-
34
- .dsh-settings-card__desc {
35
- font-size: 13px;
36
- line-height: 20px;
37
- color: var(--dsw-alias-label-tertiary);
38
- }
39
-
40
- .dsh-settings-card__body {
41
- display: flex;
42
- flex-direction: column;
43
- gap: 16px;
44
- min-width: 0;
45
- }
46
-
47
- .dsh-settings-card__footer {
48
- display: flex;
49
- align-items: center;
50
- gap: 8px;
51
- }
52
-
53
- /* ── 设置行 ─────────────────────────────────────────────────────── */
54
- .dsh-settings-row {
55
- display: flex;
56
- align-items: center;
57
- justify-content: space-between;
58
- gap: 16px;
59
- min-width: 0;
60
- }
61
-
62
- .dsh-settings-row--stack {
63
- flex-direction: column;
64
- align-items: stretch;
65
- gap: 6px;
66
- }
67
-
68
- .dsh-settings-row__text {
69
- display: flex;
70
- flex-direction: column;
71
- gap: 2px;
72
- min-width: 0;
73
- }
74
-
75
- .dsh-settings-row__label {
76
- font-size: 13px;
77
- line-height: 20px;
78
- font-weight: 500;
79
- color: var(--dsw-alias-label-secondary);
80
- }
81
-
82
- .dsh-settings-row__desc {
83
- font-size: 12px;
84
- line-height: 18px;
85
- color: var(--dsw-alias-label-tertiary);
86
- }
87
-
88
- .dsh-settings-row__control {
89
- flex: none;
90
- min-width: 0;
91
- }
92
-
93
- .dsh-settings-row--stack .dsh-settings-row__control {
94
- flex: 1 1 auto;
95
- }
96
-
97
- /* ── 弹出层外壳 ─────────────────────────────────────────────────── */
98
- .dsh-panel-shell {
99
- position: fixed;
100
- inset: 0;
101
- z-index: 1000;
102
- display: flex;
103
- align-items: center;
104
- justify-content: center;
105
- padding: ${G.overlayMargin}px 24px;
106
- box-sizing: border-box;
107
- }
108
-
109
- .dsh-panel-shell__mask {
110
- position: absolute;
111
- inset: 0;
112
- background-color: var(--dsw-alias-bg-mask-1);
113
- }
114
-
115
- .dsh-panel-shell__card {
116
- position: relative;
117
- z-index: 1;
118
- display: flex;
119
- flex-direction: column;
120
- width: min(560px, 100%);
121
- max-height: calc(100dvh - ${G.overlayMargin * 2}px);
122
- border-radius: var(--dsw-radius-panel, 28px);
123
- border: 0;
124
- background-color: var(--dsw-alias-bg-layer-2);
125
- box-shadow: var(--dsw-elevation-prominent);
126
- overflow: hidden;
127
- }
128
-
129
- .dsh-panel-shell__header {
130
- display: flex;
131
- align-items: center;
132
- justify-content: space-between;
133
- gap: 12px;
134
- flex: none;
135
- padding: 20px 24px 14px;
136
- border-bottom: 0.5px solid var(--dsw-alias-border-l1);
137
- }
138
-
139
- .dsh-panel-shell__title {
140
- margin: 0;
141
- font-size: 16px;
142
- line-height: 24px;
143
- font-weight: 500;
144
- color: var(--dsw-alias-label-primary);
145
- }
146
-
147
- .dsh-panel-shell__body {
148
- flex: 1 1 auto;
149
- min-height: 0;
150
- padding: 16px 24px;
151
- overflow: hidden;
152
- }
153
-
154
- .dsh-panel-shell__footer {
155
- display: flex;
156
- align-items: center;
157
- justify-content: flex-end;
158
- gap: 8px;
159
- flex: none;
160
- padding: 14px 24px;
161
- border-top: 0.5px solid var(--dsw-alias-border-l1);
162
- }
163
-
164
- /* ── 宿主风格下拉 ───────────────────────────────────────────────── */
165
- .dsh-menu-select {
166
- position: relative;
167
- width: 100%;
168
- min-width: 0;
169
- }
170
-
171
- .dsh-menu-select__trigger {
172
- display: flex;
173
- align-items: center;
174
- justify-content: space-between;
175
- gap: 8px;
176
- width: 100%;
177
- box-sizing: border-box;
178
- min-height: 32px;
179
- padding: 5px 11px;
180
- font-family: inherit;
181
- font-size: 14px;
182
- line-height: 20px;
183
- text-align: left;
184
- color: var(--dsw-alias-label-primary);
185
- background-color: var(--dsw-alias-bg-layer-1);
186
- border: 0.5px solid var(--dsw-alias-border-l4);
187
- border-radius: var(--dsw-radius-md, 12px);
188
- cursor: pointer;
189
- }
190
-
191
- .dsh-menu-select__trigger:disabled {
192
- opacity: 0.45;
193
- cursor: not-allowed;
194
- }
195
-
196
- .dsh-menu-select__trigger:focus-visible {
197
- outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-alias-state-business-primary);
198
- outline-offset: 2px;
199
- }
200
-
201
- .dsh-menu-select__text {
202
- min-width: 0;
203
- overflow: hidden;
204
- text-overflow: ellipsis;
205
- white-space: nowrap;
206
- }
207
-
208
- .dsh-menu-select__text--placeholder {
209
- color: var(--dsw-alias-label-dimmed);
210
- }
211
-
212
- .dsh-menu-select__caret {
213
- display: inline-flex;
214
- flex: none;
215
- align-items: center;
216
- color: var(--dsw-alias-label-tertiary);
217
- }
218
-
219
- .dsh-menu-select__popup {
220
- position: absolute;
221
- left: 0;
222
- right: 0;
223
- z-index: 1050;
224
- margin-top: 4px;
225
- max-height: 264px;
226
- overflow: auto;
227
- padding: 4px;
228
- border-radius: var(--dsw-radius-lg, 16px);
229
- background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));
230
- backdrop-filter: var(--dsw-menu-backdrop-filter, none);
231
- box-shadow: var(--dsw-elevation-panel);
232
- }
233
-
234
- .dsh-menu-select__popup--above {
235
- margin-top: 0;
236
- margin-bottom: 4px;
237
- bottom: 100%;
238
- top: auto;
239
- }
240
-
241
- .dsh-menu-select__option {
242
- display: flex;
243
- align-items: center;
244
- gap: 8px;
245
- width: 100%;
246
- box-sizing: border-box;
247
- min-height: 32px;
248
- padding: 5px 10px;
249
- border: 0;
250
- border-radius: var(--dsw-radius-sm, 8px);
251
- background: none;
252
- font-family: inherit;
253
- font-size: 14px;
254
- line-height: 22px;
255
- text-align: left;
256
- color: var(--dsw-alias-label-primary);
257
- cursor: pointer;
258
- }
259
-
260
- @media (hover: hover) {
261
- .dsh-menu-select__option:hover:not(:disabled) {
262
- background-color: var(--dsw-alias-interactive-bg-hover);
263
- }
264
- }
265
-
266
- .dsh-menu-select__option--selected {
267
- background-color: var(--dsw-alias-button-ghost-active-fill);
268
- font-weight: 500;
269
- }
270
-
271
- .dsh-menu-select__option:disabled {
272
- color: var(--dsw-alias-label-caption);
273
- cursor: not-allowed;
274
- }
275
-
276
- .dsh-menu-select__check {
277
- margin-left: auto;
278
- display: inline-flex;
279
- color: var(--dsw-alias-label-secondary);
280
- }
281
-
282
- /* ── JSON 树 ────────────────────────────────────────────────────── */
283
- .dsh-json-tree {
284
- font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
285
- font-size: 12px;
286
- line-height: 20px;
287
- color: var(--dsw-alias-json-tree-punctuation, var(--dsw-alias-label-primary));
288
- }
289
-
290
- .dsh-json-tree__row {
291
- display: flex;
292
- align-items: baseline;
293
- gap: 4px;
294
- min-width: 0;
295
- padding: 0 4px;
296
- border-radius: var(--dsw-radius-xs, 4px);
297
- }
298
-
299
- .dsh-json-tree__toggle {
300
- display: inline-flex;
301
- align-items: center;
302
- justify-content: center;
303
- width: 14px;
304
- height: 14px;
305
- flex: none;
306
- padding: 0;
307
- border: 0;
308
- background: none;
309
- color: var(--dsw-alias-json-tree-icon, var(--dsw-alias-label-tertiary));
310
- cursor: pointer;
311
- }
312
-
313
- .dsh-json-tree__key {
314
- color: var(--dsw-alias-json-tree-property, var(--dsw-alias-label-secondary));
315
- white-space: pre;
316
- }
317
-
318
- .dsh-json-tree__string {
319
- color: var(--dsw-alias-json-tree-string, var(--dsw-alias-label-primary));
320
- word-break: break-all;
321
- }
322
-
323
- .dsh-json-tree__number {
324
- color: var(--dsw-alias-json-tree-number, var(--dsw-alias-label-primary));
325
- }
326
-
327
- .dsh-json-tree__keyword {
328
- color: var(--dsw-alias-json-tree-keyword, var(--dsw-alias-label-primary));
329
- }
330
-
331
- .dsh-json-tree__punct {
332
- color: var(--dsw-alias-json-tree-punctuation, var(--dsw-alias-label-tertiary));
333
- }
334
-
335
- .dsh-json-tree__children {
336
- margin-left: 8px;
337
- border-left: 0.5px solid var(--dsw-alias-border-l1);
338
- padding-left: 8px;
339
- }
340
-
341
- .dsh-json-tree__summary {
342
- color: var(--dsw-alias-json-tree-icon, var(--dsw-alias-label-tertiary));
343
- }
344
-
345
- /* ── 代码块外壳 ─────────────────────────────────────────────────── */
346
- .dsh-code-shell {
347
- display: flex;
348
- flex-direction: column;
349
- border-radius: var(--dsw-radius-lg, 16px);
350
- background-color: var(--dsw-alias-markdown-code-block);
351
- overflow: hidden;
352
- }
353
-
354
- .dsh-code-shell__banner {
355
- display: flex;
356
- align-items: center;
357
- justify-content: space-between;
358
- gap: 8px;
359
- flex: none;
360
- padding: 6px 12px;
361
- background-color: var(--dsw-alias-markdown-code-block-banner);
362
- font-size: 12px;
363
- line-height: 18px;
364
- color: var(--dsw-alias-label-tertiary);
365
- }
366
-
367
- .dsh-code-shell__lang {
368
- font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
369
- }
370
-
371
- .dsh-code-shell__actions {
372
- display: flex;
373
- align-items: center;
374
- gap: 4px;
375
- }
376
-
377
- .dsh-code-shell__body {
378
- min-height: 0;
379
- padding: 10px 12px;
380
- font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
381
- font-size: 12px;
382
- line-height: 20px;
383
- color: var(--dsw-alias-label-primary);
384
- overflow: auto;
385
- }
386
-
387
- .dsh-code-shell__body pre {
388
- margin: 0;
389
- white-space: pre;
390
- }
391
-
392
- /* ── 文件类型徽标 ───────────────────────────────────────────────── */
393
- .dsh-file-badge {
394
- display: inline-flex;
395
- align-items: center;
396
- justify-content: center;
397
- flex: none;
398
- min-width: 24px;
399
- height: 16px;
400
- padding: 0 5px;
401
- border-radius: var(--dsw-radius-xs, 4px);
402
- font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
403
- font-size: 10px;
404
- line-height: 16px;
405
- font-weight: 500;
406
- text-transform: uppercase;
407
- background-color: var(--dsw-alias-bg-module-platform);
408
- color: var(--dsw-alias-label-tertiary);
409
- }
410
-
411
- /* ── 状态行 ─────────────────────────────────────────────────────── */
412
- .dsh-status-line {
413
- display: inline-flex;
414
- align-items: center;
415
- gap: 6px;
416
- min-width: 0;
417
- font-size: 13px;
418
- line-height: 20px;
419
- color: var(--dsw-alias-label-tertiary);
420
- }
421
-
422
- .dsh-status-line__text {
423
- min-width: 0;
424
- overflow: hidden;
425
- text-overflow: ellipsis;
426
- white-space: nowrap;
427
- }
428
-
429
- .dsh-status-line__time {
430
- flex: none;
431
- font-variant-numeric: tabular-nums;
432
- color: var(--dsw-alias-label-caption);
433
- }
434
-
435
- @media (prefers-reduced-motion: reduce) {
436
- .dsh-menu-select__popup {
437
- animation: none;
438
- }
439
- }
13
+ export const COMPOSITES_CSS = `
14
+ /* ── 设置页卡片 ─────────────────────────────────────────────────── */
15
+ .dsh-settings-card {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 16px;
19
+ padding: 16px;
20
+ box-sizing: border-box;
21
+ border-radius: var(--dsw-radius-xl, 20px);
22
+ background-color: var(--dsw-alias-settings-card-fill, var(--dsw-alias-bg-layer-2));
23
+ border: 0.5px solid var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l4));
24
+ }
25
+
26
+ .dsh-settings-card__title {
27
+ margin: 0;
28
+ font-size: 15px;
29
+ line-height: 22px;
30
+ font-weight: 500;
31
+ color: var(--dsw-alias-label-primary);
32
+ }
33
+
34
+ .dsh-settings-card__desc {
35
+ font-size: 13px;
36
+ line-height: 20px;
37
+ color: var(--dsw-alias-label-tertiary);
38
+ }
39
+
40
+ .dsh-settings-card__body {
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 16px;
44
+ min-width: 0;
45
+ }
46
+
47
+ .dsh-settings-card__footer {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 8px;
51
+ }
52
+
53
+ /* ── 设置行 ─────────────────────────────────────────────────────── */
54
+ .dsh-settings-row {
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: space-between;
58
+ gap: 16px;
59
+ min-width: 0;
60
+ }
61
+
62
+ .dsh-settings-row--stack {
63
+ flex-direction: column;
64
+ align-items: stretch;
65
+ gap: 6px;
66
+ }
67
+
68
+ .dsh-settings-row__text {
69
+ display: flex;
70
+ flex-direction: column;
71
+ gap: 2px;
72
+ min-width: 0;
73
+ }
74
+
75
+ .dsh-settings-row__label {
76
+ font-size: 13px;
77
+ line-height: 20px;
78
+ font-weight: 500;
79
+ color: var(--dsw-alias-label-secondary);
80
+ }
81
+
82
+ .dsh-settings-row__desc {
83
+ font-size: 12px;
84
+ line-height: 18px;
85
+ color: var(--dsw-alias-label-tertiary);
86
+ }
87
+
88
+ .dsh-settings-row__control {
89
+ flex: none;
90
+ min-width: 0;
91
+ }
92
+
93
+ .dsh-settings-row--stack .dsh-settings-row__control {
94
+ flex: 1 1 auto;
95
+ }
96
+
97
+ /* ── 弹出层外壳 ─────────────────────────────────────────────────── */
98
+ .dsh-panel-shell {
99
+ position: fixed;
100
+ inset: 0;
101
+ z-index: 1000;
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ padding: ${G.overlayMargin}px 24px;
106
+ box-sizing: border-box;
107
+ }
108
+
109
+ .dsh-panel-shell__mask {
110
+ position: absolute;
111
+ inset: 0;
112
+ background-color: var(--dsw-alias-bg-mask-1);
113
+ }
114
+
115
+ .dsh-panel-shell__card {
116
+ position: relative;
117
+ z-index: 1;
118
+ display: flex;
119
+ flex-direction: column;
120
+ width: min(560px, 100%);
121
+ max-height: calc(100dvh - ${G.overlayMargin * 2}px);
122
+ border-radius: var(--dsw-radius-panel, 28px);
123
+ border: 0;
124
+ background-color: var(--dsw-alias-bg-layer-2);
125
+ box-shadow: var(--dsw-elevation-prominent);
126
+ overflow: hidden;
127
+ }
128
+
129
+ .dsh-panel-shell__header {
130
+ display: flex;
131
+ align-items: center;
132
+ justify-content: space-between;
133
+ gap: 12px;
134
+ flex: none;
135
+ padding: 20px 24px 14px;
136
+ border-bottom: 0.5px solid var(--dsw-alias-border-l1);
137
+ }
138
+
139
+ .dsh-panel-shell__title {
140
+ margin: 0;
141
+ font-size: 16px;
142
+ line-height: 24px;
143
+ font-weight: 500;
144
+ color: var(--dsw-alias-label-primary);
145
+ }
146
+
147
+ .dsh-panel-shell__body {
148
+ flex: 1 1 auto;
149
+ min-height: 0;
150
+ padding: 16px 24px;
151
+ overflow: hidden;
152
+ }
153
+
154
+ .dsh-panel-shell__footer {
155
+ display: flex;
156
+ align-items: center;
157
+ justify-content: flex-end;
158
+ gap: 8px;
159
+ flex: none;
160
+ padding: 14px 24px;
161
+ border-top: 0.5px solid var(--dsw-alias-border-l1);
162
+ }
163
+
164
+ /* ── 宿主风格下拉 ───────────────────────────────────────────────── */
165
+ .dsh-menu-select {
166
+ position: relative;
167
+ width: 100%;
168
+ min-width: 0;
169
+ }
170
+
171
+ .dsh-menu-select__trigger {
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: space-between;
175
+ gap: 8px;
176
+ width: 100%;
177
+ box-sizing: border-box;
178
+ min-height: 32px;
179
+ padding: 5px 11px;
180
+ font-family: inherit;
181
+ font-size: 14px;
182
+ line-height: 20px;
183
+ text-align: left;
184
+ color: var(--dsw-alias-label-primary);
185
+ background-color: var(--dsw-alias-bg-layer-1);
186
+ border: 0.5px solid var(--dsw-alias-border-l4);
187
+ border-radius: var(--dsw-radius-md, 12px);
188
+ cursor: pointer;
189
+ }
190
+
191
+ .dsh-menu-select__trigger:disabled {
192
+ opacity: 0.45;
193
+ cursor: not-allowed;
194
+ }
195
+
196
+ .dsh-menu-select__trigger:focus-visible {
197
+ outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-alias-state-business-primary);
198
+ outline-offset: 2px;
199
+ }
200
+
201
+ .dsh-menu-select__text {
202
+ min-width: 0;
203
+ overflow: hidden;
204
+ text-overflow: ellipsis;
205
+ white-space: nowrap;
206
+ }
207
+
208
+ .dsh-menu-select__text--placeholder {
209
+ color: var(--dsw-alias-label-dimmed);
210
+ }
211
+
212
+ .dsh-menu-select__caret {
213
+ display: inline-flex;
214
+ flex: none;
215
+ align-items: center;
216
+ color: var(--dsw-alias-label-tertiary);
217
+ }
218
+
219
+ .dsh-menu-select__popup {
220
+ position: absolute;
221
+ left: 0;
222
+ right: 0;
223
+ z-index: 1050;
224
+ margin-top: 4px;
225
+ max-height: 264px;
226
+ overflow: auto;
227
+ padding: 4px;
228
+ border-radius: var(--dsw-radius-lg, 16px);
229
+ background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));
230
+ backdrop-filter: var(--dsw-menu-backdrop-filter, none);
231
+ box-shadow: var(--dsw-elevation-panel);
232
+ }
233
+
234
+ .dsh-menu-select__popup--above {
235
+ margin-top: 0;
236
+ margin-bottom: 4px;
237
+ bottom: 100%;
238
+ top: auto;
239
+ }
240
+
241
+ .dsh-menu-select__option {
242
+ display: flex;
243
+ align-items: center;
244
+ gap: 8px;
245
+ width: 100%;
246
+ box-sizing: border-box;
247
+ min-height: 32px;
248
+ padding: 5px 10px;
249
+ border: 0;
250
+ border-radius: var(--dsw-radius-sm, 8px);
251
+ background: none;
252
+ font-family: inherit;
253
+ font-size: 14px;
254
+ line-height: 22px;
255
+ text-align: left;
256
+ color: var(--dsw-alias-label-primary);
257
+ cursor: pointer;
258
+ }
259
+
260
+ @media (hover: hover) {
261
+ .dsh-menu-select__option:hover:not(:disabled) {
262
+ background-color: var(--dsw-alias-interactive-bg-hover);
263
+ }
264
+ }
265
+
266
+ .dsh-menu-select__option--selected {
267
+ background-color: var(--dsw-alias-button-ghost-active-fill);
268
+ font-weight: 500;
269
+ }
270
+
271
+ .dsh-menu-select__option:disabled {
272
+ color: var(--dsw-alias-label-caption);
273
+ cursor: not-allowed;
274
+ }
275
+
276
+ .dsh-menu-select__check {
277
+ margin-left: auto;
278
+ display: inline-flex;
279
+ color: var(--dsw-alias-label-secondary);
280
+ }
281
+
282
+ /* ── JSON 树 ────────────────────────────────────────────────────── */
283
+ .dsh-json-tree {
284
+ font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
285
+ font-size: 12px;
286
+ line-height: 20px;
287
+ color: var(--dsw-alias-json-tree-punctuation, var(--dsw-alias-label-primary));
288
+ }
289
+
290
+ .dsh-json-tree__row {
291
+ display: flex;
292
+ align-items: baseline;
293
+ gap: 4px;
294
+ min-width: 0;
295
+ padding: 0 4px;
296
+ border-radius: var(--dsw-radius-xs, 4px);
297
+ }
298
+
299
+ .dsh-json-tree__toggle {
300
+ display: inline-flex;
301
+ align-items: center;
302
+ justify-content: center;
303
+ width: 14px;
304
+ height: 14px;
305
+ flex: none;
306
+ padding: 0;
307
+ border: 0;
308
+ background: none;
309
+ color: var(--dsw-alias-json-tree-icon, var(--dsw-alias-label-tertiary));
310
+ cursor: pointer;
311
+ }
312
+
313
+ .dsh-json-tree__key {
314
+ color: var(--dsw-alias-json-tree-property, var(--dsw-alias-label-secondary));
315
+ white-space: pre;
316
+ }
317
+
318
+ .dsh-json-tree__string {
319
+ color: var(--dsw-alias-json-tree-string, var(--dsw-alias-label-primary));
320
+ word-break: break-all;
321
+ }
322
+
323
+ .dsh-json-tree__number {
324
+ color: var(--dsw-alias-json-tree-number, var(--dsw-alias-label-primary));
325
+ }
326
+
327
+ .dsh-json-tree__keyword {
328
+ color: var(--dsw-alias-json-tree-keyword, var(--dsw-alias-label-primary));
329
+ }
330
+
331
+ .dsh-json-tree__punct {
332
+ color: var(--dsw-alias-json-tree-punctuation, var(--dsw-alias-label-tertiary));
333
+ }
334
+
335
+ .dsh-json-tree__children {
336
+ margin-left: 8px;
337
+ border-left: 0.5px solid var(--dsw-alias-border-l1);
338
+ padding-left: 8px;
339
+ }
340
+
341
+ .dsh-json-tree__summary {
342
+ color: var(--dsw-alias-json-tree-icon, var(--dsw-alias-label-tertiary));
343
+ }
344
+
345
+ /* ── 代码块外壳 ─────────────────────────────────────────────────── */
346
+ .dsh-code-shell {
347
+ display: flex;
348
+ flex-direction: column;
349
+ border-radius: var(--dsw-radius-lg, 16px);
350
+ background-color: var(--dsw-alias-markdown-code-block);
351
+ overflow: hidden;
352
+ }
353
+
354
+ .dsh-code-shell__banner {
355
+ display: flex;
356
+ align-items: center;
357
+ justify-content: space-between;
358
+ gap: 8px;
359
+ flex: none;
360
+ padding: 6px 12px;
361
+ background-color: var(--dsw-alias-markdown-code-block-banner);
362
+ font-size: 12px;
363
+ line-height: 18px;
364
+ color: var(--dsw-alias-label-tertiary);
365
+ }
366
+
367
+ .dsh-code-shell__lang {
368
+ font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
369
+ }
370
+
371
+ .dsh-code-shell__actions {
372
+ display: flex;
373
+ align-items: center;
374
+ gap: 4px;
375
+ }
376
+
377
+ .dsh-code-shell__body {
378
+ min-height: 0;
379
+ padding: 10px 12px;
380
+ font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
381
+ font-size: 12px;
382
+ line-height: 20px;
383
+ color: var(--dsw-alias-label-primary);
384
+ overflow: auto;
385
+ }
386
+
387
+ .dsh-code-shell__body pre {
388
+ margin: 0;
389
+ white-space: pre;
390
+ }
391
+
392
+ /* ── 文件类型徽标 ───────────────────────────────────────────────── */
393
+ .dsh-file-badge {
394
+ display: inline-flex;
395
+ align-items: center;
396
+ justify-content: center;
397
+ flex: none;
398
+ min-width: 24px;
399
+ height: 16px;
400
+ padding: 0 5px;
401
+ border-radius: var(--dsw-radius-xs, 4px);
402
+ font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
403
+ font-size: 10px;
404
+ line-height: 16px;
405
+ font-weight: 500;
406
+ text-transform: uppercase;
407
+ background-color: var(--dsw-alias-bg-module-platform);
408
+ color: var(--dsw-alias-label-tertiary);
409
+ }
410
+
411
+ /* ── 状态行 ─────────────────────────────────────────────────────── */
412
+ .dsh-status-line {
413
+ display: inline-flex;
414
+ align-items: center;
415
+ gap: 6px;
416
+ min-width: 0;
417
+ font-size: 13px;
418
+ line-height: 20px;
419
+ color: var(--dsw-alias-label-tertiary);
420
+ }
421
+
422
+ .dsh-status-line__text {
423
+ min-width: 0;
424
+ overflow: hidden;
425
+ text-overflow: ellipsis;
426
+ white-space: nowrap;
427
+ }
428
+
429
+ .dsh-status-line__time {
430
+ flex: none;
431
+ font-variant-numeric: tabular-nums;
432
+ color: var(--dsw-alias-label-caption);
433
+ }
434
+
435
+ @media (prefers-reduced-motion: reduce) {
436
+ .dsh-menu-select__popup {
437
+ animation: none;
438
+ }
439
+ }
440
440
  `;
441
441
  /**
442
442
  * 注入 DSH 专属组合件样式。幂等。