@trackunit/react-form-wizard 1.13.18 → 1.13.22

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 CHANGED
@@ -459,7 +459,7 @@ const cvaStepContainer = cssClassVarianceUtilities.cvaMerge(["h-full", "grid", "
459
459
  * });
460
460
  * ```
461
461
  */
462
- const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, }) => {
462
+ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }) => {
463
463
  const navigate = reactRouter.useNavigate();
464
464
  const { stepPath, subStepPath } = reactRouter.useParams({ strict: false });
465
465
  const initialFullFormState = react.useMemo(() => sharedUtils.objectFromEntries(sharedUtils.objectEntries(steps)
@@ -604,7 +604,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
604
604
  steps,
605
605
  initialFullFormState,
606
606
  ]);
607
- return (jsxRuntime.jsx("div", { className: cvaFormWizardContainer({ className }), "data-testid": dataTestId, children: jsxRuntime.jsxs("div", { className: cvaFormWizardLayout(), children: [jsxRuntime.jsx(FormWizardSidebar, { children: sidebarSteps }), jsxRuntime.jsx("div", { className: cvaStepContainer(), children: stepWrapper })] }) }));
607
+ return (jsxRuntime.jsx("div", { className: cvaFormWizardContainer({ className }), "data-testid": dataTestId, ref: ref, children: jsxRuntime.jsxs("div", { className: cvaFormWizardLayout(), children: [jsxRuntime.jsx(FormWizardSidebar, { children: sidebarSteps }), jsxRuntime.jsx("div", { className: cvaStepContainer(), children: stepWrapper })] }) }));
608
608
  };
609
609
 
610
610
  /**
package/index.esm.js CHANGED
@@ -457,7 +457,7 @@ const cvaStepContainer = cvaMerge(["h-full", "grid", "bg-white", "overflow-hidde
457
457
  * });
458
458
  * ```
459
459
  */
460
- const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, }) => {
460
+ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }) => {
461
461
  const navigate = useNavigate();
462
462
  const { stepPath, subStepPath } = useParams({ strict: false });
463
463
  const initialFullFormState = useMemo(() => objectFromEntries(objectEntries(steps)
@@ -602,7 +602,7 @@ const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema,
602
602
  steps,
603
603
  initialFullFormState,
604
604
  ]);
605
- return (jsx("div", { className: cvaFormWizardContainer({ className }), "data-testid": dataTestId, children: jsxs("div", { className: cvaFormWizardLayout(), children: [jsx(FormWizardSidebar, { children: sidebarSteps }), jsx("div", { className: cvaStepContainer(), children: stepWrapper })] }) }));
605
+ return (jsx("div", { className: cvaFormWizardContainer({ className }), "data-testid": dataTestId, ref: ref, children: jsxs("div", { className: cvaFormWizardLayout(), children: [jsx(FormWizardSidebar, { children: sidebarSteps }), jsx("div", { className: cvaStepContainer(), children: stepWrapper })] }) }));
606
606
  };
607
607
 
608
608
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-wizard",
3
- "version": "1.13.18",
3
+ "version": "1.13.22",
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.42",
14
- "@trackunit/css-class-variance-utilities": "1.11.42",
15
- "@trackunit/react-components": "1.17.16",
16
- "@trackunit/i18n-library-translation": "1.12.26"
13
+ "@trackunit/shared-utils": "1.13.43",
14
+ "@trackunit/css-class-variance-utilities": "1.11.43",
15
+ "@trackunit/react-components": "1.17.20",
16
+ "@trackunit/i18n-library-translation": "1.12.27"
17
17
  },
18
18
  "engines": {
19
19
  "node": ">=24.x",
@@ -108,4 +108,4 @@ export type FormWizardStepFormReturnMap<TFullSchema extends AnyZodObject> = Part
108
108
  * });
109
109
  * ```
110
110
  */
111
- export declare const FormWizard: <TFullSchema extends AnyZodObject, TComponentStepDefinitions extends StepDefinitions<TFullSchema>>({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, }: FromWizardComponentProps<TFullSchema, TComponentStepDefinitions>) => import("react/jsx-runtime").JSX.Element;
111
+ export declare const FormWizard: <TFullSchema extends AnyZodObject, TComponentStepDefinitions extends StepDefinitions<TFullSchema>>({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }: FromWizardComponentProps<TFullSchema, TComponentStepDefinitions>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { RegisteredRouter, RouteIds } from "@tanstack/react-router";
2
- import { CommonProps } from "@trackunit/react-components";
2
+ import { CommonProps, Refable } from "@trackunit/react-components";
3
3
  import { MappedOmit } from "@trackunit/shared-utils";
4
4
  import { ReactNode } from "react";
5
5
  import { UseFormReturn } from "react-hook-form";
@@ -29,7 +29,7 @@ interface DefinedStep<TStepSchema extends TFullSchemaValue[keyof TFullSchemaValu
29
29
  defaultValues?: Partial<TStepSchema>;
30
30
  }
31
31
  export type StepComponentProps<TFullSchemaHook extends () => AnyZodObject, TStepKey extends keyof z.TypeOf<ReturnType<TFullSchemaHook>>> = StepComponentPropsInner<z.TypeOf<ReturnType<TFullSchemaHook>>[TStepKey], z.TypeOf<ReturnType<TFullSchemaHook>>>;
32
- export interface FromWizardComponentProps<TFullSchema extends AnyZodObject, TComponentStepDefinitions extends StepDefinitions<TFullSchema>> extends MappedOmit<UseFormWizardProps<TFullSchema, TComponentStepDefinitions>, "steps">, CommonProps {
32
+ export interface FromWizardComponentProps<TFullSchema extends AnyZodObject, TComponentStepDefinitions extends StepDefinitions<TFullSchema>> extends MappedOmit<UseFormWizardProps<TFullSchema, TComponentStepDefinitions>, "steps">, CommonProps, Refable<HTMLDivElement> {
33
33
  steps: TComponentStepDefinitions;
34
34
  }
35
35
  export type StringWithStepKey<TPath> = TPath extends `${infer _Prefix}/$stepPath` ? TPath : never;