@cosmicdrift/kumiko-renderer 0.410.0 → 0.412.0
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/dist/app/projection-detail-body.js +1 -0
- package/dist/app/projection-detail-header.js +4 -1
- package/dist/app/use-projection-detail-actions.d.ts +1 -0
- package/dist/app/use-projection-detail-actions.js +7 -2
- package/dist/components/render-edit-fields-section.js +2 -1
- package/dist/components/render-edit-form-actions.d.ts +1 -0
- package/dist/components/render-edit-form-actions.js +10 -5
- package/dist/components/render-edit-layout.js +7 -11
- package/dist/components/render-edit-logic.d.ts +3 -0
- package/dist/components/render-edit-logic.js +10 -0
- package/dist/components/render-edit-submit-result.d.ts +1 -1
- package/dist/components/render-edit-submit-result.js +2 -2
- package/dist/components/render-edit-submit.js +6 -3
- package/dist/components/render-edit-titles.d.ts +1 -2
- package/dist/components/render-edit-titles.js +1 -2
- package/dist/components/render-edit-wizard-navigation.d.ts +1 -1
- package/dist/components/render-edit-wizard-navigation.js +8 -4
- package/dist/components/render-edit-wizard-rail.d.ts +12 -0
- package/dist/components/render-edit-wizard-rail.js +74 -0
- package/dist/components/render-field.js +4 -4
- package/dist/components/use-render-edit-state.d.ts +1 -0
- package/dist/components/use-render-edit-state.js +3 -1
- package/dist/data-table-view-types.d.ts +2 -0
- package/dist/headless/view-model/edit.js +17 -6
- package/dist/headless/view-model/types.d.ts +12 -0
- package/dist/hooks/use-list-table.d.ts +1 -0
- package/dist/hooks/use-list-table.js +2 -1
- package/dist/i18n-defaults.js +18 -0
- package/dist/primitives.d.ts +23 -6
- package/dist/required-marker-context.d.ts +2 -0
- package/dist/required-marker-context.js +3 -0
- package/dist/web/index.d.ts +5 -3
- package/dist/web/index.js +2 -1
- package/dist/web/layout/avatar.d.ts +5 -2
- package/dist/web/layout/avatar.js +3 -2
- package/dist/web/presence/index.d.ts +8 -0
- package/dist/web/presence/index.js +4 -0
- package/dist/web/presence/presence-avatars.d.ts +9 -0
- package/dist/web/presence/presence-avatars.js +16 -0
- package/dist/web/presence/presence-notice.d.ts +13 -0
- package/dist/web/presence/presence-notice.js +32 -0
- package/dist/web/presence/presence-signal.d.ts +3 -0
- package/dist/web/presence/presence-signal.js +20 -0
- package/dist/web/presence/use-presence-list.d.ts +12 -0
- package/dist/web/presence/use-presence-list.js +34 -0
- package/dist/web/presence/use-presence.d.ts +16 -0
- package/dist/web/presence/use-presence.js +77 -0
- package/dist/web/primitives/banner.d.ts +1 -1
- package/dist/web/primitives/banner.js +51 -16
- package/dist/web/primitives/data-table/sortable-header.d.ts +3 -1
- package/dist/web/primitives/data-table/sortable-header.js +4 -3
- package/dist/web/primitives/data-table/table-header-row.js +1 -1
- package/dist/web/primitives/field.js +3 -1
- package/dist/web/primitives/form.d.ts +3 -1
- package/dist/web/primitives/form.js +4 -2
- package/dist/web/primitives/layout-elements.d.ts +1 -1
- package/dist/web/primitives/layout-elements.js +5 -2
- package/dist/web/primitives/layout.d.ts +1 -0
- package/dist/web/primitives/layout.js +4 -0
- package/dist/web/primitives/metric.js +4 -2
- package/dist/web/widgets/choice-cards.d.ts +7 -1
- package/dist/web/widgets/choice-cards.js +16 -3
- package/dist/web/widgets/composer.d.ts +16 -0
- package/dist/web/widgets/composer.js +9 -0
- package/dist/web/widgets/detail-list.d.ts +6 -2
- package/dist/web/widgets/detail-list.js +7 -3
- package/dist/web/widgets/floating-panel.d.ts +16 -1
- package/dist/web/widgets/floating-panel.js +23 -7
- package/dist/web/widgets/form-fields.d.ts +2 -1
- package/dist/web/widgets/form-fields.js +2 -2
- package/dist/web/widgets/index.d.ts +4 -2
- package/dist/web/widgets/index.js +2 -0
- package/dist/web/widgets/mode-switch.d.ts +7 -1
- package/dist/web/widgets/mode-switch.js +12 -5
- package/dist/web/widgets/result-panel.d.ts +3 -1
- package/dist/web/widgets/result-panel.js +3 -2
- package/dist/web/widgets/section-nav-layout.d.ts +14 -0
- package/dist/web/widgets/section-nav-layout.js +9 -0
- package/dist/web/widgets/side-by-side-table.d.ts +3 -1
- package/dist/web/widgets/side-by-side-table.js +2 -2
- package/dist/web/widgets/step-bar.js +1 -1
- package/dist/web/widgets/step-list-row.d.ts +15 -4
- package/dist/web/widgets/step-list-row.js +47 -5
- package/dist/web/widgets/step-list-selection.d.ts +42 -0
- package/dist/web/widgets/step-list-selection.js +134 -0
- package/dist/web/widgets/step-list.d.ts +21 -2
- package/dist/web/widgets/step-list.js +99 -14
- package/package.json +5 -5
- package/src/changes.json +84 -0
|
@@ -9,7 +9,7 @@ function chipTestId(testId, index) {
|
|
|
9
9
|
}
|
|
10
10
|
function StepRailRow({ index, label, subtitle, subtitleTestId, rowTestId, state: { isCurrent, isDone, isSelectable }, onSelect, doneLabel, minHeightClass = "min-h-9", }) {
|
|
11
11
|
const rowClass = cn("flex w-full items-center gap-2.5 rounded-md px-2 py-1 text-left text-sm", minHeightClass, isCurrent && "bg-primary/10 font-semibold text-primary", isDone && "text-foreground", !isCurrent && !isDone && "text-foreground-secondary");
|
|
12
|
-
const content = (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", className: cn("flex size-[22px] shrink-0 items-center justify-center rounded-full border text-xs font-semibold", isCurrent && "border-primary bg-primary text-primary-foreground", isDone && "border-status-ok-surface bg-status-ok-surface text-status-ok", !isCurrent && !isDone && "border-input bg-card text-foreground-secondary"), children: isDone ? _jsx(Check, { className: "size-3" }) : index + 1 }), isDone && _jsx("span", { className: "sr-only", children: doneLabel }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [_jsx("span", {
|
|
12
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", className: cn("flex size-[22px] shrink-0 items-center justify-center rounded-full border text-xs font-semibold", isCurrent && "border-primary bg-primary text-primary-foreground", isDone && "border-status-ok-surface bg-status-ok-surface text-status-ok", !isCurrent && !isDone && "border-input bg-card text-foreground-secondary"), children: isDone ? _jsx(Check, { className: "size-3" }) : index + 1 }), isDone && _jsx("span", { className: "sr-only", children: doneLabel }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [_jsx("span", { children: label }), subtitle !== undefined && (_jsx("span", { "data-testid": subtitleTestId, className: "text-xs font-normal text-foreground-secondary", children: subtitle }))] })] }));
|
|
13
13
|
return isSelectable ? (_jsx("button", { type: "button", onClick: () => onSelect?.(index), "data-testid": rowTestId, className: cn(rowClass, "hover:bg-muted-foreground/10"), children: content })) : (_jsx("span", { "aria-current": isCurrent ? "step" : undefined, "data-testid": rowTestId, className: rowClass, children: content }));
|
|
14
14
|
}
|
|
15
15
|
function CompactStepPicker({ steps, compactLabel, subtitles, stepState, onStepSelect, compactTestId, doneLabel, }) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { StepSelectability, StepSelectionState, StepStatus } from "./step-list-selection.ts";
|
|
3
|
+
export type { StepSelectability, StepStatus } from "./step-list-selection.ts";
|
|
3
4
|
export type StepAction = {
|
|
4
5
|
readonly id: string;
|
|
5
6
|
readonly label: string;
|
|
@@ -34,6 +35,10 @@ export type StepListItem = {
|
|
|
34
35
|
readonly sources?: readonly StepSource[];
|
|
35
36
|
/** Marks the step the reader is looking at (warm background). */
|
|
36
37
|
readonly highlighted?: boolean;
|
|
38
|
+
/** Read only when the list has `selection`. Default: selectable while open or locked, otherwise none. */
|
|
39
|
+
readonly selectable?: StepSelectability;
|
|
40
|
+
/** Ids of prerequisite steps; selecting this step selects them too. */
|
|
41
|
+
readonly dependsOn?: readonly string[];
|
|
37
42
|
/** Rendered only while status is "open". */
|
|
38
43
|
readonly actions?: readonly StepAction[];
|
|
39
44
|
};
|
|
@@ -41,10 +46,16 @@ export type StepSource = {
|
|
|
41
46
|
readonly label: string;
|
|
42
47
|
readonly onClick: () => void;
|
|
43
48
|
};
|
|
44
|
-
export declare function StepActionButton({ action }: {
|
|
49
|
+
export declare function StepActionButton({ action, className, }: {
|
|
45
50
|
readonly action: StepAction;
|
|
51
|
+
readonly className?: string;
|
|
46
52
|
}): ReactNode;
|
|
47
|
-
export
|
|
53
|
+
export type StepRowSelection = {
|
|
54
|
+
readonly state: StepSelectionState;
|
|
55
|
+
readonly onToggle: () => void;
|
|
56
|
+
};
|
|
57
|
+
export declare function StepRow({ step, phoneCard, selection, }: {
|
|
48
58
|
readonly step: StepListItem;
|
|
49
59
|
readonly phoneCard?: boolean;
|
|
60
|
+
readonly selection?: StepRowSelection;
|
|
50
61
|
}): ReactNode;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AlertTriangle, Check, Loader2, Lock, X } from "lucide-react";
|
|
3
|
+
import { useId } from "react";
|
|
3
4
|
import { usePrimitives, useTranslation } from "../../index.js";
|
|
4
5
|
import { cn } from "../lib/cn.js";
|
|
6
|
+
import { Checkbox } from "../ui/checkbox.js";
|
|
5
7
|
import { StatusBadge } from "./status-badge.js";
|
|
6
8
|
const STATUS_LABEL_KEY = {
|
|
7
9
|
done: "kumiko.widget.step-list.statusDone",
|
|
@@ -57,9 +59,9 @@ function StepBelowLink({ link }) {
|
|
|
57
59
|
const { Button } = usePrimitives();
|
|
58
60
|
return (_jsx(Button, { variant: "link", size: "sm", onClick: link.onClick, className: "h-auto self-start p-0 text-[13px] font-medium", children: link.label }));
|
|
59
61
|
}
|
|
60
|
-
export function StepActionButton({ action }) {
|
|
62
|
+
export function StepActionButton({ action, className, }) {
|
|
61
63
|
const { Button } = usePrimitives();
|
|
62
|
-
return (_jsx(Button, { size: "sm", variant: action.variant ?? "secondary", disabled: action.disabled, loading: action.pending, onClick: action.onClick, testId: `step-action-${action.id}`, className: "max-md:text-[14px]", children: action.label }));
|
|
64
|
+
return (_jsx(Button, { size: "sm", variant: action.variant ?? "secondary", disabled: action.disabled, loading: action.pending, onClick: action.onClick, testId: `step-action-${action.id}`, className: cn("max-md:text-[14px]", className), children: action.label }));
|
|
63
65
|
}
|
|
64
66
|
// A long reason ("Wartet auf: Whg. 3, Stellplatz 7, …") is cut at the column edge instead of running out of it.
|
|
65
67
|
function StepTagBadge({ tone, label, className, }) {
|
|
@@ -91,7 +93,47 @@ function StepActions({ step }) {
|
|
|
91
93
|
return null;
|
|
92
94
|
return (_jsx("div", { className: "flex gap-2 pt-0.5", children: actions.map((action) => (_jsx(StepActionButton, { action: action }, action.id))) }));
|
|
93
95
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
function selectionTags(state, t) {
|
|
97
|
+
if (state.kind === "missing-input") {
|
|
98
|
+
return [{ label: t("kumiko.widget.step-list.missingInput"), tone: "warn" }];
|
|
99
|
+
}
|
|
100
|
+
if (state.kind === "selectable" && state.neededFor !== undefined) {
|
|
101
|
+
return [
|
|
102
|
+
{
|
|
103
|
+
label: t("kumiko.widget.step-list.autoSelected", { title: state.neededFor }),
|
|
104
|
+
tone: "muted",
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
function StepSelectionCell({ step, selection, }) {
|
|
111
|
+
const t = useTranslation();
|
|
112
|
+
const reasonId = useId();
|
|
113
|
+
const { state } = selection;
|
|
114
|
+
if (state.kind === "none")
|
|
115
|
+
return _jsx("span", { "aria-hidden": "true", className: "w-4 shrink-0" });
|
|
116
|
+
const reason = state.kind === "missing-input"
|
|
117
|
+
? state.reason
|
|
118
|
+
: state.kind === "blocked"
|
|
119
|
+
? t("kumiko.widget.step-list.prerequisiteNotSelectable", { title: state.blockedBy })
|
|
120
|
+
: undefined;
|
|
121
|
+
return (_jsxs("span", { className: "flex h-5 w-4 shrink-0 items-center", children: [_jsx(Checkbox, { "aria-label": t("kumiko.widget.step-list.selectStep", { title: step.title }), checked: state.kind === "selectable" && state.checked, disabled: state.kind !== "selectable", onCheckedChange: selection.onToggle, "data-testid": `step-${step.id}-select`, ...(reason !== undefined && { title: reason, "aria-describedby": reasonId }) }), reason !== undefined && (_jsx("span", { id: reasonId, className: "sr-only", children: reason }))] }));
|
|
122
|
+
}
|
|
123
|
+
function isAutoSelected(selection) {
|
|
124
|
+
return selection?.state.kind === "selectable" && selection.state.neededFor !== undefined;
|
|
125
|
+
}
|
|
126
|
+
function stepRowClassName(step, autoSelected) {
|
|
127
|
+
return cn("flex gap-2.5 border-b border-border-row px-4 py-3", autoSelected &&
|
|
128
|
+
"relative before:absolute before:inset-y-0 before:left-0 before:w-[3px] before:bg-primary/60", step.status === "open" && "bg-card", step.highlighted === true && "bg-status-warn-surface");
|
|
129
|
+
}
|
|
130
|
+
function StepRowText({ step, shownStep, phoneCard, }) {
|
|
131
|
+
return (_jsxs("div", { className: "flex min-w-0 grow flex-col gap-1", children: [_jsx("span", { className: cn("font-medium", step.status === "rejected" && "text-muted-foreground line-through"), "data-testid": `step-${step.id}-title`, children: step.title }), step.description !== undefined && (_jsx("span", { className: "text-[13px] text-foreground-secondary", children: step.description })), _jsx(StepSourcesAndTags, { step: shownStep, phoneCard: phoneCard }), step.meta !== undefined && (_jsx("span", { className: "text-[13px] text-muted-foreground", children: step.meta })), step.link?.placement === "below" && _jsx(StepBelowLink, { link: step.link }), _jsx(StepActions, { step: step })] }));
|
|
132
|
+
}
|
|
133
|
+
export function StepRow({ step, phoneCard = false, selection, }) {
|
|
134
|
+
const t = useTranslation();
|
|
135
|
+
const shownStep = selection === undefined
|
|
136
|
+
? step
|
|
137
|
+
: { ...step, tags: [...(step.tags ?? []), ...selectionTags(selection.state, t)] };
|
|
138
|
+
return (_jsxs("li", { "data-testid": `step-${step.id}`, className: stepRowClassName(step, isAutoSelected(selection)), ...(step.highlighted === true && { "aria-current": "step" }), children: [selection !== undefined && _jsx(StepSelectionCell, { step: step, selection: selection }), _jsx(StatusIcon, { step: step }), _jsx(StepRowText, { step: step, shownStep: shownStep, phoneCard: phoneCard }), step.link !== undefined && step.link.placement !== "below" && _jsx(StepLink, { link: step.link })] }));
|
|
97
139
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type StepSelectability = {
|
|
2
|
+
readonly kind: "selectable";
|
|
3
|
+
} | {
|
|
4
|
+
readonly kind: "missing-input";
|
|
5
|
+
readonly reason: string;
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: "none";
|
|
8
|
+
};
|
|
9
|
+
export type StepStatus = "done" | "open" | "locked" | "running" | "rejected" | "failed";
|
|
10
|
+
export type SelectionStep = {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly title: string;
|
|
13
|
+
readonly status: StepStatus;
|
|
14
|
+
readonly selectable?: StepSelectability;
|
|
15
|
+
readonly dependsOn?: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
export type StepSelectionState = {
|
|
18
|
+
readonly kind: "none";
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: "selectable";
|
|
21
|
+
readonly checked: boolean;
|
|
22
|
+
readonly neededFor?: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: "missing-input";
|
|
25
|
+
readonly reason: string;
|
|
26
|
+
} | {
|
|
27
|
+
readonly kind: "blocked";
|
|
28
|
+
readonly blockedBy: string;
|
|
29
|
+
};
|
|
30
|
+
export type StepSelectionSummary = {
|
|
31
|
+
readonly states: ReadonlyMap<string, StepSelectionState>;
|
|
32
|
+
/** Explicit plus pulled-in prerequisites, in list order. */
|
|
33
|
+
readonly effectiveIds: readonly string[];
|
|
34
|
+
readonly selectedCount: number;
|
|
35
|
+
readonly missingInputCount: number;
|
|
36
|
+
readonly allState: "none" | "some" | "all";
|
|
37
|
+
readonly hasSelectableSteps: boolean;
|
|
38
|
+
};
|
|
39
|
+
export declare function resolveStepSelection(steps: readonly SelectionStep[], selectedIds: readonly string[]): StepSelectionSummary;
|
|
40
|
+
/** New explicit selection after toggling one step; unselecting also drops explicit dependents. */
|
|
41
|
+
export declare function toggleStepSelection(steps: readonly SelectionStep[], selectedIds: readonly string[], stepId: string): readonly string[];
|
|
42
|
+
export declare function toggleAllStepSelection(steps: readonly SelectionStep[], selectedIds: readonly string[]): readonly string[];
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
function isSelectableStatus(step) {
|
|
2
|
+
return step.status === "open" || step.status === "locked";
|
|
3
|
+
}
|
|
4
|
+
function baseSelectability(step) {
|
|
5
|
+
if (!isSelectableStatus(step))
|
|
6
|
+
return { kind: "none" };
|
|
7
|
+
return step.selectable ?? { kind: "selectable" };
|
|
8
|
+
}
|
|
9
|
+
function indexById(steps) {
|
|
10
|
+
return new Map(steps.map((step) => [step.id, step]));
|
|
11
|
+
}
|
|
12
|
+
/** Title of the first prerequisite (transitively, skipping done ones) that cannot be selected itself. */
|
|
13
|
+
function findBlockingPrerequisite(step, byId) {
|
|
14
|
+
const visited = new Set([step.id]);
|
|
15
|
+
const walk = (current) => {
|
|
16
|
+
for (const dependencyId of current.dependsOn ?? []) {
|
|
17
|
+
const dependency = byId.get(dependencyId);
|
|
18
|
+
if (dependency === undefined || dependency.status === "done" || visited.has(dependencyId)) {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
visited.add(dependencyId);
|
|
22
|
+
if (baseSelectability(dependency).kind !== "selectable")
|
|
23
|
+
return dependency.title;
|
|
24
|
+
const nested = walk(dependency);
|
|
25
|
+
if (nested !== undefined)
|
|
26
|
+
return nested;
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
};
|
|
30
|
+
return walk(step);
|
|
31
|
+
}
|
|
32
|
+
/** Ids of all transitive prerequisites that still need work (done and unknown ones are skipped). */
|
|
33
|
+
function openPrerequisiteHull(step, byId) {
|
|
34
|
+
const hull = new Set();
|
|
35
|
+
const walk = (current) => {
|
|
36
|
+
for (const dependencyId of current.dependsOn ?? []) {
|
|
37
|
+
const dependency = byId.get(dependencyId);
|
|
38
|
+
if (dependency === undefined || dependency.status === "done" || hull.has(dependencyId)) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
hull.add(dependencyId);
|
|
42
|
+
walk(dependency);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
walk(step);
|
|
46
|
+
hull.delete(step.id);
|
|
47
|
+
return hull;
|
|
48
|
+
}
|
|
49
|
+
function isEffectivelySelectable(step, byId) {
|
|
50
|
+
return (baseSelectability(step).kind === "selectable" &&
|
|
51
|
+
findBlockingPrerequisite(step, byId) === undefined);
|
|
52
|
+
}
|
|
53
|
+
export function resolveStepSelection(steps, selectedIds) {
|
|
54
|
+
const byId = indexById(steps);
|
|
55
|
+
const explicit = new Set(selectedIds);
|
|
56
|
+
const explicitSteps = steps.filter((step) => explicit.has(step.id) && isEffectivelySelectable(step, byId));
|
|
57
|
+
const hulls = new Map(explicitSteps.map((step) => [step.id, openPrerequisiteHull(step, byId)]));
|
|
58
|
+
const effective = new Set(explicitSteps.map((step) => step.id));
|
|
59
|
+
for (const hull of hulls.values()) {
|
|
60
|
+
for (const id of hull)
|
|
61
|
+
effective.add(id);
|
|
62
|
+
}
|
|
63
|
+
const explicitEffective = new Set(explicitSteps.map((step) => step.id));
|
|
64
|
+
const states = new Map();
|
|
65
|
+
let missingInputCount = 0;
|
|
66
|
+
for (const step of steps) {
|
|
67
|
+
const base = baseSelectability(step);
|
|
68
|
+
if (base.kind === "none") {
|
|
69
|
+
states.set(step.id, { kind: "none" });
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (base.kind === "missing-input") {
|
|
73
|
+
missingInputCount += 1;
|
|
74
|
+
states.set(step.id, { kind: "missing-input", reason: base.reason });
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const blockedBy = findBlockingPrerequisite(step, byId);
|
|
78
|
+
if (blockedBy !== undefined) {
|
|
79
|
+
states.set(step.id, { kind: "blocked", blockedBy });
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const checked = effective.has(step.id);
|
|
83
|
+
const neededForStep = checked && !explicitEffective.has(step.id)
|
|
84
|
+
? explicitSteps.find((candidate) => hulls.get(candidate.id)?.has(step.id) === true)
|
|
85
|
+
: undefined;
|
|
86
|
+
states.set(step.id, neededForStep === undefined
|
|
87
|
+
? { kind: "selectable", checked }
|
|
88
|
+
: { kind: "selectable", checked, neededFor: neededForStep.title });
|
|
89
|
+
}
|
|
90
|
+
const effectiveIds = steps.filter((step) => effective.has(step.id)).map((step) => step.id);
|
|
91
|
+
const selectable = steps.filter((step) => states.get(step.id)?.kind === "selectable");
|
|
92
|
+
const checkedSelectable = selectable.filter((step) => effective.has(step.id));
|
|
93
|
+
const allState = checkedSelectable.length === 0
|
|
94
|
+
? "none"
|
|
95
|
+
: checkedSelectable.length === selectable.length
|
|
96
|
+
? "all"
|
|
97
|
+
: "some";
|
|
98
|
+
return {
|
|
99
|
+
states,
|
|
100
|
+
effectiveIds,
|
|
101
|
+
selectedCount: effectiveIds.length,
|
|
102
|
+
missingInputCount,
|
|
103
|
+
allState,
|
|
104
|
+
hasSelectableSteps: selectable.length > 0,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** New explicit selection after toggling one step; unselecting also drops explicit dependents. */
|
|
108
|
+
export function toggleStepSelection(steps, selectedIds, stepId) {
|
|
109
|
+
const summary = resolveStepSelection(steps, selectedIds);
|
|
110
|
+
const state = summary.states.get(stepId);
|
|
111
|
+
if (state === undefined || state.kind !== "selectable")
|
|
112
|
+
return selectedIds;
|
|
113
|
+
const byId = indexById(steps);
|
|
114
|
+
const explicit = new Set(selectedIds);
|
|
115
|
+
if (state.checked) {
|
|
116
|
+
for (const step of steps) {
|
|
117
|
+
if (step.id === stepId || openPrerequisiteHull(step, byId).has(stepId)) {
|
|
118
|
+
explicit.delete(step.id);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
explicit.add(stepId);
|
|
124
|
+
}
|
|
125
|
+
return steps.filter((step) => explicit.has(step.id)).map((step) => step.id);
|
|
126
|
+
}
|
|
127
|
+
export function toggleAllStepSelection(steps, selectedIds) {
|
|
128
|
+
const summary = resolveStepSelection(steps, selectedIds);
|
|
129
|
+
if (!summary.hasSelectableSteps || summary.allState === "all")
|
|
130
|
+
return [];
|
|
131
|
+
return steps
|
|
132
|
+
.filter((step) => summary.states.get(step.id)?.kind === "selectable")
|
|
133
|
+
.map((step) => step.id);
|
|
134
|
+
}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type StatusBadgeTone } from "./status-badge.tsx";
|
|
3
3
|
import { type StepAction, type StepListItem } from "./step-list-row.tsx";
|
|
4
|
-
export type { StepAction, StepListItem, StepSource, StepStatus, StepTag, } from "./step-list-row.tsx";
|
|
4
|
+
export type { StepAction, StepListItem, StepSelectability, StepSource, StepStatus, StepTag, } from "./step-list-row.tsx";
|
|
5
|
+
export type StepSelectionAction = {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
/** Without a number: the list appends " (n)" with the effective selection size. */
|
|
8
|
+
readonly label: string;
|
|
9
|
+
/** Receives the effective selection in list order, prerequisites included. */
|
|
10
|
+
readonly onClick: (stepIds: readonly string[]) => void;
|
|
11
|
+
readonly variant?: "primary" | "secondary" | "ghost";
|
|
12
|
+
readonly disabled?: boolean;
|
|
13
|
+
readonly pending?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type StepListSelection = {
|
|
16
|
+
/** Explicitly chosen step ids (controlled); prerequisites are added on top. */
|
|
17
|
+
readonly selectedIds: readonly string[];
|
|
18
|
+
readonly onSelectionChange: (selectedIds: readonly string[]) => void;
|
|
19
|
+
/** Replace `footerActions` while at least one step is selected. */
|
|
20
|
+
readonly actions: readonly StepSelectionAction[];
|
|
21
|
+
};
|
|
5
22
|
export type StepListProps = {
|
|
6
23
|
readonly title: string;
|
|
7
24
|
/** Second line under the title, e.g. who completed the list and when. */
|
|
@@ -25,9 +42,11 @@ export type StepListProps = {
|
|
|
25
42
|
/** "full" (default) = "x von y erledigt" plus bar, "count" = only the count, "none" = neither, e.g. when `status` already says the list is done. */
|
|
26
43
|
readonly progress?: "full" | "count" | "none";
|
|
27
44
|
readonly emptyContent?: ReactNode;
|
|
45
|
+
/** Adds a checkbox per selectable step, a select-all row and selection footer actions. */
|
|
46
|
+
readonly selection?: StepListSelection;
|
|
28
47
|
/** On a phone the list reads as a card: the header sits inside the surface and the steps in a framed white box. */
|
|
29
48
|
readonly phoneCard?: boolean;
|
|
30
49
|
readonly testId?: string;
|
|
31
50
|
};
|
|
32
51
|
/** Ordered plan of steps with status icons, progress header and per-step actions. */
|
|
33
|
-
export declare function StepList({ title, subtitle, status, steps, footerActions, collapsedAfter, collapseWhen, surface, fill, progress, emptyContent, phoneCard, testId, }: StepListProps): ReactNode;
|
|
52
|
+
export declare function StepList({ title, subtitle, status, steps, footerActions, collapsedAfter, collapseWhen, surface, fill, progress, emptyContent, selection, phoneCard, testId, }: StepListProps): ReactNode;
|
|
@@ -1,34 +1,119 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
+
import { pluralKey } from "../../headless/plural-key.js";
|
|
3
4
|
import { usePrimitives, useTranslation } from "../../index.js";
|
|
4
5
|
import { cn } from "../lib/cn.js";
|
|
6
|
+
import { Checkbox } from "../ui/checkbox.js";
|
|
5
7
|
import { ProgressBar } from "./progress-bar.js";
|
|
6
8
|
import { StatusBadge } from "./status-badge.js";
|
|
7
9
|
import { useStepFold } from "./step-list-fit.js";
|
|
8
|
-
import { StepActionButton, StepRow } from "./step-list-row.js";
|
|
10
|
+
import { StepActionButton, StepRow, } from "./step-list-row.js";
|
|
11
|
+
import { resolveStepSelection, toggleAllStepSelection, toggleStepSelection, } from "./step-list-selection.js";
|
|
12
|
+
function selectionFooterActions(selection, summary, t) {
|
|
13
|
+
return selection.actions.map((action) => ({
|
|
14
|
+
id: action.id,
|
|
15
|
+
label: t("kumiko.widget.step-list.actionWithCount", {
|
|
16
|
+
label: action.label,
|
|
17
|
+
count: summary.selectedCount,
|
|
18
|
+
}),
|
|
19
|
+
onClick: () => action.onClick(summary.effectiveIds),
|
|
20
|
+
variant: action.variant,
|
|
21
|
+
disabled: action.disabled,
|
|
22
|
+
pending: action.pending,
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
9
25
|
/** Ordered plan of steps with status icons, progress header and per-step actions. */
|
|
10
|
-
export function StepList({ title, subtitle, status, steps, footerActions, collapsedAfter, collapseWhen = "always", surface = "ai", fill = false, progress = "full", emptyContent, phoneCard = false, testId = "step-list", }) {
|
|
11
|
-
const t = useTranslation();
|
|
12
|
-
const { Button } = usePrimitives();
|
|
26
|
+
export function StepList({ title, subtitle, status, steps, footerActions, collapsedAfter, collapseWhen = "always", surface = "ai", fill = false, progress = "full", emptyContent, selection, phoneCard = false, testId = "step-list", }) {
|
|
13
27
|
const [expanded, setExpanded] = useState(false);
|
|
14
|
-
const total = steps
|
|
15
|
-
const
|
|
28
|
+
const { total, done } = countProgress(steps);
|
|
29
|
+
const { visibleSteps, hiddenCount, listRef } = useStepFolding({
|
|
30
|
+
steps,
|
|
31
|
+
collapsedAfter,
|
|
32
|
+
foldsOnOverflow: fill && collapseWhen === "overflow",
|
|
33
|
+
expanded,
|
|
34
|
+
});
|
|
35
|
+
const model = useSelectionModel(steps, selection, footerActions);
|
|
36
|
+
const { summary, footer, selectionFooterActive } = model;
|
|
37
|
+
return (_jsxs("section", { "aria-label": title, "data-testid": testId, className: cn(
|
|
38
|
+
// Px on phones: an app may shrink its root font for desktop density, the phone reading size stays.
|
|
39
|
+
"flex min-h-0 flex-col text-sm max-md:text-[14px]", fill && "h-full", surface === "ai" && "bg-ai-surface", phoneCard && "max-md:rounded-md max-md:p-3"), children: [_jsx(StepListHeader, { title: title, subtitle: subtitle, status: status, progress: progress, done: done, total: total, phoneCard: phoneCard, testId: testId }), _jsx(SelectAllSection, { steps: steps, selection: selection, summary: summary, phoneCard: phoneCard }), steps.length === 0 ? (emptyContent) : (_jsx(StepListRows, { steps: steps, visibleSteps: visibleSteps, hiddenCount: hiddenCount, listRef: listRef, selection: selection, summary: summary, phoneCard: phoneCard, onExpand: () => setExpanded(true), testId: testId })), _jsx(StepListFooter, { footer: footer, selectionActive: selectionFooterActive })] }));
|
|
40
|
+
}
|
|
41
|
+
function countProgress(steps) {
|
|
42
|
+
return {
|
|
43
|
+
total: steps.filter((step) => step.status !== "rejected").length,
|
|
44
|
+
done: steps.filter((step) => step.status === "done").length,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function useStepFolding(input) {
|
|
48
|
+
const { steps, collapsedAfter, foldsOnOverflow, expanded } = input;
|
|
16
49
|
const fold = useStepFold({
|
|
17
50
|
stepIds: steps.map((step) => step.id),
|
|
18
51
|
collapsedAfter,
|
|
19
|
-
foldsOnOverflow
|
|
52
|
+
foldsOnOverflow,
|
|
20
53
|
expanded,
|
|
21
54
|
});
|
|
22
55
|
const foldAfter = fold.foldAfter;
|
|
23
56
|
const hiddenCount = foldAfter !== undefined && !expanded ? Math.max(0, steps.length - foldAfter) : 0;
|
|
24
57
|
const visibleSteps = hiddenCount > 0 ? steps.slice(0, foldAfter) : steps;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
58
|
+
return { visibleSteps, hiddenCount, listRef: fold.listRef };
|
|
59
|
+
}
|
|
60
|
+
function useSelectionModel(steps, selection, footerActions) {
|
|
61
|
+
const t = useTranslation();
|
|
62
|
+
const summary = selection === undefined ? undefined : resolveStepSelection(steps, selection.selectedIds);
|
|
63
|
+
if (selection !== undefined && summary !== undefined && summary.selectedCount > 0) {
|
|
64
|
+
return {
|
|
65
|
+
summary,
|
|
66
|
+
footer: selectionFooterActions(selection, summary, t),
|
|
67
|
+
selectionFooterActive: true,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return { summary, footer: footerActions ?? [], selectionFooterActive: false };
|
|
71
|
+
}
|
|
72
|
+
function SelectAllSection({ steps, selection, summary, phoneCard, }) {
|
|
73
|
+
if (selection === undefined || summary === undefined || steps.length === 0)
|
|
74
|
+
return null;
|
|
75
|
+
return (_jsx(SelectAllRow, { summary: summary, phoneCard: phoneCard, onToggle: () => selection.onSelectionChange(toggleAllStepSelection(steps, selection.selectedIds)) }));
|
|
76
|
+
}
|
|
77
|
+
function rowSelectionFor(step, steps, selection, summary) {
|
|
78
|
+
if (selection === undefined || summary === undefined)
|
|
79
|
+
return undefined;
|
|
80
|
+
return {
|
|
81
|
+
state: summary.states.get(step.id) ?? { kind: "none" },
|
|
82
|
+
onToggle: () => selection.onSelectionChange(toggleStepSelection(steps, selection.selectedIds, step.id)),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function StepListRows({ steps, visibleSteps, hiddenCount, listRef, selection, summary, phoneCard, onExpand, testId, }) {
|
|
86
|
+
const t = useTranslation();
|
|
87
|
+
const { Button } = usePrimitives();
|
|
88
|
+
return (_jsxs("ol", { ref: listRef, className: cn("m-0 min-h-0 grow list-none overflow-y-auto p-0", phoneCard &&
|
|
89
|
+
"max-md:rounded-md max-md:border max-md:border-border max-md:bg-card max-md:[&>li:last-child]:border-b-0 max-md:[&>li]:px-3 max-md:[&>li]:py-2.5", selection !== undefined && phoneCard && "max-md:rounded-t-none"), children: [visibleSteps.map((step) => {
|
|
90
|
+
const rowSelection = rowSelectionFor(step, steps, selection, summary);
|
|
91
|
+
return (_jsx(StepRow, { step: step, phoneCard: phoneCard, ...(rowSelection !== undefined && { selection: rowSelection }) }, step.id));
|
|
92
|
+
}), hiddenCount > 0 && (_jsx("li", { className: "px-4 py-3", children: _jsx(Button, { variant: "link", size: "sm", className: "text-[13px] font-normal text-foreground-secondary hover:text-foreground", onClick: onExpand, testId: `${testId}-more`, children: t("kumiko.widget.step-list.moreSteps", { count: hiddenCount }) }) }))] }));
|
|
93
|
+
}
|
|
94
|
+
function StepListFooter({ footer, selectionActive, }) {
|
|
95
|
+
if (footer.length === 0)
|
|
96
|
+
return null;
|
|
97
|
+
const leading = footer.filter((action) => action.variant === "ghost");
|
|
98
|
+
const trailing = footer.filter((action) => action.variant !== "ghost");
|
|
99
|
+
const phoneHeight = selectionActive ? "max-md:h-11" : undefined;
|
|
100
|
+
return (_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-t border-border px-4 py-2.5", children: [leading.map((action) => (_jsx(StepActionButton, { action: action, className: phoneHeight }, action.id))), _jsx("div", { className: cn("grow", selectionActive && "max-md:hidden") }), trailing.map((action) => (_jsx(StepActionButton, { action: action, className: cn(phoneHeight, selectionActive && "max-md:grow max-md:justify-center") }, action.id)))] }));
|
|
101
|
+
}
|
|
102
|
+
function SelectAllRow({ summary, phoneCard, onToggle, }) {
|
|
103
|
+
const t = useTranslation();
|
|
104
|
+
const countText = summary.selectedCount === 0
|
|
105
|
+
? t("kumiko.widget.step-list.selectionNone")
|
|
106
|
+
: t(pluralKey("kumiko.widget.step-list.selectionCount", summary.selectedCount), {
|
|
107
|
+
count: summary.selectedCount,
|
|
108
|
+
});
|
|
109
|
+
const missingText = summary.missingInputCount > 0
|
|
110
|
+
? `, ${t(pluralKey("kumiko.widget.step-list.selectionMissingInput", summary.missingInputCount), {
|
|
111
|
+
count: summary.missingInputCount,
|
|
112
|
+
})}`
|
|
113
|
+
: "";
|
|
114
|
+
const checked = summary.allState === "all" ? true : summary.allState === "some" ? "indeterminate" : false;
|
|
115
|
+
return (_jsxs("div", { className: cn("flex shrink-0 items-center gap-2.5 border-b border-border bg-card/60 px-4 py-2", phoneCard &&
|
|
116
|
+
"max-md:rounded-t-md max-md:border max-md:border-b-0 max-md:bg-card max-md:px-3"), "data-testid": "step-list-select-all", children: [_jsx(Checkbox, { "aria-label": t("kumiko.widget.step-list.selectAll"), checked: checked, disabled: !summary.hasSelectableSteps, onCheckedChange: onToggle }), _jsx("span", { className: "text-[13px] font-medium", children: t("kumiko.widget.step-list.selectAll") }), _jsxs("span", { className: "grow text-right text-[13px] text-muted-foreground", children: [countText, missingText] })] }));
|
|
32
117
|
}
|
|
33
118
|
function StepListHeader({ title, subtitle, status, progress, done, total, phoneCard, testId, }) {
|
|
34
119
|
const t = useTranslation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.412.0",
|
|
4
4
|
"description": "React renderer for Kumiko screens. The root export holds the platform-agnostic logic (primitives contract, hooks, KumikoScreen, navigation and SSE abstractions); ./headless the DOM-free UI logic, ./live the HTTP dispatcher, ./web the browser bindings (HTML primitives, history navigation, EventSource live events, createKumikoApp).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
52
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
51
|
+
"@cosmicdrift/kumiko-framework": "0.412.0",
|
|
52
|
+
"@cosmicdrift/kumiko-types": "0.412.0",
|
|
53
53
|
"@types/qrcode": "^1.5.6",
|
|
54
54
|
"class-variance-authority": "^0.7.1",
|
|
55
55
|
"clsx": "^2.1.1",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@cosmicdrift/kumiko-locale-de": "0.
|
|
83
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
82
|
+
"@cosmicdrift/kumiko-locale-de": "0.412.0",
|
|
83
|
+
"@cosmicdrift/kumiko-testing": "0.412.0",
|
|
84
84
|
"@tailwindcss/cli": "^4.3.3",
|
|
85
85
|
"@testing-library/react": "^16.3.3",
|
|
86
86
|
"@testing-library/user-event": "^14.6.8",
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,88 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.411.0",
|
|
4
|
+
"type": "improvement",
|
|
5
|
+
"title": "StepList selection with prerequisites, compact Banner, fixed FloatingPanel",
|
|
6
|
+
"detail": "`StepList` takes an optional `selection` (`selectedIds`, `onSelectionChange`, `actions`). It adds a checkbox per step, a \"Select all\" row with a count (\"2 selected, 1 waiting for input\") and, while something is selected, footer actions labelled with the count whose `onClick` receives the effective selection in list order. A step's `dependsOn` lists prerequisites: selecting the step selects them too (marked \"Also selected: needed for …\"), and unselecting a prerequisite drops the steps that need it. `selectable` per step is `{ kind: \"selectable\" }`, `{ kind: \"missing-input\", reason }` (checkbox disabled, \"Input missing\" tag) or `{ kind: \"none\" }` (no checkbox), so an app can keep risky steps out of bulk actions. A step whose open prerequisite cannot be selected is disabled with \"Review “…” on its own first\". Without `selection` the list renders as before. `Banner` takes `density: \"compact\"` (one line, title inline), `icon` (a nav icon key) and the variant `\"ok\"` for a finished state. `FloatingPanel` takes `placement: { mode: \"fixed\", rightPx, bottomPx, widthPx, heightPx }` (anchored, no drag, no resize, nothing persisted), `bodyLayout: \"fill\"` (children pad and scroll themselves) and `surface: \"ai\"`. New exports: `StepSelectability`, `StepSelectionAction`, `StepListSelection`, `FloatingPanelPlacement`, plus `usePresence`, `usePresenceList`, `PresenceNotice`, `PresenceAvatars`; `Avatar` takes `size: \"xs\"` and `shape: \"round\"`."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"version": "0.411.0",
|
|
10
|
+
"type": "fix",
|
|
11
|
+
"title": "projectionDetail renders no empty header band",
|
|
12
|
+
"detail": "A projectionDetail whose `header.subtitle` field is empty and that has no metrics no longer renders an empty subtitle row or an empty metrics band (extra padding and height). Applies to all apps."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"version": "0.411.0",
|
|
16
|
+
"type": "improvement",
|
|
17
|
+
"title": "Heading variant \"group\"",
|
|
18
|
+
"detail": "`Heading variant=\"group\"` renders a 16px semibold sub-title in the foreground color, normal case. The default `page` is unchanged."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"version": "0.411.0",
|
|
22
|
+
"type": "improvement",
|
|
23
|
+
"title": "DetailList valueWeight and sidebar layout",
|
|
24
|
+
"detail": "`DetailList valueWeight=\"normal\"` drops the value emphasis (default `\"medium\"`). `layout=\"sidebar\"` puts a narrow label column and the value on one row for side columns (default `\"default\"`)."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"version": "0.411.0",
|
|
28
|
+
"type": "improvement",
|
|
29
|
+
"title": "TextareaField placeholder, Composer widget",
|
|
30
|
+
"detail": "`TextareaField` takes a `placeholder`. New `Composer` chat input: label-less textarea with the send button inside the field frame, bottom right. Props `value`, `onChange`, `onSubmit`, `placeholder`, `disabled`, `submitLabel` (text of the send button), `docked`, `rows`."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"version": "0.411.0",
|
|
34
|
+
"type": "improvement",
|
|
35
|
+
"title": "ModeSwitch option disabled and tone",
|
|
36
|
+
"detail": "A `ModeSwitch` option can be `disabled` (not selectable, `aria-disabled`, muted) and carry `tone: \"warning\"` (warning frame) to flag an open question."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"version": "0.411.0",
|
|
40
|
+
"type": "improvement",
|
|
41
|
+
"title": "Banner icon and structured parts",
|
|
42
|
+
"detail": "`Banner` takes an optional leading `icon` (a nav icon key such as `\"alert-triangle\"`) and `parts: [{ text, strong? }]` rendered after `children`; `children` is now optional. No markup strings."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"version": "0.411.0",
|
|
46
|
+
"type": "improvement",
|
|
47
|
+
"title": "SectionNavLayout widget",
|
|
48
|
+
"detail": "`SectionNavLayout` wraps custom or extension sections in a column with the \"On this page\" list (`FormSectionNav`). Props `items`, `children`, `width`, `testId`. Stacked forms already render the list themselves."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"version": "0.411.0",
|
|
52
|
+
"type": "fix",
|
|
53
|
+
"title": "Wizard intro follows the current step",
|
|
54
|
+
"detail": "The intro text beside the wizard rail now follows the description of the current step and falls back to `formSubtitle`; the description above the fields is shown only below `lg`, where the rail is hidden (without a rail it stays in the section header). Applies to every app that uses a wizard with a step rail."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"version": "0.411.0",
|
|
58
|
+
"type": "improvement",
|
|
59
|
+
"title": "Studio visual round: ChoiceCards, ModeSwitch, SideBySideTable, Banner, FormSectionNav options",
|
|
60
|
+
"detail": "Opt-in only, defaults unchanged. `ChoiceCards` takes `columns` (1 to 4), `variant=\"radio\"` and `label`. `ModeSwitch` takes `segmentWidth=\"wide\"`. `SideBySideTable` takes `rowHeaderTone=\"foreground\"`. `Banner` takes `actionsPlacement=\"below\"`. `FormSectionNav` takes `activeTone=\"foreground\"`."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"version": "0.411.0",
|
|
64
|
+
"type": "improvement",
|
|
65
|
+
"title": "Wizard step rail wraps text and hides the active subtitle",
|
|
66
|
+
"detail": "Step rail rows wrap long labels and subtitles instead of truncating them. The active step shows no subtitle in the rail (below `lg`, where the rail is hidden, the section header shows the text). Applies to every wizard with a step rail."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"version": "0.411.0",
|
|
70
|
+
"type": "improvement",
|
|
71
|
+
"title": "Composer text button and docked option, ModeSwitch frame, DetailList sidebar, SectionNavLayout marker",
|
|
72
|
+
"detail": "`Composer` renders a text send button (`submitLabel` is its text), the textarea on the normal background without a surrounding strip, and takes `docked`: sticky at the bottom of a scroll container that carries the screen padding, pushed down with `mt-auto` in a full-height flex column. `ModeSwitch` `tone: \"warning\"` frames the whole switch. `DetailList layout=\"sidebar\"` left-aligns the value. `SectionNavLayout` marks the active entry bold in the text colour. These widgets are new in this release."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"version": "0.411.0",
|
|
76
|
+
"type": "fix",
|
|
77
|
+
"title": "hideRequiredMarker reaches widget fields, ModeSwitch on the input surface",
|
|
78
|
+
"detail": "`layout.hideRequiredMarker` now also hides the asterisk of `Field`-based widgets in custom and extension sections (`aria-required` stays). The outline `ModeSwitch` uses the text input's background (`bg-transparent`, `dark:bg-input/30`) instead of `bg-background`, so unselected segments match inputs on every app."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"version": "0.411.0",
|
|
82
|
+
"type": "fix",
|
|
83
|
+
"title": "Banner actions below the text keep a gap",
|
|
84
|
+
"detail": "With `actionsPlacement: \"below\"` the action buttons wrap in a row with `gap-2` instead of touching each other."
|
|
85
|
+
},
|
|
2
86
|
{
|
|
3
87
|
"version": "0.410.0",
|
|
4
88
|
"type": "improvement",
|