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/data/record-card.ts
CHANGED
|
@@ -16,10 +16,13 @@ import {
|
|
|
16
16
|
} from './shape-util';
|
|
17
17
|
import { safeImgSrc } from './d9-util';
|
|
18
18
|
import { kitText } from '../i18n/kit-text';
|
|
19
|
+
import { KIT_STATUS_BADGE_CLASS, KIT_STATUS_DOT_CLASS } from '../recipes/status';
|
|
20
|
+
import { kitTypographyRecipe } from '../recipes/typography';
|
|
21
|
+
import { applyKitReadState, KIT_READ_STATE_EMIT_DEFS, KIT_READ_STATE_PROP_DEFS } from '../base/state-panel';
|
|
19
22
|
import type { SomaDataPort } from 'soma-core';
|
|
20
23
|
import { watchKitOutcome, type KitOutcome } from './outcome-watch';
|
|
21
24
|
import { pickPath } from '../object-renderer/path-pick';
|
|
22
|
-
import type
|
|
25
|
+
import { emptyNode, type ShapeTone } from './shape-util';
|
|
23
26
|
|
|
24
27
|
export const KIT_RECORD_CARD_DEFAULT_MAP = Object.freeze({
|
|
25
28
|
title: 'title', subtitle: 'subtitle', status: 'status', tone: 'tone', facts: 'facts', tags: 'tags', progress: 'progress', actions: 'actions',
|
|
@@ -35,7 +38,7 @@ const VARIANT_CLASS: Readonly<Record<KitRecordVariant, string>> = Object.freeze(
|
|
|
35
38
|
filled: 'border border-transparent bg-surface-sunken',
|
|
36
39
|
});
|
|
37
40
|
const VARIANT_INTERACT: Readonly<Record<KitRecordVariant, string>> = Object.freeze({
|
|
38
|
-
outlined: 'cursor-pointer transition-colors
|
|
41
|
+
outlined: 'cursor-pointer transition-colors state-layer active:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
39
42
|
elevated: 'cursor-pointer transition-shadow hover:shadow-xl active:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
40
43
|
filled: 'cursor-pointer transition-colors hover:bg-surface-raised active:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
41
44
|
});
|
|
@@ -53,12 +56,14 @@ const RAIL_CLASS = 'w-1 shrink-0 self-stretch rounded-full';
|
|
|
53
56
|
const MAIN_CLASS = 'flex flex-1 flex-col gap-3';
|
|
54
57
|
const HEAD_CLASS = 'flex items-start justify-between gap-2';
|
|
55
58
|
const HEAD_TEXT = 'flex flex-col gap-0.5';
|
|
56
|
-
const TITLE_CLASS = '
|
|
59
|
+
const TITLE_CLASS = kitTypographyRecipe('sectionTitle');
|
|
57
60
|
const SUBTITLE_CLASS = 'text-fg-muted';
|
|
58
61
|
const FACTS_CLASS = 'grid grid-cols-2 gap-x-4 gap-y-2';
|
|
59
62
|
const FACT_CLASS = 'flex flex-col gap-0.5';
|
|
60
63
|
const FACT_LABEL = 'text-xs font-medium text-fg-muted';
|
|
61
64
|
const FACT_VALUE = 'text-sm text-fg';
|
|
65
|
+
const STATUS_CLASS = KIT_STATUS_BADGE_CLASS;
|
|
66
|
+
const STATUS_DOT_CLASS = KIT_STATUS_DOT_CLASS;
|
|
62
67
|
const TAGS_CLASS = 'flex flex-wrap gap-1';
|
|
63
68
|
const TAG_CLASS = 'rounded-full bg-surface-sunken px-2 py-0.5 text-xs font-medium text-fg-muted';
|
|
64
69
|
const PROGRESS_CLASS = 'block h-2 w-full overflow-hidden rounded-full';
|
|
@@ -75,7 +80,7 @@ const SECRET_BAR_CLASS = 'flex items-center justify-between gap-2';
|
|
|
75
80
|
export const KIT_RECORD_CARD_CLASS_CANDIDATES: readonly string[] = classTokens(
|
|
76
81
|
Object.values(VARIANT_CLASS), Object.values(VARIANT_INTERACT), LAYOUT_PLAIN, LAYOUT_MEDIA, BODY_ROW_CLASS, MEDIA_CLASS, RAIL_CLASS, MAIN_CLASS, HEAD_CLASS, HEAD_TEXT, TITLE_CLASS, SUBTITLE_CLASS, FACTS_CLASS, FACT_CLASS,
|
|
77
82
|
FACT_LABEL, FACT_VALUE, TAGS_CLASS, TAG_CLASS, PROGRESS_CLASS, PROGRESS_TRACK_CLASS, PROGRESS_FILL_CLASS, FOOT_CLASS, BADGE_BASE, BUTTON_CLASS_TOKENS,
|
|
78
|
-
FACT_ROW_CLASS, FACT_MONO_CLASS, SECRET_CLASS, SECRET_VALUE_CLASS, SECRET_NOTE_CLASS, SECRET_BAR_CLASS,
|
|
83
|
+
STATUS_CLASS, STATUS_DOT_CLASS, FACT_ROW_CLASS, FACT_MONO_CLASS, SECRET_CLASS, SECRET_VALUE_CLASS, SECRET_NOTE_CLASS, SECRET_BAR_CLASS,
|
|
79
84
|
Object.values(TONE_SOFT), Object.values(TONE_DOT),
|
|
80
85
|
);
|
|
81
86
|
|
|
@@ -155,6 +160,10 @@ export function createRecordCard(): SomaComponentDefinition {
|
|
|
155
160
|
subscribing = false;
|
|
156
161
|
};
|
|
157
162
|
const currentProps = new WeakMap<HTMLElement, Record<string, unknown>>();
|
|
163
|
+
/** 错误态的重试钮要抛 retry:renderCard 也会被 outcome 回调直接调用(没有 api),所以按根存一份发射函数 */
|
|
164
|
+
const retryEmitters = new WeakMap<HTMLElement, () => void>();
|
|
165
|
+
/** 加载面板「最短显示」期满后重绘本组件(同样按根存,renderCard 没有 api) */
|
|
166
|
+
const repainters = new WeakMap<HTMLElement, () => void>();
|
|
158
167
|
/** 有效的 secret:配了 outcome 就只认请求结果(成功才有,进行中 / 失败 / 空闲都不显示,旧明文随新一轮请求消失);否则读 data.secret */
|
|
159
168
|
const secretOf = (root: HTMLElement, p: Record<string, unknown>, data: Record<string, unknown>, key: string): Record<string, unknown> => {
|
|
160
169
|
const st = outs.get(root);
|
|
@@ -183,10 +192,13 @@ export function createRecordCard(): SomaComponentDefinition {
|
|
|
183
192
|
secret_hint: { type: 'string', default: '', desc: 'outcome 来源的 secret 说明(如「只显示一次」)' },
|
|
184
193
|
secret_copy_label: { type: 'string', default: '', desc: 'data.secret 的「复制并清除」钮文字;缺省取内置文案(按页面语言)' },
|
|
185
194
|
secret_cleared_text: { type: 'string', default: '', desc: 'data.secret 复制后显示的文字;缺省取内置「已复制」' },
|
|
195
|
+
empty_text: { type: 'string', default: '', desc: '没有记录(data 为空)时的文案;缺省取内置「暂无」文案' },
|
|
196
|
+
...KIT_READ_STATE_PROP_DEFS,
|
|
186
197
|
locale: { type: 'string', default: '', desc: '格式化语言;空则 zh-CN' },
|
|
187
198
|
class: { type: 'string', default: '', desc: '外部传入的类,追加在根节点类串末尾' },
|
|
188
199
|
},
|
|
189
200
|
emits: {
|
|
201
|
+
...KIT_READ_STATE_EMIT_DEFS,
|
|
190
202
|
select: { payload: { item: { type: 'object' } }, desc: '点整卡(selectable 时);item 是源数据对象' },
|
|
191
203
|
action: { payload: { key: { type: 'string' } }, desc: '点底部动作' },
|
|
192
204
|
copy: { payload: { key: { type: 'string' }, ok: { type: 'boolean' } }, desc: '点事实对旁的复制钮;key = 该事实的 label(不带文本,避免凭据再次上行)' },
|
|
@@ -263,6 +275,8 @@ export function createRecordCard(): SomaComponentDefinition {
|
|
|
263
275
|
},
|
|
264
276
|
render(root, p, api) {
|
|
265
277
|
currentProps.set(root, p);
|
|
278
|
+
retryEmitters.set(root, () => { api.emit('retry', {}); });
|
|
279
|
+
repainters.set(root, () => api.refresh());
|
|
266
280
|
ensureOutcome(root, p, api.services);
|
|
267
281
|
renderCard(root, p);
|
|
268
282
|
},
|
|
@@ -286,6 +300,17 @@ export function createRecordCard(): SomaComponentDefinition {
|
|
|
286
300
|
root.removeAttribute('tabindex');
|
|
287
301
|
}
|
|
288
302
|
root.textContent = '';
|
|
303
|
+
// 读状态(有读接口时编译器自动绑 loading / error_text):记录还没到时读取中 / 读取失败 + 重试,与集合三态同一画法(base/state-panel.ts);
|
|
304
|
+
// 记录已有时错误面板在卡内最前、卡保留,读取中只标 aria-busy
|
|
305
|
+
if (applyKitReadState(root, p, { hasContent: Object.keys(data).length > 0, onRetry: () => retryEmitters.get(root)?.(), repaint: () => repainters.get(root)?.() })) return;
|
|
306
|
+
// 没有记录(data 空、也没有 outcome 来源的 secret):画共享的紧凑空态,不画一张只有空标题的卡
|
|
307
|
+
if (Object.keys(data).length === 0 && Object.keys(secretOf(root, p, data, m.secret ?? 'secret')).length === 0) {
|
|
308
|
+
// 卡根是横排 flex:空态占满整行(否则缩成左上角一小块)
|
|
309
|
+
const empty = emptyNode(str(p.empty_text, kitText('soma.kit.empty', undefined, root)));
|
|
310
|
+
empty.classList.add('flex-1');
|
|
311
|
+
root.appendChild(empty);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
289
314
|
|
|
290
315
|
// 有 media:根竖排,顶部整幅图 + 下面内容行;无 media 时内容行就是根本身
|
|
291
316
|
let body: HTMLElement = root;
|
|
@@ -307,13 +332,21 @@ export function createRecordCard(): SomaComponentDefinition {
|
|
|
307
332
|
|
|
308
333
|
const head = mk('div', HEAD_CLASS);
|
|
309
334
|
const text = mk('div', HEAD_TEXT);
|
|
310
|
-
|
|
335
|
+
const titleText = textOf(data[m.title]);
|
|
336
|
+
if (titleText !== '') text.appendChild(mk('h3', TITLE_CLASS, titleText));
|
|
311
337
|
const sub = textOf(data[m.subtitle]);
|
|
312
338
|
if (sub !== '') text.appendChild(mk('p', SUBTITLE_CLASS, sub));
|
|
313
339
|
head.appendChild(text);
|
|
314
340
|
const status = textOf(data[m.status]);
|
|
315
|
-
|
|
316
|
-
|
|
341
|
+
// 标题 / 副标题 / 状态都没有(如主从页把头让给详情头):不画头行,不留空行
|
|
342
|
+
if (status !== '') {
|
|
343
|
+
// 状态徽标:浅底 + 圆点 + 文字(与表格 / 紧凑列表 / 条目列表同一种呈现)
|
|
344
|
+
const badge = mk('span', `${STATUS_CLASS} ${TONE_SOFT[tone]}`);
|
|
345
|
+
badge.appendChild(mk('span', `${STATUS_DOT_CLASS} ${TONE_DOT[tone]}`));
|
|
346
|
+
badge.appendChild(mk('span', '', status));
|
|
347
|
+
head.appendChild(badge);
|
|
348
|
+
}
|
|
349
|
+
if (titleText !== '' || sub !== '' || status !== '') main.appendChild(head);
|
|
317
350
|
|
|
318
351
|
const facts = recordFactsOf(data, m.facts, p.fields, str(p.locale));
|
|
319
352
|
if (facts.length > 0) {
|
|
@@ -24,11 +24,11 @@ import { createKeyboardWiring, type CollectionItem } from 'soma-core/keyboard';
|
|
|
24
24
|
import { SOMA_SIZE_UNITS } from 'soma-foundation/theme';
|
|
25
25
|
import { KIT_DATA_LIMITS } from 'soma-foundation/kit-limits';
|
|
26
26
|
import { KIT_GRAMMAR_RUNTIME as grammarJson } from '../generated/kit-grammar-runtime';
|
|
27
|
-
import { bool, createKitController, joinClass, num, str } from '../base/shared';
|
|
27
|
+
import { applyCompositeField, bool, createKitController, ID_PROPS, INVALID_PROPS, joinClass, num, setAttr, str } from '../base/shared';
|
|
28
28
|
import { kitIcon } from '../base/icons';
|
|
29
29
|
import { kitLocaleAt, kitText } from '../i18n/kit-text';
|
|
30
30
|
import { setKitFace } from '../recipes';
|
|
31
|
-
import { actionButton, BUTTON_CLASS_TOKENS, classTokens, keyMap, mk, rowsOf, textOf } from './shape-util';
|
|
31
|
+
import { actionButton, BUTTON_CLASS_TOKENS, classTokens, keyMap, mk, retryButton, rowsOf, textOf } from './shape-util';
|
|
32
32
|
import { KIT_MODAL_CLASS_CANDIDATES, mountKitModal, type KitModalHandle, type KitModalSize } from './modal-dialog';
|
|
33
33
|
|
|
34
34
|
// 尺寸闭集读语法,行数 / 选择数上限读 design 的 kit-limits
|
|
@@ -43,15 +43,15 @@ export const KIT_RECORD_PICKER_DEFAULT_MAP = Object.freeze({ id: 'id', title: 't
|
|
|
43
43
|
// ───────── 样式常量 ─────────
|
|
44
44
|
|
|
45
45
|
const ROOT_CLASS = 'flex items-center gap-2';
|
|
46
|
-
const TRIGGER_CLASS = 'inline-flex h-
|
|
46
|
+
const TRIGGER_CLASS = 'inline-flex h-8 min-w-0 flex-1 items-center justify-between gap-2 rounded-md border border-border bg-surface px-3 text-sm text-fg transition-colors state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50';
|
|
47
47
|
const TRIGGER_TEXT = 'min-w-0 truncate text-start';
|
|
48
48
|
const TRIGGER_PLACEHOLDER = 'min-w-0 truncate text-start text-fg-subtle';
|
|
49
49
|
const TRIGGER_CARET = 'shrink-0 text-fg-subtle';
|
|
50
|
-
const CLEAR_CLASS = 'inline-flex h-
|
|
50
|
+
const CLEAR_CLASS = 'inline-flex h-8 shrink-0 items-center justify-center rounded-md px-2 text-xs text-fg-muted transition-colors hover:bg-state-layer-hover active:bg-state-layer-press hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
51
51
|
const SEARCH_ROW = 'flex items-center gap-2';
|
|
52
|
-
const SEARCH_CLASS = 'block h-
|
|
52
|
+
const SEARCH_CLASS = 'block h-8 min-w-0 flex-1 appearance-none autofill-clear rounded-md border border-border bg-surface px-2 text-sm text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
53
53
|
const LIST_CLASS = 'flex max-h-80 min-h-24 flex-col gap-1 overflow-y-auto rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
54
|
-
const ITEM_CLASS = 'flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg transition-colors hover:bg-
|
|
54
|
+
const ITEM_CLASS = 'flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg transition-colors hover:bg-state-layer-hover active:bg-state-layer-press';
|
|
55
55
|
const ITEM_ON_CLASS = 'flex cursor-pointer items-center gap-2 rounded-md bg-primary-soft px-2 py-1.5 text-sm text-primary-on-soft';
|
|
56
56
|
const ITEM_OFF_CLASS = 'flex cursor-not-allowed items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-subtle opacity-50';
|
|
57
57
|
const CURSOR_CLASS = 'ring-2 ring-ring';
|
|
@@ -159,6 +159,9 @@ export function createRecordPicker(): SomaComponentDefinition {
|
|
|
159
159
|
disabled: { type: 'boolean', default: false, desc: '禁用触发钮' },
|
|
160
160
|
size: { type: 'enum', values: LIMITS.sizes, default: 'md', desc: '弹窗宽度档' },
|
|
161
161
|
label: { type: 'string', default: '', desc: '触发钮的无障碍名称' },
|
|
162
|
+
id: ID_PROPS.id,
|
|
163
|
+
labelledby: ID_PROPS.labelledby,
|
|
164
|
+
...INVALID_PROPS,
|
|
162
165
|
class: { type: 'string', default: '', desc: '外部传入的类,追加在根节点类串末尾' },
|
|
163
166
|
},
|
|
164
167
|
emits: {
|
|
@@ -233,6 +236,9 @@ export function createRecordPicker(): SomaComponentDefinition {
|
|
|
233
236
|
trigger.disabled = bool(p.disabled);
|
|
234
237
|
if (str(p.label) !== '') trigger.setAttribute('aria-label', `${str(p.label)}${text === '' ? '' : `:${text}`}`);
|
|
235
238
|
else trigger.removeAttribute('aria-label');
|
|
239
|
+
// 作表单字段:触发钮接 id(label for / 点标签聚焦),根承载字段名 / 说明 / 错误关联与无效标记
|
|
240
|
+
setAttr(trigger, 'id', str(p.id));
|
|
241
|
+
applyCompositeField(root, p);
|
|
236
242
|
const clearBtn = clearBox.firstElementChild as HTMLButtonElement | null;
|
|
237
243
|
if (clearBtn) clearBtn.textContent = str(p.clear_text, kitText('soma.kit.clear', undefined, root));
|
|
238
244
|
clearBox.hidden = !(bool(p.clearable) && committed.length > 0 && !bool(p.disabled));
|
|
@@ -320,7 +326,7 @@ export function createRecordPicker(): SomaComponentDefinition {
|
|
|
320
326
|
if (failure !== '') {
|
|
321
327
|
const alert = mk('div', EMPTY_CLASS, failure);
|
|
322
328
|
alert.setAttribute('role', 'alert');
|
|
323
|
-
alert.appendChild(
|
|
329
|
+
alert.appendChild(retryButton('retry', kitText('soma.kit.ct_retry', undefined, root)));
|
|
324
330
|
list.appendChild(alert);
|
|
325
331
|
}
|
|
326
332
|
if (shown.length === 0) {
|
package/src/data/resident.ts
CHANGED
|
@@ -7,8 +7,10 @@ import { createKitObjectForm } from './object-form';
|
|
|
7
7
|
import { createRowEditor } from './row-editor';
|
|
8
8
|
import { FLOW_EDITOR_CONTRACT } from './flow-editor-contract';
|
|
9
9
|
import { createKitTableActions } from '../object-renderer/table-actions';
|
|
10
|
+
import { createKitActionMore } from '../object-renderer/action-more';
|
|
10
11
|
import { createKitTableTools } from '../object-renderer/table-tools';
|
|
11
12
|
import { createKitTableSummary } from '../object-renderer/table-summary';
|
|
13
|
+
import { createKitTableGap } from '../object-renderer/table-gap';
|
|
12
14
|
import { createKitCollectionState, createKitTableHead } from '../object-renderer/collection-parts';
|
|
13
15
|
import { createKitTabsWiring } from '../frames/tabs-frame/wiring';
|
|
14
16
|
import { createKitSplitWiring } from '../frames/split-frame/wiring';
|
|
@@ -20,6 +22,8 @@ import { createKitRedirect } from './redirect';
|
|
|
20
22
|
import { createKitWorkspace } from '../frames/workspace-frame/view';
|
|
21
23
|
import { createKitPageBar } from '../frames/page-bar';
|
|
22
24
|
import { createKitPageStatus } from '../frames/page-status';
|
|
25
|
+
import { createKitListSummary } from '../frames/list-summary';
|
|
26
|
+
import { createKitAccessGate } from './access-gate';
|
|
23
27
|
|
|
24
28
|
/** 常驻数据组件表(KitObjectForm 的行模板按基础组件表生成) */
|
|
25
29
|
export function createKitResidentDataComponents(
|
|
@@ -41,9 +45,11 @@ export function createKitResidentDataComponents(
|
|
|
41
45
|
RowEditor: rowEditor,
|
|
42
46
|
KitObjectForm: createKitObjectForm({ ...baseComponents, RowEditor: rowEditor, FlowEditor: flowEditorShell }),
|
|
43
47
|
KitTableActions: createKitTableActions(),
|
|
48
|
+
KitActionMore: createKitActionMore(),
|
|
44
49
|
KitTableHead: createKitTableHead(),
|
|
45
50
|
KitTableTools: createKitTableTools(),
|
|
46
51
|
KitTableSummary: createKitTableSummary(),
|
|
52
|
+
KitTableGap: createKitTableGap(),
|
|
47
53
|
KitCollectionState: createKitCollectionState(),
|
|
48
54
|
KitTabsWiring: createKitTabsWiring(),
|
|
49
55
|
KitSplitWiring: createKitSplitWiring(),
|
|
@@ -55,5 +61,7 @@ export function createKitResidentDataComponents(
|
|
|
55
61
|
KitWorkspace: createKitWorkspace(),
|
|
56
62
|
KitPageBar: createKitPageBar(),
|
|
57
63
|
KitPageStatus: createKitPageStatus(),
|
|
64
|
+
KitListSummary: createKitListSummary(),
|
|
65
|
+
KitAccessGate: createKitAccessGate(),
|
|
58
66
|
};
|
|
59
67
|
}
|
package/src/data/result-panel.ts
CHANGED
|
@@ -28,11 +28,13 @@ const ROOT_COMPACT_CLASS = '@container flex flex-col items-center gap-2 px-4 py-
|
|
|
28
28
|
const ICON_CLASS = 'flex h-16 w-16 items-center justify-center rounded-full text-2xl font-semibold';
|
|
29
29
|
const ICON_CODE_CLASS = 'flex h-16 min-w-24 items-center justify-center rounded-lg px-4 text-2xl font-semibold';
|
|
30
30
|
const TITLE_CLASS = 'text-xl font-semibold text-fg';
|
|
31
|
+
/** 整页 / 整卡结果(非 compact)的主标题:门户展示档(真源 structure.displayTier);compact 嵌在卡片里的结果仍用 TITLE_CLASS */
|
|
32
|
+
const TITLE_DISPLAY_CLASS = 'text-display text-fg';
|
|
31
33
|
const SUBTITLE_CLASS = 'max-w-md text-sm text-fg-muted';
|
|
32
34
|
const ACTIONS_CLASS = 'flex flex-wrap items-center justify-center gap-3 pt-4';
|
|
33
35
|
|
|
34
36
|
export const KIT_RESULT_PANEL_CLASS_CANDIDATES: readonly string[] = classTokens(
|
|
35
|
-
ROOT_CLASS, ROOT_COMPACT_CLASS, ICON_CLASS, ICON_CODE_CLASS, TITLE_CLASS, SUBTITLE_CLASS, ACTIONS_CLASS,
|
|
37
|
+
ROOT_CLASS, ROOT_COMPACT_CLASS, ICON_CLASS, ICON_CODE_CLASS, TITLE_CLASS, TITLE_DISPLAY_CLASS, SUBTITLE_CLASS, ACTIONS_CLASS,
|
|
36
38
|
Object.values(TONE_SOFT), BUTTON_CLASS_TOKENS,
|
|
37
39
|
);
|
|
38
40
|
|
|
@@ -145,7 +147,7 @@ export function createResultPanel(): SomaComponentDefinition {
|
|
|
145
147
|
icon.setAttribute('aria-hidden', 'true');
|
|
146
148
|
icon.setAttribute('data-kit-result-status', model.status);
|
|
147
149
|
root.appendChild(icon);
|
|
148
|
-
root.appendChild(mk('h2', TITLE_CLASS, model.title));
|
|
150
|
+
root.appendChild(mk('h2', compact ? TITLE_CLASS : TITLE_DISPLAY_CLASS, model.title));
|
|
149
151
|
if (model.subtitle !== '') root.appendChild(mk('p', SUBTITLE_CLASS, model.subtitle));
|
|
150
152
|
if (model.actions.length > 0) {
|
|
151
153
|
const bar = mk('div', ACTIONS_CLASS);
|
package/src/data/rich-text.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// `source: markdown`(A17):内容是 Markdown 文本,转成 HTML 后经同一净化器渲染,固定只读;见「Markdown(只读来源)」段。
|
|
11
11
|
|
|
12
12
|
import type { SomaComponentDefinition } from 'soma-core';
|
|
13
|
-
import { bool, createKitController, joinClass, num, str } from '../base/shared';
|
|
13
|
+
import { ID_PROPS, INVALID_PROPS, applyCommon, bool, createKitController, joinClass, num, str } from '../base/shared';
|
|
14
14
|
import { kitText, type KitTextKey } from '../i18n/kit-text';
|
|
15
15
|
import { setKitFace } from '../recipes';
|
|
16
16
|
import { classTokens, mk, recOf } from './shape-util';
|
|
@@ -289,6 +289,8 @@ export function createRichTextEditor(): SomaComponentDefinition {
|
|
|
289
289
|
source: { type: 'enum', values: ['html', 'markdown'], default: 'html', desc: '内容来源:markdown 时 value / data.markdown 是 Markdown 文本,转成 HTML 后经同一净化器渲染,组件固定只读(不出工具栏)' },
|
|
290
290
|
max_length: { type: 'number', default: 0, desc: '文字长度上限提示;非正数不显示计数。超出只变警示色,不截断' },
|
|
291
291
|
label: { type: 'string', default: '', desc: '编辑区的无障碍名称' },
|
|
292
|
+
...ID_PROPS,
|
|
293
|
+
...INVALID_PROPS,
|
|
292
294
|
link_text: { type: 'string', default: '', desc: '链接输入框的占位 / 无障碍名称' },
|
|
293
295
|
apply_text: { type: 'string', default: '', desc: '链接确认钮文案' },
|
|
294
296
|
class: { type: 'string', default: '', desc: '外部传入的类,追加在根节点类串末尾' },
|
|
@@ -608,6 +610,20 @@ export function createRichTextEditor(): SomaComponentDefinition {
|
|
|
608
610
|
const init = initialHtml();
|
|
609
611
|
if (init !== lastInit) { lastInit = init; setContent(init); }
|
|
610
612
|
if (holder) holder.textContent = str(p.placeholder);
|
|
613
|
+
// 编辑区(role=textbox)承载 id / 可访问名 / 必填 / 无效 / 说明与标签关联;表单经 props 传入,重绘不丢
|
|
614
|
+
if (area) {
|
|
615
|
+
applyCommon(area, {
|
|
616
|
+
id: p.id,
|
|
617
|
+
aria_label: str(p.aria_label, str(p.label, kitText('soma.kit.rt_area', undefined, api.host))),
|
|
618
|
+
labelledby: p.labelledby,
|
|
619
|
+
required: ro ? false : p.required,
|
|
620
|
+
invalid: p.invalid,
|
|
621
|
+
describedby: p.describedby,
|
|
622
|
+
aria_describedby: p.aria_describedby,
|
|
623
|
+
errormessage: p.errormessage,
|
|
624
|
+
aria_errormessage: p.aria_errormessage,
|
|
625
|
+
});
|
|
626
|
+
}
|
|
611
627
|
refresh();
|
|
612
628
|
},
|
|
613
629
|
};
|
package/src/data/row-editor.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// 录入草稿在组件内,重画与 columns 选项变化都不丢;数据只经 textContent / value 写入。
|
|
14
14
|
|
|
15
15
|
import type { SomaComponentDefinition } from 'soma-core';
|
|
16
|
-
import { bool, createKitController, FIELD_CLASS, formatValue, joinClass, num, str, type KitApi } from '../base/shared';
|
|
16
|
+
import { applyCommon, bool, createKitController, FIELD_CLASS, formatValue, ID_PROPS, INVALID_PROPS, joinClass, nextUid, num, str, type KitApi } from '../base/shared';
|
|
17
17
|
import { kitText, type KitTextKey } from '../i18n/kit-text';
|
|
18
18
|
import { setKitFace } from '../recipes';
|
|
19
19
|
import { KIT_BUSY_PROP_DEFS, kitBusyOf } from '../base/action-busy';
|
|
@@ -21,7 +21,8 @@ import { KIT_DATE_CLASS_CANDIDATES, mountKitDateField } from '../base/date';
|
|
|
21
21
|
import { KIT_LISTBOX_CLASS_CANDIDATES } from '../base/listbox-core';
|
|
22
22
|
import { createKitEmbedBag, mountKitSelectField, type KitEmbedBag } from './embed';
|
|
23
23
|
import { fetchRemoteOptionRows } from './remote-options';
|
|
24
|
-
import { actionButton, BUTTON_CLASS_TOKENS, classTokens, emptyNode, mk, recOf, rowsOf, textOf, TONE_SOFT } from './shape-util';
|
|
24
|
+
import { actionButton, BUTTON_CLASS_TOKENS, classTokens, emptyNode, mk, recOf, retryButton, rowsOf, textOf, TONE_SOFT } from './shape-util';
|
|
25
|
+
import { TEXT_ACTION_CLASS_TOKENS, textActionButton } from './text-action-button';
|
|
25
26
|
import type { SomaDataPort } from 'soma-core';
|
|
26
27
|
import { askKitConfirm } from './confirm-dialog';
|
|
27
28
|
import { watchKitOutcome } from './outcome-watch';
|
|
@@ -54,6 +55,14 @@ const CELL_CLASS = 'min-w-0 break-all text-sm text-fg';
|
|
|
54
55
|
const CELL_MONO = 'min-w-0 break-all font-mono text-xs text-fg-muted';
|
|
55
56
|
const CELL_MUTED = 'min-w-0 break-all text-sm text-fg-muted';
|
|
56
57
|
const END_CLASS = 'col-span-2 justify-self-end';
|
|
58
|
+
// 带操作列(结构可改)的行:横排弹性行——数据格按份数分宽(flex-<份数>,可缩可折行),操作格定宽不缩、内容靠右;
|
|
59
|
+
// 操作钮文案单行,不会被 12 栅格里 2 份的窄轨挤成逐字折行。不带操作列的行仍是 12 栅格,输出不变。
|
|
60
|
+
const FLEX_SPAN: Record<number, string> = {
|
|
61
|
+
1: 'flex-1', 2: 'flex-2', 3: 'flex-3', 4: 'flex-4', 5: 'flex-5', 6: 'flex-6',
|
|
62
|
+
7: 'flex-7', 8: 'flex-8', 9: 'flex-9', 10: 'flex-10', 11: 'flex-11', 12: 'flex-12',
|
|
63
|
+
};
|
|
64
|
+
const END_FLEX_CLASS = 'flex w-24 shrink-0 justify-end';
|
|
65
|
+
const toFlexRow = (cls: string): string => cls.replace('grid grid-cols-12', 'flex');
|
|
57
66
|
const FORM_CLASS = 'grid gap-3';
|
|
58
67
|
const FIELD_WRAP = 'flex flex-col gap-1';
|
|
59
68
|
const LABEL_CLASS = 'text-xs font-medium text-fg-muted';
|
|
@@ -63,6 +72,9 @@ const ERROR_CLASS = 'text-sm text-danger-on-soft';
|
|
|
63
72
|
const LIST_WRAP = 'flex flex-col';
|
|
64
73
|
const NUM_ALIGN = 'text-end tabular-nums';
|
|
65
74
|
const FOOTER_ROW_CLASS = 'grid grid-cols-12 items-center gap-2 border-t border-border-divider px-2 py-2 text-sm font-semibold text-fg';
|
|
75
|
+
const HEAD_END_CLASS = toFlexRow(HEAD_CLASS);
|
|
76
|
+
const ROW_END_CLASS = toFlexRow(ROW_CLASS);
|
|
77
|
+
const FOOTER_END_CLASS = toFlexRow(FOOTER_ROW_CLASS);
|
|
66
78
|
const COUNT_CLASS = 'text-xs text-fg-subtle';
|
|
67
79
|
/** 出错单元格的外框(令牌色环,不撑行高;圆角不在此处手写,沿用单元格自身) */
|
|
68
80
|
const CELL_ERROR_CLASS = 'ring-1 ring-danger';
|
|
@@ -71,8 +83,8 @@ const DATE_FIELD_CLASS = 'block h-9 w-full rounded-md border border-border bg-su
|
|
|
71
83
|
export const KIT_ROW_EDITOR_CLASS_CANDIDATES: readonly string[] = classTokens(
|
|
72
84
|
ROOT_CLASS, TITLE_CLASS, HINT_CLASS, HEAD_CLASS, ROW_CLASS, CELL_CLASS, CELL_MONO, CELL_MUTED, END_CLASS, FORM_CLASS, FIELD_WRAP,
|
|
73
85
|
LABEL_CLASS, REQUIRED_MARK, TEXTAREA_LIKE, ERROR_CLASS, LIST_WRAP, Object.values(SPAN_CLASS), Object.values(FORM_COLS),
|
|
74
|
-
FIELD_CLASS.md, BUTTON_CLASS_TOKENS, 'self-end', '@container', NUM_ALIGN, FOOTER_ROW_CLASS, COUNT_CLASS, CELL_ERROR_CLASS, DATE_FIELD_CLASS, KIT_DATE_CLASS_CANDIDATES, KIT_LISTBOX_CLASS_CANDIDATES,
|
|
75
|
-
STAGE_BAR_CLASS, STAGE_BTNS_CLASS, STAGE_MARK_CLASS, STAGE_NOTE_CLASS,
|
|
86
|
+
FIELD_CLASS.md, BUTTON_CLASS_TOKENS, TEXT_ACTION_CLASS_TOKENS, 'self-end', '@container', NUM_ALIGN, FOOTER_ROW_CLASS, HEAD_END_CLASS, ROW_END_CLASS, FOOTER_END_CLASS, END_FLEX_CLASS, Object.values(FLEX_SPAN).join(' '), COUNT_CLASS, CELL_ERROR_CLASS, DATE_FIELD_CLASS, KIT_DATE_CLASS_CANDIDATES, KIT_LISTBOX_CLASS_CANDIDATES,
|
|
87
|
+
STAGE_BAR_CLASS, STAGE_BTNS_CLASS, STAGE_MARK_CLASS, STAGE_NOTE_CLASS, 'sr-only',
|
|
76
88
|
);
|
|
77
89
|
|
|
78
90
|
// ── 数据规整纯函数:列声明、单元格文字、录入校验、草稿转行 ──
|
|
@@ -454,7 +466,7 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
454
466
|
const box = mk('span', FIELD_WRAP);
|
|
455
467
|
box.appendChild(holder);
|
|
456
468
|
const loading = column.optionsRetryState === 'loading';
|
|
457
|
-
const retry =
|
|
469
|
+
const retry = retryButton('options_retry', column.optionsRetryLabel ?? kitText(loading ? 'soma.kit.rows_options_loading' : 'soma.kit.ct_retry'));
|
|
458
470
|
retry.setAttribute('data-kit-option-key', column.optionsKey);
|
|
459
471
|
if (loading) retry.setAttribute('aria-disabled', 'true');
|
|
460
472
|
box.appendChild(retry);
|
|
@@ -658,8 +670,8 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
658
670
|
props: {
|
|
659
671
|
data: { type: 'object', default: {}, desc: '{ title?, hint?, rows[], error? }' },
|
|
660
672
|
value: { type: 'array', default: [], desc: '行数组(作表单字段控件时由表单给出,优先于 data.rows);change { value } 抛出完整行数组' },
|
|
661
|
-
|
|
662
|
-
|
|
673
|
+
...ID_PROPS,
|
|
674
|
+
...INVALID_PROPS,
|
|
663
675
|
disabled: { type: 'boolean', default: false, desc: '禁用:同只读(无录入区、删除钮与单格编辑)' },
|
|
664
676
|
edit_mode: { type: 'enum', values: ['append', 'inline'], default: 'append', desc: 'append(缺省)= 下方录入区逐条添加;inline = 行内多行编辑,每行每格就地可改,每次改动抛 change(作表单字段时值随表单提交)' },
|
|
665
677
|
locked_key: { type: 'string', default: '', desc: '行级只读:该字段为真的行,所有列显示为纯文字、不可改(如敏感字段不允许勾选);提交校验也跳过这些行。只在 edit_mode: inline 生效' },
|
|
@@ -932,14 +944,33 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
932
944
|
// 自绘下拉的载体是 hidden input,可见且可聚焦的是同壳的 combobox
|
|
933
945
|
const visible = control.closest<HTMLElement>('[data-kit-select-host]')?.querySelector<HTMLElement>('[role="combobox"]') ?? control;
|
|
934
946
|
const wrap = control.closest<HTMLElement>('[data-kit-row] > span');
|
|
947
|
+
// 错误文字节点(仅读屏可见,不加行高):控件 aria-describedby 指向它,title 只作鼠标悬停的补充
|
|
948
|
+
const errNode = wrap?.querySelector<HTMLElement>('[data-kit-cell-error]') ?? null;
|
|
949
|
+
const describedTokens = (visible.getAttribute('aria-describedby') ?? '').split(/\s+/).filter((t) => t !== '');
|
|
935
950
|
if (message !== undefined) {
|
|
936
951
|
visible.setAttribute('aria-invalid', 'true');
|
|
937
952
|
wrap?.classList.add(...tokens);
|
|
938
953
|
wrap?.setAttribute('title', message);
|
|
954
|
+
if (wrap) {
|
|
955
|
+
const node = errNode ?? mk('span', 'sr-only');
|
|
956
|
+
if (!errNode) {
|
|
957
|
+
node.setAttribute('data-kit-cell-error', '');
|
|
958
|
+
node.id = nextUid('kit-cell-err');
|
|
959
|
+
wrap.appendChild(node);
|
|
960
|
+
}
|
|
961
|
+
node.textContent = message;
|
|
962
|
+
if (!describedTokens.includes(node.id)) visible.setAttribute('aria-describedby', [...describedTokens, node.id].join(' '));
|
|
963
|
+
}
|
|
939
964
|
} else {
|
|
940
965
|
visible.removeAttribute('aria-invalid');
|
|
941
966
|
wrap?.classList.remove(...tokens);
|
|
942
967
|
wrap?.removeAttribute('title');
|
|
968
|
+
if (errNode) {
|
|
969
|
+
const rest = describedTokens.filter((t) => t !== errNode.id);
|
|
970
|
+
if (rest.length > 0) visible.setAttribute('aria-describedby', rest.join(' '));
|
|
971
|
+
else visible.removeAttribute('aria-describedby');
|
|
972
|
+
errNode.remove();
|
|
973
|
+
}
|
|
943
974
|
}
|
|
944
975
|
});
|
|
945
976
|
// 根要能接住表单的 focus() 再转交给出错单元格
|
|
@@ -1020,21 +1051,24 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1020
1051
|
list.textContent = '';
|
|
1021
1052
|
const shown = cols.filter((c) => c.list);
|
|
1022
1053
|
const structural = !readonly && !fixedRows;
|
|
1023
|
-
const spanOf = (c: KitRowColumn): string => `${SPAN_CLASS[c.span] ?? 'col-span-2'}${isNumericRowKind(c.kind) ? ` ${NUM_ALIGN}` : ''}`;
|
|
1054
|
+
const spanOf = (c: KitRowColumn): string => `${structural ? `${FLEX_SPAN[c.span] ?? 'flex-2'} min-w-0` : SPAN_CLASS[c.span] ?? 'col-span-2'}${isNumericRowKind(c.kind) ? ` ${NUM_ALIGN}` : ''}`;
|
|
1024
1055
|
if (st.rows.length === 0) {
|
|
1025
1056
|
list.appendChild(emptyNode(str(p.empty_text, kitText('soma.kit.empty', undefined, root))));
|
|
1026
1057
|
} else {
|
|
1027
|
-
const head = mk('div', HEAD_CLASS);
|
|
1058
|
+
const head = mk('div', structural ? HEAD_END_CLASS : HEAD_CLASS);
|
|
1028
1059
|
for (const c of shown) {
|
|
1029
1060
|
const cell = mk('span', spanOf(c), c.label);
|
|
1030
1061
|
if (c.required && c.editable && !readonly) cell.appendChild(mk('span', REQUIRED_MARK, ' *'));
|
|
1031
1062
|
head.appendChild(cell);
|
|
1032
1063
|
}
|
|
1033
|
-
if (structural) head.appendChild(mk('span',
|
|
1064
|
+
if (structural) head.appendChild(mk('span', END_FLEX_CLASS, str(p.action_label)));
|
|
1034
1065
|
list.appendChild(head);
|
|
1035
1066
|
st.rows.forEach((row, index) => {
|
|
1036
|
-
const tr = mk('div', ROW_CLASS);
|
|
1067
|
+
const tr = mk('div', structural ? ROW_END_CLASS : ROW_CLASS);
|
|
1037
1068
|
tr.setAttribute('data-kit-row', String(index));
|
|
1069
|
+
const rowName = kitText('soma.kit.rows_row_n', { n: index + 1 }, root);
|
|
1070
|
+
tr.setAttribute('role', 'group');
|
|
1071
|
+
tr.setAttribute('aria-label', rowName);
|
|
1038
1072
|
for (const c of shown) {
|
|
1039
1073
|
const wrap = mk('span', `${spanOf(c)} min-w-0`);
|
|
1040
1074
|
if (readonly || !c.editable || (str(p.locked_key) !== '' && row[str(p.locked_key)] === true)) {
|
|
@@ -1047,9 +1081,10 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1047
1081
|
tr.appendChild(wrap);
|
|
1048
1082
|
}
|
|
1049
1083
|
if (structural) {
|
|
1050
|
-
const cell = mk('span',
|
|
1051
|
-
const btn =
|
|
1084
|
+
const cell = mk('span', END_FLEX_CLASS);
|
|
1085
|
+
const btn = textActionButton('remove', str(p.remove_label, kitText('soma.kit.delete', undefined, root)), 'danger');
|
|
1052
1086
|
btn.setAttribute('data-kit-index', String(index));
|
|
1087
|
+
btn.setAttribute('aria-label', `${str(p.remove_label, kitText('soma.kit.delete', undefined, root))} ${rowName}`);
|
|
1053
1088
|
cell.appendChild(btn);
|
|
1054
1089
|
tr.appendChild(cell);
|
|
1055
1090
|
}
|
|
@@ -1058,7 +1093,7 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1058
1093
|
if (str(p.footer, 'none') === 'sum') {
|
|
1059
1094
|
const totals = rowTotals(shown, st.rows);
|
|
1060
1095
|
const labelCol = shown.find((c) => totals[c.key] === undefined);
|
|
1061
|
-
const foot = mk('div', FOOTER_ROW_CLASS);
|
|
1096
|
+
const foot = mk('div', structural ? FOOTER_END_CLASS : FOOTER_ROW_CLASS);
|
|
1062
1097
|
foot.setAttribute('data-kit-footer', 'sum');
|
|
1063
1098
|
for (const c of shown) {
|
|
1064
1099
|
const total = totals[c.key];
|
|
@@ -1067,7 +1102,7 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1067
1102
|
if (total !== undefined) cell.setAttribute('data-kit-total', c.key);
|
|
1068
1103
|
foot.appendChild(cell);
|
|
1069
1104
|
}
|
|
1070
|
-
if (structural) foot.appendChild(mk('span',
|
|
1105
|
+
if (structural) foot.appendChild(mk('span', END_FLEX_CLASS));
|
|
1071
1106
|
list.appendChild(foot);
|
|
1072
1107
|
}
|
|
1073
1108
|
}
|
|
@@ -1131,6 +1166,19 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1131
1166
|
bindStageOutcome(root, p);
|
|
1132
1167
|
}
|
|
1133
1168
|
if (p.id !== undefined && str(p.id) !== '') root.id = str(p.id);
|
|
1169
|
+
// 根是一组行:role=group(不让具名 section 变成 region 地标);名字取表单传入的标签 id / aria_label / 标题;必填 / 无效 / 说明关联由 props 写入,重绘不丢
|
|
1170
|
+
root.setAttribute('role', 'group');
|
|
1171
|
+
applyCommon(root, {
|
|
1172
|
+
id: root.id,
|
|
1173
|
+
aria_label: str(p.aria_label, textOf(data.title)),
|
|
1174
|
+
labelledby: p.labelledby,
|
|
1175
|
+
required: p.required,
|
|
1176
|
+
invalid: p.invalid,
|
|
1177
|
+
describedby: p.describedby,
|
|
1178
|
+
aria_describedby: p.aria_describedby,
|
|
1179
|
+
errormessage: p.errormessage,
|
|
1180
|
+
aria_errormessage: p.aria_errormessage,
|
|
1181
|
+
});
|
|
1134
1182
|
const shown = cols.filter((c) => c.list);
|
|
1135
1183
|
root.className = joinClass(`@container ${ROOT_CLASS}`, p.class);
|
|
1136
1184
|
|
|
@@ -1169,22 +1217,27 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1169
1217
|
list.appendChild(emptyNode(str(p.empty_text, kitText('soma.kit.empty', undefined, root))));
|
|
1170
1218
|
} else {
|
|
1171
1219
|
list.textContent = '';
|
|
1172
|
-
const
|
|
1173
|
-
const
|
|
1220
|
+
const structural = !readonly && !fixedRows;
|
|
1221
|
+
const head = mk('div', structural ? HEAD_END_CLASS : HEAD_CLASS);
|
|
1222
|
+
const spanOf = (c: KitRowColumn): string => `${structural ? `${FLEX_SPAN[c.span] ?? 'flex-2'} min-w-0` : SPAN_CLASS[c.span] ?? 'col-span-2'}${isNumericRowKind(c.kind) ? ` ${NUM_ALIGN}` : ''}`;
|
|
1174
1223
|
for (const c of shown) head.appendChild(mk('span', spanOf(c), c.label));
|
|
1175
|
-
if (
|
|
1224
|
+
if (structural) head.appendChild(mk('span', END_FLEX_CLASS, str(p.action_label)));
|
|
1176
1225
|
list.appendChild(head);
|
|
1177
1226
|
st.rows.forEach((row, index) => {
|
|
1178
|
-
const tr = mk('div', ROW_CLASS);
|
|
1227
|
+
const tr = mk('div', structural ? ROW_END_CLASS : ROW_CLASS);
|
|
1179
1228
|
tr.setAttribute('data-kit-row', textOf(row[key]));
|
|
1229
|
+
const rowName = kitText('soma.kit.rows_row_n', { n: index + 1 }, root);
|
|
1230
|
+
tr.setAttribute('role', 'group');
|
|
1231
|
+
tr.setAttribute('aria-label', rowName);
|
|
1180
1232
|
for (const c of shown) {
|
|
1181
1233
|
const cls = c.mono || c.kind === 'json' ? CELL_MONO : c.key === shown[0]?.key ? CELL_CLASS : CELL_MUTED;
|
|
1182
1234
|
tr.appendChild(mk('span', `${spanOf(c)} ${cls}`, rowCellText(c, row[c.key], str(p.locale))));
|
|
1183
1235
|
}
|
|
1184
|
-
if (
|
|
1185
|
-
const cell = mk('span',
|
|
1186
|
-
const btn =
|
|
1236
|
+
if (structural) {
|
|
1237
|
+
const cell = mk('span', END_FLEX_CLASS);
|
|
1238
|
+
const btn = textActionButton('remove', str(p.remove_label, kitText('soma.kit.delete', undefined, root)), 'danger');
|
|
1187
1239
|
btn.setAttribute('data-kit-index', String(index));
|
|
1240
|
+
btn.setAttribute('aria-label', `${str(p.remove_label, kitText('soma.kit.delete', undefined, root))} ${rowName}`);
|
|
1188
1241
|
cell.appendChild(btn);
|
|
1189
1242
|
tr.appendChild(cell);
|
|
1190
1243
|
}
|
|
@@ -1193,14 +1246,14 @@ export function createRowEditor(): SomaComponentDefinition {
|
|
|
1193
1246
|
if (str(p.footer, 'none') === 'sum') {
|
|
1194
1247
|
const totals = rowTotals(shown, st.rows);
|
|
1195
1248
|
const labelCol = shown.find((c) => totals[c.key] === undefined);
|
|
1196
|
-
const foot = mk('div', FOOTER_ROW_CLASS);
|
|
1249
|
+
const foot = mk('div', structural ? FOOTER_END_CLASS : FOOTER_ROW_CLASS);
|
|
1197
1250
|
foot.setAttribute('data-kit-footer', 'sum');
|
|
1198
1251
|
for (const c of shown) {
|
|
1199
1252
|
const total = totals[c.key];
|
|
1200
1253
|
const text = total !== undefined ? rowCellText(c, total, str(p.locale)) : c === labelCol ? str(p.total_label, kitText('soma.kit.total_label', undefined, root)) : '';
|
|
1201
1254
|
foot.appendChild(mk('span', spanOf(c), text));
|
|
1202
1255
|
}
|
|
1203
|
-
if (
|
|
1256
|
+
if (structural) foot.appendChild(mk('span', END_FLEX_CLASS));
|
|
1204
1257
|
list.appendChild(foot);
|
|
1205
1258
|
}
|
|
1206
1259
|
}
|
package/src/data/rule-builder.ts
CHANGED
|
@@ -23,6 +23,9 @@ import { KIT_LISTBOX_CLASS_CANDIDATES } from '../base/listbox-core';
|
|
|
23
23
|
import { createKitEmbedBag, mountKitSelectField, type KitEmbedBag } from './embed';
|
|
24
24
|
import { bool, num, str } from '../base/shared';
|
|
25
25
|
import { setKitFace, type KitFaceKind } from '../recipes';
|
|
26
|
+
import { KIT_STATE_EMPTY_BOX } from '../recipes/placeholder';
|
|
27
|
+
import { kitEmphasisButtonRecipe } from '../recipes/emphasis';
|
|
28
|
+
import { mergeClass } from '../object-renderer/merge-class';
|
|
26
29
|
|
|
27
30
|
// ════════════════════════════════════════════════════════════════
|
|
28
31
|
// 单条条件模块(纯函数 + 值控件构造):运算符表、按字段类型取运算符、值形状归一、校验文字、值控件(复用 kit 基础文本类控件的
|
|
@@ -237,10 +240,10 @@ export function describeCondition(cond: RuleCondition, field: RuleField | undefi
|
|
|
237
240
|
|
|
238
241
|
const VALUE_WRAP = 'flex min-w-40 flex-1 flex-wrap items-center gap-2';
|
|
239
242
|
const CONTROL = `${FIELD_CLASS.md} data-kit-invalid:border-danger`;
|
|
240
|
-
const DATE_CONTROL = 'block h-
|
|
243
|
+
const DATE_CONTROL = 'block h-8 w-full rounded-md border border-border bg-surface ps-3 pe-8 text-sm text-fg transition-colors placeholder:text-fg-subtle enabled:hover:border-fg-subtle focus-visible:outline-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-surface-sunken disabled:text-fg-subtle disabled:opacity-60 read-only:bg-surface-sunken data-kit-invalid:border-danger';
|
|
241
244
|
const RANGE_SEP = 'text-fg-subtle';
|
|
242
245
|
const PILLS = 'flex flex-wrap gap-1.5';
|
|
243
|
-
const PILL = 'inline-flex h-8 items-center rounded-full border border-border bg-surface px-3 text-xs text-fg transition-colors
|
|
246
|
+
const PILL = 'inline-flex h-8 items-center rounded-full border border-border bg-surface px-3 text-xs text-fg transition-colors state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-kit-selected:border-primary data-kit-selected:bg-primary-soft data-kit-selected:text-primary-on-soft';
|
|
244
247
|
const HALF = 'min-w-28 flex-1';
|
|
245
248
|
|
|
246
249
|
export const KIT_RULE_CONDITION_CLASS_CANDIDATES: readonly string[] = Object.freeze(
|
|
@@ -589,11 +592,12 @@ const GROUP_CLASS = 'flex flex-col gap-2 rounded-lg border border-border-subtle
|
|
|
589
592
|
const GROUP_NESTED_CLASS = 'flex flex-col gap-2 rounded-lg border border-border-subtle bg-surface-sunken p-3';
|
|
590
593
|
const HEAD_CLASS = 'flex flex-wrap items-center gap-2';
|
|
591
594
|
const MODE_WRAP_CLASS = 'inline-flex rounded-md border border-border bg-surface p-0.5';
|
|
592
|
-
const MODE_BTN_CLASS = 'inline-flex h-7 items-center justify-center rounded-md px-3 text-xs font-medium text-fg-muted transition-colors hover:bg-
|
|
593
|
-
|
|
595
|
+
const MODE_BTN_CLASS = 'inline-flex h-7 items-center justify-center rounded-md px-3 text-xs font-medium text-fg-muted transition-colors hover:bg-state-layer-hover active:bg-state-layer-press focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-kit-selected:bg-primary data-kit-selected:text-primary-fg data-kit-selected:hover:bg-primary-hover';
|
|
596
|
+
// 「非」开关:未选 = 色调按钮(次级),选中 = 实心主色(态差靠填充,不靠描边)
|
|
597
|
+
const NOT_BTN_CLASS = mergeClass(kitEmphasisButtonRecipe('button.toolbar'), 'data-kit-selected:bg-primary data-kit-selected:text-primary-fg');
|
|
594
598
|
const SPACER_CLASS = 'flex-1';
|
|
595
|
-
const TOOL_BTN_CLASS = '
|
|
596
|
-
const ACT_BTN_CLASS = 'inline-flex h-8 items-center justify-center rounded-md px-2 text-xs text-fg-muted transition-colors hover:bg-
|
|
599
|
+
const TOOL_BTN_CLASS = kitEmphasisButtonRecipe('button.toolbar');
|
|
600
|
+
const ACT_BTN_CLASS = 'inline-flex h-8 items-center justify-center rounded-md px-2 text-xs text-fg-muted transition-colors hover:bg-state-layer-hover active:bg-state-layer-press hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60';
|
|
597
601
|
const DEL_BTN_CLASS = 'inline-flex h-8 items-center justify-center rounded-md px-2 text-xs text-danger-on-soft transition-colors hover:bg-danger-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60';
|
|
598
602
|
const ACTIONS_CLASS = 'inline-flex items-center gap-0.5';
|
|
599
603
|
const BODY_CLASS = 'flex flex-col gap-2';
|
|
@@ -601,12 +605,13 @@ const COND_CLASS = 'flex flex-col gap-1 rounded-md border border-border-subtle b
|
|
|
601
605
|
const COND_ROW_CLASS = 'flex flex-wrap items-center gap-2';
|
|
602
606
|
const CELL_CLASS = 'min-w-28 flex-1';
|
|
603
607
|
const ERR_CLASS = 'text-xs text-danger-on-soft';
|
|
604
|
-
|
|
608
|
+
// 空态:与全 kit 同一口径(一行标题,无虚线框)
|
|
609
|
+
const EMPTY_CLASS = KIT_STATE_EMPTY_BOX;
|
|
605
610
|
const SUMMARY_CLASS = 'rounded-md bg-surface-sunken px-3 py-2 text-sm text-fg-muted';
|
|
606
611
|
const READONLY_CLASS = 'text-sm text-fg';
|
|
607
612
|
const FOOT_CLASS = 'flex items-center justify-end gap-2';
|
|
608
|
-
const SAVE_CLASS = 'inline-flex h-
|
|
609
|
-
const CANCEL_CLASS = '
|
|
613
|
+
const SAVE_CLASS = 'inline-flex h-8 items-center justify-center rounded-md bg-primary px-4 text-sm font-medium text-primary-fg transition-colors hover:bg-primary-hover active:bg-primary-active focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60';
|
|
614
|
+
const CANCEL_CLASS = kitEmphasisButtonRecipe('button.toolbar');
|
|
610
615
|
|
|
611
616
|
export const KIT_RULE_BUILDER_CLASS_CANDIDATES: readonly string[] = classTokens(
|
|
612
617
|
ROOT_CLASS, GROUP_CLASS, GROUP_NESTED_CLASS, HEAD_CLASS, MODE_WRAP_CLASS, MODE_BTN_CLASS, NOT_BTN_CLASS, SPACER_CLASS, TOOL_BTN_CLASS,
|