@icen.ai/ui 0.11.0 → 0.11.2

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 (94) hide show
  1. package/README.md +2 -2
  2. package/dist/base.css +11 -6
  3. package/dist/behaviors/ai-branch.mjs +13 -0
  4. package/dist/behaviors/ai-chat.mjs +13 -0
  5. package/dist/behaviors/ai-composer.mjs +13 -0
  6. package/dist/behaviors/ai-core.mjs +13 -0
  7. package/dist/behaviors/ai-diff.mjs +13 -0
  8. package/dist/behaviors/ai-feedback.mjs +13 -0
  9. package/dist/behaviors/ai-panel.mjs +13 -0
  10. package/dist/behaviors/ai-provider.mjs +13 -0
  11. package/dist/behaviors/ai-threads.mjs +13 -0
  12. package/dist/behaviors/ai-tool.mjs +242 -0
  13. package/dist/behaviors/ai-tools.mjs +242 -0
  14. package/dist/behaviors/autocomplete.mjs +13 -0
  15. package/dist/behaviors/back-top.mjs +13 -0
  16. package/dist/behaviors/carousel.mjs +13 -0
  17. package/dist/behaviors/cascader.mjs +13 -0
  18. package/dist/behaviors/charts.d.mts +12 -1
  19. package/dist/behaviors/charts.mjs +242 -0
  20. package/dist/behaviors/code-block.mjs +13 -0
  21. package/dist/behaviors/context-menu.mjs +13 -0
  22. package/dist/behaviors/controls.mjs +13 -0
  23. package/dist/behaviors/copy.mjs +13 -0
  24. package/dist/behaviors/datatable.mjs +13 -0
  25. package/dist/behaviors/date-picker.mjs +13 -0
  26. package/dist/behaviors/form-validate.mjs +13 -0
  27. package/dist/behaviors/i18n.d.mts +13 -0
  28. package/dist/behaviors/i18n.mjs +26 -0
  29. package/dist/behaviors/input.mjs +13 -0
  30. package/dist/behaviors/kb-access.mjs +13 -0
  31. package/dist/behaviors/kb-acl.mjs +13 -0
  32. package/dist/behaviors/kb-answer.mjs +242 -0
  33. package/dist/behaviors/kb-audit.mjs +13 -0
  34. package/dist/behaviors/kb-canvas.mjs +13 -0
  35. package/dist/behaviors/kb-chain.mjs +13 -0
  36. package/dist/behaviors/kb-checkpoint.mjs +13 -0
  37. package/dist/behaviors/kb-chunks.mjs +13 -0
  38. package/dist/behaviors/kb-citation.mjs +13 -0
  39. package/dist/behaviors/kb-clarify.mjs +13 -0
  40. package/dist/behaviors/kb-conflict.mjs +13 -0
  41. package/dist/behaviors/kb-connector.mjs +13 -0
  42. package/dist/behaviors/kb-core.mjs +13 -0
  43. package/dist/behaviors/kb-eval.mjs +13 -0
  44. package/dist/behaviors/kb-explain.mjs +13 -0
  45. package/dist/behaviors/kb-filter.mjs +13 -0
  46. package/dist/behaviors/kb-gap.mjs +13 -0
  47. package/dist/behaviors/kb-hittest.mjs +13 -0
  48. package/dist/behaviors/kb-metadata.mjs +13 -0
  49. package/dist/behaviors/kb-passage.mjs +13 -0
  50. package/dist/behaviors/kb-pipeline.mjs +13 -0
  51. package/dist/behaviors/kb-qa.mjs +13 -0
  52. package/dist/behaviors/kb-rerank.mjs +13 -0
  53. package/dist/behaviors/kb-retrieval.mjs +13 -0
  54. package/dist/behaviors/kb-review.mjs +13 -0
  55. package/dist/behaviors/kb-sandbox.mjs +13 -0
  56. package/dist/behaviors/kb-segment.mjs +13 -0
  57. package/dist/behaviors/kb-select.mjs +13 -0
  58. package/dist/behaviors/kb-sources.mjs +13 -0
  59. package/dist/behaviors/kb-sql.mjs +13 -0
  60. package/dist/behaviors/kb-trace.mjs +13 -0
  61. package/dist/behaviors/kb-visibility.mjs +13 -0
  62. package/dist/behaviors/kb-who-can.mjs +13 -0
  63. package/dist/behaviors/mentions.mjs +13 -0
  64. package/dist/behaviors/modal.mjs +13 -0
  65. package/dist/behaviors/motion.d.mts +16 -0
  66. package/dist/behaviors/motion.mjs +39 -0
  67. package/dist/behaviors/notification.mjs +13 -0
  68. package/dist/behaviors/panel.mjs +13 -0
  69. package/dist/behaviors/select.mjs +13 -0
  70. package/dist/behaviors/suggestions.mjs +13 -0
  71. package/dist/behaviors/tag-input.mjs +13 -0
  72. package/dist/behaviors/theme-switcher.mjs +13 -0
  73. package/dist/behaviors/toast.mjs +13 -0
  74. package/dist/behaviors/tree-select.mjs +13 -0
  75. package/dist/behaviors/upload.mjs +13 -0
  76. package/dist/components/charts.css +29 -0
  77. package/dist/components/material.css +1 -1
  78. package/dist/index.d.mts +1 -1
  79. package/dist/index.mjs +257 -1
  80. package/dist/react.mjs +242 -0
  81. package/dist/registry.json +3 -1
  82. package/dist/tokens/design.css +15 -9
  83. package/dist/tokens/dtcg.json +3594 -738
  84. package/dist/tokens/figma.variables.json +1705 -157
  85. package/dist/tokens/motion.css +51 -0
  86. package/dist/tokens/pixel.css +7 -0
  87. package/dist/tokens/tokens-studio.json +3007 -679
  88. package/dist/tokens/typography.css +33 -0
  89. package/dist/tokens.css +107 -10
  90. package/dist/ui.css +147 -16
  91. package/dist/vue.mjs +242 -0
  92. package/docs/spec/charts-scale-a11y.md +115 -0
  93. package/docs/spec/motion-typography.md +105 -0
  94. package/package.json +2 -1
@@ -28,6 +28,33 @@
28
28
  --icen-line-height-body: 1.7;
29
29
  /* 独家定义(style-profiles.css 的 :root 不再重复;profile 差异化在各 .style-* 块覆盖) */
30
30
  --icen-line-height-heading: 1.2;
31
+
32
+ /* ── 内容排版尺度(模块比例 1.250 大三度,clamp 流体插值) ──
33
+ 面向内容/文档排版(标题、正文、长文);控件字号仍由 --icen-density-font-size-* 驱动,
34
+ 两套尺度解耦:密度档只压缩控件,不挤压阅读。DTCG 无法表示 clamp() → 明示跳过。 */
35
+ --icen-type-ratio: 1.25;
36
+ --icen-type-xs: clamp(.6875rem, .66rem + .12vw, .75rem);
37
+ --icen-type-sm: clamp(.7813rem, .74rem + .18vw, .9rem);
38
+ --icen-type-md: clamp(.875rem, .82rem + .24vw, 1rem);
39
+ --icen-type-lg: clamp(1rem, .92rem + .36vw, 1.25rem);
40
+ --icen-type-xl: clamp(1.25rem, 1.1rem + .66vw, 1.5625rem);
41
+ --icen-type-2xl: clamp(1.5625rem, 1.32rem + 1.05vw, 1.9531rem);
42
+ --icen-type-3xl: clamp(1.9531rem, 1.56rem + 1.7vw, 2.4414rem);
43
+
44
+ /* ── 行高 / 字距 / 字重尺度(角色别名 --icen-line-height-body 等保留;本组供新组件与内容区) ── */
45
+ --icen-leading-tight: 1.3; /* 大字号标题 */
46
+ --icen-leading-base: 1.6; /* 正文:拉丁与 CJK 混排的安全下限 */
47
+ --icen-leading-loose: 1.8; /* 长文/文档页 */
48
+ --icen-tracking-tight: -.02em; /* 大号拉丁标题收紧;CJK 不用(CJK 字距一律 0) */
49
+ --icen-tracking-base: 0;
50
+ --icen-tracking-wide: .04em; /* 眉标/小型大写 */
51
+ --icen-weight-regular: 400;
52
+ --icen-weight-medium: 500;
53
+ --icen-weight-semibold: 600;
54
+ --icen-weight-bold: 700;
55
+
56
+ /* ── 数据区 OpenType 特性(.icen-numeric / .icen-font-math 之外的增量入口) ── */
57
+ --icen-feature-data: "tnum" 1, "lnum" 1;
31
58
  }
32
59
 
33
60
  /* ── 全局排版 ── */
@@ -51,4 +78,10 @@ h1, h2, h3, h4, h5, h6 {
51
78
  font-variant-numeric: lining-nums tabular-nums;
52
79
  }
53
80
 
81
+ /* ── CJK 标点挤压:渐进增强(text-spacing-trim,Chrome 123+)。
82
+ 不支持时保持浏览器默认——不 polyfill,不猜不静默,此处是有意声明的可降级增强。 ── */
83
+ @supports (text-spacing-trim: trim-start) {
84
+ body { text-spacing-trim: trim-start; }
85
+ }
86
+
54
87
  }
package/dist/tokens.css CHANGED
@@ -521,6 +521,33 @@
521
521
  --icen-line-height-body: 1.7;
522
522
  /* 独家定义(style-profiles.css 的 :root 不再重复;profile 差异化在各 .style-* 块覆盖) */
523
523
  --icen-line-height-heading: 1.2;
524
+
525
+ /* ── 内容排版尺度(模块比例 1.250 大三度,clamp 流体插值) ──
526
+ 面向内容/文档排版(标题、正文、长文);控件字号仍由 --icen-density-font-size-* 驱动,
527
+ 两套尺度解耦:密度档只压缩控件,不挤压阅读。DTCG 无法表示 clamp() → 明示跳过。 */
528
+ --icen-type-ratio: 1.25;
529
+ --icen-type-xs: clamp(.6875rem, .66rem + .12vw, .75rem);
530
+ --icen-type-sm: clamp(.7813rem, .74rem + .18vw, .9rem);
531
+ --icen-type-md: clamp(.875rem, .82rem + .24vw, 1rem);
532
+ --icen-type-lg: clamp(1rem, .92rem + .36vw, 1.25rem);
533
+ --icen-type-xl: clamp(1.25rem, 1.1rem + .66vw, 1.5625rem);
534
+ --icen-type-2xl: clamp(1.5625rem, 1.32rem + 1.05vw, 1.9531rem);
535
+ --icen-type-3xl: clamp(1.9531rem, 1.56rem + 1.7vw, 2.4414rem);
536
+
537
+ /* ── 行高 / 字距 / 字重尺度(角色别名 --icen-line-height-body 等保留;本组供新组件与内容区) ── */
538
+ --icen-leading-tight: 1.3; /* 大字号标题 */
539
+ --icen-leading-base: 1.6; /* 正文:拉丁与 CJK 混排的安全下限 */
540
+ --icen-leading-loose: 1.8; /* 长文/文档页 */
541
+ --icen-tracking-tight: -.02em; /* 大号拉丁标题收紧;CJK 不用(CJK 字距一律 0) */
542
+ --icen-tracking-base: 0;
543
+ --icen-tracking-wide: .04em; /* 眉标/小型大写 */
544
+ --icen-weight-regular: 400;
545
+ --icen-weight-medium: 500;
546
+ --icen-weight-semibold: 600;
547
+ --icen-weight-bold: 700;
548
+
549
+ /* ── 数据区 OpenType 特性(.icen-numeric / .icen-font-math 之外的增量入口) ── */
550
+ --icen-feature-data: "tnum" 1, "lnum" 1;
524
551
  }
525
552
 
526
553
  /* ── 全局排版 ── */
@@ -544,6 +571,63 @@ h1, h2, h3, h4, h5, h6 {
544
571
  font-variant-numeric: lining-nums tabular-nums;
545
572
  }
546
573
 
574
+ /* ── CJK 标点挤压:渐进增强(text-spacing-trim,Chrome 123+)。
575
+ 不支持时保持浏览器默认——不 polyfill,不猜不静默,此处是有意声明的可降级增强。 ── */
576
+ @supports (text-spacing-trim: trim-start) {
577
+ body { text-spacing-trim: trim-start; }
578
+ }
579
+
580
+
581
+ /* ── tokens/motion.css ── */
582
+ /*
583
+ * @icen.ai/ui — Motion Tokens(动效令牌层)
584
+ * 时长阶梯 / 缓动集 / 位移与缩放幅度 / 编排间隔。组件只消费令牌,不写死时长与曲线。
585
+ *
586
+ * 消费路径:
587
+ * 组件读语义别名 --icen-duration-* / --icen-ease-*(design.css 映射到本层 × --icen-design-motion);
588
+ * 新组件可直接读 --icen-motion-*(绝对基值,不经缩放)。
589
+ * 降级链:prefers-reduced-motion 或 <html data-icen-motion="reduce"> → base.css 把
590
+ * --icen-design-motion 归零(过渡瞬时完成,状态反馈保留)+ 循环动画单次瞬时 + 平滑滚动关闭;
591
+ * data-icen-motion="full" 可强制恢复(演示机 / 用户显式选择)。
592
+ * 原语联动:pixel 原语把本层缓动全部改写为 steps(1, end)(点阵逐帧美学)。
593
+ * DTCG:duration / cubicBezier / dimension / number 各族经 scripts/dtcg.mjs 导出;
594
+ * linear() / steps() / clamp() 超经典版规范,明示跳过(记录在 dtcg.json 的 ai.icen.skipped)。
595
+ */
596
+ :root {
597
+ /* ── 时长阶梯(基值;语义别名经 --icen-design-motion 缩放) ── */
598
+ --icen-motion-duration-instant: 0ms; /* 即时:无动画状态切换(像素原语全量) */
599
+ --icen-motion-duration-fast: 110ms; /* 微反馈:hover / press / 焦点环 */
600
+ --icen-motion-duration-base: 180ms; /* 常规:展开收起、淡入淡出、勾选 */
601
+ --icen-motion-duration-slow: 260ms; /* 浮层进出、面板滑入、modal */
602
+ --icen-motion-duration-deliberate: 420ms; /* 页面级转场、强调入场(克制使用) */
603
+
604
+ /* ── 缓动集 ── */
605
+ --icen-motion-ease-standard: cubic-bezier(.45, 0, .25, 1); /* 持续类状态变化 */
606
+ --icen-motion-ease-enter: cubic-bezier(.16, 1, .3, 1); /* 入场:快出慢归 */
607
+ --icen-motion-ease-exit: cubic-bezier(.4, 0, 1, 1); /* 离场:快进加速 */
608
+ --icen-motion-ease-emphasized: cubic-bezier(.22, .8, .24, 1); /* 强调:长减速弧 */
609
+ --icen-motion-ease-spring: cubic-bezier(.22, .8, .24, 1); /* 弹簧近似;支持 linear() 时由下方覆盖 */
610
+
611
+ /* ── 幅度(位移/缩放令牌:编排一致的物理量) ── */
612
+ --icen-motion-shift-sm: 2px; /* 行内微移(列表项 hover) */
613
+ --icen-motion-shift-md: 6px; /* 浮层/气泡入场位移 */
614
+ --icen-motion-shift-lg: 12px; /* 抽屉/面板入场位移 */
615
+ --icen-motion-scale-enter: .96; /* 弹层入场起始缩放 */
616
+ --icen-motion-scale-press: .985; /* 按下形变 */
617
+
618
+ /* ── 编排(stagger:列表/卡片瀑布入场) ── */
619
+ --icen-motion-stagger-step: 24ms; /* 相邻项延迟步长 */
620
+ --icen-motion-stagger-count: 5; /* 最多级联项数(超出同拍,避免长尾等待) */
621
+ }
622
+
623
+ /* damped spring 近似(过冲 ≈8%):linear() 停点语法(Chrome 113+ / Safari 17.2+ / FF 112+)。
624
+ 不支持时保持上方 emphasized 回退——不猜不静默之外,这里是有意声明的可降级增强。 */
625
+ @supports (transition-timing-function: linear(0, 1)) {
626
+ :root {
627
+ --icen-motion-ease-spring: linear(0, .42, .78, 1, 1.08, .96, 1.02, 1);
628
+ }
629
+ }
630
+
547
631
 
548
632
  /* ── tokens/design.css ── */
549
633
  /* 现代 primitive: geometry, type, rhythm and lighting. Color palettes live in themes.json.
@@ -595,15 +679,18 @@ h1, h2, h3, h4, h5, h6 {
595
679
  --icen-letter-spacing-caption: .01em;
596
680
 
597
681
  /* Motion: one-shot state changes are short; spatial entrances use the enter
598
- * curve. No bouncy physics for ordinary controls. */
599
- --icen-duration-fast: calc(110ms * var(--icen-design-motion));
600
- --icen-duration-normal: calc(180ms * var(--icen-design-motion));
601
- --icen-duration-slow: calc(260ms * var(--icen-design-motion));
602
- --icen-ease-out: cubic-bezier(.22, .8, .24, 1);
682
+ * curve. No bouncy physics for ordinary controls.
683
+ * 语义别名 → tokens/motion.css 基值 × --icen-design-motion(reduced-motion / pixel 原语归零)。 */
684
+ --icen-duration-instant: calc(var(--icen-motion-duration-instant) * var(--icen-design-motion));
685
+ --icen-duration-fast: calc(var(--icen-motion-duration-fast) * var(--icen-design-motion));
686
+ --icen-duration-normal: calc(var(--icen-motion-duration-base) * var(--icen-design-motion));
687
+ --icen-duration-slow: calc(var(--icen-motion-duration-slow) * var(--icen-design-motion));
688
+ --icen-duration-deliberate: calc(var(--icen-motion-duration-deliberate) * var(--icen-design-motion));
689
+ --icen-ease-out: var(--icen-motion-ease-emphasized);
603
690
  --icen-ease-in: cubic-bezier(.5, 0, .8, .2);
604
- --icen-ease-in-out: cubic-bezier(.45, 0, .25, 1);
605
- --icen-ease-enter: cubic-bezier(.16, 1, .3, 1);
606
- --icen-ease-exit: cubic-bezier(.4, 0, 1, 1);
691
+ --icen-ease-in-out: var(--icen-motion-ease-standard);
692
+ --icen-ease-enter: var(--icen-motion-ease-enter);
693
+ --icen-ease-exit: var(--icen-motion-ease-exit);
607
694
  --icen-ease-bounce: var(--icen-ease-out);
608
695
  --icen-hover-border: var(--icen-token-line);
609
696
  --icen-hover-border-strong: var(--icen-token-line-strong);
@@ -749,9 +836,12 @@ h1, h2, h3, h4, h5, h6 {
749
836
  --icen-density-item-height: max(44px, calc(var(--icen-design-control-height) + var(--icen-design-density-offset) - 6px));
750
837
  }
751
838
  }
839
+ /* reduced-motion:本原语时长乘数归零(唯一的变量开关点;base.css 负责动画/滚动压制)。
840
+ 手动覆盖:data-icen-motion="full" 在系统降级时恢复;"reduce" 无需系统设置即降级。 */
752
841
  @media (prefers-reduced-motion: reduce) {
753
- :root { --icen-design-motion: 0; }
842
+ :root:not([data-icen-motion="full"]) { --icen-design-motion: 0; }
754
843
  }
844
+ :root[data-icen-motion="reduce"] { --icen-design-motion: 0; }
755
845
 
756
846
 
757
847
  /* ── tokens/chinese.css ── */
@@ -890,6 +980,13 @@ h1, h2, h3, h4, h5, h6 {
890
980
  /* shadow-inset 被本原语置 none,base.css 合成的 error 版会变成非法的「none, …」
891
981
  列表 → 整条 box-shadow 失效:像素原语自持一份硬边错误光环 */
892
982
  --icen-control-error-shadow: 0 0 0 2px var(--icen-token-error);
983
+ /* 点阵逐帧美学:动效令牌层全部改写为 steps(时长已由 --icen-design-motion: 0 归零,
984
+ 缓动改写面向直接消费 --icen-motion-ease-* 的新组件,双保险) */
985
+ --icen-motion-ease-standard: steps(1, end);
986
+ --icen-motion-ease-enter: steps(1, end);
987
+ --icen-motion-ease-exit: steps(1, end);
988
+ --icen-motion-ease-emphasized: steps(1, end);
989
+ --icen-motion-ease-spring: steps(1, end);
893
990
  --icen-ease-out: steps(1, end);
894
991
  --icen-ease-bounce: steps(1, end);
895
992
  }
@@ -1136,7 +1233,7 @@ h1, h2, h3, h4, h5, h6 {
1136
1233
  /* 现代: small controls have a legible edge and a quiet, tactile surface. Keep
1137
1234
  * these optical refinements local to the default primitive; other primitives
1138
1235
  * supply their own surface physics without fighting a global component rule. */
1139
- :root:where(:not([data-icen-style]),[data-icen-style="modern"]) .icen-btn:not(.icen-btn-ghost):not(.icen-btn-link) {
1236
+ :root:where(:not([data-icen-style]),[data-icen-style="modern"]) .icen-btn:where(:not(.icen-btn-ghost):not(.icen-btn-link)) {
1140
1237
  background-image: linear-gradient(
1141
1238
  to bottom,
1142
1239
  color-mix(in srgb, var(--icen-token-top-highlight) 32%, transparent),
package/dist/ui.css CHANGED
@@ -521,6 +521,33 @@
521
521
  --icen-line-height-body: 1.7;
522
522
  /* 独家定义(style-profiles.css 的 :root 不再重复;profile 差异化在各 .style-* 块覆盖) */
523
523
  --icen-line-height-heading: 1.2;
524
+
525
+ /* ── 内容排版尺度(模块比例 1.250 大三度,clamp 流体插值) ──
526
+ 面向内容/文档排版(标题、正文、长文);控件字号仍由 --icen-density-font-size-* 驱动,
527
+ 两套尺度解耦:密度档只压缩控件,不挤压阅读。DTCG 无法表示 clamp() → 明示跳过。 */
528
+ --icen-type-ratio: 1.25;
529
+ --icen-type-xs: clamp(.6875rem, .66rem + .12vw, .75rem);
530
+ --icen-type-sm: clamp(.7813rem, .74rem + .18vw, .9rem);
531
+ --icen-type-md: clamp(.875rem, .82rem + .24vw, 1rem);
532
+ --icen-type-lg: clamp(1rem, .92rem + .36vw, 1.25rem);
533
+ --icen-type-xl: clamp(1.25rem, 1.1rem + .66vw, 1.5625rem);
534
+ --icen-type-2xl: clamp(1.5625rem, 1.32rem + 1.05vw, 1.9531rem);
535
+ --icen-type-3xl: clamp(1.9531rem, 1.56rem + 1.7vw, 2.4414rem);
536
+
537
+ /* ── 行高 / 字距 / 字重尺度(角色别名 --icen-line-height-body 等保留;本组供新组件与内容区) ── */
538
+ --icen-leading-tight: 1.3; /* 大字号标题 */
539
+ --icen-leading-base: 1.6; /* 正文:拉丁与 CJK 混排的安全下限 */
540
+ --icen-leading-loose: 1.8; /* 长文/文档页 */
541
+ --icen-tracking-tight: -.02em; /* 大号拉丁标题收紧;CJK 不用(CJK 字距一律 0) */
542
+ --icen-tracking-base: 0;
543
+ --icen-tracking-wide: .04em; /* 眉标/小型大写 */
544
+ --icen-weight-regular: 400;
545
+ --icen-weight-medium: 500;
546
+ --icen-weight-semibold: 600;
547
+ --icen-weight-bold: 700;
548
+
549
+ /* ── 数据区 OpenType 特性(.icen-numeric / .icen-font-math 之外的增量入口) ── */
550
+ --icen-feature-data: "tnum" 1, "lnum" 1;
524
551
  }
525
552
 
526
553
  /* ── 全局排版 ── */
@@ -544,6 +571,63 @@ h1, h2, h3, h4, h5, h6 {
544
571
  font-variant-numeric: lining-nums tabular-nums;
545
572
  }
546
573
 
574
+ /* ── CJK 标点挤压:渐进增强(text-spacing-trim,Chrome 123+)。
575
+ 不支持时保持浏览器默认——不 polyfill,不猜不静默,此处是有意声明的可降级增强。 ── */
576
+ @supports (text-spacing-trim: trim-start) {
577
+ body { text-spacing-trim: trim-start; }
578
+ }
579
+
580
+
581
+ /* ── tokens/motion.css ── */
582
+ /*
583
+ * @icen.ai/ui — Motion Tokens(动效令牌层)
584
+ * 时长阶梯 / 缓动集 / 位移与缩放幅度 / 编排间隔。组件只消费令牌,不写死时长与曲线。
585
+ *
586
+ * 消费路径:
587
+ * 组件读语义别名 --icen-duration-* / --icen-ease-*(design.css 映射到本层 × --icen-design-motion);
588
+ * 新组件可直接读 --icen-motion-*(绝对基值,不经缩放)。
589
+ * 降级链:prefers-reduced-motion 或 <html data-icen-motion="reduce"> → base.css 把
590
+ * --icen-design-motion 归零(过渡瞬时完成,状态反馈保留)+ 循环动画单次瞬时 + 平滑滚动关闭;
591
+ * data-icen-motion="full" 可强制恢复(演示机 / 用户显式选择)。
592
+ * 原语联动:pixel 原语把本层缓动全部改写为 steps(1, end)(点阵逐帧美学)。
593
+ * DTCG:duration / cubicBezier / dimension / number 各族经 scripts/dtcg.mjs 导出;
594
+ * linear() / steps() / clamp() 超经典版规范,明示跳过(记录在 dtcg.json 的 ai.icen.skipped)。
595
+ */
596
+ :root {
597
+ /* ── 时长阶梯(基值;语义别名经 --icen-design-motion 缩放) ── */
598
+ --icen-motion-duration-instant: 0ms; /* 即时:无动画状态切换(像素原语全量) */
599
+ --icen-motion-duration-fast: 110ms; /* 微反馈:hover / press / 焦点环 */
600
+ --icen-motion-duration-base: 180ms; /* 常规:展开收起、淡入淡出、勾选 */
601
+ --icen-motion-duration-slow: 260ms; /* 浮层进出、面板滑入、modal */
602
+ --icen-motion-duration-deliberate: 420ms; /* 页面级转场、强调入场(克制使用) */
603
+
604
+ /* ── 缓动集 ── */
605
+ --icen-motion-ease-standard: cubic-bezier(.45, 0, .25, 1); /* 持续类状态变化 */
606
+ --icen-motion-ease-enter: cubic-bezier(.16, 1, .3, 1); /* 入场:快出慢归 */
607
+ --icen-motion-ease-exit: cubic-bezier(.4, 0, 1, 1); /* 离场:快进加速 */
608
+ --icen-motion-ease-emphasized: cubic-bezier(.22, .8, .24, 1); /* 强调:长减速弧 */
609
+ --icen-motion-ease-spring: cubic-bezier(.22, .8, .24, 1); /* 弹簧近似;支持 linear() 时由下方覆盖 */
610
+
611
+ /* ── 幅度(位移/缩放令牌:编排一致的物理量) ── */
612
+ --icen-motion-shift-sm: 2px; /* 行内微移(列表项 hover) */
613
+ --icen-motion-shift-md: 6px; /* 浮层/气泡入场位移 */
614
+ --icen-motion-shift-lg: 12px; /* 抽屉/面板入场位移 */
615
+ --icen-motion-scale-enter: .96; /* 弹层入场起始缩放 */
616
+ --icen-motion-scale-press: .985; /* 按下形变 */
617
+
618
+ /* ── 编排(stagger:列表/卡片瀑布入场) ── */
619
+ --icen-motion-stagger-step: 24ms; /* 相邻项延迟步长 */
620
+ --icen-motion-stagger-count: 5; /* 最多级联项数(超出同拍,避免长尾等待) */
621
+ }
622
+
623
+ /* damped spring 近似(过冲 ≈8%):linear() 停点语法(Chrome 113+ / Safari 17.2+ / FF 112+)。
624
+ 不支持时保持上方 emphasized 回退——不猜不静默之外,这里是有意声明的可降级增强。 */
625
+ @supports (transition-timing-function: linear(0, 1)) {
626
+ :root {
627
+ --icen-motion-ease-spring: linear(0, .42, .78, 1, 1.08, .96, 1.02, 1);
628
+ }
629
+ }
630
+
547
631
 
548
632
  /* ── tokens/design.css ── */
549
633
  /* 现代 primitive: geometry, type, rhythm and lighting. Color palettes live in themes.json.
@@ -595,15 +679,18 @@ h1, h2, h3, h4, h5, h6 {
595
679
  --icen-letter-spacing-caption: .01em;
596
680
 
597
681
  /* Motion: one-shot state changes are short; spatial entrances use the enter
598
- * curve. No bouncy physics for ordinary controls. */
599
- --icen-duration-fast: calc(110ms * var(--icen-design-motion));
600
- --icen-duration-normal: calc(180ms * var(--icen-design-motion));
601
- --icen-duration-slow: calc(260ms * var(--icen-design-motion));
602
- --icen-ease-out: cubic-bezier(.22, .8, .24, 1);
682
+ * curve. No bouncy physics for ordinary controls.
683
+ * 语义别名 → tokens/motion.css 基值 × --icen-design-motion(reduced-motion / pixel 原语归零)。 */
684
+ --icen-duration-instant: calc(var(--icen-motion-duration-instant) * var(--icen-design-motion));
685
+ --icen-duration-fast: calc(var(--icen-motion-duration-fast) * var(--icen-design-motion));
686
+ --icen-duration-normal: calc(var(--icen-motion-duration-base) * var(--icen-design-motion));
687
+ --icen-duration-slow: calc(var(--icen-motion-duration-slow) * var(--icen-design-motion));
688
+ --icen-duration-deliberate: calc(var(--icen-motion-duration-deliberate) * var(--icen-design-motion));
689
+ --icen-ease-out: var(--icen-motion-ease-emphasized);
603
690
  --icen-ease-in: cubic-bezier(.5, 0, .8, .2);
604
- --icen-ease-in-out: cubic-bezier(.45, 0, .25, 1);
605
- --icen-ease-enter: cubic-bezier(.16, 1, .3, 1);
606
- --icen-ease-exit: cubic-bezier(.4, 0, 1, 1);
691
+ --icen-ease-in-out: var(--icen-motion-ease-standard);
692
+ --icen-ease-enter: var(--icen-motion-ease-enter);
693
+ --icen-ease-exit: var(--icen-motion-ease-exit);
607
694
  --icen-ease-bounce: var(--icen-ease-out);
608
695
  --icen-hover-border: var(--icen-token-line);
609
696
  --icen-hover-border-strong: var(--icen-token-line-strong);
@@ -749,9 +836,12 @@ h1, h2, h3, h4, h5, h6 {
749
836
  --icen-density-item-height: max(44px, calc(var(--icen-design-control-height) + var(--icen-design-density-offset) - 6px));
750
837
  }
751
838
  }
839
+ /* reduced-motion:本原语时长乘数归零(唯一的变量开关点;base.css 负责动画/滚动压制)。
840
+ 手动覆盖:data-icen-motion="full" 在系统降级时恢复;"reduce" 无需系统设置即降级。 */
752
841
  @media (prefers-reduced-motion: reduce) {
753
- :root { --icen-design-motion: 0; }
842
+ :root:not([data-icen-motion="full"]) { --icen-design-motion: 0; }
754
843
  }
844
+ :root[data-icen-motion="reduce"] { --icen-design-motion: 0; }
755
845
 
756
846
 
757
847
  /* ── tokens/chinese.css ── */
@@ -890,6 +980,13 @@ h1, h2, h3, h4, h5, h6 {
890
980
  /* shadow-inset 被本原语置 none,base.css 合成的 error 版会变成非法的「none, …」
891
981
  列表 → 整条 box-shadow 失效:像素原语自持一份硬边错误光环 */
892
982
  --icen-control-error-shadow: 0 0 0 2px var(--icen-token-error);
983
+ /* 点阵逐帧美学:动效令牌层全部改写为 steps(时长已由 --icen-design-motion: 0 归零,
984
+ 缓动改写面向直接消费 --icen-motion-ease-* 的新组件,双保险) */
985
+ --icen-motion-ease-standard: steps(1, end);
986
+ --icen-motion-ease-enter: steps(1, end);
987
+ --icen-motion-ease-exit: steps(1, end);
988
+ --icen-motion-ease-emphasized: steps(1, end);
989
+ --icen-motion-ease-spring: steps(1, end);
893
990
  --icen-ease-out: steps(1, end);
894
991
  --icen-ease-bounce: steps(1, end);
895
992
  }
@@ -1471,15 +1568,20 @@ p { margin: 0 0 1em; }
1471
1568
  动效与无障碍兜底
1472
1569
  ══════════════════════════════════════════════════════════════ */
1473
1570
 
1474
- /* reduced-motion:所有动画/过渡压缩到 ~0ms(保留可访问性最小可视信号) */
1571
+ /* reduced-motion 与手动覆盖的行为压制(变量开关在 design.css 自持):
1572
+ 循环/环境动画单次瞬时 + 平滑滚动关闭;过渡时长经 --icen-design-motion 归零瞬时完成(状态反馈保留)。 */
1475
1573
  @media (prefers-reduced-motion: reduce) {
1476
- *, *::before, *::after {
1477
- animation-duration: 0.01ms !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
1478
- animation-iteration-count: 1 !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
1479
- transition-duration: 0.01ms !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
1480
- scroll-behavior: auto !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
1574
+ :root:not([data-icen-motion="full"]) *, :root:not([data-icen-motion="full"]) *::before, :root:not([data-icen-motion="full"]) *::after {
1575
+ animation-duration: 0.01ms !important; /* guard:allow-important 动效守卫:降级需压制组件循环动画 */
1576
+ animation-iteration-count: 1 !important; /* guard:allow-important 动效守卫:降级需压制组件循环动画 */
1577
+ scroll-behavior: auto !important; /* guard:allow-important 动效守卫:降级需关闭平滑滚动 */
1481
1578
  }
1482
1579
  }
1580
+ :root[data-icen-motion="reduce"] *, :root[data-icen-motion="reduce"] *::before, :root[data-icen-motion="reduce"] *::after {
1581
+ animation-duration: 0.01ms !important; /* guard:allow-important 手动降级:与系统降级同口径 */
1582
+ animation-iteration-count: 1 !important; /* guard:allow-important 手动降级:与系统降级同口径 */
1583
+ scroll-behavior: auto !important; /* guard:allow-important 手动降级:与系统降级同口径 */
1584
+ }
1483
1585
 
1484
1586
  /* 触屏设备(无精细指针):压低 pressable 按下形变(hover 抬升已由 hover 守卫关闭) */
1485
1587
  @media (pointer: coarse) {
@@ -7336,6 +7438,35 @@ svg .icen-chart-mark-label {
7336
7438
  }
7337
7439
  }
7338
7440
 
7441
+ /* ── 键盘游标与读屏层(spec.a11y:summary/keyboard/table) ──
7442
+ 自包含 sr-only 几何(kit 独立引入时 base.css 可能缺席,不依赖 .icen-sr-only) */
7443
+ .icen-chart-summary,
7444
+ .icen-chart-live,
7445
+ .icen-chart-table {
7446
+ position: absolute;
7447
+ width: 1px; height: 1px;
7448
+ padding: 0; margin: -1px;
7449
+ overflow: hidden;
7450
+ clip: rect(0, 0, 0, 0);
7451
+ clip-path: inset(50%);
7452
+ white-space: nowrap;
7453
+ border: 0;
7454
+ }
7455
+ /* 键盘游标入口:图形可聚焦,焦点环走统一 ring 令牌 */
7456
+ [data-icen-chart-kb] { outline: none; }
7457
+ [data-icen-chart-kb]:focus-visible { box-shadow: var(--icen-ring); border-radius: var(--icen-radius-xs); }
7458
+ /* 游标焦点:DOM 柱条用轮廓环;SVG 点圆放大描边(r 为 SVG2 几何属性,不支持时退化为描边加粗) */
7459
+ .icen-chart-kb-focus {
7460
+ outline: 2px solid var(--icen-token-accent);
7461
+ outline-offset: 1px;
7462
+ border-radius: var(--icen-radius-xs);
7463
+ }
7464
+ circle.icen-chart-kb-focus {
7465
+ outline: none;
7466
+ stroke-width: 3px;
7467
+ r: 5px;
7468
+ }
7469
+
7339
7470
 
7340
7471
  /* ── components/code-block.css ── */
7341
7472
  /*
@@ -17234,7 +17365,7 @@ svg .icen-chart-mark-label {
17234
17365
  /* 现代: small controls have a legible edge and a quiet, tactile surface. Keep
17235
17366
  * these optical refinements local to the default primitive; other primitives
17236
17367
  * supply their own surface physics without fighting a global component rule. */
17237
- :root:where(:not([data-icen-style]),[data-icen-style="modern"]) .icen-btn:not(.icen-btn-ghost):not(.icen-btn-link) {
17368
+ :root:where(:not([data-icen-style]),[data-icen-style="modern"]) .icen-btn:where(:not(.icen-btn-ghost):not(.icen-btn-link)) {
17238
17369
  background-image: linear-gradient(
17239
17370
  to bottom,
17240
17371
  color-mix(in srgb, var(--icen-token-top-highlight) 32%, transparent),