@synerise/ds-wizard 1.0.65 → 1.0.67

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 CHANGED
@@ -3,6 +3,14 @@
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.67](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@1.0.66...@synerise/ds-wizard@1.0.67) (2026-04-01)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-wizard
9
+
10
+ ## [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)
11
+
12
+ **Note:** Version bump only for package @synerise/ds-wizard
13
+
6
14
  ## [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
15
 
8
16
  **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 { type WizardProps } from './Wizard.types';
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(".").OnModalProps) => React.JSX.Element;
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
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import classnames from 'classnames';
3
- import React from 'react';
4
- import { useIntl } from 'react-intl';
5
- import Button from '@synerise/ds-button';
6
- import Icon, { ArrowLeftCircleM } from '@synerise/ds-icon';
7
- import Layout from '@synerise/ds-layout';
8
- import PageHeader from '@synerise/ds-page-header';
9
- import * as S from './Wizard.styles';
10
- import WizardOnModal from './onModal/onModal';
11
- var Wizard = function Wizard(_ref) {
12
- var stepper = _ref.stepper,
13
- contentWidth = _ref.contentWidth,
14
- headerAction = _ref.headerAction,
15
- footerAction = _ref.footerAction,
16
- footer = _ref.footer,
17
- footerLeft = _ref.footerLeft,
18
- title = _ref.title,
19
- onClose = _ref.onClose,
20
- children = _ref.children,
21
- onPrevStep = _ref.onPrevStep,
22
- onNextStep = _ref.onNextStep,
23
- stepButtonProps = _ref.stepButtonProps,
24
- texts = _ref.texts,
25
- visible = _ref.visible,
26
- className = _ref.className,
27
- navigationInFooter = _ref.navigationInFooter,
28
- headerInlineEdit = _ref.headerInlineEdit,
29
- headerAvatar = _ref.headerAvatar;
30
- var intl = useIntl();
31
- var prevButtonType = navigationInFooter ? 'secondary' : 'ghost';
32
- var prevButtonProps = stepButtonProps != null && stepButtonProps.prevButtonProps ? stepButtonProps.prevButtonProps : {
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: 'icon-label'
34
+ mode: "icon-label"
35
35
  };
36
- var nextButtonProps = stepButtonProps != null && stepButtonProps.nextButtonProps ? stepButtonProps.nextButtonProps : {
37
- type: 'primary'
36
+ const nextButtonProps = stepButtonProps?.nextButtonProps ? stepButtonProps.nextButtonProps : {
37
+ type: "primary"
38
38
  };
39
- var navButtons = (onPrevStep || onNextStep) && /*#__PURE__*/React.createElement(React.Fragment, null, onPrevStep ? /*#__PURE__*/React.createElement(Button, _extends({}, prevButtonProps, {
40
- onClick: onPrevStep
41
- }), /*#__PURE__*/React.createElement(Icon, {
42
- component: /*#__PURE__*/React.createElement(ArrowLeftCircleM, null)
43
- }), ' ', (texts == null ? void 0 : texts.prevButtonLabel) || intl.formatMessage({
44
- id: 'DS.WIZARD.PREV-BUTTON',
45
- defaultMessage: 'Back'
46
- })) : /*#__PURE__*/React.createElement(S.ButtonPlaceholder, null), onNextStep && /*#__PURE__*/React.createElement(Button, _extends({}, nextButtonProps, {
47
- onClick: onNextStep
48
- }), (texts == null ? void 0 : texts.nextButtonLabel) || intl.formatMessage({
49
- id: 'DS.WIZARD.NEXT-BUTTON',
50
- defaultMessage: 'Next step'
51
- })));
52
- var hasFooter = Boolean(footer || footerLeft || navigationInFooter && navButtons || footerAction);
53
- var editableTitle = headerInlineEdit !== undefined;
54
- return visible ? /*#__PURE__*/React.createElement(S.WizardWrapper, {
55
- className: classnames(className, 'ds-wizard')
56
- }, /*#__PURE__*/React.createElement(Layout, {
57
- fullPage: true,
58
- header: /*#__PURE__*/React.createElement(PageHeader, {
59
- inlineEdit: headerInlineEdit,
60
- avatar: editableTitle && headerAvatar,
61
- title: !editableTitle && title,
62
- onClose: onClose,
63
- rightSide: /*#__PURE__*/React.createElement(S.WizardHeader, {
64
- withHeaderAction: !!headerAction
65
- }, stepper && /*#__PURE__*/React.createElement(S.WizardStepper, null, stepper), headerAction && /*#__PURE__*/React.createElement(S.WizardHeaderAction, null, headerAction))
66
- })
67
- }, /*#__PURE__*/React.createElement(S.WizardContainer, {
68
- withFooter: hasFooter
69
- }, /*#__PURE__*/React.createElement(S.WizardContent, {
70
- contentWidth: contentWidth
71
- }, children, !navigationInFooter && navButtons && /*#__PURE__*/React.createElement(S.WizardButtons, null, navButtons))), hasFooter && /*#__PURE__*/React.createElement(S.WizardFooter, null, (footerLeft || footer) && /*#__PURE__*/React.createElement(S.FooterLeftSide, null, footerLeft || footer), (footerAction || navigationInFooter && navButtons) && /*#__PURE__*/React.createElement(S.FooterRightSide, null, footerAction, " ", navigationInFooter && navButtons)))) : null;
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 default Wizard;
74
+ export {
75
+ Wizard as default
76
+ };
@@ -1,24 +1,24 @@
1
- export declare const WizardWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const WizardHeader: import("styled-components").StyledComponent<"div", any, {
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("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, {
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("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const WizardContent: import("styled-components").StyledComponent<"div", any, {
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("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>;
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>;
@@ -1,87 +1,88 @@
1
- import styled from 'styled-components';
2
- export var WizardWrapper = styled.div.withConfig({
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;}"], function (props) {
6
- return props.theme.palette.white;
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:", ";}"], function (props) {
12
- return props.theme.palette['grey-200'];
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
- export var WizardHeaderAction = styled.div.withConfig({
14
+ const WizardHeaderAction = /* @__PURE__ */ styled.div.withConfig({
21
15
  displayName: "Wizardstyles__WizardHeaderAction",
22
16
  componentId: "sc-1lvfph4-3"
23
17
  })(["margin-right:24px;"]);
24
- export var WizardContainer = styled.div.withConfig({
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:", ";"], function (props) {
28
- return props.theme.palette.white;
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
- export var WizardContent = styled.div.withConfig({
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;"], function (props) {
40
- return props.contentWidth ? props.contentWidth : '100%';
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
- export var ButtonPlaceholder = styled.span.withConfig({
34
+ const ButtonPlaceholder = /* @__PURE__ */ styled.span.withConfig({
47
35
  displayName: "Wizardstyles__ButtonPlaceholder",
48
36
  componentId: "sc-1lvfph4-8"
49
37
  })([""]);
50
- export var ModalWizardButtons = styled.div.withConfig({
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
- export var ModalWizardButtonsInfix = styled.div.withConfig({
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
- export var ModalWizardButtonsSuffix = styled.div.withConfig({
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
- export var ModalWizardButtonsPrefix = styled.div.withConfig({
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
- export var FooterLeftSide = styled.div.withConfig({
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
- export var FooterRightSide = styled.div.withConfig({
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
- export var WizardFooter = styled.div.withConfig({
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;}"], function (props) {
78
- return props.theme.palette.white;
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;}"], function (props) {
86
- return props.theme.palette['grey-200'];
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
+ };
@@ -1,6 +1,6 @@
1
- import { type ReactNode } from 'react';
2
- import { type ButtonProps } from '@synerise/ds-button';
3
- import type { PageHeaderProps } from '@synerise/ds-page-header';
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;
@@ -1 +1 @@
1
- export {};
1
+
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './Wizard';
1
+ import { default as default2 } from "./Wizard.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type OnModalProps } from './onModal.types';
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;
@@ -1,49 +1,56 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { useIntl } from 'react-intl';
4
- import Button from '@synerise/ds-button';
5
- import Icon, { ArrowLeftCircleM } from '@synerise/ds-icon';
6
- import Modal from '@synerise/ds-modal';
7
- import * as S from '../Wizard.styles';
8
- var WizardOnModal = function WizardOnModal(_ref) {
9
- var visible = _ref.visible,
10
- stepper = _ref.stepper,
11
- headerAction = _ref.headerAction,
12
- title = _ref.title,
13
- onClose = _ref.onClose,
14
- children = _ref.children,
15
- onPrevStep = _ref.onPrevStep,
16
- onNextStep = _ref.onNextStep,
17
- texts = _ref.texts,
18
- modalProps = _ref.modalProps,
19
- stepButtonProps = _ref.stepButtonProps;
20
- var intl = useIntl();
21
- var prevButtonProps = stepButtonProps != null && stepButtonProps.prevButtonProps ? stepButtonProps.prevButtonProps : {
22
- type: 'ghost',
23
- mode: 'icon-label'
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
- var nextButtonProps = stepButtonProps != null && stepButtonProps.nextButtonProps ? stepButtonProps.nextButtonProps : {
26
- type: 'primary'
25
+ const nextButtonProps = stepButtonProps?.nextButtonProps ? stepButtonProps.nextButtonProps : {
26
+ type: "primary"
27
27
  };
28
- return /*#__PURE__*/React.createElement(Modal, _extends({
29
- visible: visible,
30
- onCancel: onClose,
31
- title: title
32
- }, modalProps, {
33
- headerActions: /*#__PURE__*/React.createElement(S.HeaderActions, null, stepper, " ", headerAction),
34
- footer: /*#__PURE__*/React.createElement(S.ModalWizardButtons, null, modalProps != null && modalProps.prefix || onPrevStep ? /*#__PURE__*/React.createElement(S.ModalWizardButtonsPrefix, null, modalProps.prefix, onPrevStep && /*#__PURE__*/React.createElement(Button, _extends({}, prevButtonProps, {
35
- onClick: onPrevStep
36
- }), /*#__PURE__*/React.createElement(Icon, {
37
- component: /*#__PURE__*/React.createElement(ArrowLeftCircleM, null)
38
- }), ' ', (texts == null ? void 0 : texts.prevButtonLabel) || intl.formatMessage({
39
- id: 'DS.WIZARD.PREV-BUTTON',
40
- defaultMessage: 'Back'
41
- }))) : /*#__PURE__*/React.createElement(S.ButtonPlaceholder, null), (modalProps == null ? void 0 : modalProps.infix) && /*#__PURE__*/React.createElement(S.ModalWizardButtonsInfix, null, modalProps.infix), ((modalProps == null ? void 0 : modalProps.suffix) || onNextStep) && /*#__PURE__*/React.createElement(S.ModalWizardButtonsSuffix, null, onNextStep && /*#__PURE__*/React.createElement(Button, _extends({}, nextButtonProps, {
42
- onClick: onNextStep
43
- }), (texts == null ? void 0 : texts.nextButtonLabel) || intl.formatMessage({
44
- id: 'DS.WIZARD.NEXT-BUTTON',
45
- defaultMessage: 'Next step'
46
- })), modalProps.suffix))
47
- }), /*#__PURE__*/React.createElement(S.ModalWizardContent, null, children));
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 { type ModalProps } from '@synerise/ds-modal/dist/Modal.types';
2
- import { type WizardProps } from '../Wizard.types';
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
- export {};
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-wizard",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
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": "pnpm run build:js && pnpm run build:css && pnpm run defs",
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": "pnpm run build:js -- --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.17",
39
- "@synerise/ds-icon": "^1.15.0",
40
- "@synerise/ds-layout": "^1.2.0",
41
- "@synerise/ds-modal": "^1.4.0",
42
- "@synerise/ds-page-header": "^1.0.63",
38
+ "@synerise/ds-button": "^1.5.19",
39
+ "@synerise/ds-icon": "^1.15.2",
40
+ "@synerise/ds-layout": "^1.2.2",
41
+ "@synerise/ds-modal": "^1.4.2",
42
+ "@synerise/ds-page-header": "^1.0.65",
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": "8efc031fa688c0b87c7b3915bae93546bb63bcac"
54
+ "gitHead": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399"
55
55
  }