@icen.ai/ui 0.9.0 → 0.11.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 +82 -254
- package/LICENSE +21 -0
- package/README.md +60 -96
- package/dist/base.css +258 -188
- package/dist/behaviors/accordion.mjs +8 -8
- package/dist/behaviors/ai-branch.d.mts +1 -1
- package/dist/behaviors/ai-branch.mjs +1011 -94
- package/dist/behaviors/ai-chat.d.mts +9 -9
- package/dist/behaviors/ai-chat.mjs +1122 -169
- package/dist/behaviors/ai-composer.d.mts +47 -15
- package/dist/behaviors/ai-composer.mjs +2018 -534
- package/dist/behaviors/ai-core.d.mts +1 -1
- package/dist/behaviors/ai-core.mjs +1017 -107
- package/dist/behaviors/ai-diff.mjs +1020 -127
- package/dist/behaviors/ai-feedback.d.mts +1 -1
- package/dist/behaviors/ai-feedback.mjs +1036 -126
- package/dist/behaviors/ai-panel.d.mts +10 -10
- package/dist/behaviors/ai-panel.mjs +1285 -266
- package/dist/behaviors/ai-provider.d.mts +1 -1
- package/dist/behaviors/ai-provider.mjs +1004 -101
- package/dist/behaviors/ai-threads.d.mts +1 -1
- package/dist/behaviors/ai-threads.mjs +1069 -154
- package/dist/behaviors/ai-tool.d.mts +3 -3
- package/dist/behaviors/ai-tool.mjs +2087 -413
- package/dist/behaviors/ai-tools.d.mts +89 -16
- package/dist/behaviors/ai-tools.mjs +5365 -380
- package/dist/behaviors/autocomplete.d.mts +53 -0
- package/dist/behaviors/autocomplete.mjs +1601 -0
- package/dist/behaviors/back-top.d.mts +1 -1
- package/dist/behaviors/back-top.mjs +952 -14
- package/dist/behaviors/carousel.d.mts +1 -1
- package/dist/behaviors/carousel.mjs +914 -12
- package/dist/behaviors/cascader.d.mts +48 -0
- package/dist/behaviors/cascader.mjs +1867 -0
- package/dist/behaviors/charts.d.mts +72 -8
- package/dist/behaviors/charts.mjs +1953 -272
- package/dist/behaviors/code-block.d.mts +36 -0
- package/dist/behaviors/code-block.mjs +1619 -0
- package/dist/behaviors/command-palette.d.mts +9 -6
- package/dist/behaviors/command-palette.mjs +164 -62
- package/dist/behaviors/context-menu.d.mts +10 -9
- package/dist/behaviors/context-menu.mjs +1113 -44
- package/dist/behaviors/controls.d.mts +21 -21
- package/dist/behaviors/controls.mjs +1024 -134
- package/dist/behaviors/copy.d.mts +21 -2
- package/dist/behaviors/copy.mjs +1207 -42
- package/dist/behaviors/datatable.d.mts +55 -5
- package/dist/behaviors/datatable.mjs +2033 -212
- package/dist/behaviors/date-picker.d.mts +0 -1
- package/dist/behaviors/date-picker.mjs +1341 -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 +127 -10
- package/dist/behaviors/events.mjs +58 -3
- 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 +111 -0
- package/dist/behaviors/form-validate.mjs +1746 -0
- package/dist/behaviors/i18n.d.mts +790 -0
- package/dist/behaviors/i18n.mjs +1713 -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 +1059 -60
- package/dist/behaviors/kb-access.d.mts +3 -3
- package/dist/behaviors/kb-access.mjs +2135 -239
- package/dist/behaviors/kb-acl.d.mts +8 -8
- package/dist/behaviors/kb-acl.mjs +1120 -179
- package/dist/behaviors/kb-answer.d.mts +2 -2
- package/dist/behaviors/kb-answer.mjs +2120 -435
- package/dist/behaviors/kb-audit.d.mts +3 -3
- package/dist/behaviors/kb-audit.mjs +1077 -154
- package/dist/behaviors/kb-canvas.d.mts +3 -3
- package/dist/behaviors/kb-canvas.mjs +1101 -177
- package/dist/behaviors/kb-chain.d.mts +2 -2
- package/dist/behaviors/kb-chain.mjs +1023 -100
- package/dist/behaviors/kb-checkpoint.d.mts +3 -3
- package/dist/behaviors/kb-checkpoint.mjs +1320 -169
- package/dist/behaviors/kb-chunks.d.mts +2 -2
- package/dist/behaviors/kb-chunks.mjs +1153 -213
- package/dist/behaviors/kb-citation.d.mts +3 -3
- package/dist/behaviors/kb-citation.mjs +1221 -185
- package/dist/behaviors/kb-clarify.d.mts +2 -2
- package/dist/behaviors/kb-clarify.mjs +1059 -130
- package/dist/behaviors/kb-conflict.d.mts +2 -2
- package/dist/behaviors/kb-conflict.mjs +1042 -119
- package/dist/behaviors/kb-connector.d.mts +2 -2
- package/dist/behaviors/kb-connector.mjs +1105 -176
- package/dist/behaviors/kb-core.d.mts +7 -2
- package/dist/behaviors/kb-core.mjs +1078 -162
- package/dist/behaviors/kb-eval.d.mts +2 -2
- package/dist/behaviors/kb-eval.mjs +1977 -144
- package/dist/behaviors/kb-explain.d.mts +3 -3
- package/dist/behaviors/kb-explain.mjs +1037 -104
- package/dist/behaviors/kb-filter.d.mts +2 -2
- package/dist/behaviors/kb-filter.mjs +2014 -178
- package/dist/behaviors/kb-gap.d.mts +3 -3
- package/dist/behaviors/kb-gap.mjs +1044 -121
- package/dist/behaviors/kb-hittest.d.mts +3 -3
- package/dist/behaviors/kb-hittest.mjs +1095 -151
- package/dist/behaviors/kb-metadata.mjs +1058 -130
- package/dist/behaviors/kb-passage.d.mts +4 -4
- package/dist/behaviors/kb-passage.mjs +1102 -161
- package/dist/behaviors/kb-pipeline.d.mts +4 -4
- package/dist/behaviors/kb-pipeline.mjs +1083 -162
- package/dist/behaviors/kb-qa.mjs +1089 -160
- package/dist/behaviors/kb-rerank.d.mts +2 -2
- package/dist/behaviors/kb-rerank.mjs +1048 -114
- package/dist/behaviors/kb-retrieval.d.mts +2 -2
- package/dist/behaviors/kb-retrieval.mjs +2079 -226
- package/dist/behaviors/kb-review.d.mts +2 -2
- package/dist/behaviors/kb-review.mjs +1996 -159
- package/dist/behaviors/kb-sandbox.d.mts +3 -3
- package/dist/behaviors/kb-sandbox.mjs +1033 -105
- package/dist/behaviors/kb-segment.d.mts +2 -2
- package/dist/behaviors/kb-segment.mjs +1112 -179
- package/dist/behaviors/kb-select.d.mts +24 -0
- package/dist/behaviors/kb-select.mjs +1995 -0
- package/dist/behaviors/kb-sources.d.mts +3 -3
- package/dist/behaviors/kb-sources.mjs +1085 -170
- package/dist/behaviors/kb-sql.d.mts +3 -3
- package/dist/behaviors/kb-sql.mjs +1144 -226
- package/dist/behaviors/kb-trace.d.mts +3 -3
- package/dist/behaviors/kb-trace.mjs +1051 -131
- package/dist/behaviors/kb-visibility.d.mts +2 -2
- package/dist/behaviors/kb-visibility.mjs +1087 -158
- package/dist/behaviors/kb-who-can.d.mts +2 -2
- package/dist/behaviors/kb-who-can.mjs +1980 -137
- package/dist/behaviors/mentions.d.mts +93 -0
- package/dist/behaviors/mentions.mjs +2153 -0
- package/dist/behaviors/modal.d.mts +4 -3
- package/dist/behaviors/modal.mjs +1056 -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 +1629 -268
- package/dist/behaviors/panel.d.mts +4 -0
- package/dist/behaviors/panel.mjs +995 -0
- package/dist/behaviors/popover.d.mts +28 -5
- package/dist/behaviors/popover.mjs +225 -24
- package/dist/behaviors/scroll-area.d.mts +17 -0
- package/dist/behaviors/scroll-area.mjs +59 -0
- package/dist/behaviors/select.d.mts +5 -2
- package/dist/behaviors/select.mjs +1416 -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 +12 -12
- package/dist/behaviors/split-pane.d.mts +1 -1
- package/dist/behaviors/split-pane.mjs +9 -7
- package/dist/behaviors/suggestions.d.mts +27 -0
- package/dist/behaviors/suggestions.mjs +1090 -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 +35 -25
- package/dist/behaviors/tag-input.d.mts +23 -5
- package/dist/behaviors/tag-input.mjs +1360 -104
- package/dist/behaviors/theme-switcher.d.mts +24 -0
- package/dist/behaviors/theme-switcher.mjs +1996 -0
- package/dist/behaviors/theme.d.mts +15 -8
- package/dist/behaviors/theme.mjs +406 -30
- package/dist/behaviors/toast.d.mts +24 -25
- package/dist/behaviors/toast.mjs +1267 -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 +1921 -0
- package/dist/behaviors/tree.d.mts +1 -1
- package/dist/behaviors/tree.mjs +18 -18
- package/dist/behaviors/upload.d.mts +3 -2
- package/dist/behaviors/upload.mjs +1077 -66
- package/dist/behaviors/url-safety.d.mts +8 -0
- package/dist/behaviors/url-safety.mjs +11 -0
- package/dist/cli.mjs +5 -6
- package/dist/components/accordion.d.mts +2 -0
- package/dist/components/ai-branch.d.mts +2 -0
- package/dist/components/ai-chat.css +682 -582
- package/dist/components/ai-chat.d.mts +2 -0
- package/dist/components/ai-composer.d.mts +2 -0
- package/dist/components/ai-context.d.mts +2 -0
- package/dist/components/ai-context.mjs +1 -0
- package/dist/components/ai-diff.css +153 -132
- package/dist/components/ai-diff.d.mts +2 -0
- package/dist/components/ai-feedback.d.mts +2 -0
- package/dist/components/ai-files.d.mts +2 -0
- package/dist/components/ai-message.d.mts +2 -0
- package/dist/components/ai-panel.css +353 -343
- package/dist/components/ai-reasoning.d.mts +2 -0
- package/dist/components/ai-subagent.d.mts +2 -0
- package/dist/components/ai-subagent.mjs +1 -0
- package/dist/components/ai-threads.d.mts +2 -0
- package/dist/components/ai-todo.d.mts +2 -0
- package/dist/components/ai-todo.mjs +1 -0
- package/dist/components/ai-tool-call.d.mts +2 -0
- package/dist/components/ai-tool-call.mjs +1 -0
- package/dist/components/ai-tool.css +397 -242
- package/dist/components/ai-usage.d.mts +2 -0
- package/dist/components/alert.d.mts +2 -0
- package/dist/components/autocomplete.css +61 -0
- package/dist/components/autocomplete.d.mts +2 -0
- package/dist/components/autocomplete.mjs +3 -0
- package/dist/components/avatar.d.mts +2 -0
- package/dist/components/back-top.css +74 -40
- package/dist/components/back-top.d.mts +2 -0
- package/dist/components/badge.css +44 -41
- package/dist/components/badge.d.mts +2 -0
- package/dist/components/breadcrumb.css +85 -46
- package/dist/components/breadcrumb.d.mts +2 -0
- package/dist/components/btn.css +105 -94
- package/dist/components/btn.d.mts +2 -0
- package/dist/components/card.css +124 -113
- package/dist/components/card.d.mts +2 -0
- package/dist/components/carousel.d.mts +2 -0
- package/dist/components/cascader.css +332 -0
- package/dist/components/cascader.d.mts +2 -0
- package/dist/components/cascader.mjs +3 -0
- package/dist/components/chart-area.css +54 -2
- package/dist/components/chart-area.d.mts +2 -0
- package/dist/components/chart-bar.css +147 -38
- package/dist/components/chart-bar.d.mts +2 -0
- package/dist/components/chart-calendar.d.mts +2 -0
- package/dist/components/chart-gauge.css +36 -13
- package/dist/components/chart-gauge.d.mts +2 -0
- package/dist/components/chart-graph.css +35 -20
- package/dist/components/chart-graph.d.mts +2 -0
- package/dist/components/chart-heatmap.css +67 -39
- package/dist/components/chart-heatmap.d.mts +2 -0
- package/dist/components/chart-line.css +62 -3
- package/dist/components/chart-line.d.mts +2 -0
- package/dist/components/chart-map.d.mts +2 -0
- package/dist/components/chart-pie.css +38 -6
- package/dist/components/chart-pie.d.mts +2 -0
- package/dist/components/chart-radar.css +57 -5
- package/dist/components/chart-radar.d.mts +2 -0
- package/dist/components/chart-scatter.css +47 -7
- package/dist/components/chart-scatter.d.mts +2 -0
- package/dist/components/chart-sparkline.css +25 -2
- package/dist/components/chart-sparkline.d.mts +2 -0
- package/dist/components/chart-stack.css +27 -13
- package/dist/components/chart-stack.d.mts +2 -0
- package/dist/components/charts.css +220 -84
- package/dist/components/charts.d.mts +2 -0
- package/dist/components/code-block.css +420 -0
- package/dist/components/code-block.d.mts +2 -0
- package/dist/components/code-block.mjs +4 -0
- package/dist/components/command-palette.css +150 -122
- package/dist/components/command-palette.d.mts +2 -0
- package/dist/components/content.css +274 -263
- package/dist/components/context-menu.d.mts +2 -0
- package/dist/components/copy.css +73 -45
- package/dist/components/copy.d.mts +2 -0
- package/dist/components/datatable.css +457 -202
- package/dist/components/datatable.d.mts +2 -0
- package/dist/components/date-picker.css +136 -105
- package/dist/components/date-picker.d.mts +2 -0
- package/dist/components/desc.d.mts +2 -0
- package/dist/components/dropdown.d.mts +2 -0
- package/dist/components/empty.css +72 -69
- package/dist/components/empty.d.mts +2 -0
- package/dist/components/feedback.css +211 -191
- package/dist/components/form-validate.css +134 -0
- package/dist/components/form-validate.d.mts +2 -0
- package/dist/components/form-validate.mjs +3 -0
- package/dist/components/form.css +157 -131
- package/dist/components/form.d.mts +2 -0
- package/dist/components/icon.css +113 -0
- package/dist/components/icon.d.mts +2 -0
- package/dist/components/icon.mjs +3 -0
- package/dist/components/input.css +163 -108
- package/dist/components/input.d.mts +2 -0
- package/dist/components/kb-access.d.mts +2 -0
- package/dist/components/kb-acl.d.mts +2 -0
- package/dist/components/kb-agent.css +300 -206
- package/dist/components/kb-answer.d.mts +2 -0
- package/dist/components/kb-audit.d.mts +2 -0
- package/dist/components/kb-canvas.d.mts +2 -0
- package/dist/components/kb-chain.d.mts +2 -0
- package/dist/components/kb-checkpoint.d.mts +2 -0
- package/dist/components/kb-chunks.d.mts +2 -0
- package/dist/components/kb-citation.d.mts +2 -0
- package/dist/components/kb-clarify.d.mts +2 -0
- package/dist/components/kb-conflict.d.mts +2 -0
- package/dist/components/kb-connector.d.mts +2 -0
- package/dist/components/kb-data.css +431 -315
- package/dist/components/kb-eval.d.mts +2 -0
- package/dist/components/kb-explain.d.mts +2 -0
- package/dist/components/kb-filter.d.mts +2 -0
- package/dist/components/kb-gap.d.mts +2 -0
- package/dist/components/kb-ground.css +333 -229
- package/dist/components/kb-hittest.d.mts +2 -0
- package/dist/components/kb-ingest.css +613 -434
- package/dist/components/kb-metadata.d.mts +2 -0
- package/dist/components/kb-ops.css +422 -302
- package/dist/components/kb-passage.d.mts +2 -0
- package/dist/components/kb-perm.css +374 -314
- package/dist/components/kb-pipeline.d.mts +2 -0
- package/dist/components/kb-qa.d.mts +2 -0
- package/dist/components/kb-rerank.d.mts +2 -0
- package/dist/components/kb-retrieval.d.mts +2 -0
- package/dist/components/kb-review.d.mts +2 -0
- package/dist/components/kb-sandbox.d.mts +2 -0
- package/dist/components/kb-search.css +653 -459
- package/dist/components/kb-segment.d.mts +2 -0
- package/dist/components/kb-sources.d.mts +2 -0
- package/dist/components/kb-sql.d.mts +2 -0
- package/dist/components/kb-trace.d.mts +2 -0
- package/dist/components/kb-visibility.d.mts +2 -0
- package/dist/components/kb-who-can.d.mts +2 -0
- package/dist/components/kb.css +170 -135
- package/dist/components/kb.d.mts +2 -0
- package/dist/components/kbd.d.mts +2 -0
- package/dist/components/layout.css +86 -83
- package/dist/components/layout.d.mts +2 -0
- package/dist/components/list.d.mts +2 -0
- package/dist/components/material-chinese.css +83 -0
- package/dist/components/material-soviet.css +86 -0
- package/dist/components/material.css +318 -0
- package/dist/components/media-card.d.mts +2 -0
- package/dist/components/media.css +225 -176
- package/dist/components/mentions.css +190 -0
- package/dist/components/mentions.d.mts +2 -0
- package/dist/components/mentions.mjs +3 -0
- package/dist/components/menu.css +121 -109
- package/dist/components/modal.css +116 -118
- package/dist/components/modal.d.mts +2 -0
- package/dist/components/nav.css +136 -129
- package/dist/components/nav.d.mts +2 -0
- package/dist/components/notification.css +247 -177
- package/dist/components/notification.d.mts +2 -0
- package/dist/components/pagination.css +62 -57
- package/dist/components/pagination.d.mts +2 -0
- package/dist/components/panel.css +70 -68
- package/dist/components/panel.d.mts +2 -0
- package/dist/components/panel.mjs +1 -0
- package/dist/components/pill.css +83 -72
- package/dist/components/pill.d.mts +2 -0
- package/dist/components/popover.css +80 -57
- package/dist/components/popover.d.mts +2 -0
- package/dist/components/progress.d.mts +2 -0
- package/dist/components/rating.d.mts +2 -0
- package/dist/components/result.d.mts +2 -0
- package/dist/components/scroll-area.css +29 -54
- package/dist/components/scroll-area.d.mts +2 -0
- package/dist/components/scroll-area.mjs +1 -0
- package/dist/components/segmented.css +167 -146
- package/dist/components/segmented.d.mts +2 -0
- package/dist/components/select.css +250 -191
- package/dist/components/select.d.mts +2 -0
- package/dist/components/sidebar.css +157 -143
- package/dist/components/sidebar.d.mts +2 -0
- package/dist/components/skeleton.d.mts +2 -0
- package/dist/components/slider.css +135 -128
- package/dist/components/slider.d.mts +2 -0
- package/dist/components/spinner.d.mts +2 -0
- package/dist/components/split-pane.css +120 -108
- package/dist/components/split-pane.d.mts +2 -0
- package/dist/components/stat.css +116 -109
- package/dist/components/stat.d.mts +2 -0
- package/dist/components/steps.css +114 -108
- package/dist/components/steps.d.mts +2 -0
- package/dist/components/switch.css +192 -149
- package/dist/components/switch.d.mts +2 -0
- package/dist/components/table.css +158 -112
- package/dist/components/table.d.mts +2 -0
- package/dist/components/tabs.css +143 -116
- package/dist/components/tabs.d.mts +2 -0
- package/dist/components/tag-input.css +52 -133
- package/dist/components/tag-input.d.mts +2 -0
- package/dist/components/tag.css +90 -72
- package/dist/components/tag.d.mts +2 -0
- package/dist/components/theme-switcher.css +105 -0
- package/dist/components/theme-switcher.d.mts +2 -0
- package/dist/components/theme-switcher.mjs +3 -0
- package/dist/components/timeline.d.mts +2 -0
- package/dist/components/toast.css +115 -97
- package/dist/components/toast.d.mts +2 -0
- package/dist/components/toolbar.css +47 -43
- package/dist/components/toolbar.d.mts +2 -0
- package/dist/components/tooltip.css +103 -43
- package/dist/components/tooltip.d.mts +2 -0
- package/dist/components/tooltip.mjs +1 -0
- package/dist/components/tree-select.css +439 -0
- package/dist/components/tree-select.d.mts +2 -0
- package/dist/components/tree-select.mjs +3 -0
- package/dist/components/tree.d.mts +2 -0
- package/dist/components/upload.css +138 -97
- package/dist/components/upload.d.mts +2 -0
- 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 +85 -70
- package/dist/index.mjs +17330 -5773
- package/dist/react.d.mts +91 -0
- package/dist/react.mjs +8307 -0
- package/dist/registry.json +918 -70
- package/dist/tokens/chinese.css +44 -0
- package/dist/tokens/colors.css +371 -1222
- package/dist/tokens/design.css +209 -0
- package/dist/tokens/dtcg.json +15926 -0
- package/dist/tokens/figma.variables.json +10779 -0
- package/dist/tokens/icon-masks.css +78 -0
- package/dist/tokens/pixel.css +53 -0
- package/dist/tokens/scrollbars.css +40 -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 +11648 -0
- package/dist/tokens/typography.css +21 -18
- package/dist/tokens.css +1783 -1806
- package/dist/ui.css +14796 -10750
- package/dist/vue.d.mts +344 -0
- package/dist/vue.mjs +7876 -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/docs/spec/scrollbars.md +46 -0
- package/package.json +56 -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
package/dist/components/tabs.css
CHANGED
|
@@ -1,62 +1,68 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: tabs(分区导航 / 子导航)
|
|
3
4
|
*
|
|
4
5
|
* 完整契约:
|
|
5
|
-
* <div class="tabs" role="tablist"> ← 页面内分区
|
|
6
|
-
* <button class="page-tab [.is-active]" role="tab" [aria-selected="true"]>…</button>
|
|
6
|
+
* <div class="icen-tabs" role="tablist"> ← 页面内分区
|
|
7
|
+
* <button class="icen-page-tab [.is-active]" role="tab" [aria-selected="true"]>…</button>
|
|
7
8
|
* </div>
|
|
8
9
|
*
|
|
9
|
-
* <nav class="tabs" role="navigation"> ← 顶部子导航(a 链接)
|
|
10
|
+
* <icen-nav class="icen-tabs" role="navigation"> ← 顶部子导航(a 链接)
|
|
10
11
|
* <a class="[.is-active]" [aria-current="page"] href="…">…</a>
|
|
11
|
-
* </nav>
|
|
12
|
+
* </icen-nav>
|
|
12
13
|
*
|
|
13
|
-
* 与 behaviors/tabs 配套:[data-tabs] > [data-tab] + [data-tab-panel],行为层维护 aria。
|
|
14
|
+
* 与 behaviors/tabs 配套:[data-icen-tabs] > [data-icen-tab] + [data-icen-tab-panel],行为层维护 aria。
|
|
14
15
|
* 窄屏换行不滚动(纪律:tab 条永不出现滚动条,一律 flex-wrap: wrap)。
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
|
-
.tabs {
|
|
18
|
+
.icen-tabs {
|
|
18
19
|
display: flex;
|
|
19
20
|
gap: 2px;
|
|
20
21
|
flex-wrap: wrap;
|
|
21
|
-
border-bottom: 1px solid var(--token-
|
|
22
|
-
margin-bottom: var(--density-space-lg);
|
|
22
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
23
|
+
margin-bottom: var(--icen-density-space-lg);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
.page-tab {
|
|
26
|
+
.icen-page-tab {
|
|
26
27
|
background: none;
|
|
27
28
|
border: 0;
|
|
28
29
|
cursor: pointer;
|
|
29
|
-
padding: var(--density-space-sm)
|
|
30
|
-
font-family: var(--font-
|
|
31
|
-
font-size: var(--
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
padding: 6px var(--icen-density-space-sm);
|
|
31
|
+
font-family: var(--icen-font-body);
|
|
32
|
+
font-size: var(--icen-font-size-control);
|
|
33
|
+
font-weight: var(--icen-font-weight-control);
|
|
34
|
+
letter-spacing: 0;
|
|
35
|
+
color: var(--icen-token-text-muted);
|
|
34
36
|
border-bottom: 2px solid transparent;
|
|
35
37
|
margin-bottom: -1px;
|
|
38
|
+
border-radius: var(--icen-radius-xs) var(--icen-radius-xs) 0 0;
|
|
36
39
|
white-space: nowrap;
|
|
37
40
|
transition:
|
|
38
41
|
color var(--icen-tx-fast),
|
|
42
|
+
background-color var(--icen-tx-fast),
|
|
39
43
|
border-color var(--icen-tx-fast);
|
|
40
44
|
}
|
|
41
|
-
.page-tab:hover {
|
|
42
|
-
color: var(--token-
|
|
45
|
+
.icen-page-tab:hover {
|
|
46
|
+
color: var(--icen-token-text);
|
|
47
|
+
background: var(--icen-token-fill-hover);
|
|
43
48
|
}
|
|
44
|
-
.page-tab:focus-visible {
|
|
49
|
+
.icen-page-tab:focus-visible {
|
|
45
50
|
outline: none;
|
|
46
|
-
border-radius: var(--radius-sm);
|
|
51
|
+
border-radius: var(--icen-radius-sm);
|
|
47
52
|
box-shadow: var(--icen-ring);
|
|
48
53
|
}
|
|
49
|
-
.page-tab.is-active,
|
|
50
|
-
.page-tab[aria-selected='true'] {
|
|
51
|
-
color: var(--token-
|
|
52
|
-
border-bottom-color: var(--token-accent);
|
|
53
|
-
font-weight:
|
|
54
|
+
.icen-page-tab.is-active,
|
|
55
|
+
.icen-page-tab[aria-selected='true'] {
|
|
56
|
+
color: var(--icen-token-text);
|
|
57
|
+
border-bottom-color: var(--icen-token-accent);
|
|
58
|
+
font-weight: 600;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
.tabs a {
|
|
57
|
-
padding: var(--density-space-sm)
|
|
58
|
-
font-size: var(--
|
|
59
|
-
|
|
61
|
+
.icen-tabs a {
|
|
62
|
+
padding: 6px var(--icen-density-space-sm);
|
|
63
|
+
font-size: var(--icen-font-size-control);
|
|
64
|
+
font-weight: var(--icen-font-weight-control);
|
|
65
|
+
color: var(--icen-token-text-muted);
|
|
60
66
|
border-bottom: 2px solid transparent;
|
|
61
67
|
margin-bottom: -1px;
|
|
62
68
|
white-space: nowrap;
|
|
@@ -65,44 +71,46 @@
|
|
|
65
71
|
color var(--icen-tx-fast),
|
|
66
72
|
border-color var(--icen-tx-fast);
|
|
67
73
|
}
|
|
68
|
-
.tabs a:hover {
|
|
69
|
-
color: var(--token-
|
|
74
|
+
.icen-tabs a:hover {
|
|
75
|
+
color: var(--icen-token-text);
|
|
70
76
|
text-decoration: none;
|
|
71
77
|
}
|
|
72
|
-
.tabs a:focus-visible {
|
|
78
|
+
.icen-tabs a:focus-visible {
|
|
73
79
|
outline: none;
|
|
74
|
-
border-radius: var(--radius-sm);
|
|
80
|
+
border-radius: var(--icen-radius-sm);
|
|
75
81
|
box-shadow: var(--icen-ring);
|
|
76
82
|
}
|
|
77
|
-
.tabs a.is-active,
|
|
78
|
-
.tabs a[aria-current='page'] {
|
|
79
|
-
color: var(--token-accent);
|
|
80
|
-
border-bottom-color: var(--token-accent);
|
|
83
|
+
.icen-tabs a.is-active,
|
|
84
|
+
.icen-tabs a[aria-current='page'] {
|
|
85
|
+
color: var(--icen-token-accent);
|
|
86
|
+
border-bottom-color: var(--icen-token-accent);
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
/* 卡片变体(可选 .tabs--cards):tab 变成 pill,没有底边线 */
|
|
84
|
-
.tabs--cards {
|
|
89
|
+
/* 卡片变体(可选 .icen-tabs--cards):tab 变成 pill,没有底边线 */
|
|
90
|
+
.icen-tabs--cards {
|
|
85
91
|
border-bottom: 0;
|
|
86
|
-
gap: var(--density-space-xs);
|
|
87
|
-
margin-bottom: var(--density-space-md);
|
|
92
|
+
gap: var(--icen-density-space-xs);
|
|
93
|
+
margin-bottom: var(--icen-density-space-md);
|
|
88
94
|
}
|
|
89
|
-
.tabs--cards .page-tab {
|
|
90
|
-
padding: var(--density-space-xs) var(--density-space-md);
|
|
91
|
-
border: 1px solid var(--token-
|
|
92
|
-
border-radius: var(--radius-full);
|
|
95
|
+
.icen-tabs--cards .icen-page-tab {
|
|
96
|
+
padding: var(--icen-density-space-xs) var(--icen-density-space-md);
|
|
97
|
+
border: 1px solid var(--icen-token-control-border);
|
|
98
|
+
border-radius: var(--icen-radius-full);
|
|
93
99
|
margin-bottom: 0;
|
|
100
|
+
color: var(--icen-token-text-muted);
|
|
101
|
+
background: var(--icen-token-control);
|
|
94
102
|
}
|
|
95
|
-
.tabs--cards .page-tab.is-active,
|
|
96
|
-
.tabs--cards .page-tab[aria-selected='true'] {
|
|
97
|
-
background: var(--token-accent);
|
|
98
|
-
color: var(--token-
|
|
99
|
-
border-color: var(--token-accent);
|
|
100
|
-
font-weight:
|
|
103
|
+
.icen-tabs--cards .icen-page-tab.is-active,
|
|
104
|
+
.icen-tabs--cards .icen-page-tab[aria-selected='true'] {
|
|
105
|
+
background: var(--icen-token-accent-subtle);
|
|
106
|
+
color: var(--icen-token-text);
|
|
107
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 28%, var(--icen-token-line-soft));
|
|
108
|
+
font-weight: 600;
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
/* 等宽变体:tab 平均占满容器 */
|
|
104
|
-
.tabs--equal .page-tab,
|
|
105
|
-
.tabs--equal a {
|
|
112
|
+
.icen-tabs--equal .icen-page-tab,
|
|
113
|
+
.icen-tabs--equal a {
|
|
106
114
|
flex: 1;
|
|
107
115
|
text-align: center;
|
|
108
116
|
}
|
|
@@ -110,137 +118,156 @@
|
|
|
110
118
|
/* ── 增强 ── */
|
|
111
119
|
|
|
112
120
|
/* 尺寸变体 */
|
|
113
|
-
.tabs--sm .page-tab {
|
|
114
|
-
padding: var(--
|
|
115
|
-
font-size: var(--density-font-size-sm);
|
|
121
|
+
.icen-tabs--sm .icen-page-tab {
|
|
122
|
+
padding: 4px var(--icen-density-space-sm);
|
|
123
|
+
font-size: var(--icen-density-font-size-sm);
|
|
116
124
|
}
|
|
117
|
-
.tabs--lg .page-tab {
|
|
118
|
-
padding:
|
|
119
|
-
font-size: var(--density-font-size-lg);
|
|
125
|
+
.icen-tabs--lg .icen-page-tab {
|
|
126
|
+
padding: 8px calc(var(--icen-density-space-md) + 2px);
|
|
127
|
+
font-size: var(--icen-density-font-size-lg);
|
|
120
128
|
}
|
|
121
129
|
|
|
122
130
|
/* Tab 带图标 */
|
|
123
|
-
.page-tab-icon {
|
|
131
|
+
.icen-page-tab-icon {
|
|
124
132
|
width: 14px;
|
|
125
133
|
height: 14px;
|
|
126
134
|
flex-shrink: 0;
|
|
127
|
-
margin-
|
|
135
|
+
margin-inline-end: 2px;
|
|
128
136
|
}
|
|
129
137
|
|
|
130
138
|
/* Tab 带徽章/计数 */
|
|
131
|
-
.page-tab-badge {
|
|
139
|
+
.icen-page-tab-badge {
|
|
132
140
|
display: inline-flex;
|
|
133
141
|
align-items: center;
|
|
134
142
|
justify-content: center;
|
|
135
143
|
min-width: 18px;
|
|
136
144
|
height: 18px;
|
|
137
145
|
padding: 0 5px;
|
|
138
|
-
margin-
|
|
139
|
-
font-size: var(--density-font-size-2xs);
|
|
146
|
+
margin-inline-start: var(--icen-density-space-xs);
|
|
147
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
140
148
|
font-weight: 600;
|
|
141
|
-
color: var(--token-text-faint);
|
|
142
|
-
background: var(--token-fill-2);
|
|
143
|
-
border-radius: var(--radius-full);
|
|
149
|
+
color: var(--icen-token-text-faint);
|
|
150
|
+
background: var(--icen-token-fill-2);
|
|
151
|
+
border-radius: var(--icen-radius-full);
|
|
144
152
|
font-variant-numeric: tabular-nums;
|
|
145
153
|
line-height: 1;
|
|
146
154
|
}
|
|
147
|
-
.page-tab.is-active .page-tab-badge,
|
|
148
|
-
.page-tab[aria-selected='true'] .page-tab-badge {
|
|
149
|
-
background: var(--token-accent);
|
|
150
|
-
color: var(--token-on-accent);
|
|
155
|
+
.icen-page-tab.is-active .icen-page-tab-badge,
|
|
156
|
+
.icen-page-tab[aria-selected='true'] .icen-page-tab-badge {
|
|
157
|
+
background: var(--icen-token-accent-strong);
|
|
158
|
+
color: var(--icen-token-on-accent);
|
|
151
159
|
}
|
|
152
160
|
|
|
153
161
|
/* 可关闭 tab */
|
|
154
|
-
.page-tab-close {
|
|
162
|
+
.icen-page-tab-close {
|
|
155
163
|
display: inline-flex;
|
|
156
164
|
align-items: center;
|
|
157
165
|
justify-content: center;
|
|
158
|
-
width: 16px
|
|
159
|
-
height:
|
|
160
|
-
margin-
|
|
161
|
-
margin-
|
|
166
|
+
width: 24px; /* WCAG 2.5.8 下限:16px 关闭钮过小(svg 视觉仍 10px) */
|
|
167
|
+
height: 24px;
|
|
168
|
+
margin-inline-start: var(--icen-density-space-xs);
|
|
169
|
+
margin-inline-end: -4px;
|
|
162
170
|
padding: 0;
|
|
163
171
|
border: 0;
|
|
164
|
-
border-radius: var(--radius-full);
|
|
172
|
+
border-radius: var(--icen-radius-full);
|
|
165
173
|
background: transparent;
|
|
166
|
-
color: var(--token-text-faint);
|
|
174
|
+
color: var(--icen-token-text-faint);
|
|
167
175
|
cursor: pointer;
|
|
168
176
|
transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast);
|
|
169
177
|
}
|
|
170
|
-
.page-tab-close:hover {
|
|
171
|
-
color: var(--token-error);
|
|
172
|
-
background: var(--token-error-muted);
|
|
178
|
+
.icen-page-tab-close:hover {
|
|
179
|
+
color: var(--icen-token-error);
|
|
180
|
+
background: var(--icen-token-error-muted);
|
|
181
|
+
}
|
|
182
|
+
.icen-page-tab-close:focus-visible {
|
|
183
|
+
outline: none;
|
|
184
|
+
box-shadow: var(--icen-ring); /* 与 .icen-page-tab 同款系统环(缺省会落回浏览器默认蓝圈) */
|
|
173
185
|
}
|
|
174
|
-
.page-tab-close svg { width: 10px; height: 10px; }
|
|
186
|
+
.icen-page-tab-close svg { width: 10px; height: 10px; }
|
|
175
187
|
|
|
176
188
|
/* 分段式 tab(替代底边线,用 segmented 视觉) */
|
|
177
|
-
.tabs--segment {
|
|
189
|
+
.icen-tabs--segment {
|
|
178
190
|
display: inline-flex;
|
|
179
191
|
border-bottom: none;
|
|
180
192
|
gap: 2px;
|
|
181
|
-
padding:
|
|
182
|
-
background: var(--token-
|
|
183
|
-
border: 1px solid var(--token-
|
|
184
|
-
border-radius: var(--radius-
|
|
185
|
-
box-shadow: var(--token-shadow-
|
|
193
|
+
padding: 3px;
|
|
194
|
+
background: var(--icen-token-surface-raised);
|
|
195
|
+
border: 1px solid var(--icen-token-control-border);
|
|
196
|
+
border-radius: var(--icen-control-radius-lg);
|
|
197
|
+
box-shadow: var(--icen-token-shadow-field);
|
|
186
198
|
}
|
|
187
|
-
.tabs--segment .page-tab {
|
|
199
|
+
.icen-tabs--segment .icen-page-tab {
|
|
188
200
|
border-bottom: none;
|
|
189
201
|
margin-bottom: 0;
|
|
190
|
-
|
|
191
|
-
|
|
202
|
+
min-block-size: calc(var(--icen-control-height-sm) - 8px);
|
|
203
|
+
padding: 0 var(--icen-control-padding-inline-sm);
|
|
204
|
+
border-radius: max(0px, calc(var(--icen-control-radius-lg) - 3px));
|
|
192
205
|
}
|
|
193
|
-
.tabs--segment .page-tab.is-active,
|
|
194
|
-
.tabs--segment .page-tab[aria-selected='true'] {
|
|
195
|
-
background: var(--token-
|
|
196
|
-
color: var(--token-
|
|
197
|
-
border-
|
|
198
|
-
|
|
206
|
+
.icen-tabs--segment .icen-page-tab.is-active,
|
|
207
|
+
.icen-tabs--segment .icen-page-tab[aria-selected='true'] {
|
|
208
|
+
background: var(--icen-token-surface);
|
|
209
|
+
color: var(--icen-token-text);
|
|
210
|
+
border: 1px solid color-mix(in srgb, var(--icen-token-line) 72%, transparent);
|
|
211
|
+
margin: -1px;
|
|
212
|
+
border-bottom-color: color-mix(in srgb, var(--icen-token-line) 72%, transparent);
|
|
213
|
+
font-weight: var(--icen-font-weight-control);
|
|
214
|
+
box-shadow: var(--icen-token-shadow-control);
|
|
199
215
|
}
|
|
200
216
|
|
|
201
|
-
/* 垂直 tab
|
|
202
|
-
.tabs--vertical {
|
|
217
|
+
/* 垂直 tab(侧栏式):轨道与指示条在 inline-end 侧,RTL 自动镜像到左缘 */
|
|
218
|
+
.icen-tabs--vertical {
|
|
203
219
|
flex-direction: column;
|
|
204
220
|
border-bottom: none;
|
|
205
|
-
border-
|
|
221
|
+
border-inline-end: 1px solid var(--icen-token-separator-soft);
|
|
206
222
|
margin-bottom: 0;
|
|
207
|
-
min-
|
|
223
|
+
min-inline-size: 160px;
|
|
208
224
|
}
|
|
209
|
-
.tabs--vertical .page-tab {
|
|
225
|
+
.icen-tabs--vertical .icen-page-tab {
|
|
210
226
|
border-bottom: none;
|
|
211
|
-
border-
|
|
227
|
+
border-inline-end: 2px solid transparent;
|
|
212
228
|
margin-bottom: 0;
|
|
213
|
-
margin-
|
|
229
|
+
margin-inline-end: -1px;
|
|
230
|
+
border-start-start-radius: var(--icen-radius-xs);
|
|
231
|
+
border-end-start-radius: var(--icen-radius-xs);
|
|
232
|
+
min-block-size: var(--icen-control-height-sm);
|
|
233
|
+
text-align: start;
|
|
234
|
+
justify-content: flex-start;
|
|
214
235
|
}
|
|
215
|
-
.tabs--vertical .page-tab.is-active,
|
|
216
|
-
.tabs--vertical .page-tab[aria-selected='true'] {
|
|
217
|
-
border-
|
|
236
|
+
.icen-tabs--vertical .icen-page-tab.is-active,
|
|
237
|
+
.icen-tabs--vertical .icen-page-tab[aria-selected='true'] {
|
|
238
|
+
border-inline-end-color: var(--icen-token-accent);
|
|
218
239
|
border-bottom-color: transparent;
|
|
240
|
+
background: var(--icen-token-fill-selected);
|
|
219
241
|
}
|
|
220
242
|
|
|
221
243
|
@media (prefers-reduced-motion: reduce) {
|
|
222
|
-
.page-tab, .tabs a, .page-tab-close { transition: none; }
|
|
244
|
+
.icen-page-tab, .icen-tabs a, .icen-page-tab-close { transition: none; }
|
|
223
245
|
}
|
|
224
246
|
|
|
225
|
-
/* ── 指示条([data-tabs-ink],与 behaviors/tabs 配套;本节为追加)── */
|
|
226
|
-
/* tablist(.tabs)挂 data-tabs-ink 时,行为层创建并移动 .tabs-ink:
|
|
247
|
+
/* ── 指示条([data-icen-tabs-ink],与 behaviors/tabs 配套;本节为追加)── */
|
|
248
|
+
/* tablist(.icen-tabs)挂 data-icen-tabs-ink 时,行为层创建并移动 .icen-tabs-ink:
|
|
227
249
|
宽 / translateX 由 JS 内联写入(布局定位,同 popover 模式);
|
|
228
250
|
此处只负责视觉(高度 / 圆角 / 背景)与位移过渡(--duration / --ease token)。 */
|
|
229
|
-
.tabs[data-tabs-ink] {
|
|
251
|
+
.icen-tabs[data-icen-tabs-ink] {
|
|
230
252
|
position: relative;
|
|
231
253
|
}
|
|
232
|
-
|
|
254
|
+
/* 挂墨水条时,活动 tab 自身的下划线让位(不双画) */
|
|
255
|
+
.icen-tabs[data-icen-tabs-ink] .icen-page-tab.is-active,
|
|
256
|
+
.icen-tabs[data-icen-tabs-ink] .icen-page-tab[aria-selected='true'] { border-bottom-color: transparent; }
|
|
257
|
+
.icen-tabs-ink {
|
|
233
258
|
position: absolute;
|
|
234
259
|
bottom: -1px; /* 盖在容器 1px 底边线上,与活动 tab 的 2px 下划线同高 */
|
|
235
|
-
left: 0;
|
|
260
|
+
left: 0; /* guard:allow-physical 指示条由 JS 内联写 width/translateX 定位(popover 同模式),原点取物理左缘由布局函数计算 */
|
|
236
261
|
height: 2px;
|
|
237
|
-
border-radius: var(--radius-full);
|
|
238
|
-
background: var(--token-accent);
|
|
262
|
+
border-radius: var(--icen-radius-full);
|
|
263
|
+
background: var(--icen-token-accent);
|
|
239
264
|
pointer-events: none;
|
|
240
265
|
transition:
|
|
241
|
-
width var(--duration-normal) var(--ease-out),
|
|
242
|
-
transform var(--duration-normal) var(--ease-out);
|
|
266
|
+
width var(--icen-duration-normal) var(--icen-ease-out),
|
|
267
|
+
transform var(--icen-duration-normal) var(--icen-ease-out);
|
|
243
268
|
}
|
|
244
269
|
@media (prefers-reduced-motion: reduce) {
|
|
245
|
-
.tabs-ink { transition: none; }
|
|
270
|
+
.icen-tabs-ink { transition: none; }
|
|
271
|
+
}
|
|
272
|
+
|
|
246
273
|
}
|
|
@@ -1,139 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* <input class="tag-input-field" placeholder="…" />
|
|
9
|
-
* </div>
|
|
10
|
-
*
|
|
11
|
-
* behavior 渲染:
|
|
12
|
-
* - 解析 data-tags → 渲染 .tag-chip(含 .tag-chip-x 删除钮),input 放在末尾
|
|
13
|
-
* - 达到 data-max 时容器加 .is-max(warning 色边框)并拒加
|
|
14
|
-
* - data-duplicate="false" 时重复值被拒绝(短暂 .is-shake 抖动反馈)
|
|
15
|
-
* - 删除钮 Enter/Space 触发,删后 input 自动聚焦
|
|
1
|
+
@layer icen.components {
|
|
2
|
+
/* Tag editor: native input.icen-tag-input-field inside .icen-tag-input.
|
|
3
|
+
* Behavior adds stable .icen-tag-chip > bdi.icen-tag-chip-label +
|
|
4
|
+
* button.icen-tag-chip-x, an optical .icen-tag-input-count, hidden native form
|
|
5
|
+
* entries, and an adjacent .icen-tag-input-feedback[role=status].
|
|
6
|
+
* --sm / --lg vary density; data-icen-readonly keeps labels without actions.
|
|
7
|
+
* is-max is a capacity state, is-unavailable follows actual disabled state.
|
|
16
8
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
.icen-tag-input {
|
|
10
|
+
--tag-action-size: calc(var(--icen-control-height-md) - 10px);
|
|
19
11
|
display: flex;
|
|
20
12
|
flex-wrap: wrap;
|
|
21
13
|
align-items: center;
|
|
22
|
-
gap: var(--density-space-xs);
|
|
23
|
-
padding: var(--density-space-xs);
|
|
24
|
-
min-
|
|
25
|
-
background: var(--token-control);
|
|
26
|
-
border:
|
|
27
|
-
border-radius: var(--radius
|
|
28
|
-
box-shadow: var(--token-shadow-
|
|
29
|
-
transition:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
.tag-input:
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
.tag-input
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
.tag-
|
|
41
|
-
.tag-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
.tag-input
|
|
46
|
-
.tag-input
|
|
47
|
-
.tag-input
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
.tag-input.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.tag-input
|
|
58
|
-
|
|
59
|
-
.tag-chip {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
background: var(--token-accent-subtle);
|
|
66
|
-
color: var(--token-accent);
|
|
67
|
-
font-size: var(--density-font-size-xs);
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
line-height: 1.4;
|
|
70
|
-
max-width: 100%;
|
|
71
|
-
animation: tag-pop var(--icen-tx-fast);
|
|
72
|
-
}
|
|
73
|
-
/* readonly 变体(消费方手写标记,behavior 不产出) */
|
|
74
|
-
.tag-chip--readonly { background: var(--token-fill-2); color: var(--token-text-muted); }
|
|
75
|
-
|
|
76
|
-
@keyframes tag-pop {
|
|
77
|
-
from { opacity: 0; transform: scale(0.85); }
|
|
78
|
-
to { opacity: 1; transform: scale(1); }
|
|
79
|
-
}
|
|
80
|
-
@media (prefers-reduced-motion: reduce) {
|
|
81
|
-
.tag-chip { animation: none; }
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.tag-chip-x {
|
|
85
|
-
display: inline-flex;
|
|
86
|
-
align-items: center;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
width: 16px;
|
|
89
|
-
height: 16px;
|
|
90
|
-
padding: 0;
|
|
91
|
-
border: none;
|
|
92
|
-
background: transparent;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
border-radius: var(--radius-full);
|
|
95
|
-
color: inherit;
|
|
96
|
-
font-size: var(--density-font-size-xs);
|
|
97
|
-
line-height: 1;
|
|
98
|
-
opacity: 0.7;
|
|
99
|
-
transition:
|
|
100
|
-
background-color var(--icen-tx-fast),
|
|
101
|
-
opacity var(--icen-tx-fast),
|
|
102
|
-
color var(--icen-tx-fast);
|
|
103
|
-
}
|
|
104
|
-
.tag-chip-x:hover {
|
|
105
|
-
opacity: 1;
|
|
106
|
-
background: color-mix(in srgb, currentColor 18%, transparent);
|
|
107
|
-
color: var(--token-on-accent);
|
|
108
|
-
}
|
|
109
|
-
.tag-chip-x:focus-visible {
|
|
110
|
-
outline: none;
|
|
111
|
-
opacity: 1;
|
|
112
|
-
box-shadow: var(--icen-ring);
|
|
113
|
-
}
|
|
114
|
-
.tag-chip-x svg { width: 10px; height: 10px; }
|
|
14
|
+
gap: var(--icen-density-space-xs);
|
|
15
|
+
padding: var(--icen-density-space-xs);
|
|
16
|
+
min-block-size: var(--icen-control-height-md);
|
|
17
|
+
background: var(--icen-token-control);
|
|
18
|
+
border: var(--icen-control-border-width) solid var(--icen-token-control-border);
|
|
19
|
+
border-radius: var(--icen-control-radius);
|
|
20
|
+
box-shadow: var(--icen-token-shadow-field);
|
|
21
|
+
transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
|
|
22
|
+
}
|
|
23
|
+
.icen-tag-input:focus-within { border-color: var(--icen-control-focus-border); box-shadow: var(--icen-control-focus-shadow); }
|
|
24
|
+
.icen-tag-input--sm { --tag-action-size: calc(var(--icen-control-height-sm) - 8px); min-block-size: var(--icen-control-height-sm); }
|
|
25
|
+
.icen-tag-input--lg { --tag-action-size: calc(var(--icen-control-height-lg) - 12px); min-block-size: var(--icen-control-height-lg); }
|
|
26
|
+
.icen-tag-input:is(.is-disabled,.is-unavailable,[aria-disabled='true'],[data-icen-disabled]) { background: var(--icen-token-bg-soft); cursor: not-allowed; }
|
|
27
|
+
.icen-tag-input.is-unavailable > .icen-tag-chip { background: var(--icen-token-fill-2); color: var(--icen-token-text-muted); }
|
|
28
|
+
.icen-tag-input.is-unavailable .icen-tag-chip-x { visibility: hidden; }
|
|
29
|
+
.icen-tag-input.is-unavailable :is(.icen-tag-input-field,.icen-tag-chip-x) { cursor: not-allowed; }
|
|
30
|
+
.icen-tag-chip { display: inline-flex; align-items: center; gap: var(--icen-control-gap-sm); padding-inline-start: var(--icen-density-space-sm); border-radius: var(--icen-radius-full); background: var(--icen-token-accent-subtle); color: var(--icen-token-text); font-size: var(--icen-density-font-size-sm); font-weight: var(--icen-font-weight-control); line-height: 1.4; max-inline-size: 100%; min-inline-size: 0; animation: icen-pop-in var(--icen-tx-fast); }
|
|
31
|
+
.icen-tag-chip-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
32
|
+
.icen-tag-chip--readonly, .is-readonly > .icen-tag-chip { background: var(--icen-token-fill-2); color: var(--icen-token-text-muted); padding-inline: var(--icen-density-space-sm); min-block-size: var(--tag-action-size); }
|
|
33
|
+
.icen-tag-chip-x { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; inline-size: var(--tag-action-size); block-size: var(--tag-action-size); padding: 0; border: 0; border-radius: var(--icen-radius-full); color: inherit; background: transparent; cursor: pointer; transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), opacity var(--icen-tx-fast); }
|
|
34
|
+
.icen-tag-chip-x svg { inline-size: 12px; block-size: 12px; pointer-events: none; }
|
|
35
|
+
.icen-tag-chip-x[hidden] { display: none; }
|
|
36
|
+
.icen-tag-chip-x:focus-visible { outline: 2px solid var(--icen-token-accent); outline-offset: -2px; opacity: 1; }
|
|
37
|
+
.icen-tag-input-field { flex: 1 1 6ch; min-inline-size: 6ch; max-inline-size: 100%; padding: var(--icen-density-space-xs); border: 0; background: transparent; outline: none; color: var(--icen-token-text); font: inherit; font-size: var(--icen-density-font-size-sm); }
|
|
38
|
+
.icen-tag-input-field::placeholder { color: var(--icen-token-text-muted); opacity: 1; }
|
|
39
|
+
.icen-tag-input--sm :is(.icen-tag-chip,.icen-tag-input-field) { font-size: var(--icen-density-font-size-xs); }
|
|
40
|
+
.icen-tag-input--lg :is(.icen-tag-chip,.icen-tag-input-field) { font-size: var(--icen-density-font-size-md); }
|
|
41
|
+
.icen-tag-input-count { flex: 0 0 auto; padding-inline: var(--icen-density-space-xs); color: var(--icen-token-text-muted); font-size: var(--icen-density-font-size-xs); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
|
|
42
|
+
.icen-tag-input-feedback { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
|
|
43
|
+
.icen-tag-input-feedback.is-visible { position: static; display: block; inline-size: auto; block-size: auto; margin-block-start: var(--icen-density-space-xs); overflow: visible; clip-path: none; color: var(--icen-token-text-muted); font-size: var(--icen-density-font-size-sm); }
|
|
44
|
+
/* 行为侧错误(重复 tag / 超上限)可见时必挂 aria-invalid:错误文案走 error 色、
|
|
45
|
+
边框同步,否则错误与中性提示同灰、字段看不出异常(form.css 同款口径) */
|
|
46
|
+
.icen-tag-input:has(.icen-tag-input-field[aria-invalid='true']) .icen-tag-input-feedback.is-visible { color: var(--icen-token-error); }
|
|
47
|
+
.icen-tag-input:has(.icen-tag-input-field[aria-invalid='true']) { border-color: var(--icen-token-error); }
|
|
48
|
+
@media (hover: hover) and (pointer: fine) {
|
|
49
|
+
.icen-tag-input:not(.is-unavailable):hover { border-color: var(--icen-hover-border); }
|
|
50
|
+
.icen-tag-chip-x { opacity: 0; }
|
|
51
|
+
.icen-tag-chip:is(:hover,:focus-within) .icen-tag-chip-x { opacity: 1; }
|
|
52
|
+
.icen-tag-chip-x:hover { background: var(--icen-token-fill-2); }
|
|
53
|
+
}
|
|
54
|
+
@media (pointer: coarse) { .icen-tag-chip-x { min-inline-size: 44px; min-block-size: 44px; opacity: 1; } .icen-tag-input-field { min-block-size: 44px; } }
|
|
55
|
+
@media (prefers-reduced-motion: reduce) { .icen-tag-chip { animation: none; } .icen-tag-input, .icen-tag-chip-x { transition: none; } }
|
|
56
|
+
@media (forced-colors: active) { .icen-tag-chip { border: 1px solid CanvasText; } .icen-tag-chip-x:focus-visible { outline-color: Highlight; } }
|
|
115
57
|
|
|
116
|
-
.tag-input-field {
|
|
117
|
-
flex: 1;
|
|
118
|
-
min-width: 80px;
|
|
119
|
-
padding: 2px;
|
|
120
|
-
background: transparent;
|
|
121
|
-
border: none;
|
|
122
|
-
outline: none;
|
|
123
|
-
color: var(--token-text);
|
|
124
|
-
font: inherit;
|
|
125
|
-
font-size: var(--density-font-size-sm);
|
|
126
|
-
}
|
|
127
|
-
.tag-input-field::placeholder {
|
|
128
|
-
color: color-mix(in srgb, var(--token-text-faint) 60%, transparent);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* 重复值抖动反馈(behavior 短暂挂 is-shake) */
|
|
132
|
-
.tag-input.is-shake {
|
|
133
|
-
animation: tag-shake var(--tag-shake-duration, 0.32s) var(--ease-out);
|
|
134
|
-
}
|
|
135
|
-
@keyframes tag-shake {
|
|
136
|
-
0%, 100% { transform: translateX(0); }
|
|
137
|
-
20%, 60% { transform: translateX(-3px); }
|
|
138
|
-
40%, 80% { transform: translateX(3px); }
|
|
139
58
|
}
|