@icen.ai/ui 0.2.1 → 0.3.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 (103) hide show
  1. package/README.md +29 -16
  2. package/dist/base.css +389 -48
  3. package/dist/behaviors/accordion.mjs +20 -0
  4. package/dist/behaviors/carousel.mjs +30 -1
  5. package/dist/behaviors/charts.mjs +168 -0
  6. package/dist/behaviors/copy.mjs +4 -3
  7. package/dist/behaviors/datatable.mjs +748 -0
  8. package/dist/behaviors/input.mjs +20 -1
  9. package/dist/behaviors/modal.mjs +14 -0
  10. package/dist/behaviors/nav.mjs +31 -4
  11. package/dist/behaviors/sidebar.mjs +12 -0
  12. package/dist/behaviors/slider.mjs +35 -3
  13. package/dist/behaviors/tabs.mjs +100 -9
  14. package/dist/behaviors/tag-input.mjs +11 -0
  15. package/dist/behaviors/theme.mjs +26 -0
  16. package/dist/behaviors/toast.mjs +83 -15
  17. package/dist/behaviors/tree.mjs +57 -1
  18. package/dist/behaviors/upload.mjs +2 -3
  19. package/dist/cli.mjs +74 -0
  20. package/dist/components/accordion.mjs +3 -0
  21. package/dist/components/alert.mjs +2 -0
  22. package/dist/components/avatar.mjs +2 -0
  23. package/dist/components/breadcrumb.css +91 -18
  24. package/dist/components/breadcrumb.mjs +2 -0
  25. package/dist/components/btn.css +174 -14
  26. package/dist/components/btn.mjs +2 -0
  27. package/dist/components/card.css +118 -18
  28. package/dist/components/card.mjs +2 -0
  29. package/dist/components/carousel.mjs +3 -0
  30. package/dist/components/charts.css +225 -33
  31. package/dist/components/charts.mjs +3 -0
  32. package/dist/components/content.css +256 -74
  33. package/dist/components/context-menu.mjs +3 -0
  34. package/dist/components/datatable.css +343 -0
  35. package/dist/components/datatable.mjs +4 -0
  36. package/dist/components/desc.mjs +2 -0
  37. package/dist/components/dropdown.mjs +3 -0
  38. package/dist/components/empty.css +50 -10
  39. package/dist/components/empty.mjs +2 -0
  40. package/dist/components/feedback.css +158 -47
  41. package/dist/components/form.css +139 -22
  42. package/dist/components/input.css +165 -45
  43. package/dist/components/input.mjs +3 -0
  44. package/dist/components/kbd.mjs +2 -0
  45. package/dist/components/layout.mjs +2 -0
  46. package/dist/components/list.mjs +2 -0
  47. package/dist/components/media-card.mjs +2 -0
  48. package/dist/components/media.css +187 -40
  49. package/dist/components/menu.css +159 -32
  50. package/dist/components/modal.css +140 -34
  51. package/dist/components/modal.mjs +3 -0
  52. package/dist/components/nav.css +134 -32
  53. package/dist/components/nav.mjs +3 -0
  54. package/dist/components/pagination.css +105 -19
  55. package/dist/components/pagination.mjs +2 -0
  56. package/dist/components/panel.css +61 -6
  57. package/dist/components/panel.mjs +2 -0
  58. package/dist/components/pill.css +74 -14
  59. package/dist/components/pill.mjs +2 -0
  60. package/dist/components/popover.css +109 -7
  61. package/dist/components/popover.mjs +3 -0
  62. package/dist/components/progress.mjs +2 -0
  63. package/dist/components/rating.mjs +2 -0
  64. package/dist/components/result.mjs +2 -0
  65. package/dist/components/segmented.css +199 -50
  66. package/dist/components/segmented.mjs +2 -0
  67. package/dist/components/select.css +140 -39
  68. package/dist/components/select.mjs +3 -0
  69. package/dist/components/sidebar.css +162 -34
  70. package/dist/components/sidebar.mjs +3 -0
  71. package/dist/components/skeleton.mjs +2 -0
  72. package/dist/components/slider.css +169 -31
  73. package/dist/components/slider.mjs +3 -0
  74. package/dist/components/spinner.mjs +2 -0
  75. package/dist/components/stat.css +103 -8
  76. package/dist/components/stat.mjs +2 -0
  77. package/dist/components/steps.css +105 -31
  78. package/dist/components/steps.mjs +2 -0
  79. package/dist/components/switch.css +171 -54
  80. package/dist/components/switch.mjs +2 -0
  81. package/dist/components/table.css +114 -12
  82. package/dist/components/table.mjs +2 -0
  83. package/dist/components/tabs.css +104 -17
  84. package/dist/components/tabs.mjs +3 -0
  85. package/dist/components/tag-input.css +119 -23
  86. package/dist/components/tag-input.mjs +3 -0
  87. package/dist/components/timeline.mjs +2 -0
  88. package/dist/components/toast.css +85 -12
  89. package/dist/components/toast.mjs +3 -0
  90. package/dist/components/tooltip.css +86 -26
  91. package/dist/components/tooltip.mjs +2 -0
  92. package/dist/components/tree.mjs +3 -0
  93. package/dist/components/upload.css +144 -17
  94. package/dist/components/upload.mjs +3 -0
  95. package/dist/index.mjs +623 -42
  96. package/dist/registry.json +197 -2
  97. package/dist/retro-effects.css +264 -0
  98. package/dist/tokens/colors.css +18 -90
  99. package/dist/tokens/retro-effects.css +264 -0
  100. package/dist/tokens/style-profiles.css +47 -47
  101. package/dist/tokens.css +65 -137
  102. package/dist/ui.css +4861 -1019
  103. package/package.json +9 -1
@@ -1,32 +1,118 @@
1
1
  /*
2
2
  * @icen.ai/ui — Component: pagination(分页)
3
- * 用法:<nav class="pagination" aria-label="分页">
4
- * <button class="page-btn motion is-disabled">‹</button>
5
- * <button class="page-btn motion">1</button>
6
- * <span class="page-ellipsis">…</span>
7
- * <button class="page-btn motion is-active" aria-current="page">5</button>
8
- * <button class="page-btn motion">›</button>
9
- * </nav>
3
+ *
4
+ * 完整契约:
5
+ * <nav class="pagination [pagination--sm]" aria-label="分页">
6
+ * <button class="page-btn motion [.is-disabled]" aria-label="上一页" aria-disabled="true">‹</button>
7
+ * <button class="page-btn motion [.is-active]" aria-current="page">1</button>
8
+ * <span class="page-ellipsis" aria-hidden="true">…</span>
9
+ * <button class="page-btn motion">5</button>
10
+ * <button class="page-btn motion" aria-label="下一页">›</button>
11
+ * </nav>
12
+ *
10
13
  * 翻页逻辑由消费方实现,这里只提供静态样式契约。
11
14
  */
12
15
 
13
- .pagination { display: flex; align-items: center; gap: 4px; }
16
+ .pagination {
17
+ display: flex;
18
+ align-items: center;
19
+ gap: var(--density-space-xs);
20
+ }
14
21
 
15
22
  .page-btn {
16
- min-width: 28px; height: 28px; padding: 0 6px;
17
- border-radius: var(--radius-md); font-size: 12px;
18
- display: inline-flex; align-items: center; justify-content: center;
19
- color: var(--token-text-muted); background: none; border: 0; cursor: pointer;
23
+ min-width: 28px;
24
+ height: 28px;
25
+ padding: 0 var(--density-space-xs);
26
+ border-radius: var(--radius-sm);
27
+ font-size: var(--density-font-size-sm);
28
+ display: inline-flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ color: var(--token-text-muted);
32
+ background: none;
33
+ border: 0;
34
+ cursor: pointer;
35
+ -webkit-tap-highlight-color: transparent;
36
+ transition:
37
+ background-color var(--icen-tx-fast),
38
+ color var(--icen-tx-fast);
39
+ }
40
+ .page-btn:not(.is-active):hover {
41
+ background: var(--token-control-hover);
42
+ color: var(--token-text);
43
+ }
44
+ .page-btn:focus-visible {
45
+ outline: none;
46
+ box-shadow: var(--icen-ring);
47
+ }
48
+ .page-btn.is-active,
49
+ .page-btn[aria-current='page'] {
50
+ background: var(--token-accent);
51
+ color: var(--token-on-accent, #fff);
52
+ font-weight: 500;
53
+ box-shadow: var(--token-shadow-elevated);
20
54
  }
21
- .page-btn:not(.is-active):hover { background: var(--token-control-hover); color: var(--token-text); }
22
- .page-btn.is-active {
23
- background: var(--token-accent); color: var(--token-on-accent);
24
- font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
55
+ .page-btn.is-disabled,
56
+ .page-btn:disabled,
57
+ .page-btn[aria-disabled='true'] {
58
+ opacity: var(--icen-disabled-opacity);
59
+ pointer-events: none;
25
60
  }
26
- .page-btn.is-disabled, .page-btn:disabled { opacity: .3; pointer-events: none; }
27
61
 
28
62
  .page-ellipsis {
29
- min-width: 28px; height: 28px; font-size: 12px;
30
- display: inline-flex; align-items: center; justify-content: center;
63
+ min-width: 28px;
64
+ height: 28px;
65
+ font-size: var(--density-font-size-sm);
66
+ display: inline-flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ color: var(--token-text-faint);
70
+ user-select: none;
71
+ }
72
+
73
+ /* 尺寸变体 */
74
+ .pagination--sm .page-btn,
75
+ .pagination--sm .page-ellipsis {
76
+ min-width: 22px;
77
+ height: 22px;
78
+ font-size: var(--density-font-size-xs);
79
+ }
80
+
81
+ /* 带总数/跳页输入的复合体(behavior 可选渲染) */
82
+ .pagination-info {
83
+ font-size: var(--density-font-size-sm);
31
84
  color: var(--token-text-faint);
85
+ font-variant-numeric: tabular-nums;
86
+ margin-left: var(--density-space-sm);
87
+ }
88
+ .pagination-jump {
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: var(--density-space-xs);
92
+ margin-left: var(--density-space-sm);
93
+ font-size: var(--density-font-size-sm);
94
+ color: var(--token-text-muted);
95
+ }
96
+ .pagination-jump-input {
97
+ width: 56px;
98
+ height: 28px;
99
+ padding: 0 var(--density-space-xs);
100
+ text-align: center;
101
+ background: var(--token-control);
102
+ border: 1px solid var(--token-outline-soft);
103
+ border-radius: var(--radius-sm);
104
+ color: var(--token-text);
105
+ font: inherit;
106
+ font-size: var(--density-font-size-sm);
107
+ transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
108
+ }
109
+ .pagination-jump-input:hover { border-color: var(--icen-hover-border); }
110
+ .pagination-jump-input:focus-visible {
111
+ outline: none;
112
+ border-color: var(--icen-control-focus-border);
113
+ box-shadow: var(--icen-control-focus-shadow);
114
+ }
115
+
116
+ @media (prefers-reduced-motion: reduce) {
117
+ .page-btn { transition: none; }
32
118
  }
@@ -0,0 +1,2 @@
1
+ // @icen.ai/ui — kit: pagination(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './pagination.css';
@@ -1,6 +1,17 @@
1
1
  /*
2
- * @icen.ai/ui — Component: panel(白卡片容器 + 标题栏)
3
- * 用法:<div class="panel-block"><div class="panel-title"><span>标题</span></div> …内容… </div>
2
+ * @icen.ai/ui — Component: panel(白卡片容器 + 标题栏 + 可选 footer)
3
+ *
4
+ * 完整契约:
5
+ * <div class="panel-block [panel-block--flush]">
6
+ * <div class="panel-title">
7
+ * <span>标题</span>
8
+ * <div class="panel-title-actions"><button class="btn btn-sm">…</button></div>
9
+ * </div>
10
+ * <div class="panel-body">…</div>
11
+ * <div class="panel-foot">…可选底栏</div>
12
+ * </div>
13
+ *
14
+ * --flush:body 不留 padding,使用方自行处理内层布局。
4
15
  */
5
16
 
6
17
  .panel-block {
@@ -8,12 +19,56 @@
8
19
  border: 1px solid var(--token-line-soft);
9
20
  border-radius: var(--radius-lg);
10
21
  box-shadow: var(--token-shadow-elevated);
11
- margin-bottom: 24px;
22
+ margin-bottom: var(--density-space-lg);
12
23
  overflow: hidden;
13
24
  }
14
25
  .panel-title {
15
- display: flex; align-items: center; justify-content: space-between;
16
- padding: 14px 20px; border-bottom: 1px solid var(--token-line-soft);
17
- font-size: 12px; letter-spacing: 2px; color: var(--token-text-muted);
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: space-between;
29
+ gap: var(--density-space-sm);
30
+ padding: var(--density-space-sm) var(--density-space-md);
31
+ border-bottom: 1px solid var(--token-line-soft);
32
+ font-size: var(--density-font-size-xs);
33
+ letter-spacing: 0.08em;
34
+ color: var(--token-text-muted);
18
35
  text-transform: uppercase;
36
+ font-weight: 600;
37
+ }
38
+ .panel-title > span:first-child {
39
+ flex: 1;
40
+ min-width: 0;
41
+ overflow: hidden;
42
+ text-overflow: ellipsis;
43
+ white-space: nowrap;
44
+ }
45
+ .panel-title-actions {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: var(--density-space-xs);
49
+ flex-shrink: 0;
50
+ }
51
+
52
+ .panel-body {
53
+ padding: var(--density-space-md);
54
+ font-size: var(--density-font-size-md);
55
+ line-height: 1.6;
56
+ }
57
+ .panel-block--flush .panel-body { padding: 0; }
58
+
59
+ .panel-foot {
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: flex-end;
63
+ gap: var(--density-space-sm);
64
+ padding: var(--density-space-sm) var(--density-space-md);
65
+ border-top: 1px solid var(--token-line-soft);
66
+ background: color-mix(in srgb, var(--token-bg-soft) 50%, transparent);
67
+ }
68
+
69
+ /* 强调变体:accent 色标题边(用于警告/告警面板) */
70
+ .panel-block--accent { border-color: color-mix(in srgb, var(--token-accent) 30%, transparent); }
71
+ .panel-block--accent .panel-title {
72
+ color: var(--token-accent);
73
+ background: var(--token-accent-subtle);
19
74
  }
@@ -0,0 +1,2 @@
1
+ // @icen.ai/ui — kit: panel(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './panel.css';
@@ -1,28 +1,88 @@
1
1
  /*
2
- * @icen.ai/ui — Component: pill(状态徽章)
3
- * 用法:<span class="pill ok|warn|bad|accent">文本</span>
4
- * 语义色纪律:仅绿/黄/红 + 品牌 accent。
2
+ * @icen.ai/ui — Component: pill(状态徽章 / tag)
3
+ *
4
+ * 完整契约:
5
+ * <span class="pill [ok|warn|bad|accent|info] [.pill--dot|pill--outline|pill--sm]">文本</span>
6
+ *
7
+ * 语义色纪律:仅绿/黄/红/信息 + 品牌 accent。
8
+ * --dot:左侧加状态色圆点;--outline:透明底、纯描边;--sm:紧凑尺寸。
5
9
  */
6
10
 
7
11
  .pill {
8
- display: inline-block; padding: 2px 10px; border-radius: var(--radius-full);
9
- font-size: 11px; letter-spacing: 1px;
10
- background: var(--token-surface-strong); color: var(--token-text-muted);
12
+ display: inline-flex;
13
+ align-items: center;
14
+ gap: 4px;
15
+ padding: 2px var(--density-space-sm);
16
+ border-radius: var(--radius-full);
17
+ font-size: var(--density-font-size-xs);
18
+ letter-spacing: 0.02em;
19
+ font-weight: 500;
20
+ background: var(--token-surface-strong);
21
+ color: var(--token-text-muted);
11
22
  border: 1px solid var(--token-line-soft);
23
+ white-space: nowrap;
24
+ vertical-align: middle;
12
25
  }
26
+
13
27
  .pill.ok {
14
- color: var(--token-success); border-color: color-mix(in srgb, var(--token-success) 35%, transparent);
15
- background: color-mix(in srgb, var(--token-success) 7%, transparent);
28
+ color: var(--token-success);
29
+ border-color: color-mix(in srgb, var(--token-success) 35%, transparent);
30
+ background: color-mix(in srgb, var(--token-success) 9%, transparent);
16
31
  }
17
32
  .pill.warn {
18
- color: var(--token-warning); border-color: color-mix(in srgb, var(--token-warning) 35%, transparent);
19
- background: color-mix(in srgb, var(--token-warning) 7%, transparent);
33
+ color: var(--token-warning);
34
+ border-color: color-mix(in srgb, var(--token-warning) 35%, transparent);
35
+ background: color-mix(in srgb, var(--token-warning) 9%, transparent);
20
36
  }
21
37
  .pill.bad {
22
- color: var(--token-error); border-color: color-mix(in srgb, var(--token-error) 35%, transparent);
23
- background: color-mix(in srgb, var(--token-error) 7%, transparent);
38
+ color: var(--token-error);
39
+ border-color: color-mix(in srgb, var(--token-error) 35%, transparent);
40
+ background: color-mix(in srgb, var(--token-error) 9%, transparent);
24
41
  }
25
42
  .pill.accent {
26
- color: var(--token-accent-deep); border-color: color-mix(in srgb, var(--token-accent) 40%, transparent);
27
- background: color-mix(in srgb, var(--token-accent) 7%, transparent);
43
+ color: var(--token-accent-deep, var(--token-accent));
44
+ border-color: color-mix(in srgb, var(--token-accent) 40%, transparent);
45
+ background: color-mix(in srgb, var(--token-accent) 9%, transparent);
46
+ }
47
+ .pill.info {
48
+ color: var(--token-info);
49
+ border-color: color-mix(in srgb, var(--token-info) 35%, transparent);
50
+ background: color-mix(in srgb, var(--token-info) 9%, transparent);
51
+ }
52
+
53
+ /* 点状变体:左侧状态色圆点 */
54
+ .pill--dot::before {
55
+ content: '';
56
+ display: inline-block;
57
+ width: 6px;
58
+ height: 6px;
59
+ border-radius: var(--radius-full);
60
+ background: currentColor;
61
+ flex-shrink: 0;
62
+ }
63
+
64
+ /* 描边变体:透明底,仅描边 */
65
+ .pill--outline {
66
+ background: transparent !important;
67
+ }
68
+
69
+ /* 尺寸变体 */
70
+ .pill--sm {
71
+ padding: 1px var(--density-space-xs);
72
+ font-size: 10px;
73
+ }
74
+ .pill--lg {
75
+ padding: 4px calc(var(--density-space-sm) + 2px);
76
+ font-size: var(--density-font-size-sm);
77
+ }
78
+
79
+ /* 实色变体:accent 实底(用于 count、活跃状态等强调场景) */
80
+ .pill--solid {
81
+ background: var(--token-accent);
82
+ color: var(--token-on-accent, #fff);
83
+ border-color: var(--token-accent);
28
84
  }
85
+ .pill--solid.ok { background: var(--token-success); border-color: var(--token-success); color: var(--token-on-accent, #fff); }
86
+ .pill--solid.warn { background: var(--token-warning); border-color: var(--token-warning); color: var(--token-on-accent, #fff); }
87
+ .pill--solid.bad { background: var(--token-error); border-color: var(--token-error); color: var(--token-on-accent, #fff); }
88
+ .pill--solid.info { background: var(--token-info); border-color: var(--token-info); color: var(--token-on-accent, #fff); }
@@ -0,0 +1,2 @@
1
+ // @icen.ai/ui — kit: pill(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './pill.css';
@@ -1,20 +1,110 @@
1
1
  /*
2
2
  * @icen.ai/ui — Component: popover(锚定浮层,与 behaviors/popover 配套)
3
- * 面板由 JS portal 到 document.body 并按 fixed 定位;data-side 由布局函数写入。
3
+ *
4
+ * 完整契约:
5
+ * <button class="popover-trigger pressable" data-popover-target="id" aria-haspopup="dialog">…</button>
6
+ * <div class="popover [--sm|--lg]" id="id" data-side="top|bottom|left|right" role="dialog" hidden>
7
+ * <div class="popover-header"> 可选
8
+ * <h3 class="popover-title">…</h3>
9
+ * <button class="popover-close" aria-label="关闭">…</button>
10
+ * </div>
11
+ * <div class="popover-body">…</div>
12
+ * <div class="popover-footer"> 可选
13
+ * <button class="btn">取消</button>
14
+ * </div>
15
+ * </div>
16
+ *
17
+ * behavior:面板 portal 到 document.body 按 fixed 定位;data-side 由布局函数写入;
18
+ * ESC / 外部点击关闭;焦点 trap 可选。
4
19
  */
5
20
 
6
21
  .popover {
7
- position: fixed; z-index: var(--z-popover);
8
- padding: 8px;
9
- background: var(--token-card-strong); color: var(--token-text);
22
+ position: fixed;
23
+ z-index: var(--z-popover);
24
+ min-width: 200px;
25
+ max-width: min(360px, calc(100vw - 32px));
26
+ padding: var(--density-space-sm);
27
+ background: var(--token-card-strong);
28
+ color: var(--token-text);
10
29
  border: 1px solid var(--token-outline);
11
30
  box-shadow: var(--token-shadow-overlay);
12
31
  border-radius: var(--radius-lg);
13
- animation: icen-popover-in 150ms var(--ease-out);
32
+ animation: icen-popover-in var(--icen-tx-fast);
33
+ transform-origin: top center;
34
+ }
35
+ .popover[data-side='top'] {
36
+ animation-name: icen-popover-in-top;
37
+ transform-origin: bottom center;
38
+ }
39
+ .popover[data-side='left'] {
40
+ animation-name: icen-popover-in-left;
41
+ transform-origin: right center;
42
+ }
43
+ .popover[data-side='right'] {
44
+ animation-name: icen-popover-in-right;
45
+ transform-origin: left center;
46
+ }
47
+
48
+ .popover--sm { min-width: 160px; max-width: 240px; }
49
+ .popover--lg { min-width: 280px; max-width: min(480px, calc(100vw - 32px)); }
50
+
51
+ .popover-header {
52
+ display: flex;
53
+ align-items: flex-start;
54
+ justify-content: space-between;
55
+ gap: var(--density-space-sm);
56
+ padding: var(--density-space-xs) var(--density-space-xs) var(--density-space-sm);
57
+ border-bottom: 1px solid var(--token-line-soft);
58
+ margin-bottom: var(--density-space-sm);
59
+ }
60
+ .popover-title {
61
+ margin: 0;
62
+ font-size: var(--density-font-size-sm);
63
+ font-weight: 600;
64
+ font-family: var(--font-heading);
65
+ line-height: 1.3;
66
+ }
67
+ .popover-close {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ width: 22px;
72
+ height: 22px;
73
+ padding: 0;
74
+ border: none;
75
+ background: transparent;
76
+ cursor: pointer;
77
+ color: var(--token-text-faint);
78
+ border-radius: var(--radius-sm);
79
+ flex-shrink: 0;
80
+ transition:
81
+ background-color var(--icen-tx-fast),
82
+ color var(--icen-tx-fast);
83
+ }
84
+ .popover-close:hover {
85
+ background: var(--token-surface-hover);
86
+ color: var(--token-text);
87
+ }
88
+ .popover-close:focus-visible {
89
+ outline: none;
90
+ box-shadow: var(--icen-ring);
91
+ }
92
+
93
+ .popover-body {
94
+ font-size: var(--density-font-size-sm);
95
+ line-height: 1.5;
96
+ }
97
+
98
+ .popover-footer {
99
+ display: flex;
100
+ justify-content: flex-end;
101
+ gap: var(--density-space-xs);
102
+ margin-top: var(--density-space-sm);
103
+ padding-top: var(--density-space-sm);
104
+ border-top: 1px solid var(--token-line-soft);
14
105
  }
15
- .popover[data-side='top'] { animation-name: icen-popover-in-top; }
16
106
 
17
- /* 进场动画与 .menu 同参数:fade + scale(.95→1) + 按侧位移 8px */
107
+ /* ── 进场动画(按侧别反向位移 8px) ── */
18
108
  @keyframes icen-popover-in {
19
109
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
20
110
  to { opacity: 1; transform: scale(1) translateY(0); }
@@ -23,3 +113,15 @@
23
113
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
24
114
  to { opacity: 1; transform: scale(1) translateY(0); }
25
115
  }
116
+ @keyframes icen-popover-in-left {
117
+ from { opacity: 0; transform: scale(0.95) translateX(8px); }
118
+ to { opacity: 1; transform: scale(1) translateX(0); }
119
+ }
120
+ @keyframes icen-popover-in-right {
121
+ from { opacity: 0; transform: scale(0.95) translateX(-8px); }
122
+ to { opacity: 1; transform: scale(1) translateX(0); }
123
+ }
124
+
125
+ @media (prefers-reduced-motion: reduce) {
126
+ .popover { animation: none; }
127
+ }
@@ -0,0 +1,3 @@
1
+ // @icen.ai/ui — kit: popover(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './popover.css';
3
+ export * from '../behaviors/popover.mjs';
@@ -0,0 +1,2 @@
1
+ // @icen.ai/ui — kit: progress(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './feedback.css';
@@ -0,0 +1,2 @@
1
+ // @icen.ai/ui — kit: rating(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './media.css';
@@ -0,0 +1,2 @@
1
+ // @icen.ai/ui — kit: result(CSS + behavior 一行入口;构建产物,勿手改)
2
+ import './feedback.css';