@icen.ai/ui 0.8.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +176 -75
- package/README.md +66 -88
- package/dist/base.css +208 -179
- package/dist/behaviors/accordion.mjs +8 -8
- package/dist/behaviors/ai-branch.d.mts +19 -0
- package/dist/behaviors/ai-branch.mjs +1133 -0
- package/dist/behaviors/ai-chat.d.mts +12 -10
- package/dist/behaviors/ai-chat.mjs +1125 -155
- package/dist/behaviors/ai-composer.d.mts +44 -12
- package/dist/behaviors/ai-composer.mjs +2084 -523
- package/dist/behaviors/ai-core.d.mts +1 -1
- package/dist/behaviors/ai-core.mjs +1016 -107
- package/dist/behaviors/ai-diff.mjs +1019 -127
- package/dist/behaviors/ai-feedback.d.mts +26 -0
- package/dist/behaviors/ai-feedback.mjs +1212 -0
- package/dist/behaviors/ai-panel.d.mts +21 -7
- package/dist/behaviors/ai-panel.mjs +1308 -264
- package/dist/behaviors/ai-provider.mjs +1003 -101
- package/dist/behaviors/ai-threads.d.mts +38 -0
- package/dist/behaviors/ai-threads.mjs +1233 -0
- package/dist/behaviors/ai-tool.d.mts +2 -2
- package/dist/behaviors/ai-tool.mjs +2042 -396
- package/dist/behaviors/ai-tools.d.mts +89 -16
- package/dist/behaviors/ai-tools.mjs +4453 -372
- package/dist/behaviors/autocomplete.d.mts +53 -0
- package/dist/behaviors/autocomplete.mjs +1600 -0
- package/dist/behaviors/back-top.d.mts +1 -1
- package/dist/behaviors/back-top.mjs +951 -14
- package/dist/behaviors/carousel.d.mts +1 -1
- package/dist/behaviors/carousel.mjs +906 -11
- package/dist/behaviors/cascader.d.mts +48 -0
- package/dist/behaviors/cascader.mjs +1853 -0
- package/dist/behaviors/charts.d.mts +174 -8
- package/dist/behaviors/charts.mjs +2632 -192
- package/dist/behaviors/code-block.d.mts +36 -0
- package/dist/behaviors/code-block.mjs +1611 -0
- package/dist/behaviors/command-palette.d.mts +9 -6
- package/dist/behaviors/command-palette.mjs +161 -59
- package/dist/behaviors/context-menu.d.mts +9 -8
- package/dist/behaviors/context-menu.mjs +1112 -44
- package/dist/behaviors/controls.d.mts +13 -13
- package/dist/behaviors/controls.mjs +989 -130
- package/dist/behaviors/copy.d.mts +21 -2
- package/dist/behaviors/copy.mjs +1206 -42
- package/dist/behaviors/datatable.d.mts +53 -3
- package/dist/behaviors/datatable.mjs +1963 -207
- package/dist/behaviors/date-picker.d.mts +0 -1
- package/dist/behaviors/date-picker.mjs +1340 -293
- package/dist/behaviors/design.d.mts +54 -0
- package/dist/behaviors/design.mjs +109 -0
- package/dist/behaviors/dropdown.d.mts +5 -6
- package/dist/behaviors/dropdown.mjs +262 -110
- package/dist/behaviors/events.d.mts +313 -3
- package/dist/behaviors/events.mjs +47 -2
- package/dist/behaviors/feedback.d.mts +30 -0
- package/dist/behaviors/feedback.mjs +296 -0
- package/dist/behaviors/focus.d.mts +8 -0
- package/dist/behaviors/focus.mjs +24 -0
- package/dist/behaviors/form-validate.d.mts +102 -0
- package/dist/behaviors/form-validate.mjs +6091 -0
- package/dist/behaviors/i18n.d.mts +789 -0
- package/dist/behaviors/i18n.mjs +1711 -0
- package/dist/behaviors/icons.d.mts +93 -0
- package/dist/behaviors/icons.mjs +113 -0
- package/dist/behaviors/input.d.mts +9 -1
- package/dist/behaviors/input.mjs +1056 -60
- package/dist/behaviors/kb-access.d.mts +34 -0
- package/dist/behaviors/kb-access.mjs +2459 -0
- package/dist/behaviors/kb-acl.d.mts +50 -0
- package/dist/behaviors/kb-acl.mjs +1345 -0
- package/dist/behaviors/kb-answer.d.mts +38 -0
- package/dist/behaviors/kb-answer.mjs +3707 -0
- package/dist/behaviors/kb-audit.d.mts +23 -0
- package/dist/behaviors/kb-audit.mjs +1297 -0
- package/dist/behaviors/kb-canvas.d.mts +44 -0
- package/dist/behaviors/kb-canvas.mjs +1512 -0
- package/dist/behaviors/kb-chain.d.mts +15 -0
- package/dist/behaviors/kb-chain.mjs +1192 -0
- package/dist/behaviors/kb-checkpoint.d.mts +16 -0
- package/dist/behaviors/kb-checkpoint.mjs +1492 -0
- package/dist/behaviors/kb-chunks.d.mts +31 -0
- package/dist/behaviors/kb-chunks.mjs +1414 -0
- package/dist/behaviors/kb-citation.d.mts +38 -0
- package/dist/behaviors/kb-citation.mjs +1699 -0
- package/dist/behaviors/kb-clarify.d.mts +20 -0
- package/dist/behaviors/kb-clarify.mjs +1176 -0
- package/dist/behaviors/kb-conflict.d.mts +22 -0
- package/dist/behaviors/kb-conflict.mjs +1206 -0
- package/dist/behaviors/kb-connector.d.mts +17 -0
- package/dist/behaviors/kb-connector.mjs +1303 -0
- package/dist/behaviors/kb-core.d.mts +534 -0
- package/dist/behaviors/kb-core.mjs +1805 -0
- package/dist/behaviors/kb-eval.d.mts +22 -0
- package/dist/behaviors/kb-eval.mjs +2235 -0
- package/dist/behaviors/kb-explain.d.mts +11 -0
- package/dist/behaviors/kb-explain.mjs +1165 -0
- package/dist/behaviors/kb-filter.d.mts +31 -0
- package/dist/behaviors/kb-filter.mjs +2417 -0
- package/dist/behaviors/kb-gap.d.mts +27 -0
- package/dist/behaviors/kb-gap.mjs +1195 -0
- package/dist/behaviors/kb-hittest.d.mts +34 -0
- package/dist/behaviors/kb-hittest.mjs +1352 -0
- package/dist/behaviors/kb-metadata.d.mts +29 -0
- package/dist/behaviors/kb-metadata.mjs +1248 -0
- package/dist/behaviors/kb-passage.d.mts +41 -0
- package/dist/behaviors/kb-passage.mjs +1469 -0
- package/dist/behaviors/kb-pipeline.d.mts +18 -0
- package/dist/behaviors/kb-pipeline.mjs +1301 -0
- package/dist/behaviors/kb-qa.d.mts +26 -0
- package/dist/behaviors/kb-qa.mjs +1260 -0
- package/dist/behaviors/kb-rerank.d.mts +20 -0
- package/dist/behaviors/kb-rerank.mjs +1248 -0
- package/dist/behaviors/kb-retrieval.d.mts +49 -0
- package/dist/behaviors/kb-retrieval.mjs +2585 -0
- package/dist/behaviors/kb-review.d.mts +44 -0
- package/dist/behaviors/kb-review.mjs +2282 -0
- package/dist/behaviors/kb-sandbox.d.mts +33 -0
- package/dist/behaviors/kb-sandbox.mjs +1247 -0
- package/dist/behaviors/kb-segment.d.mts +32 -0
- package/dist/behaviors/kb-segment.mjs +1431 -0
- package/dist/behaviors/kb-select.d.mts +24 -0
- package/dist/behaviors/kb-select.mjs +1989 -0
- package/dist/behaviors/kb-sources.d.mts +27 -0
- package/dist/behaviors/kb-sources.mjs +1287 -0
- package/dist/behaviors/kb-sql.d.mts +43 -0
- package/dist/behaviors/kb-sql.mjs +1865 -0
- package/dist/behaviors/kb-trace.d.mts +16 -0
- package/dist/behaviors/kb-trace.mjs +1328 -0
- package/dist/behaviors/kb-visibility.d.mts +44 -0
- package/dist/behaviors/kb-visibility.mjs +1331 -0
- package/dist/behaviors/kb-who-can.d.mts +32 -0
- package/dist/behaviors/kb-who-can.mjs +2216 -0
- package/dist/behaviors/mentions.d.mts +93 -0
- package/dist/behaviors/mentions.mjs +2152 -0
- package/dist/behaviors/modal.d.mts +4 -3
- package/dist/behaviors/modal.mjs +1055 -33
- package/dist/behaviors/nav.d.mts +1 -1
- package/dist/behaviors/nav.mjs +6 -6
- package/dist/behaviors/notification.d.mts +16 -8
- package/dist/behaviors/notification.mjs +1615 -265
- package/dist/behaviors/panel.d.mts +4 -0
- package/dist/behaviors/panel.mjs +994 -0
- package/dist/behaviors/popover.d.mts +28 -5
- package/dist/behaviors/popover.mjs +225 -24
- package/dist/behaviors/select.d.mts +5 -2
- package/dist/behaviors/select.mjs +1410 -117
- package/dist/behaviors/sidebar.d.mts +1 -1
- package/dist/behaviors/sidebar.mjs +13 -13
- package/dist/behaviors/slider.d.mts +1 -1
- package/dist/behaviors/slider.mjs +9 -9
- package/dist/behaviors/split-pane.d.mts +1 -1
- package/dist/behaviors/split-pane.mjs +7 -7
- package/dist/behaviors/suggestions.d.mts +27 -0
- package/dist/behaviors/suggestions.mjs +1089 -0
- package/dist/behaviors/svg-parse.d.mts +14 -0
- package/dist/behaviors/svg-parse.mjs +37 -0
- package/dist/behaviors/tabs.d.mts +2 -2
- package/dist/behaviors/tabs.mjs +25 -25
- package/dist/behaviors/tag-input.d.mts +23 -5
- package/dist/behaviors/tag-input.mjs +1359 -104
- package/dist/behaviors/theme-switcher.d.mts +24 -0
- package/dist/behaviors/theme-switcher.mjs +1981 -0
- package/dist/behaviors/theme.d.mts +15 -8
- package/dist/behaviors/theme.mjs +390 -28
- package/dist/behaviors/toast.d.mts +24 -25
- package/dist/behaviors/toast.mjs +1266 -88
- package/dist/behaviors/tooltip.d.mts +4 -0
- package/dist/behaviors/tooltip.mjs +378 -0
- package/dist/behaviors/tree-select.d.mts +69 -0
- package/dist/behaviors/tree-select.mjs +1907 -0
- package/dist/behaviors/tree.d.mts +1 -1
- package/dist/behaviors/tree.mjs +15 -15
- package/dist/behaviors/upload.d.mts +3 -2
- package/dist/behaviors/upload.mjs +1076 -66
- package/dist/cli.mjs +5 -6
- package/dist/components/ai-branch.mjs +3 -0
- package/dist/components/ai-chat.css +846 -458
- package/dist/components/ai-diff.css +153 -132
- package/dist/components/ai-feedback.mjs +3 -0
- package/dist/components/ai-panel.css +495 -270
- package/dist/components/ai-threads.mjs +3 -0
- package/dist/components/ai-tool.css +393 -238
- package/dist/components/autocomplete.css +61 -0
- package/dist/components/autocomplete.mjs +3 -0
- package/dist/components/back-top.css +34 -31
- package/dist/components/badge.css +44 -41
- package/dist/components/breadcrumb.css +67 -46
- package/dist/components/btn.css +80 -74
- package/dist/components/card.css +117 -106
- package/dist/components/cascader.css +311 -0
- package/dist/components/cascader.mjs +3 -0
- package/dist/components/chart-area.css +8 -2
- package/dist/components/chart-bar.css +95 -33
- package/dist/components/chart-gauge.css +14 -11
- package/dist/components/chart-graph.css +60 -0
- package/dist/components/chart-graph.mjs +4 -0
- package/dist/components/chart-heatmap.css +96 -90
- package/dist/components/chart-line.css +8 -3
- package/dist/components/chart-map.mjs +3 -0
- package/dist/components/chart-pie.css +9 -6
- package/dist/components/chart-radar.css +8 -5
- package/dist/components/chart-scatter.css +9 -6
- package/dist/components/chart-scatter.mjs +1 -1
- package/dist/components/chart-sparkline.css +5 -2
- package/dist/components/chart-stack.css +14 -11
- package/dist/components/charts.css +190 -67
- package/dist/components/charts.mjs +1 -0
- package/dist/components/code-block.css +418 -0
- package/dist/components/code-block.mjs +4 -0
- package/dist/components/command-palette.css +138 -117
- package/dist/components/content.css +257 -251
- package/dist/components/copy.css +72 -44
- package/dist/components/datatable.css +423 -181
- package/dist/components/date-picker.css +135 -104
- package/dist/components/empty.css +68 -65
- package/dist/components/feedback.css +201 -183
- package/dist/components/form-validate.css +120 -0
- package/dist/components/form-validate.mjs +3 -0
- package/dist/components/form.css +150 -127
- package/dist/components/icon.css +102 -0
- package/dist/components/icon.mjs +3 -0
- package/dist/components/input.css +159 -104
- package/dist/components/kb-access.mjs +4 -0
- package/dist/components/kb-acl.mjs +4 -0
- package/dist/components/kb-agent.css +496 -0
- package/dist/components/kb-answer.mjs +4 -0
- package/dist/components/kb-audit.mjs +4 -0
- package/dist/components/kb-canvas.mjs +4 -0
- package/dist/components/kb-chain.mjs +4 -0
- package/dist/components/kb-checkpoint.mjs +4 -0
- package/dist/components/kb-chunks.mjs +4 -0
- package/dist/components/kb-citation.mjs +4 -0
- package/dist/components/kb-clarify.mjs +4 -0
- package/dist/components/kb-conflict.mjs +4 -0
- package/dist/components/kb-connector.mjs +4 -0
- package/dist/components/kb-data.css +653 -0
- package/dist/components/kb-eval.mjs +4 -0
- package/dist/components/kb-explain.mjs +4 -0
- package/dist/components/kb-filter.mjs +4 -0
- package/dist/components/kb-gap.mjs +4 -0
- package/dist/components/kb-ground.css +578 -0
- package/dist/components/kb-hittest.mjs +4 -0
- package/dist/components/kb-ingest.css +882 -0
- package/dist/components/kb-metadata.mjs +4 -0
- package/dist/components/kb-ops.css +554 -0
- package/dist/components/kb-passage.mjs +4 -0
- package/dist/components/kb-perm.css +433 -0
- package/dist/components/kb-pipeline.mjs +4 -0
- package/dist/components/kb-qa.mjs +4 -0
- package/dist/components/kb-rerank.mjs +4 -0
- package/dist/components/kb-retrieval.mjs +4 -0
- package/dist/components/kb-review.mjs +4 -0
- package/dist/components/kb-sandbox.mjs +4 -0
- package/dist/components/kb-search.css +897 -0
- package/dist/components/kb-segment.mjs +4 -0
- package/dist/components/kb-sources.mjs +4 -0
- package/dist/components/kb-sql.mjs +4 -0
- package/dist/components/kb-trace.mjs +4 -0
- package/dist/components/kb-visibility.mjs +4 -0
- package/dist/components/kb-who-can.mjs +4 -0
- package/dist/components/kb.css +263 -0
- package/dist/components/kb.mjs +9 -0
- package/dist/components/layout.css +85 -82
- package/dist/components/material-chinese.css +73 -0
- package/dist/components/material-soviet.css +76 -0
- package/dist/components/material.css +275 -0
- package/dist/components/media.css +220 -166
- package/dist/components/mentions.css +189 -0
- package/dist/components/mentions.mjs +3 -0
- package/dist/components/menu.css +113 -105
- package/dist/components/modal.css +107 -112
- package/dist/components/nav.css +118 -115
- package/dist/components/notification.css +238 -174
- package/dist/components/pagination.css +56 -53
- package/dist/components/panel.css +66 -63
- package/dist/components/panel.mjs +1 -0
- package/dist/components/pill.css +81 -71
- package/dist/components/popover.css +67 -53
- package/dist/components/scroll-area.css +113 -110
- package/dist/components/segmented.css +146 -143
- package/dist/components/select.css +206 -186
- package/dist/components/sidebar.css +137 -127
- package/dist/components/slider.css +117 -114
- package/dist/components/split-pane.css +112 -109
- package/dist/components/stat.css +112 -106
- package/dist/components/steps.css +109 -103
- package/dist/components/switch.css +138 -134
- package/dist/components/table.css +131 -107
- package/dist/components/tabs.css +114 -108
- package/dist/components/tag-input.css +48 -133
- package/dist/components/tag.css +81 -71
- package/dist/components/theme-switcher.css +105 -0
- package/dist/components/theme-switcher.mjs +3 -0
- package/dist/components/toast.css +100 -86
- package/dist/components/toolbar.css +45 -42
- package/dist/components/tooltip.css +102 -43
- package/dist/components/tooltip.mjs +1 -0
- package/dist/components/tree-select.css +416 -0
- package/dist/components/tree-select.mjs +3 -0
- package/dist/components/upload.css +135 -92
- package/dist/fonts/LICENSES/ark-pixel/OFL.txt +96 -0
- package/dist/fonts/LICENSES/cubic-11/OFL.txt +108 -0
- package/dist/fonts/LICENSES/galmuri/LICENSE.txt +93 -0
- package/dist/fonts/OFL.txt +96 -0
- package/dist/fonts/README.md +14 -0
- package/dist/fonts/fusion-pixel-12px-zh-hans.woff2 +0 -0
- package/dist/index.d.mts +64 -15
- package/dist/index.mjs +28049 -8595
- package/dist/react.d.mts +91 -0
- package/dist/react.mjs +8208 -0
- package/dist/registry.json +454 -15
- package/dist/tokens/chinese.css +44 -0
- package/dist/tokens/colors.css +365 -1222
- package/dist/tokens/design.css +109 -0
- package/dist/tokens/dtcg.json +11198 -0
- package/dist/tokens/figma.variables.json +7017 -0
- package/dist/tokens/icon-masks.css +78 -0
- package/dist/tokens/pixel.css +50 -0
- package/dist/tokens/soviet.css +44 -0
- package/dist/tokens/style-profiles.css +36 -547
- package/dist/tokens/themes.json +308 -0
- package/dist/tokens/tokens-studio.json +6728 -0
- package/dist/tokens/typography.css +21 -18
- package/dist/tokens.css +1555 -1801
- package/dist/ui.css +16147 -8597
- package/dist/vue.d.mts +344 -0
- package/dist/vue.mjs +7781 -0
- package/docs/spec/ai-input-experience.md +75 -0
- package/docs/spec/ai-native.md +238 -147
- package/docs/spec/design-philosophy.md +189 -0
- package/docs/spec/design-primitives.md +196 -0
- package/docs/spec/kb-family.md +475 -0
- package/package.json +42 -7
- package/dist/retro-effects.css +0 -255
- package/dist/tokens/retro-effects.css +0 -255
|
@@ -1,36 +1,37 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: pagination(分页)
|
|
3
4
|
*
|
|
4
5
|
* 完整契约:
|
|
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>
|
|
6
|
+
* <icen-nav class="icen-pagination [icen-pagination--sm]" aria-label="分页">
|
|
7
|
+
* <button class="icen-page-btn icen-motion [.is-disabled]" aria-label="上一页" aria-disabled="true">‹</button>
|
|
8
|
+
* <button class="icen-page-btn icen-motion [.is-active]" aria-current="page">1</button>
|
|
9
|
+
* <span class="icen-page-ellipsis" aria-hidden="true">…</span>
|
|
10
|
+
* <button class="icen-page-btn icen-motion">5</button>
|
|
11
|
+
* <button class="icen-page-btn icen-motion" aria-label="下一页">›</button>
|
|
12
|
+
* </icen-nav>
|
|
12
13
|
*
|
|
13
|
-
* 点击接线由 behaviors/controls.ts 的 initPagination() 提供(.page-btn 激活位移 +
|
|
14
|
-
* icen:page-change,上下页按钮按 aria-label / data-dir 推断方向);总页数与省略号
|
|
14
|
+
* 点击接线由 behaviors/controls.ts 的 initPagination() 提供(.icen-page-btn 激活位移 +
|
|
15
|
+
* icen:page-change,上下页按钮按 aria-label / data-icen-dir 推断方向);总页数与省略号
|
|
15
16
|
* 折叠策略由消费方维护,这里只提供样式契约。
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
|
-
.pagination {
|
|
19
|
+
.icen-pagination {
|
|
19
20
|
display: flex;
|
|
20
21
|
align-items: center;
|
|
21
|
-
gap: var(--density-space-xs);
|
|
22
|
+
gap: var(--icen-density-space-xs);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
.page-btn {
|
|
25
|
+
.icen-page-btn {
|
|
25
26
|
min-width: 28px;
|
|
26
27
|
height: 28px;
|
|
27
|
-
padding: 0 var(--density-space-xs);
|
|
28
|
-
border-radius: var(--radius-sm);
|
|
29
|
-
font-size: var(--density-font-size-sm);
|
|
28
|
+
padding: 0 var(--icen-density-space-xs);
|
|
29
|
+
border-radius: var(--icen-radius-sm);
|
|
30
|
+
font-size: var(--icen-density-font-size-sm);
|
|
30
31
|
display: inline-flex;
|
|
31
32
|
align-items: center;
|
|
32
33
|
justify-content: center;
|
|
33
|
-
color: var(--token-text-muted);
|
|
34
|
+
color: var(--icen-token-text-muted);
|
|
34
35
|
background: none;
|
|
35
36
|
border: 0;
|
|
36
37
|
cursor: pointer;
|
|
@@ -39,82 +40,84 @@
|
|
|
39
40
|
background-color var(--icen-tx-fast),
|
|
40
41
|
color var(--icen-tx-fast);
|
|
41
42
|
}
|
|
42
|
-
.page-btn:not(.is-active):hover {
|
|
43
|
-
background: var(--token-control-hover);
|
|
44
|
-
color: var(--token-text);
|
|
43
|
+
.icen-page-btn:not(.is-active):hover {
|
|
44
|
+
background: var(--icen-token-control-hover);
|
|
45
|
+
color: var(--icen-token-text);
|
|
45
46
|
}
|
|
46
|
-
.page-btn:focus-visible {
|
|
47
|
+
.icen-page-btn:focus-visible {
|
|
47
48
|
outline: none;
|
|
48
49
|
box-shadow: var(--icen-ring);
|
|
49
50
|
}
|
|
50
|
-
.page-btn.is-active,
|
|
51
|
-
.page-btn[aria-current='page'] {
|
|
52
|
-
background: var(--token-accent);
|
|
53
|
-
color: var(--token-on-accent);
|
|
51
|
+
.icen-page-btn.is-active,
|
|
52
|
+
.icen-page-btn[aria-current='page'] {
|
|
53
|
+
background: var(--icen-token-accent-strong);
|
|
54
|
+
color: var(--icen-token-on-accent);
|
|
54
55
|
font-weight: 500;
|
|
55
|
-
box-shadow: var(--token-shadow-elevated);
|
|
56
|
+
box-shadow: var(--icen-token-shadow-elevated);
|
|
56
57
|
}
|
|
57
|
-
.page-btn.is-disabled,
|
|
58
|
-
.page-btn:disabled,
|
|
59
|
-
.page-btn[aria-disabled='true'] {
|
|
58
|
+
.icen-page-btn.is-disabled,
|
|
59
|
+
.icen-page-btn:disabled,
|
|
60
|
+
.icen-page-btn[aria-disabled='true'] {
|
|
60
61
|
opacity: var(--icen-disabled-opacity);
|
|
61
62
|
pointer-events: none;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
.page-ellipsis {
|
|
65
|
+
.icen-page-ellipsis {
|
|
65
66
|
min-width: 28px;
|
|
66
67
|
height: 28px;
|
|
67
|
-
font-size: var(--density-font-size-sm);
|
|
68
|
+
font-size: var(--icen-density-font-size-sm);
|
|
68
69
|
display: inline-flex;
|
|
69
70
|
align-items: center;
|
|
70
71
|
justify-content: center;
|
|
71
|
-
color: var(--token-text-faint);
|
|
72
|
+
color: var(--icen-token-text-faint);
|
|
72
73
|
user-select: none;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
/* 尺寸变体 */
|
|
76
|
-
.pagination--sm .page-btn,
|
|
77
|
-
.pagination--sm .page-ellipsis {
|
|
77
|
+
.icen-pagination--sm .icen-page-btn,
|
|
78
|
+
.icen-pagination--sm .icen-page-ellipsis {
|
|
78
79
|
min-width: 22px;
|
|
79
80
|
height: 22px;
|
|
80
|
-
font-size: var(--density-font-size-xs);
|
|
81
|
+
font-size: var(--icen-density-font-size-xs);
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
/* 带总数/跳页输入的复合体(behavior 可选渲染) */
|
|
84
|
-
.pagination-info {
|
|
85
|
-
font-size: var(--density-font-size-sm);
|
|
86
|
-
color: var(--token-text-faint);
|
|
85
|
+
.icen-pagination-info {
|
|
86
|
+
font-size: var(--icen-density-font-size-sm);
|
|
87
|
+
color: var(--icen-token-text-faint);
|
|
87
88
|
font-variant-numeric: tabular-nums;
|
|
88
|
-
margin-
|
|
89
|
+
margin-inline-start: var(--icen-density-space-sm);
|
|
89
90
|
}
|
|
90
|
-
.pagination-jump {
|
|
91
|
+
.icen-pagination-jump {
|
|
91
92
|
display: inline-flex;
|
|
92
93
|
align-items: center;
|
|
93
|
-
gap: var(--density-space-xs);
|
|
94
|
-
margin-
|
|
95
|
-
font-size: var(--density-font-size-sm);
|
|
96
|
-
color: var(--token-text-muted);
|
|
94
|
+
gap: var(--icen-density-space-xs);
|
|
95
|
+
margin-inline-start: var(--icen-density-space-sm);
|
|
96
|
+
font-size: var(--icen-density-font-size-sm);
|
|
97
|
+
color: var(--icen-token-text-muted);
|
|
97
98
|
}
|
|
98
|
-
.pagination-jump-input {
|
|
99
|
+
.icen-pagination-jump-input {
|
|
99
100
|
width: 56px;
|
|
100
101
|
height: 28px;
|
|
101
|
-
padding: 0 var(--density-space-xs);
|
|
102
|
+
padding: 0 var(--icen-density-space-xs);
|
|
102
103
|
text-align: center;
|
|
103
|
-
background: var(--token-control);
|
|
104
|
-
border: 1px solid var(--token-outline-soft);
|
|
105
|
-
border-radius: var(--radius-sm);
|
|
106
|
-
color: var(--token-text);
|
|
104
|
+
background: var(--icen-token-control);
|
|
105
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
106
|
+
border-radius: var(--icen-radius-sm);
|
|
107
|
+
color: var(--icen-token-text);
|
|
107
108
|
font: inherit;
|
|
108
|
-
font-size: var(--density-font-size-sm);
|
|
109
|
+
font-size: var(--icen-density-font-size-sm);
|
|
109
110
|
transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
|
|
110
111
|
}
|
|
111
|
-
.pagination-jump-input:hover { border-color: var(--icen-hover-border); }
|
|
112
|
-
.pagination-jump-input:focus-visible {
|
|
112
|
+
.icen-pagination-jump-input:hover { border-color: var(--icen-hover-border); }
|
|
113
|
+
.icen-pagination-jump-input:focus-visible {
|
|
113
114
|
outline: none;
|
|
114
115
|
border-color: var(--icen-control-focus-border);
|
|
115
116
|
box-shadow: var(--icen-control-focus-shadow);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
@media (prefers-reduced-motion: reduce) {
|
|
119
|
-
.page-btn { transition: none; }
|
|
120
|
+
.icen-page-btn { transition: none; }
|
|
121
|
+
}
|
|
122
|
+
|
|
120
123
|
}
|
|
@@ -1,86 +1,87 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: panel(白卡片容器 + 标题栏 + 可选 footer)
|
|
3
4
|
*
|
|
4
5
|
* 完整契约:
|
|
5
|
-
* <div class="panel [panel--flush] [panel--accent]
|
|
6
|
+
* <div class="icen-panel [icen-panel--flush] [icen-panel--accent]
|
|
6
7
|
* [panel--collapsible] [.is-collapsed]">
|
|
7
|
-
* <div class="panel-title">
|
|
8
|
-
* <div class="panel-title-text">
|
|
8
|
+
* <div class="icen-panel-title">
|
|
9
|
+
* <div class="icen-panel-title-text">
|
|
9
10
|
* <span>标题</span>
|
|
10
|
-
* <span class="panel-subtitle">副标题描述</span> ← 可选
|
|
11
|
+
* <span class="icen-panel-subtitle">副标题描述</span> ← 可选
|
|
11
12
|
* </div>
|
|
12
|
-
* <div class="panel-title-actions">
|
|
13
|
-
* <button class="btn btn-sm">…</button>
|
|
14
|
-
* <button class="panel-toggle" aria-expanded="true"> ← collapsible 模式
|
|
15
|
-
* <svg class="panel-toggle-icon">…chevron…</svg>
|
|
13
|
+
* <div class="icen-panel-title-actions">
|
|
14
|
+
* <button class="icen-btn icen-btn-sm">…</button>
|
|
15
|
+
* <button class="icen-panel-toggle" aria-expanded="true"> ← collapsible 模式
|
|
16
|
+
* <svg class="icen-panel-toggle-icon">…chevron…</svg>
|
|
16
17
|
* </button>
|
|
17
18
|
* </div>
|
|
18
19
|
* </div>
|
|
19
|
-
* <div class="panel-body">…</div>
|
|
20
|
-
* <div class="panel-foot">…可选底栏</div>
|
|
20
|
+
* <div class="icen-panel-body">…</div>
|
|
21
|
+
* <div class="icen-panel-foot">…可选底栏</div>
|
|
21
22
|
* </div>
|
|
22
23
|
*
|
|
23
24
|
* --flush:body 不留 padding,使用方自行处理内层布局。
|
|
24
25
|
* --collapsible:标题栏出现展开/折叠钮(behavior 可选,也可靠纯 CSS details/summary)。
|
|
25
26
|
* --accent:强调色标题边。
|
|
26
|
-
* .panel-subtitle:标题下方的副标题/描述文字。
|
|
27
|
-
* .panel.is-collapsed:折叠态——隐藏 body + foot。
|
|
27
|
+
* .icen-panel-subtitle:标题下方的副标题/描述文字。
|
|
28
|
+
* .icen-panel.is-collapsed:折叠态——隐藏 body + foot。
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
|
-
.panel {
|
|
31
|
-
background: var(--token-surface);
|
|
32
|
-
border: 1px solid var(--token-line-soft);
|
|
33
|
-
border-radius: var(--radius-lg);
|
|
34
|
-
box-shadow: var(--token-shadow-elevated);
|
|
35
|
-
margin-bottom: var(--density-space-lg);
|
|
31
|
+
.icen-panel {
|
|
32
|
+
background: var(--icen-token-surface);
|
|
33
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
34
|
+
border-radius: var(--icen-radius-lg);
|
|
35
|
+
box-shadow: var(--icen-token-shadow-elevated);
|
|
36
|
+
margin-bottom: var(--icen-density-space-lg);
|
|
36
37
|
overflow: hidden;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/* ── 标题栏 ── */
|
|
40
|
-
.panel-title {
|
|
41
|
+
.icen-panel-title {
|
|
41
42
|
display: flex;
|
|
42
43
|
align-items: center;
|
|
43
44
|
justify-content: space-between;
|
|
44
|
-
gap: var(--density-space-sm);
|
|
45
|
-
padding: var(--density-space-sm) var(--density-space-md);
|
|
46
|
-
border-bottom: 1px solid var(--token-line-soft);
|
|
47
|
-
font-size: var(--density-font-size-xs);
|
|
45
|
+
gap: var(--icen-density-space-sm);
|
|
46
|
+
padding: var(--icen-density-space-sm) var(--icen-density-space-md);
|
|
47
|
+
border-bottom: 1px solid var(--icen-token-line-soft);
|
|
48
|
+
font-size: var(--icen-density-font-size-xs);
|
|
48
49
|
letter-spacing: 0.08em;
|
|
49
|
-
color: var(--token-text-muted);
|
|
50
|
+
color: var(--icen-token-text-muted);
|
|
50
51
|
text-transform: uppercase;
|
|
51
52
|
font-weight: 600;
|
|
52
53
|
}
|
|
53
|
-
.panel-title-text {
|
|
54
|
+
.icen-panel-title-text {
|
|
54
55
|
flex: 1;
|
|
55
56
|
min-width: 0;
|
|
56
57
|
display: flex;
|
|
57
58
|
flex-direction: column;
|
|
58
59
|
gap: 1px;
|
|
59
60
|
}
|
|
60
|
-
.panel-title-text > span:first-child {
|
|
61
|
+
.icen-panel-title-text > span:first-child {
|
|
61
62
|
overflow: hidden;
|
|
62
63
|
text-overflow: ellipsis;
|
|
63
64
|
white-space: nowrap;
|
|
64
65
|
}
|
|
65
|
-
.panel-subtitle {
|
|
66
|
-
font-size: var(--density-font-size-xs);
|
|
66
|
+
.icen-panel-subtitle {
|
|
67
|
+
font-size: var(--icen-density-font-size-xs);
|
|
67
68
|
font-weight: 400;
|
|
68
69
|
letter-spacing: 0;
|
|
69
70
|
text-transform: none;
|
|
70
|
-
color: var(--token-text-faint);
|
|
71
|
+
color: var(--icen-token-text-faint);
|
|
71
72
|
overflow: hidden;
|
|
72
73
|
text-overflow: ellipsis;
|
|
73
74
|
white-space: nowrap;
|
|
74
75
|
}
|
|
75
|
-
.panel-title-actions {
|
|
76
|
+
.icen-panel-title-actions {
|
|
76
77
|
display: flex;
|
|
77
78
|
align-items: center;
|
|
78
|
-
gap: var(--density-space-xs);
|
|
79
|
+
gap: var(--icen-density-space-xs);
|
|
79
80
|
flex-shrink: 0;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
/* ── 可折叠钮 ── */
|
|
83
|
-
.panel-toggle {
|
|
84
|
+
.icen-panel-toggle {
|
|
84
85
|
display: inline-flex;
|
|
85
86
|
align-items: center;
|
|
86
87
|
justify-content: center;
|
|
@@ -89,38 +90,38 @@
|
|
|
89
90
|
padding: 0;
|
|
90
91
|
border: none;
|
|
91
92
|
background: transparent;
|
|
92
|
-
color: var(--token-text-faint);
|
|
93
|
+
color: var(--icen-token-text-faint);
|
|
93
94
|
cursor: pointer;
|
|
94
|
-
border-radius: var(--radius-xs);
|
|
95
|
+
border-radius: var(--icen-radius-xs);
|
|
95
96
|
transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
|
|
96
97
|
}
|
|
97
|
-
.panel-toggle:hover {
|
|
98
|
-
color: var(--token-text);
|
|
99
|
-
background: var(--token-fill-1);
|
|
98
|
+
.icen-panel-toggle:hover {
|
|
99
|
+
color: var(--icen-token-text);
|
|
100
|
+
background: var(--icen-token-fill-1);
|
|
100
101
|
}
|
|
101
|
-
.panel-toggle:focus-visible {
|
|
102
|
+
.icen-panel-toggle:focus-visible {
|
|
102
103
|
outline: none;
|
|
103
104
|
box-shadow: var(--icen-ring);
|
|
104
105
|
}
|
|
105
|
-
.panel-toggle-icon {
|
|
106
|
+
.icen-panel-toggle-icon {
|
|
106
107
|
width: 14px;
|
|
107
108
|
height: 14px;
|
|
108
109
|
transition: transform var(--icen-tx-fast);
|
|
109
110
|
}
|
|
110
|
-
.panel.is-collapsed .panel-toggle-icon {
|
|
111
|
+
.icen-panel.is-collapsed .icen-panel-toggle-icon {
|
|
111
112
|
transform: rotate(-90deg);
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
/* ── 折叠态:隐藏 body + foot,去掉标题栏底边 ── */
|
|
115
|
-
.panel.is-collapsed .panel-body,
|
|
116
|
-
.panel.is-collapsed .panel-foot {
|
|
116
|
+
.icen-panel.is-collapsed .icen-panel-body,
|
|
117
|
+
.icen-panel.is-collapsed .icen-panel-foot {
|
|
117
118
|
display: none;
|
|
118
119
|
}
|
|
119
|
-
.panel.is-collapsed .panel-title {
|
|
120
|
+
.icen-panel.is-collapsed .icen-panel-title {
|
|
120
121
|
border-bottom-color: transparent;
|
|
121
122
|
}
|
|
122
|
-
.panel--collapsible .panel-body {
|
|
123
|
-
animation: panel-expand var(--icen-tx-normal) var(--ease-out);
|
|
123
|
+
.icen-panel--collapsible .icen-panel-body {
|
|
124
|
+
animation: panel-expand var(--icen-tx-normal) var(--icen-ease-out);
|
|
124
125
|
}
|
|
125
126
|
@keyframes panel-expand {
|
|
126
127
|
from { opacity: 0; transform: translateY(-8px); }
|
|
@@ -128,42 +129,44 @@
|
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
/* ── body / foot ── */
|
|
131
|
-
.panel-body {
|
|
132
|
-
padding: var(--density-space-md);
|
|
133
|
-
font-size: var(--density-font-size-md);
|
|
132
|
+
.icen-panel-body {
|
|
133
|
+
padding: var(--icen-density-space-md);
|
|
134
|
+
font-size: var(--icen-density-font-size-md);
|
|
134
135
|
line-height: 1.6;
|
|
135
136
|
}
|
|
136
|
-
.panel--flush .panel-body { padding: 0; }
|
|
137
|
+
.icen-panel--flush .icen-panel-body { padding: 0; }
|
|
137
138
|
|
|
138
|
-
.panel-foot {
|
|
139
|
+
.icen-panel-foot {
|
|
139
140
|
display: flex;
|
|
140
141
|
align-items: center;
|
|
141
142
|
justify-content: flex-end;
|
|
142
|
-
gap: var(--density-space-sm);
|
|
143
|
-
padding: var(--density-space-sm) var(--density-space-md);
|
|
144
|
-
border-top: 1px solid var(--token-line-soft);
|
|
145
|
-
background: color-mix(in srgb, var(--token-bg-soft) 50%, transparent);
|
|
143
|
+
gap: var(--icen-density-space-sm);
|
|
144
|
+
padding: var(--icen-density-space-sm) var(--icen-density-space-md);
|
|
145
|
+
border-top: 1px solid var(--icen-token-line-soft);
|
|
146
|
+
background: color-mix(in srgb, var(--icen-token-bg-soft) 50%, transparent);
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
/* ── 强调变体 ── */
|
|
149
|
-
.panel--accent { border-color: color-mix(in srgb, var(--token-accent) 30%, transparent); }
|
|
150
|
-
.panel--accent .panel-title {
|
|
151
|
-
color: var(--token-accent);
|
|
152
|
-
background: var(--token-accent-subtle);
|
|
150
|
+
.icen-panel--accent { border-color: color-mix(in srgb, var(--icen-token-accent) 30%, transparent); }
|
|
151
|
+
.icen-panel--accent .icen-panel-title {
|
|
152
|
+
color: var(--icen-token-accent);
|
|
153
|
+
background: var(--icen-token-accent-subtle);
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
/* ── 平面变体(无阴影,嵌套时用) ── */
|
|
156
|
-
.panel--flat {
|
|
157
|
+
.icen-panel--flat {
|
|
157
158
|
box-shadow: none;
|
|
158
|
-
background: var(--token-bg-soft);
|
|
159
|
+
background: var(--icen-token-bg-soft);
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
/* ── 可折叠模式:标题栏可点(纯 CSS 方案用 details/summary) ── */
|
|
162
|
-
.panel--collapsible .panel-title {
|
|
163
|
+
.icen-panel--collapsible .icen-panel-title {
|
|
163
164
|
cursor: pointer;
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
@media (prefers-reduced-motion: reduce) {
|
|
167
|
-
.panel-toggle-icon { transition: none; }
|
|
168
|
-
.panel--collapsible .panel-body { animation: none; }
|
|
168
|
+
.icen-panel-toggle-icon { transition: none; }
|
|
169
|
+
.icen-panel--collapsible .icen-panel-body { animation: none; }
|
|
170
|
+
}
|
|
171
|
+
|
|
169
172
|
}
|
package/dist/components/pill.css
CHANGED
|
@@ -1,131 +1,132 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: pill(状态徽章 / tag)
|
|
3
4
|
*
|
|
4
5
|
* 完整契约:
|
|
5
|
-
* <span class="pill [pill--success|pill--warning|pill--error|pill--info|pill--accent] [.pill--dot|pill--outline|pill--sm]">文本</span>
|
|
6
|
+
* <span class="icen-pill [icen-pill--success|icen-pill--warning|icen-pill--error|icen-pill--info|icen-pill--accent] [.icen-pill--dot|icen-pill--outline|icen-pill--sm]">文本</span>
|
|
6
7
|
*
|
|
7
8
|
* 语义色纪律:仅绿/黄/红/信息 + 品牌 accent。
|
|
8
|
-
* --dot
|
|
9
|
+
* --dot:起始缘加状态色圆点(RTL 镜像到右侧);--outline:透明底、纯描边;--sm:紧凑尺寸。
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
|
-
.pill {
|
|
12
|
+
.icen-pill {
|
|
12
13
|
display: inline-flex;
|
|
13
14
|
align-items: center;
|
|
14
15
|
gap: 4px;
|
|
15
|
-
padding: 2px var(--density-space-sm);
|
|
16
|
-
border-radius: var(--radius-full);
|
|
17
|
-
font-size: var(--density-font-size-xs);
|
|
16
|
+
padding: 2px var(--icen-density-space-sm);
|
|
17
|
+
border-radius: var(--icen-radius-full);
|
|
18
|
+
font-size: var(--icen-density-font-size-xs);
|
|
18
19
|
letter-spacing: 0.02em;
|
|
19
20
|
font-weight: 500;
|
|
20
|
-
background: var(--token-surface-strong);
|
|
21
|
-
color: var(--token-text-muted);
|
|
22
|
-
border: 1px solid var(--token-line-soft);
|
|
21
|
+
background: var(--icen-token-surface-strong);
|
|
22
|
+
color: var(--icen-token-text-muted);
|
|
23
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
23
24
|
white-space: nowrap;
|
|
24
25
|
vertical-align: middle;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
.pill--success {
|
|
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);
|
|
31
|
-
}
|
|
32
|
-
.pill--warning {
|
|
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);
|
|
36
|
-
}
|
|
37
|
-
.pill--error {
|
|
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);
|
|
41
|
-
}
|
|
42
|
-
.pill--accent {
|
|
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);
|
|
28
|
+
.icen-pill--success {
|
|
29
|
+
color: var(--icen-token-success);
|
|
30
|
+
border-color: color-mix(in srgb, var(--icen-token-success) 35%, transparent);
|
|
31
|
+
background: color-mix(in srgb, var(--icen-token-success) 9%, transparent);
|
|
32
|
+
}
|
|
33
|
+
.icen-pill--warning {
|
|
34
|
+
color: var(--icen-token-warning);
|
|
35
|
+
border-color: color-mix(in srgb, var(--icen-token-warning) 35%, transparent);
|
|
36
|
+
background: color-mix(in srgb, var(--icen-token-warning) 9%, transparent);
|
|
37
|
+
}
|
|
38
|
+
.icen-pill--error {
|
|
39
|
+
color: var(--icen-token-error);
|
|
40
|
+
border-color: color-mix(in srgb, var(--icen-token-error) 35%, transparent);
|
|
41
|
+
background: color-mix(in srgb, var(--icen-token-error) 9%, transparent);
|
|
42
|
+
}
|
|
43
|
+
.icen-pill--accent {
|
|
44
|
+
color: var(--icen-token-accent-deep, var(--icen-token-accent));
|
|
45
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 40%, transparent);
|
|
46
|
+
background: color-mix(in srgb, var(--icen-token-accent) 9%, transparent);
|
|
47
|
+
}
|
|
48
|
+
.icen-pill--info {
|
|
49
|
+
color: var(--icen-token-info);
|
|
50
|
+
border-color: color-mix(in srgb, var(--icen-token-info) 35%, transparent);
|
|
51
|
+
background: color-mix(in srgb, var(--icen-token-info) 9%, transparent);
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
/*
|
|
54
|
-
.pill--dot::before {
|
|
54
|
+
/* 点状变体:起始缘状态色圆点(RTL 镜像到右侧) */
|
|
55
|
+
.icen-pill--dot::before {
|
|
55
56
|
content: '';
|
|
56
57
|
display: inline-block;
|
|
57
58
|
width: 6px;
|
|
58
59
|
height: 6px;
|
|
59
|
-
border-radius: var(--radius-full);
|
|
60
|
+
border-radius: var(--icen-radius-full);
|
|
60
61
|
background: currentColor;
|
|
61
62
|
flex-shrink: 0;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
/* 描边变体:透明底,仅描边 */
|
|
65
|
-
.pill--outline {
|
|
66
|
-
background: transparent !important;
|
|
66
|
+
.icen-pill--outline {
|
|
67
|
+
background: transparent !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/* 尺寸变体 */
|
|
70
|
-
.pill--sm {
|
|
71
|
-
padding: 1px var(--density-space-xs);
|
|
72
|
-
font-size: var(--density-font-size-2xs);
|
|
71
|
+
.icen-pill--sm {
|
|
72
|
+
padding: 1px var(--icen-density-space-xs);
|
|
73
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
73
74
|
}
|
|
74
|
-
.pill--lg {
|
|
75
|
-
padding: 4px calc(var(--density-space-sm) + 2px);
|
|
76
|
-
font-size: var(--density-font-size-sm);
|
|
75
|
+
.icen-pill--lg {
|
|
76
|
+
padding: 4px calc(var(--icen-density-space-sm) + 2px);
|
|
77
|
+
font-size: var(--icen-density-font-size-sm);
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
/* 实色变体:accent 实底(用于 count、活跃状态等强调场景) */
|
|
80
|
-
.pill--solid {
|
|
81
|
-
background: var(--token-accent);
|
|
82
|
-
color: var(--token-on-accent);
|
|
83
|
-
border-color: var(--token-accent);
|
|
84
|
-
}
|
|
85
|
-
.pill--solid.pill--success { background: var(--token-success); border-color: var(--token-success); }
|
|
86
|
-
.pill--solid.pill--warning { background: var(--token-warning); border-color: var(--token-warning); }
|
|
87
|
-
.pill--solid.pill--error { background: var(--token-error); border-color: var(--token-error); }
|
|
88
|
-
.pill--solid.pill--info { background: var(--token-info); border-color: var(--token-info); }
|
|
81
|
+
.icen-pill--solid {
|
|
82
|
+
background: var(--icen-token-accent-strong);
|
|
83
|
+
color: var(--icen-token-on-accent);
|
|
84
|
+
border-color: var(--icen-token-accent-strong);
|
|
85
|
+
}
|
|
86
|
+
.icen-pill--solid.icen-pill--success { background: var(--icen-token-success); border-color: var(--icen-token-success); }
|
|
87
|
+
.icen-pill--solid.icen-pill--warning { background: var(--icen-token-warning); border-color: var(--icen-token-warning); }
|
|
88
|
+
.icen-pill--solid.icen-pill--error { background: var(--icen-token-error); border-color: var(--icen-token-error); }
|
|
89
|
+
.icen-pill--solid.icen-pill--info { background: var(--icen-token-info); border-color: var(--icen-token-info); }
|
|
89
90
|
|
|
90
91
|
/* ── 增强 ── */
|
|
91
92
|
|
|
92
93
|
/* 可关闭 pill */
|
|
93
|
-
.pill-close {
|
|
94
|
+
.icen-pill-close {
|
|
94
95
|
display: inline-flex;
|
|
95
96
|
align-items: center;
|
|
96
97
|
justify-content: center;
|
|
97
98
|
width: 14px;
|
|
98
99
|
height: 14px;
|
|
99
|
-
margin-
|
|
100
|
-
margin-
|
|
100
|
+
margin-inline-start: 2px;
|
|
101
|
+
margin-inline-end: -4px;
|
|
101
102
|
padding: 0;
|
|
102
103
|
border: 0;
|
|
103
|
-
border-radius: var(--radius-full);
|
|
104
|
+
border-radius: var(--icen-radius-full);
|
|
104
105
|
background: transparent;
|
|
105
106
|
color: inherit;
|
|
106
107
|
opacity: 0.6;
|
|
107
108
|
cursor: pointer;
|
|
108
109
|
transition: opacity var(--icen-tx-fast), background-color var(--icen-tx-fast);
|
|
109
110
|
}
|
|
110
|
-
.pill-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 15%, transparent); }
|
|
111
|
-
.pill-close svg { width: 9px; height: 9px; }
|
|
111
|
+
.icen-pill-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 15%, transparent); }
|
|
112
|
+
.icen-pill-close svg { width: 9px; height: 9px; }
|
|
112
113
|
|
|
113
114
|
/* 图标 pill */
|
|
114
|
-
.pill-icon {
|
|
115
|
+
.icen-pill-icon {
|
|
115
116
|
display: inline-flex;
|
|
116
117
|
align-items: center;
|
|
117
118
|
}
|
|
118
|
-
.pill-icon svg { width: 10px; height: 10px; }
|
|
119
|
+
.icen-pill-icon svg { width: 10px; height: 10px; }
|
|
119
120
|
|
|
120
121
|
/* 实时脉冲(用于"直播"/"实时"状态) */
|
|
121
|
-
.pill--live::before {
|
|
122
|
+
.icen-pill--live::before {
|
|
122
123
|
content: '';
|
|
123
124
|
display: inline-block;
|
|
124
125
|
width: 6px;
|
|
125
126
|
height: 6px;
|
|
126
|
-
border-radius: var(--radius-full);
|
|
127
|
+
border-radius: var(--icen-radius-full);
|
|
127
128
|
background: currentColor;
|
|
128
|
-
margin-
|
|
129
|
+
margin-inline-end: 2px;
|
|
129
130
|
animation: pill-pulse var(--pill-pulse-duration, 1.5s) ease-in-out infinite;
|
|
130
131
|
}
|
|
131
132
|
@keyframes pill-pulse {
|
|
@@ -134,25 +135,34 @@
|
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
/* 纯数字计数(不带文字) */
|
|
137
|
-
.pill--count {
|
|
138
|
+
.icen-pill--count {
|
|
138
139
|
min-width: 18px;
|
|
139
140
|
height: 18px;
|
|
140
141
|
padding: 0 5px;
|
|
141
142
|
justify-content: center;
|
|
142
|
-
font-size: var(--density-font-size-2xs);
|
|
143
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
143
144
|
font-weight: 700;
|
|
144
145
|
font-variant-numeric: tabular-nums;
|
|
145
146
|
line-height: 1;
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
/* 渐变变体 */
|
|
149
|
-
.pill--gradient {
|
|
150
|
-
background: linear-gradient(135deg, var(--token-accent), var(--token-accent-deep, var(--token-accent)));
|
|
151
|
-
color: var(--token-on-accent);
|
|
150
|
+
.icen-pill--gradient {
|
|
151
|
+
background: linear-gradient(135deg, var(--icen-token-accent), var(--icen-token-accent-deep, var(--icen-token-accent)));
|
|
152
|
+
color: var(--icen-token-on-accent);
|
|
152
153
|
border-color: transparent;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
@media (prefers-reduced-motion: reduce) {
|
|
156
|
-
.pill--live::before { animation: none; }
|
|
157
|
-
.pill-close { transition: none; }
|
|
157
|
+
.icen-pill--live::before { animation: none; }
|
|
158
|
+
.icen-pill-close { transition: none; }
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Stable secondary-action slot: reveal is optical rather than a width change. */
|
|
162
|
+
@media (hover: hover) and (pointer: fine) {
|
|
163
|
+
.icen-pill-close { opacity: 0; }
|
|
164
|
+
.icen-pill:is(:hover,:focus-within) .icen-pill-close { opacity: 1; }
|
|
165
|
+
}
|
|
166
|
+
@media (pointer: coarse) { .icen-pill-close { min-inline-size: 28px; min-block-size: 28px; opacity: 1; } }
|
|
167
|
+
|
|
158
168
|
}
|