@trackunit/react-form-wizard 0.1.5 → 0.1.10

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
@@ -200,9 +200,9 @@ const cvaNavigationContainer = cssClassVarianceUtilities.cvaMerge(["flex", "gap-
200
200
  * The footer component for the FormWizard.
201
201
  * In most cases you should not be using this component directly, but rather use the FormWizard component.
202
202
  */
203
- const FormWizardFooter = ({ onBack, onCancel, isValid, primaryActionLabel = "Next" }) => {
203
+ const FormWizardFooter = ({ onBack, onCancel, primaryActionLabel = "Next" }) => {
204
204
  const [t] = useTranslation();
205
- return (jsxRuntime.jsxs("div", { className: cvaFooterContainer(), children: [jsxRuntime.jsx(reactComponents.Button, { dataTestId: "wizard-cancel", onClick: onCancel, variant: "ghost-neutral", children: t("wizard.defaults.cancel") }), jsxRuntime.jsxs("div", { className: cvaNavigationContainer(), children: [onBack ? (jsxRuntime.jsx(reactComponents.Button, { dataTestId: "wizard-back", onClick: onBack, variant: "secondary", children: t("wizard.defaults.back") })) : null, jsxRuntime.jsx(reactComponents.Button, { dataTestId: "wizard-next", disabled: !isValid, type: "submit", children: primaryActionLabel ? primaryActionLabel : t("wizard.defaults.next") })] })] }));
205
+ return (jsxRuntime.jsxs("div", { className: cvaFooterContainer(), children: [jsxRuntime.jsx(reactComponents.Button, { dataTestId: "wizard-cancel", onClick: onCancel, variant: "ghost-neutral", children: t("wizard.defaults.cancel") }), jsxRuntime.jsxs("div", { className: cvaNavigationContainer(), children: [onBack ? (jsxRuntime.jsx(reactComponents.Button, { dataTestId: "wizard-back", onClick: onBack, variant: "secondary", children: t("wizard.defaults.back") })) : null, jsxRuntime.jsx(reactComponents.Button, { dataTestId: "wizard-next", type: "submit", children: primaryActionLabel ? primaryActionLabel : t("wizard.defaults.next") })] })] }));
206
206
  };
207
207
 
208
208
  const cvaFormWizardHeader = cssClassVarianceUtilities.cvaMerge([
@@ -298,8 +298,7 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
298
298
  }) }), jsxRuntime.jsx(FormWizardFooter, { stepForms,
299
299
  onBack: previousStepPath ? () => navigate({ to: basePath, params: { stepPath: previousStepPath } }) : null,
300
300
  primaryActionLabel: isLastStep ? lastStepPrimaryActionLabel : undefined,
301
- onCancel: handleCancel,
302
- isValid: isEmptyStep ? true : form.formState.isValid })] }, String(stepKey)));
301
+ onCancel: handleCancel })] }, String(stepKey)));
303
302
  };
304
303
 
305
304
  const cvaFormWizardContainer = cssClassVarianceUtilities.cvaMerge(["h-full"]);
package/index.esm.js CHANGED
@@ -196,9 +196,9 @@ const cvaNavigationContainer = cvaMerge(["flex", "gap-responsive-space"]);
196
196
  * The footer component for the FormWizard.
197
197
  * In most cases you should not be using this component directly, but rather use the FormWizard component.
198
198
  */
199
- const FormWizardFooter = ({ onBack, onCancel, isValid, primaryActionLabel = "Next" }) => {
199
+ const FormWizardFooter = ({ onBack, onCancel, primaryActionLabel = "Next" }) => {
200
200
  const [t] = useTranslation();
201
- return (jsxs("div", { className: cvaFooterContainer(), children: [jsx(Button, { dataTestId: "wizard-cancel", onClick: onCancel, variant: "ghost-neutral", children: t("wizard.defaults.cancel") }), jsxs("div", { className: cvaNavigationContainer(), children: [onBack ? (jsx(Button, { dataTestId: "wizard-back", onClick: onBack, variant: "secondary", children: t("wizard.defaults.back") })) : null, jsx(Button, { dataTestId: "wizard-next", disabled: !isValid, type: "submit", children: primaryActionLabel ? primaryActionLabel : t("wizard.defaults.next") })] })] }));
201
+ return (jsxs("div", { className: cvaFooterContainer(), children: [jsx(Button, { dataTestId: "wizard-cancel", onClick: onCancel, variant: "ghost-neutral", children: t("wizard.defaults.cancel") }), jsxs("div", { className: cvaNavigationContainer(), children: [onBack ? (jsx(Button, { dataTestId: "wizard-back", onClick: onBack, variant: "secondary", children: t("wizard.defaults.back") })) : null, jsx(Button, { dataTestId: "wizard-next", type: "submit", children: primaryActionLabel ? primaryActionLabel : t("wizard.defaults.next") })] })] }));
202
202
  };
203
203
 
204
204
  const cvaFormWizardHeader = cvaMerge([
@@ -294,8 +294,7 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
294
294
  }) }), jsx(FormWizardFooter, { stepForms,
295
295
  onBack: previousStepPath ? () => navigate({ to: basePath, params: { stepPath: previousStepPath } }) : null,
296
296
  primaryActionLabel: isLastStep ? lastStepPrimaryActionLabel : undefined,
297
- onCancel: handleCancel,
298
- isValid: isEmptyStep ? true : form.formState.isValid })] }, String(stepKey)));
297
+ onCancel: handleCancel })] }, String(stepKey)));
299
298
  };
300
299
 
301
300
  const cvaFormWizardContainer = cvaMerge(["h-full"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-wizard",
3
- "version": "0.1.5",
3
+ "version": "0.1.10",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -2,7 +2,6 @@
2
2
  import { CommonProps } from "@trackunit/react-components";
3
3
  interface FormWizardFooterProps extends CommonProps {
4
4
  primaryActionLabel?: string;
5
- isValid?: boolean;
6
5
  onCancel: () => void;
7
6
  onBack: (() => void) | null;
8
7
  }
@@ -10,5 +9,5 @@ interface FormWizardFooterProps extends CommonProps {
10
9
  * The footer component for the FormWizard.
11
10
  * In most cases you should not be using this component directly, but rather use the FormWizard component.
12
11
  */
13
- export declare const FormWizardFooter: ({ onBack, onCancel, isValid, primaryActionLabel }: FormWizardFooterProps) => JSX.Element;
12
+ export declare const FormWizardFooter: ({ onBack, onCancel, primaryActionLabel }: FormWizardFooterProps) => JSX.Element;
14
13
  export {};
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
- "wizard.defaults.back": "Back",
5
- "wizard.defaults.cancel": "Cancel",
6
- "wizard.defaults.next": "Next"
4
+ "wizard.defaults.back": "Zurück",
5
+ "wizard.defaults.cancel": "Abbrechen",
6
+ "wizard.defaults.next": "Weiter"
7
7
  };
8
8
 
9
9
  exports["default"] = translation;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
- "wizard.defaults.back": "Back",
5
- "wizard.defaults.cancel": "Cancel",
6
- "wizard.defaults.next": "Next"
4
+ "wizard.defaults.back": "Powrót",
5
+ "wizard.defaults.cancel": "Anuluj",
6
+ "wizard.defaults.next": "Dalej"
7
7
  };
8
8
 
9
9
  exports["default"] = translation;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
- "wizard.defaults.back": "Back",
5
- "wizard.defaults.cancel": "Cancel",
6
- "wizard.defaults.next": "Next"
4
+ "wizard.defaults.back": "Înapoi",
5
+ "wizard.defaults.cancel": "Anulare",
6
+ "wizard.defaults.next": "Înainte"
7
7
  };
8
8
 
9
9
  exports["default"] = translation;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
- "wizard.defaults.back": "Back",
5
- "wizard.defaults.cancel": "Cancel",
6
- "wizard.defaults.next": "Next"
4
+ "wizard.defaults.back": "Terug",
5
+ "wizard.defaults.cancel": "Annuleren",
6
+ "wizard.defaults.next": "Volgende"
7
7
  };
8
8
 
9
9
  exports["default"] = translation;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var translation = {
4
- "wizard.defaults.back": "Back",
5
- "wizard.defaults.cancel": "Cancel",
6
- "wizard.defaults.next": "Next"
4
+ "wizard.defaults.back": "Tilbake",
5
+ "wizard.defaults.cancel": "Avbryt",
6
+ "wizard.defaults.next": "Neste"
7
7
  };
8
8
 
9
9
  exports["default"] = translation;
@@ -1,7 +1,7 @@
1
1
  var translation = {
2
- "wizard.defaults.back": "Back",
3
- "wizard.defaults.cancel": "Cancel",
4
- "wizard.defaults.next": "Next"
2
+ "wizard.defaults.back": "Zurück",
3
+ "wizard.defaults.cancel": "Abbrechen",
4
+ "wizard.defaults.next": "Weiter"
5
5
  };
6
6
 
7
7
  export { translation as default };
@@ -1,7 +1,7 @@
1
1
  var translation = {
2
- "wizard.defaults.back": "Back",
3
- "wizard.defaults.cancel": "Cancel",
4
- "wizard.defaults.next": "Next"
2
+ "wizard.defaults.back": "Powrót",
3
+ "wizard.defaults.cancel": "Anuluj",
4
+ "wizard.defaults.next": "Dalej"
5
5
  };
6
6
 
7
7
  export { translation as default };
@@ -1,7 +1,7 @@
1
1
  var translation = {
2
- "wizard.defaults.back": "Back",
3
- "wizard.defaults.cancel": "Cancel",
4
- "wizard.defaults.next": "Next"
2
+ "wizard.defaults.back": "Înapoi",
3
+ "wizard.defaults.cancel": "Anulare",
4
+ "wizard.defaults.next": "Înainte"
5
5
  };
6
6
 
7
7
  export { translation as default };
@@ -1,7 +1,7 @@
1
1
  var translation = {
2
- "wizard.defaults.back": "Back",
3
- "wizard.defaults.cancel": "Cancel",
4
- "wizard.defaults.next": "Next"
2
+ "wizard.defaults.back": "Terug",
3
+ "wizard.defaults.cancel": "Annuleren",
4
+ "wizard.defaults.next": "Volgende"
5
5
  };
6
6
 
7
7
  export { translation as default };
@@ -1,7 +1,7 @@
1
1
  var translation = {
2
- "wizard.defaults.back": "Back",
3
- "wizard.defaults.cancel": "Cancel",
4
- "wizard.defaults.next": "Next"
2
+ "wizard.defaults.back": "Tilbake",
3
+ "wizard.defaults.cancel": "Avbryt",
4
+ "wizard.defaults.next": "Neste"
5
5
  };
6
6
 
7
7
  export { translation as default };