@icen.ai/ui 0.8.1 → 0.10.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 (335) hide show
  1. package/AGENTS.md +176 -75
  2. package/README.md +66 -88
  3. package/dist/base.css +208 -179
  4. package/dist/behaviors/accordion.mjs +8 -8
  5. package/dist/behaviors/ai-branch.d.mts +19 -0
  6. package/dist/behaviors/ai-branch.mjs +1133 -0
  7. package/dist/behaviors/ai-chat.d.mts +12 -10
  8. package/dist/behaviors/ai-chat.mjs +1125 -155
  9. package/dist/behaviors/ai-composer.d.mts +44 -12
  10. package/dist/behaviors/ai-composer.mjs +2084 -523
  11. package/dist/behaviors/ai-core.d.mts +1 -1
  12. package/dist/behaviors/ai-core.mjs +1016 -107
  13. package/dist/behaviors/ai-diff.mjs +1019 -127
  14. package/dist/behaviors/ai-feedback.d.mts +26 -0
  15. package/dist/behaviors/ai-feedback.mjs +1212 -0
  16. package/dist/behaviors/ai-panel.d.mts +21 -7
  17. package/dist/behaviors/ai-panel.mjs +1308 -264
  18. package/dist/behaviors/ai-provider.mjs +1003 -101
  19. package/dist/behaviors/ai-threads.d.mts +38 -0
  20. package/dist/behaviors/ai-threads.mjs +1233 -0
  21. package/dist/behaviors/ai-tool.d.mts +2 -2
  22. package/dist/behaviors/ai-tool.mjs +2042 -396
  23. package/dist/behaviors/ai-tools.d.mts +89 -16
  24. package/dist/behaviors/ai-tools.mjs +4453 -372
  25. package/dist/behaviors/autocomplete.d.mts +53 -0
  26. package/dist/behaviors/autocomplete.mjs +1600 -0
  27. package/dist/behaviors/back-top.d.mts +1 -1
  28. package/dist/behaviors/back-top.mjs +951 -14
  29. package/dist/behaviors/carousel.d.mts +1 -1
  30. package/dist/behaviors/carousel.mjs +906 -11
  31. package/dist/behaviors/cascader.d.mts +48 -0
  32. package/dist/behaviors/cascader.mjs +1853 -0
  33. package/dist/behaviors/charts.d.mts +174 -8
  34. package/dist/behaviors/charts.mjs +2632 -192
  35. package/dist/behaviors/code-block.d.mts +36 -0
  36. package/dist/behaviors/code-block.mjs +1611 -0
  37. package/dist/behaviors/command-palette.d.mts +9 -6
  38. package/dist/behaviors/command-palette.mjs +161 -59
  39. package/dist/behaviors/context-menu.d.mts +9 -8
  40. package/dist/behaviors/context-menu.mjs +1112 -44
  41. package/dist/behaviors/controls.d.mts +13 -13
  42. package/dist/behaviors/controls.mjs +989 -130
  43. package/dist/behaviors/copy.d.mts +21 -2
  44. package/dist/behaviors/copy.mjs +1206 -42
  45. package/dist/behaviors/datatable.d.mts +53 -3
  46. package/dist/behaviors/datatable.mjs +1963 -207
  47. package/dist/behaviors/date-picker.d.mts +0 -1
  48. package/dist/behaviors/date-picker.mjs +1340 -293
  49. package/dist/behaviors/design.d.mts +54 -0
  50. package/dist/behaviors/design.mjs +109 -0
  51. package/dist/behaviors/dropdown.d.mts +5 -6
  52. package/dist/behaviors/dropdown.mjs +262 -110
  53. package/dist/behaviors/events.d.mts +313 -3
  54. package/dist/behaviors/events.mjs +47 -2
  55. package/dist/behaviors/feedback.d.mts +30 -0
  56. package/dist/behaviors/feedback.mjs +296 -0
  57. package/dist/behaviors/focus.d.mts +8 -0
  58. package/dist/behaviors/focus.mjs +24 -0
  59. package/dist/behaviors/form-validate.d.mts +102 -0
  60. package/dist/behaviors/form-validate.mjs +6091 -0
  61. package/dist/behaviors/i18n.d.mts +789 -0
  62. package/dist/behaviors/i18n.mjs +1711 -0
  63. package/dist/behaviors/icons.d.mts +93 -0
  64. package/dist/behaviors/icons.mjs +113 -0
  65. package/dist/behaviors/input.d.mts +9 -1
  66. package/dist/behaviors/input.mjs +1056 -60
  67. package/dist/behaviors/kb-access.d.mts +34 -0
  68. package/dist/behaviors/kb-access.mjs +2459 -0
  69. package/dist/behaviors/kb-acl.d.mts +50 -0
  70. package/dist/behaviors/kb-acl.mjs +1345 -0
  71. package/dist/behaviors/kb-answer.d.mts +38 -0
  72. package/dist/behaviors/kb-answer.mjs +3707 -0
  73. package/dist/behaviors/kb-audit.d.mts +23 -0
  74. package/dist/behaviors/kb-audit.mjs +1297 -0
  75. package/dist/behaviors/kb-canvas.d.mts +44 -0
  76. package/dist/behaviors/kb-canvas.mjs +1512 -0
  77. package/dist/behaviors/kb-chain.d.mts +15 -0
  78. package/dist/behaviors/kb-chain.mjs +1192 -0
  79. package/dist/behaviors/kb-checkpoint.d.mts +16 -0
  80. package/dist/behaviors/kb-checkpoint.mjs +1492 -0
  81. package/dist/behaviors/kb-chunks.d.mts +31 -0
  82. package/dist/behaviors/kb-chunks.mjs +1414 -0
  83. package/dist/behaviors/kb-citation.d.mts +38 -0
  84. package/dist/behaviors/kb-citation.mjs +1699 -0
  85. package/dist/behaviors/kb-clarify.d.mts +20 -0
  86. package/dist/behaviors/kb-clarify.mjs +1176 -0
  87. package/dist/behaviors/kb-conflict.d.mts +22 -0
  88. package/dist/behaviors/kb-conflict.mjs +1206 -0
  89. package/dist/behaviors/kb-connector.d.mts +17 -0
  90. package/dist/behaviors/kb-connector.mjs +1303 -0
  91. package/dist/behaviors/kb-core.d.mts +534 -0
  92. package/dist/behaviors/kb-core.mjs +1805 -0
  93. package/dist/behaviors/kb-eval.d.mts +22 -0
  94. package/dist/behaviors/kb-eval.mjs +2235 -0
  95. package/dist/behaviors/kb-explain.d.mts +11 -0
  96. package/dist/behaviors/kb-explain.mjs +1165 -0
  97. package/dist/behaviors/kb-filter.d.mts +31 -0
  98. package/dist/behaviors/kb-filter.mjs +2417 -0
  99. package/dist/behaviors/kb-gap.d.mts +27 -0
  100. package/dist/behaviors/kb-gap.mjs +1195 -0
  101. package/dist/behaviors/kb-hittest.d.mts +34 -0
  102. package/dist/behaviors/kb-hittest.mjs +1352 -0
  103. package/dist/behaviors/kb-metadata.d.mts +29 -0
  104. package/dist/behaviors/kb-metadata.mjs +1248 -0
  105. package/dist/behaviors/kb-passage.d.mts +41 -0
  106. package/dist/behaviors/kb-passage.mjs +1469 -0
  107. package/dist/behaviors/kb-pipeline.d.mts +18 -0
  108. package/dist/behaviors/kb-pipeline.mjs +1301 -0
  109. package/dist/behaviors/kb-qa.d.mts +26 -0
  110. package/dist/behaviors/kb-qa.mjs +1260 -0
  111. package/dist/behaviors/kb-rerank.d.mts +20 -0
  112. package/dist/behaviors/kb-rerank.mjs +1248 -0
  113. package/dist/behaviors/kb-retrieval.d.mts +49 -0
  114. package/dist/behaviors/kb-retrieval.mjs +2585 -0
  115. package/dist/behaviors/kb-review.d.mts +44 -0
  116. package/dist/behaviors/kb-review.mjs +2282 -0
  117. package/dist/behaviors/kb-sandbox.d.mts +33 -0
  118. package/dist/behaviors/kb-sandbox.mjs +1247 -0
  119. package/dist/behaviors/kb-segment.d.mts +32 -0
  120. package/dist/behaviors/kb-segment.mjs +1431 -0
  121. package/dist/behaviors/kb-select.d.mts +24 -0
  122. package/dist/behaviors/kb-select.mjs +1989 -0
  123. package/dist/behaviors/kb-sources.d.mts +27 -0
  124. package/dist/behaviors/kb-sources.mjs +1287 -0
  125. package/dist/behaviors/kb-sql.d.mts +43 -0
  126. package/dist/behaviors/kb-sql.mjs +1865 -0
  127. package/dist/behaviors/kb-trace.d.mts +16 -0
  128. package/dist/behaviors/kb-trace.mjs +1328 -0
  129. package/dist/behaviors/kb-visibility.d.mts +44 -0
  130. package/dist/behaviors/kb-visibility.mjs +1331 -0
  131. package/dist/behaviors/kb-who-can.d.mts +32 -0
  132. package/dist/behaviors/kb-who-can.mjs +2216 -0
  133. package/dist/behaviors/mentions.d.mts +93 -0
  134. package/dist/behaviors/mentions.mjs +2152 -0
  135. package/dist/behaviors/modal.d.mts +4 -3
  136. package/dist/behaviors/modal.mjs +1055 -33
  137. package/dist/behaviors/nav.d.mts +1 -1
  138. package/dist/behaviors/nav.mjs +6 -6
  139. package/dist/behaviors/notification.d.mts +16 -8
  140. package/dist/behaviors/notification.mjs +1615 -265
  141. package/dist/behaviors/panel.d.mts +4 -0
  142. package/dist/behaviors/panel.mjs +994 -0
  143. package/dist/behaviors/popover.d.mts +28 -5
  144. package/dist/behaviors/popover.mjs +225 -24
  145. package/dist/behaviors/select.d.mts +5 -2
  146. package/dist/behaviors/select.mjs +1410 -117
  147. package/dist/behaviors/sidebar.d.mts +1 -1
  148. package/dist/behaviors/sidebar.mjs +13 -13
  149. package/dist/behaviors/slider.d.mts +1 -1
  150. package/dist/behaviors/slider.mjs +9 -9
  151. package/dist/behaviors/split-pane.d.mts +1 -1
  152. package/dist/behaviors/split-pane.mjs +7 -7
  153. package/dist/behaviors/suggestions.d.mts +27 -0
  154. package/dist/behaviors/suggestions.mjs +1089 -0
  155. package/dist/behaviors/svg-parse.d.mts +14 -0
  156. package/dist/behaviors/svg-parse.mjs +37 -0
  157. package/dist/behaviors/tabs.d.mts +2 -2
  158. package/dist/behaviors/tabs.mjs +25 -25
  159. package/dist/behaviors/tag-input.d.mts +23 -5
  160. package/dist/behaviors/tag-input.mjs +1359 -104
  161. package/dist/behaviors/theme-switcher.d.mts +24 -0
  162. package/dist/behaviors/theme-switcher.mjs +1981 -0
  163. package/dist/behaviors/theme.d.mts +15 -8
  164. package/dist/behaviors/theme.mjs +390 -28
  165. package/dist/behaviors/toast.d.mts +24 -25
  166. package/dist/behaviors/toast.mjs +1266 -88
  167. package/dist/behaviors/tooltip.d.mts +4 -0
  168. package/dist/behaviors/tooltip.mjs +378 -0
  169. package/dist/behaviors/tree-select.d.mts +69 -0
  170. package/dist/behaviors/tree-select.mjs +1907 -0
  171. package/dist/behaviors/tree.d.mts +1 -1
  172. package/dist/behaviors/tree.mjs +15 -15
  173. package/dist/behaviors/upload.d.mts +3 -2
  174. package/dist/behaviors/upload.mjs +1076 -66
  175. package/dist/cli.mjs +5 -6
  176. package/dist/components/ai-branch.mjs +3 -0
  177. package/dist/components/ai-chat.css +846 -458
  178. package/dist/components/ai-diff.css +153 -132
  179. package/dist/components/ai-feedback.mjs +3 -0
  180. package/dist/components/ai-panel.css +495 -270
  181. package/dist/components/ai-threads.mjs +3 -0
  182. package/dist/components/ai-tool.css +393 -238
  183. package/dist/components/autocomplete.css +61 -0
  184. package/dist/components/autocomplete.mjs +3 -0
  185. package/dist/components/back-top.css +34 -31
  186. package/dist/components/badge.css +44 -41
  187. package/dist/components/breadcrumb.css +67 -46
  188. package/dist/components/btn.css +80 -74
  189. package/dist/components/card.css +117 -106
  190. package/dist/components/cascader.css +311 -0
  191. package/dist/components/cascader.mjs +3 -0
  192. package/dist/components/chart-area.css +8 -2
  193. package/dist/components/chart-bar.css +95 -33
  194. package/dist/components/chart-gauge.css +14 -11
  195. package/dist/components/chart-graph.css +60 -0
  196. package/dist/components/chart-graph.mjs +4 -0
  197. package/dist/components/chart-heatmap.css +96 -90
  198. package/dist/components/chart-line.css +8 -3
  199. package/dist/components/chart-map.mjs +3 -0
  200. package/dist/components/chart-pie.css +9 -6
  201. package/dist/components/chart-radar.css +8 -5
  202. package/dist/components/chart-scatter.css +9 -6
  203. package/dist/components/chart-scatter.mjs +1 -1
  204. package/dist/components/chart-sparkline.css +5 -2
  205. package/dist/components/chart-stack.css +14 -11
  206. package/dist/components/charts.css +190 -67
  207. package/dist/components/charts.mjs +1 -0
  208. package/dist/components/code-block.css +418 -0
  209. package/dist/components/code-block.mjs +4 -0
  210. package/dist/components/command-palette.css +138 -117
  211. package/dist/components/content.css +257 -251
  212. package/dist/components/copy.css +72 -44
  213. package/dist/components/datatable.css +423 -181
  214. package/dist/components/date-picker.css +135 -104
  215. package/dist/components/empty.css +68 -65
  216. package/dist/components/feedback.css +201 -183
  217. package/dist/components/form-validate.css +120 -0
  218. package/dist/components/form-validate.mjs +3 -0
  219. package/dist/components/form.css +150 -127
  220. package/dist/components/icon.css +102 -0
  221. package/dist/components/icon.mjs +3 -0
  222. package/dist/components/input.css +159 -104
  223. package/dist/components/kb-access.mjs +4 -0
  224. package/dist/components/kb-acl.mjs +4 -0
  225. package/dist/components/kb-agent.css +496 -0
  226. package/dist/components/kb-answer.mjs +4 -0
  227. package/dist/components/kb-audit.mjs +4 -0
  228. package/dist/components/kb-canvas.mjs +4 -0
  229. package/dist/components/kb-chain.mjs +4 -0
  230. package/dist/components/kb-checkpoint.mjs +4 -0
  231. package/dist/components/kb-chunks.mjs +4 -0
  232. package/dist/components/kb-citation.mjs +4 -0
  233. package/dist/components/kb-clarify.mjs +4 -0
  234. package/dist/components/kb-conflict.mjs +4 -0
  235. package/dist/components/kb-connector.mjs +4 -0
  236. package/dist/components/kb-data.css +653 -0
  237. package/dist/components/kb-eval.mjs +4 -0
  238. package/dist/components/kb-explain.mjs +4 -0
  239. package/dist/components/kb-filter.mjs +4 -0
  240. package/dist/components/kb-gap.mjs +4 -0
  241. package/dist/components/kb-ground.css +578 -0
  242. package/dist/components/kb-hittest.mjs +4 -0
  243. package/dist/components/kb-ingest.css +882 -0
  244. package/dist/components/kb-metadata.mjs +4 -0
  245. package/dist/components/kb-ops.css +554 -0
  246. package/dist/components/kb-passage.mjs +4 -0
  247. package/dist/components/kb-perm.css +433 -0
  248. package/dist/components/kb-pipeline.mjs +4 -0
  249. package/dist/components/kb-qa.mjs +4 -0
  250. package/dist/components/kb-rerank.mjs +4 -0
  251. package/dist/components/kb-retrieval.mjs +4 -0
  252. package/dist/components/kb-review.mjs +4 -0
  253. package/dist/components/kb-sandbox.mjs +4 -0
  254. package/dist/components/kb-search.css +897 -0
  255. package/dist/components/kb-segment.mjs +4 -0
  256. package/dist/components/kb-sources.mjs +4 -0
  257. package/dist/components/kb-sql.mjs +4 -0
  258. package/dist/components/kb-trace.mjs +4 -0
  259. package/dist/components/kb-visibility.mjs +4 -0
  260. package/dist/components/kb-who-can.mjs +4 -0
  261. package/dist/components/kb.css +263 -0
  262. package/dist/components/kb.mjs +9 -0
  263. package/dist/components/layout.css +85 -82
  264. package/dist/components/material-chinese.css +73 -0
  265. package/dist/components/material-soviet.css +76 -0
  266. package/dist/components/material.css +275 -0
  267. package/dist/components/media.css +220 -166
  268. package/dist/components/mentions.css +189 -0
  269. package/dist/components/mentions.mjs +3 -0
  270. package/dist/components/menu.css +113 -105
  271. package/dist/components/modal.css +107 -112
  272. package/dist/components/nav.css +118 -115
  273. package/dist/components/notification.css +238 -174
  274. package/dist/components/pagination.css +56 -53
  275. package/dist/components/panel.css +66 -63
  276. package/dist/components/panel.mjs +1 -0
  277. package/dist/components/pill.css +81 -71
  278. package/dist/components/popover.css +67 -53
  279. package/dist/components/scroll-area.css +113 -110
  280. package/dist/components/segmented.css +146 -143
  281. package/dist/components/select.css +206 -186
  282. package/dist/components/sidebar.css +137 -127
  283. package/dist/components/slider.css +117 -114
  284. package/dist/components/split-pane.css +112 -109
  285. package/dist/components/stat.css +112 -106
  286. package/dist/components/steps.css +109 -103
  287. package/dist/components/switch.css +138 -134
  288. package/dist/components/table.css +131 -107
  289. package/dist/components/tabs.css +114 -108
  290. package/dist/components/tag-input.css +48 -133
  291. package/dist/components/tag.css +81 -71
  292. package/dist/components/theme-switcher.css +105 -0
  293. package/dist/components/theme-switcher.mjs +3 -0
  294. package/dist/components/toast.css +100 -86
  295. package/dist/components/toolbar.css +45 -42
  296. package/dist/components/tooltip.css +102 -43
  297. package/dist/components/tooltip.mjs +1 -0
  298. package/dist/components/tree-select.css +416 -0
  299. package/dist/components/tree-select.mjs +3 -0
  300. package/dist/components/upload.css +135 -92
  301. package/dist/fonts/LICENSES/ark-pixel/OFL.txt +96 -0
  302. package/dist/fonts/LICENSES/cubic-11/OFL.txt +108 -0
  303. package/dist/fonts/LICENSES/galmuri/LICENSE.txt +93 -0
  304. package/dist/fonts/OFL.txt +96 -0
  305. package/dist/fonts/README.md +14 -0
  306. package/dist/fonts/fusion-pixel-12px-zh-hans.woff2 +0 -0
  307. package/dist/index.d.mts +64 -15
  308. package/dist/index.mjs +28049 -8595
  309. package/dist/react.d.mts +91 -0
  310. package/dist/react.mjs +8208 -0
  311. package/dist/registry.json +454 -15
  312. package/dist/tokens/chinese.css +44 -0
  313. package/dist/tokens/colors.css +365 -1222
  314. package/dist/tokens/design.css +109 -0
  315. package/dist/tokens/dtcg.json +11198 -0
  316. package/dist/tokens/figma.variables.json +7017 -0
  317. package/dist/tokens/icon-masks.css +78 -0
  318. package/dist/tokens/pixel.css +50 -0
  319. package/dist/tokens/soviet.css +44 -0
  320. package/dist/tokens/style-profiles.css +36 -547
  321. package/dist/tokens/themes.json +308 -0
  322. package/dist/tokens/tokens-studio.json +6728 -0
  323. package/dist/tokens/typography.css +21 -18
  324. package/dist/tokens.css +1555 -1801
  325. package/dist/ui.css +16147 -8597
  326. package/dist/vue.d.mts +344 -0
  327. package/dist/vue.mjs +7781 -0
  328. package/docs/spec/ai-input-experience.md +75 -0
  329. package/docs/spec/ai-native.md +238 -147
  330. package/docs/spec/design-philosophy.md +189 -0
  331. package/docs/spec/design-primitives.md +196 -0
  332. package/docs/spec/kb-family.md +475 -0
  333. package/package.json +42 -7
  334. package/dist/retro-effects.css +0 -255
  335. package/dist/tokens/retro-effects.css +0 -255
@@ -1,35 +1,44 @@
1
+ @layer icen.components {
1
2
  /*
2
3
  * @icen.ai/ui — Component: datatable(数据表格,与 behaviors/datatable 配套)
3
4
  *
4
5
  * 结构(全部由 createTable 渲染,div + ARIA role 网格):
5
- * .datatable [--striped|--virtual]
6
- * ├─ .dt-toolbar > .dt-search > svg + input.dt-search-input
7
- * ├─ .dt-scroll > .dt-canvas[role=grid]
8
- * │ ├─ .dt-head > .dt-row--head > .dt-cell--head(.is-sortable / .dt-filter-btn / .dt-filter-panel)
9
- * │ └─ .dt-body > .dt-row[.is-selected] > .dt-cell;.dt-expand-row;.dt-empty;.dt-skeleton-row
10
- * └─ .dt-foot > .dt-stat(含 .dt-clear-sel)+ .dt-pager(.dt-page-size / .dt-page-btn / .dt-page-dots)
6
+ * .icen-datatable [--striped|--virtual|--compact|--frozen|--reorderable]
7
+ * ├─ .icen-dt-toolbar > .icen-dt-search > svg + input.icen-dt-search-input
8
+ * ├─ .icen-dt-scroll > .icen-dt-canvas[role=grid]
9
+ * │ ├─ .icen-dt-head > .icen-dt-row--head > .icen-dt-cell--head(.is-sortable / .icen-dt-sort[.is-active] /
10
+ * │ │ .icen-dt-sort-badge 多列排序优先级 / .icen-dt-filter-btn / .icen-dt-resize / .is-drag-source)
11
+ * │ ├─ .icen-dt-body > .icen-dt-row[.is-selected][data-icen-row][data-icen-key]
12
+ * │ │ > .icen-dt-cell[data-icen-col][data-icen-col-key][tabindex](.icen-dt-cell--frozen[left 偏移内联] /
13
+ * │ │ .icen-dt-cell--frozen-right[right 偏移内联] / .is-editable / .is-editing > .icen-dt-editor[.is-invalid]);
14
+ * │ │ .icen-dt-row--group[.is-collapsed] > .icen-dt-cell--group(grid-column 1/-1)
15
+ * │ │ > .icen-dt-group-toggle + .icen-dt-group-label + .icen-dt-group-count + .icen-dt-group-aggs > .icen-dt-group-agg;
16
+ * │ │ .icen-dt-expand-row;.icen-dt-empty;.icen-dt-skeleton-row
17
+ * │ └─ .icen-dt-row--summary[sticky bottom 汇总行] > .icen-dt-cell--summary
18
+ * └─ .icen-dt-foot > .icen-dt-stat(含 .icen-dt-clear-sel)+ .icen-dt-pager(.icen-dt-page-size / .icen-dt-page-btn / .icen-dt-page-dots)
11
19
  *
20
+ * 拖拽浮层(portal 到 body,behavior 定位):.icen-dt-col-ghost(列重排影子)/ .icen-dt-col-indicator(插入指示线)。
12
21
  * 行布局 = grid,grid-template-columns 由 behavior 按列宽计算;行内容溢出省略号。
13
22
  * 右键菜单面板样式在 menu.css(kit 入口自动带上)。
14
23
  */
15
24
 
16
- .datatable {
17
- border: 1px solid var(--token-line-soft);
18
- border-radius: var(--radius-lg);
19
- background: var(--token-surface);
25
+ .icen-datatable {
26
+ border: 1px solid var(--icen-token-line-soft);
27
+ border-radius: var(--icen-radius-lg);
28
+ background: var(--icen-token-surface);
20
29
  overflow: hidden;
21
- font-size: var(--density-font-size-md);
30
+ font-size: var(--icen-density-font-size-md);
22
31
  }
23
32
 
24
33
  /* ── 工具栏(搜索) ── */
25
- .dt-toolbar {
34
+ .icen-dt-toolbar {
26
35
  display: flex;
27
36
  align-items: center;
28
- gap: var(--density-space-sm);
37
+ gap: var(--icen-density-space-sm);
29
38
  padding: 10px 14px;
30
- border-bottom: 1px solid var(--token-line-soft);
39
+ border-bottom: 1px solid var(--icen-token-line-soft);
31
40
  }
32
- .dt-search {
41
+ .icen-dt-search {
33
42
  display: flex;
34
43
  align-items: center;
35
44
  gap: 8px;
@@ -37,106 +46,144 @@
37
46
  width: 260px;
38
47
  max-width: 100%;
39
48
  padding: 0 10px;
40
- color: var(--token-text-faint);
41
- background: var(--token-control);
42
- border: 1px solid var(--token-outline-soft);
43
- border-radius: var(--radius-md);
44
- box-shadow: var(--token-shadow-inset);
49
+ color: var(--icen-token-text-faint);
50
+ background: var(--icen-token-control);
51
+ border: 1px solid var(--icen-token-outline-soft);
52
+ border-radius: var(--icen-radius-md);
53
+ box-shadow: var(--icen-token-shadow-inset);
45
54
  transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
46
55
  }
47
- .dt-search:focus-within {
48
- border-color: var(--icen-control-focus-border, var(--token-accent));
56
+ .icen-dt-search:focus-within {
57
+ border-color: var(--icen-control-focus-border, var(--icen-token-accent));
49
58
  box-shadow: var(--icen-control-focus-shadow);
50
59
  }
51
- .dt-search-input {
60
+ .icen-dt-search-input {
52
61
  flex: 1;
53
62
  min-width: 0;
54
63
  border: 0;
55
64
  outline: none;
56
65
  background: transparent;
57
- color: var(--token-text);
66
+ color: var(--icen-token-text);
58
67
  font: inherit;
59
- font-size: var(--density-font-size-sm);
68
+ font-size: var(--icen-density-font-size-sm);
60
69
  }
61
- .dt-search-input::placeholder { color: var(--token-text-faint); }
62
- .dt-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
70
+ .icen-dt-search-input::placeholder { color: var(--icen-token-text-faint); }
71
+ .icen-dt-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
63
72
 
64
73
  /* ── 滚动容器与画布 ── */
65
- .dt-scroll { overflow: auto; }
66
- .datatable--virtual .dt-scroll { overscroll-behavior: contain; }
67
- .dt-canvas { min-width: 560px; }
74
+ .icen-dt-scroll { overflow: auto; }
75
+ .icen-datatable--virtual .icen-dt-scroll { overscroll-behavior: contain; }
76
+ .icen-dt-canvas { min-width: 560px; }
68
77
 
69
78
  /* ── 行 ── */
70
- .dt-row {
79
+ .icen-dt-row {
71
80
  display: grid;
72
81
  align-items: center;
73
- border-bottom: 1px solid var(--token-line-soft);
82
+ border-bottom: 1px solid var(--icen-token-line-soft);
74
83
  transition: background var(--icen-tx-fast);
75
84
  }
76
- .dt-body .dt-row:last-child { border-bottom: 0; }
77
- .dt-body .dt-row:hover { background: var(--token-fill-1); }
78
- .dt-row.is-selected { background: var(--token-accent-subtle); }
79
- .dt-row.is-selected:hover { background: color-mix(in srgb, var(--token-accent-subtle) 82%, var(--token-fill-1)); }
80
- .dt-row.is-clickable { cursor: pointer; }
81
- .datatable--striped .dt-body .dt-row:nth-child(even):not(.is-selected) {
82
- background: color-mix(in srgb, var(--token-fill-1) 55%, transparent);
83
- }
84
- .datatable--striped .dt-body .dt-row:nth-child(even):not(.is-selected):hover {
85
- background: var(--token-fill-1);
85
+ .icen-dt-body .icen-dt-row:last-child { border-bottom: 0; }
86
+ .icen-dt-body .icen-dt-row:hover { background: var(--icen-token-fill-1); }
87
+
88
+ /* 行内次要动作(columns.render 产出 .icen-dt-actions):隐式待命,行悬停/聚焦显现;
89
+ 触屏常显;按钮本体 26px 视觉 + 触屏隐形 44px 命中 */
90
+ .icen-dt-actions { display: inline-flex; gap: 2px; }
91
+ .icen-dt-action {
92
+ display: inline-flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ inline-size: 26px;
96
+ block-size: 26px;
97
+ padding: 0;
98
+ border: 0;
99
+ border-radius: var(--icen-radius-sm);
100
+ background: transparent;
101
+ color: var(--icen-token-text-faint);
102
+ cursor: pointer;
103
+ position: relative;
104
+ transition:
105
+ opacity var(--icen-tx-fast),
106
+ color var(--icen-tx-fast),
107
+ background-color var(--icen-tx-fast);
108
+ }
109
+ .icen-dt-action:hover { color: var(--icen-token-text); background: var(--icen-token-fill-2); }
110
+ .icen-dt-action:focus-visible { outline: none; box-shadow: var(--icen-ring); opacity: 1; }
111
+ @media (hover: hover) and (pointer: fine) {
112
+ .icen-dt-actions { opacity: 0; }
113
+ .icen-dt-row:hover .icen-dt-actions,
114
+ .icen-dt-row:focus-within .icen-dt-actions { opacity: 1; }
115
+ }
116
+ @media (pointer: coarse) {
117
+ /* 隐形命中扩张用透明 border + 负 margin(background-clip 保持视觉不变);
118
+ 不用 ::after——动作钮可同时带 data-icen-tooltip,伪元素只有一颗 */
119
+ .icen-dt-action {
120
+ border: 9px solid transparent;
121
+ background-clip: padding-box;
122
+ margin: -9px;
123
+ }
124
+ }
125
+ .icen-dt-row.is-selected { background: var(--icen-token-accent-subtle); }
126
+ .icen-dt-row.is-selected:hover { background: color-mix(in srgb, var(--icen-token-accent-subtle) 82%, var(--icen-token-fill-1)); }
127
+ .icen-dt-row.is-clickable { cursor: pointer; }
128
+ .icen-datatable--striped .icen-dt-body .icen-dt-row:nth-child(even):not(.is-selected) {
129
+ background: color-mix(in srgb, var(--icen-token-fill-1) 55%, transparent);
130
+ }
131
+ .icen-datatable--striped .icen-dt-body .icen-dt-row:nth-child(even):not(.is-selected):hover {
132
+ background: var(--icen-token-fill-1);
86
133
  }
87
134
 
88
- .dt-cell {
135
+ .icen-dt-cell {
89
136
  padding: 0 12px;
90
137
  min-width: 0;
91
138
  overflow: hidden;
92
139
  text-overflow: ellipsis;
93
140
  white-space: nowrap;
94
- color: var(--token-text);
141
+ color: var(--icen-token-text);
95
142
  display: flex;
96
143
  align-items: center;
97
144
  gap: 8px;
98
145
  min-height: 44px;
99
146
  }
100
- .datatable--virtual .dt-cell { min-height: 0; height: 100%; }
101
- .dt-cell[data-align='center'] { justify-content: center; text-align: center; }
102
- .dt-cell[data-align='right'] { justify-content: flex-end; text-align: right; }
103
- .dt-cell--check, .dt-cell--expand { justify-content: center; padding: 0 4px; }
147
+ .icen-datatable--virtual .icen-dt-cell { min-height: 0; height: 100%; }
148
+ .icen-dt-cell[data-icen-align='center'] { justify-content: center; text-align: center; }
149
+ .icen-dt-cell[data-icen-align='right'] { justify-content: flex-end; text-align: right; /* guard:allow-physical data-icen-align='right' 是物理对齐属性契约(数字/操作列),RTL 语义不变 */ }
150
+ .icen-dt-cell--check, .icen-dt-cell--expand { justify-content: center; padding: 0 4px; }
104
151
 
105
152
  /* ── 表头 ── */
106
- .dt-head { border-bottom: 1px solid var(--token-line-soft); }
107
- .dt-row--head {
108
- background: var(--token-bg-soft);
153
+ .icen-dt-head { border-bottom: 1px solid var(--icen-token-line-soft); }
154
+ .icen-dt-row--head {
155
+ background: var(--icen-token-bg-soft);
109
156
  border-bottom: 0;
110
157
  }
111
- .datatable--virtual .dt-row--head {
158
+ .icen-datatable--virtual .icen-dt-row--head {
112
159
  position: sticky;
113
160
  top: 0;
114
- z-index: var(--z-raised);
161
+ z-index: var(--icen-z-raised);
115
162
  }
116
- .dt-cell--head {
163
+ .icen-dt-cell--head {
117
164
  position: relative;
118
165
  min-height: 40px;
119
- font-size: var(--density-font-size-sm);
166
+ font-size: var(--icen-density-font-size-sm);
120
167
  font-weight: 600;
121
- color: var(--token-text-muted);
168
+ color: var(--icen-token-text-muted);
122
169
  user-select: none;
123
170
  }
124
- .dt-cell--head.is-sortable { cursor: pointer; }
125
- .dt-cell--head.is-sortable:hover { color: var(--token-text); }
126
- .dt-cell--head:focus-visible {
171
+ .icen-dt-cell--head.is-sortable { cursor: pointer; }
172
+ .icen-dt-cell--head.is-sortable:hover { color: var(--icen-token-text); }
173
+ .icen-dt-cell--head:focus-visible {
127
174
  outline: none;
128
175
  box-shadow: var(--icen-ring-inset);
129
176
  }
130
- .dt-head-title { overflow: hidden; text-overflow: ellipsis; }
131
- .dt-sort {
132
- font-size: var(--density-font-size-2xs);
133
- color: var(--token-text-faint);
177
+ .icen-dt-head-title { overflow: hidden; text-overflow: ellipsis; }
178
+ .icen-dt-sort {
179
+ font-size: var(--icen-density-font-size-2xs);
180
+ color: var(--icen-token-text-faint);
134
181
  flex-shrink: 0;
135
182
  }
136
- .dt-sort.is-active { color: var(--token-accent); }
183
+ .icen-dt-sort.is-active { color: var(--icen-token-accent); }
137
184
 
138
185
  /* 筛选按钮与面板 */
139
- .dt-filter-btn {
186
+ .icen-dt-filter-btn {
140
187
  display: inline-flex;
141
188
  align-items: center;
142
189
  justify-content: center;
@@ -144,236 +191,237 @@
144
191
  height: 22px;
145
192
  flex-shrink: 0;
146
193
  border: 0;
147
- border-radius: var(--radius-sm);
194
+ border-radius: var(--icen-radius-sm);
148
195
  background: transparent;
149
- color: var(--token-text-faint);
196
+ color: var(--icen-token-text-faint);
150
197
  cursor: pointer;
151
198
  transition: color var(--icen-tx-fast), background var(--icen-tx-fast);
152
199
  }
153
- .dt-filter-btn:hover { color: var(--token-text); background: var(--token-fill-2); }
154
- .dt-filter-btn.is-open, .dt-filter-btn.is-active { color: var(--token-accent); }
155
- .dt-filter-btn.is-active { background: var(--token-accent-subtle); }
200
+ .icen-dt-filter-btn:hover { color: var(--icen-token-text); background: var(--icen-token-fill-2); }
201
+ .icen-dt-filter-btn.is-open, .icen-dt-filter-btn.is-active { color: var(--icen-token-accent); }
202
+ .icen-dt-filter-btn.is-active { background: var(--icen-token-accent-subtle); }
156
203
 
157
- .dt-filter-panel {
204
+ .icen-dt-filter-panel {
158
205
  position: fixed; /* portal 到 body,由 behavior 按 trigger rect 定位 */
159
- z-index: var(--z-popover);
206
+ z-index: var(--icen-z-popover);
160
207
  min-width: 168px;
161
208
  max-width: 240px;
162
209
  padding: 4px;
163
- background: var(--token-card-strong);
164
- border: 1px solid var(--token-outline);
165
- border-radius: var(--radius-md);
166
- box-shadow: var(--token-shadow-overlay);
210
+ background: var(--icen-token-card-strong);
211
+ border: 1px solid var(--icen-token-outline);
212
+ border-radius: var(--icen-radius-md);
213
+ box-shadow: var(--icen-token-shadow-overlay);
167
214
  font-weight: 400;
168
215
  animation: icen-pop-in var(--icen-tx-fast);
169
216
  }
170
- .dt-filter-list {
217
+ .icen-dt-filter-list {
171
218
  max-height: 220px;
172
219
  overflow-y: auto;
173
220
  display: flex;
174
221
  flex-direction: column;
175
222
  }
176
- .dt-filter-item {
223
+ .icen-dt-filter-item {
177
224
  display: flex;
178
225
  align-items: center;
179
226
  gap: 8px;
180
227
  padding: 6px 8px;
181
- border-radius: var(--radius-sm);
182
- font-size: var(--density-font-size-sm);
183
- color: var(--token-text);
228
+ border-radius: var(--icen-radius-sm);
229
+ font-size: var(--icen-density-font-size-sm);
230
+ color: var(--icen-token-text);
184
231
  cursor: pointer;
185
232
  }
186
- .dt-filter-item:hover { background: var(--token-fill-1); }
187
- .dt-filter-item > span {
233
+ .icen-dt-filter-item:hover { background: var(--icen-token-fill-1); }
234
+ .icen-dt-filter-item > span {
188
235
  overflow: hidden;
189
236
  text-overflow: ellipsis;
190
237
  white-space: nowrap;
191
238
  }
192
- .dt-filter-foot {
239
+ .icen-dt-filter-foot {
193
240
  display: flex;
194
241
  justify-content: flex-end;
195
242
  padding: 4px 6px 2px;
196
- border-top: 1px solid var(--token-line-soft);
243
+ border-top: 1px solid var(--icen-token-line-soft);
197
244
  margin-top: 4px;
198
245
  }
199
- .dt-filter-reset {
246
+ .icen-dt-filter-reset {
200
247
  border: 0;
201
248
  background: transparent;
202
- color: var(--token-accent);
249
+ color: var(--icen-token-accent);
203
250
  font: inherit;
204
- font-size: var(--density-font-size-xs);
251
+ font-size: var(--icen-density-font-size-xs);
205
252
  cursor: pointer;
206
253
  padding: 2px 4px;
207
254
  }
208
- .dt-filter-reset:hover { text-decoration: underline; }
255
+ .icen-dt-filter-reset:hover { text-decoration: underline; }
209
256
 
210
257
  /* ── 复选框(accent-color 直达 token,三态由 behavior 控制 indeterminate) ── */
211
- .dt-check {
258
+ .icen-dt-check {
212
259
  width: 15px;
213
260
  height: 15px;
214
261
  margin: 0;
215
- accent-color: var(--token-accent);
262
+ accent-color: var(--icen-token-accent);
216
263
  cursor: pointer;
217
264
  flex-shrink: 0;
218
265
  }
219
266
 
220
267
  /* ── 行展开 ── */
221
- .dt-expand-btn {
268
+ .icen-dt-expand-btn {
222
269
  display: inline-flex;
223
270
  align-items: center;
224
271
  justify-content: center;
225
272
  width: 24px;
226
273
  height: 24px;
227
274
  border: 0;
228
- border-radius: var(--radius-sm);
275
+ border-radius: var(--icen-radius-sm);
229
276
  background: transparent;
230
- color: var(--token-text-faint);
277
+ color: var(--icen-token-text-faint);
231
278
  cursor: pointer;
232
279
  transition: transform var(--icen-tx-fast), color var(--icen-tx-fast), background var(--icen-tx-fast);
233
280
  }
234
- .dt-expand-btn:hover { color: var(--token-text); background: var(--token-fill-2); }
235
- .dt-expand-btn[aria-expanded='true'] { transform: rotate(180deg); color: var(--token-accent); }
236
- .dt-expand-row {
281
+ .icen-dt-expand-btn:hover { color: var(--icen-token-text); background: var(--icen-token-fill-2); }
282
+ .icen-dt-expand-btn[aria-expanded='true'] { transform: rotate(180deg); color: var(--icen-token-accent); }
283
+ .icen-dt-expand-row {
237
284
  padding: 14px 16px;
238
- border-bottom: 1px solid var(--token-line-soft);
239
- background: var(--token-bg-soft);
240
- color: var(--token-text-muted);
241
- font-size: var(--density-font-size-sm);
285
+ border-bottom: 1px solid var(--icen-token-line-soft);
286
+ background: var(--icen-token-bg-soft);
287
+ color: var(--icen-token-text-muted);
288
+ font-size: var(--icen-density-font-size-sm);
242
289
  line-height: 1.7;
243
290
  white-space: normal;
244
291
  }
245
292
 
246
293
  /* ── 空态 / 加载骨架 ── */
247
- .dt-empty {
294
+ .icen-dt-empty {
248
295
  padding: 48px 16px;
249
296
  text-align: center;
250
- color: var(--token-text-faint);
251
- font-size: var(--density-font-size-sm);
297
+ color: var(--icen-token-text-faint);
298
+ font-size: var(--icen-density-font-size-sm);
252
299
  }
253
- .dt-skeleton-row {
300
+ .icen-dt-skeleton-row {
254
301
  padding: 14px 16px;
255
- border-bottom: 1px solid var(--token-line-soft);
302
+ border-bottom: 1px solid var(--icen-token-line-soft);
256
303
  }
257
304
 
258
305
  /* ── 底部(统计 + 分页) ── */
259
- .dt-foot {
306
+ .icen-dt-foot {
260
307
  display: flex;
261
308
  align-items: center;
262
309
  gap: 12px;
263
310
  flex-wrap: wrap;
264
311
  padding: 10px 14px;
265
- border-top: 1px solid var(--token-line-soft);
312
+ border-top: 1px solid var(--icen-token-line-soft);
266
313
  }
267
- .dt-foot:empty { display: none; }
268
- .dt-stat {
269
- font-size: var(--density-font-size-xs);
270
- color: var(--token-text-faint);
314
+ .icen-dt-foot:empty { display: none; }
315
+ .icen-dt-stat {
316
+ font-size: var(--icen-density-font-size-xs);
317
+ color: var(--icen-token-text-faint);
271
318
  font-variant-numeric: tabular-nums;
272
319
  }
273
- .dt-stat--sel { color: var(--token-accent); display: inline-flex; align-items: center; gap: 6px; }
274
- .dt-clear-sel {
320
+ .icen-dt-stat--sel { color: var(--icen-token-accent); display: inline-flex; align-items: center; gap: 6px; }
321
+ .icen-dt-clear-sel {
275
322
  border: 0;
276
323
  background: transparent;
277
- color: var(--token-accent);
324
+ color: var(--icen-token-accent);
278
325
  font: inherit;
279
- font-size: var(--density-font-size-xs);
326
+ font-size: var(--icen-density-font-size-xs);
280
327
  cursor: pointer;
281
328
  padding: 0;
282
329
  }
283
- .dt-clear-sel:hover { text-decoration: underline; }
330
+ .icen-dt-clear-sel:hover { text-decoration: underline; }
284
331
 
285
- .dt-pager {
286
- margin-left: auto;
332
+ .icen-dt-pager {
333
+ margin-inline-start: auto;
287
334
  display: flex;
288
335
  align-items: center;
289
336
  gap: 4px;
290
337
  }
291
- .dt-page-size {
338
+ .icen-dt-page-size {
292
339
  appearance: none;
293
340
  -webkit-appearance: none;
294
341
  height: 28px;
295
342
  padding: 0 8px;
296
- margin-right: 6px;
343
+ margin-inline-end: 6px;
297
344
  font: inherit;
298
- font-size: var(--density-font-size-xs);
299
- color: var(--token-text-muted);
345
+ font-size: var(--icen-density-font-size-xs);
346
+ color: var(--icen-token-text-muted);
300
347
  background: transparent;
301
- border: 1px solid var(--token-line-soft);
302
- border-radius: var(--radius-sm);
348
+ border: 1px solid var(--icen-token-line-soft);
349
+ border-radius: var(--icen-radius-sm);
303
350
  cursor: pointer;
304
351
  }
305
- .dt-page-size:hover { border-color: var(--token-accent); color: var(--token-text); }
306
- .dt-page-btn {
352
+ .icen-dt-page-size:hover { border-color: var(--icen-token-accent); color: var(--icen-token-text); }
353
+ .icen-dt-page-btn {
307
354
  min-width: 28px;
308
355
  height: 28px;
309
356
  padding: 0 6px;
310
357
  border: 1px solid transparent;
311
- border-radius: var(--radius-sm);
358
+ border-radius: var(--icen-radius-sm);
312
359
  background: transparent;
313
- color: var(--token-text-muted);
360
+ color: var(--icen-token-text-muted);
314
361
  font: inherit;
315
- font-size: var(--density-font-size-xs);
362
+ font-size: var(--icen-density-font-size-xs);
316
363
  font-variant-numeric: tabular-nums;
317
364
  cursor: pointer;
318
365
  transition: color var(--icen-tx-fast), border-color var(--icen-tx-fast), background var(--icen-tx-fast);
319
366
  }
320
- .dt-page-btn:hover:not(:disabled):not(.is-active) {
321
- color: var(--token-text);
322
- border-color: var(--token-line-soft);
367
+ .icen-dt-page-btn:hover:not(:disabled):not(.is-active) {
368
+ color: var(--icen-token-text);
369
+ border-color: var(--icen-token-line-soft);
323
370
  }
324
- .dt-page-btn.is-active {
325
- color: var(--token-accent);
326
- border-color: var(--token-accent);
327
- background: var(--token-accent-subtle);
371
+ .icen-dt-page-btn.is-active {
372
+ color: var(--icen-token-accent);
373
+ border-color: var(--icen-token-accent);
374
+ background: var(--icen-token-accent-subtle);
328
375
  font-weight: 600;
329
376
  }
330
- .dt-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
331
- .dt-page-dots {
332
- color: var(--token-text-faint);
333
- font-size: var(--density-font-size-xs);
377
+ .icen-dt-page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
378
+ .icen-dt-page-dots {
379
+ color: var(--icen-token-text-faint);
380
+ font-size: var(--icen-density-font-size-xs);
334
381
  padding: 0 2px;
335
382
  }
336
383
 
337
384
  @media (prefers-reduced-motion: reduce) {
338
- .dt-filter-panel { animation: none; }
385
+ .icen-dt-filter-panel { animation: none; }
386
+ .icen-dt-editor.is-invalid { animation: none; }
339
387
  }
340
388
 
341
389
  /* ── 紧凑密度(32px 行高) ── */
342
- .datatable--compact .dt-cell { min-height: 32px; padding: 0 10px; }
343
- .datatable--compact .dt-cell--head { min-height: 32px; font-size: var(--density-font-size-xs); }
390
+ .icen-datatable--compact .icen-dt-cell { min-height: 32px; padding: 0 10px; }
391
+ .icen-datatable--compact .icen-dt-cell--head { min-height: 32px; font-size: var(--icen-density-font-size-xs); }
344
392
 
345
- /* ── 工具栏右侧操作按钮组 ── */
346
- .dt-toolbar-actions {
347
- margin-left: auto;
393
+ /* ── 工具栏行内末端操作按钮组 ── */
394
+ .icen-dt-toolbar-actions {
395
+ margin-inline-start: auto;
348
396
  display: flex;
349
397
  align-items: center;
350
398
  gap: 4px;
351
399
  }
352
- .dt-tool-btn {
400
+ .icen-dt-tool-btn {
353
401
  display: inline-flex;
354
402
  align-items: center;
355
403
  justify-content: center;
356
404
  width: 28px;
357
405
  height: 28px;
358
406
  flex-shrink: 0;
359
- border: 1px solid var(--token-line-soft);
360
- border-radius: var(--radius-sm);
407
+ border: 1px solid var(--icen-token-line-soft);
408
+ border-radius: var(--icen-radius-sm);
361
409
  background: transparent;
362
- color: var(--token-text-faint);
410
+ color: var(--icen-token-text-faint);
363
411
  cursor: pointer;
364
412
  transition: color var(--icen-tx-fast), border-color var(--icen-tx-fast), background var(--icen-tx-fast);
365
413
  }
366
- .dt-tool-btn:hover {
367
- color: var(--token-text);
368
- border-color: var(--token-accent);
369
- background: var(--token-fill-1);
414
+ .icen-dt-tool-btn:hover {
415
+ color: var(--icen-token-text);
416
+ border-color: var(--icen-token-accent);
417
+ background: var(--icen-token-fill-1);
370
418
  }
371
419
 
372
- /* ── 列宽拖拽手柄 ── */
373
- .dt-resize {
420
+ /* ── 列宽拖拽手柄(列宽由 behavior 用 getBoundingClientRect 物理坐标计算,手柄钉在列物理右缘) ── */
421
+ .icen-dt-resize {
374
422
  position: absolute;
375
423
  top: 0;
376
- right: 0;
424
+ right: 0; /* guard:allow-physical 列宽拖拽坐标系为物理(behavior 测量/写入物理像素),RTL 不变 */
377
425
  bottom: 0;
378
426
  width: 6px;
379
427
  cursor: col-resize;
@@ -381,45 +429,239 @@
381
429
  touch-action: none;
382
430
  z-index: 1;
383
431
  }
384
- .dt-resize::after {
432
+ .icen-dt-resize::after {
385
433
  content: '';
386
434
  position: absolute;
387
435
  top: 25%;
388
436
  bottom: 25%;
389
- right: 2px;
437
+ right: 2px; /* guard:allow-physical 手柄视觉与拖拽坐标系一致(物理右缘),RTL 不变 */
390
438
  width: 2px;
391
- border-radius: 1px;
439
+ border-radius: 1px; /* guard:allow-radius 微构件(指示线/手柄等图形级,不属容器圆角面) */
392
440
  background: transparent;
393
441
  transition: background var(--icen-tx-fast);
394
442
  }
395
- .dt-resize:hover::after,
396
- .dt-resize:active::after {
397
- background: var(--token-accent);
443
+ .icen-dt-resize:hover::after,
444
+ .icen-dt-resize:active::after {
445
+ background: var(--icen-token-accent);
398
446
  }
399
- /* .dt-cell--head 已在主规则 position: relative,供 resize 手柄绝对定位 */
447
+ /* .icen-dt-cell--head 已在主规则 position: relative,供 resize 手柄绝对定位 */
400
448
 
401
449
  /* ── 冻结列(左固定 sticky) ── */
402
- .datatable--frozen .dt-cell--frozen {
450
+ .icen-datatable--frozen .icen-dt-cell--frozen {
403
451
  position: sticky;
404
- z-index: var(--z-raised);
405
- background: var(--token-surface);
452
+ z-index: var(--icen-z-raised);
453
+ background: var(--icen-token-surface);
406
454
  }
407
- .datatable--frozen .dt-row--head .dt-cell--frozen {
408
- z-index: calc(var(--z-raised) + 1);
409
- background: var(--token-bg-soft);
455
+ .icen-datatable--frozen .icen-dt-row--head .icen-dt-cell--frozen {
456
+ z-index: calc(var(--icen-z-raised) + 1);
457
+ background: var(--icen-token-bg-soft);
410
458
  }
411
- .datatable--frozen .dt-row.is-selected .dt-cell--frozen {
412
- background: var(--token-accent-subtle);
459
+ .icen-datatable--frozen .icen-dt-row.is-selected .icen-dt-cell--frozen {
460
+ background: var(--icen-token-accent-subtle);
413
461
  }
414
- .datatable--frozen .dt-body .dt-row:hover .dt-cell--frozen {
415
- background: var(--token-fill-1);
462
+ .icen-datatable--frozen .icen-dt-body .icen-dt-row:hover .icen-dt-cell--frozen {
463
+ background: var(--icen-token-fill-1);
416
464
  }
417
- .datatable--frozen .dt-row.is-selected:hover .dt-cell--frozen {
418
- background: color-mix(in srgb, var(--token-accent-subtle) 82%, var(--token-fill-1));
465
+ .icen-datatable--frozen .icen-dt-row.is-selected:hover .icen-dt-cell--frozen {
466
+ background: color-mix(in srgb, var(--icen-token-accent-subtle) 82%, var(--icen-token-fill-1));
419
467
  }
420
468
 
421
469
  /* ── 行状态类(rowClassName 产出;--danger/--warning/--success 同族语义行底色) ── */
422
- .dt-row--danger { background: color-mix(in srgb, var(--token-error) 6%, transparent) !important; }
423
- .dt-row--danger:hover { background: color-mix(in srgb, var(--token-error) 10%, transparent) !important; }
424
- .dt-row--warning { background: color-mix(in srgb, var(--token-warning) 6%, transparent) !important; }
425
- .dt-row--success { background: color-mix(in srgb, var(--token-success) 6%, transparent) !important; }
470
+ .icen-dt-row--danger { background: color-mix(in srgb, var(--icen-token-error) 6%, transparent) !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */ }
471
+ .icen-dt-row--danger:hover { background: color-mix(in srgb, var(--icen-token-error) 10%, transparent) !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */ }
472
+ .icen-dt-row--warning { background: color-mix(in srgb, var(--icen-token-warning) 6%, transparent) !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */ }
473
+ .icen-dt-row--success { background: color-mix(in srgb, var(--icen-token-success) 6%, transparent) !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */ }
474
+
475
+ /* ── 多列排序:优先级徽标(1 = 主排序;与 sortable 头部视觉同族) ── */
476
+ .icen-dt-sort-badge {
477
+ display: inline-flex;
478
+ align-items: center;
479
+ justify-content: center;
480
+ min-width: 15px;
481
+ height: 15px;
482
+ padding: 0 3px;
483
+ flex-shrink: 0;
484
+ border-radius: var(--icen-radius-full);
485
+ background: var(--icen-token-accent-strong);
486
+ color: var(--icen-token-on-accent);
487
+ font-size: var(--icen-density-font-size-2xs);
488
+ font-weight: 600;
489
+ line-height: 1;
490
+ }
491
+
492
+ /* ── 列重排(reorderable:整格可拖,把手/按钮除外——behavior 判定) ── */
493
+ .icen-datatable--reorderable .icen-dt-cell--head { cursor: grab; }
494
+ .icen-datatable--reorderable .icen-dt-cell--head:active { cursor: grabbing; }
495
+ .icen-dt-cell--head.is-drag-source { opacity: 0.4; }
496
+ .icen-dt-col-ghost {
497
+ /* portal 到 body,behavior 按指针 rAF 定位 */
498
+ position: fixed;
499
+ z-index: var(--icen-z-popover);
500
+ padding: 6px 12px;
501
+ max-width: 240px;
502
+ overflow: hidden;
503
+ text-overflow: ellipsis;
504
+ white-space: nowrap;
505
+ background: var(--icen-token-card-strong);
506
+ border: 1px solid var(--icen-token-accent);
507
+ border-radius: var(--icen-radius-sm);
508
+ box-shadow: var(--icen-token-shadow-overlay);
509
+ color: var(--icen-token-text);
510
+ font-size: var(--icen-density-font-size-sm);
511
+ font-weight: 600;
512
+ pointer-events: none;
513
+ opacity: 0.92;
514
+ }
515
+ .icen-dt-col-indicator {
516
+ /* 插入指示线:贯穿表头 + 表体可视区(behavior 按 scroll 容器 rect 定位) */
517
+ position: fixed;
518
+ z-index: var(--icen-z-popover);
519
+ width: 2px;
520
+ border-radius: 1px; /* guard:allow-radius 微构件(指示线/手柄等图形级,不属容器圆角面) */
521
+ background: var(--icen-token-accent);
522
+ pointer-events: none;
523
+ }
524
+
525
+ /* ── 冻结列(右固定 sticky;偏移量由 behavior 累计列宽测量后内联 right) ── */
526
+ .icen-datatable--frozen .icen-dt-cell--frozen-right {
527
+ position: sticky;
528
+ z-index: var(--icen-z-raised);
529
+ background: var(--icen-token-surface);
530
+ }
531
+ .icen-datatable--frozen .icen-dt-row--head .icen-dt-cell--frozen-right {
532
+ z-index: calc(var(--icen-z-raised) + 1);
533
+ background: var(--icen-token-bg-soft);
534
+ }
535
+ .icen-datatable--frozen .icen-dt-row.is-selected .icen-dt-cell--frozen-right {
536
+ background: var(--icen-token-accent-subtle);
537
+ }
538
+ .icen-datatable--frozen .icen-dt-body .icen-dt-row:hover .icen-dt-cell--frozen-right {
539
+ background: var(--icen-token-fill-1);
540
+ }
541
+ .icen-datatable--frozen .icen-dt-row.is-selected:hover .icen-dt-cell--frozen-right {
542
+ background: color-mix(in srgb, var(--icen-token-accent-subtle) 82%, var(--icen-token-fill-1));
543
+ }
544
+
545
+ /* ── 行分组(组头行:表头同族底色 + 聚合 chip;点击折叠/展开) ── */
546
+ .icen-dt-row--group {
547
+ background: var(--icen-token-bg-soft);
548
+ font-weight: 600;
549
+ }
550
+ .icen-dt-row--group:hover { background: var(--icen-token-bg-soft); }
551
+ .icen-dt-cell--group {
552
+ gap: var(--icen-density-space-sm);
553
+ color: var(--icen-token-text-muted);
554
+ font-size: var(--icen-density-font-size-sm);
555
+ user-select: none;
556
+ cursor: pointer;
557
+ }
558
+ .icen-dt-group-toggle {
559
+ display: inline-flex;
560
+ align-items: center;
561
+ justify-content: center;
562
+ width: 22px;
563
+ height: 22px;
564
+ flex-shrink: 0;
565
+ border: 0;
566
+ border-radius: var(--icen-radius-sm);
567
+ background: transparent;
568
+ color: var(--icen-token-text-faint);
569
+ cursor: pointer;
570
+ transition: transform var(--icen-tx-fast), color var(--icen-tx-fast), background var(--icen-tx-fast);
571
+ }
572
+ .icen-dt-group-toggle:hover { color: var(--icen-token-text); background: var(--icen-token-fill-2); }
573
+ .icen-dt-row--group:not(.is-collapsed) .icen-dt-group-toggle {
574
+ transform: rotate(180deg);
575
+ color: var(--icen-token-accent);
576
+ }
577
+ .icen-dt-group-label { overflow: hidden; text-overflow: ellipsis; }
578
+ .icen-dt-group-count {
579
+ color: var(--icen-token-text-faint);
580
+ font-size: var(--icen-density-font-size-xs);
581
+ font-weight: 400;
582
+ font-variant-numeric: tabular-nums;
583
+ }
584
+ .icen-dt-group-aggs {
585
+ margin-inline-start: auto;
586
+ display: inline-flex;
587
+ align-items: center;
588
+ gap: 6px;
589
+ flex-shrink: 0;
590
+ }
591
+ .icen-dt-group-agg {
592
+ padding: 1px 8px;
593
+ border-radius: var(--icen-radius-full);
594
+ background: var(--icen-token-accent-subtle);
595
+ color: var(--icen-token-accent-text, var(--icen-token-accent-deep, var(--icen-token-accent)));
596
+ font-size: var(--icen-density-font-size-2xs);
597
+ font-weight: 500;
598
+ font-variant-numeric: tabular-nums;
599
+ white-space: nowrap;
600
+ }
601
+
602
+ /* ── 单元格编辑(行内 input/select 替换内容;非法值抖动不提交) ── */
603
+ .icen-dt-body .icen-dt-cell.is-editable { cursor: text; }
604
+ .icen-dt-cell.is-editing {
605
+ padding: 0 6px;
606
+ overflow: visible;
607
+ background: var(--icen-token-surface);
608
+ }
609
+ .icen-dt-editor {
610
+ flex: 1;
611
+ min-width: 0;
612
+ height: 30px;
613
+ padding: 0 8px;
614
+ font: inherit;
615
+ font-size: var(--icen-density-font-size-sm);
616
+ color: var(--icen-token-text);
617
+ background: var(--icen-token-control);
618
+ border: 1px solid var(--icen-control-focus-border, var(--icen-token-accent));
619
+ border-radius: var(--icen-radius-sm);
620
+ box-shadow: var(--icen-control-focus-shadow);
621
+ outline: none;
622
+ }
623
+ .icen-dt-editor--select {
624
+ appearance: auto;
625
+ cursor: pointer;
626
+ }
627
+ .icen-dt-editor.is-invalid {
628
+ border-color: var(--icen-token-error);
629
+ box-shadow: var(--icen-control-error-shadow);
630
+ animation: dt-editor-shake var(--icen-tx-normal);
631
+ }
632
+ .icen-datatable--compact .icen-dt-editor { height: 24px; }
633
+ @keyframes dt-editor-shake {
634
+ 0%, 100% { transform: translateX(0); }
635
+ 25% { transform: translateX(-3px); }
636
+ 55% { transform: translateX(3px); }
637
+ 80% { transform: translateX(-2px); }
638
+ }
639
+
640
+ /* ── 汇总行(表尾 sticky 一行,钉在滚动视口底、随横向滚动对齐列) ── */
641
+ .icen-dt-row--summary {
642
+ position: sticky;
643
+ bottom: 0;
644
+ z-index: var(--icen-z-raised);
645
+ background: var(--icen-token-bg-soft);
646
+ border-top: 1px solid var(--icen-token-line-soft);
647
+ border-bottom: 0;
648
+ font-weight: 600;
649
+ }
650
+ .icen-dt-row--summary[hidden] { display: none; }
651
+ .icen-dt-cell--summary {
652
+ color: var(--icen-token-text);
653
+ font-size: var(--icen-density-font-size-sm);
654
+ font-variant-numeric: tabular-nums;
655
+ }
656
+ .icen-datatable--frozen .icen-dt-row--summary .icen-dt-cell--frozen,
657
+ .icen-datatable--frozen .icen-dt-row--summary .icen-dt-cell--frozen-right {
658
+ background: var(--icen-token-bg-soft);
659
+ }
660
+
661
+ /* ── 键盘导航(roving tabindex 焦点环;与表头 focus-visible 同环) ── */
662
+ .icen-dt-body .icen-dt-cell:focus-visible {
663
+ outline: none;
664
+ box-shadow: var(--icen-ring-inset);
665
+ }
666
+
667
+ }