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