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/base/radio.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { SomaComponentDefinition } from 'soma-core';
|
|
6
6
|
import { CHOICE_GROUP_DEFAULT_CLASS, createChoiceView } from './choice';
|
|
7
|
-
import { CLASS_PROP, ID_PROPS, OPTIONS_PROP, SIZE_PROP, createKitController } from './shared';
|
|
7
|
+
import { CLASS_PROP, ID_PROPS, INVALID_PROPS, OPTIONS_PROP, SIZE_PROP, createKitController } from './shared';
|
|
8
8
|
|
|
9
9
|
export function createRadio(): SomaComponentDefinition {
|
|
10
10
|
return {
|
|
@@ -20,6 +20,7 @@ export function createRadio(): SomaComponentDefinition {
|
|
|
20
20
|
disabled: { type: 'boolean', default: false },
|
|
21
21
|
readonly: { type: 'boolean', default: false },
|
|
22
22
|
...ID_PROPS,
|
|
23
|
+
...INVALID_PROPS,
|
|
23
24
|
size: SIZE_PROP,
|
|
24
25
|
class: CLASS_PROP,
|
|
25
26
|
},
|
package/src/base/range.ts
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
import type { SomaComponentDefinition } from 'soma-core';
|
|
16
16
|
import { kitDirAt, kitKey, kitText } from '../i18n/kit-text';
|
|
17
17
|
import {
|
|
18
|
-
CLASS_PROP, ID_PROPS, SIZE_PROP,
|
|
19
|
-
bool, classCandidates, createKitController, joinClass, num, setAttr, sizeOf, str,
|
|
18
|
+
CLASS_PROP, ID_PROPS, INVALID_PROPS, SIZE_PROP,
|
|
19
|
+
applyCompositeField, bool, classCandidates, createKitController, joinClass, num, setAttr, sizeOf, str,
|
|
20
20
|
type KitApi, type KitProps, type KitSize,
|
|
21
21
|
} from './shared';
|
|
22
22
|
|
|
@@ -285,6 +285,22 @@ function paintCustom(root: HTMLElement, p: KitProps, ui: CustomUi): void {
|
|
|
285
285
|
};
|
|
286
286
|
paintThumb(ui.lo, 'lo', lo, range);
|
|
287
287
|
paintThumb(ui.hi, 'hi', hi, true);
|
|
288
|
+
|
|
289
|
+
// 作表单字段:根(role=group)承载字段名 / 说明关联;单滑块的名字取字段标签;
|
|
290
|
+
// slider 角色支持 aria-invalid / aria-errormessage、不支持 aria-required,所以必填不写到滑块上
|
|
291
|
+
const labelledby = str(p.aria_labelledby, str(p.labelledby));
|
|
292
|
+
const single = !range && aria === '' && labelledby !== '';
|
|
293
|
+
if (single) {
|
|
294
|
+
ui.hi.dot.removeAttribute('aria-label');
|
|
295
|
+
ui.hi.dot.setAttribute('aria-labelledby', labelledby);
|
|
296
|
+
} else ui.hi.dot.removeAttribute('aria-labelledby');
|
|
297
|
+
ui.lo.dot.removeAttribute('aria-labelledby');
|
|
298
|
+
const thumbs = range ? [ui.lo.dot, ui.hi.dot] : [ui.hi.dot];
|
|
299
|
+
applyCompositeField(ui.wrap, { ...p, required: false }, thumbs);
|
|
300
|
+
for (const dot of [ui.lo.dot, ui.hi.dot]) {
|
|
301
|
+
if (!thumbs.includes(dot)) { dot.removeAttribute('aria-invalid'); dot.removeAttribute('aria-errormessage'); }
|
|
302
|
+
dot.removeAttribute('aria-required');
|
|
303
|
+
}
|
|
288
304
|
}
|
|
289
305
|
|
|
290
306
|
function buildCustomUi(root: HTMLElement, api: KitApi): CustomUi {
|
|
@@ -419,6 +435,7 @@ export function createRange(): SomaComponentDefinition {
|
|
|
419
435
|
disabled: { type: 'boolean', default: false },
|
|
420
436
|
readonly: { type: 'boolean', default: false },
|
|
421
437
|
...ID_PROPS,
|
|
438
|
+
...INVALID_PROPS,
|
|
422
439
|
size: SIZE_PROP,
|
|
423
440
|
class: CLASS_PROP,
|
|
424
441
|
},
|
package/src/base/rating.ts
CHANGED
|
@@ -6,24 +6,25 @@
|
|
|
6
6
|
import type { SomaComponentDefinition } from 'soma-core';
|
|
7
7
|
import { kitKey } from '../i18n/kit-text';
|
|
8
8
|
import {
|
|
9
|
-
CLASS_PROP, ID_PROPS, SIZE_PROP,
|
|
9
|
+
CLASS_PROP, ID_PROPS, INVALID_PROPS, SIZE_PROP,
|
|
10
10
|
applyCommon, bool, classCandidates, createKitController, joinClass, nextUid, num, setAttr, sizeOf, str,
|
|
11
11
|
type KitSize, type KitView,
|
|
12
12
|
} from './shared';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// 排容器用 hit-gap-N(gap 同时写出 --kit-hit-gap),星的 hit-area-row 据此把沿排热区收到中心距,相邻热区相接不重叠
|
|
15
|
+
const GROUP_CLASS = 'inline-flex items-center hit-gap-0.5';
|
|
15
16
|
|
|
16
17
|
const STAR_CLASS: Record<KitSize, { edit: string; read: string }> = {
|
|
17
18
|
sm: {
|
|
18
|
-
edit: 'inline-flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
19
|
+
edit: 'hit-area-row inline-flex h-5 w-5 shrink-0 p-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
19
20
|
read: 'inline-flex h-5 w-5 shrink-0 items-center justify-center',
|
|
20
21
|
},
|
|
21
22
|
md: {
|
|
22
|
-
edit: 'inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
23
|
+
edit: 'hit-area-row inline-flex h-6 w-6 shrink-0 p-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
23
24
|
read: 'inline-flex h-6 w-6 shrink-0 items-center justify-center',
|
|
24
25
|
},
|
|
25
26
|
lg: {
|
|
26
|
-
edit: 'inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
27
|
+
edit: 'hit-area-row inline-flex h-8 w-8 shrink-0 p-0 cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
27
28
|
read: 'inline-flex h-8 w-8 shrink-0 items-center justify-center',
|
|
28
29
|
},
|
|
29
30
|
};
|
|
@@ -192,7 +193,10 @@ function makeView(): KitView {
|
|
|
192
193
|
else root.removeAttribute('aria-disabled');
|
|
193
194
|
}
|
|
194
195
|
// 只读态的 aria-label 已在上面写好,这里只补 id(applyCommon 会把空的 aria_label 当作「清掉」)
|
|
195
|
-
if (readonly)
|
|
196
|
+
if (readonly) {
|
|
197
|
+
setAttr(root, 'id', str(p.id));
|
|
198
|
+
setAttr(root, 'aria-labelledby', str(p.aria_labelledby, str(p.labelledby)));
|
|
199
|
+
}
|
|
196
200
|
// roving:焦点星 = 当前值所在星,没有值时第一颗
|
|
197
201
|
if (focusIndex >= sp.count) focusIndex = 0;
|
|
198
202
|
const tabStop = value > 0 ? Math.ceil(value) - 1 : focusIndex;
|
|
@@ -236,6 +240,7 @@ export function createRating(): SomaComponentDefinition {
|
|
|
236
240
|
disabled: { type: 'boolean', default: false },
|
|
237
241
|
readonly: { type: 'boolean', default: false, desc: '只读展示(role=img)' },
|
|
238
242
|
...ID_PROPS,
|
|
243
|
+
...INVALID_PROPS,
|
|
239
244
|
size: SIZE_PROP,
|
|
240
245
|
class: CLASS_PROP,
|
|
241
246
|
},
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// 置灰原因气泡(动作的 disabledReason 的呈现,工具栏 Button / 行操作 KitTableActions 共用,只此一份实现)。
|
|
2
|
+
//
|
|
3
|
+
// 规则(页面只声明「原因从哪来」,怎么显示由这里写死):
|
|
4
|
+
// - 动作置灰且原因非空:控件不用原生 disabled(原生禁用的按钮拿不到焦点、读屏与键盘用户看不到原因),
|
|
5
|
+
// 只留 aria-disabled="true",保持可聚焦;原因经 role=tooltip 的气泡在悬停 / 聚焦时显示,控件带 aria-describedby 指向它,Esc 隐藏;
|
|
6
|
+
// - 点击 / Enter / Space 不抛事件由各控制器自己的置灰判断保证(本文件不接事件);
|
|
7
|
+
// - 气泡显示时经 core 浮层端口挂到浮层根(popup.ts 的 syncAnchored,与 Popover 同一机制),不被表格滚动容器 / overflow 祖先裁切;
|
|
8
|
+
// 收起时放回原位;端口不可用时退回原位绝对定位;
|
|
9
|
+
// - 原因为空 / 动作未置灰:不建气泡、不改 aria-describedby,行为与没有该声明时完全相同。
|
|
10
|
+
// 文字一律 textContent;气泡外观取 popup 底座的 tooltip 类(去掉 pointer-events-none,浮层根里需要 pointer-events-auto)。
|
|
11
|
+
|
|
12
|
+
import { classCandidates } from './class-candidates';
|
|
13
|
+
import {
|
|
14
|
+
KIT_POPUP_PLACE_CLASS_CANDIDATES, POPUP_TIP_BASE, POPUP_TIP_HIDDEN_CLASS, POPUP_TIP_PREF, popPlaceClass, releaseDropdown, syncAnchored,
|
|
15
|
+
type PopPlace,
|
|
16
|
+
} from './popup';
|
|
17
|
+
import { addIdToken, nextUid, removeIdToken } from './shared';
|
|
18
|
+
|
|
19
|
+
const REASON_TIP_BASE = POPUP_TIP_BASE.split(/\s+/).filter((t) => t !== 'pointer-events-none').join(' ');
|
|
20
|
+
const reasonTipClass = (place: PopPlace): string => `${REASON_TIP_BASE} ${popPlaceClass(place, 1)}`;
|
|
21
|
+
|
|
22
|
+
export const KIT_REASON_TIP_CLASS_CANDIDATES: readonly string[] = classCandidates(
|
|
23
|
+
POPUP_TIP_HIDDEN_CLASS, REASON_TIP_BASE, KIT_POPUP_PLACE_CLASS_CANDIDATES, 'pointer-events-auto',
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
interface TipState {
|
|
27
|
+
anchor: HTMLElement;
|
|
28
|
+
tip: HTMLElement;
|
|
29
|
+
shown: boolean;
|
|
30
|
+
show: () => void;
|
|
31
|
+
hide: () => void;
|
|
32
|
+
onKey: (event: KeyboardEvent) => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const STATES = new WeakMap<HTMLElement, TipState>();
|
|
36
|
+
const LIVE = new Set<TipState>();
|
|
37
|
+
|
|
38
|
+
// aria-describedby 令牌的合并 / 摘除只用 shared 的 addIdToken / removeIdToken(withTooltip 同一份)
|
|
39
|
+
const addDescribedBy = (el: Element, id: string): void => addIdToken(el, 'aria-describedby', id);
|
|
40
|
+
const removeDescribedBy = (el: Element, id: string): void => removeIdToken(el, 'aria-describedby', id);
|
|
41
|
+
|
|
42
|
+
function release(state: TipState): void {
|
|
43
|
+
const { anchor, tip } = state;
|
|
44
|
+
anchor.removeEventListener('mouseenter', state.show);
|
|
45
|
+
anchor.removeEventListener('mouseleave', state.hide);
|
|
46
|
+
anchor.removeEventListener('focusin', state.show);
|
|
47
|
+
anchor.removeEventListener('focusout', state.hide);
|
|
48
|
+
anchor.removeEventListener('keydown', state.onKey);
|
|
49
|
+
removeDescribedBy(anchor, tip.id);
|
|
50
|
+
releaseDropdown(tip, false);
|
|
51
|
+
tip.remove();
|
|
52
|
+
STATES.delete(anchor);
|
|
53
|
+
LIVE.delete(state);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 给 anchor 挂 / 更新 / 摘掉原因气泡:reason 非空 → 建(已有则更新文字);空 → 摘掉。幂等,可在每次渲染调用。
|
|
58
|
+
* inside:气泡占位节点放在 anchor 里面(Button 自己是控制器根,不能往它的宿主里插兄弟);缺省放在 anchor 之后。
|
|
59
|
+
*/
|
|
60
|
+
export function syncReasonTip(anchor: HTMLElement, reason: string, inside = false): void {
|
|
61
|
+
const text = reason.trim();
|
|
62
|
+
const existing = STATES.get(anchor);
|
|
63
|
+
if (text === '') {
|
|
64
|
+
if (existing !== undefined) release(existing);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (existing !== undefined) {
|
|
68
|
+
existing.tip.textContent = text;
|
|
69
|
+
addDescribedBy(anchor, existing.tip.id);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const doc = anchor.ownerDocument;
|
|
73
|
+
const tip = doc.createElement('span');
|
|
74
|
+
tip.id = nextUid('kit-reason');
|
|
75
|
+
tip.setAttribute('role', 'tooltip');
|
|
76
|
+
tip.className = POPUP_TIP_HIDDEN_CLASS;
|
|
77
|
+
tip.textContent = text;
|
|
78
|
+
if (!inside && anchor.parentNode !== null) anchor.parentNode.insertBefore(tip, anchor.nextSibling);
|
|
79
|
+
else anchor.appendChild(tip);
|
|
80
|
+
const state: TipState = {
|
|
81
|
+
anchor,
|
|
82
|
+
tip,
|
|
83
|
+
shown: false,
|
|
84
|
+
show: () => {
|
|
85
|
+
state.shown = true;
|
|
86
|
+
syncAnchored(tip, true, anchor, POPUP_TIP_PREF, reasonTipClass);
|
|
87
|
+
},
|
|
88
|
+
hide: () => {
|
|
89
|
+
if (!state.shown) return;
|
|
90
|
+
state.shown = false;
|
|
91
|
+
syncAnchored(tip, false, anchor, POPUP_TIP_PREF, () => '');
|
|
92
|
+
},
|
|
93
|
+
onKey: (event) => {
|
|
94
|
+
if (event.key !== 'Escape' || !state.shown) return;
|
|
95
|
+
// 先收气泡:这次 Esc 只用来关提示,不连带关闭外层对话框
|
|
96
|
+
event.stopPropagation();
|
|
97
|
+
state.hide();
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
anchor.addEventListener('mouseenter', state.show);
|
|
101
|
+
anchor.addEventListener('mouseleave', state.hide);
|
|
102
|
+
anchor.addEventListener('focusin', state.show);
|
|
103
|
+
anchor.addEventListener('focusout', state.hide);
|
|
104
|
+
anchor.addEventListener('keydown', state.onKey);
|
|
105
|
+
addDescribedBy(anchor, tip.id);
|
|
106
|
+
STATES.set(anchor, state);
|
|
107
|
+
LIVE.add(state);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** 摘掉 anchor 上的原因气泡(没有则什么也不做) */
|
|
111
|
+
export function releaseReasonTip(anchor: HTMLElement): void {
|
|
112
|
+
const state = STATES.get(anchor);
|
|
113
|
+
if (state !== undefined) release(state);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** anchor 上当前是否挂着气泡(按需挂载的委托据此判断「刚挂上、要立刻显示」还是「已有、交给自带的悬停 / 聚焦监听」) */
|
|
117
|
+
export function hasReasonTip(anchor: HTMLElement): boolean {
|
|
118
|
+
return STATES.has(anchor);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** 立刻显示 anchor 上已挂的气泡(按需挂载时,触发它的悬停 / 聚焦事件已过,自带监听来不及接,要补一次显示;没挂则什么也不做) */
|
|
122
|
+
export function showReasonTip(anchor: HTMLElement): void {
|
|
123
|
+
STATES.get(anchor)?.show();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** 摘掉 scope 内全部锚点的原因气泡(整片重画前调用;气泡可能正挂在浮层根里,随旧锚点丢弃会成孤儿) */
|
|
127
|
+
export function releaseReasonTipsIn(scope: Element): void {
|
|
128
|
+
for (const s of [...LIVE]) if (scope.contains(s.anchor)) release(s);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// ── 应用组件的公开提示 API ─────────────────────────────────────
|
|
132
|
+
|
|
133
|
+
/** 应用组件用 `kitTooltip` 时并入候选类的气泡 / 定位类(与置灰原因气泡同一份) */
|
|
134
|
+
export const KIT_APP_TOOLTIP_CLASS_CANDIDATES: readonly string[] = KIT_REASON_TIP_CLASS_CANDIDATES;
|
|
135
|
+
|
|
136
|
+
export interface KitTooltipOptions {
|
|
137
|
+
/** 气泡占位节点放进 el 里面(el 是 input / img 等不能有子节点的元素时不要用);缺省放在 el 之后 */
|
|
138
|
+
inside?: boolean;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 给元素挂 / 更新 / 摘掉悬停提示(替代 `title=`),返回清理函数:
|
|
143
|
+
* 悬停与聚焦显示,移开 / 失焦 / Esc 隐藏(Esc 只关提示,不连带关外层对话框);el 带 `aria-describedby` 指向气泡(与已有令牌合并,摘掉时只摘自己的);
|
|
144
|
+
* 显示时经浮层端口挂到浮层根,不被 overflow 祖先裁切。再次调用同一元素 = 更新文字(幂等);`text` 为空 = 摘掉。
|
|
145
|
+
* 提示只写补充说明;el 要能聚焦(可聚焦控件或自带 tabindex),键盘才读得到。整块重画前调清理函数或 `releaseReasonTipsIn`。
|
|
146
|
+
*/
|
|
147
|
+
export function kitTooltip(el: HTMLElement, text: string, opts: KitTooltipOptions = {}): () => void {
|
|
148
|
+
syncReasonTip(el, text, opts.inside === true);
|
|
149
|
+
return () => releaseReasonTip(el);
|
|
150
|
+
}
|
package/src/base/segmented.ts
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
import { createKeyboardWiring } from 'soma-core/keyboard';
|
|
12
12
|
import { SOMA_SIZE_UNITS } from 'soma-foundation/theme';
|
|
13
|
+
import { textWidthEm } from 'soma-foundation/arrange';
|
|
14
|
+
import { arrangeSegmented } from 'soma-foundation/arrange/table';
|
|
13
15
|
import { setKitFace } from '../recipes';
|
|
14
16
|
import {
|
|
15
17
|
applyCommon, bool, classCandidates, joinClass, num, optionsKey, optionsOf, sameValue, sizeOf,
|
|
@@ -18,52 +20,55 @@ import {
|
|
|
18
20
|
|
|
19
21
|
// ── 类串(整串字面量,不拼接)─────────────────────────────────
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
// 2026-11-17(评审 K7):分段控件至多一层底色、无外描边——轨道无底无框,只有选中段是主色柔底(不再有「轨道底 + 白色滑块 + 阴影」的多层)
|
|
24
|
+
// 横排各段紧邻无缝(无间距:未选中段无底色,选中段的柔底面自成一块);各段内边距同尺寸档一致
|
|
25
|
+
const SEG_ROOT = 'inline-flex items-center';
|
|
26
|
+
const SEG_ROOT_BLOCK = 'flex w-full items-center';
|
|
27
|
+
const SEG_ROOT_EQUAL = 'inline-grid auto-cols-fr grid-flow-col items-center';
|
|
23
28
|
const SEG_ITEM: Record<KitSize, { idle: string; on: string; off: string }> = {
|
|
24
29
|
sm: {
|
|
25
|
-
idle: 'inline-flex h-
|
|
26
|
-
on: 'inline-flex h-
|
|
27
|
-
off: 'inline-flex h-
|
|
30
|
+
idle: 'inline-flex h-6 min-w-0 flex-1 whitespace-nowrap cursor-pointer items-center justify-center rounded-md px-2.5 text-xs font-medium text-fg-muted transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
31
|
+
on: 'inline-flex h-6 min-w-0 flex-1 whitespace-nowrap cursor-pointer items-center justify-center rounded-md bg-primary-soft px-2.5 text-xs font-medium text-primary-on-soft transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
32
|
+
off: 'inline-flex h-6 min-w-0 flex-1 whitespace-nowrap cursor-not-allowed items-center justify-center rounded-md px-2.5 text-xs font-medium text-fg-subtle opacity-60',
|
|
28
33
|
},
|
|
29
34
|
md: {
|
|
30
|
-
idle: 'inline-flex h-8 min-w-0 flex-1 cursor-pointer items-center justify-center rounded-md px-3 text-sm font-medium text-fg-muted transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
31
|
-
on: 'inline-flex h-8 min-w-0 flex-1 cursor-pointer items-center justify-center rounded-md bg-
|
|
32
|
-
off: 'inline-flex h-8 min-w-0 flex-1 cursor-not-allowed items-center justify-center rounded-md px-3 text-sm font-medium text-fg-subtle opacity-60',
|
|
35
|
+
idle: 'inline-flex h-8 min-w-0 flex-1 whitespace-nowrap cursor-pointer items-center justify-center rounded-md px-3 text-sm font-medium text-fg-muted transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
36
|
+
on: 'inline-flex h-8 min-w-0 flex-1 whitespace-nowrap cursor-pointer items-center justify-center rounded-md bg-primary-soft px-3 text-sm font-medium text-primary-on-soft transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
37
|
+
off: 'inline-flex h-8 min-w-0 flex-1 whitespace-nowrap cursor-not-allowed items-center justify-center rounded-md px-3 text-sm font-medium text-fg-subtle opacity-60',
|
|
33
38
|
},
|
|
34
39
|
lg: {
|
|
35
|
-
idle: 'inline-flex h-
|
|
36
|
-
on: 'inline-flex h-
|
|
37
|
-
off: 'inline-flex h-
|
|
40
|
+
idle: 'inline-flex h-10 min-w-0 flex-1 whitespace-nowrap cursor-pointer items-center justify-center rounded-md px-4 text-base font-medium text-fg-muted transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
41
|
+
on: 'inline-flex h-10 min-w-0 flex-1 whitespace-nowrap cursor-pointer items-center justify-center rounded-md bg-primary-soft px-4 text-base font-medium text-primary-on-soft transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
42
|
+
off: 'inline-flex h-10 min-w-0 flex-1 whitespace-nowrap cursor-not-allowed items-center justify-center rounded-md px-4 text-base font-medium text-fg-subtle opacity-60',
|
|
38
43
|
},
|
|
39
44
|
};
|
|
40
45
|
|
|
41
|
-
const SEG_ROOT_V = 'inline-flex flex-col items-stretch gap-0.5
|
|
42
|
-
const SEG_ROOT_BLOCK_V = 'flex w-full flex-col items-stretch gap-0.5
|
|
46
|
+
const SEG_ROOT_V = 'inline-flex flex-col items-stretch gap-0.5';
|
|
47
|
+
const SEG_ROOT_BLOCK_V = 'flex w-full flex-col items-stretch gap-0.5';
|
|
43
48
|
const TOG_ROOT = 'inline-flex flex-wrap items-center gap-2';
|
|
44
49
|
const TOG_ROOT_V = 'inline-flex flex-col items-stretch gap-2';
|
|
45
50
|
const OPT_ICON = 'shrink-0';
|
|
46
51
|
const OPT_GAP = 'gap-1.5';
|
|
47
52
|
const TOG_ITEM: Record<KitSize, { idle: string; on: string; off: string }> = {
|
|
48
53
|
sm: {
|
|
49
|
-
idle: 'inline-flex h-
|
|
50
|
-
on: 'inline-flex h-
|
|
51
|
-
off: 'inline-flex h-
|
|
54
|
+
idle: 'inline-flex h-6 cursor-pointer items-center justify-center rounded-md border border-border bg-surface px-2.5 text-sm text-fg transition-colors state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
55
|
+
on: 'inline-flex h-6 cursor-pointer items-center justify-center rounded-md border border-primary bg-primary-soft px-2.5 text-sm font-medium text-primary-on-soft transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
56
|
+
off: 'inline-flex h-6 cursor-not-allowed items-center justify-center rounded-md border border-border bg-surface-sunken px-2.5 text-sm text-fg-subtle opacity-60',
|
|
52
57
|
},
|
|
53
58
|
md: {
|
|
54
|
-
idle: 'inline-flex h-
|
|
55
|
-
on: 'inline-flex h-
|
|
56
|
-
off: 'inline-flex h-
|
|
59
|
+
idle: 'inline-flex h-8 cursor-pointer items-center justify-center 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',
|
|
60
|
+
on: 'inline-flex h-8 cursor-pointer items-center justify-center rounded-md border border-primary bg-primary-soft px-3 text-sm font-medium text-primary-on-soft transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
61
|
+
off: 'inline-flex h-8 cursor-not-allowed items-center justify-center rounded-md border border-border bg-surface-sunken px-3 text-sm text-fg-subtle opacity-60',
|
|
57
62
|
},
|
|
58
63
|
lg: {
|
|
59
|
-
idle: 'inline-flex h-10 cursor-pointer items-center justify-center rounded-md border border-border bg-surface px-4 text-base text-fg transition-colors
|
|
64
|
+
idle: 'inline-flex h-10 cursor-pointer items-center justify-center rounded-md border border-border bg-surface px-4 text-base text-fg transition-colors state-layer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
60
65
|
on: 'inline-flex h-10 cursor-pointer items-center justify-center rounded-md border border-primary bg-primary-soft px-4 text-base font-medium text-primary-on-soft transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
61
66
|
off: 'inline-flex h-10 cursor-not-allowed items-center justify-center rounded-md border border-border bg-surface-sunken px-4 text-base text-fg-subtle opacity-60',
|
|
62
67
|
},
|
|
63
68
|
};
|
|
64
69
|
|
|
65
70
|
export const KIT_SEGMENTED_CLASS_CANDIDATES: readonly string[] = classCandidates(
|
|
66
|
-
SEG_ROOT, SEG_ROOT_BLOCK, SEG_ROOT_V, SEG_ROOT_BLOCK_V, TOG_ROOT, TOG_ROOT_V, OPT_ICON, OPT_GAP,
|
|
71
|
+
SEG_ROOT, SEG_ROOT_BLOCK, SEG_ROOT_EQUAL, 'flex-none', SEG_ROOT_V, SEG_ROOT_BLOCK_V, TOG_ROOT, TOG_ROOT_V, OPT_ICON, OPT_GAP,
|
|
67
72
|
Object.values(SEG_ITEM).flatMap((c) => [c.idle, c.on, c.off]),
|
|
68
73
|
Object.values(TOG_ITEM).flatMap((c) => [c.idle, c.on, c.off]),
|
|
69
74
|
);
|
|
@@ -210,7 +215,7 @@ export function createSegmentedView(): KitView {
|
|
|
210
215
|
const off = disabled || o?.disabled === true;
|
|
211
216
|
b.className = joinClass(off ? SEG_ITEM[size].off : on ? SEG_ITEM[size].on : SEG_ITEM[size].idle, o?.icon !== undefined && o.label !== '' ? OPT_GAP : '');
|
|
212
217
|
b.setAttribute('aria-checked', on ? 'true' : 'false');
|
|
213
|
-
setKitFace(b,
|
|
218
|
+
setKitFace(b, null); // 选中段是主色柔底、其余透明,整组无轨道无阴影,不标 raised(不叠质感阴影)
|
|
214
219
|
if (off) b.setAttribute('aria-disabled', 'true');
|
|
215
220
|
else b.removeAttribute('aria-disabled');
|
|
216
221
|
b.tabIndex = !off && b.dataset.key === stop ? 0 : -1;
|
|
@@ -223,7 +228,13 @@ export function createSegmentedView(): KitView {
|
|
|
223
228
|
else root.removeAttribute('aria-disabled');
|
|
224
229
|
if (readonly) root.setAttribute('aria-readonly', 'true');
|
|
225
230
|
else root.removeAttribute('aria-readonly');
|
|
226
|
-
|
|
231
|
+
// 各段宽度(排布引擎 arrangeSegmented):横排非撑满时,段数少且文案长度相近 = 等宽(grid 等分最宽一段的内容宽),否则按内容宽 + 统一内边距(段不拉伸)
|
|
232
|
+
const equal = !vertical && !bool(p.block) && arrangeSegmented(options.map((o) => textWidthEm(o.label))).mode === 'equal';
|
|
233
|
+
const rootClass = bool(p.block) ? (vertical ? SEG_ROOT_BLOCK_V : SEG_ROOT_BLOCK) : vertical ? SEG_ROOT_V : equal ? SEG_ROOT_EQUAL : SEG_ROOT;
|
|
234
|
+
root.className = joinClass(rootClass, p.class);
|
|
235
|
+
if (!vertical && !bool(p.block) && !equal) {
|
|
236
|
+
for (const b of Array.from(root.querySelectorAll<HTMLElement>('[role="radio"]'))) b.className = b.className.replace(/(^|\s)flex-1(?=\s|$)/, '$1flex-none');
|
|
237
|
+
}
|
|
227
238
|
},
|
|
228
239
|
};
|
|
229
240
|
}
|
|
@@ -257,7 +268,8 @@ export function createToggleView(): KitView {
|
|
|
257
268
|
render(root, p) {
|
|
258
269
|
const options = optionsOf(p.options);
|
|
259
270
|
const size = sizeOf(p.size);
|
|
260
|
-
|
|
271
|
+
// 状态呈现表:readonly 不置灰(仍画 on / idle 原样,只是不响应点击,见 onClick 与 locked);只有 disabled 画成禁用形态
|
|
272
|
+
const disabled = bool(p.disabled);
|
|
261
273
|
const sig = optionsKey(options);
|
|
262
274
|
if (sig !== root.dataset.kitTogKey) {
|
|
263
275
|
root.dataset.kitTogKey = sig;
|