@icen.ai/ui 0.9.0 → 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 +138 -80
- package/README.md +66 -91
- package/dist/base.css +208 -179
- package/dist/behaviors/accordion.mjs +8 -8
- package/dist/behaviors/ai-branch.d.mts +1 -1
- package/dist/behaviors/ai-branch.mjs +1010 -94
- package/dist/behaviors/ai-chat.d.mts +7 -7
- package/dist/behaviors/ai-chat.mjs +1071 -161
- package/dist/behaviors/ai-composer.d.mts +44 -12
- package/dist/behaviors/ai-composer.mjs +1997 -524
- 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 +1 -1
- package/dist/behaviors/ai-feedback.mjs +1035 -126
- package/dist/behaviors/ai-panel.d.mts +8 -8
- package/dist/behaviors/ai-panel.mjs +1284 -266
- package/dist/behaviors/ai-provider.mjs +1003 -101
- package/dist/behaviors/ai-threads.d.mts +1 -1
- package/dist/behaviors/ai-threads.mjs +1068 -154
- package/dist/behaviors/ai-tool.d.mts +2 -2
- package/dist/behaviors/ai-tool.mjs +2037 -396
- package/dist/behaviors/ai-tools.d.mts +89 -16
- package/dist/behaviors/ai-tools.mjs +4448 -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 +72 -8
- package/dist/behaviors/charts.mjs +1901 -256
- 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 +120 -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 +1 -1
- package/dist/behaviors/kb-access.mjs +2129 -239
- package/dist/behaviors/kb-acl.d.mts +6 -6
- package/dist/behaviors/kb-acl.mjs +1119 -179
- package/dist/behaviors/kb-answer.mjs +2070 -418
- package/dist/behaviors/kb-audit.d.mts +1 -1
- package/dist/behaviors/kb-audit.mjs +1076 -154
- package/dist/behaviors/kb-canvas.mjs +1100 -177
- package/dist/behaviors/kb-chain.mjs +1022 -100
- package/dist/behaviors/kb-checkpoint.d.mts +1 -1
- package/dist/behaviors/kb-checkpoint.mjs +1319 -169
- package/dist/behaviors/kb-chunks.mjs +1152 -213
- package/dist/behaviors/kb-citation.d.mts +1 -1
- package/dist/behaviors/kb-citation.mjs +1201 -179
- package/dist/behaviors/kb-clarify.mjs +1058 -130
- package/dist/behaviors/kb-conflict.mjs +1041 -119
- package/dist/behaviors/kb-connector.mjs +1104 -176
- package/dist/behaviors/kb-core.d.mts +6 -1
- package/dist/behaviors/kb-core.mjs +1077 -162
- package/dist/behaviors/kb-eval.mjs +1971 -144
- package/dist/behaviors/kb-explain.d.mts +1 -1
- package/dist/behaviors/kb-explain.mjs +1024 -102
- package/dist/behaviors/kb-filter.mjs +2008 -178
- package/dist/behaviors/kb-gap.d.mts +1 -1
- package/dist/behaviors/kb-gap.mjs +1043 -121
- package/dist/behaviors/kb-hittest.d.mts +1 -1
- package/dist/behaviors/kb-hittest.mjs +1093 -150
- package/dist/behaviors/kb-metadata.mjs +1052 -130
- package/dist/behaviors/kb-passage.d.mts +2 -2
- package/dist/behaviors/kb-passage.mjs +1101 -161
- package/dist/behaviors/kb-pipeline.d.mts +2 -2
- package/dist/behaviors/kb-pipeline.mjs +1082 -162
- package/dist/behaviors/kb-qa.mjs +1088 -160
- package/dist/behaviors/kb-rerank.mjs +1047 -114
- package/dist/behaviors/kb-retrieval.mjs +2063 -224
- package/dist/behaviors/kb-review.mjs +1990 -159
- package/dist/behaviors/kb-sandbox.d.mts +1 -1
- package/dist/behaviors/kb-sandbox.mjs +1026 -104
- package/dist/behaviors/kb-segment.mjs +1111 -179
- package/dist/behaviors/kb-select.d.mts +24 -0
- package/dist/behaviors/kb-select.mjs +1989 -0
- package/dist/behaviors/kb-sources.d.mts +1 -1
- package/dist/behaviors/kb-sources.mjs +1084 -170
- package/dist/behaviors/kb-sql.d.mts +1 -1
- package/dist/behaviors/kb-sql.mjs +1143 -226
- package/dist/behaviors/kb-trace.d.mts +1 -1
- package/dist/behaviors/kb-trace.mjs +1042 -128
- package/dist/behaviors/kb-visibility.mjs +1086 -158
- package/dist/behaviors/kb-who-can.mjs +1974 -137
- 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-chat.css +666 -573
- package/dist/components/ai-diff.css +153 -132
- package/dist/components/ai-panel.css +351 -343
- 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 +20 -17
- package/dist/components/chart-heatmap.css +96 -90
- package/dist/components/chart-line.css +8 -3
- 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-sparkline.css +5 -2
- package/dist/components/chart-stack.css +14 -11
- package/dist/components/charts.css +164 -73
- 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-agent.css +188 -173
- package/dist/components/kb-data.css +257 -253
- package/dist/components/kb-ground.css +197 -185
- package/dist/components/kb-ingest.css +334 -350
- package/dist/components/kb-ops.css +265 -259
- package/dist/components/kb-perm.css +260 -271
- package/dist/components/kb-search.css +317 -360
- package/dist/components/kb.css +120 -109
- 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 +28 -14
- package/dist/index.mjs +20705 -9601
- package/dist/react.d.mts +91 -0
- package/dist/react.mjs +8208 -0
- package/dist/registry.json +130 -13
- 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 +11975 -9831
- 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 +147 -115
- package/package.json +43 -8
- package/dist/retro-effects.css +0 -255
- package/dist/tokens/retro-effects.css +0 -255
- package/docs/research/2026-10-03-ai-kb-components.md +0 -392
- package/docs/research/2026-10-03-kb-permissions.md +0 -992
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: switch / checkbox / radio(开关 / 勾选 / 单选行)
|
|
3
4
|
* 状态组件:状态全走 aria-checked / .is-selected;交互由 behaviors/controls.ts 的
|
|
@@ -5,24 +6,24 @@
|
|
|
5
6
|
* 不接线时亦可由使用方自行驱动状态。
|
|
6
7
|
*
|
|
7
8
|
* 完整契约:
|
|
8
|
-
* <button class="switch [--sm|--lg]" role="switch" aria-checked="true|false" [disabled]>
|
|
9
|
-
* <span class="switch-thumb"></span>
|
|
9
|
+
* <button class="icen-switch [--sm|--lg]" role="switch" aria-checked="true|false" [disabled]>
|
|
10
|
+
* <span class="icen-switch-thumb"></span>
|
|
10
11
|
* </button>
|
|
11
12
|
*
|
|
12
|
-
* <button class="checkbox focus-ring [--sm|--lg]" role="checkbox"
|
|
13
|
+
* <button class="icen-checkbox icen-focus-ring [--sm|--lg]" role="checkbox"
|
|
13
14
|
* aria-checked="true|false|mixed" [disabled]></button>
|
|
14
15
|
*
|
|
15
|
-
* <div class="radio-group" role="radiogroup">
|
|
16
|
-
* <button class="radio-item motion [.is-selected]" role="radio"
|
|
16
|
+
* <div class="icen-radio-group" role="radiogroup">
|
|
17
|
+
* <button class="icen-radio-item icen-motion [.is-selected]" role="radio"
|
|
17
18
|
* aria-checked="true|false" [disabled]>
|
|
18
|
-
* <span class="radio-dot"></span>
|
|
19
|
+
* <span class="icen-radio-dot"></span>
|
|
19
20
|
* <span>标签</span>
|
|
20
21
|
* </button>
|
|
21
22
|
* </div>
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
25
|
/* ── 开关 ── */
|
|
25
|
-
.switch {
|
|
26
|
+
.icen-switch {
|
|
26
27
|
--switch-w: 44px;
|
|
27
28
|
--switch-h: 24px;
|
|
28
29
|
--switch-thumb: 20px;
|
|
@@ -33,48 +34,48 @@
|
|
|
33
34
|
height: var(--switch-h);
|
|
34
35
|
padding: 0;
|
|
35
36
|
border: none;
|
|
36
|
-
border-radius: var(--radius-full);
|
|
37
|
-
background: var(--token-control-hover);
|
|
37
|
+
border-radius: var(--icen-radius-full);
|
|
38
|
+
background: var(--icen-token-control-hover);
|
|
38
39
|
cursor: pointer;
|
|
39
40
|
-webkit-tap-highlight-color: transparent;
|
|
40
41
|
transition: background-color var(--icen-tx-normal);
|
|
41
42
|
}
|
|
42
|
-
.switch[aria-checked='true'] {
|
|
43
|
-
background: var(--token-accent);
|
|
43
|
+
.icen-switch[aria-checked='true'] {
|
|
44
|
+
background: var(--icen-token-accent);
|
|
44
45
|
}
|
|
45
|
-
.switch:disabled,
|
|
46
|
-
.switch[aria-disabled='true'],
|
|
47
|
-
.switch[data-disabled] {
|
|
46
|
+
.icen-switch:disabled,
|
|
47
|
+
.icen-switch[aria-disabled='true'],
|
|
48
|
+
.icen-switch[data-icen-disabled] {
|
|
48
49
|
opacity: var(--icen-disabled-opacity);
|
|
49
50
|
cursor: not-allowed;
|
|
50
51
|
}
|
|
51
|
-
.switch:focus-visible {
|
|
52
|
+
.icen-switch:focus-visible {
|
|
52
53
|
outline: none;
|
|
53
54
|
box-shadow: var(--icen-ring);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
.switch-thumb {
|
|
57
|
+
.icen-switch-thumb {
|
|
57
58
|
position: absolute;
|
|
58
59
|
top: 50%;
|
|
59
|
-
left: calc((var(--switch-h) - var(--switch-thumb)) / 2);
|
|
60
|
+
left: calc((var(--switch-h) - var(--switch-thumb)) / 2); /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下开/关方向保持物理,不镜像) */
|
|
60
61
|
transform: translateY(-50%);
|
|
61
62
|
width: var(--switch-thumb);
|
|
62
63
|
height: var(--switch-thumb);
|
|
63
|
-
border-radius: var(--radius-full);
|
|
64
|
-
background: var(--token-on-accent);
|
|
65
|
-
box-shadow: 0 1px 2px color-mix(in srgb, var(--token-text) 15%, transparent);
|
|
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);
|
|
66
67
|
transition: transform var(--icen-tx-bounce);
|
|
67
68
|
}
|
|
68
|
-
.switch[aria-checked='true'] .switch-thumb {
|
|
69
|
-
transform: translateY(-50%) translateX(calc(var(--switch-w) - var(--switch-h)));
|
|
69
|
+
.icen-switch[aria-checked='true'] .icen-switch-thumb {
|
|
70
|
+
transform: translateY(-50%) translateX(calc(var(--switch-w) - var(--switch-h))); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
/* 尺寸变体 */
|
|
73
|
-
.switch--sm { --switch-w: 36px; --switch-h: 20px; --switch-thumb: 16px; }
|
|
74
|
-
.switch--lg { --switch-w: 56px; --switch-h: 28px; --switch-thumb: 24px; }
|
|
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; }
|
|
75
76
|
|
|
76
77
|
/* ── 勾选框(✓ 与半选横条均 ::before 自绘) ── */
|
|
77
|
-
.checkbox {
|
|
78
|
+
.icen-checkbox {
|
|
78
79
|
--checkbox-size: 16px;
|
|
79
80
|
display: inline-flex;
|
|
80
81
|
align-items: center;
|
|
@@ -83,10 +84,10 @@
|
|
|
83
84
|
width: var(--checkbox-size);
|
|
84
85
|
height: var(--checkbox-size);
|
|
85
86
|
padding: 0;
|
|
86
|
-
background: var(--token-control);
|
|
87
|
+
background: var(--icen-token-control);
|
|
87
88
|
color: transparent;
|
|
88
|
-
border: 1px solid var(--token-outline-soft);
|
|
89
|
-
border-radius: var(--radius-sm);
|
|
89
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
90
|
+
border-radius: var(--icen-radius-sm);
|
|
90
91
|
cursor: pointer;
|
|
91
92
|
-webkit-tap-highlight-color: transparent;
|
|
92
93
|
transition:
|
|
@@ -95,64 +96,65 @@
|
|
|
95
96
|
color var(--icen-tx-fast),
|
|
96
97
|
box-shadow var(--icen-tx-fast);
|
|
97
98
|
}
|
|
98
|
-
.checkbox:hover:not([aria-checked='true']):not([aria-checked='mixed']):not(:disabled) {
|
|
99
|
-
border-color: color-mix(in srgb, var(--token-accent) 50%, transparent);
|
|
99
|
+
.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);
|
|
100
101
|
}
|
|
101
|
-
.checkbox[aria-checked='true'],
|
|
102
|
-
.checkbox[aria-checked='mixed'] {
|
|
103
|
-
background: var(--token-accent);
|
|
104
|
-
border-color: var(--token-accent);
|
|
105
|
-
color: var(--token-on-accent);
|
|
102
|
+
.icen-checkbox[aria-checked='true'],
|
|
103
|
+
.icen-checkbox[aria-checked='mixed'] {
|
|
104
|
+
background: var(--icen-token-accent-strong);
|
|
105
|
+
border-color: var(--icen-token-accent-strong);
|
|
106
|
+
color: var(--icen-token-on-accent);
|
|
106
107
|
}
|
|
107
|
-
.checkbox::before {
|
|
108
|
+
.icen-checkbox::before {
|
|
108
109
|
content: '';
|
|
109
|
-
width:
|
|
110
|
-
height:
|
|
110
|
+
width: 40%;
|
|
111
|
+
height: 40%;
|
|
111
112
|
background: currentColor;
|
|
112
113
|
opacity: 0;
|
|
113
|
-
clip-path:
|
|
114
|
+
clip-path: none;
|
|
115
|
+
border-radius: max(0px, calc(var(--icen-radius-xs) - var(--icen-density-space-xs)));
|
|
114
116
|
}
|
|
115
|
-
.checkbox[aria-checked='true']::before { opacity: 1; }
|
|
116
|
-
.checkbox[aria-checked='mixed']::before {
|
|
117
|
+
.icen-checkbox[aria-checked='true']::before { opacity: 1; }
|
|
118
|
+
.icen-checkbox[aria-checked='mixed']::before {
|
|
117
119
|
opacity: 1;
|
|
118
120
|
width: 60%;
|
|
119
121
|
height: 2px;
|
|
120
122
|
clip-path: none;
|
|
121
|
-
border-radius: var(--radius-full);
|
|
123
|
+
border-radius: var(--icen-radius-full);
|
|
122
124
|
}
|
|
123
|
-
.checkbox:disabled,
|
|
124
|
-
.checkbox[aria-disabled='true'],
|
|
125
|
-
.checkbox[data-disabled] {
|
|
125
|
+
.icen-checkbox:disabled,
|
|
126
|
+
.icen-checkbox[aria-disabled='true'],
|
|
127
|
+
.icen-checkbox[data-icen-disabled] {
|
|
126
128
|
opacity: var(--icen-disabled-opacity);
|
|
127
129
|
cursor: not-allowed;
|
|
128
130
|
}
|
|
129
|
-
.checkbox:focus-visible {
|
|
131
|
+
.icen-checkbox:focus-visible {
|
|
130
132
|
outline: none;
|
|
131
133
|
box-shadow: var(--icen-ring);
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
.checkbox--sm { --checkbox-size: 14px; }
|
|
135
|
-
.checkbox--lg { --checkbox-size: 20px; }
|
|
136
|
+
.icen-checkbox--sm { --checkbox-size: 14px; }
|
|
137
|
+
.icen-checkbox--lg { --checkbox-size: 20px; }
|
|
136
138
|
|
|
137
139
|
/* ── 单选行(radio item:整行可点) ── */
|
|
138
|
-
.radio-group {
|
|
140
|
+
.icen-radio-group {
|
|
139
141
|
display: flex;
|
|
140
142
|
flex-direction: column;
|
|
141
|
-
gap: var(--density-space-xs);
|
|
143
|
+
gap: var(--icen-density-space-xs);
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
.radio-item {
|
|
146
|
+
.icen-radio-item {
|
|
145
147
|
display: flex;
|
|
146
148
|
align-items: center;
|
|
147
|
-
gap: var(--density-space-sm);
|
|
149
|
+
gap: var(--icen-density-space-sm);
|
|
148
150
|
width: 100%;
|
|
149
|
-
padding: var(--density-space-sm) var(--density-space-md);
|
|
150
|
-
font-size: var(--density-font-size-md);
|
|
151
|
-
text-align:
|
|
151
|
+
padding: var(--icen-density-space-sm) var(--icen-density-space-md);
|
|
152
|
+
font-size: var(--icen-density-font-size-md);
|
|
153
|
+
text-align: start;
|
|
152
154
|
border: 1px solid transparent;
|
|
153
155
|
background: transparent;
|
|
154
|
-
color: var(--token-text);
|
|
155
|
-
border-radius: var(--radius-md);
|
|
156
|
+
color: var(--icen-token-text);
|
|
157
|
+
border-radius: var(--icen-radius-md);
|
|
156
158
|
cursor: pointer;
|
|
157
159
|
-webkit-tap-highlight-color: transparent;
|
|
158
160
|
transition:
|
|
@@ -160,125 +162,125 @@
|
|
|
160
162
|
color var(--icen-tx-fast),
|
|
161
163
|
border-color var(--icen-tx-fast);
|
|
162
164
|
}
|
|
163
|
-
.radio-item:hover:not(.is-disabled) {
|
|
164
|
-
background: var(--token-fill-1);
|
|
165
|
+
.icen-radio-item:hover:not(.is-disabled) {
|
|
166
|
+
background: var(--icen-token-fill-1);
|
|
165
167
|
}
|
|
166
|
-
.radio-item.is-selected,
|
|
167
|
-
.radio-item[aria-checked='true'] {
|
|
168
|
-
background: var(--token-accent-subtle);
|
|
169
|
-
color: var(--token-accent);
|
|
168
|
+
.icen-radio-item.is-selected,
|
|
169
|
+
.icen-radio-item[aria-checked='true'] {
|
|
170
|
+
background: var(--icen-token-accent-subtle);
|
|
171
|
+
color: var(--icen-token-accent-text, var(--icen-token-accent-deep, var(--icen-token-accent)));
|
|
170
172
|
font-weight: 500;
|
|
171
|
-
border-color: color-mix(in srgb, var(--token-accent) 25%, transparent);
|
|
173
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 25%, transparent);
|
|
172
174
|
}
|
|
173
|
-
.radio-item:focus-visible {
|
|
175
|
+
.icen-radio-item:focus-visible {
|
|
174
176
|
outline: none;
|
|
175
177
|
box-shadow: var(--icen-ring);
|
|
176
178
|
}
|
|
177
|
-
.radio-item:disabled,
|
|
178
|
-
.radio-item.is-disabled,
|
|
179
|
-
.radio-item[aria-disabled='true'] {
|
|
179
|
+
.icen-radio-item:disabled,
|
|
180
|
+
.icen-radio-item.is-disabled,
|
|
181
|
+
.icen-radio-item[aria-disabled='true'] {
|
|
180
182
|
opacity: var(--icen-disabled-opacity);
|
|
181
183
|
cursor: not-allowed;
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
.radio-dot {
|
|
186
|
+
.icen-radio-dot {
|
|
185
187
|
position: relative;
|
|
186
188
|
width: 16px;
|
|
187
189
|
height: 16px;
|
|
188
190
|
flex-shrink: 0;
|
|
189
|
-
border: 1px solid var(--token-outline-soft);
|
|
190
|
-
border-radius: var(--radius-full);
|
|
191
|
-
background: var(--token-control);
|
|
191
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
192
|
+
border-radius: var(--icen-radius-full);
|
|
193
|
+
background: var(--icen-token-control);
|
|
192
194
|
transition: border-color var(--icen-tx-fast);
|
|
193
195
|
}
|
|
194
|
-
.radio-item.is-selected .radio-dot,
|
|
195
|
-
.radio-item[aria-checked='true'] .radio-dot { border-color: var(--token-accent); }
|
|
196
|
-
.radio-dot::after {
|
|
196
|
+
.icen-radio-item.is-selected .icen-radio-dot,
|
|
197
|
+
.icen-radio-item[aria-checked='true'] .icen-radio-dot { border-color: var(--icen-token-accent); }
|
|
198
|
+
.icen-radio-dot::after {
|
|
197
199
|
content: '';
|
|
198
200
|
position: absolute;
|
|
199
|
-
top: 50%; left: 50%;
|
|
201
|
+
top: 50%; left: 50%; /* guard:allow-physical 圆心居中:left 50% + translate(-50%) 任意方向下均为圆心 */
|
|
200
202
|
width: 8px;
|
|
201
203
|
height: 8px;
|
|
202
|
-
border-radius: var(--radius-full);
|
|
203
|
-
background: var(--token-accent);
|
|
204
|
+
border-radius: var(--icen-radius-full);
|
|
205
|
+
background: var(--icen-token-accent);
|
|
204
206
|
transform: translate(-50%, -50%) scale(0);
|
|
205
207
|
transition: transform var(--icen-tx-bounce);
|
|
206
208
|
}
|
|
207
|
-
.radio-item.is-selected .radio-dot::after,
|
|
208
|
-
.radio-item[aria-checked='true'] .radio-dot::after {
|
|
209
|
+
.icen-radio-item.is-selected .icen-radio-dot::after,
|
|
210
|
+
.icen-radio-item[aria-checked='true'] .icen-radio-dot::after {
|
|
209
211
|
transform: translate(-50%, -50%) scale(1);
|
|
210
212
|
}
|
|
211
213
|
|
|
212
214
|
/* ── 开关色彩变体 ── */
|
|
213
|
-
.switch--success[aria-checked='true'] { background: var(--token-success); }
|
|
214
|
-
.switch--warning[aria-checked='true'] { background: var(--token-warning); }
|
|
215
|
-
.switch--danger[aria-checked='true'] { background: var(--token-error); }
|
|
215
|
+
.icen-switch--success[aria-checked='true'] { background: var(--icen-token-success); }
|
|
216
|
+
.icen-switch--warning[aria-checked='true'] { background: var(--icen-token-warning); }
|
|
217
|
+
.icen-switch--danger[aria-checked='true'] { background: var(--icen-token-error); }
|
|
216
218
|
|
|
217
219
|
/* ── 开关带文字(on/off 文字嵌入) ── */
|
|
218
|
-
.switch--text {
|
|
220
|
+
.icen-switch--text {
|
|
219
221
|
--switch-w: 52px;
|
|
220
222
|
}
|
|
221
|
-
.switch--text .switch-thumb {
|
|
223
|
+
.icen-switch--text .icen-switch-thumb {
|
|
222
224
|
display: flex;
|
|
223
225
|
align-items: center;
|
|
224
226
|
justify-content: center;
|
|
225
|
-
font-size: var(--density-font-size-2xs);
|
|
227
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
226
228
|
font-weight: 700;
|
|
227
229
|
color: transparent;
|
|
228
230
|
}
|
|
229
|
-
.switch--text[aria-checked='true']::before {
|
|
231
|
+
.icen-switch--text[aria-checked='true']::before {
|
|
230
232
|
content: 'ON';
|
|
231
233
|
position: absolute;
|
|
232
|
-
left: 6px;
|
|
234
|
+
left: 6px; /* guard:allow-physical ON 文案固定于物理左侧(与 thumb 关闭位同侧,开关不随 RTL 镜像) */
|
|
233
235
|
top: 50%;
|
|
234
236
|
transform: translateY(-50%);
|
|
235
|
-
font-size: var(--density-font-size-2xs);
|
|
237
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
236
238
|
font-weight: 700;
|
|
237
|
-
color: var(--token-on-accent);
|
|
239
|
+
color: var(--icen-token-on-accent);
|
|
238
240
|
}
|
|
239
|
-
.switch--text[aria-checked='false']::before {
|
|
241
|
+
.icen-switch--text[aria-checked='false']::before {
|
|
240
242
|
content: 'OFF';
|
|
241
243
|
position: absolute;
|
|
242
|
-
right: 6px;
|
|
244
|
+
right: 6px; /* guard:allow-physical OFF 文案固定于物理右侧(与 thumb 开启位同侧,开关不随 RTL 镜像) */
|
|
243
245
|
top: 50%;
|
|
244
246
|
transform: translateY(-50%);
|
|
245
|
-
font-size: var(--density-font-size-2xs);
|
|
247
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
246
248
|
font-weight: 700;
|
|
247
|
-
color: var(--token-text-faint);
|
|
249
|
+
color: var(--icen-token-text-faint);
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
/* ── 带标签的开关行 ── */
|
|
251
|
-
.switch-row {
|
|
253
|
+
.icen-switch-row {
|
|
252
254
|
display: flex;
|
|
253
255
|
align-items: center;
|
|
254
256
|
justify-content: space-between;
|
|
255
|
-
gap: var(--density-space-sm);
|
|
256
|
-
padding: var(--density-space-sm) 0;
|
|
257
|
+
gap: var(--icen-density-space-sm);
|
|
258
|
+
padding: var(--icen-density-space-sm) 0;
|
|
257
259
|
}
|
|
258
|
-
.switch-row-label {
|
|
260
|
+
.icen-switch-row-label {
|
|
259
261
|
display: flex;
|
|
260
262
|
flex-direction: column;
|
|
261
263
|
gap: 1px;
|
|
262
264
|
flex: 1;
|
|
263
265
|
min-width: 0;
|
|
264
266
|
}
|
|
265
|
-
.switch-row-title {
|
|
266
|
-
font-size: var(--density-font-size-md);
|
|
267
|
-
color: var(--token-text);
|
|
267
|
+
.icen-switch-row-title {
|
|
268
|
+
font-size: var(--icen-density-font-size-md);
|
|
269
|
+
color: var(--icen-token-text);
|
|
268
270
|
}
|
|
269
|
-
.switch-row-desc {
|
|
270
|
-
font-size: var(--density-font-size-xs);
|
|
271
|
-
color: var(--token-text-faint);
|
|
271
|
+
.icen-switch-row-desc {
|
|
272
|
+
font-size: var(--icen-density-font-size-xs);
|
|
273
|
+
color: var(--icen-token-text-faint);
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
/* ── 勾选行(checkbox + label 组合) ── */
|
|
275
|
-
.checkbox-row {
|
|
277
|
+
.icen-checkbox-row {
|
|
276
278
|
display: flex;
|
|
277
279
|
align-items: flex-start;
|
|
278
|
-
gap: var(--density-space-sm);
|
|
280
|
+
gap: var(--icen-density-space-sm);
|
|
279
281
|
cursor: pointer;
|
|
280
282
|
}
|
|
281
|
-
.checkbox-row-label {
|
|
283
|
+
.icen-checkbox-row-label {
|
|
282
284
|
display: flex;
|
|
283
285
|
flex-direction: column;
|
|
284
286
|
gap: 1px;
|
|
@@ -287,66 +289,68 @@
|
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
/* ── 单选卡片(富化版 radio-item,带描述与图标) ── */
|
|
290
|
-
.radio-card {
|
|
292
|
+
.icen-radio-card {
|
|
291
293
|
display: flex;
|
|
292
294
|
flex-direction: column;
|
|
293
|
-
gap: var(--density-space-xs);
|
|
294
|
-
padding: var(--density-space-md);
|
|
295
|
-
border: 1px solid var(--token-outline-soft);
|
|
296
|
-
border-radius: var(--radius-md);
|
|
297
|
-
background: var(--token-surface);
|
|
295
|
+
gap: var(--icen-density-space-xs);
|
|
296
|
+
padding: var(--icen-density-space-md);
|
|
297
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
298
|
+
border-radius: var(--icen-radius-md);
|
|
299
|
+
background: var(--icen-token-surface);
|
|
298
300
|
cursor: pointer;
|
|
299
301
|
transition:
|
|
300
302
|
border-color var(--icen-tx-fast),
|
|
301
303
|
box-shadow var(--icen-tx-fast),
|
|
302
304
|
background-color var(--icen-tx-fast);
|
|
303
305
|
}
|
|
304
|
-
.radio-card:hover {
|
|
306
|
+
.icen-radio-card:hover {
|
|
305
307
|
border-color: var(--icen-hover-border);
|
|
306
308
|
}
|
|
307
|
-
.radio-card-head {
|
|
309
|
+
.icen-radio-card-head {
|
|
308
310
|
display: flex;
|
|
309
311
|
align-items: center;
|
|
310
312
|
justify-content: space-between;
|
|
311
|
-
gap: var(--density-space-sm);
|
|
313
|
+
gap: var(--icen-density-space-sm);
|
|
312
314
|
}
|
|
313
|
-
.radio-card.is-selected,
|
|
314
|
-
.radio-card[aria-checked='true'] {
|
|
315
|
-
border-color: var(--token-accent);
|
|
316
|
-
background: var(--token-accent-subtle);
|
|
315
|
+
.icen-radio-card.is-selected,
|
|
316
|
+
.icen-radio-card[aria-checked='true'] {
|
|
317
|
+
border-color: var(--icen-token-accent);
|
|
318
|
+
background: var(--icen-token-accent-subtle);
|
|
317
319
|
box-shadow: var(--icen-ring-soft);
|
|
318
320
|
}
|
|
319
|
-
.radio-card:focus-visible {
|
|
321
|
+
.icen-radio-card:focus-visible {
|
|
320
322
|
outline: none;
|
|
321
323
|
box-shadow: var(--icen-ring);
|
|
322
324
|
}
|
|
323
|
-
.radio-card-title {
|
|
324
|
-
font-size: var(--density-font-size-md);
|
|
325
|
+
.icen-radio-card-title {
|
|
326
|
+
font-size: var(--icen-density-font-size-md);
|
|
325
327
|
font-weight: 500;
|
|
326
|
-
color: var(--token-text);
|
|
328
|
+
color: var(--icen-token-text);
|
|
327
329
|
}
|
|
328
|
-
.radio-card-desc {
|
|
329
|
-
font-size: var(--density-font-size-sm);
|
|
330
|
-
color: var(--token-text-muted);
|
|
330
|
+
.icen-radio-card-desc {
|
|
331
|
+
font-size: var(--icen-density-font-size-sm);
|
|
332
|
+
color: var(--icen-token-text-muted);
|
|
331
333
|
line-height: 1.5;
|
|
332
334
|
}
|
|
333
335
|
|
|
334
336
|
/* 单选卡片网格 */
|
|
335
|
-
.radio-card-grid {
|
|
337
|
+
.icen-radio-card-grid {
|
|
336
338
|
display: grid;
|
|
337
339
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
338
|
-
gap: var(--density-space-sm);
|
|
340
|
+
gap: var(--icen-density-space-sm);
|
|
339
341
|
}
|
|
340
342
|
|
|
341
343
|
/* ── 复选框组(多列网格) ── */
|
|
342
|
-
.checkbox-grid {
|
|
344
|
+
.icen-checkbox-grid {
|
|
343
345
|
display: grid;
|
|
344
346
|
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
345
|
-
gap: var(--density-space-sm);
|
|
347
|
+
gap: var(--icen-density-space-sm);
|
|
346
348
|
}
|
|
347
349
|
|
|
348
350
|
@media (prefers-reduced-motion: reduce) {
|
|
349
|
-
.switch-thumb { transition: none; }
|
|
350
|
-
.radio-dot::after { transition: none; }
|
|
351
|
-
.radio-card { transition: none; }
|
|
351
|
+
.icen-switch-thumb { transition: none; }
|
|
352
|
+
.icen-radio-dot::after { transition: none; }
|
|
353
|
+
.icen-radio-card { transition: none; }
|
|
354
|
+
}
|
|
355
|
+
|
|
352
356
|
}
|