@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
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
@layer icen.components {
|
|
2
|
+
/*
|
|
3
|
+
* @icen.ai/ui — Component: mentions
|
|
4
|
+
* 声明式宿主不变:<div class="icen-mentions"><textarea class="icen-input"></textarea></div>;
|
|
5
|
+
* createMentions 把 textarea 替换为富文本编辑区
|
|
6
|
+
* <div class="icen-input icen-mentions-editor" contenteditable="true" role="textbox"
|
|
7
|
+
* aria-multiline="true" tabindex="0" data-icen-placeholder="…" [.is-empty]>
|
|
8
|
+
* id/class/aria-label/rows 转移到编辑区;有 name 的 textarea 生成同名 hidden input 承载纯文本;
|
|
9
|
+
* destroy 时恢复 textarea 并回填纯文本。提及是对象单元:
|
|
10
|
+
* <span class="icen-mention-token is-directory|is-custom" contenteditable="false"
|
|
11
|
+
* data-icen-mention-id="…"><bdi>@名称</bdi>[<span class="icen-mention-badge">自定义</span>]</span>
|
|
12
|
+
* token 光标不可进入(原子),Backspace/Delete 整体删除;自定义提及 = 虚线边 + 徽标。
|
|
13
|
+
* 弹层 .icen-mentions-panel portal 到 body:.icen-mentions-list 是 named listbox(只含
|
|
14
|
+
* .icen-mentions-option,custom 模式的「创建 …」项带 .icen-mentions-option-badge),
|
|
15
|
+
* loading/empty/error-retry 状态是 listbox 的并列兄弟。多行 textbox 语义不带 aria-expanded。
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/* 宿主壳:输入框视觉自治(不套 .icen-input-wrap——那是单行固定高控件壳,多行会被压爆) */
|
|
19
|
+
.icen-mentions {
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding: var(--icen-density-space-sm) var(--icen-field-padding-inline);
|
|
23
|
+
background: var(--icen-token-control);
|
|
24
|
+
border: var(--icen-control-border-width) solid var(--icen-token-control-border);
|
|
25
|
+
border-radius: var(--icen-control-radius);
|
|
26
|
+
box-shadow: var(--icen-token-shadow-field);
|
|
27
|
+
cursor: text;
|
|
28
|
+
transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
|
|
29
|
+
}
|
|
30
|
+
.icen-mentions:hover { border-color: var(--icen-token-control-border-hover); }
|
|
31
|
+
.icen-mentions:focus-within {
|
|
32
|
+
border-color: var(--icen-control-focus-border);
|
|
33
|
+
box-shadow: var(--icen-control-focus-shadow);
|
|
34
|
+
}
|
|
35
|
+
.icen-mentions > .icen-input { display: block; width: 100%; }
|
|
36
|
+
|
|
37
|
+
/* 富文本编辑区:多行输入壳视觉沿用宿主,排版 pre-wrap 随内容纵向生长 */
|
|
38
|
+
.icen-mentions > .icen-mentions-editor {
|
|
39
|
+
display: block;
|
|
40
|
+
inline-size: 100%;
|
|
41
|
+
min-block-size: calc(var(--icen-mentions-rows, 3) * 1lh);
|
|
42
|
+
white-space: pre-wrap;
|
|
43
|
+
overflow-wrap: break-word;
|
|
44
|
+
word-break: break-word;
|
|
45
|
+
outline: none;
|
|
46
|
+
cursor: text;
|
|
47
|
+
}
|
|
48
|
+
/* 占位文本走数据属性 + ::before,不进值(.is-empty 由行为层按纯文本是否为空切换) */
|
|
49
|
+
.icen-mentions > .icen-mentions-editor.is-empty::before {
|
|
50
|
+
content: attr(data-icen-placeholder);
|
|
51
|
+
color: var(--icen-token-text-faint);
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
.icen-mentions > .icen-mentions-editor[aria-disabled='true'] {
|
|
55
|
+
opacity: var(--icen-disabled-opacity);
|
|
56
|
+
cursor: not-allowed;
|
|
57
|
+
user-select: none;
|
|
58
|
+
pointer-events: none; /* 禁用编辑器不吃 hover 抬边 */
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 提及 token:文本流中的 inline pill(原子单元,光标不可进入,整体删除) */
|
|
62
|
+
.icen-mention-token {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
padding-inline: var(--icen-density-space-xs);
|
|
65
|
+
border: 1px solid color-mix(in srgb, var(--icen-token-accent) 40%, transparent);
|
|
66
|
+
border-radius: var(--icen-radius-full);
|
|
67
|
+
background: var(--icen-token-accent-subtle);
|
|
68
|
+
color: var(--icen-token-accent-text);
|
|
69
|
+
font-size: var(--icen-density-font-size-sm);
|
|
70
|
+
line-height: var(--icen-line-height-body);
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
cursor: default;
|
|
73
|
+
transition: background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
|
|
74
|
+
}
|
|
75
|
+
.icen-mention-token:hover {
|
|
76
|
+
background: var(--icen-token-accent-glow);
|
|
77
|
+
border-color: var(--icen-token-accent);
|
|
78
|
+
}
|
|
79
|
+
/* 自定义提及:虚线边 + 中性浅底 + 「自定义」徽标(i18n 注入),与目录提及一眼区分 */
|
|
80
|
+
.icen-mention-token.is-custom {
|
|
81
|
+
border-style: dashed;
|
|
82
|
+
border-color: var(--icen-token-outline-strong);
|
|
83
|
+
background: var(--icen-token-fill-1);
|
|
84
|
+
color: var(--icen-token-text);
|
|
85
|
+
}
|
|
86
|
+
.icen-mention-token.is-custom:hover {
|
|
87
|
+
background: var(--icen-token-fill-2);
|
|
88
|
+
border-color: var(--icen-token-text-muted);
|
|
89
|
+
}
|
|
90
|
+
.icen-mention-badge {
|
|
91
|
+
margin-inline-start: var(--icen-density-space-xs);
|
|
92
|
+
padding-inline: var(--icen-density-space-xs);
|
|
93
|
+
border-radius: var(--icen-radius-full);
|
|
94
|
+
background: var(--icen-token-accent-strong);
|
|
95
|
+
color: var(--icen-token-on-accent);
|
|
96
|
+
font-size: var(--icen-density-font-size-sm);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.icen-mentions-panel {
|
|
100
|
+
position: fixed;
|
|
101
|
+
z-index: var(--icen-z-popover);
|
|
102
|
+
overflow-y: auto;
|
|
103
|
+
overscroll-behavior: contain;
|
|
104
|
+
padding: var(--icen-density-space-xs);
|
|
105
|
+
background: var(--icen-token-surface);
|
|
106
|
+
border: 1px solid var(--icen-token-material-edge);
|
|
107
|
+
border-radius: var(--icen-radius-lg);
|
|
108
|
+
box-shadow: var(--icen-token-material-light), var(--icen-token-shadow-elevated);
|
|
109
|
+
transform-origin: top center;
|
|
110
|
+
animation: icen-pop-in var(--icen-tx-fast);
|
|
111
|
+
}
|
|
112
|
+
.icen-mentions-panel[data-icen-side='top'] { transform-origin: bottom center; }
|
|
113
|
+
|
|
114
|
+
/* 异步加载态(role=status,screen reader 播报) */
|
|
115
|
+
.icen-mentions-status {
|
|
116
|
+
padding: var(--icen-density-space-sm);
|
|
117
|
+
font-size: var(--icen-density-font-size-sm);
|
|
118
|
+
color: var(--icen-token-text-muted);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.icen-mentions-option {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
gap: var(--icen-control-gap-sm);
|
|
125
|
+
padding: 4px var(--icen-density-space-sm);
|
|
126
|
+
font-size: var(--icen-font-size-control);
|
|
127
|
+
color: var(--icen-token-text);
|
|
128
|
+
border-radius: var(--icen-radius-xs);
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
min-block-size: var(--icen-control-height-sm);
|
|
131
|
+
transition:
|
|
132
|
+
background-color var(--icen-tx-fast),
|
|
133
|
+
color var(--icen-tx-fast);
|
|
134
|
+
}
|
|
135
|
+
.icen-mentions-empty { padding: var(--icen-density-space-sm); font-size: var(--icen-density-font-size-sm); color: var(--icen-token-text-muted); text-align: center; }
|
|
136
|
+
@media (pointer: coarse) { .icen-mentions-option { min-block-size: 44px; } }
|
|
137
|
+
@media (prefers-reduced-motion: reduce) {
|
|
138
|
+
.icen-mentions-panel { animation: none; }
|
|
139
|
+
.icen-mentions-option,
|
|
140
|
+
.icen-mention-token { transition: none; }
|
|
141
|
+
}
|
|
142
|
+
.icen-mentions-option:hover:not(.is-disabled) { background: var(--icen-token-fill-hover); }
|
|
143
|
+
.icen-mentions-option.is-active { background: var(--icen-token-fill-selected); }
|
|
144
|
+
.icen-mentions-option.is-disabled {
|
|
145
|
+
opacity: var(--icen-disabled-opacity);
|
|
146
|
+
cursor: not-allowed;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* custom 模式的「创建 …」项:accent 文案 + 自定义徽标 */
|
|
150
|
+
.icen-mentions-option--create .icen-mentions-option-label { color: var(--icen-token-accent-text); }
|
|
151
|
+
.icen-mentions-option-badge {
|
|
152
|
+
flex: 0 0 auto;
|
|
153
|
+
display: inline-flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
padding-inline: var(--icen-density-space-xs);
|
|
156
|
+
border-radius: var(--icen-radius-full);
|
|
157
|
+
background: var(--icen-token-accent-strong);
|
|
158
|
+
color: var(--icen-token-on-accent);
|
|
159
|
+
font-size: var(--icen-density-font-size-sm);
|
|
160
|
+
line-height: var(--icen-line-height-body);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.icen-mentions-option-label {
|
|
164
|
+
flex: 1;
|
|
165
|
+
min-width: 0;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
text-overflow: ellipsis;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* 强制对比度模式:token 失去彩色底,但边界与文字必须仍可辨认 */
|
|
172
|
+
@media (forced-colors: active) {
|
|
173
|
+
.icen-mention-token {
|
|
174
|
+
border-color: Highlight;
|
|
175
|
+
background: transparent;
|
|
176
|
+
color: Highlight;
|
|
177
|
+
}
|
|
178
|
+
.icen-mention-token.is-custom {
|
|
179
|
+
border-color: CanvasText;
|
|
180
|
+
color: CanvasText;
|
|
181
|
+
}
|
|
182
|
+
.icen-mention-badge,
|
|
183
|
+
.icen-mentions-option-badge {
|
|
184
|
+
border: 1px solid CanvasText;
|
|
185
|
+
background: transparent;
|
|
186
|
+
color: CanvasText;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
}
|
package/dist/components/menu.css
CHANGED
|
@@ -1,212 +1,224 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: menu(菜单面板,与 behaviors/dropdown、context-menu 配套)
|
|
3
4
|
*
|
|
4
|
-
* 面板由 JS portal 到 document.body 并按 fixed 定位;data-side 决定进场位移方向。
|
|
5
|
+
* 面板由 JS portal 到 document.body 并按 fixed 定位;data-icen-side 决定进场位移方向。
|
|
5
6
|
* 规格源自 opengal overlay/dropdown + overlay/context-menu。
|
|
6
7
|
*
|
|
7
8
|
* 完整契约(dropdown):
|
|
8
|
-
* <button class="menu-trigger pressable" data-
|
|
9
|
-
* <div class="menu" id="id" role="menu" data-side="bottom" hidden>
|
|
10
|
-
* <div class="menu-label">组标题(可选)</div>
|
|
11
|
-
* <button class="menu-item [.is-highlighted] [.is-disabled] [.menu-item--danger]" role="menuitem">
|
|
12
|
-
* <span class="menu-item-icon">…svg…</span>
|
|
13
|
-
* <span class="menu-item-label">文本</span>
|
|
14
|
-
* <span class="menu-item-sub">副标题</span>
|
|
15
|
-
* <span class="menu-item-shortcut">⌘S</span>
|
|
9
|
+
* <button class="menu-trigger icen-pressable" data-icen-dropdown-trigger aria-haspopup="menu" aria-expanded="false">…</button>
|
|
10
|
+
* <div class="icen-menu" id="id" role="menu" data-icen-side="bottom" hidden>
|
|
11
|
+
* <div class="icen-menu-label">组标题(可选)</div>
|
|
12
|
+
* <button class="icen-menu-item [.is-highlighted] [.is-disabled] [.icen-menu-item--danger]" role="menuitem">
|
|
13
|
+
* <span class="icen-menu-item-icon">…svg…</span>
|
|
14
|
+
* <span class="icen-menu-item-label">文本</span>
|
|
15
|
+
* <span class="icen-menu-item-sub">副标题</span>
|
|
16
|
+
* <span class="icen-menu-item-shortcut">⌘S</span>
|
|
16
17
|
* </button>
|
|
17
|
-
* <div class="menu-separator"></div>
|
|
18
|
-
* <button class="menu-item menu-item--checked">
|
|
19
|
-
* <span class="menu-item-
|
|
20
|
-
* <span class="menu-item-label">已选项</span>
|
|
18
|
+
* <div class="icen-menu-separator"></div>
|
|
19
|
+
* <button class="icen-menu-item icen-menu-item--checked">
|
|
20
|
+
* <span class="icen-menu-item-label">已选项</span>
|
|
21
21
|
* </button>
|
|
22
22
|
* </div>
|
|
23
23
|
*
|
|
24
|
-
* context-menu:附加 .menu--context(更窄宽度、更高 z-index)。
|
|
24
|
+
* context-menu:附加 .icen-menu--context(更窄宽度、更高 z-index)。
|
|
25
25
|
* behavior 维护:键盘箭头导航 + .is-highlighted 跟随、Enter 触发、ESC 关闭、外部点击关闭。
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
.menu {
|
|
28
|
+
.icen-menu {
|
|
29
29
|
position: fixed;
|
|
30
|
-
z-index: var(--z-popover);
|
|
31
|
-
min-
|
|
32
|
-
max-
|
|
33
|
-
max-
|
|
30
|
+
z-index: var(--icen-z-popover);
|
|
31
|
+
min-inline-size: 180px;
|
|
32
|
+
max-inline-size: 320px;
|
|
33
|
+
max-block-size: min(70vh, 420px);
|
|
34
34
|
overflow-y: auto;
|
|
35
35
|
overscroll-behavior: contain;
|
|
36
36
|
margin: 0;
|
|
37
|
-
padding: var(--density-space-xs);
|
|
38
|
-
background: color-mix(in srgb, var(--token-
|
|
39
|
-
backdrop-filter: blur(
|
|
40
|
-
-webkit-backdrop-filter: blur(
|
|
41
|
-
border: 1px solid var(--token-
|
|
42
|
-
box-shadow: var(--token-shadow-
|
|
43
|
-
border-radius: var(--radius-lg);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.menu[data-
|
|
48
|
-
.menu[data-side='
|
|
37
|
+
padding: var(--icen-density-space-xs);
|
|
38
|
+
background: color-mix(in srgb, var(--icen-token-surface) 94%, transparent);
|
|
39
|
+
backdrop-filter: blur(var(--icen-material-blur-floating)) saturate(var(--icen-material-saturate));
|
|
40
|
+
-webkit-backdrop-filter: blur(var(--icen-material-blur-floating)) saturate(var(--icen-material-saturate));
|
|
41
|
+
border: 1px solid var(--icen-token-material-edge);
|
|
42
|
+
box-shadow: var(--icen-token-material-light), var(--icen-token-shadow-elevated);
|
|
43
|
+
border-radius: var(--icen-radius-lg);
|
|
44
|
+
transform-origin: top center;
|
|
45
|
+
animation: icen-menu-in var(--menu-in-duration, var(--icen-duration-fast)) var(--icen-ease-enter);
|
|
46
|
+
}
|
|
47
|
+
.icen-menu[data-icen-state='closing'] { pointer-events: none; }
|
|
48
|
+
.icen-menu[data-icen-side='top'] { transform-origin: bottom center; }
|
|
49
|
+
.icen-menu[data-icen-side='top'] { animation-name: icen-menu-in-top; }
|
|
50
|
+
.icen-menu[data-icen-side='left'] { animation-name: icen-menu-in-left; }
|
|
51
|
+
.icen-menu[data-icen-side='right'] { animation-name: icen-menu-in-right; }
|
|
49
52
|
|
|
50
53
|
/* 右键菜单:opengal context-menu 规格沿用 */
|
|
51
|
-
.menu--context {
|
|
52
|
-
min-
|
|
53
|
-
max-
|
|
54
|
-
z-index: var(--z-tooltip); /* 上下文菜单高于普通 popover,与 tooltip 平齐 */
|
|
54
|
+
.icen-menu--context {
|
|
55
|
+
min-inline-size: 218px;
|
|
56
|
+
max-inline-size: 286px;
|
|
57
|
+
z-index: var(--icen-z-tooltip); /* 上下文菜单高于普通 popover,与 tooltip 平齐 */
|
|
55
58
|
--menu-in-duration: 100ms;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
/* ── 分组标签 / 头(context-menu 的 header 项) ── */
|
|
59
|
-
.menu-label {
|
|
60
|
-
padding: var(--density-space-xs) var(--density-space-sm);
|
|
61
|
-
font-size: var(--
|
|
62
|
+
.icen-menu-label {
|
|
63
|
+
padding: var(--icen-density-space-xs) var(--icen-density-space-sm);
|
|
64
|
+
font-size: var(--icen-font-size-caption);
|
|
62
65
|
font-weight: 600;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
color: var(--token-text-faint);
|
|
66
|
+
letter-spacing: var(--icen-letter-spacing-caption);
|
|
67
|
+
color: var(--icen-token-text-muted);
|
|
66
68
|
}
|
|
67
|
-
.menu-header {
|
|
68
|
-
padding: var(--density-space-sm) calc(var(--density-space-sm) + 2px) var(--density-space-xs);
|
|
69
|
+
.icen-menu-header {
|
|
70
|
+
padding: var(--icen-density-space-sm) calc(var(--icen-density-space-sm) + 2px) var(--icen-density-space-xs);
|
|
69
71
|
}
|
|
70
|
-
.menu-header-label {
|
|
72
|
+
.icen-menu-header-label {
|
|
71
73
|
display: block;
|
|
72
74
|
overflow: hidden;
|
|
73
75
|
text-overflow: ellipsis;
|
|
74
76
|
white-space: nowrap;
|
|
75
|
-
font-size: var(--density-font-size-sm);
|
|
77
|
+
font-size: var(--icen-density-font-size-sm);
|
|
76
78
|
font-weight: 500;
|
|
77
79
|
line-height: 1.4;
|
|
78
|
-
color: var(--token-text);
|
|
80
|
+
color: var(--icen-token-text);
|
|
79
81
|
}
|
|
80
|
-
.menu-header-desc {
|
|
82
|
+
.icen-menu-header-desc {
|
|
81
83
|
display: block;
|
|
82
84
|
overflow: hidden;
|
|
83
85
|
text-overflow: ellipsis;
|
|
84
86
|
white-space: nowrap;
|
|
85
|
-
font-size: var(--density-font-size-xs);
|
|
87
|
+
font-size: var(--icen-density-font-size-xs);
|
|
86
88
|
line-height: 1.4;
|
|
87
|
-
color: var(--token-text-faint);
|
|
89
|
+
color: var(--icen-token-text-faint);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
/* ── 菜单项 ── */
|
|
91
|
-
.menu-item {
|
|
93
|
+
.icen-menu-item {
|
|
92
94
|
position: relative;
|
|
93
95
|
display: flex;
|
|
94
96
|
align-items: center;
|
|
95
|
-
gap: var(--
|
|
97
|
+
gap: var(--icen-control-gap-sm);
|
|
98
|
+
min-block-size: var(--icen-control-height-sm);
|
|
96
99
|
width: 100%;
|
|
97
|
-
padding:
|
|
100
|
+
padding: 4px var(--icen-density-space-sm);
|
|
98
101
|
background: none;
|
|
99
102
|
border: 0;
|
|
100
103
|
font: inherit;
|
|
101
|
-
font-size: var(--
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
font-size: var(--icen-font-size-control);
|
|
105
|
+
line-height: 1.35;
|
|
106
|
+
text-align: start;
|
|
107
|
+
color: var(--icen-token-text);
|
|
108
|
+
border-radius: var(--icen-radius-xs);
|
|
105
109
|
cursor: pointer;
|
|
106
110
|
user-select: none;
|
|
107
111
|
transition:
|
|
108
112
|
background-color var(--icen-tx-fast),
|
|
109
113
|
color var(--icen-tx-fast);
|
|
110
114
|
}
|
|
111
|
-
.menu-item:hover:not(.is-disabled) {
|
|
112
|
-
background: var(--token-fill-
|
|
115
|
+
.icen-menu-item:hover:not(.is-disabled) {
|
|
116
|
+
background: var(--icen-token-fill-hover);
|
|
113
117
|
}
|
|
114
|
-
.menu-item.is-highlighted,
|
|
115
|
-
.menu-item:focus-visible {
|
|
116
|
-
background: var(--token-
|
|
117
|
-
color: var(--token-
|
|
118
|
+
.icen-menu-item.is-highlighted,
|
|
119
|
+
.icen-menu-item:focus-visible {
|
|
120
|
+
background: var(--icen-token-fill-selected);
|
|
121
|
+
color: var(--icen-token-text);
|
|
118
122
|
outline: none;
|
|
119
123
|
}
|
|
120
|
-
.menu-item
|
|
121
|
-
.menu-item--danger
|
|
122
|
-
.menu-item--danger
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
.menu-item:disabled
|
|
128
|
-
.menu-item
|
|
124
|
+
.icen-menu-item:focus-visible { outline: 2px solid var(--icen-token-accent); outline-offset: -2px; box-shadow: none; }
|
|
125
|
+
.icen-menu-item--danger { color: var(--icen-token-error); }
|
|
126
|
+
.icen-menu-item--danger.is-highlighted,
|
|
127
|
+
.icen-menu-item--danger:focus-visible {
|
|
128
|
+
background: var(--icen-token-error-muted);
|
|
129
|
+
color: var(--icen-token-error);
|
|
130
|
+
}
|
|
131
|
+
.icen-menu-item--danger:hover:not(.is-disabled):not(:disabled) { background: var(--icen-token-error-muted); }
|
|
132
|
+
.icen-menu-item.is-disabled,
|
|
133
|
+
.icen-menu-item:disabled,
|
|
134
|
+
.icen-menu-item[aria-disabled='true'] {
|
|
129
135
|
opacity: var(--icen-disabled-opacity);
|
|
130
136
|
pointer-events: none;
|
|
131
137
|
}
|
|
132
138
|
|
|
133
|
-
.menu-item-icon {
|
|
139
|
+
.icen-menu-item-icon {
|
|
134
140
|
display: inline-flex;
|
|
135
141
|
align-items: center;
|
|
136
142
|
justify-content: center;
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
inline-size: 18px;
|
|
144
|
+
block-size: 18px;
|
|
139
145
|
flex-shrink: 0;
|
|
146
|
+
color: var(--icen-token-text-muted);
|
|
147
|
+
}
|
|
148
|
+
.icen-menu-item-icon > svg { inline-size: var(--icen-control-icon); block-size: var(--icen-control-icon); }
|
|
149
|
+
.icen-menu:has(.icen-menu-item-icon) .icen-menu-item:not(:has(> .icen-menu-item-icon))::before {
|
|
150
|
+
content: '';
|
|
151
|
+
inline-size: 18px;
|
|
152
|
+
flex: none;
|
|
140
153
|
}
|
|
141
|
-
.menu-item-
|
|
142
|
-
.menu-item-label {
|
|
154
|
+
.icen-menu-item-label {
|
|
143
155
|
flex: 1;
|
|
144
156
|
min-width: 0;
|
|
145
157
|
overflow: hidden;
|
|
146
158
|
text-overflow: ellipsis;
|
|
147
159
|
white-space: nowrap;
|
|
148
160
|
}
|
|
149
|
-
.menu-item-sub {
|
|
161
|
+
.icen-menu-item-sub {
|
|
150
162
|
display: block;
|
|
151
|
-
font-size: var(--density-font-size-xs);
|
|
163
|
+
font-size: var(--icen-density-font-size-xs);
|
|
152
164
|
line-height: 1.3;
|
|
153
|
-
color: var(--token-text-
|
|
154
|
-
margin-top:
|
|
155
|
-
}
|
|
156
|
-
.menu-item-shortcut {
|
|
157
|
-
font-size: var(--density-font-size-xs);
|
|
158
|
-
color: var(--token-text-faint);
|
|
159
|
-
font-family: var(--font-mono);
|
|
160
|
-
|
|
165
|
+
color: var(--icen-token-text-muted);
|
|
166
|
+
margin-top: 1px;
|
|
167
|
+
}
|
|
168
|
+
.icen-menu-item-shortcut {
|
|
169
|
+
font-size: var(--icen-density-font-size-xs);
|
|
170
|
+
color: var(--icen-token-text-faint);
|
|
171
|
+
font-family: var(--icen-font-mono);
|
|
172
|
+
letter-spacing: .04em;
|
|
173
|
+
margin-inline-start: var(--icen-density-space-sm);
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
flex: none;
|
|
161
176
|
}
|
|
162
|
-
.menu-item-chevron {
|
|
177
|
+
.icen-menu-item-chevron {
|
|
163
178
|
width: 12px;
|
|
164
179
|
height: 12px;
|
|
165
180
|
flex-shrink: 0;
|
|
166
|
-
color: var(--token-text-faint);
|
|
181
|
+
color: var(--icen-token-text-faint);
|
|
167
182
|
}
|
|
168
183
|
|
|
169
|
-
/*
|
|
170
|
-
.menu-item-check {
|
|
171
|
-
position: absolute;
|
|
172
|
-
left: var(--density-space-sm);
|
|
173
|
-
top: 50%;
|
|
174
|
-
transform: translateY(-50%);
|
|
175
|
-
color: var(--token-accent);
|
|
176
|
-
font-size: var(--density-font-size-md);
|
|
177
|
-
line-height: 1;
|
|
178
|
-
}
|
|
179
|
-
.menu-item--checked { padding-left: 28px; }
|
|
184
|
+
/* Check slots are removed visually; checked items use the shared selected surface. */
|
|
185
|
+
.icen-menu-item-check { display: none; }
|
|
180
186
|
|
|
181
|
-
.menu-separator {
|
|
182
|
-
margin: var(--density-space-xs) calc(var(--density-space-sm) + 2px);
|
|
187
|
+
.icen-menu-separator {
|
|
188
|
+
margin: var(--icen-density-space-xs) calc(var(--icen-density-space-sm) + 2px);
|
|
183
189
|
height: 1px;
|
|
184
|
-
background: var(--token-
|
|
190
|
+
background: var(--icen-token-separator-soft);
|
|
185
191
|
}
|
|
186
192
|
|
|
187
|
-
/* ── 进场:fade + scale(.
|
|
193
|
+
/* ── 进场:fade + scale(.98→1),按侧别反向位移 2px(浮层统一收敛配方) ── */
|
|
188
194
|
@keyframes icen-menu-in {
|
|
189
|
-
from { opacity: 0; transform: scale(0.
|
|
195
|
+
from { opacity: 0; transform: scale(0.98) translateY(-2px); }
|
|
190
196
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
191
197
|
}
|
|
192
198
|
@keyframes icen-menu-in-top {
|
|
193
|
-
from { opacity: 0; transform: scale(0.
|
|
199
|
+
from { opacity: 0; transform: scale(0.98) translateY(2px); }
|
|
194
200
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
195
201
|
}
|
|
196
202
|
@keyframes icen-menu-in-left {
|
|
197
|
-
from { opacity: 0; transform: scale(0.
|
|
203
|
+
from { opacity: 0; transform: scale(0.98) translateX(2px); }
|
|
198
204
|
to { opacity: 1; transform: scale(1) translateX(0); }
|
|
199
205
|
}
|
|
200
206
|
@keyframes icen-menu-in-right {
|
|
201
|
-
from { opacity: 0; transform: scale(0.
|
|
207
|
+
from { opacity: 0; transform: scale(0.98) translateX(-2px); }
|
|
202
208
|
to { opacity: 1; transform: scale(1) translateX(0); }
|
|
203
209
|
}
|
|
204
210
|
|
|
205
211
|
@media (prefers-reduced-motion: reduce) {
|
|
206
|
-
.menu, .menu--context { animation: none; }
|
|
212
|
+
.icen-menu, .icen-menu--context { animation: none; }
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
/* 触屏:hover 永久开启(替代 hover 设备的悬停反馈) */
|
|
210
216
|
@media (hover: none) {
|
|
211
|
-
.menu-item:hover:not(.is-disabled) { background: transparent; }
|
|
217
|
+
.icen-menu-item:hover:not(.is-disabled) { background: transparent; }
|
|
218
|
+
}
|
|
219
|
+
@media (pointer: coarse) {
|
|
220
|
+
.icen-menu-item { min-block-size: 44px; }
|
|
221
|
+
}
|
|
222
|
+
[dir='rtl'] .icen-menu-item-chevron { transform: scaleX(-1); }
|
|
223
|
+
|
|
212
224
|
}
|