@trackunit/react-form-wizard 1.14.8 → 1.14.10-alpha-ae1ff73fc64.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/index.cjs.js +4 -4
- package/index.esm.js +4 -4
- package/package.json +5 -5
- package/src/FormWizard/FormWizard.variants.d.ts +3 -3
- package/src/FormWizardFooter/FormWizardFooter.variants.d.ts +2 -2
- package/src/FormWizardHeader/FormWizardHeader.variants.d.ts +1 -1
- package/src/FormWizardSidebar/FormWizardSidebar.variants.d.ts +2 -2
- package/src/FormWizardSidebarStep/FormWizardSidebarStep.variants.d.ts +8 -8
- package/src/FormWizardStepWrapper/FormWizardStepWrapper.variants.d.ts +2 -2
package/index.cjs.js
CHANGED
|
@@ -209,7 +209,7 @@ const cvaFormWizardHeader = cssClassVarianceUtilities.cvaMerge([
|
|
|
209
209
|
* In most cases you should not be using this component directly, but rather use the FormWizard component.
|
|
210
210
|
*/
|
|
211
211
|
const FormWizardHeader = ({ title, description, className, "data-testid": dataTestId, }) => {
|
|
212
|
-
return (jsxRuntime.jsxs("div", { className: cvaFormWizardHeader({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.Heading, { variant: "secondary", children: title }), description ? (jsxRuntime.jsx(reactComponents.Heading, { subtle: true, variant: "subtitle", children: description })) : null] }));
|
|
212
|
+
return (jsxRuntime.jsxs("div", { className: cvaFormWizardHeader({ className }), "data-testid": dataTestId, children: [jsxRuntime.jsx(reactComponents.Heading, { variant: "secondary", children: title }), description !== undefined ? (jsxRuntime.jsx(reactComponents.Heading, { subtle: true, variant: "subtitle", children: description })) : null] }));
|
|
213
213
|
};
|
|
214
214
|
|
|
215
215
|
const cvaFormWizardComponentContainer = cssClassVarianceUtilities.cvaMerge(["p-responsive-space", "overflow-y-auto", "bg-neutral-50"]);
|
|
@@ -474,7 +474,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
|
|
|
474
474
|
initialFullFormState);
|
|
475
475
|
// If URL does not match a key from the schema, navigate to the first step
|
|
476
476
|
const firstSchemaKey = String(sharedUtils.objectKeys(fullFormSchema.shape)[0]);
|
|
477
|
-
const keyToCheck = subStepPath ? `${stepPath}/${subStepPath}` : stepPath;
|
|
477
|
+
const keyToCheck = Boolean(subStepPath) ? `${stepPath}/${subStepPath}` : stepPath;
|
|
478
478
|
// Move navigation to useEffect to avoid setState during render
|
|
479
479
|
react.useEffect(() => {
|
|
480
480
|
if (fullFormSchema.shape[keyToCheck] === undefined) {
|
|
@@ -491,7 +491,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
|
|
|
491
491
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
492
492
|
return typeof obj.shouldRender === "function";
|
|
493
493
|
}, []);
|
|
494
|
-
const currentVisibleStepKey = subStepPath ? `${stepPath}/${subStepPath}` : stepPath;
|
|
494
|
+
const currentVisibleStepKey = subStepPath !== undefined ? `${stepPath}/${subStepPath}` : stepPath;
|
|
495
495
|
const currentVisibleStepIndex = react.useMemo(() => sharedUtils.objectKeys(steps)
|
|
496
496
|
.filter(key => {
|
|
497
497
|
const step = steps[key];
|
|
@@ -543,7 +543,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
|
|
|
543
543
|
stepNumber: isSubStep ? undefined : rootSteps.indexOf(key) + 1,
|
|
544
544
|
title,
|
|
545
545
|
onClickNavigate: () => {
|
|
546
|
-
if (previousStepKey) {
|
|
546
|
+
if (previousStepKey !== undefined) {
|
|
547
547
|
const previousStepForm = stepForms[previousStepKey];
|
|
548
548
|
setFullFormState(prev => ({
|
|
549
549
|
...prev,
|
package/index.esm.js
CHANGED
|
@@ -207,7 +207,7 @@ const cvaFormWizardHeader = cvaMerge([
|
|
|
207
207
|
* In most cases you should not be using this component directly, but rather use the FormWizard component.
|
|
208
208
|
*/
|
|
209
209
|
const FormWizardHeader = ({ title, description, className, "data-testid": dataTestId, }) => {
|
|
210
|
-
return (jsxs("div", { className: cvaFormWizardHeader({ className }), "data-testid": dataTestId, children: [jsx(Heading, { variant: "secondary", children: title }), description ? (jsx(Heading, { subtle: true, variant: "subtitle", children: description })) : null] }));
|
|
210
|
+
return (jsxs("div", { className: cvaFormWizardHeader({ className }), "data-testid": dataTestId, children: [jsx(Heading, { variant: "secondary", children: title }), description !== undefined ? (jsx(Heading, { subtle: true, variant: "subtitle", children: description })) : null] }));
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
const cvaFormWizardComponentContainer = cvaMerge(["p-responsive-space", "overflow-y-auto", "bg-neutral-50"]);
|
|
@@ -472,7 +472,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
|
|
|
472
472
|
initialFullFormState);
|
|
473
473
|
// If URL does not match a key from the schema, navigate to the first step
|
|
474
474
|
const firstSchemaKey = String(objectKeys(fullFormSchema.shape)[0]);
|
|
475
|
-
const keyToCheck = subStepPath ? `${stepPath}/${subStepPath}` : stepPath;
|
|
475
|
+
const keyToCheck = Boolean(subStepPath) ? `${stepPath}/${subStepPath}` : stepPath;
|
|
476
476
|
// Move navigation to useEffect to avoid setState during render
|
|
477
477
|
useEffect(() => {
|
|
478
478
|
if (fullFormSchema.shape[keyToCheck] === undefined) {
|
|
@@ -489,7 +489,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
|
|
|
489
489
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
490
490
|
return typeof obj.shouldRender === "function";
|
|
491
491
|
}, []);
|
|
492
|
-
const currentVisibleStepKey = subStepPath ? `${stepPath}/${subStepPath}` : stepPath;
|
|
492
|
+
const currentVisibleStepKey = subStepPath !== undefined ? `${stepPath}/${subStepPath}` : stepPath;
|
|
493
493
|
const currentVisibleStepIndex = useMemo(() => objectKeys(steps)
|
|
494
494
|
.filter(key => {
|
|
495
495
|
const step = steps[key];
|
|
@@ -541,7 +541,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
|
|
|
541
541
|
stepNumber: isSubStep ? undefined : rootSteps.indexOf(key) + 1,
|
|
542
542
|
title,
|
|
543
543
|
onClickNavigate: () => {
|
|
544
|
-
if (previousStepKey) {
|
|
544
|
+
if (previousStepKey !== undefined) {
|
|
545
545
|
const previousStepForm = stepForms[previousStepKey];
|
|
546
546
|
setFullFormState(prev => ({
|
|
547
547
|
...prev,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-wizard",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.10-alpha-ae1ff73fc64.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"react-hook-form": "7.62.0",
|
|
11
11
|
"@tanstack/react-router": "1.114.29",
|
|
12
12
|
"@tanstack/router-core": "1.114.29",
|
|
13
|
-
"@trackunit/shared-utils": "1.13.
|
|
14
|
-
"@trackunit/css-class-variance-utilities": "1.11.
|
|
15
|
-
"@trackunit/react-components": "1.18.
|
|
16
|
-
"@trackunit/i18n-library-translation": "1.12.
|
|
13
|
+
"@trackunit/shared-utils": "1.13.69-alpha-ae1ff73fc64.0",
|
|
14
|
+
"@trackunit/css-class-variance-utilities": "1.11.69-alpha-ae1ff73fc64.0",
|
|
15
|
+
"@trackunit/react-components": "1.18.10-alpha-ae1ff73fc64.0",
|
|
16
|
+
"@trackunit/i18n-library-translation": "1.12.60-alpha-ae1ff73fc64.0"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=24.x",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const cvaFormWizardContainer: (props?: import("class-variance-authority/
|
|
2
|
-
export declare const cvaFormWizardLayout: (props?: import("class-variance-authority/
|
|
3
|
-
export declare const cvaStepContainer: (props?: import("class-variance-authority/
|
|
1
|
+
export declare const cvaFormWizardContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const cvaFormWizardLayout: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
|
+
export declare const cvaStepContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cvaFooterContainer: (props?: import("class-variance-authority/
|
|
2
|
-
export declare const cvaNavigationContainer: (props?: import("class-variance-authority/
|
|
1
|
+
export declare const cvaFooterContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const cvaNavigationContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const cvaFormWizardHeader: (props?: import("class-variance-authority/
|
|
1
|
+
export declare const cvaFormWizardHeader: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cvaFillSection: (props?: import("class-variance-authority/
|
|
2
|
-
export declare const cvaSidebar: (props?: import("class-variance-authority/
|
|
1
|
+
export declare const cvaFillSection: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const cvaSidebar: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const cvaFormWizardSidebarStep: (props?: ({
|
|
2
2
|
state?: "ready" | "active" | "done" | "invalid" | "disabled" | null | undefined;
|
|
3
3
|
isSubStep?: boolean | null | undefined;
|
|
4
|
-
} & import("class-variance-authority/
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const cvaSectionHeaderContainer: (props?: ({
|
|
6
6
|
state?: "ready" | "active" | "done" | "invalid" | "disabled" | null | undefined;
|
|
7
|
-
cursor?: "
|
|
8
|
-
} & import("class-variance-authority/
|
|
9
|
-
export declare const cvaHeader: (props?: import("class-variance-authority/
|
|
10
|
-
export declare const cvaSubtitle: (props?: import("class-variance-authority/
|
|
11
|
-
export declare const cvaStepNumberContainer: (props?: import("class-variance-authority/
|
|
7
|
+
cursor?: "withCursor" | "default" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export declare const cvaHeader: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
|
+
export declare const cvaSubtitle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
|
+
export declare const cvaStepNumberContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
12
12
|
export declare const cvaStepNumber: (props?: ({
|
|
13
13
|
state?: "ready" | "active" | "done" | "invalid" | "disabled" | null | undefined;
|
|
14
14
|
isSubStep?: boolean | null | undefined;
|
|
15
|
-
} & import("class-variance-authority/
|
|
16
|
-
export declare const cvaTitleAndDescription: (props?: import("class-variance-authority/
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export declare const cvaTitleAndDescription: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const cvaFormWizardComponentContainer: (props?: import("class-variance-authority/
|
|
2
|
-
export declare const cvaFormWizardComponentStepForm: (props?: import("class-variance-authority/
|
|
1
|
+
export declare const cvaFormWizardComponentContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const cvaFormWizardComponentStepForm: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|