@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,117 +1,163 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: input(wrapper 式输入框 / 多行 / 搜索)
|
|
3
4
|
* 规格源自 opengal primitives/input.tsx;与 behaviors/input.ts 配套。
|
|
4
5
|
*
|
|
5
6
|
* 完整契约:
|
|
6
|
-
* <div class="input-wrap control [--sm|--lg] [--search] [.is-error] [.is-disabled]">
|
|
7
|
-
* <span class="input-leading">…</span> 可选前缀(svg/icon/text)
|
|
8
|
-
* <input class="input" />
|
|
9
|
-
* <button class="input-clear" aria-label="清除">…</button> behavior 清空并聚焦
|
|
10
|
-
* <button class="input-pw-toggle" aria-label="切换可见性">…</button>
|
|
11
|
-
* <span class="input-trailing">…</span> 可选后缀(单位/字符计数等)
|
|
7
|
+
* <div class="icen-input-wrap icen-control [--sm|--lg] [--search] [.is-error] [.is-disabled]">
|
|
8
|
+
* <span class="icen-input-leading">…</span> 可选前缀(svg/icon/text)
|
|
9
|
+
* <input class="icen-input" />
|
|
10
|
+
* <button class="icen-input-clear" aria-label="清除">…</button> behavior 清空并聚焦
|
|
11
|
+
* <button class="icen-input-pw-toggle" aria-label="切换可见性">…</button>
|
|
12
|
+
* <span class="icen-input-trailing">…</span> 可选后缀(单位/字符计数等)
|
|
12
13
|
* </div>
|
|
13
14
|
*
|
|
14
|
-
* 多行:<div class="textarea-wrap control" [.is-error|.is-disabled]><textarea class="textarea" data-autosize></textarea></div>
|
|
15
|
+
* 多行:<div class="icen-textarea-wrap icen-control" [.is-error|.is-disabled]><icen-textarea class="icen-textarea" data-icen-autosize></icen-textarea></div>
|
|
15
16
|
*
|
|
16
17
|
* --search 修饰:仅语义标记(让 behavior 知道这是搜索框,绑定 clear + Esc),
|
|
17
|
-
* 不额外改样式;视觉上仍用 .input-leading 放大镜。
|
|
18
|
+
* 不额外改样式;视觉上仍用 .icen-input-leading 放大镜。
|
|
18
19
|
*/
|
|
19
20
|
|
|
20
21
|
/* ── 单行 ── */
|
|
21
|
-
.
|
|
22
|
+
/* One surface recipe for composed and standalone fields. KB domain hooks share
|
|
23
|
+
the same recipe; domain CSS owns width/layout, never typography or material. */
|
|
24
|
+
.icen-input-wrap,
|
|
25
|
+
.icen-input-control,
|
|
26
|
+
.icen-kb-input,
|
|
27
|
+
.icen-kb-retrieval-query,
|
|
28
|
+
.icen-kb-hittest-input,
|
|
29
|
+
.icen-kb-filter-field,
|
|
30
|
+
.icen-kb-filter-value {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
min-inline-size: 0;
|
|
33
|
+
block-size: var(--input-height, var(--icen-density-input-height-md));
|
|
34
|
+
padding: 0 var(--input-padding-inline, var(--icen-density-space-sm));
|
|
35
|
+
font-family: var(--icen-font-body);
|
|
36
|
+
font-size: var(--input-font-size, var(--icen-density-font-size-md));
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
color: var(--icen-token-text);
|
|
39
|
+
background: var(--icen-token-control);
|
|
40
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
41
|
+
border-radius: var(--icen-radius-md);
|
|
42
|
+
box-shadow: var(--icen-token-shadow-inset);
|
|
43
|
+
transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
|
|
44
|
+
}
|
|
45
|
+
.icen-input-wrap {
|
|
22
46
|
position: relative;
|
|
23
47
|
display: flex;
|
|
24
48
|
align-items: center;
|
|
25
|
-
gap: var(--density-space-xs);
|
|
26
|
-
|
|
27
|
-
height: var(--density-input-height-md);
|
|
28
|
-
padding: 0 var(--density-space-sm);
|
|
29
|
-
font-size: var(--density-font-size-md);
|
|
30
|
-
background: var(--token-control);
|
|
31
|
-
border: 1px solid var(--token-outline-soft);
|
|
32
|
-
border-radius: var(--radius-md);
|
|
33
|
-
box-shadow: var(--token-shadow-inset);
|
|
34
|
-
transition: border-color var(--icen-tx-fast),
|
|
35
|
-
box-shadow var(--icen-tx-fast);
|
|
49
|
+
gap: var(--icen-density-space-xs);
|
|
50
|
+
inline-size: 100%;
|
|
36
51
|
}
|
|
37
|
-
.input-wrap:hover {
|
|
52
|
+
:is(.icen-input-wrap,.icen-input-control,.icen-kb-input,.icen-kb-retrieval-query,.icen-kb-hittest-input,.icen-kb-filter-field,.icen-kb-filter-value):hover {
|
|
38
53
|
border-color: var(--icen-hover-border);
|
|
39
54
|
}
|
|
40
|
-
.input-wrap:focus-within {
|
|
55
|
+
:is(.icen-input-wrap,.icen-input-control,.icen-kb-input,.icen-kb-retrieval-query,.icen-kb-hittest-input,.icen-kb-filter-field,.icen-kb-filter-value):focus-within {
|
|
56
|
+
outline: none;
|
|
41
57
|
box-shadow: var(--icen-control-focus-shadow);
|
|
42
58
|
border-color: var(--icen-control-focus-border);
|
|
43
59
|
}
|
|
44
|
-
.input-wrap.is-error,
|
|
45
|
-
.input-wrap.is-error:focus-within {
|
|
46
|
-
border-color: var(--token-error);
|
|
60
|
+
.icen-input-wrap.is-error,
|
|
61
|
+
.icen-input-wrap.is-error:focus-within {
|
|
62
|
+
border-color: var(--icen-token-error);
|
|
47
63
|
}
|
|
48
|
-
.input-wrap.is-error:focus-within {
|
|
64
|
+
.icen-input-wrap.is-error:focus-within {
|
|
49
65
|
box-shadow: var(--icen-control-error-shadow);
|
|
50
66
|
}
|
|
51
|
-
.input-wrap.is-disabled,
|
|
52
|
-
.input-wrap[aria-disabled='true'],
|
|
53
|
-
.input-wrap[data-disabled] {
|
|
67
|
+
.icen-input-wrap.is-disabled,
|
|
68
|
+
.icen-input-wrap[aria-disabled='true'],
|
|
69
|
+
.icen-input-wrap[data-icen-disabled] {
|
|
54
70
|
opacity: var(--icen-disabled-opacity);
|
|
55
|
-
background: var(--token-bg-soft);
|
|
71
|
+
background: var(--icen-token-bg-soft);
|
|
56
72
|
cursor: not-allowed;
|
|
57
73
|
pointer-events: none;
|
|
58
74
|
}
|
|
59
|
-
.input-wrap.is-disabled .input { cursor: not-allowed; }
|
|
75
|
+
.icen-input-wrap.is-disabled .icen-input { cursor: not-allowed; }
|
|
60
76
|
|
|
61
77
|
/* 尺寸变体 */
|
|
62
|
-
.input-wrap--sm
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
78
|
+
.icen-input-wrap--sm, .icen-input-control--sm,
|
|
79
|
+
.icen-kb-input, .icen-kb-retrieval-query, .icen-kb-hittest-input, .icen-kb-filter-field, .icen-kb-filter-value {
|
|
80
|
+
--input-height: var(--icen-density-input-height-sm);
|
|
81
|
+
--input-padding-inline: max(8px, calc(var(--icen-density-space-sm) * 1.25));
|
|
82
|
+
--input-font-size: var(--icen-density-font-size-sm);
|
|
66
83
|
}
|
|
67
|
-
.input-wrap--lg {
|
|
68
|
-
height: var(--density-input-height-lg);
|
|
69
|
-
padding:
|
|
70
|
-
font-size: var(--density-font-size-lg);
|
|
84
|
+
.icen-input-wrap--lg, .icen-input-control--lg {
|
|
85
|
+
--input-height: var(--icen-density-input-height-lg);
|
|
86
|
+
--input-padding-inline: var(--icen-density-space-md);
|
|
87
|
+
--input-font-size: var(--icen-density-font-size-lg);
|
|
71
88
|
}
|
|
72
89
|
|
|
73
|
-
.input {
|
|
90
|
+
.icen-input {
|
|
91
|
+
box-sizing: border-box;
|
|
74
92
|
flex: 1;
|
|
75
93
|
min-width: 0;
|
|
76
94
|
padding: 0;
|
|
77
95
|
background: transparent;
|
|
78
96
|
border: none;
|
|
79
97
|
outline: none;
|
|
80
|
-
color: var(--token-text);
|
|
98
|
+
color: var(--icen-token-text);
|
|
81
99
|
font: inherit;
|
|
82
100
|
}
|
|
83
|
-
.input::placeholder {
|
|
84
|
-
color: color-mix(in srgb, var(--token-text-faint) 60%, transparent);
|
|
101
|
+
.icen-input::placeholder {
|
|
102
|
+
color: color-mix(in srgb, var(--icen-token-text-faint) 60%, transparent);
|
|
85
103
|
}
|
|
86
|
-
.input:read-only {
|
|
87
|
-
color: var(--token-text-muted);
|
|
104
|
+
.icen-input:read-only {
|
|
105
|
+
color: var(--icen-token-text-muted);
|
|
88
106
|
cursor: default;
|
|
89
107
|
}
|
|
90
|
-
.input::-webkit-search-cancel-button { -webkit-appearance: none; }
|
|
108
|
+
.icen-input::-webkit-search-cancel-button { -webkit-appearance: none; }
|
|
109
|
+
|
|
110
|
+
/* Composed searches use this same wrapper, font, inset and focus recipe. The
|
|
111
|
+
parent search header owns only sticky placement and separation from results. */
|
|
112
|
+
.icen-search-field > .icen-input-wrap { inline-size: 100%; }
|
|
113
|
+
.icen-input-wrap > .icen-search-input {
|
|
114
|
+
flex: 1;
|
|
115
|
+
inline-size: 100%;
|
|
116
|
+
min-inline-size: 0;
|
|
117
|
+
block-size: auto;
|
|
118
|
+
min-block-size: 0;
|
|
119
|
+
padding: 0;
|
|
120
|
+
border: 0;
|
|
121
|
+
border-radius: 0;
|
|
122
|
+
outline: none;
|
|
123
|
+
box-shadow: none;
|
|
124
|
+
background: transparent;
|
|
125
|
+
color: var(--icen-token-text);
|
|
126
|
+
font: inherit;
|
|
127
|
+
}
|
|
128
|
+
.icen-input-wrap > .icen-search-input:focus { border: 0; outline: none; box-shadow: none; }
|
|
129
|
+
.icen-input-wrap > .icen-search-input::placeholder { color: var(--icen-token-text-muted); }
|
|
130
|
+
@media (pointer: coarse) {
|
|
131
|
+
.icen-input-wrap, .icen-input-control, .icen-kb-input, .icen-kb-retrieval-query, .icen-kb-hittest-input, .icen-kb-filter-field, .icen-kb-filter-value { font-size: max(16px, var(--input-font-size, var(--icen-density-font-size-md))); }
|
|
132
|
+
.icen-input-wrap--sm { font-size: max(16px, var(--icen-density-font-size-sm)); }
|
|
133
|
+
.icen-input-wrap--lg { font-size: max(16px, var(--icen-density-font-size-lg)); }
|
|
134
|
+
.icen-input-clear, .icen-input-pw-toggle { min-inline-size: 44px; min-block-size: 44px; }
|
|
135
|
+
.icen-input-wrap:has(.icen-input-clear:not([hidden]), .icen-input-pw-toggle) { min-block-size: 46px; }
|
|
136
|
+
}
|
|
91
137
|
|
|
92
|
-
.input-leading,
|
|
93
|
-
.input-trailing {
|
|
138
|
+
.icen-input-leading,
|
|
139
|
+
.icen-input-trailing {
|
|
94
140
|
display: inline-flex;
|
|
95
141
|
align-items: center;
|
|
96
142
|
flex-shrink: 0;
|
|
97
|
-
color: var(--token-text-faint);
|
|
143
|
+
color: var(--icen-token-text-faint);
|
|
98
144
|
}
|
|
99
|
-
.input-leading svg, .input-trailing svg { width: 14px; height: 14px; }
|
|
145
|
+
.icen-input-leading svg, .icen-input-trailing svg { width: 14px; height: 14px; }
|
|
100
146
|
|
|
101
147
|
/* ── 前缀/后缀文字(单位、域名等)── */
|
|
102
|
-
.input-affix {
|
|
148
|
+
.icen-input-affix {
|
|
103
149
|
display: inline-flex;
|
|
104
150
|
align-items: center;
|
|
105
151
|
flex-shrink: 0;
|
|
106
|
-
padding: 0 var(--density-space-xs);
|
|
107
|
-
color: var(--token-text-muted);
|
|
152
|
+
padding: 0 var(--icen-density-space-xs);
|
|
153
|
+
color: var(--icen-token-text-muted);
|
|
108
154
|
font-size: 0.92em;
|
|
109
|
-
background: var(--token-fill-1);
|
|
110
|
-
border-radius: var(--radius-xs);
|
|
155
|
+
background: var(--icen-token-fill-1);
|
|
156
|
+
border-radius: var(--icen-radius-xs);
|
|
111
157
|
}
|
|
112
158
|
|
|
113
|
-
.input-clear,
|
|
114
|
-
.input-pw-toggle {
|
|
159
|
+
.icen-input-clear,
|
|
160
|
+
.icen-input-pw-toggle {
|
|
115
161
|
display: inline-flex;
|
|
116
162
|
align-items: center;
|
|
117
163
|
justify-content: center;
|
|
@@ -121,105 +167,114 @@
|
|
|
121
167
|
border: none;
|
|
122
168
|
background: transparent;
|
|
123
169
|
cursor: pointer;
|
|
124
|
-
border-radius: var(--radius-full);
|
|
125
|
-
color: var(--token-text-faint);
|
|
170
|
+
border-radius: var(--icen-radius-full);
|
|
171
|
+
color: var(--icen-token-text-faint);
|
|
126
172
|
transition:
|
|
127
173
|
color var(--icen-tx-fast),
|
|
128
174
|
background-color var(--icen-tx-fast);
|
|
129
175
|
}
|
|
130
|
-
.input-clear:hover,
|
|
131
|
-
.input-pw-toggle:hover {
|
|
132
|
-
color: var(--token-text);
|
|
133
|
-
background: var(--token-surface-hover);
|
|
176
|
+
.icen-input-clear:hover,
|
|
177
|
+
.icen-input-pw-toggle:hover {
|
|
178
|
+
color: var(--icen-token-text);
|
|
179
|
+
background: var(--icen-token-surface-hover);
|
|
134
180
|
}
|
|
135
|
-
.input-clear:focus-visible,
|
|
136
|
-
.input-pw-toggle:focus-visible {
|
|
181
|
+
.icen-input-clear:focus-visible,
|
|
182
|
+
.icen-input-pw-toggle:focus-visible {
|
|
137
183
|
outline: none;
|
|
138
184
|
box-shadow: var(--icen-ring);
|
|
139
185
|
}
|
|
140
|
-
.input-clear svg, .input-pw-toggle svg { width: 12px; height: 12px; }
|
|
186
|
+
.icen-input-clear svg, .icen-input-pw-toggle svg { width: 12px; height: 12px; }
|
|
141
187
|
|
|
142
188
|
/* ── 多行:同一 wrapper 视觉,内部 textarea 裸奔 ── */
|
|
143
|
-
.textarea-wrap {
|
|
189
|
+
.icen-textarea-wrap {
|
|
144
190
|
position: relative;
|
|
145
191
|
display: flex;
|
|
146
192
|
width: 100%;
|
|
147
|
-
background: var(--token-control);
|
|
148
|
-
border: 1px solid var(--token-outline-soft);
|
|
149
|
-
border-radius: var(--radius-md);
|
|
150
|
-
box-shadow: var(--token-shadow-inset);
|
|
193
|
+
background: var(--icen-token-control);
|
|
194
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
195
|
+
border-radius: var(--icen-radius-md);
|
|
196
|
+
box-shadow: var(--icen-token-shadow-inset);
|
|
151
197
|
transition: border-color var(--icen-tx-fast),
|
|
152
198
|
box-shadow var(--icen-tx-fast);
|
|
153
199
|
}
|
|
154
|
-
.textarea-wrap:hover {
|
|
200
|
+
.icen-textarea-wrap:hover {
|
|
155
201
|
border-color: var(--icen-hover-border);
|
|
156
202
|
}
|
|
157
|
-
.textarea-wrap:focus-within {
|
|
203
|
+
.icen-textarea-wrap:focus-within {
|
|
158
204
|
box-shadow: var(--icen-control-focus-shadow);
|
|
159
205
|
border-color: var(--icen-control-focus-border);
|
|
160
206
|
}
|
|
161
|
-
.textarea-wrap.is-error,
|
|
162
|
-
.textarea-wrap.is-error:focus-within {
|
|
163
|
-
border-color: var(--token-error);
|
|
207
|
+
.icen-textarea-wrap.is-error,
|
|
208
|
+
.icen-textarea-wrap.is-error:focus-within {
|
|
209
|
+
border-color: var(--icen-token-error);
|
|
164
210
|
box-shadow: var(--icen-control-error-shadow);
|
|
165
211
|
}
|
|
166
|
-
.textarea-wrap.is-disabled,
|
|
167
|
-
.textarea-wrap[aria-disabled='true'],
|
|
168
|
-
.textarea-wrap[data-disabled] {
|
|
212
|
+
.icen-textarea-wrap.is-disabled,
|
|
213
|
+
.icen-textarea-wrap[aria-disabled='true'],
|
|
214
|
+
.icen-textarea-wrap[data-icen-disabled] {
|
|
169
215
|
opacity: var(--icen-disabled-opacity);
|
|
170
|
-
background: var(--token-bg-soft);
|
|
216
|
+
background: var(--icen-token-bg-soft);
|
|
171
217
|
cursor: not-allowed;
|
|
172
218
|
pointer-events: none;
|
|
173
219
|
}
|
|
174
|
-
.textarea-wrap.is-disabled .textarea { cursor: not-allowed; }
|
|
220
|
+
.icen-textarea-wrap.is-disabled .icen-textarea { cursor: not-allowed; }
|
|
175
221
|
|
|
176
|
-
.textarea {
|
|
222
|
+
.icen-textarea {
|
|
177
223
|
width: 100%;
|
|
178
|
-
padding: var(--density-space-sm) var(--density-space-md);
|
|
224
|
+
padding: var(--icen-density-space-sm) var(--icen-density-space-md);
|
|
179
225
|
background: transparent;
|
|
180
226
|
border: none;
|
|
181
227
|
outline: none;
|
|
182
228
|
resize: vertical;
|
|
183
|
-
color: var(--token-text);
|
|
229
|
+
color: var(--icen-token-text);
|
|
184
230
|
font: inherit;
|
|
185
|
-
font-size: var(--density-font-size-md);
|
|
231
|
+
font-size: var(--icen-density-font-size-md);
|
|
186
232
|
line-height: 1.5;
|
|
187
233
|
min-height: calc(3 * 1.5em + 24px);
|
|
188
234
|
}
|
|
189
|
-
.textarea::placeholder {
|
|
190
|
-
color: color-mix(in srgb, var(--token-text-faint) 60%, transparent);
|
|
235
|
+
.icen-textarea::placeholder {
|
|
236
|
+
color: color-mix(in srgb, var(--icen-token-text-faint) 60%, transparent);
|
|
191
237
|
}
|
|
192
238
|
|
|
193
|
-
/* 字符计数(behavior 可挂到 .input-wrap 或 .textarea-wrap
|
|
194
|
-
.input-wrap--has-counter { padding-
|
|
195
|
-
.input-wrap--has-counter .input-counter {
|
|
239
|
+
/* 字符计数(behavior 可挂到 .icen-input-wrap 或 .icen-textarea-wrap 内行内末端) */
|
|
240
|
+
.icen-input-wrap--has-counter { padding-inline-end: calc(var(--icen-density-space-sm) + 48px); }
|
|
241
|
+
.icen-input-wrap--has-counter .icen-input-counter {
|
|
196
242
|
position: absolute;
|
|
197
|
-
|
|
243
|
+
inset-inline-end: var(--icen-density-space-sm);
|
|
198
244
|
top: 50%;
|
|
199
245
|
transform: translateY(-50%);
|
|
200
|
-
font-size: var(--density-font-size-xs);
|
|
201
|
-
color: var(--token-text-faint);
|
|
246
|
+
font-size: var(--icen-density-font-size-xs);
|
|
247
|
+
color: var(--icen-token-text-faint);
|
|
202
248
|
font-variant-numeric: tabular-nums;
|
|
203
249
|
pointer-events: none;
|
|
204
250
|
}
|
|
205
|
-
.input-counter {
|
|
251
|
+
.icen-input-counter {
|
|
206
252
|
position: absolute;
|
|
207
|
-
|
|
208
|
-
bottom: var(--density-space-xs);
|
|
209
|
-
font-size: var(--density-font-size-xs);
|
|
210
|
-
color: var(--token-text-faint);
|
|
253
|
+
inset-inline-end: var(--icen-density-space-sm);
|
|
254
|
+
bottom: var(--icen-density-space-xs);
|
|
255
|
+
font-size: var(--icen-density-font-size-xs);
|
|
256
|
+
color: var(--icen-token-text-faint);
|
|
211
257
|
font-variant-numeric: tabular-nums;
|
|
212
258
|
pointer-events: none;
|
|
213
259
|
transition: color var(--icen-tx-fast);
|
|
214
260
|
}
|
|
215
|
-
.input-counter.is-warn { color: var(--token-warning); }
|
|
216
|
-
.input-counter.is-error { color: var(--token-error); font-weight: 600; }
|
|
261
|
+
.icen-input-counter.is-warn { color: var(--icen-token-warning); }
|
|
262
|
+
.icen-input-counter.is-error { color: var(--icen-token-error); font-weight: 600; }
|
|
217
263
|
|
|
218
|
-
.textarea-wrap .textarea { padding-bottom: 24px; }
|
|
264
|
+
.icen-textarea-wrap .icen-textarea { padding-bottom: 24px; }
|
|
219
265
|
|
|
220
266
|
/* 有计数器时的 textarea 底部留空 */
|
|
221
|
-
.textarea-wrap .input-counter {
|
|
267
|
+
.icen-textarea-wrap .icen-input-counter {
|
|
222
268
|
position: absolute;
|
|
223
|
-
|
|
224
|
-
bottom: var(--density-space-xs);
|
|
269
|
+
inset-inline-end: var(--icen-density-space-sm);
|
|
270
|
+
bottom: var(--icen-density-space-xs);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* Standalone fields expose the same disabled/read-only/error feedback. */
|
|
274
|
+
:is(.icen-input-control,.icen-kb-input,.icen-kb-retrieval-query,.icen-kb-hittest-input,.icen-kb-filter-field,.icen-kb-filter-value):disabled {
|
|
275
|
+
opacity: var(--icen-disabled-opacity);cursor: not-allowed;background: var(--icen-token-bg-soft);
|
|
276
|
+
}
|
|
277
|
+
:is(.icen-input-control,.icen-kb-input,.icen-kb-retrieval-query,.icen-kb-hittest-input,.icen-kb-filter-field,.icen-kb-filter-value):read-only { color: var(--icen-token-text-muted); }
|
|
278
|
+
.icen-input-control[aria-invalid='true'] { border-color: var(--icen-token-error); }
|
|
279
|
+
|
|
225
280
|
}
|