@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: switch / checkbox / radio(开关 / 勾选 / 单选行)
|
|
3
4
|
* 状态组件:状态全走 aria-checked / .is-selected;交互由 behaviors/controls.ts 的
|
|
@@ -5,27 +6,27 @@
|
|
|
5
6
|
* 不接线时亦可由使用方自行驱动状态。
|
|
6
7
|
*
|
|
7
8
|
* 完整契约:
|
|
8
|
-
* <button class="switch [--sm|--lg]" role="switch" aria-checked="true|false" [disabled]>
|
|
9
|
-
* <span class="switch-thumb"></span>
|
|
9
|
+
* <button class="icen-switch [--sm|--lg]" role="switch" aria-checked="true|false" [disabled]>
|
|
10
|
+
* <span class="icen-switch-thumb"></span>
|
|
10
11
|
* </button>
|
|
11
12
|
*
|
|
12
|
-
* <button class="checkbox focus-ring [--sm|--lg]" role="checkbox"
|
|
13
|
+
* <button class="icen-checkbox icen-focus-ring [--sm|--lg]" role="checkbox"
|
|
13
14
|
* aria-checked="true|false|mixed" [disabled]></button>
|
|
14
15
|
*
|
|
15
|
-
* <div class="radio-group" role="radiogroup">
|
|
16
|
-
* <button class="radio-item motion [.is-selected]" role="radio"
|
|
16
|
+
* <div class="icen-radio-group" role="radiogroup">
|
|
17
|
+
* <button class="icen-radio-item icen-motion [.is-selected]" role="radio"
|
|
17
18
|
* aria-checked="true|false" [disabled]>
|
|
18
|
-
* <span class="radio-dot"></span>
|
|
19
|
+
* <span class="icen-radio-dot"></span>
|
|
19
20
|
* <span>标签</span>
|
|
20
21
|
* </button>
|
|
21
22
|
* </div>
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
25
|
/* ── 开关 ── */
|
|
25
|
-
.switch {
|
|
26
|
-
--switch-w:
|
|
27
|
-
--switch-h:
|
|
28
|
-
--switch-thumb:
|
|
26
|
+
.icen-switch {
|
|
27
|
+
--switch-w: 38px;
|
|
28
|
+
--switch-h: 22px;
|
|
29
|
+
--switch-thumb: 18px;
|
|
29
30
|
position: relative;
|
|
30
31
|
display: inline-flex;
|
|
31
32
|
flex-shrink: 0;
|
|
@@ -33,49 +34,53 @@
|
|
|
33
34
|
height: var(--switch-h);
|
|
34
35
|
padding: 0;
|
|
35
36
|
border: none;
|
|
36
|
-
border-radius: var(--radius-full);
|
|
37
|
-
background: var(--token-
|
|
37
|
+
border-radius: var(--icen-radius-full);
|
|
38
|
+
background: var(--icen-token-fill-2);
|
|
38
39
|
cursor: pointer;
|
|
39
40
|
-webkit-tap-highlight-color: transparent;
|
|
40
41
|
transition: background-color var(--icen-tx-normal);
|
|
41
42
|
}
|
|
42
|
-
.switch[aria-checked='true'] {
|
|
43
|
-
background: var(--token-accent);
|
|
43
|
+
.icen-switch[aria-checked='true'] {
|
|
44
|
+
background: var(--icen-token-accent-strong);
|
|
44
45
|
}
|
|
45
|
-
.switch:disabled,
|
|
46
|
-
.switch[aria-disabled='true'],
|
|
47
|
-
.switch[data-disabled] {
|
|
46
|
+
.icen-switch:disabled,
|
|
47
|
+
.icen-switch[aria-disabled='true'],
|
|
48
|
+
.icen-switch[data-icen-disabled] {
|
|
48
49
|
opacity: var(--icen-disabled-opacity);
|
|
49
50
|
cursor: not-allowed;
|
|
50
51
|
}
|
|
51
|
-
.switch:focus-visible {
|
|
52
|
+
.icen-switch:focus-visible {
|
|
52
53
|
outline: none;
|
|
53
54
|
box-shadow: var(--icen-ring);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
.switch-thumb {
|
|
57
|
+
.icen-switch-thumb {
|
|
57
58
|
position: absolute;
|
|
58
59
|
top: 50%;
|
|
59
|
-
left: calc((var(--switch-h) - var(--switch-thumb)) / 2);
|
|
60
|
+
left: calc((var(--switch-h) - var(--switch-thumb)) / 2); /* guard:allow-physical 开关是物理隐喻控件(RTL 下开/关方向保持物理,不镜像) */
|
|
60
61
|
transform: translateY(-50%);
|
|
61
62
|
width: var(--switch-thumb);
|
|
62
63
|
height: var(--switch-thumb);
|
|
63
|
-
border-radius: var(--radius-full);
|
|
64
|
-
background: var(--token-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
border-radius: var(--icen-radius-full);
|
|
65
|
+
background: var(--icen-token-surface);
|
|
66
|
+
border: 0;
|
|
67
|
+
box-shadow:
|
|
68
|
+
0 0 0 .5px color-mix(in srgb, var(--icen-token-text) 16%, transparent),
|
|
69
|
+
0 1px 2px color-mix(in srgb, var(--icen-design-shadow-color) 22%, transparent),
|
|
70
|
+
0 2px 6px -2px color-mix(in srgb, var(--icen-design-shadow-color) 18%, transparent);
|
|
71
|
+
transition: transform var(--icen-duration-normal) var(--icen-ease-out);
|
|
72
|
+
}
|
|
73
|
+
.icen-switch[aria-checked='true'] .icen-switch-thumb {
|
|
74
|
+
transform: translateY(-50%) translateX(calc(var(--switch-w) - var(--switch-h))); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
/* 尺寸变体 */
|
|
73
|
-
.switch--sm { --switch-w:
|
|
74
|
-
.switch--lg { --switch-w:
|
|
78
|
+
.icen-switch--sm { --switch-w: 32px; --switch-h: 18px; --switch-thumb: 14px; }
|
|
79
|
+
.icen-switch--lg { --switch-w: 46px; --switch-h: 26px; --switch-thumb: 22px; }
|
|
75
80
|
|
|
76
81
|
/* ── 勾选框(✓ 与半选横条均 ::before 自绘) ── */
|
|
77
|
-
.checkbox {
|
|
78
|
-
--checkbox-size:
|
|
82
|
+
.icen-checkbox {
|
|
83
|
+
--checkbox-size: 15px;
|
|
79
84
|
display: inline-flex;
|
|
80
85
|
align-items: center;
|
|
81
86
|
justify-content: center;
|
|
@@ -83,10 +88,10 @@
|
|
|
83
88
|
width: var(--checkbox-size);
|
|
84
89
|
height: var(--checkbox-size);
|
|
85
90
|
padding: 0;
|
|
86
|
-
background: var(--token-control);
|
|
91
|
+
background: var(--icen-token-control);
|
|
87
92
|
color: transparent;
|
|
88
|
-
border: 1px solid var(--token-
|
|
89
|
-
border-radius: var(--radius-
|
|
93
|
+
border: 1px solid var(--icen-token-control-border);
|
|
94
|
+
border-radius: var(--icen-radius-xs);
|
|
90
95
|
cursor: pointer;
|
|
91
96
|
-webkit-tap-highlight-color: transparent;
|
|
92
97
|
transition:
|
|
@@ -95,64 +100,67 @@
|
|
|
95
100
|
color var(--icen-tx-fast),
|
|
96
101
|
box-shadow var(--icen-tx-fast);
|
|
97
102
|
}
|
|
98
|
-
.checkbox:hover:not([aria-checked='true']):not([aria-checked='mixed']):not(:disabled) {
|
|
99
|
-
border-color:
|
|
103
|
+
.icen-checkbox:hover:not([aria-checked='true']):not([aria-checked='mixed']):not(:disabled) {
|
|
104
|
+
border-color: var(--icen-token-control-border-hover);
|
|
100
105
|
}
|
|
101
|
-
.checkbox[aria-checked='true'],
|
|
102
|
-
.checkbox[aria-checked='mixed'] {
|
|
103
|
-
background: var(--token-accent);
|
|
104
|
-
border-color: var(--token-accent);
|
|
105
|
-
color: var(--token-on-accent);
|
|
106
|
+
.icen-checkbox[aria-checked='true'],
|
|
107
|
+
.icen-checkbox[aria-checked='mixed'] {
|
|
108
|
+
background: var(--icen-token-accent-strong);
|
|
109
|
+
border-color: var(--icen-token-accent-strong);
|
|
110
|
+
color: var(--icen-token-on-accent);
|
|
106
111
|
}
|
|
107
|
-
.checkbox::before {
|
|
112
|
+
.icen-checkbox::before {
|
|
108
113
|
content: '';
|
|
109
|
-
|
|
110
|
-
|
|
114
|
+
inline-size: 11px;
|
|
115
|
+
block-size: 11px;
|
|
111
116
|
background: currentColor;
|
|
112
117
|
opacity: 0;
|
|
113
|
-
|
|
118
|
+
mask: var(--icen-token-icon-check) center / contain no-repeat;
|
|
119
|
+
-webkit-mask: var(--icen-token-icon-check) center / contain no-repeat;
|
|
120
|
+
transition: opacity var(--icen-duration-fast) var(--icen-ease-out);
|
|
114
121
|
}
|
|
115
|
-
.checkbox[aria-checked='true']::before { opacity: 1; }
|
|
116
|
-
.checkbox[aria-checked='mixed']::before {
|
|
122
|
+
.icen-checkbox[aria-checked='true']::before { opacity: 1; }
|
|
123
|
+
.icen-checkbox[aria-checked='mixed']::before {
|
|
117
124
|
opacity: 1;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
.checkbox:disabled,
|
|
124
|
-
.checkbox[aria-disabled='true'],
|
|
125
|
-
.checkbox[data-disabled] {
|
|
125
|
+
inline-size: 9px;
|
|
126
|
+
block-size: 9px;
|
|
127
|
+
mask-image: var(--icen-token-icon-minus);
|
|
128
|
+
-webkit-mask-image: var(--icen-token-icon-minus);
|
|
129
|
+
}
|
|
130
|
+
.icen-checkbox:disabled,
|
|
131
|
+
.icen-checkbox[aria-disabled='true'],
|
|
132
|
+
.icen-checkbox[data-icen-disabled] {
|
|
126
133
|
opacity: var(--icen-disabled-opacity);
|
|
127
134
|
cursor: not-allowed;
|
|
128
135
|
}
|
|
129
|
-
.checkbox:focus-visible {
|
|
136
|
+
.icen-checkbox:focus-visible {
|
|
130
137
|
outline: none;
|
|
131
138
|
box-shadow: var(--icen-ring);
|
|
132
139
|
}
|
|
133
140
|
|
|
134
|
-
.checkbox--sm { --checkbox-size:
|
|
135
|
-
.checkbox--lg { --checkbox-size:
|
|
141
|
+
.icen-checkbox--sm { --checkbox-size: 13px; }
|
|
142
|
+
.icen-checkbox--lg { --checkbox-size: 18px; }
|
|
136
143
|
|
|
137
144
|
/* ── 单选行(radio item:整行可点) ── */
|
|
138
|
-
.radio-group {
|
|
145
|
+
.icen-radio-group {
|
|
139
146
|
display: flex;
|
|
140
147
|
flex-direction: column;
|
|
141
|
-
gap: var(--density-space-xs);
|
|
148
|
+
gap: var(--icen-density-space-xs);
|
|
142
149
|
}
|
|
143
150
|
|
|
144
|
-
.radio-item {
|
|
151
|
+
.icen-radio-item {
|
|
145
152
|
display: flex;
|
|
146
153
|
align-items: center;
|
|
147
|
-
gap: var(--density-space-sm);
|
|
154
|
+
gap: var(--icen-density-space-sm);
|
|
148
155
|
width: 100%;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
min-block-size: calc(var(--icen-control-height-sm) + 2px);
|
|
157
|
+
padding: var(--icen-density-space-xs) var(--icen-density-space-sm);
|
|
158
|
+
font-size: var(--icen-font-size-control);
|
|
159
|
+
text-align: start;
|
|
152
160
|
border: 1px solid transparent;
|
|
153
161
|
background: transparent;
|
|
154
|
-
color: var(--token-text);
|
|
155
|
-
border-radius: var(--radius
|
|
162
|
+
color: var(--icen-token-text);
|
|
163
|
+
border-radius: var(--icen-control-radius);
|
|
156
164
|
cursor: pointer;
|
|
157
165
|
-webkit-tap-highlight-color: transparent;
|
|
158
166
|
transition:
|
|
@@ -160,125 +168,125 @@
|
|
|
160
168
|
color var(--icen-tx-fast),
|
|
161
169
|
border-color var(--icen-tx-fast);
|
|
162
170
|
}
|
|
163
|
-
.radio-item:hover:not(.is-disabled) {
|
|
164
|
-
background: var(--token-fill-
|
|
171
|
+
.icen-radio-item:hover:not(.is-disabled) {
|
|
172
|
+
background: var(--icen-token-fill-hover);
|
|
165
173
|
}
|
|
166
|
-
.radio-item.is-selected,
|
|
167
|
-
.radio-item[aria-checked='true'] {
|
|
168
|
-
background: var(--token-accent-subtle);
|
|
169
|
-
color: var(--token-
|
|
174
|
+
.icen-radio-item.is-selected,
|
|
175
|
+
.icen-radio-item[aria-checked='true'] {
|
|
176
|
+
background: var(--icen-token-accent-subtle);
|
|
177
|
+
color: var(--icen-token-text);
|
|
170
178
|
font-weight: 500;
|
|
171
|
-
border-color:
|
|
179
|
+
border-color: transparent;
|
|
172
180
|
}
|
|
173
|
-
.radio-item:focus-visible {
|
|
181
|
+
.icen-radio-item:focus-visible {
|
|
174
182
|
outline: none;
|
|
175
183
|
box-shadow: var(--icen-ring);
|
|
176
184
|
}
|
|
177
|
-
.radio-item:disabled,
|
|
178
|
-
.radio-item.is-disabled,
|
|
179
|
-
.radio-item[aria-disabled='true'] {
|
|
185
|
+
.icen-radio-item:disabled,
|
|
186
|
+
.icen-radio-item.is-disabled,
|
|
187
|
+
.icen-radio-item[aria-disabled='true'] {
|
|
180
188
|
opacity: var(--icen-disabled-opacity);
|
|
181
189
|
cursor: not-allowed;
|
|
182
190
|
}
|
|
183
191
|
|
|
184
|
-
.radio-dot {
|
|
192
|
+
.icen-radio-dot {
|
|
185
193
|
position: relative;
|
|
186
|
-
width:
|
|
187
|
-
height:
|
|
194
|
+
width: 15px;
|
|
195
|
+
height: 15px;
|
|
188
196
|
flex-shrink: 0;
|
|
189
|
-
border: 1px solid var(--token-
|
|
190
|
-
border-radius: var(--radius-full);
|
|
191
|
-
background: var(--token-control);
|
|
197
|
+
border: 1px solid var(--icen-token-control-border);
|
|
198
|
+
border-radius: var(--icen-radius-full);
|
|
199
|
+
background: var(--icen-token-control);
|
|
192
200
|
transition: border-color var(--icen-tx-fast);
|
|
193
201
|
}
|
|
194
|
-
.radio-item.is-selected .radio-dot,
|
|
195
|
-
.radio-item[aria-checked='true'] .radio-dot { border-color: var(--token-accent); }
|
|
196
|
-
.radio-dot::after {
|
|
202
|
+
.icen-radio-item.is-selected .icen-radio-dot,
|
|
203
|
+
.icen-radio-item[aria-checked='true'] .icen-radio-dot { border-color: var(--icen-token-accent-strong); }
|
|
204
|
+
.icen-radio-dot::after {
|
|
197
205
|
content: '';
|
|
198
206
|
position: absolute;
|
|
199
|
-
top: 50%; left: 50%;
|
|
200
|
-
width:
|
|
201
|
-
height:
|
|
202
|
-
border-radius: var(--radius-full);
|
|
203
|
-
background: var(--token-accent);
|
|
207
|
+
top: 50%; left: 50%; /* guard:allow-physical 圆心居中:left 50% + translate(-50%) 任意方向下均为圆心 */
|
|
208
|
+
width: 7px;
|
|
209
|
+
height: 7px;
|
|
210
|
+
border-radius: var(--icen-radius-full);
|
|
211
|
+
background: var(--icen-token-accent-strong);
|
|
204
212
|
transform: translate(-50%, -50%) scale(0);
|
|
205
|
-
transition: transform var(--icen-
|
|
213
|
+
transition: transform var(--icen-duration-fast) var(--icen-ease-out);
|
|
206
214
|
}
|
|
207
|
-
.radio-item.is-selected .radio-dot::after,
|
|
208
|
-
.radio-item[aria-checked='true'] .radio-dot::after {
|
|
215
|
+
.icen-radio-item.is-selected .icen-radio-dot::after,
|
|
216
|
+
.icen-radio-item[aria-checked='true'] .icen-radio-dot::after {
|
|
209
217
|
transform: translate(-50%, -50%) scale(1);
|
|
210
218
|
}
|
|
211
219
|
|
|
212
220
|
/* ── 开关色彩变体 ── */
|
|
213
|
-
.switch--success[aria-checked='true'] { background: var(--token-success); }
|
|
214
|
-
.switch--warning[aria-checked='true'] { background: var(--token-warning); }
|
|
215
|
-
.switch--danger[aria-checked='true'] { background: var(--token-error); }
|
|
221
|
+
.icen-switch--success[aria-checked='true'] { background: var(--icen-token-success); }
|
|
222
|
+
.icen-switch--warning[aria-checked='true'] { background: var(--icen-token-warning); }
|
|
223
|
+
.icen-switch--danger[aria-checked='true'] { background: var(--icen-token-error); }
|
|
216
224
|
|
|
217
225
|
/* ── 开关带文字(on/off 文字嵌入) ── */
|
|
218
|
-
.switch--text {
|
|
226
|
+
.icen-switch--text {
|
|
219
227
|
--switch-w: 52px;
|
|
220
228
|
}
|
|
221
|
-
.switch--text .switch-thumb {
|
|
229
|
+
.icen-switch--text .icen-switch-thumb {
|
|
222
230
|
display: flex;
|
|
223
231
|
align-items: center;
|
|
224
232
|
justify-content: center;
|
|
225
|
-
font-size: var(--density-font-size-2xs);
|
|
233
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
226
234
|
font-weight: 700;
|
|
227
235
|
color: transparent;
|
|
228
236
|
}
|
|
229
|
-
.switch--text[aria-checked='true']::before {
|
|
237
|
+
.icen-switch--text[aria-checked='true']::before {
|
|
230
238
|
content: 'ON';
|
|
231
239
|
position: absolute;
|
|
232
|
-
left: 6px;
|
|
240
|
+
left: 6px; /* guard:allow-physical ON 文案固定于物理左侧(与 thumb 关闭位同侧,开关不随 RTL 镜像) */
|
|
233
241
|
top: 50%;
|
|
234
242
|
transform: translateY(-50%);
|
|
235
|
-
font-size: var(--density-font-size-2xs);
|
|
243
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
236
244
|
font-weight: 700;
|
|
237
|
-
color: var(--token-on-accent);
|
|
245
|
+
color: var(--icen-token-on-accent);
|
|
238
246
|
}
|
|
239
|
-
.switch--text[aria-checked='false']::before {
|
|
247
|
+
.icen-switch--text[aria-checked='false']::before {
|
|
240
248
|
content: 'OFF';
|
|
241
249
|
position: absolute;
|
|
242
|
-
right: 6px;
|
|
250
|
+
right: 6px; /* guard:allow-physical OFF 文案固定于物理右侧(与 thumb 开启位同侧,开关不随 RTL 镜像) */
|
|
243
251
|
top: 50%;
|
|
244
252
|
transform: translateY(-50%);
|
|
245
|
-
font-size: var(--density-font-size-2xs);
|
|
253
|
+
font-size: var(--icen-density-font-size-2xs);
|
|
246
254
|
font-weight: 700;
|
|
247
|
-
color: var(--token-text-faint);
|
|
255
|
+
color: var(--icen-token-text-faint);
|
|
248
256
|
}
|
|
249
257
|
|
|
250
258
|
/* ── 带标签的开关行 ── */
|
|
251
|
-
.switch-row {
|
|
259
|
+
.icen-switch-row {
|
|
252
260
|
display: flex;
|
|
253
261
|
align-items: center;
|
|
254
262
|
justify-content: space-between;
|
|
255
|
-
gap: var(--density-space-sm);
|
|
256
|
-
padding: var(--density-space-sm) 0;
|
|
263
|
+
gap: var(--icen-density-space-sm);
|
|
264
|
+
padding: var(--icen-density-space-sm) 0;
|
|
257
265
|
}
|
|
258
|
-
.switch-row-label {
|
|
266
|
+
.icen-switch-row-label {
|
|
259
267
|
display: flex;
|
|
260
268
|
flex-direction: column;
|
|
261
269
|
gap: 1px;
|
|
262
270
|
flex: 1;
|
|
263
271
|
min-width: 0;
|
|
264
272
|
}
|
|
265
|
-
.switch-row-title {
|
|
266
|
-
font-size: var(--density-font-size-md);
|
|
267
|
-
color: var(--token-text);
|
|
273
|
+
.icen-switch-row-title {
|
|
274
|
+
font-size: var(--icen-density-font-size-md);
|
|
275
|
+
color: var(--icen-token-text);
|
|
268
276
|
}
|
|
269
|
-
.switch-row-desc {
|
|
270
|
-
font-size: var(--density-font-size-xs);
|
|
271
|
-
color: var(--token-text-faint);
|
|
277
|
+
.icen-switch-row-desc {
|
|
278
|
+
font-size: var(--icen-density-font-size-xs);
|
|
279
|
+
color: var(--icen-token-text-faint);
|
|
272
280
|
}
|
|
273
281
|
|
|
274
282
|
/* ── 勾选行(checkbox + label 组合) ── */
|
|
275
|
-
.checkbox-row {
|
|
283
|
+
.icen-checkbox-row {
|
|
276
284
|
display: flex;
|
|
277
285
|
align-items: flex-start;
|
|
278
|
-
gap: var(--density-space-sm);
|
|
286
|
+
gap: var(--icen-density-space-sm);
|
|
279
287
|
cursor: pointer;
|
|
280
288
|
}
|
|
281
|
-
.checkbox-row-label {
|
|
289
|
+
.icen-checkbox-row-label {
|
|
282
290
|
display: flex;
|
|
283
291
|
flex-direction: column;
|
|
284
292
|
gap: 1px;
|
|
@@ -287,66 +295,101 @@
|
|
|
287
295
|
}
|
|
288
296
|
|
|
289
297
|
/* ── 单选卡片(富化版 radio-item,带描述与图标) ── */
|
|
290
|
-
.radio-card {
|
|
298
|
+
.icen-radio-card {
|
|
291
299
|
display: flex;
|
|
292
300
|
flex-direction: column;
|
|
293
|
-
gap: var(--density-space-xs);
|
|
294
|
-
padding: var(--density-space-md);
|
|
295
|
-
border: 1px solid var(--token-outline-soft);
|
|
296
|
-
border-radius: var(--radius-md);
|
|
297
|
-
background: var(--token-surface);
|
|
301
|
+
gap: var(--icen-density-space-xs);
|
|
302
|
+
padding: var(--icen-density-space-md);
|
|
303
|
+
border: 1px solid var(--icen-token-outline-soft);
|
|
304
|
+
border-radius: var(--icen-radius-md);
|
|
305
|
+
background: var(--icen-token-surface);
|
|
298
306
|
cursor: pointer;
|
|
299
307
|
transition:
|
|
300
308
|
border-color var(--icen-tx-fast),
|
|
301
309
|
box-shadow var(--icen-tx-fast),
|
|
302
310
|
background-color var(--icen-tx-fast);
|
|
303
311
|
}
|
|
304
|
-
.radio-card:hover {
|
|
312
|
+
.icen-radio-card:hover {
|
|
305
313
|
border-color: var(--icen-hover-border);
|
|
306
314
|
}
|
|
307
|
-
.radio-card-head {
|
|
315
|
+
.icen-radio-card-head {
|
|
308
316
|
display: flex;
|
|
309
317
|
align-items: center;
|
|
310
318
|
justify-content: space-between;
|
|
311
|
-
gap: var(--density-space-sm);
|
|
319
|
+
gap: var(--icen-density-space-sm);
|
|
312
320
|
}
|
|
313
|
-
.radio-card.is-selected,
|
|
314
|
-
.radio-card[aria-checked='true'] {
|
|
315
|
-
border-color: var(--token-accent);
|
|
316
|
-
background: var(--token-accent-subtle);
|
|
321
|
+
.icen-radio-card.is-selected,
|
|
322
|
+
.icen-radio-card[aria-checked='true'] {
|
|
323
|
+
border-color: var(--icen-token-accent);
|
|
324
|
+
background: var(--icen-token-accent-subtle);
|
|
317
325
|
box-shadow: var(--icen-ring-soft);
|
|
318
326
|
}
|
|
319
|
-
.radio-card:focus-visible {
|
|
327
|
+
.icen-radio-card:focus-visible {
|
|
320
328
|
outline: none;
|
|
321
329
|
box-shadow: var(--icen-ring);
|
|
322
330
|
}
|
|
323
|
-
.radio-card-title {
|
|
324
|
-
font-size: var(--density-font-size-md);
|
|
331
|
+
.icen-radio-card-title {
|
|
332
|
+
font-size: var(--icen-density-font-size-md);
|
|
325
333
|
font-weight: 500;
|
|
326
|
-
color: var(--token-text);
|
|
334
|
+
color: var(--icen-token-text);
|
|
327
335
|
}
|
|
328
|
-
.radio-card-desc {
|
|
329
|
-
font-size: var(--density-font-size-sm);
|
|
330
|
-
color: var(--token-text-muted);
|
|
336
|
+
.icen-radio-card-desc {
|
|
337
|
+
font-size: var(--icen-density-font-size-sm);
|
|
338
|
+
color: var(--icen-token-text-muted);
|
|
331
339
|
line-height: 1.5;
|
|
332
340
|
}
|
|
333
341
|
|
|
334
342
|
/* 单选卡片网格 */
|
|
335
|
-
.radio-card-grid {
|
|
343
|
+
.icen-radio-card-grid {
|
|
336
344
|
display: grid;
|
|
337
345
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
338
|
-
gap: var(--density-space-sm);
|
|
346
|
+
gap: var(--icen-density-space-sm);
|
|
339
347
|
}
|
|
340
348
|
|
|
341
349
|
/* ── 复选框组(多列网格) ── */
|
|
342
|
-
.checkbox-grid {
|
|
350
|
+
.icen-checkbox-grid {
|
|
343
351
|
display: grid;
|
|
344
352
|
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
|
345
|
-
gap: var(--density-space-sm);
|
|
353
|
+
gap: var(--icen-density-space-sm);
|
|
346
354
|
}
|
|
347
355
|
|
|
348
356
|
@media (prefers-reduced-motion: reduce) {
|
|
349
|
-
.switch-thumb { transition: none; }
|
|
350
|
-
.radio-dot::after { transition: none; }
|
|
351
|
-
.radio-card { transition: none; }
|
|
357
|
+
.icen-switch-thumb { transition: none; }
|
|
358
|
+
.icen-radio-dot::after { transition: none; }
|
|
359
|
+
.icen-radio-card { transition: none; }
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* 高对比模式:开关/勾选/单选靠底色与 mask 表达状态,强制颜色会抹平——
|
|
363
|
+
用系统高亮色 + forced-color-adjust:none 保住「开/关」的可辨差异。 */
|
|
364
|
+
@media (forced-colors: active) {
|
|
365
|
+
.icen-switch {
|
|
366
|
+
border: 1px solid CanvasText;
|
|
367
|
+
background: Canvas;
|
|
368
|
+
}
|
|
369
|
+
.icen-switch[aria-checked='true'] {
|
|
370
|
+
forced-color-adjust: none;
|
|
371
|
+
background: Highlight;
|
|
372
|
+
border-color: Highlight;
|
|
373
|
+
}
|
|
374
|
+
.icen-switch-thumb {
|
|
375
|
+
forced-color-adjust: none;
|
|
376
|
+
background: CanvasText;
|
|
377
|
+
border: 1px solid Canvas;
|
|
378
|
+
}
|
|
379
|
+
.icen-switch[aria-checked='true'] .icen-switch-thumb { background: HighlightText; }
|
|
380
|
+
.icen-checkbox[aria-checked='true'],
|
|
381
|
+
.icen-checkbox[aria-checked='mixed'] {
|
|
382
|
+
forced-color-adjust: none;
|
|
383
|
+
background: Highlight;
|
|
384
|
+
border-color: Highlight;
|
|
385
|
+
color: HighlightText;
|
|
386
|
+
}
|
|
387
|
+
.icen-checkbox::before { forced-color-adjust: none; background: HighlightText; }
|
|
388
|
+
.icen-radio-dot::after { forced-color-adjust: none; background: Highlight; }
|
|
389
|
+
.icen-radio-item.is-selected,
|
|
390
|
+
.icen-radio-item[aria-checked='true'] { outline: 1px solid Highlight; outline-offset: -1px; }
|
|
391
|
+
.icen-radio-card.is-selected,
|
|
392
|
+
.icen-radio-card[aria-checked='true'] { border-color: Highlight; }
|
|
393
|
+
}
|
|
394
|
+
|
|
352
395
|
}
|