@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/base.css
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
@layer icen.base {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Base(元素基线 + 交互基元 + 统一抽象层 + 滚动条)
|
|
3
4
|
*
|
|
4
|
-
* 全部消费 --token-*;任何 preset / 明暗 / style profile 下自洽。
|
|
5
|
+
* 全部消费 --icen-token-*;任何 preset / 明暗 / style profile 下自洽。
|
|
5
6
|
* 在 tokens 之后、components 之前引入。
|
|
6
7
|
*
|
|
7
8
|
* ════════════════════════════════════════════════════════════════════════
|
|
@@ -19,18 +20,18 @@
|
|
|
19
20
|
* --icen-tx-fast / -normal / -slow ← 统一过渡时长+缓动
|
|
20
21
|
*
|
|
21
22
|
* 组件直接写:
|
|
22
|
-
* .btn:focus-visible { box-shadow: var(--icen-ring); }
|
|
23
|
-
* .btn:disabled { opacity: var(--icen-disabled-opacity); }
|
|
23
|
+
* .icen-btn:focus-visible { box-shadow: var(--icen-ring); }
|
|
24
|
+
* .icen-btn:disabled { opacity: var(--icen-disabled-opacity); }
|
|
24
25
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* 原语覆盖反馈配方:
|
|
27
|
+
* [data-icen-style="chinese"] { --icen-press: scale(.995); --icen-hover-border: var(--icen-token-line); }
|
|
27
28
|
*
|
|
28
29
|
* ── 层 2:6 个交互基元 class(HTML 显式组合 API)
|
|
29
|
-
* .pressable / .control / .field / .lift / .surface-elevated / .focus-ring
|
|
30
|
+
* .icen-pressable / .icen-control / .icen-field / .icen-lift / .icen-surface-elevated / .icen-focus-ring
|
|
30
31
|
*
|
|
31
32
|
* 用法(任选其一):
|
|
32
|
-
* <button class="btn pressable focus-ring"> ← 类组合,体积最小
|
|
33
|
-
* <button class="btn"> ← 自洽,CSS 引用同一原语 token
|
|
33
|
+
* <button class="icen-btn icen-pressable icen-focus-ring"> ← 类组合,体积最小
|
|
34
|
+
* <button class="icen-btn"> ← 自洽,CSS 引用同一原语 token
|
|
34
35
|
*
|
|
35
36
|
* ── 命名约定(所有组件统一)
|
|
36
37
|
* 根类: .component
|
|
@@ -38,64 +39,66 @@
|
|
|
38
39
|
* 尺寸: .component--sm / --lg / --xl
|
|
39
40
|
* 状态: .is-loading / .is-error / .is-disabled / .is-open / .is-selected /
|
|
40
41
|
* .is-focused / .is-active / .is-empty / .is-filled
|
|
41
|
-
* aria 等价: [aria-busy=true]↔.is-loading、[data-invalid=true]↔.is-error、
|
|
42
|
-
* [aria-disabled=true]/[data-disabled]↔.is-disabled、
|
|
42
|
+
* aria 等价: [aria-busy=true]↔.is-loading、[data-icen-invalid=true]↔.is-error、
|
|
43
|
+
* [aria-disabled=true]/[data-icen-disabled]↔.is-disabled、
|
|
43
44
|
* [aria-expanded=true]↔.is-open、[aria-selected=true]/[aria-current=page]↔.is-active
|
|
44
45
|
*
|
|
45
46
|
* ── Token 纪律
|
|
46
|
-
* 颜色: 仅 --token-success / -warning / -error / -info / -accent(语义)
|
|
47
|
-
* 间距: --density-space-*
|
|
48
|
-
* 字号: --density-font-size-*
|
|
49
|
-
* 控件高度: --density-input-height-*
|
|
50
|
-
* 圆角: --radius-*
|
|
51
|
-
* 阴影: --token-shadow-*
|
|
52
|
-
* 时长/缓动: --duration-* / --ease-*(或直接用 --icen-tx-*)
|
|
53
|
-
* z-index: --z-*
|
|
47
|
+
* 颜色: 仅 --icen-token-success / -warning / -error / -info / -accent(语义)
|
|
48
|
+
* 间距: --icen-density-space-*
|
|
49
|
+
* 字号: --icen-density-font-size-*
|
|
50
|
+
* 控件高度: --icen-density-input-height-*
|
|
51
|
+
* 圆角: --icen-radius-*
|
|
52
|
+
* 阴影: --icen-token-shadow-*
|
|
53
|
+
* 时长/缓动: --icen-duration-* / --icen-ease-*(或直接用 --icen-tx-*)
|
|
54
|
+
* z-index: --icen-z-*
|
|
54
55
|
*
|
|
55
56
|
* 暴露的契约:
|
|
56
57
|
* - 元素基线:box-sizing / body / a / code / pre / img / ::selection
|
|
57
|
-
* - 滚动条:贴 --token-scrollbar
|
|
58
|
-
* - 工具类:.mono / .serif / .dim / .faint / .numeric / .sr-only / .skip-link
|
|
59
|
-
* - z-index 标尺:--z-* (浮层一律 portal 到 body)
|
|
58
|
+
* - 滚动条:贴 --icen-token-scrollbar-*
|
|
59
|
+
* - 工具类:.icen-mono / .icen-serif / .icen-dim / .icen-faint / .icen-numeric / .icen-sr-only / .icen-skip-link
|
|
60
|
+
* - z-index 标尺:--icen-z-* (浮层一律 portal 到 body)
|
|
60
61
|
* - 共享 keyframes:icen-pop-in(弹层进场)/ icen-spin(旋转)/ icen-skeleton-pulse(骨架脉冲)
|
|
61
|
-
* - 交互基元 class:.pressable / .control / .field / .lift / .surface-elevated / .focus-ring / .motion
|
|
62
|
-
* - 状态约定:[aria-disabled] / [aria-busy] / [data-loading] / [data-disabled] / [data-invalid]
|
|
62
|
+
* - 交互基元 class:.icen-pressable / .icen-control / .icen-field / .icen-lift / .icen-surface-elevated / .icen-focus-ring / .icen-motion
|
|
63
|
+
* - 状态约定:[aria-disabled] / [aria-busy] / [data-icen-loading] / [data-icen-disabled] / [data-icen-invalid]
|
|
64
|
+
* - 触屏底线:@media (pointer: coarse) 下交互基元与控件目标尺寸 ≥40px
|
|
65
|
+
* (min-block/inline-size: max(var(--icen-density-input-height-md), 40px);WCAG 2.5.5 的工程折中)
|
|
66
|
+
* - 悬停守卫:.icen-lift 的 hover 抬升包在 @media (hover: hover) and (pointer: fine)(触屏关闭)
|
|
63
67
|
*/
|
|
64
68
|
|
|
65
69
|
/* ══════════════════════════════════════════════════════════════
|
|
66
70
|
icen 统一抽象层(--icen-* 原语 token)
|
|
67
71
|
───────────────────────────────────────────────────────────────
|
|
68
72
|
所有组件消费的"原语级"变量:聚焦环、悬停、按下、禁用、过渡。
|
|
69
|
-
|
|
70
|
-
即可让 56 个组件整体换肤;组件自身无需感知风格切换。
|
|
73
|
+
原语只需覆盖这里的少数变量即可让组件整体换肤;组件自身无需感知风格切换。
|
|
71
74
|
══════════════════════════════════════════════════════════════ */
|
|
72
75
|
:root {
|
|
73
76
|
/* ── 聚焦环(focus-visible) ── */
|
|
74
|
-
--icen-ring: 0 0 0 2px var(--token-bg), 0 0 0 4px color-mix(in srgb, var(--token-accent) 50%, transparent);
|
|
75
|
-
--icen-ring-soft: 0 0 0 3px color-mix(in srgb, var(--token-accent) 16%, transparent);
|
|
76
|
-
--icen-ring-error: 0 0 0 2px var(--token-bg), 0 0 0 4px color-mix(in srgb, var(--token-error) 50%, transparent);
|
|
77
|
-
--icen-ring-success: 0 0 0 2px var(--token-bg), 0 0 0 4px color-mix(in srgb, var(--token-success) 50%, transparent);
|
|
78
|
-
--icen-ring-warning: 0 0 0 2px var(--token-bg), 0 0 0 4px color-mix(in srgb, var(--token-warning) 50%, transparent);
|
|
77
|
+
--icen-ring: 0 0 0 2px var(--icen-token-bg), 0 0 0 4px color-mix(in srgb, var(--icen-token-accent) 50%, transparent);
|
|
78
|
+
--icen-ring-soft: 0 0 0 3px color-mix(in srgb, var(--icen-token-accent) 16%, transparent);
|
|
79
|
+
--icen-ring-error: 0 0 0 2px var(--icen-token-bg), 0 0 0 4px color-mix(in srgb, var(--icen-token-error) 50%, transparent);
|
|
80
|
+
--icen-ring-success: 0 0 0 2px var(--icen-token-bg), 0 0 0 4px color-mix(in srgb, var(--icen-token-success) 50%, transparent);
|
|
81
|
+
--icen-ring-warning: 0 0 0 2px var(--icen-token-bg), 0 0 0 4px color-mix(in srgb, var(--icen-token-warning) 50%, transparent);
|
|
79
82
|
/* inset 聚焦环:空间受限的网格/表头单元格用内阴影聚焦(2px 内描边 + 3px 内光晕) */
|
|
80
|
-
--icen-ring-inset: inset 0 0 0 2px color-mix(in srgb, var(--token-accent) 50%, transparent), inset 0 0 0 5px color-mix(in srgb, var(--token-accent) 14%, transparent);
|
|
83
|
+
--icen-ring-inset: inset 0 0 0 2px color-mix(in srgb, var(--icen-token-accent) 50%, transparent), inset 0 0 0 5px color-mix(in srgb, var(--icen-token-accent) 14%, transparent);
|
|
81
84
|
|
|
82
85
|
/* ── 悬停 / 按下 / 禁用 ── */
|
|
83
|
-
--icen-hover-border: color-mix(in srgb, var(--token-accent) 30%, var(--token-line));
|
|
84
|
-
--icen-hover-border-strong: color-mix(in srgb, var(--token-accent) 55%, var(--token-line));
|
|
86
|
+
--icen-hover-border: color-mix(in srgb, var(--icen-token-accent) 30%, var(--icen-token-line));
|
|
87
|
+
--icen-hover-border-strong: color-mix(in srgb, var(--icen-token-accent) 55%, var(--icen-token-line));
|
|
85
88
|
--icen-press: translateY(1px) scale(0.985);
|
|
86
89
|
--icen-press-soft: translateY(1px);
|
|
87
90
|
--icen-disabled-opacity: 0.5;
|
|
88
91
|
|
|
89
92
|
/* ── 表单控件聚焦(wrapper 视角) ── */
|
|
90
|
-
--icen-control-focus-shadow: var(--token-shadow-inset), 0 0 0 3px color-mix(in srgb, var(--token-accent) 14%, transparent);
|
|
91
|
-
--icen-control-focus-border: color-mix(in srgb, var(--token-accent) 55%, var(--token-line));
|
|
92
|
-
--icen-control-error-shadow: var(--token-shadow-inset), 0 0 0 3px color-mix(in srgb, var(--token-error) 16%, transparent);
|
|
93
|
+
--icen-control-focus-shadow: var(--icen-token-shadow-inset), 0 0 0 3px color-mix(in srgb, var(--icen-token-accent) 14%, transparent);
|
|
94
|
+
--icen-control-focus-border: color-mix(in srgb, var(--icen-token-accent) 55%, var(--icen-token-line));
|
|
95
|
+
--icen-control-error-shadow: var(--icen-token-shadow-inset), 0 0 0 3px color-mix(in srgb, var(--icen-token-error) 16%, transparent);
|
|
93
96
|
|
|
94
97
|
/* ── 统一过渡(时长 + 缓动打包) ── */
|
|
95
|
-
--icen-tx-fast: var(--duration-fast) var(--ease-out);
|
|
96
|
-
--icen-tx-normal: var(--duration-normal) var(--ease-out);
|
|
97
|
-
--icen-tx-slow: var(--duration-slow) var(--ease-out);
|
|
98
|
-
--icen-tx-bounce: var(--duration-normal) var(--ease-bounce);
|
|
98
|
+
--icen-tx-fast: var(--icen-duration-fast) var(--icen-ease-out);
|
|
99
|
+
--icen-tx-normal: var(--icen-duration-normal) var(--icen-ease-out);
|
|
100
|
+
--icen-tx-slow: var(--icen-duration-slow) var(--icen-ease-out);
|
|
101
|
+
--icen-tx-bounce: var(--icen-duration-normal) var(--icen-ease-bounce);
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
/* ══════════════════════════════════════════════════════════════
|
|
@@ -113,11 +116,11 @@ html {
|
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
body {
|
|
116
|
-
background: var(--token-bg);
|
|
117
|
-
color: var(--token-text);
|
|
118
|
-
font-family: "Numeric Math", var(--font-body);
|
|
119
|
+
background: var(--icen-token-bg);
|
|
120
|
+
color: var(--icen-token-text);
|
|
121
|
+
font-family: "Numeric Math", var(--icen-font-body);
|
|
119
122
|
font-size: 14px;
|
|
120
|
-
line-height: var(--line-height-body, 1.6);
|
|
123
|
+
line-height: var(--icen-line-height-body, 1.6);
|
|
121
124
|
min-height: 100vh;
|
|
122
125
|
-webkit-font-smoothing: antialiased;
|
|
123
126
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -127,21 +130,21 @@ body {
|
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
a {
|
|
130
|
-
color: var(--token-accent);
|
|
133
|
+
color: var(--icen-token-accent-text);
|
|
131
134
|
text-decoration: none;
|
|
132
|
-
transition: color var(--duration-fast) var(--ease-out);
|
|
135
|
+
transition: color var(--icen-duration-fast) var(--icen-ease-out);
|
|
133
136
|
}
|
|
134
137
|
a:hover { text-decoration: underline; text-underline-offset: 3px; }
|
|
135
138
|
a:focus-visible {
|
|
136
|
-
outline: 2px solid var(--token-accent);
|
|
139
|
+
outline: 2px solid var(--icen-token-accent);
|
|
137
140
|
outline-offset: 2px;
|
|
138
|
-
border-radius: var(--radius-xs);
|
|
141
|
+
border-radius: var(--icen-radius-xs);
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
code, pre {
|
|
142
|
-
font-family: var(--font-mono);
|
|
143
|
-
background: var(--token-bg-soft);
|
|
144
|
-
border-radius: var(--radius-xs);
|
|
145
|
+
font-family: var(--icen-font-mono);
|
|
146
|
+
background: var(--icen-token-bg-soft);
|
|
147
|
+
border-radius: var(--icen-radius-xs);
|
|
145
148
|
}
|
|
146
149
|
code { padding: 1px 5px; }
|
|
147
150
|
pre { padding: 12px 14px; overflow-x: auto; }
|
|
@@ -155,65 +158,94 @@ input, button, textarea, select { font: inherit; color: inherit; }
|
|
|
155
158
|
/* 标题用 heading 栈(typography.css 已声明,这里只兜底防缺字体场景) */
|
|
156
159
|
h1, h2, h3, h4, h5, h6 {
|
|
157
160
|
margin: 0;
|
|
158
|
-
line-height: var(--line-height-heading, 1.2);
|
|
161
|
+
line-height: var(--icen-line-height-heading, 1.2);
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
/* 段落兜底(消费项目可以覆盖) */
|
|
162
165
|
p { margin: 0 0 1em; }
|
|
163
166
|
|
|
164
|
-
/*
|
|
167
|
+
/* 选区随当前主题强调色变化;深色提高覆盖度。 */
|
|
165
168
|
::selection {
|
|
166
|
-
background: color-mix(in srgb, var(--token-accent) 25%, transparent);
|
|
169
|
+
background: color-mix(in srgb, var(--icen-token-accent) 25%, transparent);
|
|
167
170
|
color: inherit;
|
|
168
171
|
}
|
|
169
|
-
|
|
170
|
-
background: color-mix(in srgb, var(--token-accent) 35%, transparent);
|
|
172
|
+
[data-icen-theme="dark"] ::selection {
|
|
173
|
+
background: color-mix(in srgb, var(--icen-token-accent) 35%, transparent);
|
|
171
174
|
}
|
|
172
175
|
|
|
173
|
-
/*
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
/* Native scrollbar paint; policy slots live in tokens/scrollbars.css. */
|
|
177
|
+
* {
|
|
178
|
+
scrollbar-width: var(--icen-scrollbar-width, thin);
|
|
179
|
+
scrollbar-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb) var(--icen-scrollbar-idle, 100%), transparent) var(--icen-token-scrollbar-track);
|
|
180
|
+
scrollbar-gutter: var(--icen-token-scrollbar-gutter);
|
|
181
|
+
}
|
|
182
|
+
:where(*:not(html):hover) {
|
|
183
|
+
scrollbar-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb-hover) var(--icen-scrollbar-hover, 100%), transparent) var(--icen-token-scrollbar-track);
|
|
184
|
+
}
|
|
185
|
+
:where(*:focus-within, [data-icen-scroll-active]) {
|
|
186
|
+
scrollbar-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb) var(--icen-scrollbar-active, 100%), transparent) var(--icen-token-scrollbar-track);
|
|
187
|
+
}
|
|
188
|
+
/* Keep native arrows disabled when standard properties would override the skin. */
|
|
189
|
+
@supports selector(::-webkit-scrollbar) {
|
|
190
|
+
*, :where(*:hover, *:focus-within, [data-icen-scroll-active]) {
|
|
191
|
+
scrollbar-width: var(--icen-scrollbar-webkit-width, auto);
|
|
192
|
+
scrollbar-color: auto;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
::-webkit-scrollbar {
|
|
196
|
+
width: var(--icen-token-scrollbar-size);
|
|
197
|
+
height: var(--icen-token-scrollbar-size);
|
|
198
|
+
display: var(--icen-scrollbar-display, block);
|
|
199
|
+
}
|
|
200
|
+
::-webkit-scrollbar-track { background: var(--icen-token-scrollbar-track); }
|
|
182
201
|
::-webkit-scrollbar-thumb {
|
|
183
|
-
background: var(--token-scrollbar-thumb);
|
|
184
|
-
border-radius:
|
|
185
|
-
border:
|
|
202
|
+
background-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb) var(--icen-scrollbar-idle, 100%), transparent);
|
|
203
|
+
border-radius: var(--icen-radius-full);
|
|
204
|
+
border: var(--icen-token-scrollbar-inset) solid transparent;
|
|
186
205
|
background-clip: padding-box;
|
|
206
|
+
transition: background-color var(--icen-token-scrollbar-fade-duration) var(--icen-ease-out);
|
|
187
207
|
}
|
|
188
|
-
::-webkit-scrollbar-thumb
|
|
189
|
-
background: var(--token-scrollbar-thumb-hover);
|
|
190
|
-
|
|
208
|
+
:where(*:not(html):hover)::-webkit-scrollbar-thumb {
|
|
209
|
+
background-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb-hover) var(--icen-scrollbar-hover, 100%), transparent);
|
|
210
|
+
}
|
|
211
|
+
:is(*:focus-within, [data-icen-scroll-active])::-webkit-scrollbar-thumb {
|
|
212
|
+
background-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb) var(--icen-scrollbar-active, 100%), transparent);
|
|
213
|
+
}
|
|
214
|
+
::-webkit-scrollbar-thumb:active {
|
|
215
|
+
background-color: color-mix(in srgb, var(--icen-token-scrollbar-thumb) var(--icen-scrollbar-active, 100%), transparent);
|
|
191
216
|
}
|
|
192
217
|
::-webkit-scrollbar-button,
|
|
193
218
|
::-webkit-scrollbar-button:single-button { display: none; width: 0; height: 0; }
|
|
194
219
|
::-webkit-scrollbar-corner { background: transparent; }
|
|
195
|
-
|
|
196
|
-
scrollbar-
|
|
197
|
-
|
|
220
|
+
@media (prefers-reduced-motion: reduce) {
|
|
221
|
+
::-webkit-scrollbar-thumb { transition: none; }
|
|
222
|
+
}
|
|
223
|
+
@media (forced-colors: active) {
|
|
224
|
+
*, :where(*:hover, *:focus-within, [data-icen-scroll-active]) {
|
|
225
|
+
scrollbar-width: auto;
|
|
226
|
+
scrollbar-color: auto;
|
|
227
|
+
}
|
|
228
|
+
::-webkit-scrollbar { display: block; }
|
|
229
|
+
::-webkit-scrollbar-thumb { background-color: CanvasText; }
|
|
198
230
|
}
|
|
199
231
|
|
|
200
232
|
/* ══════════════════════════════════════════════════════════════
|
|
201
233
|
通用工具类
|
|
202
234
|
══════════════════════════════════════════════════════════════ */
|
|
203
235
|
|
|
204
|
-
.mono { font-family: var(--font-mono); }
|
|
205
|
-
.dim { color: var(--token-text-muted); }
|
|
206
|
-
.faint { color: var(--token-text-faint); }
|
|
207
|
-
.serif { font-family: var(--font-heading); }
|
|
236
|
+
.icen-mono { font-family: var(--icen-font-mono); }
|
|
237
|
+
.icen-dim { color: var(--icen-token-text-muted); }
|
|
238
|
+
.icen-faint { color: var(--icen-token-text-faint); }
|
|
239
|
+
.icen-serif { font-family: var(--icen-font-heading); }
|
|
208
240
|
|
|
209
241
|
/* 数字密集区:tabular-nums + 数学字体 */
|
|
210
|
-
.numeric {
|
|
211
|
-
font-family: "Numeric Math", var(--font-mono);
|
|
242
|
+
.icen-numeric {
|
|
243
|
+
font-family: "Numeric Math", var(--icen-font-mono);
|
|
212
244
|
font-variant-numeric: lining-nums tabular-nums;
|
|
213
245
|
}
|
|
214
246
|
|
|
215
247
|
/* 无障碍:屏幕阅读器可见、视觉隐藏 */
|
|
216
|
-
.sr-only {
|
|
248
|
+
.icen-sr-only {
|
|
217
249
|
position: absolute;
|
|
218
250
|
width: 1px; height: 1px;
|
|
219
251
|
padding: 0; margin: -1px;
|
|
@@ -225,23 +257,23 @@ html {
|
|
|
225
257
|
}
|
|
226
258
|
|
|
227
259
|
/* 跳转链接:默认视觉隐藏,聚焦时显形(无障碍要求) */
|
|
228
|
-
.skip-link {
|
|
260
|
+
.icen-skip-link {
|
|
229
261
|
position: fixed;
|
|
230
|
-
top: var(--density-space-sm, 8px);
|
|
231
|
-
left: var(--density-space-sm, 8px);
|
|
232
|
-
z-index: var(--z-tooltip);
|
|
262
|
+
top: var(--icen-density-space-sm, 8px);
|
|
263
|
+
left: var(--icen-density-space-sm, 8px);
|
|
264
|
+
z-index: var(--icen-z-tooltip);
|
|
233
265
|
padding: 8px 14px;
|
|
234
|
-
background: var(--token-surface);
|
|
235
|
-
color: var(--token-text);
|
|
236
|
-
border: 1px solid var(--token-line);
|
|
237
|
-
border-radius: var(--radius-sm);
|
|
238
|
-
box-shadow: var(--token-shadow-elevated);
|
|
266
|
+
background: var(--icen-token-surface);
|
|
267
|
+
color: var(--icen-token-text);
|
|
268
|
+
border: 1px solid var(--icen-token-line);
|
|
269
|
+
border-radius: var(--icen-radius-sm);
|
|
270
|
+
box-shadow: var(--icen-token-shadow-elevated);
|
|
239
271
|
transform: translateY(-150%);
|
|
240
|
-
transition: transform var(--duration-normal) var(--ease-out);
|
|
272
|
+
transition: transform var(--icen-duration-normal) var(--icen-ease-out);
|
|
241
273
|
}
|
|
242
|
-
.skip-link:focus {
|
|
274
|
+
.icen-skip-link:focus {
|
|
243
275
|
transform: translateY(0);
|
|
244
|
-
outline: 2px solid var(--token-accent);
|
|
276
|
+
outline: 2px solid var(--icen-token-accent);
|
|
245
277
|
outline-offset: 2px;
|
|
246
278
|
}
|
|
247
279
|
|
|
@@ -257,19 +289,19 @@ html {
|
|
|
257
289
|
dialog → 模态对话框 + backdrop
|
|
258
290
|
popover → 弹出层/下拉菜单(高于 dialog 因为常常 portal 出去)
|
|
259
291
|
tooltip → 工具提示
|
|
260
|
-
fx →
|
|
292
|
+
fx → 效果层(永远在最上)
|
|
261
293
|
══════════════════════════════════════════════════════════════ */
|
|
262
294
|
:root {
|
|
263
|
-
--z-base: 0;
|
|
264
|
-
--z-raised: 10;
|
|
265
|
-
--z-sticky: 50;
|
|
266
|
-
--z-chrome: 200;
|
|
267
|
-
--z-toast:
|
|
268
|
-
--z-banner: 450;
|
|
269
|
-
--z-dialog: 500;
|
|
270
|
-
--z-popover: 620;
|
|
271
|
-
--z-tooltip: 700;
|
|
272
|
-
--z-fx: 1000;
|
|
295
|
+
--icen-z-base: 0;
|
|
296
|
+
--icen-z-raised: 10;
|
|
297
|
+
--icen-z-sticky: 50;
|
|
298
|
+
--icen-z-chrome: 200;
|
|
299
|
+
--icen-z-toast: 560; /* 反馈层必须压过 dialog(500):模态里触发的 toast 不能被遮罩压住;仍低于 popover/tooltip(瞬态浮层) */
|
|
300
|
+
--icen-z-banner: 450;
|
|
301
|
+
--icen-z-dialog: 500;
|
|
302
|
+
--icen-z-popover: 620;
|
|
303
|
+
--icen-z-tooltip: 700;
|
|
304
|
+
--icen-z-fx: 1000;
|
|
273
305
|
}
|
|
274
306
|
|
|
275
307
|
/* ══════════════════════════════════════════════════════════════
|
|
@@ -277,16 +309,20 @@ html {
|
|
|
277
309
|
icen-pop-in → 弹层进场(scale .96 + translateY -4px)
|
|
278
310
|
icen-spin → 旋转(spinner / 加载态)
|
|
279
311
|
icen-skeleton-pulse → 骨架脉冲
|
|
280
|
-
注:menu.css / popover.css 保留自己的 scale(.
|
|
281
|
-
(方向语义不同:按 data-side 反向位移),不并入 icen-pop-in。
|
|
312
|
+
注:menu.css / popover.css 保留自己的 scale(.985)±3px 四方向版
|
|
313
|
+
(方向语义不同:按 data-icen-side 反向位移),不并入 icen-pop-in。
|
|
282
314
|
══════════════════════════════════════════════════════════════ */
|
|
283
315
|
@keyframes icen-pop-in {
|
|
284
|
-
from { opacity: 0;
|
|
285
|
-
to { opacity: 1;
|
|
316
|
+
from { opacity: 0; }
|
|
317
|
+
to { opacity: 1; }
|
|
286
318
|
}
|
|
287
319
|
@keyframes icen-spin {
|
|
288
320
|
to { transform: rotate(360deg); }
|
|
289
321
|
}
|
|
322
|
+
@keyframes icen-blink {
|
|
323
|
+
0%, 100% { opacity: 1; }
|
|
324
|
+
50% { opacity: 0; }
|
|
325
|
+
}
|
|
290
326
|
@keyframes icen-skeleton-pulse {
|
|
291
327
|
0%, 100% { opacity: 1; }
|
|
292
328
|
50% { opacity: 0.5; }
|
|
@@ -295,14 +331,13 @@ html {
|
|
|
295
331
|
/* ══════════════════════════════════════════════════════════════
|
|
296
332
|
交互基元(全组件地基)
|
|
297
333
|
规格:源 self-contained,命名空间不含 opengal 的 og-/vn- 前缀。
|
|
298
|
-
|
|
299
|
-
这些类名施加像素化覆盖;改名前请同步修 style-profiles.css。
|
|
334
|
+
原语通过 --icen-* 反馈变量覆盖这些基元,类名契约保持稳定。
|
|
300
335
|
══════════════════════════════════════════════════════════════ */
|
|
301
336
|
|
|
302
|
-
/* ── .pressable — 可按压(按钮、卡片按钮、tag close 等)
|
|
337
|
+
/* ── .icen-pressable — 可按压(按钮、卡片按钮、tag close 等)
|
|
303
338
|
hover:顶部高光 ::after 渐入;focus-visible:同样高光 + 描边
|
|
304
339
|
active:下陷 + 微缩;aria-busy:减淡;disabled / aria-disabled:50% + 禁手势 */
|
|
305
|
-
.pressable {
|
|
340
|
+
.icen-pressable {
|
|
306
341
|
position: relative;
|
|
307
342
|
overflow: hidden;
|
|
308
343
|
will-change: transform;
|
|
@@ -314,7 +349,7 @@ html {
|
|
|
314
349
|
opacity var(--icen-tx-normal),
|
|
315
350
|
transform var(--icen-tx-normal);
|
|
316
351
|
}
|
|
317
|
-
.pressable::after {
|
|
352
|
+
.icen-pressable::after {
|
|
318
353
|
content: '';
|
|
319
354
|
position: absolute;
|
|
320
355
|
inset: 0;
|
|
@@ -322,129 +357,136 @@ html {
|
|
|
322
357
|
opacity: 0;
|
|
323
358
|
pointer-events: none;
|
|
324
359
|
background: linear-gradient(180deg,
|
|
325
|
-
color-mix(in srgb, var(--token-surface) 24%, transparent),
|
|
360
|
+
color-mix(in srgb, var(--icen-token-surface) 24%, transparent),
|
|
326
361
|
transparent 46%);
|
|
327
362
|
transition: opacity var(--icen-tx-normal);
|
|
328
363
|
}
|
|
329
|
-
.pressable:hover::after,
|
|
330
|
-
.pressable:focus-visible::after { opacity: 1; }
|
|
331
|
-
.pressable:focus-visible {
|
|
364
|
+
.icen-pressable:hover::after,
|
|
365
|
+
.icen-pressable:focus-visible::after { opacity: 1; }
|
|
366
|
+
.icen-pressable:focus-visible {
|
|
332
367
|
outline: none;
|
|
333
368
|
box-shadow: var(--icen-ring);
|
|
334
369
|
}
|
|
335
|
-
.pressable:active {
|
|
370
|
+
.icen-pressable:active {
|
|
336
371
|
transform: var(--icen-press);
|
|
337
372
|
}
|
|
338
|
-
.pressable[aria-busy='true'],
|
|
339
|
-
.pressable[data-loading] {
|
|
373
|
+
.icen-pressable[aria-busy='true'],
|
|
374
|
+
.icen-pressable[data-icen-loading] {
|
|
340
375
|
cursor: progress;
|
|
341
376
|
opacity: 0.7;
|
|
342
377
|
pointer-events: none;
|
|
343
378
|
}
|
|
344
|
-
.pressable:disabled,
|
|
345
|
-
.pressable[aria-disabled='true'],
|
|
346
|
-
.pressable[data-disabled] {
|
|
379
|
+
.icen-pressable:disabled,
|
|
380
|
+
.icen-pressable[aria-disabled='true'],
|
|
381
|
+
.icen-pressable[data-icen-disabled] {
|
|
347
382
|
transform: none;
|
|
348
383
|
opacity: var(--icen-disabled-opacity);
|
|
349
384
|
cursor: not-allowed;
|
|
350
385
|
pointer-events: none;
|
|
351
386
|
}
|
|
352
|
-
.pressable:disabled::after,
|
|
353
|
-
.pressable[aria-disabled='true']::after,
|
|
354
|
-
.pressable[data-disabled]::after { display: none; }
|
|
387
|
+
.icen-pressable:disabled::after,
|
|
388
|
+
.icen-pressable[aria-disabled='true']::after,
|
|
389
|
+
.icen-pressable[data-icen-disabled]::after { display: none; }
|
|
355
390
|
|
|
356
|
-
/* ── .control — 表单控件 wrapper 基元(包裹原生 input/textarea/select)
|
|
391
|
+
/* ── .icen-control — 表单控件 wrapper 基元(包裹原生 input/textarea/select)
|
|
357
392
|
hover:边框稍深;focus-within:内嵌阴影 + accent 3px 光晕
|
|
358
|
-
:invalid / [data-invalid]:error 色边框 + error 色光晕 */
|
|
359
|
-
.control {
|
|
393
|
+
:invalid / [data-icen-invalid]:error 色边框 + error 色光晕 */
|
|
394
|
+
.icen-control {
|
|
360
395
|
transition: background-color var(--icen-tx-normal),
|
|
361
396
|
border-color var(--icen-tx-normal),
|
|
362
397
|
box-shadow var(--icen-tx-normal);
|
|
363
398
|
}
|
|
364
|
-
.control:hover {
|
|
399
|
+
.icen-control:hover {
|
|
365
400
|
border-color: var(--icen-hover-border);
|
|
366
401
|
}
|
|
367
|
-
.control:focus-within {
|
|
402
|
+
.icen-control:focus-within {
|
|
368
403
|
box-shadow: var(--icen-control-focus-shadow);
|
|
369
404
|
border-color: var(--icen-control-focus-border);
|
|
370
405
|
}
|
|
371
|
-
.control:where(:has(:invalid), [data-invalid='true']) {
|
|
372
|
-
border-color: var(--token-error);
|
|
406
|
+
.icen-control:where(:has(:invalid), [data-icen-invalid='true']) {
|
|
407
|
+
border-color: var(--icen-token-error);
|
|
373
408
|
}
|
|
374
|
-
.control:where(:has(:invalid), [data-invalid='true']):focus-within {
|
|
409
|
+
.icen-control:where(:has(:invalid), [data-icen-invalid='true']):focus-within {
|
|
375
410
|
box-shadow: var(--icen-control-error-shadow);
|
|
376
|
-
border-color: var(--token-error);
|
|
411
|
+
border-color: var(--icen-token-error);
|
|
377
412
|
}
|
|
378
413
|
/* 内部裸 input/textarea/select 不再有自己的边框/阴影,交给 wrapper 表达 */
|
|
379
|
-
.control > input:not([type='checkbox']):not([type='radio']):not([type='file']),
|
|
380
|
-
.control > textarea,
|
|
381
|
-
.control > select {
|
|
414
|
+
.icen-control > input:not([type='checkbox']):not([type='radio']):not([type='file']),
|
|
415
|
+
.icen-control > textarea,
|
|
416
|
+
.icen-control > select {
|
|
382
417
|
background: transparent;
|
|
383
418
|
border: 0;
|
|
384
419
|
outline: none;
|
|
385
420
|
box-shadow: none;
|
|
386
421
|
}
|
|
387
422
|
|
|
388
|
-
/* ── .field — 带 label / hint / error
|
|
423
|
+
/* ── .icen-field — 带 label / hint / error 的表单字段容器
|
|
389
424
|
契约:
|
|
390
|
-
<label class="field">
|
|
391
|
-
<span class="field-label">姓名</span>
|
|
392
|
-
<span class="control"><input /></span>
|
|
393
|
-
<span class="field-hint">必填</span>
|
|
394
|
-
<span class="field-error">错误</span>
|
|
425
|
+
<label class="icen-field">
|
|
426
|
+
<span class="icen-field-label">姓名</span>
|
|
427
|
+
<span class="icen-control"><icen-input /></span>
|
|
428
|
+
<span class="icen-field-hint">必填</span>
|
|
429
|
+
<span class="icen-field-error">错误</span>
|
|
395
430
|
</label> */
|
|
396
|
-
.field {
|
|
431
|
+
.icen-field {
|
|
397
432
|
display: flex;
|
|
398
433
|
flex-direction: column;
|
|
399
|
-
gap: var(--density-space-xs);
|
|
434
|
+
gap: var(--icen-density-space-xs);
|
|
400
435
|
}
|
|
401
|
-
.field-label {
|
|
402
|
-
font-size: var(--density-font-size-sm);
|
|
403
|
-
color: var(--token-text-muted);
|
|
436
|
+
.icen-field-label {
|
|
437
|
+
font-size: var(--icen-density-font-size-sm);
|
|
438
|
+
color: var(--icen-token-text-muted);
|
|
404
439
|
letter-spacing: 0.02em;
|
|
405
440
|
}
|
|
406
|
-
.field-hint {
|
|
407
|
-
font-size: var(--density-font-size-xs);
|
|
408
|
-
color: var(--token-text-faint);
|
|
441
|
+
.icen-field-hint {
|
|
442
|
+
font-size: var(--icen-density-font-size-xs);
|
|
443
|
+
color: var(--icen-token-text-faint);
|
|
409
444
|
}
|
|
410
|
-
.field-error {
|
|
411
|
-
font-size: var(--density-font-size-xs);
|
|
412
|
-
color: var(--token-error);
|
|
445
|
+
.icen-field-error {
|
|
446
|
+
font-size: var(--icen-density-font-size-xs);
|
|
447
|
+
color: var(--icen-token-error);
|
|
413
448
|
}
|
|
414
|
-
.field[data-invalid='true'] .field-label { color: var(--token-error); }
|
|
449
|
+
.icen-field[data-icen-invalid='true'] .icen-field-label { color: var(--icen-token-error); }
|
|
415
450
|
|
|
416
|
-
/* ── .lift — 可交互卡片悬停浮起(pressable 的轻量版,无 ::after 高光)
|
|
417
|
-
hover
|
|
418
|
-
|
|
451
|
+
/* ── .icen-lift — 可交互卡片悬停浮起(pressable 的轻量版,无 ::after 高光)
|
|
452
|
+
hover:仅在可悬停设备生效(触屏关闭抬升,AGENTS 动效守卫);
|
|
453
|
+
focus-within:全设备生效(键盘/触屏焦点同样给浮起反馈) */
|
|
454
|
+
.icen-lift {
|
|
419
455
|
transition: border-color var(--icen-tx-slow),
|
|
420
456
|
box-shadow var(--icen-tx-slow),
|
|
421
457
|
transform var(--icen-tx-slow);
|
|
422
458
|
}
|
|
423
|
-
|
|
424
|
-
.lift:
|
|
459
|
+
@media (hover: hover) and (pointer: fine) {
|
|
460
|
+
.icen-lift:hover {
|
|
461
|
+
transform: translateY(-1px);
|
|
462
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 26%, var(--icen-token-outline-soft));
|
|
463
|
+
box-shadow: var(--icen-token-shadow-card);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
.icen-lift:focus-within {
|
|
425
467
|
transform: translateY(-1px);
|
|
426
|
-
border-color: color-mix(in srgb, var(--token-accent) 26%, var(--token-outline-soft));
|
|
427
|
-
box-shadow: var(--token-shadow-card);
|
|
468
|
+
border-color: color-mix(in srgb, var(--icen-token-accent) 26%, var(--icen-token-outline-soft));
|
|
469
|
+
box-shadow: var(--icen-token-shadow-card);
|
|
428
470
|
}
|
|
429
471
|
|
|
430
|
-
/* ── .surface-elevated — 提升的静态表面(非交互卡片)
|
|
472
|
+
/* ── .icen-surface-elevated — 提升的静态表面(非交互卡片)
|
|
431
473
|
用于不需要 hover 反馈但需要脱离背景的面板/对话框内嵌区域 */
|
|
432
|
-
.surface-elevated {
|
|
433
|
-
background: var(--token-surface);
|
|
434
|
-
border: 1px solid var(--token-line-soft);
|
|
435
|
-
border-radius: var(--radius-md);
|
|
436
|
-
box-shadow: var(--token-shadow-card);
|
|
474
|
+
.icen-surface-elevated {
|
|
475
|
+
background: var(--icen-token-surface);
|
|
476
|
+
border: 1px solid var(--icen-token-line-soft);
|
|
477
|
+
border-radius: var(--icen-radius-md);
|
|
478
|
+
box-shadow: var(--icen-token-shadow-card);
|
|
437
479
|
}
|
|
438
480
|
|
|
439
|
-
/* ── .focus-ring — 显式聚焦环工具类(ring-2 + offset-1 等价) */
|
|
440
|
-
.focus-ring:focus-visible {
|
|
481
|
+
/* ── .icen-focus-ring — 显式聚焦环工具类(ring-2 + offset-1 等价) */
|
|
482
|
+
.icen-focus-ring:focus-visible {
|
|
441
483
|
outline: none;
|
|
442
484
|
box-shadow: var(--icen-ring);
|
|
443
485
|
}
|
|
444
486
|
|
|
445
|
-
/* ── .motion — 显式动画工具类(仅在 prefers-reduced-motion: no-preference 时生效) */
|
|
487
|
+
/* ── .icen-motion — 显式动画工具类(仅在 prefers-reduced-motion: no-preference 时生效) */
|
|
446
488
|
@media (prefers-reduced-motion: no-preference) {
|
|
447
|
-
.motion { transition: all var(--icen-tx-normal); }
|
|
489
|
+
.icen-motion { transition: all var(--icen-tx-normal); }
|
|
448
490
|
}
|
|
449
491
|
|
|
450
492
|
/* ══════════════════════════════════════════════════════════════
|
|
@@ -454,43 +496,71 @@ html {
|
|
|
454
496
|
/* reduced-motion:所有动画/过渡压缩到 ~0ms(保留可访问性最小可视信号) */
|
|
455
497
|
@media (prefers-reduced-motion: reduce) {
|
|
456
498
|
*, *::before, *::after {
|
|
457
|
-
animation-duration: 0.01ms !important;
|
|
458
|
-
animation-iteration-count: 1 !important;
|
|
459
|
-
transition-duration: 0.01ms !important;
|
|
460
|
-
scroll-behavior: auto !important;
|
|
499
|
+
animation-duration: 0.01ms !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
|
|
500
|
+
animation-iteration-count: 1 !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
|
|
501
|
+
transition-duration: 0.01ms !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
|
|
502
|
+
scroll-behavior: auto !important; /* guard:allow-important 动效守卫:降级媒体查询需压制组件动画 */
|
|
461
503
|
}
|
|
462
504
|
}
|
|
463
505
|
|
|
464
|
-
/*
|
|
506
|
+
/* 触屏设备(无精细指针):压低 pressable 按下形变(hover 抬升已由 hover 守卫关闭) */
|
|
465
507
|
@media (pointer: coarse) {
|
|
466
|
-
.
|
|
467
|
-
.pressable:active { transform: translateY(0) scale(0.99); }
|
|
508
|
+
.icen-pressable:active { transform: translateY(0) scale(0.99); }
|
|
468
509
|
}
|
|
469
510
|
|
|
470
511
|
/* 高对比度模式(Windows High Contrast / 强制 colors) */
|
|
471
512
|
@media (forced-colors: active) {
|
|
472
|
-
.pressable, .control, .lift, .surface-elevated, .focus-ring:focus-visible {
|
|
513
|
+
.icen-pressable, .icen-control, .icen-lift, .icen-surface-elevated, .icen-focus-ring:focus-visible {
|
|
473
514
|
forced-color-adjust: none;
|
|
474
515
|
}
|
|
475
|
-
.focus-ring:focus-visible,
|
|
476
|
-
.pressable:focus-visible {
|
|
516
|
+
.icen-focus-ring:focus-visible,
|
|
517
|
+
.icen-pressable:focus-visible {
|
|
477
518
|
outline: 2px solid Highlight;
|
|
478
519
|
outline-offset: 2px;
|
|
479
520
|
}
|
|
521
|
+
/* 强制颜色会丢弃 box-shadow——本库多数焦点环正是 box-shadow(var(--icen-ring))。
|
|
522
|
+
组件普遍以 outline:none 关闭了默认焦点,所以这里必须提权兜底:
|
|
523
|
+
所有原生可聚焦元素在强制颜色下都拿到系统焦点框。 */
|
|
524
|
+
:where(a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex='-1'])):focus-visible {
|
|
525
|
+
outline: 2px solid Highlight !important; /* guard:allow-important 高对比模式焦点兜底:组件 outline:none 会吞掉默认焦点 */
|
|
526
|
+
outline-offset: 2px !important; /* guard:allow-important 高对比模式焦点兜底:组件 outline:none 会吞掉默认焦点 */
|
|
527
|
+
}
|
|
480
528
|
}
|
|
481
529
|
|
|
482
530
|
/* 打印:去掉阴影/背景/动效,节约墨水并避免打印截断 */
|
|
483
531
|
@media print {
|
|
484
532
|
*, *::before, *::after {
|
|
485
|
-
background: transparent !important;
|
|
486
|
-
color: #000 !important;
|
|
487
|
-
box-shadow: none !important;
|
|
488
|
-
text-shadow: none !important;
|
|
533
|
+
background: transparent !important; /* guard:allow-important 打印样式需确定性覆盖 */
|
|
534
|
+
color: #000 !important; /* guard:allow-important 打印样式需确定性覆盖 */
|
|
535
|
+
box-shadow: none !important; /* guard:allow-important 打印样式需确定性覆盖 */
|
|
536
|
+
text-shadow: none !important; /* guard:allow-important 打印样式需确定性覆盖 */
|
|
489
537
|
}
|
|
490
538
|
body { font-size: 12pt; line-height: 1.4; }
|
|
491
539
|
a, a:visited { text-decoration: underline; }
|
|
492
540
|
a[href]::after { content: ' (' attr(href) ')'; font-size: 90%; }
|
|
493
541
|
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
|
|
494
542
|
h1, h2, h3 { page-break-after: avoid; }
|
|
495
|
-
.pressable, .lift, .surface-elevated { box-shadow: none !important; transform: none !important; }
|
|
543
|
+
.icen-pressable, .icen-lift, .icen-surface-elevated { box-shadow: none !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */ transform: none !important; }
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/* ══════════════════════════════════════════════════════════════
|
|
547
|
+
触屏目标尺寸底线(@media pointer: coarse)
|
|
548
|
+
───────────────────────────────────────────────────────────────
|
|
549
|
+
交互基元与控件的可点区域在触屏下抬到 ≥40px:WCAG 2.5.5(Target
|
|
550
|
+
Size AAA 44px)的工程折中。用 max() 保住密度 token 的调节权——
|
|
551
|
+
密度档高于 40px 时仍按 token 走;逻辑属性形态(block/inline)
|
|
552
|
+
与全库书写方向自洽。块与内联同时给底线(方形命中区)。
|
|
553
|
+
══════════════════════════════════════════════════════════════ */
|
|
554
|
+
@media (pointer: coarse) {
|
|
555
|
+
.icen-pressable,
|
|
556
|
+
.icen-control,
|
|
557
|
+
.icen-field,
|
|
558
|
+
.icen-lift,
|
|
559
|
+
button.icen-btn,
|
|
560
|
+
a[role='button'] {
|
|
561
|
+
min-block-size: max(var(--icen-density-input-height-md), 40px);
|
|
562
|
+
min-inline-size: max(var(--icen-density-input-height-md), 40px);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
496
566
|
}
|