@lssm/lib.presentation-runtime-react 0.0.0-canary-20251217060834 → 0.0.0-canary-20251217072406
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/WorkflowStepRenderer.js +11 -10
- package/dist/WorkflowStepper.js +2 -2
- package/dist/design-system/dist/_virtual/rolldown_runtime.js +5 -0
- package/dist/design-system/dist/components/atoms/EmptyState.js +13 -0
- package/dist/design-system/dist/components/atoms/LoaderCircular.js +43 -0
- package/dist/design-system/dist/components/atoms/Stepper.js +13 -0
- package/dist/design-system/dist/components/molecules/LoaderBlock.js +24 -0
- package/dist/design-system/dist/ui-kit-web/dist/ui/empty-state.js +43 -0
- package/dist/design-system/dist/ui-kit-web/dist/ui/stack.js +158 -0
- package/dist/design-system/dist/ui-kit-web/dist/ui/stepper.js +37 -0
- package/dist/design-system/dist/ui-kit-web/dist/ui/utils.js +10 -0
- package/dist/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +13 -0
- package/dist/index.js +1 -1
- package/dist/ui-kit-web/dist/ui/form.js +15 -0
- package/package.json +6 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { EmptyState$1 } from "./design-system/dist/components/atoms/EmptyState.js";
|
|
2
|
+
import { LoaderBlock } from "./design-system/dist/components/molecules/LoaderBlock.js";
|
|
1
3
|
import "react";
|
|
2
|
-
import { EmptyState, LoaderBlock } from "@lssm/lib.design-system";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/WorkflowStepRenderer.tsx
|
|
@@ -7,7 +8,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
7
8
|
const steps = spec.definition.steps;
|
|
8
9
|
if (!steps.length) return /* @__PURE__ */ jsx("div", {
|
|
9
10
|
className,
|
|
10
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
11
|
+
children: /* @__PURE__ */ jsx(EmptyState$1, {
|
|
11
12
|
title: "No steps defined",
|
|
12
13
|
description: "Add at least one step to this workflow to render it."
|
|
13
14
|
})
|
|
@@ -22,21 +23,21 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
22
23
|
const lastExecution = state.history.at(-1);
|
|
23
24
|
if (state.status === "failed") return /* @__PURE__ */ jsx("div", {
|
|
24
25
|
className,
|
|
25
|
-
children: failedFallback?.(state, lastExecution) ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
26
|
+
children: failedFallback?.(state, lastExecution) ?? /* @__PURE__ */ jsx(EmptyState$1, {
|
|
26
27
|
title: "Workflow failed",
|
|
27
28
|
description: lastExecution?.error ?? "Fix the underlying issue and retry the step."
|
|
28
29
|
})
|
|
29
30
|
});
|
|
30
31
|
if (state.status === "cancelled") return /* @__PURE__ */ jsx("div", {
|
|
31
32
|
className,
|
|
32
|
-
children: cancelledFallback ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
33
|
+
children: cancelledFallback ?? /* @__PURE__ */ jsx(EmptyState$1, {
|
|
33
34
|
title: "Workflow cancelled",
|
|
34
35
|
description: "This workflow has been cancelled. Restart it to resume."
|
|
35
36
|
})
|
|
36
37
|
});
|
|
37
38
|
if (state.status === "completed") return /* @__PURE__ */ jsx("div", {
|
|
38
39
|
className,
|
|
39
|
-
children: completedFallback ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
40
|
+
children: completedFallback ?? /* @__PURE__ */ jsx(EmptyState$1, {
|
|
40
41
|
title: "Workflow complete",
|
|
41
42
|
description: "All steps have been executed successfully."
|
|
42
43
|
})
|
|
@@ -44,7 +45,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
44
45
|
const activeStep = steps.find((step) => step.id === state.currentStep) ?? steps[0];
|
|
45
46
|
if (!activeStep) return /* @__PURE__ */ jsx("div", {
|
|
46
47
|
className,
|
|
47
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
48
|
+
children: /* @__PURE__ */ jsx(EmptyState$1, {
|
|
48
49
|
title: "No active step",
|
|
49
50
|
description: "This workflow has no active step."
|
|
50
51
|
})
|
|
@@ -58,7 +59,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
58
59
|
});
|
|
59
60
|
return /* @__PURE__ */ jsx("div", {
|
|
60
61
|
className,
|
|
61
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
62
|
+
children: /* @__PURE__ */ jsx(EmptyState$1, {
|
|
62
63
|
title: "Form renderer missing",
|
|
63
64
|
description: "Provide renderHumanStep to render this human step's form."
|
|
64
65
|
})
|
|
@@ -71,7 +72,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
71
72
|
});
|
|
72
73
|
return /* @__PURE__ */ jsx("div", {
|
|
73
74
|
className,
|
|
74
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
75
|
+
children: /* @__PURE__ */ jsx(EmptyState$1, {
|
|
75
76
|
title: "Automation step in progress",
|
|
76
77
|
description: `Waiting for automation "${activeStep.label}" to finish.`
|
|
77
78
|
})
|
|
@@ -83,14 +84,14 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
83
84
|
});
|
|
84
85
|
return /* @__PURE__ */ jsx("div", {
|
|
85
86
|
className,
|
|
86
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
87
|
+
children: /* @__PURE__ */ jsx(EmptyState$1, {
|
|
87
88
|
title: "Decision step awaiting input",
|
|
88
89
|
description: "Provide a custom decision renderer via renderDecisionStep."
|
|
89
90
|
})
|
|
90
91
|
});
|
|
91
92
|
default: return /* @__PURE__ */ jsx("div", {
|
|
92
93
|
className,
|
|
93
|
-
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
94
|
+
children: /* @__PURE__ */ jsx(EmptyState$1, {
|
|
94
95
|
title: "Unknown step type",
|
|
95
96
|
description: `Step "${activeStep.id}" has an unsupported type.`
|
|
96
97
|
})
|
package/dist/WorkflowStepper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Stepper$1 } from "./design-system/dist/components/atoms/Stepper.js";
|
|
1
2
|
import "react";
|
|
2
|
-
import { Stepper } from "@lssm/lib.design-system";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/WorkflowStepper.tsx
|
|
@@ -9,7 +9,7 @@ function WorkflowStepper({ spec, state, className, showLabels = false }) {
|
|
|
9
9
|
const current = computeCurrent(steps, state);
|
|
10
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
11
|
className: ["flex flex-col gap-2", className].filter(Boolean).join(" "),
|
|
12
|
-
children: [/* @__PURE__ */ jsx(Stepper, {
|
|
12
|
+
children: [/* @__PURE__ */ jsx(Stepper$1, {
|
|
13
13
|
current,
|
|
14
14
|
total
|
|
15
15
|
}), showLabels && total > 0 && /* @__PURE__ */ jsx("ol", {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { EmptyState } from "../../ui-kit-web/dist/ui/empty-state.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region ../design-system/dist/components/atoms/EmptyState.js
|
|
8
|
+
function EmptyState$1(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(EmptyState, { ...props });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { EmptyState$1 };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn } from "../../ui-kit-web/dist/ui/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { Loader2 } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
//#region ../design-system/dist/components/atoms/LoaderCircular.js
|
|
8
|
+
const spinnerVariants = cva("animate-spin", {
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
sm: "h-4 w-4",
|
|
12
|
+
md: "h-5 w-5",
|
|
13
|
+
lg: "h-6 w-6"
|
|
14
|
+
},
|
|
15
|
+
tone: {
|
|
16
|
+
default: "text-foreground",
|
|
17
|
+
muted: "text-muted-foreground"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: "md",
|
|
22
|
+
tone: "muted"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function LoaderCircular({ size, tone, label, className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: cn("inline-flex items-center gap-2", className),
|
|
28
|
+
role: "status",
|
|
29
|
+
"aria-live": "polite",
|
|
30
|
+
"aria-busy": true,
|
|
31
|
+
...props,
|
|
32
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: cn(spinnerVariants({
|
|
33
|
+
size,
|
|
34
|
+
tone
|
|
35
|
+
})) }), label ? /* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: "text-muted-foreground text-base",
|
|
37
|
+
children: label
|
|
38
|
+
}) : null]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { LoaderCircular };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Stepper } from "../../ui-kit-web/dist/ui/stepper.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region ../design-system/dist/components/atoms/Stepper.js
|
|
8
|
+
function Stepper$1(props) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Stepper, { ...props });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Stepper$1 };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from "../../ui-kit-web/dist/ui/utils.js";
|
|
2
|
+
import { LoaderCircular } from "../atoms/LoaderCircular.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region ../design-system/dist/components/molecules/LoaderBlock.js
|
|
7
|
+
function LoaderBlock({ label, description, className, size = "md" }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
className: cn("flex items-center justify-center p-6", className),
|
|
10
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: "inline-flex items-center gap-3",
|
|
12
|
+
children: [/* @__PURE__ */ jsx(LoaderCircular, {
|
|
13
|
+
size,
|
|
14
|
+
label
|
|
15
|
+
}), description ? /* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "text-muted-foreground text-base",
|
|
17
|
+
children: description
|
|
18
|
+
}) : null]
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { LoaderBlock };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import { VStack } from "./stack.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
|
|
7
|
+
//#region ../design-system/dist/ui-kit-web/dist/ui/empty-state.js
|
|
8
|
+
init_utils();
|
|
9
|
+
const containerVariants = cva("items-center text-center", {
|
|
10
|
+
variants: { density: {
|
|
11
|
+
compact: "gap-3 p-6",
|
|
12
|
+
default: "gap-4 p-8"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { density: "default" }
|
|
15
|
+
});
|
|
16
|
+
function EmptyState({ icon, title, description, primaryAction, secondaryAction, className, density }) {
|
|
17
|
+
return /* @__PURE__ */ jsxs(VStack, {
|
|
18
|
+
className: cn(containerVariants({ density }), className),
|
|
19
|
+
children: [
|
|
20
|
+
icon ? /* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: "bg-muted flex h-12 w-12 items-center justify-center rounded-full",
|
|
22
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: "text-muted-foreground flex items-center justify-center",
|
|
24
|
+
children: icon
|
|
25
|
+
})
|
|
26
|
+
}) : null,
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
|
|
28
|
+
className: "font-medium",
|
|
29
|
+
children: title
|
|
30
|
+
}), description ? /* @__PURE__ */ jsx("p", {
|
|
31
|
+
className: "text-muted-foreground text-base",
|
|
32
|
+
children: description
|
|
33
|
+
}) : null] }),
|
|
34
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "flex items-center justify-center gap-2",
|
|
36
|
+
children: [primaryAction, secondaryAction]
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { EmptyState };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
//#region ../design-system/dist/ui-kit-web/dist/ui/stack.js
|
|
7
|
+
init_utils();
|
|
8
|
+
const vStackVariants = cva("flex flex-col", {
|
|
9
|
+
variants: {
|
|
10
|
+
gap: {
|
|
11
|
+
none: "gap-0",
|
|
12
|
+
xs: "gap-1",
|
|
13
|
+
sm: "gap-2",
|
|
14
|
+
md: "gap-3",
|
|
15
|
+
lg: "gap-4",
|
|
16
|
+
xl: "gap-6",
|
|
17
|
+
"2xl": "gap-8"
|
|
18
|
+
},
|
|
19
|
+
align: {
|
|
20
|
+
start: "items-start",
|
|
21
|
+
center: "items-center",
|
|
22
|
+
end: "items-end",
|
|
23
|
+
stretch: "items-stretch"
|
|
24
|
+
},
|
|
25
|
+
justify: {
|
|
26
|
+
start: "justify-start",
|
|
27
|
+
center: "justify-center",
|
|
28
|
+
end: "justify-end",
|
|
29
|
+
between: "justify-between",
|
|
30
|
+
around: "justify-around",
|
|
31
|
+
evenly: "justify-evenly"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
gap: "md",
|
|
36
|
+
align: "stretch",
|
|
37
|
+
justify: "start"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const VStack = React$1.forwardRef(({ className, gap, align, justify, as = "div", ...props }, ref) => {
|
|
41
|
+
return /* @__PURE__ */ jsx(as, {
|
|
42
|
+
ref,
|
|
43
|
+
className: cn(vStackVariants({
|
|
44
|
+
gap,
|
|
45
|
+
align,
|
|
46
|
+
justify
|
|
47
|
+
}), className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
VStack.displayName = "VStack";
|
|
52
|
+
const hStackVariants = cva("flex flex-row", {
|
|
53
|
+
variants: {
|
|
54
|
+
gap: {
|
|
55
|
+
none: "gap-0",
|
|
56
|
+
xs: "gap-1",
|
|
57
|
+
sm: "gap-2",
|
|
58
|
+
md: "gap-3",
|
|
59
|
+
lg: "gap-4",
|
|
60
|
+
xl: "gap-6",
|
|
61
|
+
"2xl": "gap-8"
|
|
62
|
+
},
|
|
63
|
+
align: {
|
|
64
|
+
start: "items-start",
|
|
65
|
+
center: "items-center",
|
|
66
|
+
end: "items-end",
|
|
67
|
+
stretch: "items-stretch",
|
|
68
|
+
baseline: "items-baseline"
|
|
69
|
+
},
|
|
70
|
+
justify: {
|
|
71
|
+
start: "justify-start",
|
|
72
|
+
center: "justify-center",
|
|
73
|
+
end: "justify-end",
|
|
74
|
+
between: "justify-between",
|
|
75
|
+
around: "justify-around",
|
|
76
|
+
evenly: "justify-evenly"
|
|
77
|
+
},
|
|
78
|
+
wrap: {
|
|
79
|
+
nowrap: "flex-nowrap",
|
|
80
|
+
wrap: "flex-wrap",
|
|
81
|
+
wrapReverse: "flex-wrap-reverse"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
gap: "md",
|
|
86
|
+
align: "center",
|
|
87
|
+
justify: "start",
|
|
88
|
+
wrap: "wrap"
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const HStack = React$1.forwardRef(({ className, gap, align, justify, wrap, as = "div", ...props }, ref) => {
|
|
92
|
+
return /* @__PURE__ */ jsx(as, {
|
|
93
|
+
ref,
|
|
94
|
+
className: cn(hStackVariants({
|
|
95
|
+
gap,
|
|
96
|
+
align,
|
|
97
|
+
justify,
|
|
98
|
+
wrap
|
|
99
|
+
}), className),
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
HStack.displayName = "HStack";
|
|
104
|
+
const boxVariants = cva("flex flex-row", {
|
|
105
|
+
variants: {
|
|
106
|
+
gap: {
|
|
107
|
+
none: "gap-0",
|
|
108
|
+
xs: "gap-1",
|
|
109
|
+
sm: "gap-2",
|
|
110
|
+
md: "gap-3",
|
|
111
|
+
lg: "gap-4",
|
|
112
|
+
xl: "gap-6",
|
|
113
|
+
"2xl": "gap-8"
|
|
114
|
+
},
|
|
115
|
+
align: {
|
|
116
|
+
start: "items-start",
|
|
117
|
+
center: "items-center",
|
|
118
|
+
end: "items-end",
|
|
119
|
+
stretch: "items-stretch",
|
|
120
|
+
baseline: "items-baseline"
|
|
121
|
+
},
|
|
122
|
+
justify: {
|
|
123
|
+
start: "justify-start",
|
|
124
|
+
center: "justify-center",
|
|
125
|
+
end: "justify-end",
|
|
126
|
+
between: "justify-between",
|
|
127
|
+
around: "justify-around",
|
|
128
|
+
evenly: "justify-evenly"
|
|
129
|
+
},
|
|
130
|
+
wrap: {
|
|
131
|
+
nowrap: "flex-nowrap",
|
|
132
|
+
wrap: "flex-wrap",
|
|
133
|
+
wrapReverse: "flex-wrap-reverse"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: {
|
|
137
|
+
gap: "md",
|
|
138
|
+
align: "center",
|
|
139
|
+
justify: "center",
|
|
140
|
+
wrap: "nowrap"
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
const Box = React$1.forwardRef(({ className, gap, align, justify, wrap, as = "div", ...props }, ref) => {
|
|
144
|
+
return /* @__PURE__ */ jsx(as, {
|
|
145
|
+
ref,
|
|
146
|
+
className: cn(boxVariants({
|
|
147
|
+
gap,
|
|
148
|
+
align,
|
|
149
|
+
justify,
|
|
150
|
+
wrap
|
|
151
|
+
}), className),
|
|
152
|
+
...props
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
Box.displayName = "Box";
|
|
156
|
+
|
|
157
|
+
//#endregion
|
|
158
|
+
export { HStack, VStack };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { cn, init_utils } from "../ui-kit-core/dist/utils.js";
|
|
2
|
+
import { HStack } from "./stack.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
|
|
7
|
+
//#region ../design-system/dist/ui-kit-web/dist/ui/stepper.js
|
|
8
|
+
init_utils();
|
|
9
|
+
const dotVariants = cva("h-2 w-2 rounded-full", {
|
|
10
|
+
variants: {
|
|
11
|
+
state: {
|
|
12
|
+
active: "bg-primary",
|
|
13
|
+
inactive: "bg-muted-foreground/20"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "",
|
|
17
|
+
md: "h-2.5 w-2.5"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
state: "inactive",
|
|
22
|
+
size: "md"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function Stepper({ current, total, size, className }) {
|
|
26
|
+
const items = Array.from({ length: Math.max(0, total) });
|
|
27
|
+
return /* @__PURE__ */ jsx(HStack, {
|
|
28
|
+
className: cn("items-center gap-2", className),
|
|
29
|
+
children: items.map((_, idx) => /* @__PURE__ */ jsx("span", { className: cn(dotVariants({
|
|
30
|
+
state: idx + 1 === current ? "active" : "inactive",
|
|
31
|
+
size
|
|
32
|
+
})) }, idx))
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Stepper };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __esmMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
|
|
5
|
+
//#region ../design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
var init_utils = __esmMin((() => {}));
|
|
10
|
+
init_utils();
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { cn, init_utils };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WorkflowStepRenderer } from "./WorkflowStepRenderer.js";
|
|
2
2
|
import { WorkflowStepper } from "./WorkflowStepper.js";
|
|
3
|
+
import { useForm } from "./ui-kit-web/dist/ui/form.js";
|
|
3
4
|
import { useWorkflow } from "./useWorkflow.js";
|
|
4
5
|
import * as React from "react";
|
|
5
|
-
import { useForm } from "@lssm/lib.ui-kit-web/ui/form";
|
|
6
6
|
|
|
7
7
|
//#region src/index.ts
|
|
8
8
|
function usePresentationController({ defaults, form: formOpts, toVariables, fetcher, toChips, useUrlState, replace }) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import "@radix-ui/react-slot";
|
|
6
|
+
import { useForm } from "react-hook-form";
|
|
7
|
+
import "@hookform/resolvers/zod";
|
|
8
|
+
import "@radix-ui/react-label";
|
|
9
|
+
|
|
10
|
+
//#region ../ui-kit-web/dist/ui/form.js
|
|
11
|
+
const FormFieldContext = React$1.createContext({});
|
|
12
|
+
const FormItemContext = React$1.createContext({});
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useForm };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.presentation-runtime-react",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217072406",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"react": "^19.2.3",
|
|
22
22
|
"react-hook-form": "^7.68.0",
|
|
23
23
|
"zod": "^4.1.13",
|
|
24
|
-
"@lssm/lib.presentation-runtime-core": "0.0.0-canary-
|
|
24
|
+
"@lssm/lib.presentation-runtime-core": "0.0.0-canary-20251217072406"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@lssm/lib.presentation-runtime-core": "0.0.0-canary-
|
|
28
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
29
|
-
"@lssm/lib.design-system": "0.0.0-canary-
|
|
30
|
-
"@lssm/lib.ui-kit-web": "0.0.0-canary-
|
|
27
|
+
"@lssm/lib.presentation-runtime-core": "0.0.0-canary-20251217072406",
|
|
28
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217072406",
|
|
29
|
+
"@lssm/lib.design-system": "0.0.0-canary-20251217072406",
|
|
30
|
+
"@lssm/lib.ui-kit-web": "0.0.0-canary-20251217072406"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|