@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,179 +1,211 @@
|
|
|
1
|
+
@layer icen.components {
|
|
1
2
|
/*
|
|
2
3
|
* @icen.ai/ui — Component: table(数据表)
|
|
3
4
|
*
|
|
4
5
|
* 完整契约:
|
|
5
|
-
* <div class="table-wrap [table-wrap--bordered]">
|
|
6
|
-
* <table class="table [--zebra|--compact|--dense] [--sticky-col]">
|
|
7
|
-
* <caption class="table-caption">标题说明</caption> ← 可选
|
|
6
|
+
* <div class="icen-table-wrap [icen-table-wrap--bordered]">
|
|
7
|
+
* <icen-table class="icen-table [--zebra|--compact|--dense] [--sticky-col]">
|
|
8
|
+
* <caption class="icen-table-caption">标题说明</caption> ← 可选
|
|
8
9
|
* <thead>
|
|
9
|
-
* <tr><th [colspan=rowspan] [data-sort]>列名</th>…</tr>
|
|
10
|
+
* <tr><th [colspan=rowspan] [data-icen-sort]>列名</th>…</tr>
|
|
10
11
|
* </thead>
|
|
11
12
|
* <tbody>
|
|
12
|
-
* <tr class="row-link [.is-selected] [.is-expanded]> ← 整行可点
|
|
13
|
-
* <td class="col-fixed">…</td> ← 固定列(sticky-col 模式)
|
|
13
|
+
* <tr class="icen-row-link [.is-selected] [.is-expanded]> ← 整行可点
|
|
14
|
+
* <td class="icen-col-fixed">…</td> ← 固定列(sticky-col 模式)
|
|
14
15
|
* <td>…</td>
|
|
15
|
-
* <td class="ops"><button class="btn btn-sm">…</button></td>
|
|
16
|
+
* <td class="icen-ops"><button class="icen-btn icen-btn-sm">…</button></td>
|
|
16
17
|
* </tr>
|
|
17
|
-
* <tr class="row-expand"> ← 展开行(配合 .is-expanded)
|
|
18
|
+
* <tr class="icen-row-expand"> ← 展开行(配合 .is-expanded)
|
|
18
19
|
* <td colspan="99">…展开详情…</td>
|
|
19
20
|
* </tr>
|
|
20
21
|
* </tbody>
|
|
21
22
|
* <tfoot><tr><td>合计</td>…</tr></tfoot>
|
|
22
|
-
* </table>
|
|
23
|
+
* </icen-table>
|
|
23
24
|
* </div>
|
|
24
25
|
*
|
|
25
|
-
* .table-wrap:窄屏横向滚动(滚动条样式见 base.css);--bordered 加外边框。
|
|
26
|
-
* .table--zebra:斑马纹(奇数行底色)。
|
|
27
|
-
* .table--compact:紧凑(cell padding 缩小);--dense:极紧凑(行高更紧)。
|
|
28
|
-
* .table--sticky-col:首列水平粘滞(配合 td/th .col-fixed,长表横向滚动时保持可见)。
|
|
29
|
-
* .row-expand[hidden]:配合 .row-link.is-expanded 控制展开行显隐。
|
|
26
|
+
* .icen-table-wrap:窄屏横向滚动(滚动条样式见 base.css);--bordered 加外边框。
|
|
27
|
+
* .icen-table--zebra:斑马纹(奇数行底色)。
|
|
28
|
+
* .icen-table--compact:紧凑(cell padding 缩小);--dense:极紧凑(行高更紧)。
|
|
29
|
+
* .icen-table--sticky-col:首列水平粘滞(配合 td/th .icen-col-fixed,长表横向滚动时保持可见)。
|
|
30
|
+
* .icen-row-expand[hidden]:配合 .icen-row-link.is-expanded 控制展开行显隐。
|
|
30
31
|
*/
|
|
31
32
|
|
|
32
|
-
.table-wrap {
|
|
33
|
+
.icen-table-wrap {
|
|
33
34
|
overflow-x: auto;
|
|
34
35
|
overscroll-behavior: contain;
|
|
35
|
-
border-radius: var(--radius-lg);
|
|
36
|
+
border-radius: var(--icen-control-radius-lg);
|
|
36
37
|
}
|
|
37
|
-
.table-wrap--bordered {
|
|
38
|
-
border: 1px solid var(--token-
|
|
38
|
+
.icen-table-wrap--bordered {
|
|
39
|
+
border: 1px solid var(--icen-token-separator-soft);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
.table {
|
|
42
|
-
|
|
42
|
+
.icen-table {
|
|
43
|
+
inline-size: 100%;
|
|
43
44
|
border-collapse: collapse;
|
|
44
|
-
font-size: var(--
|
|
45
|
+
font-size: var(--icen-font-size-control);
|
|
45
46
|
font-variant-numeric: tabular-nums;
|
|
46
47
|
}
|
|
47
|
-
.table th,
|
|
48
|
-
.table td {
|
|
49
|
-
padding:
|
|
50
|
-
text-align:
|
|
48
|
+
.icen-table th,
|
|
49
|
+
.icen-table td {
|
|
50
|
+
padding: 6px 10px;
|
|
51
|
+
text-align: start;
|
|
51
52
|
}
|
|
52
|
-
.table th {
|
|
53
|
+
.icen-table th {
|
|
53
54
|
font-weight: 600;
|
|
54
|
-
font-size: var(--
|
|
55
|
-
letter-spacing:
|
|
56
|
-
color: var(--token-text-
|
|
57
|
-
border-bottom: 1px solid var(--token-
|
|
55
|
+
font-size: var(--icen-font-size-caption);
|
|
56
|
+
letter-spacing: var(--icen-letter-spacing-caption);
|
|
57
|
+
color: var(--icen-token-text-muted);
|
|
58
|
+
border-bottom: 1px solid var(--icen-token-separator);
|
|
58
59
|
white-space: nowrap;
|
|
59
|
-
|
|
60
|
-
background: var(--token-bg-soft);
|
|
60
|
+
background: var(--icen-token-surface-chrome);
|
|
61
61
|
position: sticky;
|
|
62
62
|
top: 0;
|
|
63
|
-
z-index: var(--z-raised);
|
|
63
|
+
z-index: var(--icen-z-raised);
|
|
64
64
|
}
|
|
65
|
-
.table td {
|
|
66
|
-
border-bottom: 1px solid var(--token-
|
|
65
|
+
.icen-table td {
|
|
66
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
67
67
|
vertical-align: middle;
|
|
68
|
-
color: var(--token-text);
|
|
68
|
+
color: var(--icen-token-text);
|
|
69
69
|
}
|
|
70
|
-
.table tbody tr:last-child td { border-bottom: 0; }
|
|
71
|
-
.table tbody tr {
|
|
70
|
+
.icen-table tbody tr:last-child td { border-bottom: 0; }
|
|
71
|
+
.icen-table tbody tr {
|
|
72
72
|
transition: background-color var(--icen-tx-fast);
|
|
73
73
|
}
|
|
74
|
-
.table tbody tr:hover {
|
|
75
|
-
background: var(--token-
|
|
74
|
+
.icen-table tbody tr:hover {
|
|
75
|
+
background: var(--icen-token-fill-hover);
|
|
76
76
|
}
|
|
77
|
-
.table tbody tr.row-link {
|
|
77
|
+
.icen-table tbody tr.icen-row-link {
|
|
78
78
|
cursor: pointer;
|
|
79
79
|
}
|
|
80
|
-
.table tbody tr.is-selected {
|
|
81
|
-
background: var(--token-
|
|
80
|
+
.icen-table tbody tr.is-selected {
|
|
81
|
+
background: var(--icen-token-fill-selected);
|
|
82
82
|
}
|
|
83
|
-
.table tfoot td {
|
|
84
|
-
border-top: 1px solid var(--token-
|
|
83
|
+
.icen-table tfoot td {
|
|
84
|
+
border-top: 1px solid var(--icen-token-separator);
|
|
85
85
|
border-bottom: 0;
|
|
86
86
|
font-weight: 500;
|
|
87
|
-
background: var(--token-
|
|
87
|
+
background: var(--icen-token-surface-chrome);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/* 紧凑变体 */
|
|
91
|
-
.table--compact th,
|
|
92
|
-
.table--compact td {
|
|
93
|
-
padding:
|
|
91
|
+
.icen-table--compact th,
|
|
92
|
+
.icen-table--compact td {
|
|
93
|
+
padding: 4px 8px;
|
|
94
94
|
}
|
|
95
|
-
.table--dense th,
|
|
96
|
-
.table--dense td {
|
|
97
|
-
padding:
|
|
98
|
-
font-size: var(--density-font-size-sm);
|
|
95
|
+
.icen-table--dense th,
|
|
96
|
+
.icen-table--dense td {
|
|
97
|
+
padding: 2px 6px;
|
|
98
|
+
font-size: var(--icen-density-font-size-sm);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/*
|
|
102
|
-
.table td.num {
|
|
103
|
-
text-align: right;
|
|
101
|
+
/* 右对齐数字列(数字是 LTR 文种,业界惯例 RTL 下保持物理右对齐——Excel/Analytics 一致) */
|
|
102
|
+
.icen-table td.icen-num {
|
|
103
|
+
text-align: right; /* guard:allow-physical 数字列物理右对齐惯例,RTL 不镜像 */
|
|
104
104
|
font-variant-numeric: tabular-nums lining-nums;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/*
|
|
108
|
-
.table .ops {
|
|
107
|
+
/* 操作列(行内末端对齐,RTL 镜像到左侧;.icen-btn-sm 必伴 .icen-btn,无需单独列) */
|
|
108
|
+
.icen-table .icen-ops {
|
|
109
109
|
white-space: nowrap;
|
|
110
|
-
text-align:
|
|
110
|
+
text-align: end;
|
|
111
111
|
}
|
|
112
|
-
.table .ops .btn {
|
|
113
|
-
margin-
|
|
112
|
+
.icen-table .icen-ops .icen-btn {
|
|
113
|
+
margin-inline-start: var(--icen-density-space-xs);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
/* 可排序表头(使用方 data-sort 指示) */
|
|
117
|
-
.table th[data-sort] {
|
|
116
|
+
/* 可排序表头(使用方 data-icen-sort 指示) */
|
|
117
|
+
.icen-table th[data-icen-sort] {
|
|
118
118
|
cursor: pointer;
|
|
119
119
|
user-select: none;
|
|
120
120
|
}
|
|
121
|
-
.table th[data-sort]::after {
|
|
122
|
-
content: '
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
.icen-table th[data-icen-sort]::after {
|
|
122
|
+
content: '';
|
|
123
|
+
display: inline-block;
|
|
124
|
+
inline-size: 16px;
|
|
125
|
+
block-size: 16px;
|
|
126
|
+
flex: none;
|
|
127
|
+
vertical-align: middle;
|
|
128
|
+
background: currentColor;
|
|
129
|
+
mask: var(--icen-token-icon-sort) center / contain no-repeat;
|
|
130
|
+
margin-inline-start: var(--icen-density-space-xs);
|
|
131
|
+
color: var(--icen-token-text-faint);
|
|
125
132
|
opacity: 0.6;
|
|
126
133
|
}
|
|
127
|
-
.table th[data-sort='asc']::after { content: '
|
|
128
|
-
|
|
134
|
+
.icen-table th[data-icen-sort='asc']::after { content: '';
|
|
135
|
+
display: inline-block;
|
|
136
|
+
inline-size: 16px;
|
|
137
|
+
block-size: 16px;
|
|
138
|
+
flex: none;
|
|
139
|
+
vertical-align: middle;
|
|
140
|
+
background: currentColor;
|
|
141
|
+
mask: var(--icen-token-icon-arrow-up) center / contain no-repeat; opacity: 1; color: var(--icen-token-accent); }
|
|
142
|
+
.icen-table th[data-icen-sort='desc']::after { content: '';
|
|
143
|
+
display: inline-block;
|
|
144
|
+
inline-size: 16px;
|
|
145
|
+
block-size: 16px;
|
|
146
|
+
flex: none;
|
|
147
|
+
vertical-align: middle;
|
|
148
|
+
background: currentColor;
|
|
149
|
+
mask: var(--icen-token-icon-arrow-down) center / contain no-repeat; opacity: 1; color: var(--icen-token-accent); }
|
|
129
150
|
|
|
130
151
|
/* ── 斑马纹 ── */
|
|
131
|
-
|
|
132
|
-
|
|
152
|
+
/* :not 守卫:斑马纹与状态行同为行级背景,后写同特异性会盖掉选中/状态色
|
|
153
|
+
( datatable.css 同款口径) */
|
|
154
|
+
.icen-table--zebra tbody tr:nth-child(odd):not(.is-selected):not(.icen-row-success, .icen-row-warning, .icen-row-error) {
|
|
155
|
+
background: color-mix(in srgb, var(--icen-token-fill-hover) 55%, transparent);
|
|
133
156
|
}
|
|
134
|
-
.table--zebra tbody tr:hover {
|
|
135
|
-
background: var(--token-
|
|
157
|
+
.icen-table--zebra tbody tr:hover:not(.is-selected):not(.icen-row-success, .icen-row-warning, .icen-row-error) {
|
|
158
|
+
background: var(--icen-token-fill-hover);
|
|
136
159
|
}
|
|
137
160
|
|
|
138
161
|
/* ── 表格标题(caption) ── */
|
|
139
|
-
.table-caption {
|
|
140
|
-
text-align:
|
|
141
|
-
padding:
|
|
142
|
-
font-size: var(--
|
|
162
|
+
.icen-table-caption {
|
|
163
|
+
text-align: start;
|
|
164
|
+
padding: 8px 10px;
|
|
165
|
+
font-size: var(--icen-font-size-control);
|
|
143
166
|
font-weight: 600;
|
|
144
|
-
color: var(--token-text);
|
|
167
|
+
color: var(--icen-token-text);
|
|
145
168
|
caption-side: top;
|
|
146
169
|
}
|
|
147
170
|
|
|
148
171
|
/* ── 首列粘滞(长表横向滚动时保持可见) ── */
|
|
149
|
-
.table--sticky-col th:first-child,
|
|
150
|
-
.table--sticky-col .col-fixed {
|
|
172
|
+
.icen-table--sticky-col th:first-child,
|
|
173
|
+
.icen-table--sticky-col .icen-col-fixed {
|
|
151
174
|
position: sticky;
|
|
152
|
-
|
|
153
|
-
z-index: calc(var(--z-raised) + 1);
|
|
154
|
-
background: var(--token-
|
|
155
|
-
box-shadow:
|
|
156
|
-
}
|
|
157
|
-
.table--sticky-col tbody td.col-fixed {
|
|
158
|
-
background: var(--token-surface);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
175
|
+
inset-inline-start: 0;
|
|
176
|
+
z-index: calc(var(--icen-z-raised) + 1);
|
|
177
|
+
background: var(--icen-token-surface-chrome);
|
|
178
|
+
box-shadow: 1px 0 0 var(--icen-token-separator-soft);
|
|
179
|
+
}
|
|
180
|
+
.icen-table--sticky-col tbody td.icen-col-fixed {
|
|
181
|
+
background: var(--icen-token-surface);
|
|
182
|
+
}
|
|
183
|
+
/* 粘滞列是不透明面:选中/斑马/状态的行级底色透不上来,需在此重铺,
|
|
184
|
+
否则整行只有粘滞列一格「没被选中」,读起来像半选 */
|
|
185
|
+
.icen-table--sticky-col tbody tr.is-selected td.icen-col-fixed,
|
|
186
|
+
.icen-table--sticky-col tbody tr.is-selected th:first-child {
|
|
187
|
+
background: color-mix(in srgb, var(--icen-token-accent) 13%, var(--icen-token-surface));
|
|
188
|
+
}
|
|
189
|
+
.icen-table--sticky-col tbody tr.icen-row-success td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-success) 6%, var(--icen-token-surface)); }
|
|
190
|
+
.icen-table--sticky-col tbody tr.icen-row-warning td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-warning) 6%, var(--icen-token-surface)); }
|
|
191
|
+
.icen-table--sticky-col tbody tr.icen-row-error td.icen-col-fixed { background: color-mix(in srgb, var(--icen-token-error) 6%, var(--icen-token-surface)); }
|
|
192
|
+
.icen-table--sticky-col tbody tr:hover td.icen-col-fixed {
|
|
193
|
+
background: color-mix(in srgb, var(--icen-token-fill-hover) 65%, var(--icen-token-surface));
|
|
162
194
|
}
|
|
163
195
|
|
|
164
196
|
/* ── 展开行 ── */
|
|
165
|
-
.table .row-expand > td {
|
|
166
|
-
padding: 0
|
|
167
|
-
background: var(--token-
|
|
168
|
-
border-bottom: 1px solid var(--token-
|
|
169
|
-
font-size: var(--density-font-size-sm);
|
|
170
|
-
color: var(--token-text-muted);
|
|
171
|
-
}
|
|
172
|
-
.table .row-expand[hidden] { display: none; }
|
|
197
|
+
.icen-table .icen-row-expand > td {
|
|
198
|
+
padding: 0 10px;
|
|
199
|
+
background: var(--icen-token-surface-chrome);
|
|
200
|
+
border-bottom: 1px solid var(--icen-token-separator-soft);
|
|
201
|
+
font-size: var(--icen-density-font-size-sm);
|
|
202
|
+
color: var(--icen-token-text-muted);
|
|
203
|
+
}
|
|
204
|
+
.icen-table .icen-row-expand[hidden] { display: none; }
|
|
173
205
|
/* 展开行的内容容器(使用方可加 padding/动画) */
|
|
174
|
-
.row-expand-content {
|
|
175
|
-
padding: var(--density-space-sm) 0;
|
|
176
|
-
animation: row-expand-in var(--icen-
|
|
206
|
+
.icen-row-expand-content {
|
|
207
|
+
padding: var(--icen-density-space-sm) 0;
|
|
208
|
+
animation: row-expand-in var(--icen-duration-fast) var(--icen-ease-out);
|
|
177
209
|
}
|
|
178
210
|
@keyframes row-expand-in {
|
|
179
211
|
from { opacity: 0; transform: translateY(-4px); }
|
|
@@ -181,23 +213,37 @@
|
|
|
181
213
|
}
|
|
182
214
|
|
|
183
215
|
/* ── 列宽工具类 ── */
|
|
184
|
-
.table .col-narrow { width: 80px; }
|
|
185
|
-
.table .col-wide { width: 240px; }
|
|
186
|
-
.table .col-action { width: 1%; white-space: nowrap; }
|
|
216
|
+
.icen-table .icen-col-narrow { width: 80px; }
|
|
217
|
+
.icen-table .icen-col-wide { width: 240px; }
|
|
218
|
+
.icen-table .icen-col-action { width: 1%; white-space: nowrap; }
|
|
187
219
|
|
|
188
220
|
/* ── 行状态色 ── */
|
|
189
|
-
.table tbody tr.row-success { background: color-mix(in srgb, var(--token-success) 6%, transparent); }
|
|
190
|
-
.table tbody tr.row-warning { background: color-mix(in srgb, var(--token-warning) 6%, transparent); }
|
|
191
|
-
.table tbody tr.row-error { background: color-mix(in srgb, var(--token-error) 6%, transparent); }
|
|
221
|
+
.icen-table tbody tr.icen-row-success { background: color-mix(in srgb, var(--icen-token-success) 6%, transparent); }
|
|
222
|
+
.icen-table tbody tr.icen-row-warning { background: color-mix(in srgb, var(--icen-token-warning) 6%, transparent); }
|
|
223
|
+
.icen-table tbody tr.icen-row-error { background: color-mix(in srgb, var(--icen-token-error) 6%, transparent); }
|
|
192
224
|
|
|
193
|
-
/* ──
|
|
194
|
-
.table thead th {
|
|
195
|
-
box-shadow:
|
|
225
|
+
/* ── 粘滞表头提示:底部 1px 分隔已足够,不再叠阴影 ── */
|
|
226
|
+
.icen-table thead th {
|
|
227
|
+
box-shadow: none;
|
|
196
228
|
}
|
|
197
229
|
|
|
198
230
|
/* ── 表头分组(rowspan/colspan 样式) ── */
|
|
199
|
-
.table th[rowspan] { vertical-align: bottom; }
|
|
231
|
+
.icen-table th[rowspan] { vertical-align: bottom; }
|
|
200
232
|
|
|
201
233
|
@media (prefers-reduced-motion: reduce) {
|
|
202
|
-
.row-expand-content { animation: none; }
|
|
234
|
+
.icen-row-expand-content { animation: none; }
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* 高对比模式:选中行/语义行不能只靠底色差 */
|
|
238
|
+
@media (forced-colors: active) {
|
|
239
|
+
.icen-table tbody tr.is-selected {
|
|
240
|
+
background: Highlight;
|
|
241
|
+
color: HighlightText;
|
|
242
|
+
}
|
|
243
|
+
.icen-table tbody tr.is-selected :is(td, th) { color: HighlightText; }
|
|
244
|
+
.icen-table tbody tr.icen-row-success,
|
|
245
|
+
.icen-table tbody tr.icen-row-warning,
|
|
246
|
+
.icen-table tbody tr.icen-row-error { border-inline-start: 2px solid CanvasText; }
|
|
247
|
+
}
|
|
248
|
+
|
|
203
249
|
}
|