@trackunit/react-form-wizard 2.10.17 → 2.11.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 CHANGED
@@ -670,7 +670,7 @@ const useFormWizard = (props) => {
670
670
  * This component is not intended to be used in production code.
671
671
  * It is used to test the individual steps of a form wizard.
672
672
  */
673
- const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, children, overrides = {}, style, }) => {
673
+ const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, children, overrides = {}, className, "data-testid": dataTestId, style, ref, }) => {
674
674
  const form = reactHookForm.useForm({
675
675
  resolver: zod.zodResolver(fullFormSchema.shape[stepKey]),
676
676
  mode: "all",
@@ -681,7 +681,7 @@ const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, chil
681
681
  mode: "all",
682
682
  defaultValues: defaultValues,
683
683
  });
684
- return (jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children: jsxRuntime.jsx("div", { "data-testid": stepKey, style: style, children: children({
684
+ return (jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children: jsxRuntime.jsx("div", { className: className, "data-testid": dataTestId ?? stepKey, ref: ref, style: style, children: children({
685
685
  form,
686
686
  fullForm,
687
687
  setSubmitHandler: () => {
package/index.esm.js CHANGED
@@ -668,7 +668,7 @@ const useFormWizard = (props) => {
668
668
  * This component is not intended to be used in production code.
669
669
  * It is used to test the individual steps of a form wizard.
670
670
  */
671
- const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, children, overrides = {}, style, }) => {
671
+ const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, children, overrides = {}, className, "data-testid": dataTestId, style, ref, }) => {
672
672
  const form = useForm({
673
673
  resolver: zodResolver(fullFormSchema.shape[stepKey]),
674
674
  mode: "all",
@@ -679,7 +679,7 @@ const TestHelperFormWizardStep = ({ stepKey, fullFormSchema, defaultValues, chil
679
679
  mode: "all",
680
680
  defaultValues: defaultValues,
681
681
  });
682
- return (jsx(FormProvider, { ...form, children: jsx("div", { "data-testid": stepKey, style: style, children: children({
682
+ return (jsx(FormProvider, { ...form, children: jsx("div", { className: className, "data-testid": dataTestId ?? stepKey, ref: ref, style: style, children: children({
683
683
  form,
684
684
  fullForm,
685
685
  setSubmitHandler: () => {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-wizard",
3
- "version": "2.10.17",
3
+ "version": "2.11.0",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
7
7
  "zod": "^3.25.76",
8
8
  "@hookform/resolvers": "^3.3.4",
9
9
  "@tanstack/router-core": "1.114.29",
10
- "@trackunit/shared-utils": "1.19.10",
11
- "@trackunit/css-class-variance-utilities": "2.3.10",
12
- "@trackunit/react-components": "3.8.10",
13
- "@trackunit/i18n-library-translation": "2.8.11"
10
+ "@trackunit/shared-utils": "1.20.0",
11
+ "@trackunit/css-class-variance-utilities": "2.4.0",
12
+ "@trackunit/react-components": "3.9.0",
13
+ "@trackunit/i18n-library-translation": "2.9.0"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=24.x",
@@ -1,9 +1,9 @@
1
- import type { Styleable } from "@trackunit/react-components";
1
+ import type { CommonProps, Refable, Styleable } from "@trackunit/react-components";
2
2
  import { ReactNode } from "react";
3
3
  import { DefaultValues } from "react-hook-form";
4
4
  import { AnyZodObject, z } from "zod";
5
5
  import { StepComponentProps } from "../FormWizard/useFormWizard";
6
- export interface TestHelperFormWizardStepProps<TStepKey extends keyof z.infer<TFullSchema>, TFullSchema extends AnyZodObject> extends Styleable {
6
+ export interface TestHelperFormWizardStepProps<TStepKey extends keyof z.infer<TFullSchema>, TFullSchema extends AnyZodObject> extends CommonProps, Styleable, Refable<HTMLDivElement> {
7
7
  overrides?: Partial<StepComponentProps<() => TFullSchema, TStepKey>>;
8
8
  fullFormSchema: TFullSchema;
9
9
  stepKey: TStepKey;
@@ -15,4 +15,4 @@ export interface TestHelperFormWizardStepProps<TStepKey extends keyof z.infer<TF
15
15
  * This component is not intended to be used in production code.
16
16
  * It is used to test the individual steps of a form wizard.
17
17
  */
18
- export declare const TestHelperFormWizardStep: <TStepKey extends keyof z.infer<TFullSchema>, TFullSchema extends AnyZodObject>({ stepKey, fullFormSchema, defaultValues, children, overrides, style, }: TestHelperFormWizardStepProps<TStepKey, TFullSchema>) => import("react").JSX.Element;
18
+ export declare const TestHelperFormWizardStep: <TStepKey extends keyof z.infer<TFullSchema>, TFullSchema extends AnyZodObject>({ stepKey, fullFormSchema, defaultValues, children, overrides, className, "data-testid": dataTestId, style, ref, }: TestHelperFormWizardStepProps<TStepKey, TFullSchema>) => import("react").JSX.Element;