@icen.ai/ui 0.3.0 → 0.5.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 (78) hide show
  1. package/dist/behaviors/back-top.mjs +84 -0
  2. package/dist/behaviors/charts.mjs +188 -0
  3. package/dist/behaviors/command-palette.mjs +177 -0
  4. package/dist/behaviors/datatable.mjs +244 -24
  5. package/dist/behaviors/date-picker.mjs +228 -0
  6. package/dist/behaviors/input.mjs +170 -1
  7. package/dist/behaviors/notification.mjs +754 -0
  8. package/dist/behaviors/select.mjs +151 -22
  9. package/dist/behaviors/split-pane.mjs +102 -0
  10. package/dist/behaviors/upload.mjs +165 -14
  11. package/dist/components/back-top.css +88 -0
  12. package/dist/components/back-top.mjs +3 -0
  13. package/dist/components/badge.css +131 -0
  14. package/dist/components/badge.mjs +2 -0
  15. package/dist/components/breadcrumb.css +57 -0
  16. package/dist/components/card.css +68 -0
  17. package/dist/components/chart-area.css +15 -0
  18. package/dist/components/chart-area.mjs +4 -0
  19. package/dist/components/chart-bar.css +79 -0
  20. package/dist/components/chart-bar.mjs +4 -0
  21. package/dist/components/chart-gauge.css +38 -0
  22. package/dist/components/chart-gauge.mjs +4 -0
  23. package/dist/components/chart-heatmap.css +52 -0
  24. package/dist/components/chart-heatmap.mjs +4 -0
  25. package/dist/components/chart-line.css +15 -0
  26. package/dist/components/chart-line.mjs +4 -0
  27. package/dist/components/chart-pie.css +26 -0
  28. package/dist/components/chart-pie.mjs +4 -0
  29. package/dist/components/chart-radar.css +19 -0
  30. package/dist/components/chart-radar.mjs +4 -0
  31. package/dist/components/chart-sparkline.css +14 -0
  32. package/dist/components/chart-sparkline.mjs +4 -0
  33. package/dist/components/chart-stack.css +30 -0
  34. package/dist/components/chart-stack.mjs +4 -0
  35. package/dist/components/charts.css +7 -207
  36. package/dist/components/charts.mjs +9 -0
  37. package/dist/components/command-palette.css +246 -0
  38. package/dist/components/command-palette.mjs +3 -0
  39. package/dist/components/content.css +214 -0
  40. package/dist/components/copy.css +93 -0
  41. package/dist/components/copy.mjs +3 -0
  42. package/dist/components/datatable.css +86 -0
  43. package/dist/components/date-picker.css +244 -0
  44. package/dist/components/date-picker.mjs +3 -0
  45. package/dist/components/empty.css +73 -3
  46. package/dist/components/feedback.css +239 -1
  47. package/dist/components/form.css +119 -0
  48. package/dist/components/form.mjs +2 -0
  49. package/dist/components/input.css +24 -1
  50. package/dist/components/media.css +144 -1
  51. package/dist/components/nav.css +99 -0
  52. package/dist/components/notification.css +387 -0
  53. package/dist/components/notification.mjs +3 -0
  54. package/dist/components/panel.css +100 -5
  55. package/dist/components/pill.css +70 -0
  56. package/dist/components/scroll-area.css +112 -0
  57. package/dist/components/scroll-area.mjs +2 -0
  58. package/dist/components/segmented.css +75 -0
  59. package/dist/components/select.css +97 -2
  60. package/dist/components/sidebar.css +118 -0
  61. package/dist/components/slider.css +113 -0
  62. package/dist/components/split-pane.css +112 -0
  63. package/dist/components/split-pane.mjs +3 -0
  64. package/dist/components/stat.css +129 -6
  65. package/dist/components/steps.css +97 -0
  66. package/dist/components/switch.css +142 -0
  67. package/dist/components/table.css +86 -3
  68. package/dist/components/tabs.css +122 -1
  69. package/dist/components/tag.css +164 -0
  70. package/dist/components/tag.mjs +2 -0
  71. package/dist/components/toast.css +114 -0
  72. package/dist/components/toolbar.css +101 -0
  73. package/dist/components/toolbar.mjs +2 -0
  74. package/dist/components/upload.css +61 -4
  75. package/dist/index.mjs +2039 -62
  76. package/dist/registry.json +200 -24
  77. package/dist/ui.css +4865 -622
  78. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  /*
2
- * @icen.ai/ui — Component: charts(轻量图表,与 behaviors/charts 配套)
2
+ * @icen.ai/ui — Component: charts base(图表共享基座,与 behaviors/charts 配套)
3
3
  *
4
- * 包含:.chart 容器 / .chart-empty / .chart-legend(图例行)/ .chart-labels(轴标签行)/
5
- * vbar(垂直柱状)/ hbar(水平条形)/ stack(堆叠条)/ donut(环形)/ line(折线)/
6
- * heatmap(贡献图热力格)/ sparkline(迷你趋势)/ gauge(进度环)
4
+ * 仅含所有图表类型共用的契约:.chart 容器、.chart-empty 空态、.chart-legend 图例、
5
+ * .chart-labels 轴标签行、.chart-tone-* 调色盘。
6
+ * 各图表类型的专属样式在独立 CSS 文件中(chart-line / chart-bar / chart-pie /
7
+ * chart-stack / chart-heatmap / chart-sparkline / chart-gauge / chart-radar / chart-area),
8
+ * 按需引入——kit/chart-<type> 入口会自动带上本基座 + 对应专属 CSS。
7
9
  *
8
- * 完整契约:DOM 全部由 behaviors/charts.ts 以 createElement(NS) + textContent 构建;
9
10
  * 单色调通过容器或条上的 --chart-tone 自定义属性注入(默认 var(--token-accent))。
10
- * 规格源自 opengal src/presentation/ui/data/charts.tsx。
11
11
  */
12
12
 
13
13
  .chart {
@@ -78,210 +78,10 @@
78
78
  font-variant-numeric: tabular-nums;
79
79
  }
80
80
 
81
- /* ── vbar · 垂直柱状 ── */
82
- .chart-vbar {
83
- display: flex;
84
- align-items: flex-end;
85
- gap: var(--density-space-xs);
86
- height: 112px;
87
- }
88
- .chart-vbar-track {
89
- flex: 1;
90
- height: 100%;
91
- min-width: 0;
92
- display: flex;
93
- align-items: flex-end;
94
- background: color-mix(in srgb, var(--token-fill-2) 45%, transparent);
95
- border-radius: var(--radius-sm);
96
- overflow: hidden;
97
- }
98
- .chart-vbar-bar {
99
- width: 100%;
100
- border-radius: var(--radius-sm);
101
- background: var(--chart-tone, var(--token-accent));
102
- transition: height var(--icen-tx-slow);
103
- }
104
- .chart-vbar-bar:hover {
105
- filter: brightness(1.08);
106
- }
107
-
108
- /* ── hbar · 水平条形 ── */
109
- .chart-hbar {
110
- display: flex;
111
- flex-direction: column;
112
- gap: var(--density-space-xs);
113
- }
114
- .chart-hbar-row {
115
- display: grid;
116
- grid-template-columns: minmax(72px, 1fr) minmax(90px, 2fr) 52px;
117
- gap: var(--density-space-xs);
118
- align-items: center;
119
- font-size: var(--density-font-size-xs);
120
- }
121
- .chart-hbar-label {
122
- overflow: hidden;
123
- text-overflow: ellipsis;
124
- white-space: nowrap;
125
- color: var(--token-text-muted);
126
- }
127
- .chart-hbar-track {
128
- height: 10px;
129
- overflow: hidden;
130
- border-radius: var(--radius-full);
131
- background: var(--token-fill-2);
132
- }
133
- .chart-hbar-bar {
134
- height: 100%;
135
- border-radius: var(--radius-full);
136
- background: var(--chart-tone, var(--token-accent));
137
- transition: width var(--icen-tx-slow);
138
- }
139
- .chart-hbar-bar:hover {
140
- filter: brightness(1.08);
141
- }
142
- .chart-hbar-value {
143
- text-align: right;
144
- font-variant-numeric: tabular-nums;
145
- color: var(--token-text-faint);
146
- }
147
-
148
- /* ── stack · 堆叠条 ── */
149
- .chart-stack {
150
- height: 16px;
151
- display: flex;
152
- overflow: hidden;
153
- border-radius: var(--radius-full);
154
- background: var(--token-fill-2);
155
- margin-bottom: var(--density-space-sm);
156
- }
157
- .chart-stack-seg {
158
- height: 100%;
159
- min-width: 3px;
160
- background: var(--chart-tone, var(--token-accent));
161
- transition: width var(--icen-tx-slow);
162
- }
163
- .chart-stack-seg:hover {
164
- filter: brightness(1.08);
165
- }
166
-
167
- /* ── donut · 环形 ── */
168
- .chart-donut {
169
- display: flex;
170
- align-items: center;
171
- gap: var(--density-space-md);
172
- min-height: 150px;
173
- }
174
- .chart-donut > svg {
175
- width: 132px;
176
- height: 132px;
177
- flex-shrink: 0;
178
- }
179
- .chart-donut-center {
180
- font-variant-numeric: tabular-nums;
181
- text-anchor: middle;
182
- fill: var(--token-text);
183
- font-weight: 600;
184
- }
185
-
186
- /* ── line · 折线 ── */
187
- .chart-line > svg {
188
- display: block;
189
- width: 100%;
190
- height: 150px;
191
- overflow: visible;
192
- }
193
-
194
- /* ── heatmap · 贡献图(GitHub 式 7 行 × N 周) ── */
195
- .chart-heatmap {
196
- display: flex;
197
- flex-direction: column;
198
- gap: var(--density-space-xs);
199
- }
200
- .chart-heatmap-grid {
201
- display: grid;
202
- grid-template-rows: repeat(7, 1fr);
203
- grid-auto-flow: column;
204
- grid-auto-columns: 1fr;
205
- gap: 3px;
206
- width: 100%;
207
- }
208
- .chart-heatmap-cell {
209
- aspect-ratio: 1;
210
- border-radius: 2px;
211
- background: var(--token-fill-2);
212
- }
213
- .chart-heatmap-cell.is-blank { background: transparent; }
214
- .chart-heatmap-cell[data-level='1'] { background: color-mix(in srgb, var(--chart-tone, var(--token-accent)) 28%, var(--token-fill-2)); }
215
- .chart-heatmap-cell[data-level='2'] { background: color-mix(in srgb, var(--chart-tone, var(--token-accent)) 50%, var(--token-fill-2)); }
216
- .chart-heatmap-cell[data-level='3'] { background: color-mix(in srgb, var(--chart-tone, var(--token-accent)) 74%, var(--token-fill-2)); }
217
- .chart-heatmap-cell[data-level='4'] { background: var(--chart-tone, var(--token-accent)); }
218
- .chart-heatmap-cell:not(.is-blank):hover {
219
- outline: 1px solid var(--chart-tone, var(--token-accent));
220
- outline-offset: 0;
221
- }
222
- .chart-heatmap-legend {
223
- display: flex;
224
- align-items: center;
225
- justify-content: flex-end;
226
- gap: 3px;
227
- font-size: var(--density-font-size-xs);
228
- color: var(--token-text-faint);
229
- }
230
- .chart-heatmap-legend .chart-heatmap-cell {
231
- width: 10px;
232
- height: 10px;
233
- aspect-ratio: auto;
234
- }
235
- .chart-heatmap-legend > span:first-child { margin-right: 2px; }
236
- .chart-heatmap-legend > span:last-child { margin-left: 2px; }
237
-
238
- /* ── sparkline · 迷你趋势 ── */
239
- .chart-sparkline > svg {
240
- display: block;
241
- width: 96px;
242
- height: 28px;
243
- overflow: visible;
244
- }
245
-
246
- /* ── gauge · 进度环 ── */
247
- .chart-gauge {
248
- position: relative;
249
- width: 132px;
250
- flex-shrink: 0;
251
- }
252
- .chart-gauge > svg {
253
- display: block;
254
- width: 132px;
255
- height: 132px;
256
- }
257
- .chart-gauge-center {
258
- position: absolute;
259
- inset: 0;
260
- display: flex;
261
- flex-direction: column;
262
- align-items: center;
263
- justify-content: center;
264
- gap: 1px;
265
- }
266
- .chart-gauge-value {
267
- font-size: 20px;
268
- font-weight: 700;
269
- font-variant-numeric: tabular-nums;
270
- color: var(--token-text);
271
- }
272
- .chart-gauge-label {
273
- font-size: var(--density-font-size-xs);
274
- color: var(--token-text-faint);
275
- }
276
-
277
- /* ── 调色盘:多系列图(donut/stack/line)由 behavior 选用 ── */
81
+ /* ── 调色盘:多系列图(donut/stack/line/radar)由 behavior 选用 ── */
278
82
  .chart-tone-1 { --chart-tone: var(--token-accent); }
279
83
  .chart-tone-2 { --chart-tone: var(--token-accent-cold); }
280
84
  .chart-tone-3 { --chart-tone: var(--token-success); }
281
85
  .chart-tone-4 { --chart-tone: var(--token-warning); }
282
86
  .chart-tone-5 { --chart-tone: var(--token-info); }
283
87
  .chart-tone-6 { --chart-tone: color-mix(in srgb, var(--token-text) 50%, transparent); }
284
-
285
- @media (prefers-reduced-motion: reduce) {
286
- .chart-vbar-bar, .chart-hbar-bar, .chart-stack-seg { transition: none; }
287
- }
@@ -1,3 +1,12 @@
1
1
  // @icen.ai/ui — kit: charts(CSS + behavior 一行入口;构建产物,勿手改)
2
2
  import './charts.css';
3
+ import './chart-line.css';
4
+ import './chart-bar.css';
5
+ import './chart-pie.css';
6
+ import './chart-radar.css';
7
+ import './chart-heatmap.css';
8
+ import './chart-area.css';
9
+ import './chart-stack.css';
10
+ import './chart-gauge.css';
11
+ import './chart-sparkline.css';
3
12
  export * from '../behaviors/charts.mjs';
@@ -0,0 +1,246 @@
1
+ /*
2
+ * @icen.ai/ui — Component: command-palette(命令面板 ⌘K,与 behaviors/command-palette 配套)
3
+ *
4
+ * 契约:
5
+ * <div class="command-palette-backdrop" data-command-palette="id" hidden>
6
+ * <div class="command-palette">
7
+ * <div class="command-palette-search">
8
+ * <span class="command-palette-search-icon">…放大镜 svg…</span>
9
+ * <input class="command-palette-input" placeholder="搜索命令…" />
10
+ * <kbd class="command-palette-esc">ESC</kbd>
11
+ * </div>
12
+ * <div class="command-palette-body">
13
+ * <div class="command-palette-group">
14
+ * <p class="command-palette-group-label">分组名</p>
15
+ * <button class="command-palette-item [.is-active]" type="button">
16
+ * <span class="command-palette-item-icon">…svg…</span>
17
+ * <span class="command-palette-item-label">命令名</span>
18
+ * <span class="command-palette-item-hint">副标题</span>
19
+ * <kbd class="command-palette-item-kbd">⌘S</kbd>
20
+ * </button>
21
+ * </div>
22
+ * <div class="command-palette-empty" hidden>无匹配命令</div>
23
+ * </div>
24
+ * <div class="command-palette-foot">
25
+ * <span class="command-palette-foot-hint">
26
+ * <kbd>↑↓</kbd> 导航 <kbd>↵</kbd> 执行 <kbd>esc</kbd> 关闭
27
+ * </span>
28
+ * </div>
29
+ * </div>
30
+ * </div>
31
+ *
32
+ * behavior 接管:搜索过滤、↑↓ 导航、Enter 执行、ESC / 外点 / backdrop 关闭、
33
+ * 焦点陷阱、按 ⌘K / Ctrl+K 全局打开(可选 data-command-palette-key)。
34
+ */
35
+
36
+ .command-palette-backdrop {
37
+ position: fixed;
38
+ inset: 0;
39
+ z-index: var(--z-dialog);
40
+ display: flex;
41
+ align-items: flex-start;
42
+ justify-content: center;
43
+ padding-top: 12vh;
44
+ padding-left: var(--density-space-md);
45
+ padding-right: var(--density-space-md);
46
+ background: color-mix(in srgb, var(--token-text) 40%, transparent);
47
+ backdrop-filter: blur(4px);
48
+ -webkit-backdrop-filter: blur(4px);
49
+ animation: icen-cp-fade-in var(--icen-tx-normal);
50
+ }
51
+ .command-palette-backdrop[hidden] { display: none; }
52
+
53
+ .command-palette {
54
+ display: flex;
55
+ flex-direction: column;
56
+ width: 100%;
57
+ max-width: 560px;
58
+ max-height: 70vh;
59
+ overflow: hidden;
60
+ background: var(--token-card-strong);
61
+ border: 1px solid var(--token-outline);
62
+ border-radius: var(--radius-lg);
63
+ box-shadow: var(--token-shadow-overlay);
64
+ animation: icen-cp-scale-in var(--icen-tx-slow);
65
+ }
66
+ .command-palette:focus { outline: none; }
67
+
68
+ /* ── 搜索栏 ── */
69
+ .command-palette-search {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: var(--density-space-sm);
73
+ padding: var(--density-space-md);
74
+ border-bottom: 1px solid var(--token-line-soft);
75
+ }
76
+ .command-palette-search-icon {
77
+ display: inline-flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+ color: var(--token-text-faint);
81
+ flex-shrink: 0;
82
+ }
83
+ .command-palette-search-icon svg { width: 16px; height: 16px; }
84
+ .command-palette-input {
85
+ flex: 1;
86
+ min-width: 0;
87
+ border: 0;
88
+ outline: none;
89
+ background: transparent;
90
+ color: var(--token-text);
91
+ font: inherit;
92
+ font-size: var(--density-font-size-md);
93
+ }
94
+ .command-palette-input::placeholder {
95
+ color: color-mix(in srgb, var(--token-text-faint) 60%, transparent);
96
+ }
97
+ .command-palette-esc {
98
+ font-family: var(--font-mono);
99
+ font-size: var(--density-font-size-xs);
100
+ color: var(--token-text-faint);
101
+ padding: 2px 6px;
102
+ border: 1px solid var(--token-line-soft);
103
+ border-radius: var(--radius-xs);
104
+ flex-shrink: 0;
105
+ }
106
+
107
+ /* ── 列表区 ── */
108
+ .command-palette-body {
109
+ flex: 1;
110
+ min-height: 0;
111
+ overflow-y: auto;
112
+ overscroll-behavior: contain;
113
+ padding: var(--density-space-xs);
114
+ }
115
+
116
+ .command-palette-group {
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 1px;
120
+ margin-bottom: var(--density-space-sm);
121
+ }
122
+ .command-palette-group:last-child { margin-bottom: 0; }
123
+ .command-palette-group-label {
124
+ margin: var(--density-space-sm) var(--density-space-sm) var(--density-space-xs);
125
+ font-size: var(--density-font-size-xs);
126
+ font-weight: 600;
127
+ color: var(--token-text-faint);
128
+ letter-spacing: 0.06em;
129
+ text-transform: uppercase;
130
+ }
131
+ .command-palette-group:first-child .command-palette-group-label { margin-top: 0; }
132
+
133
+ .command-palette-item {
134
+ display: flex;
135
+ align-items: center;
136
+ gap: var(--density-space-sm);
137
+ width: 100%;
138
+ padding: 8px var(--density-space-sm);
139
+ border: 0;
140
+ border-radius: var(--radius-sm);
141
+ background: transparent;
142
+ color: var(--token-text);
143
+ font: inherit;
144
+ font-size: var(--density-font-size-md);
145
+ text-align: left;
146
+ cursor: pointer;
147
+ -webkit-tap-highlight-color: transparent;
148
+ transition: background-color var(--icen-tx-fast);
149
+ }
150
+ .command-palette-item:hover { background: var(--token-fill-1); }
151
+ .command-palette-item.is-active {
152
+ background: var(--token-accent-subtle);
153
+ color: var(--token-accent-deep, var(--token-accent));
154
+ }
155
+ .command-palette-item:focus-visible {
156
+ outline: none;
157
+ box-shadow: var(--icen-ring);
158
+ }
159
+
160
+ .command-palette-item-icon {
161
+ display: inline-flex;
162
+ align-items: center;
163
+ justify-content: center;
164
+ flex-shrink: 0;
165
+ width: 18px;
166
+ height: 18px;
167
+ color: var(--token-text-faint);
168
+ }
169
+ .command-palette-item.is-active .command-palette-item-icon { color: var(--token-accent); }
170
+ .command-palette-item-icon svg { width: 16px; height: 16px; }
171
+
172
+ .command-palette-item-label {
173
+ flex: 1;
174
+ min-width: 0;
175
+ overflow: hidden;
176
+ text-overflow: ellipsis;
177
+ white-space: nowrap;
178
+ }
179
+ .command-palette-item-hint {
180
+ font-size: var(--density-font-size-xs);
181
+ color: var(--token-text-faint);
182
+ margin-left: var(--density-space-xs);
183
+ overflow: hidden;
184
+ text-overflow: ellipsis;
185
+ white-space: nowrap;
186
+ }
187
+ .command-palette-item.is-active .command-palette-item-hint { color: color-mix(in srgb, var(--token-accent) 70%, var(--token-text-faint)); }
188
+
189
+ .command-palette-item-kbd {
190
+ font-family: var(--font-mono);
191
+ font-size: 10px;
192
+ color: var(--token-text-faint);
193
+ padding: 1px 5px;
194
+ border: 1px solid var(--token-line-soft);
195
+ border-radius: var(--radius-xs);
196
+ flex-shrink: 0;
197
+ }
198
+
199
+ /* ── 空态 ── */
200
+ .command-palette-empty {
201
+ padding: 32px var(--density-space-md);
202
+ text-align: center;
203
+ color: var(--token-text-faint);
204
+ font-size: var(--density-font-size-sm);
205
+ }
206
+
207
+ /* ── 底栏 ── */
208
+ .command-palette-foot {
209
+ padding: var(--density-space-xs) var(--density-space-md);
210
+ border-top: 1px solid var(--token-line-soft);
211
+ background: var(--token-bg-soft);
212
+ }
213
+ .command-palette-foot-hint {
214
+ display: inline-flex;
215
+ align-items: center;
216
+ gap: var(--density-space-sm);
217
+ font-size: var(--density-font-size-xs);
218
+ color: var(--token-text-faint);
219
+ }
220
+ .command-palette-foot-hint kbd {
221
+ font-family: var(--font-mono);
222
+ font-size: 10px;
223
+ padding: 1px 4px;
224
+ border: 1px solid var(--token-line-soft);
225
+ border-radius: var(--radius-xs);
226
+ background: var(--token-surface);
227
+ }
228
+
229
+ @keyframes icen-cp-fade-in {
230
+ from { opacity: 0; }
231
+ to { opacity: 1; }
232
+ }
233
+ @keyframes icen-cp-scale-in {
234
+ from { opacity: 0; transform: translateY(-8px) scale(0.98); }
235
+ to { opacity: 1; transform: translateY(0) scale(1); }
236
+ }
237
+
238
+ @media (max-width: 480px) {
239
+ .command-palette-backdrop { padding-top: 6vh; }
240
+ .command-palette { max-height: 80vh; }
241
+ }
242
+
243
+ @media (prefers-reduced-motion: reduce) {
244
+ .command-palette-backdrop { animation: none; }
245
+ .command-palette { animation: none; }
246
+ }
@@ -0,0 +1,3 @@
1
+ // @icen.ai/ui — kit: command-palette(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './command-palette.css';
3
+ export * from '../behaviors/command-palette.mjs';
@@ -375,3 +375,217 @@
375
375
  transition: none;
376
376
  }
377
377
  }
378
+
379
+ /* ── list 增强 ── */
380
+
381
+ /* 列表项带前置图标/头像 */
382
+ .list-item-leading {
383
+ display: inline-flex;
384
+ align-items: center;
385
+ justify-content: center;
386
+ flex-shrink: 0;
387
+ margin-right: var(--density-space-sm);
388
+ }
389
+ .list-item-leading svg { width: 16px; height: 16px; color: var(--token-text-faint); }
390
+ .list-item-content {
391
+ flex: 1;
392
+ min-width: 0;
393
+ display: flex;
394
+ flex-direction: column;
395
+ gap: 1px;
396
+ }
397
+ .list-item-title {
398
+ font-size: var(--density-font-size-md);
399
+ color: var(--token-text);
400
+ overflow: hidden;
401
+ text-overflow: ellipsis;
402
+ white-space: nowrap;
403
+ }
404
+ .list-item-meta {
405
+ font-size: var(--density-font-size-xs);
406
+ color: var(--token-text-faint);
407
+ }
408
+ .list-item-trailing {
409
+ flex-shrink: 0;
410
+ margin-left: var(--density-space-sm);
411
+ font-size: var(--density-font-size-xs);
412
+ color: var(--token-text-faint);
413
+ }
414
+ .list-item--selectable {
415
+ cursor: pointer;
416
+ }
417
+ .list-item.is-selected {
418
+ background: var(--token-accent-subtle);
419
+ }
420
+ .list-item.is-selected .list-item-title { color: var(--token-accent); font-weight: 500; }
421
+
422
+ /* 列表项 flex 布局(leading + content + trailing) */
423
+ .list-item--flex {
424
+ display: flex;
425
+ align-items: center;
426
+ }
427
+
428
+ /* 斑马列表 */
429
+ .list--striped .list-item:nth-child(odd) {
430
+ background: color-mix(in srgb, var(--token-bg-soft) 40%, transparent);
431
+ }
432
+
433
+ /* ── timeline 增强 ── */
434
+
435
+ /* 右侧时间线(dot 在右) */
436
+ .timeline--right .timeline-item { flex-direction: row-reverse; }
437
+ .timeline--right .timeline-item:not(:last-child)::after {
438
+ left: auto;
439
+ right: 13.5px;
440
+ }
441
+ .timeline--right .timeline-body { text-align: right; }
442
+ .timeline--right .timeline-time { margin-left: 0; margin-right: auto; }
443
+
444
+ /* 交替时间线(奇左偶右) */
445
+ .timeline--alternate .timeline-item:nth-child(even) { flex-direction: row-reverse; }
446
+ .timeline--alternate .timeline-item:nth-child(even):not(:last-child)::after {
447
+ left: auto; right: 13.5px;
448
+ }
449
+ .timeline--alternate .timeline-item:nth-child(even) .timeline-body { text-align: right; }
450
+ .timeline--alternate .timeline-item:nth-child(even) .timeline-time {
451
+ margin-left: 0; margin-right: auto;
452
+ }
453
+
454
+ /* 自定义 dot 尺寸 */
455
+ .timeline-dot--sm { width: 20px; height: 20px; }
456
+ .timeline-dot--sm svg { width: 10px; height: 10px; }
457
+ .timeline-dot--sm ~ .timeline-item:not(:last-child)::after,
458
+ .timeline--sm .timeline-item:not(:last-child)::after { left: 10px; top: 24px; }
459
+
460
+ /* 时间线自定义内容槽(放标签、卡片等) */
461
+ .timeline-extra {
462
+ margin-top: var(--density-space-xs);
463
+ padding: var(--density-space-sm);
464
+ background: var(--token-bg-soft);
465
+ border-radius: var(--radius-sm);
466
+ font-size: var(--density-font-size-sm);
467
+ }
468
+
469
+ /* ── desc 增强 ── */
470
+
471
+ /* 行内描述(label: value 在同一行) */
472
+ .desc--inline .desc-item {
473
+ display: flex;
474
+ align-items: baseline;
475
+ gap: var(--density-space-sm);
476
+ padding: 4px 0;
477
+ }
478
+ .desc--inline .desc-item dt {
479
+ flex-shrink: 0;
480
+ min-width: 80px;
481
+ }
482
+ .desc--inline .desc-item dd {
483
+ flex: 1;
484
+ }
485
+
486
+ /* 垂直描述(label 在上,value 在下) */
487
+ .desc--vertical .desc-item {
488
+ display: flex;
489
+ flex-direction: column;
490
+ gap: 2px;
491
+ }
492
+
493
+ /* 可复制描述值 */
494
+ .desc-copy {
495
+ display: inline-flex;
496
+ align-items: center;
497
+ gap: var(--density-space-xs);
498
+ }
499
+ .desc-copy-btn {
500
+ display: inline-flex;
501
+ align-items: center;
502
+ padding: 2px;
503
+ border: 0;
504
+ border-radius: var(--radius-xs);
505
+ background: transparent;
506
+ color: var(--token-text-faint);
507
+ cursor: pointer;
508
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
509
+ }
510
+ .desc-copy-btn:hover { color: var(--token-accent); background: var(--token-fill-1); }
511
+ .desc-copy-btn svg { width: 12px; height: 12px; }
512
+
513
+ /* ── tree 增强 ── */
514
+
515
+ /* 带连接线的树 */
516
+ .tree--lined ul {
517
+ position: relative;
518
+ margin-left: 7px;
519
+ padding-left: 0;
520
+ border-left: 1px solid var(--token-outline-soft);
521
+ }
522
+ .tree--lined .tree-node {
523
+ position: relative;
524
+ }
525
+ .tree--lined ul > li > .tree-node::before {
526
+ content: '';
527
+ position: absolute;
528
+ left: -8px;
529
+ top: 50%;
530
+ width: 8px;
531
+ height: 1px;
532
+ background: var(--token-outline-soft);
533
+ }
534
+
535
+ /* 树节点复选框(checkbox tree) */
536
+ .tree-checkbox {
537
+ width: 14px;
538
+ height: 14px;
539
+ flex-shrink: 0;
540
+ margin-right: 2px;
541
+ }
542
+
543
+ /* 树拖拽视觉态 */
544
+ .tree-node.is-dragging {
545
+ opacity: 0.5;
546
+ }
547
+ .tree-node.is-drop-target {
548
+ box-shadow: inset 0 -2px var(--token-accent);
549
+ }
550
+
551
+ /* 树搜索高亮 */
552
+ .tree-label mark {
553
+ background: color-mix(in srgb, var(--token-warning) 30%, transparent);
554
+ color: inherit;
555
+ border-radius: 2px;
556
+ padding: 0 1px;
557
+ }
558
+
559
+ /* ── kbd 增强 ── */
560
+
561
+ /* 大号 kbd(展示用) */
562
+ .kbd--lg {
563
+ height: 28px;
564
+ min-width: 28px;
565
+ padding: 0 var(--density-space-sm);
566
+ font-size: var(--density-font-size-md);
567
+ }
568
+
569
+ /* kbd 按下态(动画反馈) */
570
+ .kbd.is-pressed {
571
+ transform: translateY(1px);
572
+ box-shadow: none;
573
+ }
574
+
575
+ /* ── code-inline 增强 ── */
576
+ .code-inline--success { color: var(--token-success); }
577
+ .code-inline--warning { color: var(--token-warning); }
578
+ .code-inline--error { color: var(--token-error); }
579
+
580
+ /* 代码块(多行,非行内) */
581
+ .code-block {
582
+ padding: var(--density-space-sm) var(--density-space-md);
583
+ background: var(--token-bg-soft);
584
+ border: 1px solid var(--token-outline-soft);
585
+ border-radius: var(--radius-md);
586
+ font-family: var(--font-mono);
587
+ font-size: var(--density-font-size-sm);
588
+ color: var(--token-text);
589
+ overflow-x: auto;
590
+ line-height: 1.6;
591
+ }