@icen.ai/ui 0.10.0 → 0.11.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 (355) hide show
  1. package/AGENTS.md +79 -309
  2. package/LICENSE +21 -0
  3. package/README.md +43 -54
  4. package/dist/base.css +57 -16
  5. package/dist/behaviors/accordion.mjs +1 -1
  6. package/dist/behaviors/ai-branch.mjs +1 -0
  7. package/dist/behaviors/ai-chat.d.mts +2 -2
  8. package/dist/behaviors/ai-chat.mjs +53 -10
  9. package/dist/behaviors/ai-composer.d.mts +5 -5
  10. package/dist/behaviors/ai-composer.mjs +21 -10
  11. package/dist/behaviors/ai-core.mjs +1 -0
  12. package/dist/behaviors/ai-diff.mjs +1 -0
  13. package/dist/behaviors/ai-feedback.mjs +1 -0
  14. package/dist/behaviors/ai-panel.d.mts +2 -2
  15. package/dist/behaviors/ai-panel.mjs +1 -0
  16. package/dist/behaviors/ai-provider.d.mts +1 -1
  17. package/dist/behaviors/ai-provider.mjs +1 -0
  18. package/dist/behaviors/ai-threads.mjs +1 -0
  19. package/dist/behaviors/ai-tool.d.mts +1 -1
  20. package/dist/behaviors/ai-tool.mjs +57 -24
  21. package/dist/behaviors/ai-tools.mjs +937 -28
  22. package/dist/behaviors/autocomplete.d.mts +1 -1
  23. package/dist/behaviors/autocomplete.mjs +1 -0
  24. package/dist/behaviors/back-top.mjs +1 -0
  25. package/dist/behaviors/carousel.mjs +8 -1
  26. package/dist/behaviors/cascader.mjs +14 -0
  27. package/dist/behaviors/charts.mjs +56 -20
  28. package/dist/behaviors/code-block.mjs +9 -1
  29. package/dist/behaviors/command-palette.mjs +3 -3
  30. package/dist/behaviors/context-menu.d.mts +2 -2
  31. package/dist/behaviors/context-menu.mjs +1 -0
  32. package/dist/behaviors/controls.d.mts +8 -8
  33. package/dist/behaviors/controls.mjs +37 -6
  34. package/dist/behaviors/copy.mjs +1 -0
  35. package/dist/behaviors/datatable.d.mts +3 -3
  36. package/dist/behaviors/datatable.mjs +76 -11
  37. package/dist/behaviors/date-picker.mjs +1 -0
  38. package/dist/behaviors/events.d.mts +10 -10
  39. package/dist/behaviors/events.mjs +11 -1
  40. package/dist/behaviors/form-validate.d.mts +10 -1
  41. package/dist/behaviors/form-validate.mjs +266 -4611
  42. package/dist/behaviors/i18n.d.mts +1 -0
  43. package/dist/behaviors/i18n.mjs +2 -0
  44. package/dist/behaviors/input.mjs +3 -0
  45. package/dist/behaviors/kb-access.d.mts +2 -2
  46. package/dist/behaviors/kb-access.mjs +8 -2
  47. package/dist/behaviors/kb-acl.d.mts +2 -2
  48. package/dist/behaviors/kb-acl.mjs +1 -0
  49. package/dist/behaviors/kb-answer.d.mts +2 -2
  50. package/dist/behaviors/kb-answer.mjs +56 -23
  51. package/dist/behaviors/kb-audit.d.mts +2 -2
  52. package/dist/behaviors/kb-audit.mjs +1 -0
  53. package/dist/behaviors/kb-canvas.d.mts +3 -3
  54. package/dist/behaviors/kb-canvas.mjs +1 -0
  55. package/dist/behaviors/kb-chain.d.mts +2 -2
  56. package/dist/behaviors/kb-chain.mjs +1 -0
  57. package/dist/behaviors/kb-checkpoint.d.mts +2 -2
  58. package/dist/behaviors/kb-checkpoint.mjs +1 -0
  59. package/dist/behaviors/kb-chunks.d.mts +2 -2
  60. package/dist/behaviors/kb-chunks.mjs +1 -0
  61. package/dist/behaviors/kb-citation.d.mts +2 -2
  62. package/dist/behaviors/kb-citation.mjs +20 -6
  63. package/dist/behaviors/kb-clarify.d.mts +2 -2
  64. package/dist/behaviors/kb-clarify.mjs +1 -0
  65. package/dist/behaviors/kb-conflict.d.mts +2 -2
  66. package/dist/behaviors/kb-conflict.mjs +1 -0
  67. package/dist/behaviors/kb-connector.d.mts +2 -2
  68. package/dist/behaviors/kb-connector.mjs +1 -0
  69. package/dist/behaviors/kb-core.d.mts +1 -1
  70. package/dist/behaviors/kb-core.mjs +1 -0
  71. package/dist/behaviors/kb-eval.d.mts +2 -2
  72. package/dist/behaviors/kb-eval.mjs +8 -2
  73. package/dist/behaviors/kb-explain.d.mts +2 -2
  74. package/dist/behaviors/kb-explain.mjs +13 -2
  75. package/dist/behaviors/kb-filter.d.mts +2 -2
  76. package/dist/behaviors/kb-filter.mjs +8 -2
  77. package/dist/behaviors/kb-gap.d.mts +2 -2
  78. package/dist/behaviors/kb-gap.mjs +1 -0
  79. package/dist/behaviors/kb-hittest.d.mts +2 -2
  80. package/dist/behaviors/kb-hittest.mjs +2 -1
  81. package/dist/behaviors/kb-metadata.mjs +6 -0
  82. package/dist/behaviors/kb-passage.d.mts +2 -2
  83. package/dist/behaviors/kb-passage.mjs +1 -0
  84. package/dist/behaviors/kb-pipeline.d.mts +2 -2
  85. package/dist/behaviors/kb-pipeline.mjs +1 -0
  86. package/dist/behaviors/kb-qa.mjs +1 -0
  87. package/dist/behaviors/kb-rerank.d.mts +2 -2
  88. package/dist/behaviors/kb-rerank.mjs +1 -0
  89. package/dist/behaviors/kb-retrieval.d.mts +2 -2
  90. package/dist/behaviors/kb-retrieval.mjs +18 -4
  91. package/dist/behaviors/kb-review.d.mts +2 -2
  92. package/dist/behaviors/kb-review.mjs +8 -2
  93. package/dist/behaviors/kb-sandbox.d.mts +2 -2
  94. package/dist/behaviors/kb-sandbox.mjs +7 -1
  95. package/dist/behaviors/kb-segment.d.mts +2 -2
  96. package/dist/behaviors/kb-segment.mjs +2 -1
  97. package/dist/behaviors/kb-select.mjs +8 -2
  98. package/dist/behaviors/kb-sources.d.mts +2 -2
  99. package/dist/behaviors/kb-sources.mjs +1 -0
  100. package/dist/behaviors/kb-sql.d.mts +2 -2
  101. package/dist/behaviors/kb-sql.mjs +1 -0
  102. package/dist/behaviors/kb-trace.d.mts +2 -2
  103. package/dist/behaviors/kb-trace.mjs +9 -3
  104. package/dist/behaviors/kb-visibility.d.mts +2 -2
  105. package/dist/behaviors/kb-visibility.mjs +1 -0
  106. package/dist/behaviors/kb-who-can.d.mts +2 -2
  107. package/dist/behaviors/kb-who-can.mjs +8 -2
  108. package/dist/behaviors/mentions.d.mts +1 -1
  109. package/dist/behaviors/mentions.mjs +1 -0
  110. package/dist/behaviors/modal.d.mts +1 -1
  111. package/dist/behaviors/modal.mjs +1 -0
  112. package/dist/behaviors/notification.d.mts +2 -2
  113. package/dist/behaviors/notification.mjs +14 -3
  114. package/dist/behaviors/panel.mjs +1 -0
  115. package/dist/behaviors/scroll-area.d.mts +17 -0
  116. package/dist/behaviors/scroll-area.mjs +59 -0
  117. package/dist/behaviors/select.mjs +8 -2
  118. package/dist/behaviors/slider.mjs +3 -3
  119. package/dist/behaviors/split-pane.mjs +2 -0
  120. package/dist/behaviors/suggestions.mjs +1 -0
  121. package/dist/behaviors/tabs.mjs +10 -0
  122. package/dist/behaviors/tag-input.mjs +1 -0
  123. package/dist/behaviors/theme-switcher.d.mts +2 -2
  124. package/dist/behaviors/theme-switcher.mjs +17 -2
  125. package/dist/behaviors/theme.mjs +16 -2
  126. package/dist/behaviors/toast.d.mts +2 -2
  127. package/dist/behaviors/toast.mjs +1 -0
  128. package/dist/behaviors/tree-select.mjs +14 -0
  129. package/dist/behaviors/tree.mjs +4 -4
  130. package/dist/behaviors/upload.mjs +1 -0
  131. package/dist/behaviors/url-safety.d.mts +8 -0
  132. package/dist/behaviors/url-safety.mjs +11 -0
  133. package/dist/components/accordion.d.mts +2 -0
  134. package/dist/components/ai-branch.d.mts +2 -0
  135. package/dist/components/ai-chat.css +40 -33
  136. package/dist/components/ai-chat.d.mts +2 -0
  137. package/dist/components/ai-composer.d.mts +2 -0
  138. package/dist/components/ai-context.d.mts +2 -0
  139. package/dist/components/ai-context.mjs +1 -0
  140. package/dist/components/ai-diff.css +6 -6
  141. package/dist/components/ai-diff.d.mts +2 -0
  142. package/dist/components/ai-feedback.d.mts +2 -0
  143. package/dist/components/ai-files.d.mts +2 -0
  144. package/dist/components/ai-message.d.mts +2 -0
  145. package/dist/components/ai-panel.css +12 -10
  146. package/dist/components/ai-reasoning.d.mts +2 -0
  147. package/dist/components/ai-subagent.d.mts +2 -0
  148. package/dist/components/ai-subagent.mjs +1 -0
  149. package/dist/components/ai-threads.d.mts +2 -0
  150. package/dist/components/ai-todo.d.mts +2 -0
  151. package/dist/components/ai-todo.mjs +1 -0
  152. package/dist/components/ai-tool-call.d.mts +2 -0
  153. package/dist/components/ai-tool-call.mjs +1 -0
  154. package/dist/components/ai-tool.css +16 -16
  155. package/dist/components/ai-usage.d.mts +2 -0
  156. package/dist/components/alert.d.mts +2 -0
  157. package/dist/components/autocomplete.css +12 -12
  158. package/dist/components/autocomplete.d.mts +2 -0
  159. package/dist/components/avatar.d.mts +2 -0
  160. package/dist/components/back-top.css +47 -16
  161. package/dist/components/back-top.d.mts +2 -0
  162. package/dist/components/badge.css +1 -1
  163. package/dist/components/badge.d.mts +2 -0
  164. package/dist/components/breadcrumb.css +26 -8
  165. package/dist/components/breadcrumb.d.mts +2 -0
  166. package/dist/components/btn.css +67 -62
  167. package/dist/components/btn.d.mts +2 -0
  168. package/dist/components/card.css +22 -22
  169. package/dist/components/card.d.mts +2 -0
  170. package/dist/components/carousel.d.mts +2 -0
  171. package/dist/components/cascader.css +56 -35
  172. package/dist/components/cascader.d.mts +2 -0
  173. package/dist/components/chart-area.css +46 -0
  174. package/dist/components/chart-area.d.mts +2 -0
  175. package/dist/components/chart-bar.css +66 -19
  176. package/dist/components/chart-bar.d.mts +2 -0
  177. package/dist/components/chart-calendar.d.mts +2 -0
  178. package/dist/components/chart-gauge.css +23 -3
  179. package/dist/components/chart-gauge.d.mts +2 -0
  180. package/dist/components/chart-graph.css +15 -3
  181. package/dist/components/chart-graph.d.mts +2 -0
  182. package/dist/components/chart-heatmap.css +117 -95
  183. package/dist/components/chart-heatmap.d.mts +2 -0
  184. package/dist/components/chart-line.css +54 -0
  185. package/dist/components/chart-line.d.mts +2 -0
  186. package/dist/components/chart-map.d.mts +2 -0
  187. package/dist/components/chart-pie.css +29 -0
  188. package/dist/components/chart-pie.d.mts +2 -0
  189. package/dist/components/chart-radar.css +50 -1
  190. package/dist/components/chart-radar.d.mts +2 -0
  191. package/dist/components/chart-scatter.css +39 -2
  192. package/dist/components/chart-scatter.d.mts +2 -0
  193. package/dist/components/chart-sparkline.css +20 -0
  194. package/dist/components/chart-sparkline.d.mts +2 -0
  195. package/dist/components/chart-stack.css +16 -5
  196. package/dist/components/chart-stack.d.mts +2 -0
  197. package/dist/components/charts.css +80 -35
  198. package/dist/components/charts.d.mts +2 -0
  199. package/dist/components/code-block.css +10 -8
  200. package/dist/components/code-block.d.mts +2 -0
  201. package/dist/components/command-palette.css +45 -38
  202. package/dist/components/command-palette.d.mts +2 -0
  203. package/dist/components/content.css +62 -57
  204. package/dist/components/context-menu.d.mts +2 -0
  205. package/dist/components/copy.css +10 -10
  206. package/dist/components/copy.d.mts +2 -0
  207. package/dist/components/datatable.css +72 -59
  208. package/dist/components/datatable.d.mts +2 -0
  209. package/dist/components/date-picker.css +26 -26
  210. package/dist/components/date-picker.d.mts +2 -0
  211. package/dist/components/desc.d.mts +2 -0
  212. package/dist/components/dropdown.d.mts +2 -0
  213. package/dist/components/empty.css +16 -16
  214. package/dist/components/empty.d.mts +2 -0
  215. package/dist/components/feedback.css +31 -29
  216. package/dist/components/form-validate.css +20 -6
  217. package/dist/components/form-validate.d.mts +2 -0
  218. package/dist/components/form.css +17 -14
  219. package/dist/components/form.d.mts +2 -0
  220. package/dist/components/icon.css +21 -10
  221. package/dist/components/icon.d.mts +2 -0
  222. package/dist/components/input.css +22 -22
  223. package/dist/components/input.d.mts +2 -0
  224. package/dist/components/kb-access.d.mts +2 -0
  225. package/dist/components/kb-acl.d.mts +2 -0
  226. package/dist/components/kb-agent.css +134 -55
  227. package/dist/components/kb-answer.d.mts +2 -0
  228. package/dist/components/kb-audit.d.mts +2 -0
  229. package/dist/components/kb-canvas.d.mts +2 -0
  230. package/dist/components/kb-chain.d.mts +2 -0
  231. package/dist/components/kb-checkpoint.d.mts +2 -0
  232. package/dist/components/kb-chunks.d.mts +2 -0
  233. package/dist/components/kb-citation.d.mts +2 -0
  234. package/dist/components/kb-clarify.d.mts +2 -0
  235. package/dist/components/kb-conflict.d.mts +2 -0
  236. package/dist/components/kb-connector.d.mts +2 -0
  237. package/dist/components/kb-data.css +192 -80
  238. package/dist/components/kb-eval.d.mts +2 -0
  239. package/dist/components/kb-explain.d.mts +2 -0
  240. package/dist/components/kb-filter.d.mts +2 -0
  241. package/dist/components/kb-gap.d.mts +2 -0
  242. package/dist/components/kb-ground.css +165 -73
  243. package/dist/components/kb-hittest.d.mts +2 -0
  244. package/dist/components/kb-ingest.css +308 -113
  245. package/dist/components/kb-metadata.d.mts +2 -0
  246. package/dist/components/kb-ops.css +189 -75
  247. package/dist/components/kb-passage.d.mts +2 -0
  248. package/dist/components/kb-perm.css +158 -87
  249. package/dist/components/kb-pipeline.d.mts +2 -0
  250. package/dist/components/kb-qa.d.mts +2 -0
  251. package/dist/components/kb-rerank.d.mts +2 -0
  252. package/dist/components/kb-retrieval.d.mts +2 -0
  253. package/dist/components/kb-review.d.mts +2 -0
  254. package/dist/components/kb-sandbox.d.mts +2 -0
  255. package/dist/components/kb-search.css +353 -116
  256. package/dist/components/kb-segment.d.mts +2 -0
  257. package/dist/components/kb-sources.d.mts +2 -0
  258. package/dist/components/kb-sql.d.mts +2 -0
  259. package/dist/components/kb-trace.d.mts +2 -0
  260. package/dist/components/kb-visibility.d.mts +2 -0
  261. package/dist/components/kb-who-can.d.mts +2 -0
  262. package/dist/components/kb.css +60 -36
  263. package/dist/components/kb.d.mts +2 -0
  264. package/dist/components/kbd.d.mts +2 -0
  265. package/dist/components/layout.css +10 -10
  266. package/dist/components/layout.d.mts +2 -0
  267. package/dist/components/list.d.mts +2 -0
  268. package/dist/components/material-chinese.css +10 -0
  269. package/dist/components/material-soviet.css +10 -0
  270. package/dist/components/material.css +61 -18
  271. package/dist/components/media-card.d.mts +2 -0
  272. package/dist/components/media.css +22 -27
  273. package/dist/components/mentions.css +18 -17
  274. package/dist/components/mentions.d.mts +2 -0
  275. package/dist/components/menu.css +32 -28
  276. package/dist/components/modal.css +30 -27
  277. package/dist/components/modal.d.mts +2 -0
  278. package/dist/components/nav.css +48 -44
  279. package/dist/components/nav.d.mts +2 -0
  280. package/dist/components/notification.css +31 -25
  281. package/dist/components/notification.d.mts +2 -0
  282. package/dist/components/pagination.css +15 -13
  283. package/dist/components/pagination.d.mts +2 -0
  284. package/dist/components/panel.css +19 -20
  285. package/dist/components/panel.d.mts +2 -0
  286. package/dist/components/pill.css +8 -7
  287. package/dist/components/pill.d.mts +2 -0
  288. package/dist/components/popover.css +32 -23
  289. package/dist/components/popover.d.mts +2 -0
  290. package/dist/components/progress.d.mts +2 -0
  291. package/dist/components/rating.d.mts +2 -0
  292. package/dist/components/result.d.mts +2 -0
  293. package/dist/components/scroll-area.css +84 -112
  294. package/dist/components/scroll-area.d.mts +2 -0
  295. package/dist/components/scroll-area.mjs +1 -0
  296. package/dist/components/segmented.css +47 -29
  297. package/dist/components/segmented.d.mts +2 -0
  298. package/dist/components/select.css +80 -41
  299. package/dist/components/select.d.mts +2 -0
  300. package/dist/components/sidebar.css +42 -38
  301. package/dist/components/sidebar.d.mts +2 -0
  302. package/dist/components/skeleton.d.mts +2 -0
  303. package/dist/components/slider.css +26 -22
  304. package/dist/components/slider.d.mts +2 -0
  305. package/dist/components/spinner.d.mts +2 -0
  306. package/dist/components/split-pane.css +16 -7
  307. package/dist/components/split-pane.d.mts +2 -0
  308. package/dist/components/stat.css +17 -16
  309. package/dist/components/stat.d.mts +2 -0
  310. package/dist/components/steps.css +26 -26
  311. package/dist/components/steps.d.mts +2 -0
  312. package/dist/components/switch.css +78 -39
  313. package/dist/components/switch.d.mts +2 -0
  314. package/dist/components/table.css +54 -32
  315. package/dist/components/table.d.mts +2 -0
  316. package/dist/components/tabs.css +53 -32
  317. package/dist/components/tabs.d.mts +2 -0
  318. package/dist/components/tag-input.css +12 -8
  319. package/dist/components/tag-input.d.mts +2 -0
  320. package/dist/components/tag.css +20 -12
  321. package/dist/components/tag.d.mts +2 -0
  322. package/dist/components/theme-switcher.css +7 -7
  323. package/dist/components/theme-switcher.d.mts +2 -0
  324. package/dist/components/timeline.d.mts +2 -0
  325. package/dist/components/toast.css +34 -30
  326. package/dist/components/toast.d.mts +2 -0
  327. package/dist/components/toolbar.css +19 -18
  328. package/dist/components/toolbar.d.mts +2 -0
  329. package/dist/components/tooltip.css +9 -8
  330. package/dist/components/tooltip.d.mts +2 -0
  331. package/dist/components/tree-select.css +63 -40
  332. package/dist/components/tree-select.d.mts +2 -0
  333. package/dist/components/tree.d.mts +2 -0
  334. package/dist/components/upload.css +9 -11
  335. package/dist/components/upload.d.mts +2 -0
  336. package/dist/index.d.mts +85 -84
  337. package/dist/index.mjs +14764 -14311
  338. package/dist/react.d.mts +18 -18
  339. package/dist/react.mjs +135 -36
  340. package/dist/registry.json +795 -64
  341. package/dist/tokens/colors.css +6 -0
  342. package/dist/tokens/design.css +130 -30
  343. package/dist/tokens/dtcg.json +6189 -1461
  344. package/dist/tokens/figma.variables.json +4107 -345
  345. package/dist/tokens/pixel.css +3 -0
  346. package/dist/tokens/scrollbars.css +40 -0
  347. package/dist/tokens/tokens-studio.json +5191 -271
  348. package/dist/tokens.css +304 -81
  349. package/dist/ui.css +4050 -2148
  350. package/dist/vue.d.mts +17 -17
  351. package/dist/vue.mjs +129 -34
  352. package/docs/spec/design-philosophy.md +5 -5
  353. package/docs/spec/design-primitives.md +10 -10
  354. package/docs/spec/scrollbars.md +46 -0
  355. package/package.json +16 -3
@@ -24,9 +24,9 @@
24
24
 
25
25
  /* ── 开关 ── */
26
26
  .icen-switch {
27
- --switch-w: 44px;
28
- --switch-h: 24px;
29
- --switch-thumb: 20px;
27
+ --switch-w: 38px;
28
+ --switch-h: 22px;
29
+ --switch-thumb: 18px;
30
30
  position: relative;
31
31
  display: inline-flex;
32
32
  flex-shrink: 0;
@@ -35,13 +35,13 @@
35
35
  padding: 0;
36
36
  border: none;
37
37
  border-radius: var(--icen-radius-full);
38
- background: var(--icen-token-control-hover);
38
+ background: var(--icen-token-fill-2);
39
39
  cursor: pointer;
40
40
  -webkit-tap-highlight-color: transparent;
41
41
  transition: background-color var(--icen-tx-normal);
42
42
  }
43
43
  .icen-switch[aria-checked='true'] {
44
- background: var(--icen-token-accent);
44
+ background: var(--icen-token-accent-strong);
45
45
  }
46
46
  .icen-switch:disabled,
47
47
  .icen-switch[aria-disabled='true'],
@@ -57,26 +57,30 @@
57
57
  .icen-switch-thumb {
58
58
  position: absolute;
59
59
  top: 50%;
60
- left: calc((var(--switch-h) - var(--switch-thumb)) / 2); /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下开/关方向保持物理,不镜像) */
60
+ left: calc((var(--switch-h) - var(--switch-thumb)) / 2); /* guard:allow-physical 开关是物理隐喻控件(RTL 下开/关方向保持物理,不镜像) */
61
61
  transform: translateY(-50%);
62
62
  width: var(--switch-thumb);
63
63
  height: var(--switch-thumb);
64
64
  border-radius: var(--icen-radius-full);
65
- background: var(--icen-token-on-accent);
66
- box-shadow: 0 1px 2px color-mix(in srgb, var(--icen-token-text) 15%, transparent);
67
- transition: transform var(--icen-tx-bounce);
65
+ background: var(--icen-token-surface);
66
+ border: 0;
67
+ box-shadow:
68
+ 0 0 0 .5px color-mix(in srgb, var(--icen-token-text) 16%, transparent),
69
+ 0 1px 2px color-mix(in srgb, var(--icen-design-shadow-color) 22%, transparent),
70
+ 0 2px 6px -2px color-mix(in srgb, var(--icen-design-shadow-color) 18%, transparent);
71
+ transition: transform var(--icen-duration-normal) var(--icen-ease-out);
68
72
  }
69
73
  .icen-switch[aria-checked='true'] .icen-switch-thumb {
70
74
  transform: translateY(-50%) translateX(calc(var(--switch-w) - var(--switch-h))); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
71
75
  }
72
76
 
73
77
  /* 尺寸变体 */
74
- .icen-switch--sm { --switch-w: 36px; --switch-h: 20px; --switch-thumb: 16px; }
75
- .icen-switch--lg { --switch-w: 56px; --switch-h: 28px; --switch-thumb: 24px; }
78
+ .icen-switch--sm { --switch-w: 32px; --switch-h: 18px; --switch-thumb: 14px; }
79
+ .icen-switch--lg { --switch-w: 46px; --switch-h: 26px; --switch-thumb: 22px; }
76
80
 
77
81
  /* ── 勾选框(✓ 与半选横条均 ::before 自绘) ── */
78
82
  .icen-checkbox {
79
- --checkbox-size: 16px;
83
+ --checkbox-size: 15px;
80
84
  display: inline-flex;
81
85
  align-items: center;
82
86
  justify-content: center;
@@ -86,8 +90,8 @@
86
90
  padding: 0;
87
91
  background: var(--icen-token-control);
88
92
  color: transparent;
89
- border: 1px solid var(--icen-token-outline-soft);
90
- border-radius: var(--icen-radius-sm);
93
+ border: 1px solid var(--icen-token-control-border);
94
+ border-radius: var(--icen-radius-xs);
91
95
  cursor: pointer;
92
96
  -webkit-tap-highlight-color: transparent;
93
97
  transition:
@@ -97,7 +101,7 @@
97
101
  box-shadow var(--icen-tx-fast);
98
102
  }
99
103
  .icen-checkbox:hover:not([aria-checked='true']):not([aria-checked='mixed']):not(:disabled) {
100
- border-color: color-mix(in srgb, var(--icen-token-accent) 50%, transparent);
104
+ border-color: var(--icen-token-control-border-hover);
101
105
  }
102
106
  .icen-checkbox[aria-checked='true'],
103
107
  .icen-checkbox[aria-checked='mixed'] {
@@ -107,20 +111,21 @@
107
111
  }
108
112
  .icen-checkbox::before {
109
113
  content: '';
110
- width: 40%;
111
- height: 40%;
114
+ inline-size: 11px;
115
+ block-size: 11px;
112
116
  background: currentColor;
113
117
  opacity: 0;
114
- clip-path: none;
115
- border-radius: max(0px, calc(var(--icen-radius-xs) - var(--icen-density-space-xs)));
118
+ mask: var(--icen-token-icon-check) center / contain no-repeat;
119
+ -webkit-mask: var(--icen-token-icon-check) center / contain no-repeat;
120
+ transition: opacity var(--icen-duration-fast) var(--icen-ease-out);
116
121
  }
117
122
  .icen-checkbox[aria-checked='true']::before { opacity: 1; }
118
123
  .icen-checkbox[aria-checked='mixed']::before {
119
124
  opacity: 1;
120
- width: 60%;
121
- height: 2px;
122
- clip-path: none;
123
- border-radius: var(--icen-radius-full);
125
+ inline-size: 9px;
126
+ block-size: 9px;
127
+ mask-image: var(--icen-token-icon-minus);
128
+ -webkit-mask-image: var(--icen-token-icon-minus);
124
129
  }
125
130
  .icen-checkbox:disabled,
126
131
  .icen-checkbox[aria-disabled='true'],
@@ -133,8 +138,8 @@
133
138
  box-shadow: var(--icen-ring);
134
139
  }
135
140
 
136
- .icen-checkbox--sm { --checkbox-size: 14px; }
137
- .icen-checkbox--lg { --checkbox-size: 20px; }
141
+ .icen-checkbox--sm { --checkbox-size: 13px; }
142
+ .icen-checkbox--lg { --checkbox-size: 18px; }
138
143
 
139
144
  /* ── 单选行(radio item:整行可点) ── */
140
145
  .icen-radio-group {
@@ -148,13 +153,14 @@
148
153
  align-items: center;
149
154
  gap: var(--icen-density-space-sm);
150
155
  width: 100%;
151
- padding: var(--icen-density-space-sm) var(--icen-density-space-md);
152
- font-size: var(--icen-density-font-size-md);
156
+ min-block-size: calc(var(--icen-control-height-sm) + 2px);
157
+ padding: var(--icen-density-space-xs) var(--icen-density-space-sm);
158
+ font-size: var(--icen-font-size-control);
153
159
  text-align: start;
154
160
  border: 1px solid transparent;
155
161
  background: transparent;
156
162
  color: var(--icen-token-text);
157
- border-radius: var(--icen-radius-md);
163
+ border-radius: var(--icen-control-radius);
158
164
  cursor: pointer;
159
165
  -webkit-tap-highlight-color: transparent;
160
166
  transition:
@@ -163,14 +169,14 @@
163
169
  border-color var(--icen-tx-fast);
164
170
  }
165
171
  .icen-radio-item:hover:not(.is-disabled) {
166
- background: var(--icen-token-fill-1);
172
+ background: var(--icen-token-fill-hover);
167
173
  }
168
174
  .icen-radio-item.is-selected,
169
175
  .icen-radio-item[aria-checked='true'] {
170
176
  background: var(--icen-token-accent-subtle);
171
- color: var(--icen-token-accent-text, var(--icen-token-accent-deep, var(--icen-token-accent)));
177
+ color: var(--icen-token-text);
172
178
  font-weight: 500;
173
- border-color: color-mix(in srgb, var(--icen-token-accent) 25%, transparent);
179
+ border-color: transparent;
174
180
  }
175
181
  .icen-radio-item:focus-visible {
176
182
  outline: none;
@@ -185,26 +191,26 @@
185
191
 
186
192
  .icen-radio-dot {
187
193
  position: relative;
188
- width: 16px;
189
- height: 16px;
194
+ width: 15px;
195
+ height: 15px;
190
196
  flex-shrink: 0;
191
- border: 1px solid var(--icen-token-outline-soft);
197
+ border: 1px solid var(--icen-token-control-border);
192
198
  border-radius: var(--icen-radius-full);
193
199
  background: var(--icen-token-control);
194
200
  transition: border-color var(--icen-tx-fast);
195
201
  }
196
202
  .icen-radio-item.is-selected .icen-radio-dot,
197
- .icen-radio-item[aria-checked='true'] .icen-radio-dot { border-color: var(--icen-token-accent); }
203
+ .icen-radio-item[aria-checked='true'] .icen-radio-dot { border-color: var(--icen-token-accent-strong); }
198
204
  .icen-radio-dot::after {
199
205
  content: '';
200
206
  position: absolute;
201
207
  top: 50%; left: 50%; /* guard:allow-physical 圆心居中:left 50% + translate(-50%) 任意方向下均为圆心 */
202
- width: 8px;
203
- height: 8px;
208
+ width: 7px;
209
+ height: 7px;
204
210
  border-radius: var(--icen-radius-full);
205
- background: var(--icen-token-accent);
211
+ background: var(--icen-token-accent-strong);
206
212
  transform: translate(-50%, -50%) scale(0);
207
- transition: transform var(--icen-tx-bounce);
213
+ transition: transform var(--icen-duration-fast) var(--icen-ease-out);
208
214
  }
209
215
  .icen-radio-item.is-selected .icen-radio-dot::after,
210
216
  .icen-radio-item[aria-checked='true'] .icen-radio-dot::after {
@@ -353,4 +359,37 @@
353
359
  .icen-radio-card { transition: none; }
354
360
  }
355
361
 
362
+ /* 高对比模式:开关/勾选/单选靠底色与 mask 表达状态,强制颜色会抹平——
363
+ 用系统高亮色 + forced-color-adjust:none 保住「开/关」的可辨差异。 */
364
+ @media (forced-colors: active) {
365
+ .icen-switch {
366
+ border: 1px solid CanvasText;
367
+ background: Canvas;
368
+ }
369
+ .icen-switch[aria-checked='true'] {
370
+ forced-color-adjust: none;
371
+ background: Highlight;
372
+ border-color: Highlight;
373
+ }
374
+ .icen-switch-thumb {
375
+ forced-color-adjust: none;
376
+ background: CanvasText;
377
+ border: 1px solid Canvas;
378
+ }
379
+ .icen-switch[aria-checked='true'] .icen-switch-thumb { background: HighlightText; }
380
+ .icen-checkbox[aria-checked='true'],
381
+ .icen-checkbox[aria-checked='mixed'] {
382
+ forced-color-adjust: none;
383
+ background: Highlight;
384
+ border-color: Highlight;
385
+ color: HighlightText;
386
+ }
387
+ .icen-checkbox::before { forced-color-adjust: none; background: HighlightText; }
388
+ .icen-radio-dot::after { forced-color-adjust: none; background: Highlight; }
389
+ .icen-radio-item.is-selected,
390
+ .icen-radio-item[aria-checked='true'] { outline: 1px solid Highlight; outline-offset: -1px; }
391
+ .icen-radio-card.is-selected,
392
+ .icen-radio-card[aria-checked='true'] { border-color: Highlight; }
393
+ }
394
+
356
395
  }
@@ -0,0 +1,2 @@
1
+ // kit: switch 类型面(构建产物,勿手改)
2
+ export { initSwitch } from '../behaviors/controls.mjs';
@@ -33,38 +33,37 @@
33
33
  .icen-table-wrap {
34
34
  overflow-x: auto;
35
35
  overscroll-behavior: contain;
36
- border-radius: var(--icen-radius-lg);
36
+ border-radius: var(--icen-control-radius-lg);
37
37
  }
38
38
  .icen-table-wrap--bordered {
39
- border: 1px solid var(--icen-token-line-soft);
39
+ border: 1px solid var(--icen-token-separator-soft);
40
40
  }
41
41
 
42
42
  .icen-table {
43
43
  inline-size: 100%;
44
44
  border-collapse: collapse;
45
- font-size: var(--icen-density-font-size-md);
45
+ font-size: var(--icen-font-size-control);
46
46
  font-variant-numeric: tabular-nums;
47
47
  }
48
48
  .icen-table th,
49
49
  .icen-table td {
50
- padding: var(--icen-density-space-sm) calc(var(--icen-density-space-md) + 2px);
50
+ padding: 6px 10px;
51
51
  text-align: start;
52
52
  }
53
53
  .icen-table th {
54
54
  font-weight: 600;
55
- font-size: var(--icen-density-font-size-xs);
56
- letter-spacing: 0.05em;
57
- color: var(--icen-token-text-faint);
58
- border-bottom: 1px solid var(--icen-token-line);
55
+ font-size: var(--icen-font-size-caption);
56
+ letter-spacing: var(--icen-letter-spacing-caption);
57
+ color: var(--icen-token-text-muted);
58
+ border-bottom: 1px solid var(--icen-token-separator);
59
59
  white-space: nowrap;
60
- text-transform: uppercase;
61
- background: var(--icen-token-bg-soft);
60
+ background: var(--icen-token-surface-chrome);
62
61
  position: sticky;
63
62
  top: 0;
64
63
  z-index: var(--icen-z-raised);
65
64
  }
66
65
  .icen-table td {
67
- border-bottom: 1px solid var(--icen-token-line-soft);
66
+ border-bottom: 1px solid var(--icen-token-separator-soft);
68
67
  vertical-align: middle;
69
68
  color: var(--icen-token-text);
70
69
  }
@@ -73,29 +72,29 @@
73
72
  transition: background-color var(--icen-tx-fast);
74
73
  }
75
74
  .icen-table tbody tr:hover {
76
- background: var(--icen-token-surface-strong);
75
+ background: var(--icen-token-fill-hover);
77
76
  }
78
77
  .icen-table tbody tr.icen-row-link {
79
78
  cursor: pointer;
80
79
  }
81
80
  .icen-table tbody tr.is-selected {
82
- background: var(--icen-token-accent-subtle);
81
+ background: var(--icen-token-fill-selected);
83
82
  }
84
83
  .icen-table tfoot td {
85
- border-top: 1px solid var(--icen-token-line);
84
+ border-top: 1px solid var(--icen-token-separator);
86
85
  border-bottom: 0;
87
86
  font-weight: 500;
88
- background: var(--icen-token-bg-soft);
87
+ background: var(--icen-token-surface-chrome);
89
88
  }
90
89
 
91
90
  /* 紧凑变体 */
92
91
  .icen-table--compact th,
93
92
  .icen-table--compact td {
94
- padding: var(--icen-density-space-xs) var(--icen-density-space-sm);
93
+ padding: 4px 8px;
95
94
  }
96
95
  .icen-table--dense th,
97
96
  .icen-table--dense td {
98
- padding: 4px var(--icen-density-space-xs);
97
+ padding: 2px 6px;
99
98
  font-size: var(--icen-density-font-size-sm);
100
99
  }
101
100
 
@@ -150,18 +149,20 @@
150
149
  mask: var(--icen-token-icon-arrow-down) center / contain no-repeat; opacity: 1; color: var(--icen-token-accent); }
151
150
 
152
151
  /* ── 斑马纹 ── */
153
- .icen-table--zebra tbody tr:nth-child(odd) {
154
- background: color-mix(in srgb, var(--icen-token-bg-soft) 50%, transparent);
152
+ /* :not 守卫:斑马纹与状态行同为行级背景,后写同特异性会盖掉选中/状态色
153
+ ( datatable.css 同款口径) */
154
+ .icen-table--zebra tbody tr:nth-child(odd):not(.is-selected):not(.icen-row-success, .icen-row-warning, .icen-row-error) {
155
+ background: color-mix(in srgb, var(--icen-token-fill-hover) 55%, transparent);
155
156
  }
156
- .icen-table--zebra tbody tr:hover {
157
- background: var(--icen-token-surface-strong);
157
+ .icen-table--zebra tbody tr:hover:not(.is-selected):not(.icen-row-success, .icen-row-warning, .icen-row-error) {
158
+ background: var(--icen-token-fill-hover);
158
159
  }
159
160
 
160
161
  /* ── 表格标题(caption) ── */
161
162
  .icen-table-caption {
162
163
  text-align: start;
163
- padding: var(--icen-density-space-sm) calc(var(--icen-density-space-md) + 2px);
164
- font-size: var(--icen-density-font-size-md);
164
+ padding: 8px 10px;
165
+ font-size: var(--icen-font-size-control);
165
166
  font-weight: 600;
166
167
  color: var(--icen-token-text);
167
168
  caption-side: top;
@@ -173,21 +174,30 @@
173
174
  position: sticky;
174
175
  inset-inline-start: 0;
175
176
  z-index: calc(var(--icen-z-raised) + 1);
176
- background: var(--icen-token-bg-soft);
177
- box-shadow: 2px 0 4px color-mix(in srgb, var(--icen-token-text) 5%, transparent);
177
+ background: var(--icen-token-surface-chrome);
178
+ box-shadow: 1px 0 0 var(--icen-token-separator-soft);
178
179
  }
179
180
  .icen-table--sticky-col tbody td.icen-col-fixed {
180
181
  background: var(--icen-token-surface);
181
182
  }
183
+ /* 粘滞列是不透明面:选中/斑马/状态的行级底色透不上来,需在此重铺,
184
+ 否则整行只有粘滞列一格「没被选中」,读起来像半选 */
185
+ .icen-table--sticky-col tbody tr.is-selected td.icen-col-fixed,
186
+ .icen-table--sticky-col tbody tr.is-selected th:first-child {
187
+ background: color-mix(in srgb, var(--icen-token-accent) 13%, var(--icen-token-surface));
188
+ }
189
+ .icen-table--sticky-col tbody tr.icen-row-success td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-success) 6%, var(--icen-token-surface)); }
190
+ .icen-table--sticky-col tbody tr.icen-row-warning td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-warning) 6%, var(--icen-token-surface)); }
191
+ .icen-table--sticky-col tbody tr.icen-row-error td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-error) 6%, var(--icen-token-surface)); }
182
192
  .icen-table--sticky-col tbody tr:hover td.icen-col-fixed {
183
- background: var(--icen-token-surface-strong);
193
+ background: color-mix(in srgb, var(--icen-token-fill-hover) 65%, var(--icen-token-surface));
184
194
  }
185
195
 
186
196
  /* ── 展开行 ── */
187
197
  .icen-table .icen-row-expand > td {
188
- padding: 0 var(--icen-density-space-md);
189
- background: var(--icen-token-bg-soft);
190
- border-bottom: 1px solid var(--icen-token-line-soft);
198
+ padding: 0 10px;
199
+ background: var(--icen-token-surface-chrome);
200
+ border-bottom: 1px solid var(--icen-token-separator-soft);
191
201
  font-size: var(--icen-density-font-size-sm);
192
202
  color: var(--icen-token-text-muted);
193
203
  }
@@ -195,7 +205,7 @@
195
205
  /* 展开行的内容容器(使用方可加 padding/动画) */
196
206
  .icen-row-expand-content {
197
207
  padding: var(--icen-density-space-sm) 0;
198
- animation: row-expand-in var(--icen-tx-fast) var(--icen-ease-out);
208
+ animation: row-expand-in var(--icen-duration-fast) var(--icen-ease-out);
199
209
  }
200
210
  @keyframes row-expand-in {
201
211
  from { opacity: 0; transform: translateY(-4px); }
@@ -212,9 +222,9 @@
212
222
  .icen-table tbody tr.icen-row-warning { background: color-mix(in srgb, var(--icen-token-warning) 6%, transparent); }
213
223
  .icen-table tbody tr.icen-row-error { background: color-mix(in srgb, var(--icen-token-error) 6%, transparent); }
214
224
 
215
- /* ── 粘滞表头阴影提示 ── */
225
+ /* ── 粘滞表头提示:底部 1px 分隔已足够,不再叠阴影 ── */
216
226
  .icen-table thead th {
217
- box-shadow: 0 1px 0 var(--icen-token-line);
227
+ box-shadow: none;
218
228
  }
219
229
 
220
230
  /* ── 表头分组(rowspan/colspan 样式) ── */
@@ -224,4 +234,16 @@
224
234
  .icen-row-expand-content { animation: none; }
225
235
  }
226
236
 
237
+ /* 高对比模式:选中行/语义行不能只靠底色差 */
238
+ @media (forced-colors: active) {
239
+ .icen-table tbody tr.is-selected {
240
+ background: Highlight;
241
+ color: HighlightText;
242
+ }
243
+ .icen-table tbody tr.is-selected :is(td, th) { color: HighlightText; }
244
+ .icen-table tbody tr.icen-row-success,
245
+ .icen-table tbody tr.icen-row-warning,
246
+ .icen-table tbody tr.icen-row-error { border-inline-start: 2px solid CanvasText; }
247
+ }
248
+
227
249
  }
@@ -0,0 +1,2 @@
1
+ // kit: table 类型面(构建产物,勿手改)
2
+ export { initTableSort } from '../behaviors/controls.mjs';
@@ -19,7 +19,7 @@
19
19
  display: flex;
20
20
  gap: 2px;
21
21
  flex-wrap: wrap;
22
- border-bottom: 1px solid var(--icen-token-line-soft);
22
+ border-bottom: 1px solid var(--icen-token-separator-soft);
23
23
  margin-bottom: var(--icen-density-space-lg);
24
24
  }
25
25
 
@@ -27,20 +27,24 @@
27
27
  background: none;
28
28
  border: 0;
29
29
  cursor: pointer;
30
- padding: var(--icen-density-space-sm) var(--icen-density-space-md);
31
- font-family: var(--icen-font-mono);
32
- font-size: var(--icen-density-font-size-md);
33
- letter-spacing: 0.05em;
30
+ padding: 6px var(--icen-density-space-sm);
31
+ font-family: var(--icen-font-body);
32
+ font-size: var(--icen-font-size-control);
33
+ font-weight: var(--icen-font-weight-control);
34
+ letter-spacing: 0;
34
35
  color: var(--icen-token-text-muted);
35
36
  border-bottom: 2px solid transparent;
36
37
  margin-bottom: -1px;
38
+ border-radius: var(--icen-radius-xs) var(--icen-radius-xs) 0 0;
37
39
  white-space: nowrap;
38
40
  transition:
39
41
  color var(--icen-tx-fast),
42
+ background-color var(--icen-tx-fast),
40
43
  border-color var(--icen-tx-fast);
41
44
  }
42
45
  .icen-page-tab:hover {
43
- color: var(--icen-token-accent);
46
+ color: var(--icen-token-text);
47
+ background: var(--icen-token-fill-hover);
44
48
  }
45
49
  .icen-page-tab:focus-visible {
46
50
  outline: none;
@@ -49,14 +53,15 @@
49
53
  }
50
54
  .icen-page-tab.is-active,
51
55
  .icen-page-tab[aria-selected='true'] {
52
- color: var(--icen-token-accent-text, var(--icen-token-accent-deep, var(--icen-token-accent)));
56
+ color: var(--icen-token-text);
53
57
  border-bottom-color: var(--icen-token-accent);
54
- font-weight: 700;
58
+ font-weight: 600;
55
59
  }
56
60
 
57
61
  .icen-tabs a {
58
- padding: var(--icen-density-space-sm) var(--icen-density-space-md);
59
- font-size: var(--icen-density-font-size-md);
62
+ padding: 6px var(--icen-density-space-sm);
63
+ font-size: var(--icen-font-size-control);
64
+ font-weight: var(--icen-font-weight-control);
60
65
  color: var(--icen-token-text-muted);
61
66
  border-bottom: 2px solid transparent;
62
67
  margin-bottom: -1px;
@@ -67,7 +72,7 @@
67
72
  border-color var(--icen-tx-fast);
68
73
  }
69
74
  .icen-tabs a:hover {
70
- color: var(--icen-token-accent);
75
+ color: var(--icen-token-text);
71
76
  text-decoration: none;
72
77
  }
73
78
  .icen-tabs a:focus-visible {
@@ -89,16 +94,18 @@
89
94
  }
90
95
  .icen-tabs--cards .icen-page-tab {
91
96
  padding: var(--icen-density-space-xs) var(--icen-density-space-md);
92
- border: 1px solid var(--icen-token-outline-soft);
97
+ border: 1px solid var(--icen-token-control-border);
93
98
  border-radius: var(--icen-radius-full);
94
99
  margin-bottom: 0;
100
+ color: var(--icen-token-text-muted);
101
+ background: var(--icen-token-control);
95
102
  }
96
103
  .icen-tabs--cards .icen-page-tab.is-active,
97
104
  .icen-tabs--cards .icen-page-tab[aria-selected='true'] {
98
- background: var(--icen-token-accent-strong);
99
- color: var(--icen-token-on-accent);
100
- border-color: var(--icen-token-accent-strong);
101
- font-weight: 500;
105
+ background: var(--icen-token-accent-subtle);
106
+ color: var(--icen-token-text);
107
+ border-color: color-mix(in srgb, var(--icen-token-accent) 28%, var(--icen-token-line-soft));
108
+ font-weight: 600;
102
109
  }
103
110
 
104
111
  /* 等宽变体:tab 平均占满容器 */
@@ -112,11 +119,11 @@
112
119
 
113
120
  /* 尺寸变体 */
114
121
  .icen-tabs--sm .icen-page-tab {
115
- padding: var(--icen-density-space-xs) var(--icen-density-space-sm);
122
+ padding: 4px var(--icen-density-space-sm);
116
123
  font-size: var(--icen-density-font-size-sm);
117
124
  }
118
125
  .icen-tabs--lg .icen-page-tab {
119
- padding: var(--icen-density-space-md) calc(var(--icen-density-space-md) + 4px);
126
+ padding: 8px calc(var(--icen-density-space-md) + 2px);
120
127
  font-size: var(--icen-density-font-size-lg);
121
128
  }
122
129
 
@@ -156,8 +163,8 @@
156
163
  display: inline-flex;
157
164
  align-items: center;
158
165
  justify-content: center;
159
- width: 16px;
160
- height: 16px;
166
+ width: 24px; /* WCAG 2.5.8 下限:16px 关闭钮过小(svg 视觉仍 10px) */
167
+ height: 24px;
161
168
  margin-inline-start: var(--icen-density-space-xs);
162
169
  margin-inline-end: -4px;
163
170
  padding: 0;
@@ -172,6 +179,10 @@
172
179
  color: var(--icen-token-error);
173
180
  background: var(--icen-token-error-muted);
174
181
  }
182
+ .icen-page-tab-close:focus-visible {
183
+ outline: none;
184
+ box-shadow: var(--icen-ring); /* 与 .icen-page-tab 同款系统环(缺省会落回浏览器默认蓝圈) */
185
+ }
175
186
  .icen-page-tab-close svg { width: 10px; height: 10px; }
176
187
 
177
188
  /* 分段式 tab(替代底边线,用 segmented 视觉) */
@@ -179,31 +190,35 @@
179
190
  display: inline-flex;
180
191
  border-bottom: none;
181
192
  gap: 2px;
182
- padding: 2px;
183
- background: var(--icen-token-panel);
184
- border: 1px solid var(--icen-token-outline-soft);
185
- border-radius: var(--icen-radius-md);
186
- box-shadow: var(--icen-token-shadow-inset);
193
+ padding: 3px;
194
+ background: var(--icen-token-surface-raised);
195
+ border: 1px solid var(--icen-token-control-border);
196
+ border-radius: var(--icen-control-radius-lg);
197
+ box-shadow: var(--icen-token-shadow-field);
187
198
  }
188
199
  .icen-tabs--segment .icen-page-tab {
189
200
  border-bottom: none;
190
201
  margin-bottom: 0;
191
- padding: var(--icen-density-space-xs) var(--icen-density-space-md);
192
- border-radius: var(--icen-radius-sm);
202
+ min-block-size: calc(var(--icen-control-height-sm) - 8px);
203
+ padding: 0 var(--icen-control-padding-inline-sm);
204
+ border-radius: max(0px, calc(var(--icen-control-radius-lg) - 3px));
193
205
  }
194
206
  .icen-tabs--segment .icen-page-tab.is-active,
195
207
  .icen-tabs--segment .icen-page-tab[aria-selected='true'] {
196
- background: var(--icen-token-accent-strong);
197
- color: var(--icen-token-on-accent);
198
- border-bottom-color: transparent;
199
- font-weight: 500;
208
+ background: var(--icen-token-surface);
209
+ color: var(--icen-token-text);
210
+ border: 1px solid color-mix(in srgb, var(--icen-token-line) 72%, transparent);
211
+ margin: -1px;
212
+ border-bottom-color: color-mix(in srgb, var(--icen-token-line) 72%, transparent);
213
+ font-weight: var(--icen-font-weight-control);
214
+ box-shadow: var(--icen-token-shadow-control);
200
215
  }
201
216
 
202
217
  /* 垂直 tab(侧栏式):轨道与指示条在 inline-end 侧,RTL 自动镜像到左缘 */
203
218
  .icen-tabs--vertical {
204
219
  flex-direction: column;
205
220
  border-bottom: none;
206
- border-inline-end: 1px solid var(--icen-token-line-soft);
221
+ border-inline-end: 1px solid var(--icen-token-separator-soft);
207
222
  margin-bottom: 0;
208
223
  min-inline-size: 160px;
209
224
  }
@@ -212,11 +227,17 @@
212
227
  border-inline-end: 2px solid transparent;
213
228
  margin-bottom: 0;
214
229
  margin-inline-end: -1px;
230
+ border-start-start-radius: var(--icen-radius-xs);
231
+ border-end-start-radius: var(--icen-radius-xs);
232
+ min-block-size: var(--icen-control-height-sm);
233
+ text-align: start;
234
+ justify-content: flex-start;
215
235
  }
216
236
  .icen-tabs--vertical .icen-page-tab.is-active,
217
237
  .icen-tabs--vertical .icen-page-tab[aria-selected='true'] {
218
238
  border-inline-end-color: var(--icen-token-accent);
219
239
  border-bottom-color: transparent;
240
+ background: var(--icen-token-fill-selected);
220
241
  }
221
242
 
222
243
  @media (prefers-reduced-motion: reduce) {
@@ -0,0 +1,2 @@
1
+ // kit: tabs 类型面(构建产物,勿手改)
2
+ export * from '../behaviors/tabs.mjs';
@@ -7,27 +7,27 @@
7
7
  * is-max is a capacity state, is-unavailable follows actual disabled state.
8
8
  */
9
9
  .icen-tag-input {
10
- --tag-action-size: calc(var(--icen-density-input-height-md) - var(--icen-density-space-xs) * 2 - 2px);
10
+ --tag-action-size: calc(var(--icen-control-height-md) - 10px);
11
11
  display: flex;
12
12
  flex-wrap: wrap;
13
13
  align-items: center;
14
14
  gap: var(--icen-density-space-xs);
15
15
  padding: var(--icen-density-space-xs);
16
- min-block-size: var(--icen-density-input-height-md);
16
+ min-block-size: var(--icen-control-height-md);
17
17
  background: var(--icen-token-control);
18
- border: 1px solid var(--icen-token-outline-soft);
19
- border-radius: var(--icen-radius-md);
20
- box-shadow: var(--icen-token-shadow-inset);
18
+ border: var(--icen-control-border-width) solid var(--icen-token-control-border);
19
+ border-radius: var(--icen-control-radius);
20
+ box-shadow: var(--icen-token-shadow-field);
21
21
  transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
22
22
  }
23
23
  .icen-tag-input:focus-within { border-color: var(--icen-control-focus-border); box-shadow: var(--icen-control-focus-shadow); }
24
- .icen-tag-input--sm { --tag-action-size: calc(var(--icen-density-input-height-sm) - var(--icen-density-space-xs) * 2 - 2px); min-block-size: var(--icen-density-input-height-sm); }
25
- .icen-tag-input--lg { --tag-action-size: calc(var(--icen-density-input-height-lg) - var(--icen-density-space-xs) * 2 - 2px); min-block-size: var(--icen-density-input-height-lg); }
24
+ .icen-tag-input--sm { --tag-action-size: calc(var(--icen-control-height-sm) - 8px); min-block-size: var(--icen-control-height-sm); }
25
+ .icen-tag-input--lg { --tag-action-size: calc(var(--icen-control-height-lg) - 12px); min-block-size: var(--icen-control-height-lg); }
26
26
  .icen-tag-input:is(.is-disabled,.is-unavailable,[aria-disabled='true'],[data-icen-disabled]) { background: var(--icen-token-bg-soft); cursor: not-allowed; }
27
27
  .icen-tag-input.is-unavailable > .icen-tag-chip { background: var(--icen-token-fill-2); color: var(--icen-token-text-muted); }
28
28
  .icen-tag-input.is-unavailable .icen-tag-chip-x { visibility: hidden; }
29
29
  .icen-tag-input.is-unavailable :is(.icen-tag-input-field,.icen-tag-chip-x) { cursor: not-allowed; }
30
- .icen-tag-chip { display: inline-flex; align-items: center; gap: var(--icen-density-space-xs); padding-inline-start: var(--icen-density-space-sm); border-radius: var(--icen-radius-full); background: var(--icen-token-accent-subtle); color: var(--icen-token-accent-text,var(--icen-token-text)); font-size: var(--icen-density-font-size-sm); font-weight: 500; line-height: 1.4; max-inline-size: 100%; min-inline-size: 0; animation: icen-pop-in var(--icen-tx-fast); }
30
+ .icen-tag-chip { display: inline-flex; align-items: center; gap: var(--icen-control-gap-sm); padding-inline-start: var(--icen-density-space-sm); border-radius: var(--icen-radius-full); background: var(--icen-token-accent-subtle); color: var(--icen-token-text); font-size: var(--icen-density-font-size-sm); font-weight: var(--icen-font-weight-control); line-height: 1.4; max-inline-size: 100%; min-inline-size: 0; animation: icen-pop-in var(--icen-tx-fast); }
31
31
  .icen-tag-chip-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
32
32
  .icen-tag-chip--readonly, .is-readonly > .icen-tag-chip { background: var(--icen-token-fill-2); color: var(--icen-token-text-muted); padding-inline: var(--icen-density-space-sm); min-block-size: var(--tag-action-size); }
33
33
  .icen-tag-chip-x { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; inline-size: var(--tag-action-size); block-size: var(--tag-action-size); padding: 0; border: 0; border-radius: var(--icen-radius-full); color: inherit; background: transparent; cursor: pointer; transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), opacity var(--icen-tx-fast); }
@@ -41,6 +41,10 @@
41
41
  .icen-tag-input-count { flex: 0 0 auto; padding-inline: var(--icen-density-space-xs); color: var(--icen-token-text-muted); font-size: var(--icen-density-font-size-xs); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
42
42
  .icen-tag-input-feedback { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
43
43
  .icen-tag-input-feedback.is-visible { position: static; display: block; inline-size: auto; block-size: auto; margin-block-start: var(--icen-density-space-xs); overflow: visible; clip-path: none; color: var(--icen-token-text-muted); font-size: var(--icen-density-font-size-sm); }
44
+ /* 行为侧错误(重复 tag / 超上限)可见时必挂 aria-invalid:错误文案走 error 色、
45
+ 边框同步,否则错误与中性提示同灰、字段看不出异常(form.css 同款口径) */
46
+ .icen-tag-input:has(.icen-tag-input-field[aria-invalid='true']) .icen-tag-input-feedback.is-visible { color: var(--icen-token-error); }
47
+ .icen-tag-input:has(.icen-tag-input-field[aria-invalid='true']) { border-color: var(--icen-token-error); }
44
48
  @media (hover: hover) and (pointer: fine) {
45
49
  .icen-tag-input:not(.is-unavailable):hover { border-color: var(--icen-hover-border); }
46
50
  .icen-tag-chip-x { opacity: 0; }