soma-kit 0.1.14 → 0.1.15
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/package.json +3 -3
- package/packs/finance/reconcile-desk/compile.ts +1 -1
- package/packs/finance/reconcile-desk/shell.ts +1 -1
- package/spec/generated/kit-app.schema.json +4 -2
- package/spec/generated/kit-page.schema.json +72 -2
- package/spec/kit-grammar.json +163 -57
- package/spec/kit-grammar.schema.json +0 -24
- package/src/app/app-config.ts +1 -1
- package/src/app/component-gate.ts +2 -2
- package/src/app/compose-apps.ts +5 -2
- package/src/app/define-kit-actions.ts +82 -10
- package/src/app/define-kit-app.ts +6 -5
- package/src/app/define-kit-view.ts +1 -1
- package/src/app/index.ts +7 -7
- package/src/app/kit-view-context.ts +11 -2
- package/src/app/theme-endpoint.ts +1 -1
- package/src/app/theme-runtime.ts +7 -2
- package/src/base/alert.ts +23 -20
- package/src/base/anchored-layer.ts +1 -1
- package/src/base/button.ts +30 -15
- package/src/base/cascader.ts +8 -4
- package/src/base/check-core.ts +9 -6
- package/src/base/color-picker.ts +10 -6
- package/src/base/command-palette.ts +10 -4
- package/src/base/context-menu.ts +5 -2
- package/src/base/date-range.ts +9 -6
- package/src/base/date.ts +10 -6
- package/src/base/delta.ts +4 -2
- package/src/base/divider.ts +15 -66
- package/src/base/fab.ts +11 -6
- package/src/base/gap-value.ts +1 -1
- package/src/base/hint-tips.ts +1 -1
- package/src/base/index.ts +15 -4
- package/src/base/inline-error.ts +84 -0
- package/src/base/input.ts +54 -18
- package/src/base/kbd.ts +4 -3
- package/src/base/link.ts +1 -1
- package/src/base/listbox-core.ts +70 -22
- package/src/base/mentions.ts +6 -3
- package/src/base/menu-button.ts +63 -27
- package/src/base/menu-core.ts +9 -2
- package/src/base/motion/hover-3d.ts +4 -1
- package/src/base/motion/hover-gallery.ts +4 -1
- package/src/base/otp.ts +7 -3
- package/src/base/overlay-runtime.ts +3 -2
- package/src/base/overlay-shell.ts +141 -0
- package/src/base/popover.ts +2 -2
- package/src/base/popup.ts +47 -41
- package/src/base/qty-stepper.ts +14 -9
- package/src/base/reason-tip.ts +2 -2
- package/src/{frames → base}/resize-handle.ts +1 -1
- package/src/base/segmented.ts +35 -36
- package/src/base/select.ts +1 -0
- package/src/base/shared.ts +43 -7
- package/src/base/status-tone.ts +1 -1
- package/src/base/tag-input.ts +13 -8
- package/src/base/tag.ts +53 -59
- package/src/base/text.ts +37 -13
- package/src/base/textarea.ts +1 -1
- package/src/base/time-picker.ts +9 -5
- package/src/base/tree-select.ts +12 -9
- package/src/base/upload.ts +21 -13
- package/src/biz/approval-desk/compile.ts +28 -1
- package/src/biz/approval-desk/shell.ts +2 -2
- package/src/biz/auth-panel/compile.ts +1 -1
- package/src/biz/auth-panel/shell.ts +2 -2
- package/src/biz/category-crud/compile.ts +17 -4
- package/src/biz/category-crud/shell.ts +7 -5
- package/src/biz/checkout-page/compile.ts +1 -1
- package/src/biz/checkout-page/shell.ts +7 -6
- package/src/biz/compose.ts +3 -3
- package/src/biz/define.ts +1 -1
- package/src/biz/import-wizard/compile.ts +1 -1
- package/src/biz/import-wizard/shell.ts +6 -4
- package/src/biz/index.ts +4 -3
- package/src/biz/landing-page/compile.ts +1 -1
- package/src/biz/landing-page/shell.ts +5 -4
- package/src/biz/link/shared.ts +8 -1
- package/src/biz/master-sub/compile.ts +162 -19
- package/src/biz/master-sub/detail-head.ts +7 -6
- package/src/biz/master-sub/index.ts +3 -3
- package/src/biz/master-sub/shell.ts +90 -53
- package/src/biz/multi-board/compile.ts +3 -3
- package/src/biz/multi-board/index.ts +24 -9
- package/src/biz/multi-board/prose-fold.ts +2 -2
- package/src/biz/multi-board/shell.ts +17 -13
- package/src/biz/names.ts +1 -0
- package/src/biz/notification-center/compile.ts +9 -2
- package/src/biz/notification-center/shell.ts +9 -2
- package/src/biz/page-templates/domain-templates.ts +6 -2
- package/src/biz/page-templates/result-page/compile.ts +1 -1
- package/src/biz/page-templates/result-page/shell.ts +4 -3
- package/src/biz/page-templates/shared.ts +1 -1
- package/src/biz/page-templates/sign-in-page/compile.ts +1 -1
- package/src/biz/page-templates/sign-in-page/shell.ts +4 -4
- package/src/biz/record-detail/compile.ts +5 -2
- package/src/biz/record-detail/shell.ts +4 -4
- package/src/biz/settings-center/compile.ts +1 -1
- package/src/biz/settings-center/shell.ts +8 -5
- package/src/biz/shared/action-host.ts +12 -5
- package/src/biz/shared/compile-helpers.ts +4 -4
- package/src/biz/shared/coordinator.ts +104 -21
- package/src/biz/shared/overlay-compile.ts +48 -18
- package/src/biz/shared/overlay-shell.ts +63 -112
- package/src/biz/single-form/compile.ts +2 -2
- package/src/biz/single-form/shell.ts +8 -4
- package/src/biz/standard-crud/compile.ts +11 -4
- package/src/biz/standard-crud/shell.ts +26 -9
- package/src/biz/standard-crud/summary.ts +3 -1
- package/src/biz/step-form/compile.ts +1 -1
- package/src/biz/step-form/hub.ts +4 -0
- package/src/biz/step-form/shell.ts +6 -4
- package/src/biz/types.ts +11 -4
- package/src/cli/app-layer-check.ts +375 -0
- package/src/cli/kit-cli.ts +35 -8
- package/src/cli/kit-init.ts +149 -0
- package/src/compile/access-gate-attach.ts +1 -1
- package/src/compile/action-host-attach.ts +1 -1
- package/src/compile/compile-page.ts +29 -234
- package/src/compile/component-candidates.ts +2 -1
- package/src/compile/hints.ts +5 -58
- package/src/compile/index.ts +2 -2
- package/src/compile/layout-lint/index.ts +4 -1
- package/src/compile/layout-lint/rules-composition.ts +43 -13
- package/src/compile/page-composition.ts +33 -31
- package/src/compile/redirect.ts +1 -1
- package/src/compile/stages.ts +169 -0
- package/src/compile/styles.ts +70 -32
- package/src/compile/types.ts +2 -2
- package/src/data/amount-breakdown.ts +4 -2
- package/src/data/anchor-nav.ts +4 -1
- package/src/data/approval-flow.ts +9 -4
- package/src/data/assignment-picker.ts +28 -18
- package/src/data/async-result-panel.ts +6 -2
- package/src/data/breadcrumbs.ts +13 -9
- package/src/data/calendar.ts +4 -3
- package/src/data/carousel.ts +11 -5
- package/src/data/chart.ts +153 -23
- package/src/data/checklist.ts +5 -4
- package/src/data/code-view.ts +220 -26
- package/src/data/comment-thread.ts +7 -2
- package/src/data/confirm-dialog.ts +56 -13
- package/src/data/diff.ts +4 -1
- package/src/data/dock.ts +5 -1
- package/src/data/embed.ts +1 -1
- package/src/data/engine-ports.ts +126 -0
- package/src/data/field-mapper.ts +12 -6
- package/src/data/flow-editor.ts +105 -29
- package/src/data/footer.ts +6 -2
- package/src/data/gantt.ts +11 -8
- package/src/data/hero.ts +6 -2
- package/src/data/image-viewer.ts +7 -3
- package/src/data/index.ts +12 -5
- package/src/data/item-list.ts +6 -5
- package/src/data/json-view.ts +844 -0
- package/src/data/kanban.ts +11 -8
- package/src/data/markdown-view.ts +487 -0
- package/src/data/matrix.ts +23 -14
- package/src/data/media-grid.ts +5 -2
- package/src/data/mega-menu.ts +4 -3
- package/src/data/menu-dom.ts +9 -8
- package/src/data/menu.ts +15 -9
- package/src/data/mockup.ts +9 -5
- package/src/data/modal-dialog.ts +39 -88
- package/src/data/navbar.ts +11 -7
- package/src/data/notice-list.ts +1 -1
- package/src/data/notify-renderer.ts +21 -10
- package/src/data/object-form.ts +129 -48
- package/src/data/pager.ts +12 -8
- package/src/data/panel-head.ts +1 -1
- package/src/data/permission-matrix.ts +15 -8
- package/src/data/permission-tree.ts +24 -11
- package/src/data/pricing-table.ts +8 -3
- package/src/data/reaction-bar.ts +6 -3
- package/src/data/record-card.ts +13 -9
- package/src/data/record-picker.ts +8 -4
- package/src/data/redirect.ts +1 -1
- package/src/data/request-console.ts +20 -7
- package/src/data/resident.ts +0 -12
- package/src/data/result-panel.ts +2 -2
- package/src/data/rich-text.ts +58 -96
- package/src/data/row-editor.ts +10 -5
- package/src/data/rule-builder.ts +14 -8
- package/src/data/shape-util.ts +14 -3
- package/src/data/stat-group.ts +63 -22
- package/src/data/static-lazy.ts +3 -0
- package/src/data/static-registry.ts +8 -2
- package/src/data/steps.ts +6 -2
- package/src/data/survey.ts +9 -3
- package/src/data/system-switcher.ts +15 -6
- package/src/data/text-diff.ts +663 -0
- package/src/data/timeline.ts +1 -1
- package/src/data/tour-guide.ts +6 -3
- package/src/data/transfer.ts +19 -10
- package/src/data/tree-table.ts +77 -12
- package/src/data/tree.ts +5 -2
- package/src/data/virtual-rows.ts +17 -7
- package/src/data/wrap.ts +2 -2
- package/src/frames/index.ts +3 -2
- package/src/frames/inherited-shell.ts +178 -0
- package/src/frames/list-summary.ts +59 -36
- package/src/frames/page-bar.ts +4 -2
- package/src/frames/resident-components.ts +20 -0
- package/src/frames/shared.ts +18 -14
- package/src/frames/split-frame/shell.ts +17 -11
- package/src/frames/split-frame/wiring.ts +2 -2
- package/src/frames/tabs-frame/shell.ts +12 -6
- package/src/frames/types.ts +3 -2
- package/src/frames/workspace-frame/extras.ts +19 -5
- package/src/frames/workspace-frame/shell.ts +2 -1
- package/src/frames/workspace-frame/state.ts +8 -2
- package/src/frames/workspace-frame/view.ts +125 -76
- package/src/generated/kit-grammar-runtime.ts +61 -39
- package/src/i18n/kit-text.ts +114 -2
- package/src/i18n/resolve-text-refs.ts +1 -1
- package/src/object-renderer/action-group.ts +31 -1
- package/src/object-renderer/action-more.ts +28 -12
- package/src/object-renderer/arrange.ts +37 -7
- package/src/object-renderer/collection-parts.ts +38 -7
- package/src/object-renderer/collection-table.ts +68 -23
- package/src/object-renderer/collection.ts +63 -30
- package/src/object-renderer/compile-data.ts +1 -1
- package/src/object-renderer/defaults.ts +8 -0
- package/src/object-renderer/emit-events.ts +1 -1
- package/src/object-renderer/emit-object.ts +3 -0
- package/src/object-renderer/emit-static.ts +140 -37
- package/src/object-renderer/field-value.ts +12 -239
- package/src/object-renderer/filter-toolbar.ts +103 -0
- package/src/{compile → object-renderer}/fragment.ts +2 -2
- package/src/object-renderer/index.ts +1 -1
- package/src/object-renderer/layout-facts.ts +37 -5
- package/src/object-renderer/overlay-decide.ts +82 -0
- package/src/object-renderer/render-object.ts +1 -1
- package/src/object-renderer/table-actions.ts +70 -23
- package/src/object-renderer/table-tools.ts +12 -5
- package/src/object-renderer/types.ts +9 -15
- package/src/recipes/app-blocks.ts +66 -0
- package/src/recipes/code-view.ts +56 -0
- package/src/recipes/compact-group.ts +31 -0
- package/src/recipes/container.ts +25 -15
- package/src/recipes/control.ts +21 -3
- package/src/recipes/desc-list.ts +14 -0
- package/src/recipes/divider.ts +53 -0
- package/src/recipes/emphasis.ts +12 -8
- package/src/recipes/frame-bleed.ts +3 -3
- package/src/recipes/index.ts +11 -1
- package/src/recipes/inherited-shell.ts +37 -0
- package/src/recipes/json-view.ts +49 -0
- package/src/recipes/markdown.ts +86 -0
- package/src/recipes/overlay.ts +112 -26
- package/src/recipes/page-width.ts +20 -0
- package/src/recipes/placeholder.ts +1 -1
- package/src/recipes/stat-state.ts +1 -1
- package/src/recipes/state.ts +10 -8
- package/src/recipes/status.ts +13 -12
- package/src/recipes/strip.ts +72 -0
- package/src/recipes/surface.ts +10 -6
- package/src/recipes/table-gap.ts +1 -1
- package/src/recipes/table-native-edit.ts +4 -4
- package/src/recipes/table-row.ts +11 -8
- package/src/recipes/tabs.ts +108 -31
- package/src/recipes/text-diff.ts +90 -0
- package/src/recipes/title-row.ts +4 -2
- package/src/recipes/typography.ts +2 -2
- package/src/shared/diagnostics.ts +16 -0
- package/src/shared/envelope.ts +1 -1
- package/src/shared/field-value-format.ts +246 -0
- package/src/shared/focus-ring.ts +8 -0
- package/src/shared/hints.ts +56 -0
- package/src/{base → shared}/icons.ts +12 -0
- package/src/shared/kit-error.ts +1 -1
- package/src/{object-renderer → shared}/merge-class.ts +3 -2
- package/src/shared/path-guard.ts +1 -1
- package/src/shared/primitives-types.ts +8 -0
- package/src/shared/theme-runtime-shared.ts +19 -0
- package/src/theme/kit-theme-text.ts +1 -1
- package/src/theme/kit-theme.css +38 -14
- package/src/theme/kit-theme.tpl +38 -14
- package/src/theme/nine-dim-structure.ts +66 -41
- package/src/theme/surface-layers.ts +11 -3
- package/src/theme/theme-tokens.ts +5 -1
- package/src/app/envelope.ts +0 -1
- package/src/app/notify-renderer.ts +0 -1
- package/src/app/paged-list-adapter.ts +0 -1
- package/src/app/theme-runtime-shared.ts +0 -1
- package/src/compile/kit-error.ts +0 -1
- /package/src/{base → shared}/class-candidates.ts +0 -0
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { SomaComponentDefinition } from 'soma-core';
|
|
12
12
|
import { CLASS_PROP, createKitController, joinClass, str, type KitApi, type KitProps } from '../base/shared';
|
|
13
13
|
import { permissionCheckerOf } from '../base/permission-gate';
|
|
14
|
-
import { kitIcon } from '../
|
|
14
|
+
import { kitIcon } from '../shared/icons';
|
|
15
15
|
import { KIT_CHECK_CLASS_CANDIDATES, attachMarkEvents, createCheck, isMark, markInput, setMarkLabel } from '../base/check-core';
|
|
16
16
|
import { wireMenu, type MenuClasses, type MenuHandle } from '../base/menu-core';
|
|
17
17
|
import { KIT_POPUP_PLACE_CLASS_CANDIDATES, type PopPlace } from '../base/popup';
|
|
@@ -25,7 +25,7 @@ import { KIT_ITEM_TONE_CLASS, KIT_ROW_TONE_CLASS, disabledReasonOf, rowActionSta
|
|
|
25
25
|
import { isKitActionBusy, onKitActionBusy } from '../base/action-busy';
|
|
26
26
|
import { KIT_REASON_TIP_CLASS_CANDIDATES, releaseReasonTipsIn, syncReasonTip } from '../base/reason-tip';
|
|
27
27
|
import { kitDisabledRecipe } from '../recipes';
|
|
28
|
-
import { kitRowActionsNarrowCap, kitRowActionsNarrowTier } from 'soma-foundation/kit-layout';
|
|
28
|
+
import { kitRowActionsNarrowCap, kitRowActionsNarrowTier, kitRuleTableOf } from 'soma-foundation/kit-layout';
|
|
29
29
|
import { watchEndEdge } from '../base/end-edge';
|
|
30
30
|
import { KIT_ACTION_GROUP_CLASS_CANDIDATES, menuOrderDangerLast, planActionGroup } from './action-group';
|
|
31
31
|
import { KIT_ARRANGE } from 'soma-foundation/arrange';
|
|
@@ -48,11 +48,14 @@ const COMPACT_MORE_ROOT_NARROW_ONLY_CLASS = `relative shrink-0 hidden @max-${COM
|
|
|
48
48
|
// 外观只有一份:触发钮 / 面板 / 菜单项类全部取自 base/menu-button(KIT_MENU_PANEL、KIT_MENU_ITEM_CLASSES),这里不再手抄
|
|
49
49
|
// 「更多」触发器与行内操作同为文字链接形态(次级动作秩 rest:弱化色文字 + 下拉箭头)
|
|
50
50
|
const MORE_TRIGGER_CLASS = kitRowActionRecipe('rest');
|
|
51
|
-
const MORE_PLACE: PopPlace = { side: 'bottom', align: '
|
|
52
|
-
const MORE_MENU_SHOWN = KIT_MENU_PANEL.
|
|
51
|
+
const MORE_PLACE: PopPlace = { side: 'bottom', align: 'start' };
|
|
52
|
+
const MORE_MENU_SHOWN = KIT_MENU_PANEL.classForTextTrigger(MORE_PLACE);
|
|
53
53
|
export const MORE_MENU_CLASSES: MenuClasses = KIT_MENU_ITEM_CLASSES;
|
|
54
|
-
/**
|
|
55
|
-
|
|
54
|
+
/**
|
|
55
|
+
* 默认内联上限(超过则把多出的折叠进「更多」):读真源 type-presentation#/action/maxInline/wide(经 kit-layout 规则表),不写字面量。
|
|
56
|
+
* 第二轮真实使用测试发现:这里原写死 3,表格行没传 maxInline 时宽档封顶没有随裁决改成 2(KT-K-table-4)
|
|
57
|
+
*/
|
|
58
|
+
const DEFAULT_MAX_INLINE = kitRuleTableOf().rowActions.maxInline.wide;
|
|
56
59
|
|
|
57
60
|
type ActionTone = 'primary' | 'neutral' | 'danger';
|
|
58
61
|
|
|
@@ -74,6 +77,15 @@ export const ROW_ACTION_BUTTON_CLASS: Record<KitRowActionRank, string> = {
|
|
|
74
77
|
danger: kitRowActionRecipe('danger'),
|
|
75
78
|
};
|
|
76
79
|
|
|
80
|
+
/** 详情头动作区(look: button):秩 → 按钮配方(主 = 区域主动作实心、次 = 描边中性、危险 = 透明底灰字悬停变危险色);「更多」是安静按钮 */
|
|
81
|
+
const HEAD_BUTTON_CLASS: Record<KitRowActionRank, string> = {
|
|
82
|
+
lead: ACTION_BUTTON_CLASS.primary,
|
|
83
|
+
rest: ACTION_BUTTON_CLASS.neutral,
|
|
84
|
+
danger: ACTION_BUTTON_CLASS.danger,
|
|
85
|
+
};
|
|
86
|
+
const HEAD_MORE_TRIGGER_CLASS = kitEmphasisButtonRecipe('button.quiet', { tight: true });
|
|
87
|
+
const HEAD_ROOT_CLASS = 'flex flex-wrap items-center justify-end gap-2';
|
|
88
|
+
|
|
77
89
|
/**
|
|
78
90
|
* 行内动作的秩(强调等级 R12):危险动作 = danger(保持危险色、与前者隔开);其余里「显式 primary 的动作,没有则第一个」= lead(品牌色),其余 = rest(弱化色)。
|
|
79
91
|
* 一眼分出主次:一行里只有一个品牌色动作。取值(语气)只在真源 kit-limits#emphasis.roles.rowAction.*。
|
|
@@ -117,6 +129,13 @@ function elementId(el: Element | null): number {
|
|
|
117
129
|
|
|
118
130
|
type SelectMode = 'none' | 'single' | 'multi';
|
|
119
131
|
|
|
132
|
+
/** 已选行:数组原样;单个对象(主从页的选中行镜像)= 只选了这一行(空对象 = 没选);其它 = 没有已选行镜像(null) */
|
|
133
|
+
function selectedRowsOf(raw: unknown): readonly unknown[] | null {
|
|
134
|
+
if (Array.isArray(raw)) return raw;
|
|
135
|
+
if (raw !== null && typeof raw === 'object') return Object.keys(raw as Record<string, unknown>).length > 0 ? [raw] : [];
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
|
|
120
139
|
function rowKeyOf(row: unknown, keyField: string): string {
|
|
121
140
|
if (row === null || typeof row !== 'object') return '';
|
|
122
141
|
const v = (row as Record<string, unknown>)[keyField];
|
|
@@ -149,6 +168,7 @@ export const KIT_TABLE_ACTIONS_CLASS_CANDIDATES: readonly string[] = [
|
|
|
149
168
|
EXPAND_BUTTON_CLASS,
|
|
150
169
|
...Object.values(ACTION_BUTTON_CLASS),
|
|
151
170
|
...Object.values(ROW_ACTION_BUTTON_CLASS),
|
|
171
|
+
HEAD_ROOT_CLASS, HEAD_MORE_TRIGGER_CLASS, ...Object.values(HEAD_BUTTON_CLASS),
|
|
152
172
|
...Object.values(KIT_ROW_TONE_CLASS),
|
|
153
173
|
...Object.values(KIT_ITEM_TONE_CLASS),
|
|
154
174
|
...KIT_ACTION_GROUP_CLASS_CANDIDATES, DANGER_SEPARATOR_CLASS,
|
|
@@ -186,8 +206,10 @@ export function splitRowActions(
|
|
|
186
206
|
const forced = shown.filter((i) => i.more === true);
|
|
187
207
|
const candidates = shown.filter((i) => i.more !== true);
|
|
188
208
|
const cap = narrow ? Math.max(1, Math.min(maxInline, kitRowActionsNarrowCap())) : maxInline;
|
|
189
|
-
// 静态切分整个交给引擎(inlineCap
|
|
190
|
-
|
|
209
|
+
// 静态切分整个交给引擎(inlineCap):保留序、危险折叠、内联危险项置末并分隔。
|
|
210
|
+
// 「被收起的只有 1 项时直接内联」不再用于行内动作:常驻至多 cap 个是硬上限(KT-K-table-4,2026-11-25 裁决;
|
|
211
|
+
// 第二轮真实使用测试见 talent 我的风险 3 个动作全常驻——cap 2 + 只溢出 1 项被这条豁免放回行内)
|
|
212
|
+
const plan = planActionGroup(candidates.map((i) => ({ id: i.id, label: i.name, importance: i.tone === 'primary' ? 'primary' : i.tone === 'danger' ? 'danger' : 'secondary' })), { dangerFold: true, inlineCap: cap, loneInline: false });
|
|
191
213
|
const byId = new Map(candidates.map((i) => [i.id, i] as const));
|
|
192
214
|
const pick = (ids: readonly string[]): KitTableActionItem[] => ids.flatMap((id) => { const it = byId.get(id); return it === undefined ? [] : [it]; });
|
|
193
215
|
const foldedIds = new Set(plan.rowFolded);
|
|
@@ -254,6 +276,7 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
254
276
|
rowTone: { type: 'string', default: '', desc: '行样式档位名(行字段取值,业务对象逐行给出):属于语法真源 viewObject.rowState.toneTiers 闭集时,给所在行容器(data-kit-row)加该档位的类串;不在闭集不加类(rowToneSet 为 item 时取 itemToneTiers)' },
|
|
255
277
|
rowToneSet: { type: 'string', default: 'row', desc: '行样式档位用哪张闭集表:row = toneTiers(表格行底色);item = itemToneTiers(cards / stack 条目自带底色与边框,只用描边 / 透明度);其它值按 row' },
|
|
256
278
|
row: { type: 'object', default: {}, desc: '当前行数据,原样随 row_action 上抛' },
|
|
279
|
+
look: { type: 'string', default: 'link', desc: '外观:link = 行内文字链接(表格 / 条目的行操作);button = 按钮组(主从页右窗格详情头:主动作实心、次级描边、「更多」安静灰字、危险平时灰字悬停变红;详情头窄于窄档线时次要按钮收进「更多」)' },
|
|
257
280
|
pickOnRow: { type: 'boolean', default: false, desc: '开启后点击所在行(data-kit-row 容器)抛 row_pick,builtin 为 select' },
|
|
258
281
|
selectMode: { type: 'string', default: 'none', desc: '勾选列模式 none / single / multi;非 none 时渲染选择框并抛 row_select' },
|
|
259
282
|
selected: { type: 'array', default: [], desc: '已选行数组(协调组件 focus 切片 sel 的镜像);选择框的勾选态与所在行(data-kit-row)的 data-kit-selected 选中高亮由它推出' },
|
|
@@ -397,7 +420,20 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
397
420
|
};
|
|
398
421
|
// 键盘:行本身有焦点时 Enter 等同点行(行内按钮 / 输入框上的 Enter 归它们自己)
|
|
399
422
|
const onRowKey = (event: KeyboardEvent): void => {
|
|
400
|
-
if (!pickOn() || event.
|
|
423
|
+
if (!pickOn() || event.target !== rowEl) return;
|
|
424
|
+
// 条目列表(主从页左窗格):↑ ↓ 把焦点与选中移到相邻条目(点击相邻条目的同一条路径:焦点跟着走、抛 row_pick)
|
|
425
|
+
if ((event.key === 'ArrowDown' || event.key === 'ArrowUp') && rowEl?.hasAttribute('data-kit-compact')) {
|
|
426
|
+
const side = event.key === 'ArrowDown' ? 'nextElementSibling' : 'previousElementSibling';
|
|
427
|
+
let near = rowEl[side] as HTMLElement | null;
|
|
428
|
+
while (near !== null && !near.hasAttribute('data-kit-row')) near = near[side] as HTMLElement | null;
|
|
429
|
+
if (near !== null) {
|
|
430
|
+
event.preventDefault();
|
|
431
|
+
near.focus();
|
|
432
|
+
near.click();
|
|
433
|
+
}
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
if (event.key !== 'Enter') return;
|
|
401
437
|
event.preventDefault();
|
|
402
438
|
emitSelect();
|
|
403
439
|
};
|
|
@@ -478,7 +514,8 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
478
514
|
// 旧按钮的原因气泡可能正挂在浮层根里:整片重画前先摘(锚点随旧树丢弃)
|
|
479
515
|
releaseReasonTipsIn(root);
|
|
480
516
|
const items = itemsOf(p.actions);
|
|
481
|
-
|
|
517
|
+
const asButton = p.look === 'button';
|
|
518
|
+
root.className = joinClass(asButton ? HEAD_ROOT_CLASS : ROOT_CLASS, p.class);
|
|
482
519
|
root.replaceChildren();
|
|
483
520
|
if (busy) root.setAttribute('aria-busy', 'true');
|
|
484
521
|
else root.removeAttribute('aria-busy');
|
|
@@ -527,11 +564,12 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
527
564
|
}
|
|
528
565
|
const mode = str(p.selectMode, 'none') as SelectMode;
|
|
529
566
|
const keyField = str(p.keyField);
|
|
530
|
-
const
|
|
567
|
+
const selectedRows = selectedRowsOf(p.selected);
|
|
568
|
+
const picked = selectedRows !== null && selectedRows.some((r) => rowKeyOf(r, keyField) === rowKeyOf(p.row, keyField));
|
|
531
569
|
// 选中行高亮:给所在行容器(data-kit-row)标 data-kit-selected,行类里的 data-kit-selected 变体生效(静态类,不拼类名);
|
|
532
570
|
// 表格是无 role 的 div,不写 aria-selected(它只在 grid / treegrid 的 row 上合法);已选语义由勾选列 checkbox / radio 承担。
|
|
533
571
|
// 勾选列实例与 pickOnRow 实例都读同一份已选行镜像,结论一致
|
|
534
|
-
if (
|
|
572
|
+
if (selectedRows !== null) {
|
|
535
573
|
const rowEl = root.closest<HTMLElement>('[data-kit-row]');
|
|
536
574
|
if (rowEl) {
|
|
537
575
|
if (picked) rowEl.setAttribute('data-kit-selected', '');
|
|
@@ -546,9 +584,15 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
546
584
|
setMarkLabel(box, keyVal !== '' ? kitText('soma.kit.select_row_of', { key: keyVal }, root) : kitText('soma.kit.select_this_row', undefined, root));
|
|
547
585
|
root.appendChild(box);
|
|
548
586
|
}
|
|
549
|
-
// K1-2:无权限的动作不渲染(check 为 null =
|
|
550
|
-
|
|
551
|
-
|
|
587
|
+
// K1-2:无权限的动作不渲染(check 为 null = 未装配权限,保持渲染);
|
|
588
|
+
// 本行不可用的动作(actionState 的 hidden 或 disabled)一律隐藏而不是置灰(knowledge/Kit主题规则与算法.md KT-K-table-4,2026-11-25 裁决);
|
|
589
|
+
// 例外:作者为置灰写了原因(disabledReason 求值非空)——「为什么不能点」本身是要告诉用户的信息,保留置灰 + 原因气泡(AC07);
|
|
590
|
+
// 删除在途 / 批量锁定这类短暂的忙态仍是整行置灰(不是「不可用」)
|
|
591
|
+
const shown = items.filter((item) => {
|
|
592
|
+
const st = rowActionState(p.actionState, item.id);
|
|
593
|
+
const unexplained = st.disabled === true && disabledReasonOf(p.actionState, item) === '';
|
|
594
|
+
return !(item.permission !== undefined && check !== null && !check(item.permission)) && !st.hidden && !unexplained;
|
|
595
|
+
});
|
|
552
596
|
const maxRaw = Number(p.maxInline);
|
|
553
597
|
const maxInline = Number.isFinite(maxRaw) && maxRaw >= 1 ? Math.floor(maxRaw) : DEFAULT_MAX_INLINE;
|
|
554
598
|
if (offEdge === null) {
|
|
@@ -564,8 +608,10 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
564
608
|
if (typeof requestAnimationFrame === 'function') requestAnimationFrame(recheck); else queueMicrotask(recheck);
|
|
565
609
|
// 宽档切分:前 maxInline 个行内,其余并入「更多」。窄档保留者(primary 优先,上限取 design maxInline.narrow)取自宽档行内项,其余行内项标次要
|
|
566
610
|
const { inline, folded, separated } = splitRowActions(shown, maxInline, false);
|
|
567
|
-
const inCompact = !renderedInTable && root.closest('[data-kit-compact]') !== null;
|
|
568
|
-
|
|
611
|
+
const inCompact = !asButton && !renderedInTable && root.closest('[data-kit-compact]') !== null;
|
|
612
|
+
// 详情头按钮组(look: button)也按容器窄档收起次要项:查询容器是详情头(biz/master-sub/shell detailHead 带 @container),
|
|
613
|
+
// 窄于窄档线时只留主动作 +「更多」,次要按钮进菜单——不再整组换行后仍向右溢出被裁(look6 mcp 接口配置 @320)
|
|
614
|
+
const narrowKeep = asButton || renderedInTable || inCompact ? new Set(splitRowActions(inline, maxInline, true).inline) : new Set(inline);
|
|
569
615
|
const secondary = inline.filter((i) => !narrowKeep.has(i));
|
|
570
616
|
const secondaryButtons = new Map<string, HTMLButtonElement>();
|
|
571
617
|
const ranks = rowActionRanks(inline);
|
|
@@ -573,9 +619,9 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
573
619
|
const btn = root.ownerDocument.createElement('button');
|
|
574
620
|
btn.setAttribute('type', 'button');
|
|
575
621
|
btn.setAttribute('data-kit-act', item.id);
|
|
576
|
-
btn.className = ROW_ACTION_BUTTON_CLASS[ranks[at]!];
|
|
577
|
-
// 内联的危险动作置末并与前一项分隔:在项间距(gap-x-4)之外再加大一截(取值 kit-arrange#actionGroup.dangerSeparatorRem
|
|
578
|
-
if (separated.has(item.id)) btn.className = `${btn.className} ${DANGER_SEPARATOR_CLASS}`;
|
|
622
|
+
btn.className = asButton ? HEAD_BUTTON_CLASS[ranks[at]!] : ROW_ACTION_BUTTON_CLASS[ranks[at]!];
|
|
623
|
+
// 内联的危险动作置末并与前一项分隔:在项间距(gap-x-4)之外再加大一截(取值 kit-arrange#actionGroup.dangerSeparatorRem);按钮形态(详情头)按钮自带轮廓,不加
|
|
624
|
+
if (!asButton && separated.has(item.id)) btn.className = `${btn.className} ${DANGER_SEPARATOR_CLASS}`;
|
|
579
625
|
if (!narrowKeep.has(item)) {
|
|
580
626
|
btn.setAttribute('data-kit-act-secondary', '');
|
|
581
627
|
btn.className = `${btn.className} ${inCompact ? COMPACT_SECONDARY_CLASS : ROW_ACTION_SECONDARY_CLASS}`;
|
|
@@ -587,7 +633,8 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
587
633
|
const reason = busy || locked ? '' : disabledReasonOf(p.actionState, item);
|
|
588
634
|
if (reason !== '') {
|
|
589
635
|
btn.setAttribute('aria-disabled', 'true');
|
|
590
|
-
|
|
636
|
+
// 置灰是静态类(与 cursor-pointer 同特异度,谁在样式表里靠后谁赢):先摘掉可点光标,光标只剩 not-allowed
|
|
637
|
+
btn.className = `${btn.className.split(/\s+/).filter((c) => c !== 'cursor-pointer').join(' ')} ${kitDisabledRecipe('aria')}`;
|
|
591
638
|
} else if (busy || locked || rowActionState(p.actionState, item.id).disabled) {
|
|
592
639
|
btn.disabled = true;
|
|
593
640
|
btn.setAttribute('aria-disabled', 'true');
|
|
@@ -605,7 +652,7 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
605
652
|
trigger.setAttribute('type', 'button');
|
|
606
653
|
trigger.setAttribute('aria-haspopup', 'menu');
|
|
607
654
|
trigger.setAttribute('aria-label', kitText('soma.kit.more_actions', undefined, root));
|
|
608
|
-
trigger.className = MORE_TRIGGER_CLASS;
|
|
655
|
+
trigger.className = asButton ? HEAD_MORE_TRIGGER_CLASS : MORE_TRIGGER_CLASS;
|
|
609
656
|
trigger.setAttribute('data-kit-more', '');
|
|
610
657
|
const win = doc.defaultView;
|
|
611
658
|
const menuEntries = (): KitTableActionItem[] => {
|
|
@@ -633,7 +680,7 @@ export function createKitTableActions(): SomaComponentDefinition {
|
|
|
633
680
|
hiddenClass: 'hidden',
|
|
634
681
|
// 挂到浮层根下,不被表格外层 overflow 裁切;定位仍走 popup 的贴边翻转
|
|
635
682
|
portal: createPanelPortal(trigger),
|
|
636
|
-
fitted: () => ({ pref: MORE_PLACE, classFor: KIT_MENU_PANEL.
|
|
683
|
+
fitted: () => ({ pref: MORE_PLACE, classFor: KIT_MENU_PANEL.classForTextTrigger }),
|
|
637
684
|
classes: MORE_MENU_CLASSES,
|
|
638
685
|
// 置灰项的原因作为该项的描述文字(可见的第二段文字 + aria-describedby),菜单项本身是 aria-disabled 的 div,读屏可取到
|
|
639
686
|
// 菜单内容在打开 / 取项时现算:常驻折叠项 + 当前被容器查询隐藏的次要行内项(display:none 即不可见),次序 = 隐藏的次要项(声明序)→ 常驻折叠的普通项 → more:true 项
|
|
@@ -15,6 +15,10 @@ import { tableQuerySignature } from './collection-table';
|
|
|
15
15
|
import { KIT_ROW_TONE_CLASS } from './view-binding';
|
|
16
16
|
import { KIT_FACE_FIELD, KIT_FACE_RAISED, kitDisabledRecipe, kitSegmentRecipe, kitTextActionRecipe, setKitFace, type KitFaceKind } from '../recipes';
|
|
17
17
|
import { kitEmphasisButtonRecipe } from '../recipes/emphasis';
|
|
18
|
+
import { kitSurfaceRecipe } from '../recipes/surface';
|
|
19
|
+
import { kitTabRecipe } from '../recipes/tabs';
|
|
20
|
+
import { KIT_DIVIDER_FOOT_CLASS } from '../recipes/divider';
|
|
21
|
+
import { mergeClass } from '../shared/merge-class';
|
|
18
22
|
import { measureEdges } from '../base/end-edge';
|
|
19
23
|
import { CLASS_PROP, createKitController, num, str } from '../base/shared';
|
|
20
24
|
import { KIT_DROPDOWN_CLASS_CANDIDATES, onOutsidePress, overlayVerdict, releaseDropdownsIn, syncDropdown } from '../base/popup';
|
|
@@ -26,7 +30,7 @@ import { KIT_LISTBOX_CLASS_CANDIDATES } from '../base/listbox-core';
|
|
|
26
30
|
import { createKitEmbedBag, mountKitSelectField, type KitEmbedHandle } from '../data/embed';
|
|
27
31
|
import { KIT_TABLE_ACTIONS_CLASS_CANDIDATES, ACTION_BUTTON_CLASS } from './table-actions';
|
|
28
32
|
import { KIT_TABLE_DENSITIES, KIT_TABLE_DENSITY_DEFAULT, KIT_TABLE_EXT, type KitTableDensity } from './defaults';
|
|
29
|
-
import { attachResizeHandle, type ResizeHandle } from '../
|
|
33
|
+
import { attachResizeHandle, type ResizeHandle } from '../base/resize-handle';
|
|
30
34
|
import { kitText, type KitTextKey } from '../i18n/kit-text';
|
|
31
35
|
import { KIT_ACTION_SLOT_BASE, actionSlotEmits, emitActionSlot } from '../base/action-slots';
|
|
32
36
|
import { isKitActionBusy, onKitActionBusy } from '../base/action-busy';
|
|
@@ -42,7 +46,8 @@ const ROOT_CLASS = 'flex flex-nowrap items-center justify-between gap-2 pb-2';
|
|
|
42
46
|
const GROUP_CLASS = 'flex min-w-0 flex-1 flex-nowrap items-center justify-end gap-2';
|
|
43
47
|
// 工具条按钮 / 分段按钮 / 文字链接:控件引擎的配方(工具条宿主 tight),不再手写按钮类串
|
|
44
48
|
const TOOL_BTN_CLASS = kitEmphasisButtonRecipe('button.toolbar', { tight: true });
|
|
45
|
-
|
|
49
|
+
// 分段组 = 分段控件的槽(与 SegmentedSwitch 同一个出口 kitTabRecipe().segRoot:凹槽面、无描边;一种呈现一个配方,不再自画一圈灰线)
|
|
50
|
+
const SEG_GROUP_CLASS = kitTabRecipe().segRoot;
|
|
46
51
|
const SEG_BTN_CLASS = kitSegmentRecipe(false);
|
|
47
52
|
const SEG_BTN_ON_CLASS = kitSegmentRecipe(true);
|
|
48
53
|
const BATCH_BAR_CLASS = 'flex w-full flex-nowrap items-center gap-2 whitespace-nowrap rounded-lg bg-primary-soft px-3 py-1.5 text-sm text-primary-on-soft';
|
|
@@ -52,10 +57,11 @@ const CHECK_TEXT_CLASS = 'text-sm text-fg';
|
|
|
52
57
|
const PANEL_CHECK_CLASS = 'w-full px-2 py-1 text-sm text-fg hover:bg-state-layer-hover active:bg-state-layer-press';
|
|
53
58
|
const PANEL_CHECK_LOCKED_CLASS = 'w-full px-2 py-1 text-sm';
|
|
54
59
|
const ANCHOR_CLASS = 'relative inline-flex';
|
|
55
|
-
|
|
60
|
+
// 列设置弹层:浮起表面只取表面配方(KT-B4:双层阴影 + 发丝描边),不自写边框 / 阴影
|
|
61
|
+
const PANEL_BASE = mergeClass('absolute z-20 w-56 p-2 text-sm text-fg', kitSurfaceRecipe('raised'));
|
|
56
62
|
const PANEL_ITEM_CLASS = 'flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-state-layer-hover active:bg-state-layer-press';
|
|
57
63
|
const PANEL_ITEM_LOCKED_CLASS = 'flex cursor-not-allowed items-center gap-2 rounded-md px-2 py-1 text-fg-subtle';
|
|
58
|
-
const PANEL_FOOT_CLASS = 'mt-1 flex justify-end
|
|
64
|
+
const PANEL_FOOT_CLASS = mergeClass('mt-1 flex justify-end pt-1', KIT_DIVIDER_FOOT_CLASS);
|
|
59
65
|
const NOTICE_CLASS = 'text-xs text-fg-muted';
|
|
60
66
|
const NOTICE_ERR_CLASS = 'text-xs text-danger-on-soft';
|
|
61
67
|
const EDIT_CELL_CLASS = 'cursor-text focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring';
|
|
@@ -397,7 +403,8 @@ export function createKitTableTools(): SomaComponentDefinition {
|
|
|
397
403
|
const pathname = (): string => (typeof location === 'undefined' ? '' : location.pathname);
|
|
398
404
|
|
|
399
405
|
const effectiveDensity = (): Density => {
|
|
400
|
-
|
|
406
|
+
// 用户没选过:以页面壳编译期给的默认为准(列表页壳标 data-kit-dense = 紧凑),否则取全局缺省
|
|
407
|
+
return density ?? (table?.hasAttribute('data-kit-dense') === true ? 'COMPACT_DENSE' : KIT_TABLE_DENSITY_DEFAULT);
|
|
401
408
|
};
|
|
402
409
|
|
|
403
410
|
// ---- 对表格外壳的作用
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// renderObject(KitObject, KitRenderContext) -> KitObjectIR,纯函数,不碰 DOM。
|
|
3
3
|
|
|
4
4
|
import type { SomaConfirmSpec } from 'soma-core';
|
|
5
|
+
import type { KitDiagnostic } from '../shared/diagnostics';
|
|
6
|
+
|
|
7
|
+
export type { KitDiagnostic };
|
|
5
8
|
|
|
6
9
|
export type KitType =
|
|
7
10
|
| 'text' | 'longtext' | 'int' | 'decimal' | 'money' | 'percent' | 'bool'
|
|
@@ -425,6 +428,8 @@ export interface KitViewForm {
|
|
|
425
428
|
/** 行样式档位:`row.<字段>`,字段取值是 viewObject.rowState.toneTiers 的档位名(业务对象逐行给出);只许纯路径,对所有集合(table / treeTable / 虚拟滚动表 / cards / stack)生效 */
|
|
426
429
|
rowTone?: string;
|
|
427
430
|
replaceClass?: boolean;
|
|
431
|
+
/** 内部键(只由主从页编译置位,页面语法没有):紧凑列表是左窗格的「条目」——状态标签并入名称行右侧、编码等宽,条目类由编译传入(rowClass + replaceClass) */
|
|
432
|
+
paneItem?: boolean;
|
|
428
433
|
staticComponent?: string;
|
|
429
434
|
accept?: 'single' | 'list';
|
|
430
435
|
map?: Record<string, string>;
|
|
@@ -579,20 +584,7 @@ export interface KitRenderContext {
|
|
|
579
584
|
|
|
580
585
|
// ---------------------------------------------------------------- 诊断
|
|
581
586
|
|
|
582
|
-
|
|
583
|
-
/** 真源 diagnostics 里的码,如 KIT-OBJ-003。 */
|
|
584
|
-
code: string;
|
|
585
|
-
message: string;
|
|
586
|
-
/** 出错位置,如 `view.list.fields[2]`。 */
|
|
587
|
-
path: string;
|
|
588
|
-
/** 来源文件(应用装配编译页面时补,相对应用根) */
|
|
589
|
-
file?: string;
|
|
590
|
-
/** 在来源 YAML 里的行 / 列(1 起),由 compile/locate.ts 按路径定位;定位不到就不写 */
|
|
591
|
-
line?: number;
|
|
592
|
-
column?: number;
|
|
593
|
-
/** 修改建议(「你可能想写的是 X」),由 compile/hints.ts 在诊断汇总处统一附加;没有把握就不写 */
|
|
594
|
-
hint?: string;
|
|
595
|
-
}
|
|
587
|
+
// KitDiagnostic 定义已下沉至 shared/diagnostics.ts,顶部重导出以保持兼容。
|
|
596
588
|
|
|
597
589
|
/**
|
|
598
590
|
* 布局体检建议(RV-1117 T05):与 diagnostics 并行的新通道,`ok` / diagnostics 契约不变。
|
|
@@ -641,6 +633,8 @@ export interface KitCell {
|
|
|
641
633
|
parts: KitCellParts;
|
|
642
634
|
/** 格容器类:栅格跨度类 + 基准类 + 覆写,已 mergeClass。 */
|
|
643
635
|
cellClass: string;
|
|
636
|
+
/** 控件槽宽度类(新建 / 编辑表单:按字段类型取档的最大宽,KT-K-form-8 / §6.1 G-12);撑满的字段与其它视图不带 */
|
|
637
|
+
bodyClass?: string;
|
|
644
638
|
labelClass: string;
|
|
645
639
|
valueClass: string;
|
|
646
640
|
/** 错误行类(编辑态)。 */
|
|
@@ -921,7 +915,7 @@ export type KitLayoutIR =
|
|
|
921
915
|
* 紧凑列表(collection.type: compact-list):仍是 stack 形态(事件 / 分页 / 三态 / 右键菜单全走 stack 的路径),
|
|
922
916
|
* 条目换成「主标题 + 次要信息」两行:title = 主标题字段,meta = 次要字段(枚举 / 状态字段以圆点 + 文字呈现),见 collection.ts compactListOf
|
|
923
917
|
*/
|
|
924
|
-
compact?: { title: KitCell; meta: KitCell[] };
|
|
918
|
+
compact?: { title: KitCell; meta: KitCell[]; /** 左窗格条目(见 KitViewForm.paneItem) */ pane?: boolean };
|
|
925
919
|
}
|
|
926
920
|
| {
|
|
927
921
|
kind: 'static'; component: string; accept: 'single' | 'list'; map: Record<string, string>; class: string; chart?: KitChartDecl;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// 应用组件的版式配方出口(重构工单 P15,工序 3):区块纵向栈 / 并排区块 / 节标题 / 元信息行。
|
|
2
|
+
// 应用组件(kit 应用的 components/App*.ts)自己拼版时只取这四个名字,不自写 gap-N / text-N / @md: 断点:
|
|
3
|
+
// · 节奏 = 间距角色类(gap-stack / gap-region / gap-section,随密度同比走,真源 kit-nine-dim 的区块级间距角色);
|
|
4
|
+
// · 字阶 = 字阶角色(kitTypographyRecipe,真源 kit-type#roles);
|
|
5
|
+
// · 断点 = 排布引擎按两侧最小宽求出的容器档(arrangeSplit,真源 kit-arrange#split),不是作者挑的 @md。
|
|
6
|
+
// 运行时不测量:并排 / 堆叠只切换这里写出的容器查询类;宿主必须是查询容器(kitAppSideBySideRecipe 的 host 类)。
|
|
7
|
+
import { KIT_ARRANGE, arrangeSplit } from 'soma-foundation/arrange';
|
|
8
|
+
import { classCandidates } from '../shared/class-candidates';
|
|
9
|
+
import { mergeClass } from '../shared/merge-class';
|
|
10
|
+
import { kitTypographyRecipe } from './typography';
|
|
11
|
+
|
|
12
|
+
/** 区块之间的节奏档:stack = 同一块里的上下行;region = 同一面板里的区块;section = 面板 / 分组之间 */
|
|
13
|
+
export type KitAppRhythm = 'stack' | 'region' | 'section';
|
|
14
|
+
|
|
15
|
+
const RHYTHM_GAP: Readonly<Record<KitAppRhythm, string>> = Object.freeze({
|
|
16
|
+
stack: 'gap-stack',
|
|
17
|
+
region: 'gap-region',
|
|
18
|
+
section: 'gap-section',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/** 区块纵向栈:子块自上而下,间距取节奏档(缺省 region) */
|
|
22
|
+
export function kitAppStackRecipe(rhythm: KitAppRhythm = 'region'): string {
|
|
23
|
+
return `flex min-w-0 flex-col ${RHYTHM_GAP[rhythm]}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 并排区块的类:host 打在外层(查询容器),row 打在内层(窄于并排档时上下堆叠,到档后左右并排、两侧等分) */
|
|
27
|
+
export interface KitAppSideBySide {
|
|
28
|
+
readonly host: string;
|
|
29
|
+
readonly row: string;
|
|
30
|
+
/** 并排线所在的容器档名(排布引擎求出,供单测与诊断) */
|
|
31
|
+
readonly tier: string | null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 并排区块:两侧各自的最小宽(rem)由调用方按内容给出(如「报告头结论列 22rem、日期列 10rem」),
|
|
36
|
+
* 引擎求出两侧都放得下的最窄容器档作并排线;节奏档缺省 region。
|
|
37
|
+
*/
|
|
38
|
+
export function kitAppSideBySideRecipe(input: { startMinRem: number; endMinRem: number; rhythm?: KitAppRhythm }): KitAppSideBySide {
|
|
39
|
+
// 两侧等分:左侧占栅格总份数的一半(真源 kit-arrange#split.total)
|
|
40
|
+
const plan = arrangeSplit({ aMinRem: input.startMinRem, bMinRem: input.endMinRem, aSpans: [KIT_ARRANGE.split.total / 2] });
|
|
41
|
+
const gap = RHYTHM_GAP[input.rhythm ?? 'region'];
|
|
42
|
+
const tier = plan.fits && plan.tier !== '' ? plan.tier : null;
|
|
43
|
+
// grid-cols-2 = repeat(2, minmax(0, 1fr)):两侧等分且各自可收缩,长内容不撑破并排
|
|
44
|
+
const row = tier === null
|
|
45
|
+
? `grid min-w-0 grid-cols-1 ${gap}`
|
|
46
|
+
: `grid min-w-0 grid-cols-1 ${gap} @${tier}:grid-cols-2`;
|
|
47
|
+
return { host: '@container min-w-0', row, tier };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** 节标题(面板 / 分组内的小标题):字阶角色 sectionTitle */
|
|
51
|
+
export function kitAppSectionTitleRecipe(): string {
|
|
52
|
+
return kitTypographyRecipe('sectionTitle');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** 元信息行(时间、作者、口径、计数这类辅助文字的一行):可换行、项间节奏 stack、字阶 caption(次要色) */
|
|
56
|
+
export function kitAppMetaRowRecipe(): string {
|
|
57
|
+
return mergeClass('flex min-w-0 flex-wrap items-center gap-stack', kitTypographyRecipe('caption'));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** 本文件会写出的类(容器档逐档的并排类由调用方的 kitAppSideBySideRecipe 结果并入其组件候选) */
|
|
61
|
+
export const KIT_APP_BLOCK_CLASS_CANDIDATES: readonly string[] = classCandidates(
|
|
62
|
+
Object.values(RHYTHM_GAP).map((g) => kitAppStackRecipe(g.replace('gap-', '') as KitAppRhythm)),
|
|
63
|
+
kitAppSectionTitleRecipe(),
|
|
64
|
+
kitAppMetaRowRecipe(),
|
|
65
|
+
'@container',
|
|
66
|
+
);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// 代码展示配方(CodeView 高亮形态,内容展示批次 ③):记号色、行号槽、高亮行、折叠条、双向字符警告的类串只从这里取。
|
|
2
|
+
// 依据:参考文本差异组件笔记 C.4。
|
|
3
|
+
// 记号色(暂行,待令牌):规格要求 14 个 `--tok-*` 令牌、亮暗各一套、每个对代码底 ≥ 4.5:1(R20);令牌在主题单链上,
|
|
4
|
+
// 主题 tpl 归视觉工具线(handoff 需对方 N-2)。令牌到位前暂取已有的 on-soft 文字色(都是按 ≥ 4.5:1 配对过的文字色),
|
|
5
|
+
// 只在本文件的 TOKEN_CLASS 一张表;到位后只改这张表。
|
|
6
|
+
|
|
7
|
+
import { classCandidates } from '../shared/class-candidates';
|
|
8
|
+
|
|
9
|
+
export type KitCodeTokenKind =
|
|
10
|
+
| 'plain' | 'comment' | 'keyword' | 'string' | 'number' | 'constant' | 'function' | 'type'
|
|
11
|
+
| 'variable' | 'property' | 'operator' | 'punctuation' | 'tag' | 'attribute';
|
|
12
|
+
|
|
13
|
+
const TOKEN_CLASS: Readonly<Record<KitCodeTokenKind, string>> = Object.freeze({
|
|
14
|
+
plain: '',
|
|
15
|
+
comment: 'text-fg-muted italic',
|
|
16
|
+
keyword: 'text-primary-on-soft',
|
|
17
|
+
string: 'text-success-on-soft',
|
|
18
|
+
number: 'text-info-on-soft',
|
|
19
|
+
constant: 'text-info-on-soft',
|
|
20
|
+
function: 'text-warning-on-soft',
|
|
21
|
+
type: 'text-info-on-soft',
|
|
22
|
+
variable: 'text-fg',
|
|
23
|
+
property: 'text-fg',
|
|
24
|
+
operator: 'text-fg-muted',
|
|
25
|
+
punctuation: 'text-fg-muted',
|
|
26
|
+
tag: 'text-primary-on-soft',
|
|
27
|
+
attribute: 'text-warning-on-soft',
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function kitCodeTokenClass(kind: string): string {
|
|
31
|
+
return (TOKEN_CLASS as Record<string, string>)[kind] ?? '';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** 代码区:每行一个块;横滚 / 换行两种 */
|
|
35
|
+
// 行高:规格建议 1.6(中文注释是常态);主题头没有 leading 尺度,暂随 text-xs 档的行高(需对方 N-2 一并给出)
|
|
36
|
+
export const KIT_CODE_LINES_SCROLL_CLASS = 'm-0 overflow-x-auto font-mono text-xs text-fg whitespace-pre';
|
|
37
|
+
export const KIT_CODE_LINES_WRAP_CLASS = 'm-0 font-mono text-xs text-fg whitespace-pre-wrap break-words';
|
|
38
|
+
/** 一行:行号槽 + 正文;高亮行带浅底 + 左边条(第二线索,不只靠颜色) */
|
|
39
|
+
export const KIT_CODE_LINE_CLASS = 'flex min-w-max gap-3';
|
|
40
|
+
export const KIT_CODE_LINE_WRAP_CLASS = 'flex gap-3';
|
|
41
|
+
export const KIT_CODE_LINE_MARKED_CLASS = 'flex min-w-max gap-3 bg-primary-soft border-s-emphasis border-primary';
|
|
42
|
+
export const KIT_CODE_LINE_MARKED_WRAP_CLASS = 'flex gap-3 bg-primary-soft border-s-emphasis border-primary';
|
|
43
|
+
/** 行号:右对齐、不可选、读屏隐藏 */
|
|
44
|
+
export const KIT_CODE_GUTTER_CLASS = 'w-8 shrink-0 select-none text-end tabular-nums text-fg-subtle';
|
|
45
|
+
export const KIT_CODE_TEXT_CLASS = 'min-w-0';
|
|
46
|
+
/** 头部:语言 / 文件名标签 */
|
|
47
|
+
export const KIT_CODE_LANG_CLASS = 'text-xs font-medium text-fg-muted';
|
|
48
|
+
/** 双向控制字符警告标记(行首) */
|
|
49
|
+
export const KIT_CODE_BIDI_CLASS = 'inline-flex shrink-0 items-center select-none text-warning-on-soft';
|
|
50
|
+
export const KIT_CODE_NOTE_CLASS = 'text-xs text-fg-subtle';
|
|
51
|
+
|
|
52
|
+
export const KIT_CODE_VIEW_RECIPE_CLASS_CANDIDATES: readonly string[] = classCandidates(
|
|
53
|
+
Object.values(TOKEN_CLASS), KIT_CODE_LINES_SCROLL_CLASS, KIT_CODE_LINES_WRAP_CLASS, KIT_CODE_LINE_CLASS, KIT_CODE_LINE_WRAP_CLASS,
|
|
54
|
+
KIT_CODE_LINE_MARKED_CLASS, KIT_CODE_LINE_MARKED_WRAP_CLASS, KIT_CODE_GUTTER_CLASS, KIT_CODE_TEXT_CLASS, KIT_CODE_LANG_CLASS,
|
|
55
|
+
KIT_CODE_BIDI_CLASS, KIT_CODE_NOTE_CLASS,
|
|
56
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// 紧凑组合配方(knowledge/Kit主题规则与算法.md KT-B7,登记 SF29;参照 Ant Design Space.Compact / genCompactItemStyle、MUI ButtonGroup、Bootstrap input-group、Primer ButtonGroup):
|
|
2
|
+
// 相邻控件(输入框 + 按钮、按钮组、输入组合)并成一组时共用一条边——
|
|
3
|
+
// 1. 组容器 inline-flex(纵向版 flex-col)+ isolate(层叠上下文不外溢);
|
|
4
|
+
// 2. 非末项负外边距 = 控件轮廓宽(-me-control-edge / 纵向 -mb-control-edge,主题头 --spacing-control-edge = --soma-border-width-control),相邻两条边叠成一条;
|
|
5
|
+
// 3. 层叠:禁用 0 < 常态 1 < 聚焦 / 按下 2 < 悬停 3(子项 relative),悬停 / 聚焦项的边盖住邻居;
|
|
6
|
+
// 4. 圆角只留首尾外侧:非首项清起始侧两角、非末项清结束侧两角(逻辑属性,RTL 自动适配;纵向版清上 / 下)——由结构 CSS 按组容器的
|
|
7
|
+
// `data-kit-compact="x|y"` 标记给(控件圆角是无层的形状维度规则,层内工具类压不过它;圆角清零只能在同一套结构规则里做);
|
|
8
|
+
// 5. 首 / 末由子项结构判定(:first-child / :last-child),不由调用方传入。
|
|
9
|
+
// 调用方:组容器写本配方的类串,并打标记 `data-kit-compact`(值取 axis);子项不改自己的类;本文件不认识任何具体构件。
|
|
10
|
+
|
|
11
|
+
import { classCandidates } from '../shared/class-candidates';
|
|
12
|
+
|
|
13
|
+
/** 组容器的标记属性:值 = 'x' | 'y';结构 CSS 据此清子项内侧圆角 */
|
|
14
|
+
export const KIT_COMPACT_GROUP_ATTR = 'data-kit-compact' as const;
|
|
15
|
+
|
|
16
|
+
const ITEM_STACK = '*:relative *:z-1 *:hover:z-3 *:focus-visible:z-2 *:active:z-2 *:disabled:z-0';
|
|
17
|
+
|
|
18
|
+
const HORIZONTAL = `inline-flex isolate items-stretch ${ITEM_STACK} *:not-last:-me-control-edge`;
|
|
19
|
+
const VERTICAL = `flex flex-col isolate ${ITEM_STACK} *:not-last:-mb-control-edge`;
|
|
20
|
+
|
|
21
|
+
/** 紧凑组合的组容器类串(axis = x 横排,y 竖排);同一元素还要打 `data-kit-compact="<axis>"`(markKitCompactGroup) */
|
|
22
|
+
export function kitCompactGroupRecipe(axis: 'x' | 'y' = 'x'): string {
|
|
23
|
+
return axis === 'y' ? VERTICAL : HORIZONTAL;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 给组容器打紧凑组合标记(运行期建的组容器用;编译期发射的写 `data-kit-compact="x"`) */
|
|
27
|
+
export function markKitCompactGroup(el: Element, axis: 'x' | 'y' = 'x'): void {
|
|
28
|
+
el.setAttribute(KIT_COMPACT_GROUP_ATTR, axis);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const KIT_COMPACT_GROUP_CLASS_CANDIDATES: readonly string[] = classCandidates(HORIZONTAL, VERTICAL);
|
package/src/recipes/container.ts
CHANGED
|
@@ -3,18 +3,25 @@
|
|
|
3
3
|
// 以及 slot 视图槽、容器 emphasis、highlight 高亮子配方函数,消除平行重复字面量。
|
|
4
4
|
|
|
5
5
|
import { arrangePairBalance } from 'soma-foundation/arrange';
|
|
6
|
-
import { classCandidates } from '../
|
|
7
|
-
import { mergeClass } from '../
|
|
6
|
+
import { classCandidates } from '../shared/class-candidates';
|
|
7
|
+
import { mergeClass } from '../shared/merge-class';
|
|
8
8
|
import { kitSurfaceRecipe } from './surface';
|
|
9
|
+
import { kitDividerRecipe } from './divider';
|
|
10
|
+
|
|
11
|
+
/** 贴边面板只画底线(KT-B6:贴容器边那侧不画) */
|
|
12
|
+
const KIT_DIVIDER_FOOT_OF_FLUSH = kitDividerRecipe('bottom');
|
|
9
13
|
|
|
10
14
|
/**
|
|
11
15
|
* 筛选带(R04 / 视觉语言第 1 期):列表面板顶部的下沉带(--soma-surface-band,通栏、顶部圆角随面板),取代原先的通栏 hairline;
|
|
12
16
|
* 负外边距抵消面板内边距 p-card,内容位置不变。容器内的段与段用色带与间距分,不用线(线只留给重复项之间:表格行)。
|
|
13
17
|
*/
|
|
14
|
-
export const KIT_LIST_BAR_CLASS = '-mx-card -mt-card rounded-t-
|
|
18
|
+
export const KIT_LIST_BAR_CLASS = '-mx-card -mt-card rounded-t-card bg-surface-band p-card';
|
|
15
19
|
|
|
16
20
|
/** 无容器列表(唯一主体 = 页面本身,container: plain)的筛选带:自己带圆角的下沉带,不再抵消面板内边距(没有面板)。 */
|
|
17
|
-
export const KIT_LIST_BAR_FLAT_CLASS = 'rounded-
|
|
21
|
+
export const KIT_LIST_BAR_FLAT_CLASS = 'rounded-card bg-surface-band p-card';
|
|
22
|
+
|
|
23
|
+
/** 唯一工作面(唯一主体 = 页面上唯一一张白色面)顶部的筛选带:贴着面的顶沿通栏,顶圆角随面(面本身不带内边距,文字位置由对齐轴内边距给)。 */
|
|
24
|
+
export const KIT_LIST_BAR_SOLE_CLASS = 'rounded-t-card bg-surface-band p-card';
|
|
18
25
|
|
|
19
26
|
export const KIT_PART_CARD = 'card' as const;
|
|
20
27
|
export const KIT_PART_PANEL = 'panel' as const;
|
|
@@ -41,20 +48,21 @@ export interface KitContainerRecipeOptions {
|
|
|
41
48
|
|
|
42
49
|
const SURFACE_CLASS: Readonly<Record<KitContainerSurface, string>> = Object.freeze({
|
|
43
50
|
// 标准卡片圆角(rounded-card),实底卡片高于画布
|
|
44
|
-
// 面板级表面(圆角 /
|
|
45
|
-
card: mergeClass('flex flex-col text-fg
|
|
46
|
-
// flush
|
|
47
|
-
flush:
|
|
51
|
+
// 面板级表面(圆角 / 容器外缘宽与色 / 底色 / 容器阴影 / 高光边)只取 recipes/surface.ts 的 panel 级(KT-B2);不再另叠 shadow-sm(不读容器令牌、嵌套不归零)
|
|
52
|
+
card: mergeClass('flex flex-col text-fg', kitSurfaceRecipe('panel')),
|
|
53
|
+
// flush 贴边面板:只画朝下的一条分隔线(分隔线出口 recipes/divider),无外圆角与外阴影
|
|
54
|
+
flush: `flex flex-col rounded-none ${KIT_DIVIDER_FOOT_OF_FLUSH} bg-surface text-fg`,
|
|
48
55
|
// plain 纯结构区块容器:无背景与边框,遵循九维区块间距令牌(gap-section)
|
|
49
56
|
plain: 'flex flex-col bg-transparent text-fg gap-section',
|
|
50
|
-
// well 凹槽容器:低于画布(bg-surface-sunken
|
|
51
|
-
well: 'flex flex-col rounded-
|
|
57
|
+
// well 凹槽容器:低于画布(bg-surface-sunken);外缘读容器令牌(放进面板里即被层级规则去框,KT-L2)
|
|
58
|
+
well: 'flex flex-col rounded-card border-edge border-border-container bg-surface-sunken text-fg',
|
|
52
59
|
});
|
|
53
60
|
|
|
54
61
|
const EMPHASIS_CLASS: Readonly<Record<KitContainerEmphasis, string>> = Object.freeze({
|
|
55
62
|
primary: 'border-primary/40 ring-1 ring-primary/20',
|
|
56
63
|
normal: '',
|
|
57
|
-
|
|
64
|
+
// 不用「面角色 + 透明度」造第八种面(KT-S1):直接取凹槽面
|
|
65
|
+
subtle: 'border-transparent bg-surface-sunken shadow-none',
|
|
58
66
|
});
|
|
59
67
|
|
|
60
68
|
const PADDING_CLASS: Readonly<Record<KitContainerPadding, string>> = Object.freeze({
|
|
@@ -97,7 +105,8 @@ export function kitContainerRecipe(options: KitContainerRecipeOptions = {}): str
|
|
|
97
105
|
export function kitSlotSurfaceRecipe(surface: KitSlotSurface = 'card'): string {
|
|
98
106
|
switch (surface) {
|
|
99
107
|
case 'card':
|
|
100
|
-
|
|
108
|
+
// 外缘只读容器令牌(KT-B2):圆角 rounded-card、宽 border-edge(随边界档)、色 border-border-container、阴影 shadow-xs(= 容器阴影令牌,嵌套层归零)
|
|
109
|
+
return 'rounded-card border-edge border-border-container bg-surface p-card shadow-xs';
|
|
101
110
|
case 'flush':
|
|
102
111
|
return 'p-0 border-0 bg-surface';
|
|
103
112
|
case 'plain':
|
|
@@ -113,9 +122,9 @@ export function kitContainerEmphasisRecipe(emphasis: KitContainerEmphasis = 'nor
|
|
|
113
122
|
case 'primary':
|
|
114
123
|
return 'rounded-lg border border-primary bg-surface-raised p-card shadow-sm';
|
|
115
124
|
case 'normal':
|
|
116
|
-
return 'rounded-
|
|
125
|
+
return 'rounded-card border-edge border-border-container bg-surface p-card';
|
|
117
126
|
case 'subtle':
|
|
118
|
-
return 'rounded-
|
|
127
|
+
return 'rounded-card border-edge border-border-container bg-surface-sunken p-3 text-fg-muted';
|
|
119
128
|
}
|
|
120
129
|
}
|
|
121
130
|
|
|
@@ -159,7 +168,8 @@ const SHELL_TONE_CLASS: Readonly<Record<KitShellTone, string>> = Object.freeze({
|
|
|
159
168
|
export function kitShellRecipe(options: KitShellRecipeOptions = {}): string {
|
|
160
169
|
const tone = options.tone ?? 'raised';
|
|
161
170
|
const shadow = options.shadow ?? true;
|
|
162
|
-
|
|
171
|
+
// 圆角与面板同一写法 rounded-card(KT-R1 / G-R1),外缘宽 border-edge(随边界档,D-03),阴影 shadow-xs = 容器阴影令牌(嵌套层归零,G-L1)
|
|
172
|
+
return ['rounded-card border-edge border-border-container', SHELL_TONE_CLASS[tone] ?? SHELL_TONE_CLASS.raised, shadow ? 'shadow-xs' : ''].filter(Boolean).join(' ');
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
/**
|
package/src/recipes/control.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
// 按钮、输入、选择器、徽标、分段、行内操作、说明钮一律经 kitControlRecipe / kitTextActionRecipe / kitSegmentRecipe / kitHelpTriggerRecipe 取类串,
|
|
7
7
|
// 不再手写各自的按钮类串(原六套并存已迁入)。
|
|
8
8
|
|
|
9
|
-
import { controlRecipe, controlSizeClasses } from 'soma-foundation/kit-control';
|
|
10
|
-
import { classCandidates } from '../
|
|
11
|
-
import type { KitSize } from '../
|
|
9
|
+
import { controlClasses, controlRecipe, controlSizeClasses } from 'soma-foundation/kit-control';
|
|
10
|
+
import { classCandidates } from '../shared/class-candidates';
|
|
11
|
+
import type { KitSize } from '../shared/primitives-types';
|
|
12
12
|
|
|
13
13
|
export const KIT_PART_CONTROL = 'control' as const;
|
|
14
14
|
export const KIT_PART_BUTTON = 'button' as const;
|
|
@@ -72,6 +72,18 @@ export function kitButtonEdgeRecipe(): string {
|
|
|
72
72
|
return BUTTON_EDGE_CLASS;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* 控件轮廓的边(KT-B1「控件轮廓」角色、§4 C6):只取控件引擎 field 部件该变体的描边类(宽 + 控件轮廓色 + 悬停色),与 kitControlRecipe 的输入框逐个相同(D-16 同一条线)。
|
|
77
|
+
* 给自绘的多段控件外壳用(多选框 / 标签输入 / 步进器 / 自绘选择框 / 复选框外圈)——它们的尺寸与布局不是标准输入框,但边必须是同一条控件线。
|
|
78
|
+
* wrapper:外壳不是表单元素(div / span 没有 :enabled),悬停变体去掉 enabled:;hover: false = 禁用 / 只读态整串(不出悬停色)。
|
|
79
|
+
*/
|
|
80
|
+
export function kitControlEdgeRecipe(options: { variant?: 'outline' | 'filled'; wrapper?: boolean; hover?: boolean } = {}): string {
|
|
81
|
+
const tokens = controlClasses({ part: 'field', variant: options.variant ?? 'outline' })
|
|
82
|
+
.filter((t) => /^(?:enabled:hover:)?border(?:-|$)/.test(t))
|
|
83
|
+
.filter((t) => options.hover !== false || !t.includes('hover:'));
|
|
84
|
+
return (options.wrapper === true ? tokens.map((t) => t.replace(/^enabled:/, '')) : tokens).join(' ');
|
|
85
|
+
}
|
|
86
|
+
|
|
75
87
|
/**
|
|
76
88
|
* 控件尺寸子配方函数(返回单行控件尺寸类串:高度 h-*、横向内边距 px-*、字号 text-*)。
|
|
77
89
|
* 供 input.ts 的 BOX_SIZE 等直接同源调用,严禁 .split / .find 回捞。
|
|
@@ -176,4 +188,10 @@ export const KIT_CONTROL_RECIPE_CLASS_CANDIDATES: readonly string[] = classCandi
|
|
|
176
188
|
kitTextActionRecipe('quiet'),
|
|
177
189
|
kitSegmentRecipe(false),
|
|
178
190
|
kitSegmentRecipe(true),
|
|
191
|
+
kitButtonEdgeRecipe(),
|
|
192
|
+
kitControlEdgeRecipe(),
|
|
193
|
+
kitControlEdgeRecipe({ wrapper: true }),
|
|
194
|
+
kitControlEdgeRecipe({ variant: 'filled' }),
|
|
195
|
+
kitControlEdgeRecipe({ variant: 'filled', wrapper: true }),
|
|
179
196
|
);
|
|
197
|
+
// hover: false 只是上面各串的子集,不另列候选
|