soma-kit 0.1.12 → 0.1.14
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/README.md +5 -4
- package/bin/soma-kit.mjs +31 -1
- package/bin/soma.mjs +0 -0
- package/package.json +5 -4
- package/spec/generated/kit-app.schema.json +172 -4
- package/spec/generated/kit-page.schema.json +164 -5
- package/spec/kit-grammar.json +598 -96
- package/spec/kit-grammar.schema.json +12 -6
- package/src/app/app-config.ts +92 -8
- package/src/app/component-gate.ts +271 -13
- package/src/app/define-kit-app.ts +2 -2
- package/src/app/define-kit-view.ts +9 -5
- package/src/app/dev-diagnostic.ts +5 -0
- package/src/app/index.ts +29 -5
- package/src/app/kit-view-context.ts +181 -15
- package/src/app/render-ports.ts +18 -0
- package/src/app/server-pages.ts +8 -2
- package/src/app/server.ts +55 -8
- package/src/app/theme-runtime.ts +4 -0
- package/src/base/action-busy.ts +101 -4
- package/src/base/action-slots.ts +13 -2
- package/src/base/anchored-layer.ts +50 -0
- package/src/base/button.ts +62 -15
- package/src/base/check-core.ts +8 -0
- package/src/base/checkbox.ts +2 -1
- package/src/base/choice.ts +21 -2
- package/src/base/color-picker.ts +10 -5
- package/src/base/command-palette.ts +1 -1
- package/src/base/context-menu.ts +10 -7
- package/src/base/date-range.ts +7 -7
- package/src/base/date.ts +55 -16
- package/src/base/delta.ts +72 -0
- package/src/base/end-edge.ts +61 -0
- package/src/base/fab.ts +1 -1
- package/src/base/gap-value.ts +168 -0
- package/src/base/hint-tips.ts +170 -0
- package/src/base/icons.ts +8 -0
- package/src/base/illustrations.ts +95 -0
- package/src/base/index.ts +32 -9
- package/src/base/listbox-core.ts +6 -5
- package/src/base/loading-gate.ts +140 -87
- package/src/base/mentions.ts +2 -1
- package/src/base/menu-button.ts +16 -18
- package/src/base/menu-core.ts +37 -8
- package/src/base/motion/hover-3d.ts +1 -1
- package/src/base/motion/marquee.ts +1 -1
- package/src/base/otp.ts +5 -4
- package/src/base/overlay-runtime.ts +235 -0
- package/src/base/popover.ts +10 -9
- package/src/base/popup.ts +67 -8
- package/src/base/portal-core.ts +4 -0
- package/src/base/qty-stepper.ts +5 -5
- package/src/base/radio.ts +2 -1
- package/src/base/range.ts +19 -2
- package/src/base/rating.ts +11 -6
- package/src/base/reason-tip.ts +150 -0
- package/src/base/segmented.ts +36 -24
- package/src/base/shared.ts +180 -36
- package/src/base/state-panel.ts +367 -0
- package/src/base/status-tone.ts +27 -0
- package/src/base/sticky-edge.ts +116 -0
- package/src/base/swap.ts +6 -6
- package/src/base/switch.ts +10 -5
- package/src/base/tag-input.ts +6 -6
- package/src/base/tag.ts +76 -41
- package/src/base/text.ts +43 -14
- package/src/base/time-picker.ts +7 -5
- package/src/base/tree-select.ts +6 -4
- package/src/base/trend-tone.ts +9 -0
- package/src/base/upload.ts +15 -9
- package/src/base/view-transition.ts +77 -0
- package/src/biz/approval-desk/shell.ts +15 -11
- package/src/biz/auth-panel/shell.ts +9 -7
- package/src/biz/category-crud/compile.ts +5 -4
- package/src/biz/category-crud/shell.ts +5 -3
- package/src/biz/checkout-page/compile.ts +2 -1
- package/src/biz/checkout-page/shell.ts +10 -8
- package/src/biz/compose.ts +2 -2
- package/src/biz/data-components.ts +4 -0
- package/src/biz/import-wizard/shell.ts +13 -10
- package/src/biz/landing-page/shell.ts +2 -2
- package/src/biz/link/hub.ts +23 -5
- package/src/biz/link/shared.ts +23 -12
- package/src/biz/master-sub/compile.ts +207 -16
- package/src/biz/master-sub/detail-head.ts +61 -0
- package/src/biz/master-sub/index.ts +7 -3
- package/src/biz/master-sub/shell.ts +133 -24
- package/src/biz/multi-board/compile.ts +167 -9
- package/src/biz/multi-board/composition.ts +58 -0
- package/src/biz/multi-board/index.ts +1 -1
- package/src/biz/multi-board/prose-fold.ts +143 -0
- package/src/biz/multi-board/shell.ts +94 -23
- package/src/biz/notification-center/shell.ts +10 -7
- package/src/biz/page-templates/domain-templates.ts +2 -2
- package/src/biz/page-templates/result-page/shell.ts +4 -3
- package/src/biz/page-templates/sign-in-page/shell.ts +16 -16
- package/src/biz/record-detail/compile.ts +2 -2
- package/src/biz/record-detail/shell.ts +13 -10
- package/src/biz/settings-center/compile.ts +2 -1
- package/src/biz/settings-center/shell.ts +12 -9
- package/src/biz/shared/action-host.ts +6 -0
- package/src/biz/shared/compile-helpers.ts +97 -0
- package/src/biz/shared/coordinator.ts +7 -30
- package/src/biz/shared/index.ts +5 -0
- package/src/biz/shared/object-aliases.ts +154 -0
- package/src/biz/shared/overlay-compile.ts +281 -0
- package/src/biz/shared/overlay-shell.ts +142 -11
- package/src/biz/shared/pipes.ts +11 -5
- package/src/biz/shared/remove-wire.ts +4 -19
- package/src/biz/shared/runtime-hub.ts +10 -0
- package/src/biz/single-form/compile.ts +3 -2
- package/src/biz/single-form/shell.ts +9 -6
- package/src/biz/standard-crud/compile.ts +36 -161
- package/src/biz/standard-crud/shell.ts +23 -60
- package/src/biz/standard-crud/summary.ts +40 -0
- package/src/biz/step-form/shell.ts +15 -13
- package/src/biz/types.ts +6 -1
- package/src/cli/kit-cli.ts +138 -13
- package/src/cli/kit-init.ts +6 -1
- package/src/cli/layout-cli.ts +167 -0
- package/src/cli/migrate/index.ts +10 -0
- package/src/cli/migrate/migrate.ts +248 -0
- package/src/cli/migrate/text-utils.ts +306 -0
- package/src/cli/migrate/theme-map.ts +104 -0
- package/src/cli/migrate/ts-rules.ts +235 -0
- package/src/cli/migrate/types.ts +95 -0
- package/src/cli/migrate/view-skeleton.ts +159 -0
- package/src/cli/migrate/yaml-report.ts +376 -0
- package/src/cli/migrate/yaml-rules.ts +465 -0
- package/src/cli/view-writes.ts +69 -60
- package/src/compile/access-gate-attach.ts +27 -0
- package/src/compile/closed-set.ts +65 -4
- package/src/compile/compile-page.ts +66 -11
- package/src/compile/component-candidates.ts +14 -1
- package/src/compile/fragment.ts +11 -0
- package/src/compile/layout-lint/engine.ts +82 -0
- package/src/compile/layout-lint/index.ts +55 -0
- package/src/compile/layout-lint/rules-composition.ts +267 -0
- package/src/compile/layout-lint/rules-form.ts +191 -0
- package/src/compile/layout-lint/rules-table.ts +278 -0
- package/src/compile/layout-lint/score.ts +52 -0
- package/src/compile/layout-lint/types.ts +51 -0
- package/src/compile/page-composition.ts +189 -0
- package/src/compile/parse.ts +4 -0
- package/src/compile/producer-fingerprint.ts +56 -0
- package/src/compile/remove-guard.ts +10 -7
- package/src/compile/styles.ts +46 -8
- package/src/compile/types.ts +16 -2
- package/src/compile/view-check.ts +149 -16
- package/src/data/access-gate.ts +112 -0
- package/src/data/amount-breakdown.ts +9 -2
- package/src/data/approval-flow.ts +5 -2
- package/src/data/assignment-picker.ts +59 -28
- package/src/data/async-result-panel.ts +49 -3
- package/src/data/breadcrumbs.ts +3 -2
- package/src/data/calendar.ts +8 -3
- package/src/data/carousel.ts +10 -6
- package/src/data/chart.ts +744 -46
- package/src/data/checklist.ts +22 -6
- package/src/data/code-view.ts +8 -4
- package/src/data/comment-thread.ts +3 -2
- package/src/data/confirm-dialog.ts +72 -25
- package/src/data/context-menu.ts +3 -3
- package/src/data/dock.ts +1 -1
- package/src/data/embed.ts +231 -29
- package/src/data/field-mapper.ts +7 -4
- package/src/data/flow-editor-contract.ts +7 -0
- package/src/data/flow-editor.ts +26 -9
- package/src/data/flow-node-options.ts +33 -3
- package/src/data/footer.ts +2 -0
- package/src/data/gantt.ts +192 -27
- package/src/data/hero.ts +4 -1
- package/src/data/image-viewer.ts +7 -4
- package/src/data/index.ts +16 -4
- package/src/data/item-list.ts +27 -12
- package/src/data/kanban.ts +41 -10
- package/src/data/matrix.ts +391 -0
- package/src/data/media-grid.ts +6 -1
- package/src/data/mega-menu.ts +6 -4
- package/src/data/menu-dom.ts +4 -2
- package/src/data/menu.ts +60 -16
- package/src/data/mockup.ts +5 -1
- package/src/data/modal-dialog.ts +146 -26
- package/src/data/navbar.ts +8 -6
- package/src/data/notice-list.ts +301 -0
- package/src/data/notify-renderer.ts +21 -6
- package/src/data/object-form.ts +409 -87
- package/src/data/outcome-watch.ts +61 -2
- package/src/data/pager.ts +19 -8
- package/src/data/panel-head.ts +406 -0
- package/src/data/permission-matrix.ts +36 -11
- package/src/data/permission-tree.ts +52 -23
- package/src/data/pricing-table.ts +22 -11
- package/src/data/prompt-dialog.ts +165 -0
- package/src/data/reaction-bar.ts +6 -4
- package/src/data/record-card.ts +40 -7
- package/src/data/record-picker.ts +13 -7
- package/src/data/resident.ts +8 -0
- package/src/data/result-panel.ts +4 -2
- package/src/data/rich-text.ts +17 -1
- package/src/data/row-editor.ts +77 -24
- package/src/data/rule-builder.ts +14 -9
- package/src/data/shape-util.ts +27 -12
- package/src/data/stat-group.ts +459 -74
- package/src/data/static-lazy.ts +5 -0
- package/src/data/static-registry.ts +8 -0
- package/src/data/steps.ts +8 -3
- package/src/data/survey.ts +7 -4
- package/src/data/system-switcher.ts +3 -2
- package/src/data/text-action-button.ts +17 -0
- package/src/data/timeline.ts +17 -6
- package/src/data/tour-guide.ts +3 -2
- package/src/data/transfer.ts +40 -16
- package/src/data/tree-table.ts +65 -37
- package/src/data/tree.ts +22 -2
- package/src/data/virtual-rows.ts +21 -11
- package/src/data/wrapped-candidates.ts +32 -1
- package/src/frames/index.ts +1 -0
- package/src/frames/list-summary.ts +100 -0
- package/src/frames/page-bar.ts +7 -14
- package/src/frames/page-status.ts +7 -5
- package/src/frames/shared.ts +34 -13
- package/src/frames/split-frame/shell.ts +1 -1
- package/src/frames/tabs-frame/shell.ts +9 -6
- package/src/frames/tabs-frame/wiring.ts +1 -0
- package/src/frames/top-main-frame.ts +3 -3
- package/src/frames/types.ts +3 -1
- package/src/frames/workspace-frame/extras.ts +1 -1
- package/src/frames/workspace-frame/shell.ts +4 -4
- package/src/frames/workspace-frame/tab-scroll.ts +28 -0
- package/src/frames/workspace-frame/view.ts +168 -44
- package/src/generated/kit-grammar-runtime.ts +390 -59
- package/src/i18n/kit-text.ts +90 -4
- package/src/i18n/resolve-text-refs.ts +22 -6
- package/src/object-renderer/action-group.ts +139 -0
- package/src/object-renderer/action-more.ts +144 -0
- package/src/object-renderer/arrange.ts +71 -7
- package/src/object-renderer/candidates.ts +4 -0
- package/src/object-renderer/collection-parts.ts +264 -62
- package/src/object-renderer/collection-table.ts +177 -5
- package/src/object-renderer/collection.ts +188 -37
- package/src/object-renderer/compile-data.ts +28 -3
- package/src/object-renderer/defaults.ts +27 -2
- package/src/object-renderer/display-checks.ts +1 -1
- package/src/object-renderer/emit-events.ts +43 -9
- package/src/object-renderer/emit-object.ts +4 -0
- package/src/object-renderer/emit-static.ts +434 -41
- package/src/object-renderer/filter-plan.ts +84 -0
- package/src/object-renderer/form-detail.ts +1 -2
- package/src/object-renderer/form-notify.ts +45 -0
- package/src/object-renderer/index.ts +5 -0
- package/src/object-renderer/layout-facts.ts +394 -0
- package/src/object-renderer/layout-plan.ts +225 -0
- package/src/object-renderer/layout-plan.types.ts +59 -0
- package/src/object-renderer/parts.ts +6 -7
- package/src/object-renderer/render-object.ts +107 -46
- package/src/object-renderer/request-actions.ts +4 -2
- package/src/object-renderer/skeleton.ts +58 -19
- package/src/object-renderer/table-actions.ts +172 -32
- package/src/object-renderer/table-gap.ts +37 -0
- package/src/object-renderer/table-tools.ts +62 -30
- package/src/object-renderer/types.ts +84 -13
- package/src/object-renderer/view-binding.ts +205 -8
- package/src/page-target/intent-schema.ts +11 -0
- package/src/page-target/target.ts +5 -1
- package/src/recipes/container.ts +77 -1
- package/src/recipes/control.ts +76 -116
- package/src/recipes/emphasis.ts +56 -0
- package/src/recipes/frame-bleed.ts +33 -0
- package/src/recipes/index.ts +72 -0
- package/src/recipes/nowrap.ts +16 -0
- package/src/recipes/overlay.ts +120 -17
- package/src/recipes/placeholder.ts +95 -0
- package/src/recipes/rail-grid.ts +48 -0
- package/src/recipes/slot-align.ts +56 -0
- package/src/recipes/stat-state.ts +65 -0
- package/src/recipes/state.ts +40 -21
- package/src/recipes/status.ts +147 -0
- package/src/recipes/surface-edge.ts +16 -0
- package/src/recipes/surface.ts +40 -0
- package/src/recipes/table-gap.ts +80 -0
- package/src/recipes/table-native-edit.ts +242 -0
- package/src/recipes/table-row.ts +146 -3
- package/src/recipes/tabs.ts +49 -0
- package/src/recipes/title-row.ts +37 -0
- package/src/recipes/typography.ts +30 -37
- package/src/shared/confirm-decl.ts +118 -0
- package/src/shared/envelope.ts +2 -2
- package/src/shared/paged-list-adapter.ts +15 -240
- package/src/shared/theme-runtime-shared.ts +6 -1
- package/src/theme/index.ts +1 -0
- package/src/theme/kit-theme-text.ts +1 -1
- package/src/theme/kit-theme.css +384 -13
- package/src/theme/kit-theme.tpl +384 -13
- package/src/theme/nine-dim-structure.ts +244 -7
- package/src/theme/surface-layers.ts +10 -1
- package/src/theme/theme-tokens.ts +63 -16
- package/src/theme/theme-types.ts +32 -0
- package/src/theme/typography.ts +21 -17
- package/src/biz/shared/remove-key.ts +0 -6
package/src/theme/kit-theme.css
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
@theme inline {
|
|
10
10
|
--color-surface: var(--soma-surface-base);
|
|
11
11
|
--color-surface-sunken: var(--soma-surface-sunken);
|
|
12
|
+
/* 下沉带(R04):表头 / 筛选带 / 统计带;亮色介于画布与面板之间,暗色比面板更亮 */
|
|
13
|
+
--color-surface-band: var(--soma-surface-band);
|
|
12
14
|
--color-surface-raised: var(--soma-surface-raised);
|
|
15
|
+
/* 四级表面(美化方案 A):float = 浮起(菜单 / 气泡)、overlay = 浮层(对话框 / 抽屉);毛玻璃档下带 alpha,不支持 backdrop-filter 时换不透明回退(-live 令牌由结构 CSS 的 @supports not 块写入) */
|
|
16
|
+
--color-surface-float: var(--soma-surface-float-live, var(--soma-surface-float));
|
|
17
|
+
--color-surface-overlay: var(--soma-surface-overlay-live, var(--soma-surface-overlay));
|
|
13
18
|
/* 遮罩幕:亮暗各一档的深色 + 内含透明度(design surface#/scrim),类名 bg-scrim 不再叠 /N 透明度 */
|
|
14
19
|
--color-scrim: var(--soma-overlay-bg);
|
|
15
20
|
|
|
@@ -21,10 +26,15 @@
|
|
|
21
26
|
--color-border-strong: var(--soma-border-strong);
|
|
22
27
|
--color-border-subtle: var(--soma-border-hairline);
|
|
23
28
|
--color-border-divider: var(--soma-border-divider);
|
|
29
|
+
/* 容器边界色:随九维「边界」维度求解(无边框档 transparent,其余档发丝边),div / button 型壳也跟着边界走,不再写死 border-strong */
|
|
30
|
+
--color-border-container: var(--soma-container-border-color, var(--soma-border-hairline));
|
|
24
31
|
--color-subtle: var(--soma-border-hairline);
|
|
25
32
|
--color-divider: var(--soma-border-divider);
|
|
26
|
-
--color-input: color-mix(in oklab, var(--soma-border-control)
|
|
33
|
+
--color-input: color-mix(in oklab, var(--soma-border-control) 80%, var(--soma-surface-base));
|
|
27
34
|
--color-input-hover: var(--soma-border-control);
|
|
35
|
+
/* 带文字标签的中性按钮描边(J7):随九维「边界」维度求解(无边框 / 色块档弱描边,其余档 = 输入框实际渲染边框同一算式);回落值 = 有边框档的取值。输入框 / 选择框仍用 input,不用这两个 */
|
|
36
|
+
--color-button-edge: var(--soma-button-border-color, color-mix(in oklab, var(--soma-border-control) 80%, var(--soma-surface-base)));
|
|
37
|
+
--color-button-edge-hover: var(--soma-button-border-hover-color, var(--soma-border-control));
|
|
28
38
|
|
|
29
39
|
--color-primary: var(--soma-c-primary);
|
|
30
40
|
--color-primary-fg: var(--soma-c-primary-fg);
|
|
@@ -60,7 +70,19 @@
|
|
|
60
70
|
--spacing: var(--soma-space-1);
|
|
61
71
|
--spacing-card: var(--soma-card-padding);
|
|
62
72
|
--spacing-section: var(--soma-section-gap);
|
|
73
|
+
/* 区块间距角色档(真源 structure.spacingRoles):gap-cluster / gap-region / gap-stack、p-inset-tight / -compact / -roomy。
|
|
74
|
+
区块档叫 region 而不叫 block:Tailwind 的 inline-<间距键> 是 inline-size 工具类,键叫 block 会生成 .inline-block { inline-size: … },
|
|
75
|
+
与 display 工具类 inline-block 同名,让所有 inline-block 元素被量成一个区块间距宽(动作组「更多」触发钮越界、格子只剩一个字,案例 33) */
|
|
76
|
+
--spacing-cluster: var(--soma-cluster-gap);
|
|
77
|
+
--spacing-region: var(--soma-block-gap);
|
|
78
|
+
--spacing-stack: var(--soma-stack-gap);
|
|
79
|
+
--spacing-inset-tight: var(--soma-inset-tight);
|
|
80
|
+
--spacing-inset-compact: var(--soma-inset-compact);
|
|
81
|
+
--spacing-inset-roomy: var(--soma-inset-roomy);
|
|
63
82
|
--spacing-table-row: var(--soma-table-row-height);
|
|
83
|
+
/* 页边距(真源 density.pageMarginPx,随密度)与标题到首块间距(真源 structure.titleToBlockGapUnits):外壳画布 p-page、页头 mb-title-block 读它们 */
|
|
84
|
+
--spacing-page: var(--soma-page-margin, 24px);
|
|
85
|
+
--spacing-title-block: var(--soma-title-block-gap, 16px);
|
|
64
86
|
|
|
65
87
|
--radius-sm: var(--soma-radius-sm);
|
|
66
88
|
--radius-md: var(--soma-radius-md);
|
|
@@ -103,19 +125,36 @@
|
|
|
103
125
|
|
|
104
126
|
--font-sans: var(--soma-font-family);
|
|
105
127
|
--font-mono: var(--soma-font-family-mono);
|
|
128
|
+
--font-heading: var(--soma-font-family-heading);
|
|
129
|
+
--font-data: var(--soma-font-family-data);
|
|
106
130
|
|
|
107
131
|
--shadow-xs: var(--soma-shadow-step-0);
|
|
108
132
|
--shadow-sm: var(--soma-shadow-step-1);
|
|
109
133
|
--shadow-md: var(--soma-shadow-step-2);
|
|
110
|
-
|
|
111
|
-
--shadow-
|
|
134
|
+
/* 双层阴影(真源 structure.elevation,令牌由 foundation 按亮暗写出):raised = 浮起(菜单 / 气泡),overlay = 浮层(对话框 / 抽屉);shadow-lg = raised、shadow-xl = overlay,只有这一个来源(旧三层影与 --soma-overlay-shadow-far 已删除) */
|
|
135
|
+
--shadow-raised: var(--soma-elevation-raised, var(--soma-shadow-popover));
|
|
136
|
+
--shadow-overlay: var(--soma-elevation-overlay, var(--soma-shadow-dialog));
|
|
137
|
+
--shadow-lg: var(--soma-elevation-raised, var(--soma-shadow-popover));
|
|
138
|
+
--shadow-xl: var(--soma-elevation-overlay, var(--soma-shadow-dialog));
|
|
139
|
+
/* 焦点外晕(装饰,不判对比度):与实心环(ring-1 / ring-2)同用,半径 = 环宽 + 外晕宽,令牌由结构 CSS 按真源 structure.focusRing / stateLayer 写出 */
|
|
140
|
+
--shadow-focus-halo: 0 0 0 var(--soma-focus-halo-control-spread, 0px) var(--soma-focus-halo-color, transparent);
|
|
141
|
+
--shadow-focus-halo-button: 0 0 0 var(--soma-focus-halo-button-spread, 0px) var(--soma-focus-halo-color, transparent);
|
|
142
|
+
|
|
143
|
+
/* 统一状态层:悬停 / 按下 = 墨色叠加、选中 = 主色叠加,百分比读真源 structure.stateLayer(令牌由结构 CSS 写出,亮暗自适应);tonal-* 是柔和主色底上的同阶叠加 */
|
|
144
|
+
--color-state-layer-hover: var(--soma-state-layer-hover, transparent);
|
|
145
|
+
--color-state-layer-press: var(--soma-state-layer-press, transparent);
|
|
146
|
+
--color-state-layer-row-hover: var(--soma-state-layer-row-hover, transparent);
|
|
147
|
+
--color-state-layer-selected: var(--soma-state-layer-selected, transparent);
|
|
148
|
+
--color-state-layer-tonal-hover: var(--soma-state-layer-tonal-hover, var(--soma-c-primary-soft));
|
|
149
|
+
--color-state-layer-tonal-press: var(--soma-state-layer-tonal-press, var(--soma-c-primary-soft));
|
|
112
150
|
|
|
113
151
|
--ease-standard: var(--soma-motion-easing-standard);
|
|
114
152
|
--ease-enter: var(--soma-motion-easing-enter);
|
|
115
153
|
--ease-exit: var(--soma-motion-easing-exit);
|
|
116
154
|
--ease-emphasized: var(--soma-motion-spring-emphasized-easing);
|
|
117
155
|
|
|
118
|
-
|
|
156
|
+
/* 悬停 / 颜色类过渡取 design 动效阶梯的 hover 档(100ms 反馈类),不再取 base(200ms);位移 / 展开 / 入场类各用自己的意图令牌 */
|
|
157
|
+
--default-transition-duration: var(--soma-motion-duration-hover);
|
|
119
158
|
--default-transition-timing-function: var(--soma-motion-easing-standard);
|
|
120
159
|
|
|
121
160
|
--container-xs: 20rem;
|
|
@@ -153,6 +192,35 @@
|
|
|
153
192
|
transition-timing-function: var(--soma-motion-spring-emphasized-easing);
|
|
154
193
|
}
|
|
155
194
|
|
|
195
|
+
/*
|
|
196
|
+
* 按下反馈:按钮配方(primary / neutral / danger / ghost / tonal)统一带 press-feedback,按下时微缩(--soma-lift-press = scale(design motion.json#lift.pressScale));
|
|
197
|
+
* 只在 prefers-reduced-motion: no-preference 下生效(减少动效下令牌同时被 design reducedMotion 归 none);禁用的按钮不缩。
|
|
198
|
+
*/
|
|
199
|
+
@utility press-feedback {
|
|
200
|
+
transition-property: color, background-color, border-color, box-shadow, transform;
|
|
201
|
+
|
|
202
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
203
|
+
&:active:not(:disabled, [aria-disabled='true']) {
|
|
204
|
+
transform: var(--soma-lift-press, none);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/*
|
|
210
|
+
* 状态层叠加(用于自带实底的控件,如白底描边按钮):悬停 / 按下把统一状态层(--soma-state-layer-hover / -press,真源 structure.stateLayer)
|
|
211
|
+
* 以 background-image 单色渐变叠在自己的底色之上——底色不换、只叠一层半透明墨色,所以悬停 8% 与按下 12% 各自可辨;
|
|
212
|
+
* 没有自带底色的控件(幽灵钮 / 菜单项 / 表格行)直接用 bg-state-layer-* 类。禁用的不响应。
|
|
213
|
+
*/
|
|
214
|
+
@utility state-layer {
|
|
215
|
+
&:hover:not(:disabled, [aria-disabled='true']) {
|
|
216
|
+
background-image: linear-gradient(var(--soma-state-layer-hover, transparent), var(--soma-state-layer-hover, transparent));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&:active:not(:disabled, [aria-disabled='true']) {
|
|
220
|
+
background-image: linear-gradient(var(--soma-state-layer-press, transparent), var(--soma-state-layer-press, transparent));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
156
224
|
@utility autofill-clear {
|
|
157
225
|
&:-webkit-autofill,
|
|
158
226
|
&:-webkit-autofill:hover,
|
|
@@ -185,20 +253,179 @@
|
|
|
185
253
|
}
|
|
186
254
|
}
|
|
187
255
|
|
|
188
|
-
/*
|
|
256
|
+
/*
|
|
257
|
+
* 成排紧邻的小目标(轮播圆点、评分星):hit-area 的变体,沿排列方向的热区宽度 = min(最小命中边长, 中心距),
|
|
258
|
+
* 中心距 = 目标自身宽(100%)+ 排间距(--kit-hit-gap,由排容器的 hit-gap-N 写出,与该容器的 gap 同值同源),
|
|
259
|
+
* 相邻热区恰好相接、不重叠;垂直方向仍是完整的最小命中边长(精细 24 / 粗指针 44)。无 --kit-hit-gap 时退回 hit-area 的行为(上限取 100vw)。
|
|
260
|
+
* 左右对称(居中扩出),RTL 无差别。
|
|
261
|
+
*/
|
|
262
|
+
@utility hit-area-row {
|
|
263
|
+
position: relative;
|
|
264
|
+
|
|
265
|
+
&::after {
|
|
266
|
+
content: '';
|
|
267
|
+
position: absolute;
|
|
268
|
+
top: 50%;
|
|
269
|
+
left: 50%;
|
|
270
|
+
width: min(max(100%, 1.5rem), calc(100% + var(--kit-hit-gap, 100vw)));
|
|
271
|
+
height: max(100%, 1.5rem);
|
|
272
|
+
transform: translate(-50%, -50%);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (pointer: coarse) {
|
|
276
|
+
&::after {
|
|
277
|
+
width: min(max(100%, 2.75rem), calc(100% + var(--kit-hit-gap, 100vw)));
|
|
278
|
+
height: max(100%, 2.75rem);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* 成排小目标的排容器:gap 与 --kit-hit-gap 同值(间距步数 N 乘 --spacing,随密度同比缩放),供 hit-area-row 求中心距 */
|
|
284
|
+
@utility hit-gap-* {
|
|
285
|
+
gap: calc(var(--spacing) * --value(number));
|
|
286
|
+
--kit-hit-gap: calc(var(--spacing) * --value(number));
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/*
|
|
290
|
+
* 对话框 / 抽屉入场:显隐由 core 切 hidden 属性(display:none → 显示),CSS 动画每次打开自动重播,无需脚本;
|
|
291
|
+
* 时长与缓动取进入动效令牌(减少动效档令牌自动归短 / linear),使用处一律 motion-safe: 前缀;
|
|
292
|
+
* 遮罩淡入复用 kit-fade;入场在本组,退场关键帧在下一段(data-kit-leaving)。
|
|
293
|
+
* 抽屉的 end / start 两向:end 侧(右)从 +100% 滑入,start 侧(左)从 -100% 滑入,RTL 下由 rtl: 变体换向。
|
|
294
|
+
*/
|
|
189
295
|
@theme inline {
|
|
190
|
-
--animate-kit-
|
|
296
|
+
--animate-kit-dialog-in: kit-dialog-in var(--soma-motion-intent-dialog-enter-duration, var(--soma-motion-duration-enter)) var(--soma-motion-easing-enter);
|
|
297
|
+
--animate-kit-drawer-in-end: kit-drawer-in-end var(--soma-motion-intent-drawer-enter-duration, var(--soma-motion-duration-enter)) var(--soma-motion-easing-enter);
|
|
298
|
+
--animate-kit-drawer-in-start: kit-drawer-in-start var(--soma-motion-intent-drawer-enter-duration, var(--soma-motion-duration-enter)) var(--soma-motion-easing-enter);
|
|
191
299
|
|
|
192
|
-
@keyframes kit-
|
|
300
|
+
@keyframes kit-dialog-in {
|
|
193
301
|
from {
|
|
194
302
|
opacity: 0;
|
|
195
|
-
transform:
|
|
303
|
+
transform: scale(0.96);
|
|
196
304
|
}
|
|
197
305
|
to {
|
|
198
306
|
opacity: 1;
|
|
199
|
-
transform:
|
|
307
|
+
transform: scale(1);
|
|
200
308
|
}
|
|
201
309
|
}
|
|
310
|
+
|
|
311
|
+
@keyframes kit-drawer-in-end {
|
|
312
|
+
from {
|
|
313
|
+
transform: translateX(100%);
|
|
314
|
+
}
|
|
315
|
+
to {
|
|
316
|
+
transform: translateX(0);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@keyframes kit-drawer-in-start {
|
|
321
|
+
from {
|
|
322
|
+
transform: translateX(-100%);
|
|
323
|
+
}
|
|
324
|
+
to {
|
|
325
|
+
transform: translateX(0);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/*
|
|
331
|
+
* 浮层退场(data-kit-leaving,由 base/overlay-runtime 的隐藏前过渡钩子 / 命令式模态 / 通知 / 外壳遮罩在关闭时标上):
|
|
332
|
+
* 无偏好时是位移 / 缩放 + 淡出,减弱动效时只剩淡出(见下方 reduce 段),两档都有关键帧;没有关键帧(动画名没变)时运行期立即收尾,不延迟;
|
|
333
|
+
* 时长取意图退出令牌(dialog / drawer / toast,exit = 进入时长 × 真源 exitRatio),缓动取 --soma-motion-easing-exit;
|
|
334
|
+
* 遮罩淡出、对话框缩放淡出、抽屉朝所在侧滑出(RTL 换向)、通知淡出、外壳遮罩淡出。
|
|
335
|
+
* 写成无层级规则:压过 utilities 层里入场动画类(motion-safe:animate-kit-*-in),同一元素退场时换成退场动画。
|
|
336
|
+
*/
|
|
337
|
+
@keyframes kit-fade-out {
|
|
338
|
+
from {
|
|
339
|
+
opacity: 1;
|
|
340
|
+
}
|
|
341
|
+
to {
|
|
342
|
+
opacity: 0;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@keyframes kit-fade-in {
|
|
347
|
+
from {
|
|
348
|
+
opacity: 0;
|
|
349
|
+
}
|
|
350
|
+
to {
|
|
351
|
+
opacity: 1;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@keyframes kit-dialog-out {
|
|
356
|
+
from {
|
|
357
|
+
opacity: 1;
|
|
358
|
+
transform: scale(1);
|
|
359
|
+
}
|
|
360
|
+
to {
|
|
361
|
+
opacity: 0;
|
|
362
|
+
transform: scale(0.96);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
@keyframes kit-drawer-out-end {
|
|
367
|
+
from {
|
|
368
|
+
transform: translateX(0);
|
|
369
|
+
}
|
|
370
|
+
to {
|
|
371
|
+
transform: translateX(100%);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
@keyframes kit-drawer-out-start {
|
|
376
|
+
from {
|
|
377
|
+
transform: translateX(0);
|
|
378
|
+
}
|
|
379
|
+
to {
|
|
380
|
+
transform: translateX(-100%);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
385
|
+
[data-kit-scrim][data-kit-leaving],
|
|
386
|
+
[data-kit-leaving] > [data-kit-scrim],
|
|
387
|
+
[data-kit-workspace-scrim][data-kit-leaving] {
|
|
388
|
+
animation: kit-fade-out var(--soma-motion-intent-dialog-exit-duration, var(--soma-motion-duration-exit)) var(--soma-motion-easing-exit) both;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[data-kit-leaving] [role='dialog'] {
|
|
392
|
+
animation: kit-dialog-out var(--soma-motion-intent-dialog-exit-duration, var(--soma-motion-duration-exit)) var(--soma-motion-easing-exit) both;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
[data-kit-leaving] [data-kit-part='drawer'] {
|
|
396
|
+
animation: kit-drawer-out-end var(--soma-motion-intent-drawer-exit-duration, var(--soma-motion-duration-exit)) var(--soma-motion-easing-exit) both;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
[data-kit-leaving] [data-kit-part='drawer']:dir(rtl) {
|
|
400
|
+
animation-name: kit-drawer-out-start;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[data-kit-leaving][data-kit-part='toast'] {
|
|
404
|
+
animation: kit-fade-out var(--soma-motion-intent-toast-exit-duration, var(--soma-motion-duration-exit)) var(--soma-motion-easing-exit) both;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/*
|
|
409
|
+
* 减弱动效(prefers-reduced-motion: reduce):不全局压零——退场保留淡出,只去掉位移 / 缩放(对话框、抽屉、通知、遮罩一律纯淡出),
|
|
410
|
+
* 时长取同一组意图退出令牌(减少动效档由 design reducedMotion 归短 / linear);入场同理保留淡入(遮罩与面板同一条淡入)。
|
|
411
|
+
*/
|
|
412
|
+
@media (prefers-reduced-motion: reduce) {
|
|
413
|
+
[data-kit-scrim][data-kit-leaving],
|
|
414
|
+
[data-kit-leaving] > [data-kit-scrim],
|
|
415
|
+
[data-kit-workspace-scrim][data-kit-leaving],
|
|
416
|
+
[data-kit-leaving] [role='dialog'],
|
|
417
|
+
[data-kit-leaving] [data-kit-part='drawer'] {
|
|
418
|
+
animation: kit-fade-out var(--soma-motion-intent-dialog-exit-duration, var(--soma-motion-duration-exit)) var(--soma-motion-easing-exit) both;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
[data-kit-leaving][data-kit-part='toast'] {
|
|
422
|
+
animation: kit-fade-out var(--soma-motion-intent-toast-exit-duration, var(--soma-motion-duration-exit)) var(--soma-motion-easing-exit) both;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
[role='dialog']:not([data-kit-leaving] *),
|
|
426
|
+
[data-kit-part='drawer']:not([data-kit-leaving] *) {
|
|
427
|
+
animation: kit-fade-in var(--soma-motion-intent-dialog-enter-duration, var(--soma-motion-duration-enter)) var(--soma-motion-easing-enter) both;
|
|
428
|
+
}
|
|
202
429
|
}
|
|
203
430
|
|
|
204
431
|
/* 状态件(StatusDot 脉冲、ProgressBar 不确定态):使用处一律 motion-safe: 前缀,motion-reduce 下静止 */
|
|
@@ -284,8 +511,8 @@
|
|
|
284
511
|
|
|
285
512
|
/* 骨架屏(KitCollectionState 的 loading: skeleton):呼吸占位;使用处一律 motion-safe: 前缀,减少动效下静止 */
|
|
286
513
|
@theme inline {
|
|
287
|
-
--animate-kit-pulse: kit-pulse
|
|
288
|
-
--animate-spin: kit-spin
|
|
514
|
+
--animate-kit-pulse: kit-pulse var(--soma-motion-loop-skeleton) var(--soma-motion-easing-standard) infinite;
|
|
515
|
+
--animate-spin: kit-spin var(--soma-motion-loop-spinner) linear infinite;
|
|
289
516
|
|
|
290
517
|
@keyframes kit-spin {
|
|
291
518
|
to {
|
|
@@ -304,12 +531,156 @@
|
|
|
304
531
|
}
|
|
305
532
|
}
|
|
306
533
|
|
|
307
|
-
/* 高对比度模式(forced-colors: active):浏览器强制关闭 box-shadow 焦点环,统一保底使用系统
|
|
534
|
+
/* 高对比度模式(forced-colors: active):浏览器强制关闭 box-shadow 焦点环,统一保底使用系统 Highlight 实线轮廓(真源 contrast.json#/preferences/forcedColors/focusRing) */
|
|
308
535
|
@media (forced-colors: active) {
|
|
309
536
|
*:focus-visible,
|
|
310
537
|
[data-soma-component]:focus-within {
|
|
311
|
-
outline: 2px solid
|
|
538
|
+
outline: 2px solid Highlight !important;
|
|
312
539
|
outline-offset: 2px !important;
|
|
313
540
|
}
|
|
314
541
|
}
|
|
315
542
|
|
|
543
|
+
/* 门户展示档 begin */
|
|
544
|
+
/*
|
|
545
|
+
* 门户展示档 text-display(真源 structure.displayTier):门户 / 登录 / 结果 / 空状态欢迎这类页面框与结果页业务组件的主标题;
|
|
546
|
+
* 字号 40–48 按密度取、字重 600、字距 -0.02em、无单位行高、text-wrap: balance;字族取 --soma-font-family-display
|
|
547
|
+
* (缺省 = 标题栈,WARM_PAPER 预设用系统衬线)。汉字 / 日 / 韩字距归零(同标题规则)。工作台页面标题仍用 text-title-page(22)。
|
|
548
|
+
*/
|
|
549
|
+
@utility text-display {
|
|
550
|
+
font-family: var(--soma-font-family-display, var(--soma-font-family-heading));
|
|
551
|
+
font-size: var(--soma-display-size);
|
|
552
|
+
font-weight: var(--soma-display-weight);
|
|
553
|
+
letter-spacing: var(--soma-display-tracking);
|
|
554
|
+
line-height: var(--soma-display-leading);
|
|
555
|
+
text-wrap: balance;
|
|
556
|
+
|
|
557
|
+
&:lang(zh),
|
|
558
|
+
&:lang(ja),
|
|
559
|
+
&:lang(ko) {
|
|
560
|
+
letter-spacing: var(--soma-tracking-normal);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
/* 门户展示档 end */
|
|
564
|
+
|
|
565
|
+
/* 自适应与过渡 begin */
|
|
566
|
+
/*
|
|
567
|
+
* 自适应、页面过渡与加载反馈(均在 @layer 内)。
|
|
568
|
+
* 1) 区域容器查询:区域根(`@container` 类或 `data-kit-region`)同时命名为 kit-region,构件按「区域宽」而不是视口宽自适应;
|
|
569
|
+
* 窄界 = 行内动作窄档线(design type-presentation#/action/maxInline.narrowBelowTier,当前 2xl 档,与 utilityScales.container.rem.2xl 同值,测试对账)。
|
|
570
|
+
* 纯样式的窄档切换(显隐 / 堆叠)用 `data-kit-narrow-hide` / `data-kit-narrow-stack`,不再用 JS 观察宽度;
|
|
571
|
+
* 只有要改 DOM 结构(如行内动作并入「更多」)或要量宽(虚拟滚动、图表)的才保留 JS。
|
|
572
|
+
* 2) 页面过渡(View Transitions):只有带 data-kit-vt 的内容区命名为 kit-content 参与,外壳(根快照)不动;
|
|
573
|
+
* 退出 / 进入时长取动效令牌的退出 / 进入档(减弱动效档令牌自动变短;JS 侧减弱动效时根本不发起过渡)。
|
|
574
|
+
* 3) 加载指示延迟出现:加载面板带 --kit-loading-delay(读真源 structure.loadingFeedback.delayMs),延迟内 visibility 隐藏,到点淡入;语义属性(role / aria-busy)始终在。
|
|
575
|
+
*/
|
|
576
|
+
@layer components {
|
|
577
|
+
[data-kit-region],
|
|
578
|
+
.\@container {
|
|
579
|
+
container-name: kit-region;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
[data-kit-region] {
|
|
583
|
+
container-type: inline-size;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
@container kit-region (width < 48rem) {
|
|
587
|
+
[data-kit-narrow-hide] {
|
|
588
|
+
display: none;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
[data-kit-narrow-stack] {
|
|
592
|
+
flex-direction: column;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
[data-kit-vt] {
|
|
597
|
+
view-transition-name: kit-content;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
::view-transition-old(root),
|
|
601
|
+
::view-transition-new(root) {
|
|
602
|
+
animation: none;
|
|
603
|
+
mix-blend-mode: normal;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
::view-transition-old(kit-content) {
|
|
607
|
+
animation: kit-fade-out var(--soma-motion-duration-exit) var(--soma-motion-easing-exit) both;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
::view-transition-new(kit-content) {
|
|
611
|
+
animation: kit-fade-in var(--soma-motion-duration-enter) var(--soma-motion-easing-enter) both;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
@keyframes kit-loading-reveal {
|
|
615
|
+
from {
|
|
616
|
+
opacity: 0;
|
|
617
|
+
visibility: hidden;
|
|
618
|
+
}
|
|
619
|
+
to {
|
|
620
|
+
opacity: 1;
|
|
621
|
+
visibility: visible;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
[data-kit-state='loading'] {
|
|
626
|
+
animation: kit-loading-reveal 0s linear var(--kit-loading-delay, 0ms) both;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
/* 自适应与过渡 end */
|
|
630
|
+
|
|
631
|
+
/* 材质与表面 begin */
|
|
632
|
+
/*
|
|
633
|
+
* 高光边 edge-highlight(美化方案 A):面板 / 浮层顶部 1px 内高光,令牌 --soma-edge-highlight 与宽度 --soma-edge-highlight-width 取真源 structure.edgeHighlight(亮暗各一份)。
|
|
634
|
+
* 写进 Tailwind 的内阴影槽 --tw-inset-shadow,并按 shadow-* 同一序列合成 box-shadow:与外描边(border)、外阴影(shadow-raised / shadow-overlay / shadow-*)叠加而不互相替换,
|
|
635
|
+
* 单独使用也生效;LAYERED_SOFT / GLASS_CHROME 之外的质感档令牌 --soma-texture-edge-highlight 为中性值,本类仍按令牌取色(调用方按质感决定要不要带,面板与浮层的默认值由结构 CSS 经容器阴影令牌给出)。
|
|
636
|
+
*/
|
|
637
|
+
@utility edge-highlight {
|
|
638
|
+
--tw-inset-shadow: inset 0 var(--soma-edge-highlight-width, 1px) 0 0 var(--soma-edge-highlight, transparent);
|
|
639
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow, 0 0 #0000), var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow, 0 0 #0000);
|
|
640
|
+
}
|
|
641
|
+
/*
|
|
642
|
+
* 发丝描边 border-hairline(美化方案 B):有双层阴影定界的浮起 / 浮层只用 hairline 级描边(宽度读真源 boundary.floating,令牌 --soma-border-floating-width),不再叠 1px 实色边;颜色仍由 border-border-* 类给。
|
|
643
|
+
* 毛玻璃底 glass-backdrop:悬浮层(菜单 / 气泡 / 通知 / 对话框)的背景模糊,令牌 --soma-texture-chrome-backdrop 只有 GLASS_CHROME 档写(其余档为 none);
|
|
644
|
+
* 不支持 backdrop-filter 的浏览器声明被忽略,底色由 bg-surface-float / bg-surface-overlay 的 -live 令牌回落到不透明面。
|
|
645
|
+
*/
|
|
646
|
+
@utility border-hairline {
|
|
647
|
+
border-style: solid;
|
|
648
|
+
border-width: var(--soma-border-floating-width, 0.5px);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
@utility glass-backdrop {
|
|
652
|
+
backdrop-filter: var(--soma-texture-chrome-backdrop, none);
|
|
653
|
+
-webkit-backdrop-filter: var(--soma-texture-chrome-backdrop, none);
|
|
654
|
+
}
|
|
655
|
+
/* 材质与表面 end */
|
|
656
|
+
|
|
657
|
+
/* 按钮忙碌态 begin */
|
|
658
|
+
/*
|
|
659
|
+
* 按钮忙碌态的转圈(base/action-busy.ts):忙时按钮内叠一个居中的转圈(绝对定位盖在按钮上),原内容原位占位、转圈出现的同一刻才让位(opacity,不用 visibility:
|
|
660
|
+
* 原文字要留在无障碍树里,加载期间按钮仍有可读名称),所以按钮宽高不跳动;出现时刻 = 延迟(--kit-loading-delay,由结构 CSS 写在按钮上:满延迟读真源 structure.loadingFeedback.delayMs,已过首次延迟的重建按钮带 data-kit-loading-held、取 heldDelayMs = 0ms;两档,不按剩余毫秒算)。
|
|
661
|
+
* 原内容的遮盖只有这一个来源(组件模板里不再另加 invisible 类)。
|
|
662
|
+
*/
|
|
663
|
+
@layer components {
|
|
664
|
+
@keyframes kit-busy-conceal {
|
|
665
|
+
from {
|
|
666
|
+
opacity: 1;
|
|
667
|
+
}
|
|
668
|
+
to {
|
|
669
|
+
opacity: 0;
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
[aria-busy='true']:has(> [data-kit-busy-spin]) {
|
|
674
|
+
position: relative;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
[aria-busy='true']:has(> [data-kit-busy-spin]) > :not([data-kit-busy-spin]) {
|
|
678
|
+
animation: kit-busy-conceal 0s linear var(--kit-loading-delay, 0ms) both;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
[data-kit-busy-spin] {
|
|
682
|
+
animation: kit-loading-reveal 0s linear var(--kit-loading-delay, 0ms) both;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
/* 按钮忙碌态 end */
|
|
686
|
+
|