@xeplr/ui-factory 1.0.13 → 1.0.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/package.json +1 -1
- package/src/designs/ScreenSample.jsx +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xeplr/ui-factory",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Design data-entry screens on @xeplr/ui-canvas, save them as JSON, run them as auto-saving forms with lists of saved records — built for Claude to draft and people to refine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -44,12 +44,20 @@ function StepNav({ ctrl, node, children }) {
|
|
|
44
44
|
// "Step 2 of 4" counts the steps that apply, not the ones ruled out.
|
|
45
45
|
const live = total - off.length
|
|
46
46
|
const place = at - off.filter((i) => i < at).length + 1
|
|
47
|
+
// A screen that moves on to something else when it is finished — the next
|
|
48
|
+
// screen of a flow — has ONE way forward: this form's own steps first, then
|
|
49
|
+
// that. Two buttons both called Next, one of which skips the steps still to
|
|
50
|
+
// do, is how a journey gets left half filled in.
|
|
51
|
+
const handsOn = Boolean(children) && Boolean(ctrl.doneLabel)
|
|
52
|
+
const lastStep = forward === null
|
|
47
53
|
return (
|
|
48
54
|
<div className="xeplr-factory-stepnav">
|
|
49
55
|
<button type="button" className="xeplr-factory-secondary" onClick={() => go(back, 'back')} disabled={back === null}>Back</button>
|
|
50
56
|
<span className="xeplr-factory-stepnav-where">Step {place} of {live}</span>
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
{!(handsOn && lastStep) && (
|
|
58
|
+
<button type="button" className="xeplr-factory-primary" onClick={() => go(forward, 'next')} disabled={lastStep}>Next</button>
|
|
59
|
+
)}
|
|
60
|
+
{(!handsOn || lastStep) && children}
|
|
53
61
|
</div>
|
|
54
62
|
)
|
|
55
63
|
}
|