@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 +3 -4
- package/index.esm.js +3 -4
- package/package.json +1 -1
- package/src/FormWizardFooter/FormWizardFooter.d.ts +1 -2
- package/translation.cjs.js +3 -3
- package/translation.cjs10.js +3 -3
- package/translation.cjs13.js +3 -3
- package/translation.cjs4.js +3 -3
- package/translation.cjs9.js +3 -3
- package/translation.esm.js +3 -3
- package/translation.esm10.js +3 -3
- package/translation.esm13.js +3 -3
- package/translation.esm4.js +3 -3
- package/translation.esm9.js +3 -3
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,
|
|
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",
|
|
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,
|
|
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",
|
|
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
|
@@ -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,
|
|
12
|
+
export declare const FormWizardFooter: ({ onBack, onCancel, primaryActionLabel }: FormWizardFooterProps) => JSX.Element;
|
|
14
13
|
export {};
|
package/translation.cjs.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"wizard.defaults.back": "
|
|
5
|
-
"wizard.defaults.cancel": "
|
|
6
|
-
"wizard.defaults.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;
|
package/translation.cjs10.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"wizard.defaults.back": "
|
|
5
|
-
"wizard.defaults.cancel": "
|
|
6
|
-
"wizard.defaults.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;
|
package/translation.cjs13.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"wizard.defaults.back": "
|
|
5
|
-
"wizard.defaults.cancel": "
|
|
6
|
-
"wizard.defaults.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;
|
package/translation.cjs4.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"wizard.defaults.back": "
|
|
5
|
-
"wizard.defaults.cancel": "
|
|
6
|
-
"wizard.defaults.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;
|
package/translation.cjs9.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var translation = {
|
|
4
|
-
"wizard.defaults.back": "
|
|
5
|
-
"wizard.defaults.cancel": "
|
|
6
|
-
"wizard.defaults.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;
|
package/translation.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"wizard.defaults.back": "
|
|
3
|
-
"wizard.defaults.cancel": "
|
|
4
|
-
"wizard.defaults.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 };
|
package/translation.esm10.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"wizard.defaults.back": "
|
|
3
|
-
"wizard.defaults.cancel": "
|
|
4
|
-
"wizard.defaults.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 };
|
package/translation.esm13.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"wizard.defaults.back": "
|
|
3
|
-
"wizard.defaults.cancel": "
|
|
4
|
-
"wizard.defaults.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 };
|
package/translation.esm4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"wizard.defaults.back": "
|
|
3
|
-
"wizard.defaults.cancel": "
|
|
4
|
-
"wizard.defaults.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 };
|
package/translation.esm9.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var translation = {
|
|
2
|
-
"wizard.defaults.back": "
|
|
3
|
-
"wizard.defaults.cancel": "
|
|
4
|
-
"wizard.defaults.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 };
|