@hitachivantara/uikit-react-lab 5.1.0 → 5.2.1

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.
Files changed (78) hide show
  1. package/dist/cjs/packages/lab/src/components/StepNavigation/StepNavigation.cjs +4 -4
  2. package/dist/cjs/packages/lab/src/components/StepNavigation/StepNavigation.cjs.map +1 -1
  3. package/dist/cjs/packages/lab/src/components/Wizard/Wizard.cjs +65 -0
  4. package/dist/cjs/packages/lab/src/components/Wizard/Wizard.cjs.map +1 -0
  5. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.cjs +113 -0
  6. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.cjs.map +1 -0
  7. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.cjs +28 -0
  8. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.cjs.map +1 -0
  9. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.cjs +8 -0
  10. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.cjs.map +1 -0
  11. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.cjs +34 -0
  12. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.cjs.map +1 -0
  13. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.cjs +15 -0
  14. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.cjs.map +1 -0
  15. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.cjs +8 -0
  16. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.cjs.map +1 -0
  17. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.cjs +38 -0
  18. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.cjs.map +1 -0
  19. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.cjs +21 -0
  20. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.cjs.map +1 -0
  21. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.cjs +141 -0
  22. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.cjs.map +1 -0
  23. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.cjs +37 -0
  24. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.cjs.map +1 -0
  25. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.cjs +8 -0
  26. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.cjs.map +1 -0
  27. package/dist/cjs/packages/lab/src/components/Wizard/WizardContext/WizardContext.cjs +42 -0
  28. package/dist/cjs/packages/lab/src/components/Wizard/WizardContext/WizardContext.cjs.map +1 -0
  29. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.cjs +106 -0
  30. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.cjs.map +1 -0
  31. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.cjs +33 -0
  32. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.cjs.map +1 -0
  33. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.cjs +8 -0
  34. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.cjs.map +1 -0
  35. package/dist/cjs/packages/lab/src/components/Wizard/wizardClasses.cjs +8 -0
  36. package/dist/cjs/packages/lab/src/components/Wizard/wizardClasses.cjs.map +1 -0
  37. package/dist/cjs/packages/lab/src/index.cjs +14 -0
  38. package/dist/cjs/packages/lab/src/index.cjs.map +1 -1
  39. package/dist/esm/packages/lab/src/components/StepNavigation/StepNavigation.js +4 -4
  40. package/dist/esm/packages/lab/src/components/StepNavigation/StepNavigation.js.map +1 -1
  41. package/dist/esm/packages/lab/src/components/Wizard/Wizard.js +65 -0
  42. package/dist/esm/packages/lab/src/components/Wizard/Wizard.js.map +1 -0
  43. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.js +113 -0
  44. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.js.map +1 -0
  45. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.js +28 -0
  46. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.js.map +1 -0
  47. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.js +8 -0
  48. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.js.map +1 -0
  49. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.js +34 -0
  50. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.js.map +1 -0
  51. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.js +15 -0
  52. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.js.map +1 -0
  53. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.js +8 -0
  54. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.js.map +1 -0
  55. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.js +38 -0
  56. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.js.map +1 -0
  57. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.js +21 -0
  58. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.js.map +1 -0
  59. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.js +139 -0
  60. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.js.map +1 -0
  61. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.js +37 -0
  62. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.js.map +1 -0
  63. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.js +8 -0
  64. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.js.map +1 -0
  65. package/dist/esm/packages/lab/src/components/Wizard/WizardContext/WizardContext.js +42 -0
  66. package/dist/esm/packages/lab/src/components/Wizard/WizardContext/WizardContext.js.map +1 -0
  67. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.js +106 -0
  68. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.js.map +1 -0
  69. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.js +33 -0
  70. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.js.map +1 -0
  71. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.js +8 -0
  72. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.js.map +1 -0
  73. package/dist/esm/packages/lab/src/components/Wizard/wizardClasses.js +8 -0
  74. package/dist/esm/packages/lab/src/components/Wizard/wizardClasses.js.map +1 -0
  75. package/dist/esm/packages/lab/src/index.js +15 -1
  76. package/dist/esm/packages/lab/src/index.js.map +1 -1
  77. package/dist/types/index.d.ts +172 -1
  78. package/package.json +4 -3
@@ -0,0 +1,65 @@
1
+ import { useCallback } from "react";
2
+ import { HvWizardContainer } from "./WizardContainer/WizardContainer.js";
3
+ import { HvWizardTitle } from "./WizardTitle/WizardTitle.js";
4
+ import { HvWizardContent } from "./WizardContent/WizardContent.js";
5
+ import WizardProvider from "./WizardContext/WizardContext.js";
6
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
7
+ import { HvWizardActions } from "./WizardActions/WizardActions.js";
8
+ const HvWizard = ({
9
+ className,
10
+ children,
11
+ onClose,
12
+ handleSubmit,
13
+ title,
14
+ open,
15
+ skippable = true,
16
+ loading = false,
17
+ hasSummary = false,
18
+ summaryContent,
19
+ labels = {
20
+ cancel: "Cancel",
21
+ next: "Next",
22
+ previous: "Previous",
23
+ skip: "Skip",
24
+ submit: "Submit",
25
+ summary: "Summary"
26
+ },
27
+ fixedHeight = false,
28
+ customStep,
29
+ ...others
30
+ }) => {
31
+ const handleClose = useCallback((evt, reason) => {
32
+ if (reason !== "backdropClick") {
33
+ onClose == null ? void 0 : onClose(evt, reason);
34
+ }
35
+ }, [onClose]);
36
+ return /* @__PURE__ */ jsx(WizardProvider, {
37
+ children: /* @__PURE__ */ jsxs(HvWizardContainer, {
38
+ className,
39
+ handleClose,
40
+ open,
41
+ ...others,
42
+ children: [/* @__PURE__ */ jsx(HvWizardTitle, {
43
+ title,
44
+ hasSummary,
45
+ labels,
46
+ customStep
47
+ }), /* @__PURE__ */ jsx(HvWizardContent, {
48
+ loading,
49
+ fixedHeight,
50
+ summaryContent,
51
+ children
52
+ }), /* @__PURE__ */ jsx(HvWizardActions, {
53
+ loading,
54
+ skippable,
55
+ labels,
56
+ handleClose,
57
+ handleSubmit
58
+ })]
59
+ })
60
+ });
61
+ };
62
+ export {
63
+ HvWizard
64
+ };
65
+ //# sourceMappingURL=Wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wizard.js","sources":["../../../../../../../src/components/Wizard/Wizard.tsx"],"sourcesContent":["import { HvBaseProps } from \"@hitachivantara/uikit-react-core\";\nimport { HvStepNavigationProps } from \"..\";\nimport { HvWizardClasses } from \"./wizardClasses\";\nimport { ModalProps } from \"@mui/material\";\nimport React, { useCallback } from \"react\";\nimport { HvWizardContainer } from \"./WizardContainer/WizardContainer\";\nimport { HvWizardTitle, HvWizardTitleProps } from \"./WizardTitle/WizardTitle\";\nimport { HvWizardContent } from \"./WizardContent/WizardContent\";\nimport { HvWizardActions } from \"./index\";\nimport WizardProvider, {\n HvWizardTabs,\n HvWizardTab,\n} from \"./WizardContext/WizardContext\";\nimport { HvWizardActionsProps } from \"./WizardActions/WizardActions\";\n\nexport interface HvWizardProps extends HvBaseProps {\n /** Current state of the Wizard. */\n open: boolean;\n /** Function executed on close. */\n onClose: ModalProps[\"onClose\"];\n /** Function executed on submit. */\n handleSubmit: (context: HvWizardTabs<HvWizardTab>) => void;\n /** Title for the wizard. */\n title?: string;\n /** An object containing all the labels for the wizard. */\n labels?: HvWizardActionsProps[\"labels\"] & HvWizardTitleProps[\"labels\"];\n /** Shows the summary button. */\n hasSummary?: boolean;\n /** The content of the summary. */\n summaryContent?: React.ReactNode;\n /** Enables the skip button. */\n skippable?: boolean;\n /** Forces minimum height to the component. */\n fixedHeight?: boolean;\n /** Whether the loading animation is shown. */\n loading?: boolean;\n /** Custom object to define type, size and width of the StepNavigation component */\n customStep?: Pick<HvStepNavigationProps, \"type\" | \"stepSize\" | \"width\">;\n /** A Jss Object used to override or extend the styles applied to the empty state Wizard. */\n classes?: HvWizardClasses;\n}\n\nexport const HvWizard = ({\n className,\n children,\n onClose,\n handleSubmit,\n title,\n open,\n skippable = true,\n loading = false,\n hasSummary = false,\n summaryContent,\n labels = {\n cancel: \"Cancel\",\n next: \"Next\",\n previous: \"Previous\",\n skip: \"Skip\",\n submit: \"Submit\",\n summary: \"Summary\",\n },\n fixedHeight = false,\n customStep,\n ...others\n}: HvWizardProps) => {\n const handleClose = useCallback(\n (evt, reason) => {\n if (reason !== \"backdropClick\") {\n onClose?.(evt, reason);\n }\n },\n [onClose]\n );\n\n return (\n <WizardProvider>\n <HvWizardContainer\n className={className}\n handleClose={handleClose}\n open={open}\n {...others}\n >\n <HvWizardTitle\n title={title}\n hasSummary={hasSummary}\n labels={labels}\n customStep={customStep}\n />\n <HvWizardContent\n loading={loading}\n fixedHeight={fixedHeight}\n summaryContent={summaryContent}\n >\n {children}\n </HvWizardContent>\n <HvWizardActions\n loading={loading}\n skippable={skippable}\n labels={labels}\n handleClose={handleClose}\n handleSubmit={handleSubmit}\n />\n </HvWizardContainer>\n </WizardProvider>\n );\n};\n"],"names":["HvWizard","className","children","onClose","handleSubmit","title","open","skippable","loading","hasSummary","summaryContent","labels","cancel","next","previous","skip","submit","summary","fixedHeight","customStep","others","handleClose","useCallback","evt","reason","WizardProvider","HvWizardContainer","_jsx","HvWizardTitle","HvWizardContent","HvWizardActions"],"mappings":";;;;;;;AA0CO,MAAMA,WAAWA,CAAC;AAAA,EACvBC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,YAAY;AAAA,EACZC,UAAU;AAAA,EACVC,aAAa;AAAA,EACbC;AAAAA,EACAC,SAAS;AAAA,IACPC,QAAQ;AAAA,IACRC,MAAM;AAAA,IACNC,UAAU;AAAA,IACVC,MAAM;AAAA,IACNC,QAAQ;AAAA,IACRC,SAAS;AAAA,EACX;AAAA,EACAC,cAAc;AAAA,EACdC;AAAAA,EACA,GAAGC;AACU,MAAM;AACnB,QAAMC,cAAcC,YAClB,CAACC,KAAKC,WAAW;AACf,QAAIA,WAAW,iBAAiB;AAC9BrB,yCAAUoB,KAAKC;AAAAA,IACjB;AAAA,EAAA,GAEF,CAACrB,OAAO,CAAC;AAGX,6BACGsB,gBAAc;AAAA,IAAAvB,+BACZwB,mBAAiB;AAAA,MAChBzB;AAAAA,MACAoB;AAAAA,MACAf;AAAAA,MAAW,GACPc;AAAAA,MAAMlB,UAAA,CAEVyB,oBAACC,eAAa;AAAA,QACZvB;AAAAA,QACAI;AAAAA,QACAE;AAAAA,QACAQ;AAAAA,MAAAA,CACA,GACFQ,oBAACE,iBAAe;AAAA,QACdrB;AAAAA,QACAU;AAAAA,QACAR;AAAAA,QAA+BR;AAAAA,MAAAA,CAGf,GAClByB,oBAACG,iBAAe;AAAA,QACdtB;AAAAA,QACAD;AAAAA,QACAI;AAAAA,QACAU;AAAAA,QACAjB;AAAAA,MAAAA,CACA,CAAA;AAAA,IAAA,CAAA;AAAA,EAAA,CAEW;AAErB;"}
@@ -0,0 +1,113 @@
1
+ import { useContext, useState, useEffect, useCallback } from "react";
2
+ import { ClassNames } from "@emotion/react";
3
+ import { clsx } from "../../../../../../node_modules/clsx/dist/clsx.m.js";
4
+ import { HvDialogActions, HvGrid, HvButton } from "@hitachivantara/uikit-react-core";
5
+ import { Backwards, Forwards } from "@hitachivantara/uikit-react-icons";
6
+ import wizardActionsClasses from "./wizardActionsClasses.js";
7
+ import { styles } from "./WizardActions.styles.js";
8
+ import { HvWizardContext } from "../WizardContext/WizardContext.js";
9
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
10
+ const HvWizardActions = ({
11
+ classes,
12
+ handleClose,
13
+ handleSubmit,
14
+ loading = false,
15
+ skippable = false,
16
+ labels = {
17
+ cancel: "Cancel",
18
+ next: "Next",
19
+ previous: "Previous",
20
+ skip: "Skip",
21
+ submit: "Submit"
22
+ }
23
+ }) => {
24
+ const {
25
+ context,
26
+ updateContext,
27
+ tab,
28
+ setTab
29
+ } = useContext(HvWizardContext);
30
+ const [pages, setPages] = useState(0);
31
+ const [canSubmit, setCanSubmit] = useState(false);
32
+ useEffect(() => {
33
+ const contextEntries = Object.entries(context);
34
+ if (contextEntries.length) {
35
+ setPages(contextEntries.length);
36
+ const validWizard = Object.entries(context).every(([, value]) => value == null ? void 0 : value.valid);
37
+ if (validWizard !== canSubmit) {
38
+ setCanSubmit(validWizard);
39
+ }
40
+ }
41
+ }, [context]);
42
+ const lastPage = pages - 1;
43
+ const isLastPage = tab >= lastPage;
44
+ const handleSkip = useCallback(() => {
45
+ const skippedContext = Object.entries(context).map(([, child]) => ({
46
+ ...child,
47
+ valid: (child == null ? void 0 : child.valid) !== false
48
+ }));
49
+ updateContext(skippedContext);
50
+ setTab(lastPage);
51
+ }, [setTab, context, lastPage, updateContext]);
52
+ const handleSubmitInternal = useCallback(() => handleSubmit(context), [handleSubmit, context]);
53
+ const onCloseHander = useCallback((event) => {
54
+ const clearContext = Object.entries(context).map(([, child]) => ({
55
+ ...child,
56
+ touched: false
57
+ }));
58
+ updateContext(clearContext);
59
+ setTab(0);
60
+ handleClose == null ? void 0 : handleClose(event);
61
+ }, []);
62
+ return /* @__PURE__ */ jsx(ClassNames, {
63
+ children: ({
64
+ css
65
+ }) => {
66
+ var _a;
67
+ return /* @__PURE__ */ jsxs(HvDialogActions, {
68
+ className: clsx(classes == null ? void 0 : classes.actionsContainer, wizardActionsClasses.actionsContainer, css(styles.actionsContainer)),
69
+ children: [/* @__PURE__ */ jsxs(HvGrid, {
70
+ children: [/* @__PURE__ */ jsx(HvButton, {
71
+ variant: "secondaryGhost",
72
+ onClick: onCloseHander,
73
+ className: clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.buttonWidth, css(styles.buttonWidth)),
74
+ children: `${labels.cancel ?? "Cancel"}`
75
+ }), skippable && /* @__PURE__ */ jsx(HvButton, {
76
+ variant: "secondaryGhost",
77
+ disabled: isLastPage,
78
+ className: clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.buttonWidth, css(styles.buttonWidth)),
79
+ onClick: handleSkip,
80
+ children: `${labels.skip ?? "Skip"}`
81
+ })]
82
+ }), /* @__PURE__ */ jsxs(HvGrid, {
83
+ className: clsx(classes == null ? void 0 : classes.buttonsContainer, wizardActionsClasses.buttonsContainer, css(styles.buttonsContainer)),
84
+ children: [/* @__PURE__ */ jsx(HvButton, {
85
+ variant: "secondaryGhost",
86
+ className: clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.buttonWidth, css(styles.buttonWidth)),
87
+ disabled: tab <= 0,
88
+ onClick: () => setTab((t) => t - 1),
89
+ startIcon: /* @__PURE__ */ jsx(Backwards, {}),
90
+ children: `${labels.previous ?? "Previous"}`
91
+ }), isLastPage ? /* @__PURE__ */ jsx(HvButton, {
92
+ variant: "primary",
93
+ className: clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.buttonWidth, css(styles.buttonWidth)),
94
+ disabled: loading || !canSubmit,
95
+ onClick: handleSubmitInternal,
96
+ children: `${labels.submit ?? "Submit"}`
97
+ }) : /* @__PURE__ */ jsx(HvButton, {
98
+ variant: "secondaryGhost",
99
+ className: clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.buttonWidth, css(styles.buttonWidth), classes == null ? void 0 : classes.buttonSpacing, wizardActionsClasses.buttonSpacing, css(styles.buttonSpacing)),
100
+ onClick: () => setTab((t) => t + 1),
101
+ disabled: !skippable && !((_a = context == null ? void 0 : context[tab]) == null ? void 0 : _a.valid),
102
+ endIcon: /* @__PURE__ */ jsx(Forwards, {}),
103
+ children: `${labels.next ?? "Next"}`
104
+ })]
105
+ })]
106
+ });
107
+ }
108
+ });
109
+ };
110
+ export {
111
+ HvWizardActions
112
+ };
113
+ //# sourceMappingURL=WizardActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardActions.js","sources":["../../../../../../../../src/components/Wizard/WizardActions/WizardActions.tsx"],"sourcesContent":["import { useCallback, useContext, useEffect, useState } from \"react\";\nimport { ClassNames } from \"@emotion/react\";\nimport { clsx } from \"clsx\";\nimport {\n HvBaseProps,\n HvButton,\n HvDialogActions,\n HvGrid,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\nimport wizardActionsClasses, {\n HvWizardActionsClasses,\n} from \"./wizardActionsClasses\";\nimport { styles } from \"./WizardActions.styles\";\nimport { HvWizardContext } from \"../WizardContext/WizardContext\";\n\nexport interface HvWizardActionsProps extends HvBaseProps {\n /** Function to handle the cancel button. */\n handleClose: (\n event: React.SyntheticEvent,\n reason?: \"escapeKeyDown\" | \"backdropClick\"\n ) => void;\n /** Function to handle the submit button. Also sends the current context state. */\n handleSubmit: (context: any) => void;\n /** An object containing all the labels for the wizard actions component. */\n labels?: {\n /** Cancel button label. */\n cancel?: string;\n /** Skip button label. */\n skip?: string;\n /** Previous button label. */\n previous?: string;\n /** Next button label. */\n next?: string;\n /** Submit button label. */\n submit?: string;\n };\n /** Whether the submit button is disabled. */\n loading?: boolean;\n /** Enables the skip button. */\n skippable?: boolean;\n /** A Jss Object used to override or extend the styles applied to the empty state Wizard. */\n classes?: HvWizardActionsClasses;\n}\n\nexport const HvWizardActions = ({\n classes,\n handleClose,\n handleSubmit,\n loading = false,\n skippable = false,\n labels = {\n cancel: \"Cancel\",\n next: \"Next\",\n previous: \"Previous\",\n skip: \"Skip\",\n submit: \"Submit\",\n },\n}: HvWizardActionsProps) => {\n const { context, updateContext, tab, setTab } = useContext(HvWizardContext);\n const [pages, setPages] = useState(0);\n const [canSubmit, setCanSubmit] = useState(false);\n\n useEffect(() => {\n const contextEntries = Object.entries(context);\n if (contextEntries.length) {\n setPages(contextEntries.length);\n\n const validWizard = Object.entries(context).every(\n ([, value]) => value?.valid\n );\n if (validWizard !== canSubmit) {\n setCanSubmit(validWizard);\n }\n }\n }, [context]);\n\n const lastPage = pages - 1;\n const isLastPage = tab >= lastPage;\n\n const handleSkip = useCallback(() => {\n const skippedContext = Object.entries(context).map(([, child]) => ({\n ...child,\n valid: child?.valid !== false,\n }));\n\n updateContext(skippedContext);\n setTab(lastPage);\n }, [setTab, context, lastPage, updateContext]);\n\n const handleSubmitInternal = useCallback(\n () => handleSubmit(context),\n [handleSubmit, context]\n );\n\n const onCloseHander = useCallback((event) => {\n const clearContext = Object.entries(context).map(([, child]) => ({\n ...child,\n touched: false,\n }));\n\n updateContext(clearContext);\n setTab(0);\n handleClose?.(event);\n }, []);\n\n return (\n <ClassNames>\n {({ css }) => (\n <HvDialogActions\n className={clsx(\n classes?.actionsContainer,\n wizardActionsClasses.actionsContainer,\n css(styles.actionsContainer)\n )}\n >\n <HvGrid>\n <HvButton\n variant=\"secondaryGhost\"\n onClick={onCloseHander}\n className={clsx(\n classes?.buttonWidth,\n wizardActionsClasses.buttonWidth,\n css(styles.buttonWidth)\n )}\n >\n {`${labels.cancel ?? \"Cancel\"}`}\n </HvButton>\n {skippable && (\n <HvButton\n variant=\"secondaryGhost\"\n disabled={isLastPage}\n className={clsx(\n classes?.buttonWidth,\n wizardActionsClasses.buttonWidth,\n css(styles.buttonWidth)\n )}\n onClick={handleSkip}\n >\n {`${labels.skip ?? \"Skip\"}`}\n </HvButton>\n )}\n </HvGrid>\n <HvGrid\n className={clsx(\n classes?.buttonsContainer,\n wizardActionsClasses.buttonsContainer,\n css(styles.buttonsContainer)\n )}\n >\n <HvButton\n variant=\"secondaryGhost\"\n className={clsx(\n classes?.buttonWidth,\n wizardActionsClasses.buttonWidth,\n css(styles.buttonWidth)\n )}\n disabled={tab <= 0}\n onClick={() => setTab((t) => t - 1)}\n startIcon={<Backwards />}\n >\n {`${labels.previous ?? \"Previous\"}`}\n </HvButton>\n {isLastPage ? (\n <HvButton\n variant=\"primary\"\n className={clsx(\n classes?.buttonWidth,\n wizardActionsClasses.buttonWidth,\n css(styles.buttonWidth)\n )}\n disabled={loading || !canSubmit}\n onClick={handleSubmitInternal}\n >\n {`${labels.submit ?? \"Submit\"}`}\n </HvButton>\n ) : (\n <HvButton\n variant=\"secondaryGhost\"\n className={clsx(\n classes?.buttonWidth,\n wizardActionsClasses.buttonWidth,\n css(styles.buttonWidth),\n classes?.buttonSpacing,\n wizardActionsClasses.buttonSpacing,\n css(styles.buttonSpacing)\n )}\n onClick={() => setTab((t) => t + 1)}\n disabled={!skippable && !context?.[tab]?.valid}\n endIcon={<Forwards />}\n >\n {`${labels.next ?? \"Next\"}`}\n </HvButton>\n )}\n </HvGrid>\n </HvDialogActions>\n )}\n </ClassNames>\n );\n};\n"],"names":["HvWizardActions","classes","handleClose","handleSubmit","loading","skippable","labels","cancel","next","previous","skip","submit","context","updateContext","tab","setTab","useContext","HvWizardContext","pages","setPages","useState","canSubmit","setCanSubmit","useEffect","contextEntries","Object","entries","length","validWizard","every","value","valid","lastPage","isLastPage","handleSkip","useCallback","skippedContext","map","child","handleSubmitInternal","onCloseHander","event","clearContext","touched","ClassNames","children","css","HvDialogActions","className","clsx","actionsContainer","wizardActionsClasses","styles","_jsxs","HvGrid","_jsx","HvButton","variant","onClick","buttonWidth","disabled","buttonsContainer","t","startIcon","Backwards","buttonSpacing","endIcon","Forwards"],"mappings":"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"}
@@ -0,0 +1,28 @@
1
+ import { theme } from "@hitachivantara/uikit-react-core";
2
+ const styles = {
3
+ buttonWidth: {
4
+ width: 120,
5
+ "& span": {
6
+ whiteSpace: "normal",
7
+ lineHeight: theme.lineHeights.sm
8
+ }
9
+ },
10
+ actionsContainer: {
11
+ display: "flex",
12
+ justifyContent: "space-between"
13
+ },
14
+ buttonsContainer: {
15
+ display: "flex",
16
+ alignItems: "center",
17
+ "& > button:last-child": {
18
+ marginLeft: 20
19
+ }
20
+ },
21
+ buttonSpacing: {
22
+ paddingLeft: 28
23
+ }
24
+ };
25
+ export {
26
+ styles
27
+ };
28
+ //# sourceMappingURL=WizardActions.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardActions.styles.js","sources":["../../../../../../../../src/components/Wizard/WizardActions/WizardActions.styles.tsx"],"sourcesContent":["import { CSSInterpolation } from \"@emotion/serialize\";\nimport { theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const styles: { [key: string]: CSSInterpolation } = {\n buttonWidth: {\n width: 120,\n \"& span\": {\n whiteSpace: \"normal\",\n lineHeight: theme.lineHeights.sm,\n },\n },\n actionsContainer: {\n display: \"flex\",\n justifyContent: \"space-between\",\n },\n buttonsContainer: {\n display: \"flex\",\n alignItems: \"center\",\n \"& > button:last-child\": {\n marginLeft: 20,\n },\n },\n buttonSpacing: {\n paddingLeft: 28,\n },\n};\n"],"names":["styles","buttonWidth","width","whiteSpace","lineHeight","theme","lineHeights","sm","actionsContainer","display","justifyContent","buttonsContainer","alignItems","marginLeft","buttonSpacing","paddingLeft"],"mappings":";AAGO,MAAMA,SAA8C;AAAA,EACzDC,aAAa;AAAA,IACXC,OAAO;AAAA,IACP,UAAU;AAAA,MACRC,YAAY;AAAA,MACZC,YAAYC,MAAMC,YAAYC;AAAAA,IAChC;AAAA,EACF;AAAA,EACAC,kBAAkB;AAAA,IAChBC,SAAS;AAAA,IACTC,gBAAgB;AAAA,EAClB;AAAA,EACAC,kBAAkB;AAAA,IAChBF,SAAS;AAAA,IACTG,YAAY;AAAA,IACZ,yBAAyB;AAAA,MACvBC,YAAY;AAAA,IACd;AAAA,EACF;AAAA,EACAC,eAAe;AAAA,IACbC,aAAa;AAAA,EACf;AACF;"}
@@ -0,0 +1,8 @@
1
+ import { getClasses } from "@hitachivantara/uikit-react-core";
2
+ const classKeys = ["actionsContainer", "buttonsContainer", "buttonWidth", "buttonSpacing"];
3
+ const wizardActionsClasses = getClasses(classKeys, "HvWizardActions");
4
+ const wizardActionsClasses$1 = wizardActionsClasses;
5
+ export {
6
+ wizardActionsClasses$1 as default
7
+ };
8
+ //# sourceMappingURL=wizardActionsClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizardActionsClasses.js","sources":["../../../../../../../../src/components/Wizard/WizardActions/wizardActionsClasses.ts"],"sourcesContent":["import { getClasses } from \"@hitachivantara/uikit-react-core\";\n\nexport type HvWizardActionsClasses = {\n /** Styles applied to the component which contains the groups of buttons. */\n actionsContainer?: string;\n /** Styles applied to the component which contains the buttons. */\n buttonsContainer?: string;\n /** Styles applied to the Button component to override its width. */\n buttonWidth?: string;\n /** Styles applied to some Button components to override its left padding. */\n buttonSpacing?: string;\n};\n\nconst classKeys: string[] = [\n \"actionsContainer\",\n \"buttonsContainer\",\n \"buttonWidth\",\n \"buttonSpacing\",\n];\n\nconst wizardActionsClasses = getClasses<HvWizardActionsClasses>(\n classKeys,\n \"HvWizardActions\"\n);\n\nexport default wizardActionsClasses;\n"],"names":["classKeys","wizardActionsClasses","getClasses"],"mappings":";AAaA,MAAMA,YAAsB,CAC1B,oBACA,oBACA,eACA,eAAe;AAGjB,MAAMC,uBAAuBC,WAC3BF,WACA,iBAAiB;AAGnB,MAAA,yBAAeC;"}
@@ -0,0 +1,34 @@
1
+ import { ClassNames } from "@emotion/react";
2
+ import { HvDialog } from "@hitachivantara/uikit-react-core";
3
+ import { clsx } from "../../../../../../node_modules/clsx/dist/clsx.m.js";
4
+ import wizardContainerClasses from "./wizardContainerClasses.js";
5
+ import { styles } from "./WizardContainer.styles.js";
6
+ import { jsx } from "@emotion/react/jsx-runtime";
7
+ const HvWizardContainer = ({
8
+ classes,
9
+ className,
10
+ children,
11
+ handleClose,
12
+ open,
13
+ ...others
14
+ }) => {
15
+ return /* @__PURE__ */ jsx(ClassNames, {
16
+ children: ({
17
+ css
18
+ }) => /* @__PURE__ */ jsx(HvDialog, {
19
+ classes: {
20
+ closeButton: clsx(classes == null ? void 0 : classes.closeButton, wizardContainerClasses.closeButton, css(styles.closeButton)),
21
+ paper: clsx(classes == null ? void 0 : classes.paper, wizardContainerClasses.paper, css(styles.paper))
22
+ },
23
+ className: clsx(className, classes == null ? void 0 : classes.root, wizardContainerClasses.root),
24
+ open,
25
+ onClose: handleClose,
26
+ ...others,
27
+ children
28
+ })
29
+ });
30
+ };
31
+ export {
32
+ HvWizardContainer
33
+ };
34
+ //# sourceMappingURL=WizardContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContainer.js","sources":["../../../../../../../../src/components/Wizard/WizardContainer/WizardContainer.tsx"],"sourcesContent":["import { ClassNames } from \"@emotion/react\";\nimport { HvBaseProps, HvDialog } from \"@hitachivantara/uikit-react-core\";\nimport { clsx } from \"clsx\";\nimport wizardContainerClasses, {\n HvWizardContainerClasses,\n} from \"./wizardContainerClasses\";\nimport { styles } from \"./WizardContainer.styles\";\nimport React from \"react\";\n\nexport interface HvWizardContainerProps extends Omit<HvBaseProps, \"onClose\"> {\n /** Current state of the Wizard. */\n open: boolean;\n /** Function executed on close. */\n handleClose: (\n event: React.SyntheticEvent,\n reason?: \"escapeKeyDown\" | \"backdropClick\"\n ) => void;\n /** A Jss Object used to override or extend the styles applied to the empty state Wizard. */\n classes?: HvWizardContainerClasses;\n}\n\nexport const HvWizardContainer = ({\n classes,\n className,\n children,\n handleClose,\n open,\n ...others\n}: HvWizardContainerProps) => {\n return (\n <ClassNames>\n {({ css }) => (\n <HvDialog\n classes={{\n closeButton: clsx(\n classes?.closeButton,\n wizardContainerClasses.closeButton,\n css(styles.closeButton)\n ),\n paper: clsx(\n classes?.paper,\n wizardContainerClasses.paper,\n css(styles.paper)\n ),\n }}\n className={clsx(\n className,\n classes?.root,\n wizardContainerClasses.root\n )}\n open={open}\n onClose={handleClose}\n {...others}\n >\n {children}\n </HvDialog>\n )}\n </ClassNames>\n );\n};\n"],"names":["HvWizardContainer","classes","className","children","handleClose","open","others","ClassNames","css","HvDialog","closeButton","clsx","wizardContainerClasses","styles","paper","root","onClose"],"mappings":";;;;;;AAqBO,MAAMA,oBAAoBA,CAAC;AAAA,EAChCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACmB,MAAM;AAC5B,6BACGC,YAAU;AAAA,IAAAJ,UACRA,CAAC;AAAA,MAAEK;AAAAA,IAAAA,0BACDC,UAAQ;AAAA,MACPR,SAAS;AAAA,QACPS,aAAaC,KACXV,mCAASS,aACTE,uBAAuBF,aACvBF,IAAIK,OAAOH,WAAW,CAAC;AAAA,QAEzBI,OAAOH,KACLV,mCAASa,OACTF,uBAAuBE,OACvBN,IAAIK,OAAOC,KAAK,CAAC;AAAA,MAErB;AAAA,MACAZ,WAAWS,KACTT,WACAD,mCAASc,MACTH,uBAAuBG,IAAI;AAAA,MAE7BV;AAAAA,MACAW,SAASZ;AAAAA,MAAY,GACjBE;AAAAA,MAAMH;AAAAA,IAAAA,CAED;AAAA,EAAA,CAGF;AAEjB;"}
@@ -0,0 +1,15 @@
1
+ import { theme } from "@hitachivantara/uikit-react-core";
2
+ const styles = {
3
+ paper: {
4
+ width: "80%",
5
+ maxWidth: "80%",
6
+ maxHeight: `calc(100% - (2 * ${theme.dialog.margin}))`
7
+ },
8
+ closeButton: {
9
+ display: "none"
10
+ }
11
+ };
12
+ export {
13
+ styles
14
+ };
15
+ //# sourceMappingURL=WizardContainer.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContainer.styles.js","sources":["../../../../../../../../src/components/Wizard/WizardContainer/WizardContainer.styles.tsx"],"sourcesContent":["import { CSSInterpolation } from \"@emotion/serialize\";\nimport { theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const styles: { [key: string]: CSSInterpolation } = {\n paper: {\n width: \"80%\",\n maxWidth: \"80%\",\n maxHeight: `calc(100% - (2 * ${theme.dialog.margin}))`,\n },\n closeButton: {\n display: \"none\",\n },\n};\n"],"names":["styles","paper","width","maxWidth","maxHeight","theme","dialog","margin","closeButton","display"],"mappings":";AAGO,MAAMA,SAA8C;AAAA,EACzDC,OAAO;AAAA,IACLC,OAAO;AAAA,IACPC,UAAU;AAAA,IACVC,WAAY,oBAAmBC,MAAMC,OAAOC;AAAAA,EAC9C;AAAA,EACAC,aAAa;AAAA,IACXC,SAAS;AAAA,EACX;AACF;"}
@@ -0,0 +1,8 @@
1
+ import { getClasses } from "@hitachivantara/uikit-react-core";
2
+ const classKeys = ["root", "paper", "closeButton"];
3
+ const wizardContainerClasses = getClasses(classKeys, "HvWizardContainer");
4
+ const wizardContainerClasses$1 = wizardContainerClasses;
5
+ export {
6
+ wizardContainerClasses$1 as default
7
+ };
8
+ //# sourceMappingURL=wizardContainerClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizardContainerClasses.js","sources":["../../../../../../../../src/components/Wizard/WizardContainer/wizardContainerClasses.ts"],"sourcesContent":["import { getClasses } from \"@hitachivantara/uikit-react-core\";\n\nexport type HvWizardContainerClasses = {\n /** Styles applied to the component root class. */\n root?: string;\n /** Style applied to the component (root). */\n paper?: string;\n /** Style applied to the close button. */\n closeButton?: string;\n};\n\nconst classKeys: string[] = [\"root\", \"paper\", \"closeButton\"];\n\nconst wizardContainerClasses = getClasses<HvWizardContainerClasses>(\n classKeys,\n \"HvWizardContainer\"\n);\n\nexport default wizardContainerClasses;\n"],"names":["classKeys","wizardContainerClasses","getClasses"],"mappings":";AAWA,MAAMA,YAAsB,CAAC,QAAQ,SAAS,aAAa;AAE3D,MAAMC,yBAAyBC,WAC7BF,WACA,mBAAmB;AAGrB,MAAA,2BAAeC;"}
@@ -0,0 +1,38 @@
1
+ import { clsx } from "../../../../../../node_modules/clsx/dist/clsx.m.js";
2
+ import { HvLoading } from "@hitachivantara/uikit-react-core";
3
+ import { styles } from "./LoadingContainer.styles.js";
4
+ import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
5
+ const LoadingContainer = ({
6
+ children,
7
+ hidden,
8
+ ...others
9
+ }) => {
10
+ var _a, _b, _c;
11
+ return /* @__PURE__ */ jsxs(Fragment, {
12
+ children: [/* @__PURE__ */ jsx("div", {
13
+ style: {
14
+ top: 0,
15
+ left: 0,
16
+ height: "100%",
17
+ width: "100%"
18
+ },
19
+ className: clsx((_a = styles) == null ? void 0 : _a.overlay, !hidden && ((_b = styles) == null ? void 0 : _b.blur)),
20
+ children: /* @__PURE__ */ jsx(HvLoading, {
21
+ classes: {
22
+ root: clsx((_c = styles) == null ? void 0 : _c.loading)
23
+ },
24
+ hidden,
25
+ ...others
26
+ })
27
+ }), /* @__PURE__ */ jsx("div", {
28
+ style: {
29
+ display: "flow-root"
30
+ },
31
+ children
32
+ })]
33
+ });
34
+ };
35
+ export {
36
+ LoadingContainer
37
+ };
38
+ //# sourceMappingURL=LoadingContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingContainer.js","sources":["../../../../../../../../src/components/Wizard/WizardContent/LoadingContainer.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { HvLoading } from \"@hitachivantara/uikit-react-core\";\nimport { styles } from \"./LoadingContainer.styles\";\n\nexport const LoadingContainer = ({ children, hidden, ...others }) => {\n return (\n <>\n <div\n style={{\n top: 0,\n left: 0,\n height: \"100%\",\n width: \"100%\",\n }}\n className={clsx(styles?.overlay, !hidden && styles?.blur)}\n >\n <HvLoading\n classes={{ root: clsx(styles?.loading) }}\n hidden={hidden}\n {...others}\n />\n </div>\n <div style={{ display: \"flow-root\" }}>{children}</div>\n </>\n );\n};\n"],"names":["LoadingContainer","children","hidden","others","_Fragment","_jsx","style","top","left","height","width","className","clsx","styles","overlay","blur","HvLoading","classes","root","loading","display"],"mappings":";;;;AAIO,MAAMA,mBAAmBA,CAAC;AAAA,EAAEC;AAAAA,EAAUC;AAAAA,EAAQ,GAAGC;AAAO,MAAM;;AACnE,8BACEC,UAAA;AAAA,IAAAH,WACEI,oBAAA,OAAA;AAAA,MACEC,OAAO;AAAA,QACLC,KAAK;AAAA,QACLC,MAAM;AAAA,QACNC,QAAQ;AAAA,QACRC,OAAO;AAAA,MACT;AAAA,MACAC,WAAWC,MAAKC,mCAAQC,SAAS,CAACZ,YAAUW,mCAAQE,KAAI;AAAA,MAAEd,8BAEzDe,WAAS;AAAA,QACRC,SAAS;AAAA,UAAEC,MAAMN,MAAKC,mCAAQM,OAAO;AAAA,QAAE;AAAA,QACvCjB;AAAAA,QAAe,GACXC;AAAAA,MAAAA,CAAM;AAAA,IAAA,CACV,GAEJE,oBAAA,OAAA;AAAA,MAAKC,OAAO;AAAA,QAAEc,SAAS;AAAA,MAAY;AAAA,MAAEnB;AAAAA,IAAAA,CAAiB,CAAA;AAAA,EAAA,CACrD;AAEP;"}
@@ -0,0 +1,21 @@
1
+ import { hexToRgbA, theme } from "@hitachivantara/uikit-react-core";
2
+ import { alpha } from "@mui/material";
3
+ const styles = {
4
+ loading: {
5
+ width: "100%",
6
+ height: "100%"
7
+ },
8
+ overlay: {
9
+ position: "absolute",
10
+ transition: "background-Color .2s ease",
11
+ zIndex: -1
12
+ },
13
+ blur: {
14
+ backgroundColor: alpha(hexToRgbA(theme.colors.atmo2), 0.8),
15
+ zIndex: theme.zIndices.modal
16
+ }
17
+ };
18
+ export {
19
+ styles
20
+ };
21
+ //# sourceMappingURL=LoadingContainer.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingContainer.styles.js","sources":["../../../../../../../../src/components/Wizard/WizardContent/LoadingContainer.styles.tsx"],"sourcesContent":["import { CSSInterpolation } from \"@emotion/serialize\";\nimport { hexToRgbA, theme } from \"@hitachivantara/uikit-react-core\";\nimport { alpha } from \"@mui/material\";\n\nexport const styles: { [key: string]: CSSInterpolation } = {\n loading: {\n width: \"100%\",\n height: \"100%\",\n },\n overlay: {\n position: \"absolute\",\n transition: \"background-Color .2s ease\",\n zIndex: -1,\n },\n blur: {\n backgroundColor: alpha(hexToRgbA(theme.colors.atmo2), 0.8),\n zIndex: theme.zIndices.modal,\n },\n};\n"],"names":["styles","loading","width","height","overlay","position","transition","zIndex","blur","backgroundColor","alpha","hexToRgbA","theme","colors","atmo2","zIndices","modal"],"mappings":";;AAIO,MAAMA,SAA8C;AAAA,EACzDC,SAAS;AAAA,IACPC,OAAO;AAAA,IACPC,QAAQ;AAAA,EACV;AAAA,EACAC,SAAS;AAAA,IACPC,UAAU;AAAA,IACVC,YAAY;AAAA,IACZC,QAAQ;AAAA,EACV;AAAA,EACAC,MAAM;AAAA,IACJC,iBAAiBC,MAAMC,UAAUC,MAAMC,OAAOC,KAAK,GAAG,GAAG;AAAA,IACzDP,QAAQK,MAAMG,SAASC;AAAAA,EACzB;AACF;"}
@@ -0,0 +1,139 @@
1
+ import { ClassNames } from "@emotion/react";
2
+ import { HvDialogContent } from "@hitachivantara/uikit-react-core";
3
+ import { clsx } from "../../../../../../node_modules/clsx/dist/clsx.m.js";
4
+ import wizardContentClasses from "./wizardContentClasses.js";
5
+ import { useElementSize } from "usehooks-ts";
6
+ import { styles } from "./WizardContent.styles.js";
7
+ import React, { useContext, useRef, useState, useCallback, useEffect } from "react";
8
+ import { HvWizardContext } from "../WizardContext/WizardContext.js";
9
+ import { LoadingContainer } from "./LoadingContainer.js";
10
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
11
+ const DRAWER_PERCENTAGE = 0.3;
12
+ const DRAWER_MIN_WIDTH = 280;
13
+ const HvWizardContent = ({
14
+ classes,
15
+ fixedHeight = false,
16
+ loading = false,
17
+ children,
18
+ summaryContent
19
+ }) => {
20
+ const {
21
+ context,
22
+ updateContext,
23
+ summary,
24
+ tab
25
+ } = useContext(HvWizardContext);
26
+ const arrayChildren = React.Children.toArray(children);
27
+ const initialContext = arrayChildren.reduce((acc, child, index) => {
28
+ const invalid = "mustValidate" in child.props && child.props.mustValidate === true ? false : null;
29
+ const valid = invalid ?? (index === 0 || null);
30
+ return {
31
+ ...acc,
32
+ [index]: {
33
+ ...child.props,
34
+ form: {},
35
+ valid,
36
+ touched: index === 0
37
+ }
38
+ };
39
+ }, {});
40
+ const summaryRef = useRef();
41
+ const resizedRef = useRef({
42
+ height: 0,
43
+ width: 0
44
+ });
45
+ const [containerRef, sizes] = useElementSize();
46
+ const [summaryHeight, setSummaryHeight] = useState(0);
47
+ const [summaryWidth, setSummaryWidth] = useState(0);
48
+ const [summaryLeft, setSummaryLeft] = useState(0);
49
+ const updateSummaryMeasures = useCallback((newSizes) => {
50
+ const modalWidth = newSizes.width;
51
+ const drawerWidth = modalWidth * DRAWER_PERCENTAGE;
52
+ setSummaryHeight(newSizes.height);
53
+ setSummaryWidth(Math.max(drawerWidth, DRAWER_MIN_WIDTH));
54
+ setSummaryLeft(modalWidth - Math.max(drawerWidth, DRAWER_MIN_WIDTH));
55
+ resizedRef.current = {
56
+ height: newSizes.height,
57
+ width: newSizes.width
58
+ };
59
+ }, []);
60
+ useEffect(() => {
61
+ var _a, _b, _c;
62
+ const pageHeight = (_c = (_b = (_a = summaryRef.current) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.height;
63
+ if (summary && sizes.height !== resizedRef.current.height || sizes.width !== resizedRef.current.width) {
64
+ updateSummaryMeasures(sizes);
65
+ }
66
+ if (pageHeight && sizes.height !== pageHeight) {
67
+ updateSummaryMeasures({
68
+ width: sizes.width,
69
+ height: pageHeight
70
+ });
71
+ }
72
+ }, [tab, sizes, summary, updateSummaryMeasures]);
73
+ useEffect(() => {
74
+ updateContext(initialContext);
75
+ }, []);
76
+ useEffect(() => {
77
+ var _a;
78
+ if (tab && !((_a = context[tab]) == null ? void 0 : _a.touched)) {
79
+ const updatedContext = Object.entries(context).reduce((acc, [key, childState]) => ({
80
+ ...acc,
81
+ ...+key <= tab ? {
82
+ [key]: {
83
+ ...childState,
84
+ touched: true,
85
+ valid: (childState == null ? void 0 : childState.valid) ?? true
86
+ }
87
+ } : {
88
+ [key]: childState
89
+ }
90
+ }), {});
91
+ updateContext(updatedContext);
92
+ }
93
+ }, [tab]);
94
+ const translateX = summaryWidth ? summaryWidth + 10 : 450;
95
+ return /* @__PURE__ */ jsx(ClassNames, {
96
+ children: ({
97
+ css
98
+ }) => /* @__PURE__ */ jsxs("div", {
99
+ className: clsx(classes == null ? void 0 : classes.summaryRef, wizardContentClasses.summaryRef, css(styles.summaryRef)),
100
+ ref: (el) => {
101
+ containerRef(el);
102
+ if (el) {
103
+ summaryRef.current = el;
104
+ }
105
+ },
106
+ children: [summary !== null && /* @__PURE__ */ jsx("div", {
107
+ className: clsx(classes == null ? void 0 : classes.summarySticky, wizardContentClasses.summarySticky, css(styles.summarySticky)),
108
+ children: /* @__PURE__ */ jsx("div", {
109
+ className: clsx(classes == null ? void 0 : classes.summaryContainer, wizardContentClasses.summaryContainer, css(styles.summaryContainer)),
110
+ style: {
111
+ left: summaryLeft,
112
+ width: summaryWidth,
113
+ height: summaryHeight,
114
+ transform: `translate(${summary ? 0 : translateX}px, 0)`
115
+ },
116
+ children: summaryContent
117
+ })
118
+ }), /* @__PURE__ */ jsx(HvDialogContent, {
119
+ className: clsx(classes == null ? void 0 : classes.contentContainer, wizardContentClasses.contentContainer, css(styles.contentContainer), fixedHeight && clsx(classes == null ? void 0 : classes.fixedHeight, wizardContentClasses.fixedHeight, css(styles.fixedHeight))),
120
+ indentContent: true,
121
+ children: /* @__PURE__ */ jsx(LoadingContainer, {
122
+ hidden: !loading,
123
+ children: React.Children.map(arrayChildren, (child, index) => {
124
+ if (index === tab) {
125
+ return React.cloneElement(child, {
126
+ tab
127
+ });
128
+ }
129
+ return null;
130
+ })
131
+ })
132
+ })]
133
+ })
134
+ });
135
+ };
136
+ export {
137
+ HvWizardContent
138
+ };
139
+ //# sourceMappingURL=WizardContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContent.js","sources":["../../../../../../../../src/components/Wizard/WizardContent/WizardContent.tsx"],"sourcesContent":["import { ClassNames } from \"@emotion/react\";\nimport { HvBaseProps, HvDialogContent } from \"@hitachivantara/uikit-react-core\";\nimport { clsx } from \"clsx\";\nimport wizardContentClasses, {\n HvWizardContentClasses,\n} from \"./wizardContentClasses\";\nimport { useElementSize } from \"usehooks-ts\";\nimport { styles } from \"./WizardContent.styles\";\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport {\n HvWizardTabs,\n HvWizardTab,\n HvWizardContext,\n} from \"../WizardContext/WizardContext\";\nimport { LoadingContainer } from \"./LoadingContainer\";\n\nexport interface HvWizardContentProps extends HvBaseProps {\n /** Forces minimum height to the component. */\n fixedHeight?: boolean;\n /** Whether the loading animation is shown. */\n loading?: boolean;\n /** The content of the summary. */\n summaryContent?: React.ReactNode;\n /** A Jss Object used to override or extend the styles applied to the empty state Wizard. */\n classes?: HvWizardContentClasses;\n}\n\ntype ChildElement = React.ReactElement<HvWizardTabs<HvWizardTab>>;\n\nconst DRAWER_PERCENTAGE = 0.3;\nconst DRAWER_MIN_WIDTH = 280;\n\nexport const HvWizardContent = ({\n classes,\n fixedHeight = false,\n loading = false,\n children,\n summaryContent,\n}: HvWizardContentProps) => {\n const { context, updateContext, summary, tab } = useContext(HvWizardContext);\n\n const arrayChildren = React.Children.toArray(children) as ChildElement[];\n\n const initialContext = arrayChildren.reduce(\n (acc, child: ChildElement, index) => {\n const invalid =\n \"mustValidate\" in child.props && child.props.mustValidate === true\n ? false\n : null;\n const valid = invalid ?? (index === 0 || null);\n return {\n ...acc,\n [index]: { ...child.props, form: {}, valid, touched: index === 0 },\n };\n },\n {}\n );\n\n const summaryRef = useRef<HTMLElement>();\n const resizedRef = useRef({ height: 0, width: 0 });\n const [containerRef, sizes] = useElementSize();\n\n const [summaryHeight, setSummaryHeight] = useState(0);\n const [summaryWidth, setSummaryWidth] = useState(0);\n const [summaryLeft, setSummaryLeft] = useState(0);\n\n const updateSummaryMeasures = useCallback((newSizes) => {\n const modalWidth = newSizes.width;\n const drawerWidth = modalWidth * DRAWER_PERCENTAGE;\n setSummaryHeight(newSizes.height);\n setSummaryWidth(Math.max(drawerWidth, DRAWER_MIN_WIDTH));\n setSummaryLeft(modalWidth - Math.max(drawerWidth, DRAWER_MIN_WIDTH));\n\n resizedRef.current = {\n height: newSizes.height,\n width: newSizes.width,\n };\n }, []);\n\n useEffect(() => {\n const pageHeight = summaryRef.current?.getBoundingClientRect?.()?.height;\n if (\n (summary && sizes.height !== resizedRef.current.height) ||\n sizes.width !== resizedRef.current.width\n ) {\n updateSummaryMeasures(sizes);\n }\n\n if (pageHeight && sizes.height !== pageHeight) {\n updateSummaryMeasures({\n width: sizes.width,\n height: pageHeight,\n });\n }\n }, [tab, sizes, summary, updateSummaryMeasures]);\n\n useEffect(() => {\n updateContext(initialContext);\n }, []);\n\n useEffect(() => {\n if (tab && !context[tab]?.touched) {\n const updatedContext = Object.entries(context).reduce(\n (acc, [key, childState]) => ({\n ...acc,\n ...(+key <= tab\n ? {\n [key]: {\n ...childState,\n touched: true,\n valid: childState?.valid ?? true,\n },\n }\n : { [key]: childState }),\n }),\n {}\n );\n\n updateContext(updatedContext);\n }\n }, [tab]);\n\n const translateX = summaryWidth ? summaryWidth + 10 : 450;\n\n return (\n <ClassNames>\n {({ css }) => (\n <div\n className={clsx(\n classes?.summaryRef,\n wizardContentClasses.summaryRef,\n css(styles.summaryRef)\n )}\n ref={(el) => {\n containerRef(el);\n if (el) {\n summaryRef.current = el;\n }\n }}\n >\n {summary !== null && (\n <div\n className={clsx(\n classes?.summarySticky,\n wizardContentClasses.summarySticky,\n css(styles.summarySticky)\n )}\n >\n <div\n className={clsx(\n classes?.summaryContainer,\n wizardContentClasses.summaryContainer,\n css(styles.summaryContainer)\n )}\n style={{\n left: summaryLeft,\n width: summaryWidth,\n height: summaryHeight,\n transform: `translate(${summary ? 0 : translateX}px, 0)`,\n }}\n >\n {summaryContent}\n </div>\n </div>\n )}\n <HvDialogContent\n className={clsx(\n classes?.contentContainer,\n wizardContentClasses.contentContainer,\n css(styles.contentContainer),\n fixedHeight &&\n clsx(\n classes?.fixedHeight,\n wizardContentClasses.fixedHeight,\n css(styles.fixedHeight)\n )\n )}\n indentContent\n >\n <LoadingContainer hidden={!loading}>\n {React.Children.map(arrayChildren, (child, index) => {\n if (index === tab) {\n return React.cloneElement(child as React.ReactElement, {\n tab,\n });\n }\n return null;\n })}\n </LoadingContainer>\n </HvDialogContent>\n </div>\n )}\n </ClassNames>\n );\n};\n"],"names":["DRAWER_PERCENTAGE","DRAWER_MIN_WIDTH","HvWizardContent","classes","fixedHeight","loading","children","summaryContent","context","updateContext","summary","tab","useContext","HvWizardContext","arrayChildren","React","Children","toArray","initialContext","reduce","acc","child","index","invalid","props","mustValidate","valid","form","touched","summaryRef","useRef","resizedRef","height","width","containerRef","sizes","useElementSize","summaryHeight","setSummaryHeight","useState","summaryWidth","setSummaryWidth","summaryLeft","setSummaryLeft","updateSummaryMeasures","useCallback","newSizes","modalWidth","drawerWidth","Math","max","current","useEffect","pageHeight","getBoundingClientRect","updatedContext","Object","entries","key","childState","translateX","ClassNames","css","className","clsx","wizardContentClasses","styles","ref","el","summarySticky","summaryContainer","style","left","transform","_jsx","HvDialogContent","contentContainer","indentContent","LoadingContainer","hidden","map","cloneElement"],"mappings":";;;;;;;;;;AAmCA,MAAMA,oBAAoB;AAC1B,MAAMC,mBAAmB;AAElB,MAAMC,kBAAkBA,CAAC;AAAA,EAC9BC;AAAAA,EACAC,cAAc;AAAA,EACdC,UAAU;AAAA,EACVC;AAAAA,EACAC;AACoB,MAAM;AACpB,QAAA;AAAA,IAAEC;AAAAA,IAASC;AAAAA,IAAeC;AAAAA,IAASC;AAAAA,EAAAA,IAAQC,WAAWC,eAAe;AAE3E,QAAMC,gBAAgBC,MAAMC,SAASC,QAAQX,QAAQ;AAErD,QAAMY,iBAAiBJ,cAAcK,OACnC,CAACC,KAAKC,OAAqBC,UAAU;AAC7BC,UAAAA,UACJ,kBAAkBF,MAAMG,SAASH,MAAMG,MAAMC,iBAAiB,OAC1D,QACA;AACAC,UAAAA,QAAQH,YAAYD,UAAU,KAAK;AAClC,WAAA;AAAA,MACL,GAAGF;AAAAA,MACH,CAACE,KAAK,GAAG;AAAA,QAAE,GAAGD,MAAMG;AAAAA,QAAOG,MAAM,CAAC;AAAA,QAAGD;AAAAA,QAAOE,SAASN,UAAU;AAAA,MAAE;AAAA,IAAA;AAAA,EAErE,GACA,CAAE,CAAA;AAGJ,QAAMO,aAAaC;AACnB,QAAMC,aAAaD,OAAO;AAAA,IAAEE,QAAQ;AAAA,IAAGC,OAAO;AAAA,EAAA,CAAG;AACjD,QAAM,CAACC,cAAcC,KAAK,IAAIC,eAAgB;AAE9C,QAAM,CAACC,eAAeC,gBAAgB,IAAIC,SAAS,CAAC;AACpD,QAAM,CAACC,cAAcC,eAAe,IAAIF,SAAS,CAAC;AAClD,QAAM,CAACG,aAAaC,cAAc,IAAIJ,SAAS,CAAC;AAE1CK,QAAAA,wBAAwBC,YAAaC,CAAa,aAAA;AACtD,UAAMC,aAAaD,SAASb;AAC5B,UAAMe,cAAcD,aAAa/C;AACjCsC,qBAAiBQ,SAASd,MAAM;AAChCS,oBAAgBQ,KAAKC,IAAIF,aAAa/C,gBAAgB,CAAC;AACvD0C,mBAAeI,aAAaE,KAAKC,IAAIF,aAAa/C,gBAAgB,CAAC;AAEnE8B,eAAWoB,UAAU;AAAA,MACnBnB,QAAQc,SAASd;AAAAA,MACjBC,OAAOa,SAASb;AAAAA,IAAAA;AAAAA,EAEpB,GAAG,CAAE,CAAA;AAELmB,YAAU,MAAM;;AACd,UAAMC,cAAaxB,4BAAWsB,YAAXtB,mBAAoByB,0BAApBzB,mDAA+CG;AAE/DtB,QAAAA,WAAWyB,MAAMH,WAAWD,WAAWoB,QAAQnB,UAChDG,MAAMF,UAAUF,WAAWoB,QAAQlB,OACnC;AACAW,4BAAsBT,KAAK;AAAA,IAC7B;AAEIkB,QAAAA,cAAclB,MAAMH,WAAWqB,YAAY;AACvB,4BAAA;AAAA,QACpBpB,OAAOE,MAAMF;AAAAA,QACbD,QAAQqB;AAAAA,MAAAA,CACT;AAAA,IACH;AAAA,KACC,CAAC1C,KAAKwB,OAAOzB,SAASkC,qBAAqB,CAAC;AAE/CQ,YAAU,MAAM;AACd3C,kBAAcS,cAAc;AAAA,EAC9B,GAAG,CAAE,CAAA;AAELkC,YAAU,MAAM;;AACd,QAAIzC,OAAO,GAACH,aAAQG,GAAG,MAAXH,mBAAcoB,UAAS;AAC3B2B,YAAAA,iBAAiBC,OAAOC,QAAQjD,OAAO,EAAEW,OAC7C,CAACC,KAAK,CAACsC,KAAKC,UAAU,OAAO;AAAA,QAC3B,GAAGvC;AAAAA,QACH,GAAI,CAACsC,OAAO/C,MACR;AAAA,UACE,CAAC+C,GAAG,GAAG;AAAA,YACL,GAAGC;AAAAA,YACH/B,SAAS;AAAA,YACTF,QAAOiC,yCAAYjC,UAAS;AAAA,UAC9B;AAAA,QAAA,IAEF;AAAA,UAAE,CAACgC,GAAG,GAAGC;AAAAA,QAAW;AAAA,MAAA,IAE1B,CAAE,CAAA;AAGJlD,oBAAc8C,cAAc;AAAA,IAC9B;AAAA,EAAA,GACC,CAAC5C,GAAG,CAAC;AAEFiD,QAAAA,aAAapB,eAAeA,eAAe,KAAK;AAEtD,6BACGqB,YAAU;AAAA,IAAAvD,UACRA,CAAC;AAAA,MAAEwD;AAAAA,IAAAA,2BACF,OAAA;AAAA,MACEC,WAAWC,KACT7D,mCAAS0B,YACToC,qBAAqBpC,YACrBiC,IAAII,OAAOrC,UAAU,CAAC;AAAA,MAExBsC,KAAMC,CAAO,OAAA;AACXlC,qBAAakC,EAAE;AACf,YAAIA,IAAI;AACNvC,qBAAWsB,UAAUiB;AAAAA,QACvB;AAAA,MACF;AAAA,MAAE9D,UAEDI,CAAAA,YAAY,4BACX,OAAA;AAAA,QACEqD,WAAWC,KACT7D,mCAASkE,eACTJ,qBAAqBI,eACrBP,IAAII,OAAOG,aAAa,CAAC;AAAA,QACzB/D,8BAEF,OAAA;AAAA,UACEyD,WAAWC,KACT7D,mCAASmE,kBACTL,qBAAqBK,kBACrBR,IAAII,OAAOI,gBAAgB,CAAC;AAAA,UAE9BC,OAAO;AAAA,YACLC,MAAM9B;AAAAA,YACNT,OAAOO;AAAAA,YACPR,QAAQK;AAAAA,YACRoC,WAAY,aAAY/D,UAAU,IAAIkD;AAAAA,UACxC;AAAA,UAAEtD,UAEDC;AAAAA,QAAAA,CAAc;AAAA,MAAA,CAGpB,GACDmE,oBAACC,iBAAe;AAAA,QACdZ,WAAWC,KACT7D,mCAASyE,kBACTX,qBAAqBW,kBACrBd,IAAII,OAAOU,gBAAgB,GAC3BxE,eACE4D,KACE7D,mCAASC,aACT6D,qBAAqB7D,aACrB0D,IAAII,OAAO9D,WAAW,CAAC,CACxB;AAAA,QAELyE,eAAa;AAAA,QAAAvE,8BAEZwE,kBAAgB;AAAA,UAACC,QAAQ,CAAC1E;AAAAA,UAAQC,UAChCS,MAAMC,SAASgE,IAAIlE,eAAe,CAACO,OAAOC,UAAU;AACnD,gBAAIA,UAAUX,KAAK;AACVI,qBAAAA,MAAMkE,aAAa5D,OAA6B;AAAA,gBACrDV;AAAAA,cAAAA,CACD;AAAA,YACH;AACO,mBAAA;AAAA,UAAA,CACR;AAAA,QAAA,CAAC;AAAA,MAAA,CAEY,CAAA;AAAA,IAAA,CAAA;AAAA,EAAA,CAGX;AAEjB;"}
@@ -0,0 +1,37 @@
1
+ import { theme } from "@hitachivantara/uikit-react-core";
2
+ const styles = {
3
+ contentContainer: {
4
+ position: "relative",
5
+ padding: 20,
6
+ marginLeft: 0,
7
+ minHeight: 400,
8
+ overflowX: "hidden"
9
+ },
10
+ fixedHeight: {
11
+ minHeight: "calc(100vh - 387px)"
12
+ },
13
+ summaryRef: {
14
+ flex: 1,
15
+ overflowY: "auto",
16
+ overflowX: "hidden"
17
+ },
18
+ summarySticky: {
19
+ position: "sticky",
20
+ top: 0,
21
+ zIndex: 1
22
+ },
23
+ summaryContainer: {
24
+ position: "absolute",
25
+ top: 0,
26
+ minWidth: 280,
27
+ boxShadow: theme.colors.shadow,
28
+ backgroundColor: theme.colors.atmo1,
29
+ transition: "transform 0.3s",
30
+ transitionTimingFunction: "ease-in-out",
31
+ overflowY: "scroll"
32
+ }
33
+ };
34
+ export {
35
+ styles
36
+ };
37
+ //# sourceMappingURL=WizardContent.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContent.styles.js","sources":["../../../../../../../../src/components/Wizard/WizardContent/WizardContent.styles.tsx"],"sourcesContent":["import { CSSInterpolation } from \"@emotion/serialize\";\nimport { theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const styles: { [key: string]: CSSInterpolation } = {\n contentContainer: {\n position: \"relative\",\n padding: 20,\n marginLeft: 0,\n minHeight: 400,\n overflowX: \"hidden\",\n },\n fixedHeight: {\n minHeight: \"calc(100vh - 387px)\",\n },\n summaryRef: {\n flex: 1,\n overflowY: \"auto\",\n overflowX: \"hidden\",\n },\n summarySticky: {\n position: \"sticky\",\n top: 0,\n zIndex: 1,\n },\n summaryContainer: {\n position: \"absolute\",\n top: 0,\n minWidth: 280,\n boxShadow: theme.colors.shadow,\n backgroundColor: theme.colors.atmo1,\n transition: \"transform 0.3s\",\n transitionTimingFunction: \"ease-in-out\",\n overflowY: \"scroll\",\n },\n};\n"],"names":["styles","contentContainer","position","padding","marginLeft","minHeight","overflowX","fixedHeight","summaryRef","flex","overflowY","summarySticky","top","zIndex","summaryContainer","minWidth","boxShadow","theme","colors","shadow","backgroundColor","atmo1","transition","transitionTimingFunction"],"mappings":";AAGO,MAAMA,SAA8C;AAAA,EACzDC,kBAAkB;AAAA,IAChBC,UAAU;AAAA,IACVC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,WAAW;AAAA,IACXC,WAAW;AAAA,EACb;AAAA,EACAC,aAAa;AAAA,IACXF,WAAW;AAAA,EACb;AAAA,EACAG,YAAY;AAAA,IACVC,MAAM;AAAA,IACNC,WAAW;AAAA,IACXJ,WAAW;AAAA,EACb;AAAA,EACAK,eAAe;AAAA,IACbT,UAAU;AAAA,IACVU,KAAK;AAAA,IACLC,QAAQ;AAAA,EACV;AAAA,EACAC,kBAAkB;AAAA,IAChBZ,UAAU;AAAA,IACVU,KAAK;AAAA,IACLG,UAAU;AAAA,IACVC,WAAWC,MAAMC,OAAOC;AAAAA,IACxBC,iBAAiBH,MAAMC,OAAOG;AAAAA,IAC9BC,YAAY;AAAA,IACZC,0BAA0B;AAAA,IAC1Bb,WAAW;AAAA,EACb;AACF;"}
@@ -0,0 +1,8 @@
1
+ import { getClasses } from "@hitachivantara/uikit-react-core";
2
+ const classKeys = ["contentContainer", "fixedHeight", "summaryRef", "summarySticky", "summaryContainer"];
3
+ const wizardContentClasses = getClasses(classKeys, "HvWizardContent");
4
+ const wizardContentClasses$1 = wizardContentClasses;
5
+ export {
6
+ wizardContentClasses$1 as default
7
+ };
8
+ //# sourceMappingURL=wizardContentClasses.js.map