@lssm/lib.presentation-runtime-react 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217060834
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 +10 -11
- package/dist/WorkflowStepper.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/design-system/dist/_virtual/rolldown_runtime.js +0 -5
- package/dist/design-system/dist/components/atoms/EmptyState.js +0 -13
- package/dist/design-system/dist/components/atoms/LoaderCircular.js +0 -43
- package/dist/design-system/dist/components/atoms/Stepper.js +0 -13
- package/dist/design-system/dist/components/molecules/LoaderBlock.js +0 -24
- package/dist/design-system/dist/ui-kit-web/dist/ui/empty-state.js +0 -43
- package/dist/design-system/dist/ui-kit-web/dist/ui/stack.js +0 -158
- package/dist/design-system/dist/ui-kit-web/dist/ui/stepper.js +0 -37
- package/dist/design-system/dist/ui-kit-web/dist/ui/utils.js +0 -10
- package/dist/design-system/dist/ui-kit-web/dist/ui-kit-core/dist/utils.js +0 -13
- package/dist/ui-kit-web/dist/ui/form.js +0 -15
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EmptyState$1 } from "./design-system/dist/components/atoms/EmptyState.js";
|
|
2
|
-
import { LoaderBlock } from "./design-system/dist/components/molecules/LoaderBlock.js";
|
|
3
1
|
import "react";
|
|
2
|
+
import { EmptyState, LoaderBlock } from "@lssm/lib.design-system";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
|
|
6
5
|
//#region src/WorkflowStepRenderer.tsx
|
|
@@ -8,7 +7,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
8
7
|
const steps = spec.definition.steps;
|
|
9
8
|
if (!steps.length) return /* @__PURE__ */ jsx("div", {
|
|
10
9
|
className,
|
|
11
|
-
children: /* @__PURE__ */ jsx(EmptyState
|
|
10
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
12
11
|
title: "No steps defined",
|
|
13
12
|
description: "Add at least one step to this workflow to render it."
|
|
14
13
|
})
|
|
@@ -23,21 +22,21 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
23
22
|
const lastExecution = state.history.at(-1);
|
|
24
23
|
if (state.status === "failed") return /* @__PURE__ */ jsx("div", {
|
|
25
24
|
className,
|
|
26
|
-
children: failedFallback?.(state, lastExecution) ?? /* @__PURE__ */ jsx(EmptyState
|
|
25
|
+
children: failedFallback?.(state, lastExecution) ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
27
26
|
title: "Workflow failed",
|
|
28
27
|
description: lastExecution?.error ?? "Fix the underlying issue and retry the step."
|
|
29
28
|
})
|
|
30
29
|
});
|
|
31
30
|
if (state.status === "cancelled") return /* @__PURE__ */ jsx("div", {
|
|
32
31
|
className,
|
|
33
|
-
children: cancelledFallback ?? /* @__PURE__ */ jsx(EmptyState
|
|
32
|
+
children: cancelledFallback ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
34
33
|
title: "Workflow cancelled",
|
|
35
34
|
description: "This workflow has been cancelled. Restart it to resume."
|
|
36
35
|
})
|
|
37
36
|
});
|
|
38
37
|
if (state.status === "completed") return /* @__PURE__ */ jsx("div", {
|
|
39
38
|
className,
|
|
40
|
-
children: completedFallback ?? /* @__PURE__ */ jsx(EmptyState
|
|
39
|
+
children: completedFallback ?? /* @__PURE__ */ jsx(EmptyState, {
|
|
41
40
|
title: "Workflow complete",
|
|
42
41
|
description: "All steps have been executed successfully."
|
|
43
42
|
})
|
|
@@ -45,7 +44,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
45
44
|
const activeStep = steps.find((step) => step.id === state.currentStep) ?? steps[0];
|
|
46
45
|
if (!activeStep) return /* @__PURE__ */ jsx("div", {
|
|
47
46
|
className,
|
|
48
|
-
children: /* @__PURE__ */ jsx(EmptyState
|
|
47
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
49
48
|
title: "No active step",
|
|
50
49
|
description: "This workflow has no active step."
|
|
51
50
|
})
|
|
@@ -59,7 +58,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
59
58
|
});
|
|
60
59
|
return /* @__PURE__ */ jsx("div", {
|
|
61
60
|
className,
|
|
62
|
-
children: /* @__PURE__ */ jsx(EmptyState
|
|
61
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
63
62
|
title: "Form renderer missing",
|
|
64
63
|
description: "Provide renderHumanStep to render this human step's form."
|
|
65
64
|
})
|
|
@@ -72,7 +71,7 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
72
71
|
});
|
|
73
72
|
return /* @__PURE__ */ jsx("div", {
|
|
74
73
|
className,
|
|
75
|
-
children: /* @__PURE__ */ jsx(EmptyState
|
|
74
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
76
75
|
title: "Automation step in progress",
|
|
77
76
|
description: `Waiting for automation "${activeStep.label}" to finish.`
|
|
78
77
|
})
|
|
@@ -84,14 +83,14 @@ function WorkflowStepRenderer({ spec, state, className, renderHumanStep, renderA
|
|
|
84
83
|
});
|
|
85
84
|
return /* @__PURE__ */ jsx("div", {
|
|
86
85
|
className,
|
|
87
|
-
children: /* @__PURE__ */ jsx(EmptyState
|
|
86
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
88
87
|
title: "Decision step awaiting input",
|
|
89
88
|
description: "Provide a custom decision renderer via renderDecisionStep."
|
|
90
89
|
})
|
|
91
90
|
});
|
|
92
91
|
default: return /* @__PURE__ */ jsx("div", {
|
|
93
92
|
className,
|
|
94
|
-
children: /* @__PURE__ */ jsx(EmptyState
|
|
93
|
+
children: /* @__PURE__ */ jsx(EmptyState, {
|
|
95
94
|
title: "Unknown step type",
|
|
96
95
|
description: `Step "${activeStep.id}" has an unsupported type.`
|
|
97
96
|
})
|
package/dist/WorkflowStepper.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Stepper$1 } from "./design-system/dist/components/atoms/Stepper.js";
|
|
2
1
|
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, {
|
|
13
13
|
current,
|
|
14
14
|
total
|
|
15
15
|
}), showLabels && total > 0 && /* @__PURE__ */ jsx("ol", {
|
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";
|
|
4
3
|
import { useWorkflow } from "./useWorkflow.js";
|
|
5
4
|
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 }) {
|
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-20251217060834",
|
|
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-20251217060834"
|
|
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-20251217060834",
|
|
28
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217060834",
|
|
29
|
+
"@lssm/lib.design-system": "0.0.0-canary-20251217060834",
|
|
30
|
+
"@lssm/lib.ui-kit-web": "0.0.0-canary-20251217060834"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
|
@@ -1,43 +0,0 @@
|
|
|
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 };
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
|
@@ -1,24 +0,0 @@
|
|
|
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 };
|
|
@@ -1,43 +0,0 @@
|
|
|
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 };
|
|
@@ -1,158 +0,0 @@
|
|
|
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 };
|
|
@@ -1,37 +0,0 @@
|
|
|
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 };
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
|
@@ -1,15 +0,0 @@
|
|
|
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 };
|