@synerise/ds-wizard 1.0.65 → 1.0.66
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/CHANGELOG.md +4 -0
- package/dist/Wizard.d.ts +3 -3
- package/dist/Wizard.js +71 -69
- package/dist/Wizard.styles.d.ts +17 -17
- package/dist/Wizard.styles.js +43 -42
- package/dist/Wizard.types.d.ts +3 -3
- package/dist/Wizard.types.js +1 -1
- package/dist/index.js +4 -1
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/onModal/onModal.d.ts +2 -2
- package/dist/onModal/onModal.js +53 -46
- package/dist/onModal/onModal.types.d.ts +2 -2
- package/dist/onModal/onModal.types.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.66](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@1.0.65...@synerise/ds-wizard@1.0.66) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-wizard
|
|
9
|
+
|
|
6
10
|
## [1.0.65](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@1.0.64...@synerise/ds-wizard@1.0.65) (2026-03-20)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @synerise/ds-wizard
|
package/dist/Wizard.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WizardProps } from './Wizard.types';
|
|
3
3
|
declare const Wizard: {
|
|
4
4
|
({ stepper, contentWidth, headerAction, footerAction, footer, footerLeft, title, onClose, children, onPrevStep, onNextStep, stepButtonProps, texts, visible, className, navigationInFooter, headerInlineEdit, headerAvatar, }: WizardProps): React.JSX.Element | null;
|
|
5
|
-
OnModal: ({ visible, stepper, headerAction, title, onClose, children, onPrevStep, onNextStep, texts, modalProps, stepButtonProps, }: import(
|
|
5
|
+
OnModal: ({ visible, stepper, headerAction, title, onClose, children, onPrevStep, onNextStep, texts, modalProps, stepButtonProps, }: import('.').OnModalProps) => React.JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default Wizard;
|
package/dist/Wizard.js
CHANGED
|
@@ -1,74 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
import classnames from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import Button from "@synerise/ds-button";
|
|
5
|
+
import Icon, { ArrowLeftCircleM } from "@synerise/ds-icon";
|
|
6
|
+
import Layout from "@synerise/ds-layout";
|
|
7
|
+
import PageHeader from "@synerise/ds-page-header";
|
|
8
|
+
import { ButtonPlaceholder, WizardWrapper, WizardContainer, WizardContent, WizardButtons, WizardFooter, FooterLeftSide, FooterRightSide, WizardHeader, WizardStepper, WizardHeaderAction } from "./Wizard.styles.js";
|
|
9
|
+
import WizardOnModal from "./onModal/onModal.js";
|
|
10
|
+
const Wizard = ({
|
|
11
|
+
stepper,
|
|
12
|
+
contentWidth,
|
|
13
|
+
headerAction,
|
|
14
|
+
footerAction,
|
|
15
|
+
footer,
|
|
16
|
+
footerLeft,
|
|
17
|
+
title,
|
|
18
|
+
onClose,
|
|
19
|
+
children,
|
|
20
|
+
onPrevStep,
|
|
21
|
+
onNextStep,
|
|
22
|
+
stepButtonProps,
|
|
23
|
+
texts,
|
|
24
|
+
visible,
|
|
25
|
+
className,
|
|
26
|
+
navigationInFooter,
|
|
27
|
+
headerInlineEdit,
|
|
28
|
+
headerAvatar
|
|
29
|
+
}) => {
|
|
30
|
+
const intl = useIntl();
|
|
31
|
+
const prevButtonType = navigationInFooter ? "secondary" : "ghost";
|
|
32
|
+
const prevButtonProps = stepButtonProps?.prevButtonProps ? stepButtonProps.prevButtonProps : {
|
|
33
33
|
type: prevButtonType,
|
|
34
|
-
mode:
|
|
34
|
+
mode: "icon-label"
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
type:
|
|
36
|
+
const nextButtonProps = stepButtonProps?.nextButtonProps ? stepButtonProps.nextButtonProps : {
|
|
37
|
+
type: "primary"
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
onClick: onPrevStep
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
39
|
+
const navButtons = (onPrevStep || onNextStep) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
|
+
onPrevStep ? /* @__PURE__ */ jsxs(Button, { ...prevButtonProps, onClick: onPrevStep, children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(ArrowLeftCircleM, {}) }),
|
|
42
|
+
" ",
|
|
43
|
+
texts?.prevButtonLabel || intl.formatMessage({
|
|
44
|
+
id: "DS.WIZARD.PREV-BUTTON",
|
|
45
|
+
defaultMessage: "Back"
|
|
46
|
+
})
|
|
47
|
+
] }) : /* @__PURE__ */ jsx(ButtonPlaceholder, {}),
|
|
48
|
+
onNextStep && /* @__PURE__ */ jsx(Button, { ...nextButtonProps, onClick: onNextStep, children: texts?.nextButtonLabel || intl.formatMessage({
|
|
49
|
+
id: "DS.WIZARD.NEXT-BUTTON",
|
|
50
|
+
defaultMessage: "Next step"
|
|
51
|
+
}) })
|
|
52
|
+
] });
|
|
53
|
+
const hasFooter = Boolean(footer || footerLeft || navigationInFooter && navButtons || footerAction);
|
|
54
|
+
const editableTitle = headerInlineEdit !== void 0;
|
|
55
|
+
return visible ? /* @__PURE__ */ jsx(WizardWrapper, { className: classnames(className, "ds-wizard"), children: /* @__PURE__ */ jsxs(Layout, { fullPage: true, header: /* @__PURE__ */ jsx(PageHeader, { inlineEdit: headerInlineEdit, avatar: editableTitle && headerAvatar, title: !editableTitle && title, onClose, rightSide: /* @__PURE__ */ jsxs(WizardHeader, { withHeaderAction: !!headerAction, children: [
|
|
56
|
+
stepper && /* @__PURE__ */ jsx(WizardStepper, { children: stepper }),
|
|
57
|
+
headerAction && /* @__PURE__ */ jsx(WizardHeaderAction, { children: headerAction })
|
|
58
|
+
] }) }), children: [
|
|
59
|
+
/* @__PURE__ */ jsx(WizardContainer, { withFooter: hasFooter, children: /* @__PURE__ */ jsxs(WizardContent, { contentWidth, children: [
|
|
60
|
+
children,
|
|
61
|
+
!navigationInFooter && navButtons && /* @__PURE__ */ jsx(WizardButtons, { children: navButtons })
|
|
62
|
+
] }) }),
|
|
63
|
+
hasFooter && /* @__PURE__ */ jsxs(WizardFooter, { children: [
|
|
64
|
+
(footerLeft || footer) && /* @__PURE__ */ jsx(FooterLeftSide, { children: footerLeft || footer }),
|
|
65
|
+
(footerAction || navigationInFooter && navButtons) && /* @__PURE__ */ jsxs(FooterRightSide, { children: [
|
|
66
|
+
footerAction,
|
|
67
|
+
" ",
|
|
68
|
+
navigationInFooter && navButtons
|
|
69
|
+
] })
|
|
70
|
+
] })
|
|
71
|
+
] }) }) : null;
|
|
72
72
|
};
|
|
73
73
|
Wizard.OnModal = WizardOnModal;
|
|
74
|
-
export
|
|
74
|
+
export {
|
|
75
|
+
Wizard as default
|
|
76
|
+
};
|
package/dist/Wizard.styles.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export declare const WizardWrapper: import(
|
|
2
|
-
export declare const WizardHeader: import(
|
|
1
|
+
export declare const WizardWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const WizardHeader: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
withHeaderAction?: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const WizardStepper: import(
|
|
6
|
-
export declare const WizardHeaderAction: import(
|
|
7
|
-
export declare const WizardContainer: import(
|
|
5
|
+
export declare const WizardStepper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const WizardHeaderAction: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const WizardContainer: import('styled-components').StyledComponent<"div", any, {
|
|
8
8
|
contentWidth?: string;
|
|
9
9
|
withFooter: boolean;
|
|
10
10
|
}, never>;
|
|
11
|
-
export declare const WizardButtons: import(
|
|
12
|
-
export declare const WizardContent: import(
|
|
11
|
+
export declare const WizardButtons: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const WizardContent: import('styled-components').StyledComponent<"div", any, {
|
|
13
13
|
contentWidth?: string;
|
|
14
14
|
}, never>;
|
|
15
|
-
export declare const ModalWizardContent: import(
|
|
16
|
-
export declare const ButtonPlaceholder: import(
|
|
17
|
-
export declare const ModalWizardButtons: import(
|
|
18
|
-
export declare const ModalWizardButtonsInfix: import(
|
|
19
|
-
export declare const ModalWizardButtonsSuffix: import(
|
|
20
|
-
export declare const ModalWizardButtonsPrefix: import(
|
|
21
|
-
export declare const FooterLeftSide: import(
|
|
22
|
-
export declare const FooterRightSide: import(
|
|
23
|
-
export declare const WizardFooter: import(
|
|
24
|
-
export declare const HeaderActions: import(
|
|
15
|
+
export declare const ModalWizardContent: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
16
|
+
export declare const ButtonPlaceholder: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
17
|
+
export declare const ModalWizardButtons: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
18
|
+
export declare const ModalWizardButtonsInfix: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
19
|
+
export declare const ModalWizardButtonsSuffix: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
20
|
+
export declare const ModalWizardButtonsPrefix: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
21
|
+
export declare const FooterLeftSide: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
22
|
+
export declare const FooterRightSide: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
23
|
+
export declare const WizardFooter: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
24
|
+
export declare const HeaderActions: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/Wizard.styles.js
CHANGED
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const WizardWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Wizardstyles__WizardWrapper",
|
|
4
4
|
componentId: "sc-1lvfph4-0"
|
|
5
|
-
})(["position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1500;background-color:", ";&& .ds-layout__header{overflow:visible;}"],
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export var WizardHeader = styled.div.withConfig({
|
|
5
|
+
})(["position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1500;background-color:", ";&& .ds-layout__header{overflow:visible;}"], (props) => props.theme.palette.white);
|
|
6
|
+
const WizardHeader = /* @__PURE__ */ styled.div.withConfig({
|
|
9
7
|
displayName: "Wizardstyles__WizardHeader",
|
|
10
8
|
componentId: "sc-1lvfph4-1"
|
|
11
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;position:relative;margin-right:16px;&:after{content:'';display:flex;height:40px;width:1px;background-color:", ";position:absolute;right:0;top:", ";}"],
|
|
12
|
-
|
|
13
|
-
}, function (props) {
|
|
14
|
-
return props.withHeaderAction ? '-4px' : '-8px';
|
|
15
|
-
});
|
|
16
|
-
export var WizardStepper = styled.div.withConfig({
|
|
9
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;position:relative;margin-right:16px;&:after{content:'';display:flex;height:40px;width:1px;background-color:", ";position:absolute;right:0;top:", ";}"], (props) => props.theme.palette["grey-200"], (props) => props.withHeaderAction ? "-4px" : "-8px");
|
|
10
|
+
const WizardStepper = /* @__PURE__ */ styled.div.withConfig({
|
|
17
11
|
displayName: "Wizardstyles__WizardStepper",
|
|
18
12
|
componentId: "sc-1lvfph4-2"
|
|
19
13
|
})(["margin-right:24px;"]);
|
|
20
|
-
|
|
14
|
+
const WizardHeaderAction = /* @__PURE__ */ styled.div.withConfig({
|
|
21
15
|
displayName: "Wizardstyles__WizardHeaderAction",
|
|
22
16
|
componentId: "sc-1lvfph4-3"
|
|
23
17
|
})(["margin-right:24px;"]);
|
|
24
|
-
|
|
18
|
+
const WizardContainer = /* @__PURE__ */ styled.div.withConfig({
|
|
25
19
|
displayName: "Wizardstyles__WizardContainer",
|
|
26
20
|
componentId: "sc-1lvfph4-4"
|
|
27
|
-
})(["background-color:", ";width:100%;height:100%;position:relative;display:flex;align-items:flex-start;justify-content:center;padding-top:122px;padding-bottom:", ";"],
|
|
28
|
-
|
|
29
|
-
}, function (props) {
|
|
30
|
-
return props.withFooter ? '100px' : '0';
|
|
31
|
-
});
|
|
32
|
-
export var WizardButtons = styled.div.withConfig({
|
|
21
|
+
})(["background-color:", ";width:100%;height:100%;position:relative;display:flex;align-items:flex-start;justify-content:center;padding-top:122px;padding-bottom:", ";"], (props) => props.theme.palette.white, (props) => props.withFooter ? "100px" : "0");
|
|
22
|
+
const WizardButtons = /* @__PURE__ */ styled.div.withConfig({
|
|
33
23
|
displayName: "Wizardstyles__WizardButtons",
|
|
34
24
|
componentId: "sc-1lvfph4-5"
|
|
35
25
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;margin:48px 0 0;"]);
|
|
36
|
-
|
|
26
|
+
const WizardContent = /* @__PURE__ */ styled.div.withConfig({
|
|
37
27
|
displayName: "Wizardstyles__WizardContent",
|
|
38
28
|
componentId: "sc-1lvfph4-6"
|
|
39
|
-
})(["width:", ";max-width:calc(100% - 48px);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;"],
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
export var ModalWizardContent = styled.div.withConfig({
|
|
29
|
+
})(["width:", ";max-width:calc(100% - 48px);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;"], (props) => props.contentWidth ? props.contentWidth : "100%");
|
|
30
|
+
const ModalWizardContent = /* @__PURE__ */ styled.div.withConfig({
|
|
43
31
|
displayName: "Wizardstyles__ModalWizardContent",
|
|
44
32
|
componentId: "sc-1lvfph4-7"
|
|
45
33
|
})(["width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;"]);
|
|
46
|
-
|
|
34
|
+
const ButtonPlaceholder = /* @__PURE__ */ styled.span.withConfig({
|
|
47
35
|
displayName: "Wizardstyles__ButtonPlaceholder",
|
|
48
36
|
componentId: "sc-1lvfph4-8"
|
|
49
37
|
})([""]);
|
|
50
|
-
|
|
38
|
+
const ModalWizardButtons = /* @__PURE__ */ styled.div.withConfig({
|
|
51
39
|
displayName: "Wizardstyles__ModalWizardButtons",
|
|
52
40
|
componentId: "sc-1lvfph4-9"
|
|
53
41
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;"]);
|
|
54
|
-
|
|
42
|
+
const ModalWizardButtonsInfix = /* @__PURE__ */ styled.div.withConfig({
|
|
55
43
|
displayName: "Wizardstyles__ModalWizardButtonsInfix",
|
|
56
44
|
componentId: "sc-1lvfph4-10"
|
|
57
45
|
})(["align-self:center;display:flex;"]);
|
|
58
|
-
|
|
46
|
+
const ModalWizardButtonsSuffix = /* @__PURE__ */ styled.div.withConfig({
|
|
59
47
|
displayName: "Wizardstyles__ModalWizardButtonsSuffix",
|
|
60
48
|
componentId: "sc-1lvfph4-11"
|
|
61
49
|
})(["align-self:flex-end;display:flex;"]);
|
|
62
|
-
|
|
50
|
+
const ModalWizardButtonsPrefix = /* @__PURE__ */ styled.div.withConfig({
|
|
63
51
|
displayName: "Wizardstyles__ModalWizardButtonsPrefix",
|
|
64
52
|
componentId: "sc-1lvfph4-12"
|
|
65
53
|
})(["align-self:flex-start;display:flex;"]);
|
|
66
|
-
|
|
54
|
+
const FooterLeftSide = /* @__PURE__ */ styled.div.withConfig({
|
|
67
55
|
displayName: "Wizardstyles__FooterLeftSide",
|
|
68
56
|
componentId: "sc-1lvfph4-13"
|
|
69
57
|
})(["display:flex;justify-content:flex-start;"]);
|
|
70
|
-
|
|
58
|
+
const FooterRightSide = /* @__PURE__ */ styled.div.withConfig({
|
|
71
59
|
displayName: "Wizardstyles__FooterRightSide",
|
|
72
60
|
componentId: "sc-1lvfph4-14"
|
|
73
61
|
})(["display:flex;justify-content:flex-end;align-items:center;gap:16px;", "{display:none;}"], ButtonPlaceholder);
|
|
74
|
-
|
|
62
|
+
const WizardFooter = /* @__PURE__ */ styled.div.withConfig({
|
|
75
63
|
displayName: "Wizardstyles__WizardFooter",
|
|
76
64
|
componentId: "sc-1lvfph4-15"
|
|
77
|
-
})(["display:flex;justify-content:space-between;width:100%;padding:24px;background-color:", ";border-top:1px solid ", ";position:fixed;bottom:0;left:0;& > *{margin-right:8px;}", ":empty,", ":empty{display:none;}"],
|
|
78
|
-
|
|
79
|
-
}, function (props) {
|
|
80
|
-
return props.theme.palette['grey-200'];
|
|
81
|
-
}, FooterLeftSide, FooterRightSide);
|
|
82
|
-
export var HeaderActions = styled.div.withConfig({
|
|
65
|
+
})(["display:flex;justify-content:space-between;width:100%;padding:24px;background-color:", ";border-top:1px solid ", ";position:fixed;bottom:0;left:0;& > *{margin-right:8px;}", ":empty,", ":empty{display:none;}"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-200"], FooterLeftSide, FooterRightSide);
|
|
66
|
+
const HeaderActions = /* @__PURE__ */ styled.div.withConfig({
|
|
83
67
|
displayName: "Wizardstyles__HeaderActions",
|
|
84
68
|
componentId: "sc-1lvfph4-16"
|
|
85
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-right:16px;padding-right:24px;position:relative;.ds-stepper{margin-right:24px;}&:after{content:'';display:flex;height:40px;width:1px;background-color:", ";position:absolute;right:0;top:-4px;}"],
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-right:16px;padding-right:24px;position:relative;.ds-stepper{margin-right:24px;}&:after{content:'';display:flex;height:40px;width:1px;background-color:", ";position:absolute;right:0;top:-4px;}"], (props) => props.theme.palette["grey-200"]);
|
|
70
|
+
export {
|
|
71
|
+
ButtonPlaceholder,
|
|
72
|
+
FooterLeftSide,
|
|
73
|
+
FooterRightSide,
|
|
74
|
+
HeaderActions,
|
|
75
|
+
ModalWizardButtons,
|
|
76
|
+
ModalWizardButtonsInfix,
|
|
77
|
+
ModalWizardButtonsPrefix,
|
|
78
|
+
ModalWizardButtonsSuffix,
|
|
79
|
+
ModalWizardContent,
|
|
80
|
+
WizardButtons,
|
|
81
|
+
WizardContainer,
|
|
82
|
+
WizardContent,
|
|
83
|
+
WizardFooter,
|
|
84
|
+
WizardHeader,
|
|
85
|
+
WizardHeaderAction,
|
|
86
|
+
WizardStepper,
|
|
87
|
+
WizardWrapper
|
|
88
|
+
};
|
package/dist/Wizard.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '@synerise/ds-button';
|
|
3
|
+
import { PageHeaderProps } from '@synerise/ds-page-header';
|
|
4
4
|
export type WizardProps = {
|
|
5
5
|
stepper?: ReactNode;
|
|
6
6
|
footer?: ReactNode;
|
package/dist/Wizard.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OnModalProps } from './onModal.types';
|
|
3
3
|
declare const WizardOnModal: ({ visible, stepper, headerAction, title, onClose, children, onPrevStep, onNextStep, texts, modalProps, stepButtonProps, }: OnModalProps) => React.JSX.Element;
|
|
4
4
|
export default WizardOnModal;
|
package/dist/onModal/onModal.js
CHANGED
|
@@ -1,49 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
type:
|
|
23
|
-
mode:
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useIntl } from "react-intl";
|
|
3
|
+
import Button from "@synerise/ds-button";
|
|
4
|
+
import Icon, { ArrowLeftCircleM } from "@synerise/ds-icon";
|
|
5
|
+
import Modal from "@synerise/ds-modal";
|
|
6
|
+
import { ModalWizardContent, ModalWizardButtons, ModalWizardButtonsPrefix, ButtonPlaceholder, ModalWizardButtonsInfix, ModalWizardButtonsSuffix, HeaderActions } from "../Wizard.styles.js";
|
|
7
|
+
const WizardOnModal = ({
|
|
8
|
+
visible,
|
|
9
|
+
stepper,
|
|
10
|
+
headerAction,
|
|
11
|
+
title,
|
|
12
|
+
onClose,
|
|
13
|
+
children,
|
|
14
|
+
onPrevStep,
|
|
15
|
+
onNextStep,
|
|
16
|
+
texts,
|
|
17
|
+
modalProps,
|
|
18
|
+
stepButtonProps
|
|
19
|
+
}) => {
|
|
20
|
+
const intl = useIntl();
|
|
21
|
+
const prevButtonProps = stepButtonProps?.prevButtonProps ? stepButtonProps.prevButtonProps : {
|
|
22
|
+
type: "ghost",
|
|
23
|
+
mode: "icon-label"
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
type:
|
|
25
|
+
const nextButtonProps = stepButtonProps?.nextButtonProps ? stepButtonProps.nextButtonProps : {
|
|
26
|
+
type: "primary"
|
|
27
27
|
};
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
onClick: onPrevStep
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
return /* @__PURE__ */ jsx(Modal, { visible, onCancel: onClose, title, ...modalProps, headerActions: /* @__PURE__ */ jsxs(HeaderActions, { children: [
|
|
29
|
+
stepper,
|
|
30
|
+
" ",
|
|
31
|
+
headerAction
|
|
32
|
+
] }), footer: /* @__PURE__ */ jsxs(ModalWizardButtons, { children: [
|
|
33
|
+
modalProps?.prefix || onPrevStep ? /* @__PURE__ */ jsxs(ModalWizardButtonsPrefix, { children: [
|
|
34
|
+
modalProps.prefix,
|
|
35
|
+
onPrevStep && /* @__PURE__ */ jsxs(Button, { ...prevButtonProps, onClick: onPrevStep, children: [
|
|
36
|
+
/* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(ArrowLeftCircleM, {}) }),
|
|
37
|
+
" ",
|
|
38
|
+
texts?.prevButtonLabel || intl.formatMessage({
|
|
39
|
+
id: "DS.WIZARD.PREV-BUTTON",
|
|
40
|
+
defaultMessage: "Back"
|
|
41
|
+
})
|
|
42
|
+
] })
|
|
43
|
+
] }) : /* @__PURE__ */ jsx(ButtonPlaceholder, {}),
|
|
44
|
+
modalProps?.infix && /* @__PURE__ */ jsx(ModalWizardButtonsInfix, { children: modalProps.infix }),
|
|
45
|
+
(modalProps?.suffix || onNextStep) && /* @__PURE__ */ jsxs(ModalWizardButtonsSuffix, { children: [
|
|
46
|
+
onNextStep && /* @__PURE__ */ jsx(Button, { ...nextButtonProps, onClick: onNextStep, children: texts?.nextButtonLabel || intl.formatMessage({
|
|
47
|
+
id: "DS.WIZARD.NEXT-BUTTON",
|
|
48
|
+
defaultMessage: "Next step"
|
|
49
|
+
}) }),
|
|
50
|
+
modalProps.suffix
|
|
51
|
+
] })
|
|
52
|
+
] }), children: /* @__PURE__ */ jsx(ModalWizardContent, { children }) });
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
WizardOnModal as default
|
|
48
56
|
};
|
|
49
|
-
export default WizardOnModal;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ModalProps } from '@synerise/ds-modal/dist/Modal.types';
|
|
2
|
+
import { WizardProps } from '../Wizard.types';
|
|
3
3
|
export type OnModalProps = Omit<WizardProps, 'footer' | 'contentWidth'> & {
|
|
4
4
|
modalProps: ModalProps;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-wizard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
4
4
|
"description": "Wizard UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-button": "^1.5.
|
|
39
|
-
"@synerise/ds-icon": "^1.15.
|
|
40
|
-
"@synerise/ds-layout": "^1.2.
|
|
41
|
-
"@synerise/ds-modal": "^1.4.
|
|
42
|
-
"@synerise/ds-page-header": "^1.0.
|
|
38
|
+
"@synerise/ds-button": "^1.5.18",
|
|
39
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
40
|
+
"@synerise/ds-layout": "^1.2.1",
|
|
41
|
+
"@synerise/ds-modal": "^1.4.1",
|
|
42
|
+
"@synerise/ds-page-header": "^1.0.64",
|
|
43
43
|
"classnames": "^2.5.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
55
55
|
}
|