@hitachivantara/uikit-react-lab 5.2.0 → 5.2.2

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 (74) hide show
  1. package/dist/cjs/packages/lab/src/components/Wizard/Wizard.cjs +65 -0
  2. package/dist/cjs/packages/lab/src/components/Wizard/Wizard.cjs.map +1 -0
  3. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.cjs +113 -0
  4. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.cjs.map +1 -0
  5. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.cjs +28 -0
  6. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.cjs.map +1 -0
  7. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.cjs +8 -0
  8. package/dist/cjs/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.cjs.map +1 -0
  9. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.cjs +34 -0
  10. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.cjs.map +1 -0
  11. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.cjs +15 -0
  12. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.cjs.map +1 -0
  13. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.cjs +8 -0
  14. package/dist/cjs/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.cjs.map +1 -0
  15. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.cjs +38 -0
  16. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.cjs.map +1 -0
  17. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.cjs +21 -0
  18. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.cjs.map +1 -0
  19. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.cjs +141 -0
  20. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.cjs.map +1 -0
  21. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.cjs +37 -0
  22. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.cjs.map +1 -0
  23. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.cjs +8 -0
  24. package/dist/cjs/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.cjs.map +1 -0
  25. package/dist/cjs/packages/lab/src/components/Wizard/WizardContext/WizardContext.cjs +42 -0
  26. package/dist/cjs/packages/lab/src/components/Wizard/WizardContext/WizardContext.cjs.map +1 -0
  27. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.cjs +106 -0
  28. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.cjs.map +1 -0
  29. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.cjs +33 -0
  30. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.cjs.map +1 -0
  31. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.cjs +8 -0
  32. package/dist/cjs/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.cjs.map +1 -0
  33. package/dist/cjs/packages/lab/src/components/Wizard/wizardClasses.cjs +8 -0
  34. package/dist/cjs/packages/lab/src/components/Wizard/wizardClasses.cjs.map +1 -0
  35. package/dist/cjs/packages/lab/src/index.cjs +14 -0
  36. package/dist/cjs/packages/lab/src/index.cjs.map +1 -1
  37. package/dist/esm/packages/lab/src/components/Wizard/Wizard.js +65 -0
  38. package/dist/esm/packages/lab/src/components/Wizard/Wizard.js.map +1 -0
  39. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.js +113 -0
  40. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.js.map +1 -0
  41. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.js +28 -0
  42. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/WizardActions.styles.js.map +1 -0
  43. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.js +8 -0
  44. package/dist/esm/packages/lab/src/components/Wizard/WizardActions/wizardActionsClasses.js.map +1 -0
  45. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.js +34 -0
  46. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.js.map +1 -0
  47. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.js +15 -0
  48. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/WizardContainer.styles.js.map +1 -0
  49. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.js +8 -0
  50. package/dist/esm/packages/lab/src/components/Wizard/WizardContainer/wizardContainerClasses.js.map +1 -0
  51. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.js +38 -0
  52. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.js.map +1 -0
  53. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.js +21 -0
  54. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/LoadingContainer.styles.js.map +1 -0
  55. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.js +139 -0
  56. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.js.map +1 -0
  57. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.js +37 -0
  58. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/WizardContent.styles.js.map +1 -0
  59. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.js +8 -0
  60. package/dist/esm/packages/lab/src/components/Wizard/WizardContent/wizardContentClasses.js.map +1 -0
  61. package/dist/esm/packages/lab/src/components/Wizard/WizardContext/WizardContext.js +42 -0
  62. package/dist/esm/packages/lab/src/components/Wizard/WizardContext/WizardContext.js.map +1 -0
  63. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.js +106 -0
  64. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.js.map +1 -0
  65. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.js +33 -0
  66. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/WizardTitle.styles.js.map +1 -0
  67. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.js +8 -0
  68. package/dist/esm/packages/lab/src/components/Wizard/WizardTitle/wizardTitleClasses.js.map +1 -0
  69. package/dist/esm/packages/lab/src/components/Wizard/wizardClasses.js +8 -0
  70. package/dist/esm/packages/lab/src/components/Wizard/wizardClasses.js.map +1 -0
  71. package/dist/esm/packages/lab/src/index.js +15 -1
  72. package/dist/esm/packages/lab/src/index.js.map +1 -1
  73. package/dist/types/index.d.ts +172 -1
  74. package/package.json +4 -4
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const WizardContainer = require("./WizardContainer/WizardContainer.cjs");
5
+ const WizardTitle = require("./WizardTitle/WizardTitle.cjs");
6
+ const WizardContent = require("./WizardContent/WizardContent.cjs");
7
+ const WizardContext = require("./WizardContext/WizardContext.cjs");
8
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
9
+ const WizardActions = require("./WizardActions/WizardActions.cjs");
10
+ const HvWizard = ({
11
+ className,
12
+ children,
13
+ onClose,
14
+ handleSubmit,
15
+ title,
16
+ open,
17
+ skippable = true,
18
+ loading = false,
19
+ hasSummary = false,
20
+ summaryContent,
21
+ labels = {
22
+ cancel: "Cancel",
23
+ next: "Next",
24
+ previous: "Previous",
25
+ skip: "Skip",
26
+ submit: "Submit",
27
+ summary: "Summary"
28
+ },
29
+ fixedHeight = false,
30
+ customStep,
31
+ ...others
32
+ }) => {
33
+ const handleClose = React.useCallback((evt, reason) => {
34
+ if (reason !== "backdropClick") {
35
+ onClose == null ? void 0 : onClose(evt, reason);
36
+ }
37
+ }, [onClose]);
38
+ return /* @__PURE__ */ jsxRuntime.jsx(WizardContext.default, {
39
+ children: /* @__PURE__ */ jsxRuntime.jsxs(WizardContainer.HvWizardContainer, {
40
+ className,
41
+ handleClose,
42
+ open,
43
+ ...others,
44
+ children: [/* @__PURE__ */ jsxRuntime.jsx(WizardTitle.HvWizardTitle, {
45
+ title,
46
+ hasSummary,
47
+ labels,
48
+ customStep
49
+ }), /* @__PURE__ */ jsxRuntime.jsx(WizardContent.HvWizardContent, {
50
+ loading,
51
+ fixedHeight,
52
+ summaryContent,
53
+ children
54
+ }), /* @__PURE__ */ jsxRuntime.jsx(WizardActions.HvWizardActions, {
55
+ loading,
56
+ skippable,
57
+ labels,
58
+ handleClose,
59
+ handleSubmit
60
+ })]
61
+ })
62
+ });
63
+ };
64
+ exports.HvWizard = HvWizard;
65
+ //# sourceMappingURL=Wizard.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wizard.cjs","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,MAAAA,YAClB,CAACC,KAAKC,WAAW;AACf,QAAIA,WAAW,iBAAiB;AAC9BrB,yCAAUoB,KAAKC;AAAAA,IACjB;AAAA,EAAA,GAEF,CAACrB,OAAO,CAAC;AAGX,wCACGsB,cAAAA,SAAc;AAAA,IAAAvB,0CACZwB,mCAAiB;AAAA,MAChBzB;AAAAA,MACAoB;AAAAA,MACAf;AAAAA,MAAW,GACPc;AAAAA,MAAMlB,UAAA,CAEVyB,2BAAAA,IAACC,2BAAa;AAAA,QACZvB;AAAAA,QACAI;AAAAA,QACAE;AAAAA,QACAQ;AAAAA,MAAAA,CACA,GACFQ,2BAAAA,IAACE,+BAAe;AAAA,QACdrB;AAAAA,QACAU;AAAAA,QACAR;AAAAA,QAA+BR;AAAAA,MAAAA,CAGf,GAClByB,2BAAAA,IAACG,+BAAe;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
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@emotion/react");
5
+ const clsx_m = require("../../../../../../node_modules/clsx/dist/clsx.m.cjs");
6
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
7
+ const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
8
+ const wizardActionsClasses = require("./wizardActionsClasses.cjs");
9
+ const WizardActions_styles = require("./WizardActions.styles.cjs");
10
+ const WizardContext = require("../WizardContext/WizardContext.cjs");
11
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
12
+ const HvWizardActions = ({
13
+ classes,
14
+ handleClose,
15
+ handleSubmit,
16
+ loading = false,
17
+ skippable = false,
18
+ labels = {
19
+ cancel: "Cancel",
20
+ next: "Next",
21
+ previous: "Previous",
22
+ skip: "Skip",
23
+ submit: "Submit"
24
+ }
25
+ }) => {
26
+ const {
27
+ context,
28
+ updateContext,
29
+ tab,
30
+ setTab
31
+ } = React.useContext(WizardContext.HvWizardContext);
32
+ const [pages, setPages] = React.useState(0);
33
+ const [canSubmit, setCanSubmit] = React.useState(false);
34
+ React.useEffect(() => {
35
+ const contextEntries = Object.entries(context);
36
+ if (contextEntries.length) {
37
+ setPages(contextEntries.length);
38
+ const validWizard = Object.entries(context).every(([, value]) => value == null ? void 0 : value.valid);
39
+ if (validWizard !== canSubmit) {
40
+ setCanSubmit(validWizard);
41
+ }
42
+ }
43
+ }, [context]);
44
+ const lastPage = pages - 1;
45
+ const isLastPage = tab >= lastPage;
46
+ const handleSkip = React.useCallback(() => {
47
+ const skippedContext = Object.entries(context).map(([, child]) => ({
48
+ ...child,
49
+ valid: (child == null ? void 0 : child.valid) !== false
50
+ }));
51
+ updateContext(skippedContext);
52
+ setTab(lastPage);
53
+ }, [setTab, context, lastPage, updateContext]);
54
+ const handleSubmitInternal = React.useCallback(() => handleSubmit(context), [handleSubmit, context]);
55
+ const onCloseHander = React.useCallback((event) => {
56
+ const clearContext = Object.entries(context).map(([, child]) => ({
57
+ ...child,
58
+ touched: false
59
+ }));
60
+ updateContext(clearContext);
61
+ setTab(0);
62
+ handleClose == null ? void 0 : handleClose(event);
63
+ }, []);
64
+ return /* @__PURE__ */ jsxRuntime.jsx(react.ClassNames, {
65
+ children: ({
66
+ css
67
+ }) => {
68
+ var _a;
69
+ return /* @__PURE__ */ jsxRuntime.jsxs(uikitReactCore.HvDialogActions, {
70
+ className: clsx_m.clsx(classes == null ? void 0 : classes.actionsContainer, wizardActionsClasses.default.actionsContainer, css(WizardActions_styles.styles.actionsContainer)),
71
+ children: [/* @__PURE__ */ jsxRuntime.jsxs(uikitReactCore.HvGrid, {
72
+ children: [/* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvButton, {
73
+ variant: "secondaryGhost",
74
+ onClick: onCloseHander,
75
+ className: clsx_m.clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.default.buttonWidth, css(WizardActions_styles.styles.buttonWidth)),
76
+ children: `${labels.cancel ?? "Cancel"}`
77
+ }), skippable && /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvButton, {
78
+ variant: "secondaryGhost",
79
+ disabled: isLastPage,
80
+ className: clsx_m.clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.default.buttonWidth, css(WizardActions_styles.styles.buttonWidth)),
81
+ onClick: handleSkip,
82
+ children: `${labels.skip ?? "Skip"}`
83
+ })]
84
+ }), /* @__PURE__ */ jsxRuntime.jsxs(uikitReactCore.HvGrid, {
85
+ className: clsx_m.clsx(classes == null ? void 0 : classes.buttonsContainer, wizardActionsClasses.default.buttonsContainer, css(WizardActions_styles.styles.buttonsContainer)),
86
+ children: [/* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvButton, {
87
+ variant: "secondaryGhost",
88
+ className: clsx_m.clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.default.buttonWidth, css(WizardActions_styles.styles.buttonWidth)),
89
+ disabled: tab <= 0,
90
+ onClick: () => setTab((t) => t - 1),
91
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Backwards, {}),
92
+ children: `${labels.previous ?? "Previous"}`
93
+ }), isLastPage ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvButton, {
94
+ variant: "primary",
95
+ className: clsx_m.clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.default.buttonWidth, css(WizardActions_styles.styles.buttonWidth)),
96
+ disabled: loading || !canSubmit,
97
+ onClick: handleSubmitInternal,
98
+ children: `${labels.submit ?? "Submit"}`
99
+ }) : /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvButton, {
100
+ variant: "secondaryGhost",
101
+ className: clsx_m.clsx(classes == null ? void 0 : classes.buttonWidth, wizardActionsClasses.default.buttonWidth, css(WizardActions_styles.styles.buttonWidth), classes == null ? void 0 : classes.buttonSpacing, wizardActionsClasses.default.buttonSpacing, css(WizardActions_styles.styles.buttonSpacing)),
102
+ onClick: () => setTab((t) => t + 1),
103
+ disabled: !skippable && !((_a = context == null ? void 0 : context[tab]) == null ? void 0 : _a.valid),
104
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Forwards, {}),
105
+ children: `${labels.next ?? "Next"}`
106
+ })]
107
+ })]
108
+ });
109
+ }
110
+ });
111
+ };
112
+ exports.HvWizardActions = HvWizardActions;
113
+ //# sourceMappingURL=WizardActions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardActions.cjs","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":";;;;;;;;;;;AA6CO,MAAMA,kBAAkBA,CAAC;AAAA,EAC9BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,UAAU;AAAA,EACVC,YAAY;AAAA,EACZC,SAAS;AAAA,IACPC,QAAQ;AAAA,IACRC,MAAM;AAAA,IACNC,UAAU;AAAA,IACVC,MAAM;AAAA,IACNC,QAAQ;AAAA,EACV;AACoB,MAAM;AACpB,QAAA;AAAA,IAAEC;AAAAA,IAASC;AAAAA,IAAeC;AAAAA,IAAKC;AAAAA,EAAAA,IAAWC,MAAAA,WAAWC,cAAAA,eAAe;AAC1E,QAAM,CAACC,OAAOC,QAAQ,IAAIC,eAAS,CAAC;AACpC,QAAM,CAACC,WAAWC,YAAY,IAAIF,eAAS,KAAK;AAEhDG,QAAAA,UAAU,MAAM;AACRC,UAAAA,iBAAiBC,OAAOC,QAAQd,OAAO;AAC7C,QAAIY,eAAeG,QAAQ;AACzBR,eAASK,eAAeG,MAAM;AAE9B,YAAMC,cAAcH,OAAOC,QAAQd,OAAO,EAAEiB,MAC1C,CAAC,GAAGC,KAAK,MAAMA,+BAAOC,KAAK;AAE7B,UAAIH,gBAAgBP,WAAW;AAC7BC,qBAAaM,WAAW;AAAA,MAC1B;AAAA,IACF;A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TR,qBAAAA,QAAqBQ,aACrBb,IAAIM,qBAAAA,OAAOO,WAAW,GACtB1D,mCAASgE,eACTd,qBAAAA,QAAqBc,eACrBnB,IAAIM,qBAAAA,OAAOa,aAAa,CAAC;AAAA,YAE3BP,SAASA,MAAM3C,OAAQ+C,CAAAA,MAAMA,IAAI,CAAC;AAAA,YAClCF,UAAU,CAACvD,aAAa,GAACO,wCAAUE,SAAVF,mBAAgBmB;AAAAA,YACzCmC,SAASX,2BAAAA,IAACY,gBAAY,UAAA,EAAA;AAAA,YAAAtB,UAEpB,GAAEvC,OAAOE,QAAQ;AAAA,UAAA,CAEtB,CAAA;AAAA,QAAA,CACM,CAAA;AAAA,MAAA,CAAA;AAAA;AAAA,EAAA,CAGF;AAEjB;;"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
+ const styles = {
5
+ buttonWidth: {
6
+ width: 120,
7
+ "& span": {
8
+ whiteSpace: "normal",
9
+ lineHeight: uikitReactCore.theme.lineHeights.sm
10
+ }
11
+ },
12
+ actionsContainer: {
13
+ display: "flex",
14
+ justifyContent: "space-between"
15
+ },
16
+ buttonsContainer: {
17
+ display: "flex",
18
+ alignItems: "center",
19
+ "& > button:last-child": {
20
+ marginLeft: 20
21
+ }
22
+ },
23
+ buttonSpacing: {
24
+ paddingLeft: 28
25
+ }
26
+ };
27
+ exports.styles = styles;
28
+ //# sourceMappingURL=WizardActions.styles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardActions.styles.cjs","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,eAAAA,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
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
+ const classKeys = ["actionsContainer", "buttonsContainer", "buttonWidth", "buttonSpacing"];
5
+ const wizardActionsClasses = uikitReactCore.getClasses(classKeys, "HvWizardActions");
6
+ const wizardActionsClasses$1 = wizardActionsClasses;
7
+ exports.default = wizardActionsClasses$1;
8
+ //# sourceMappingURL=wizardActionsClasses.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizardActionsClasses.cjs","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,eAC3BF,WAAAA,WACA,iBAAiB;AAGnB,MAAA,yBAAeC;;"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const react = require("@emotion/react");
4
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
5
+ const clsx_m = require("../../../../../../node_modules/clsx/dist/clsx.m.cjs");
6
+ const wizardContainerClasses = require("./wizardContainerClasses.cjs");
7
+ const WizardContainer_styles = require("./WizardContainer.styles.cjs");
8
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
9
+ const HvWizardContainer = ({
10
+ classes,
11
+ className,
12
+ children,
13
+ handleClose,
14
+ open,
15
+ ...others
16
+ }) => {
17
+ return /* @__PURE__ */ jsxRuntime.jsx(react.ClassNames, {
18
+ children: ({
19
+ css
20
+ }) => /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvDialog, {
21
+ classes: {
22
+ closeButton: clsx_m.clsx(classes == null ? void 0 : classes.closeButton, wizardContainerClasses.default.closeButton, css(WizardContainer_styles.styles.closeButton)),
23
+ paper: clsx_m.clsx(classes == null ? void 0 : classes.paper, wizardContainerClasses.default.paper, css(WizardContainer_styles.styles.paper))
24
+ },
25
+ className: clsx_m.clsx(className, classes == null ? void 0 : classes.root, wizardContainerClasses.default.root),
26
+ open,
27
+ onClose: handleClose,
28
+ ...others,
29
+ children
30
+ })
31
+ });
32
+ };
33
+ exports.HvWizardContainer = HvWizardContainer;
34
+ //# sourceMappingURL=WizardContainer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContainer.cjs","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,wCACGC,MAAAA,YAAU;AAAA,IAAAJ,UACRA,CAAC;AAAA,MAAEK;AAAAA,IAAAA,qCACDC,eAAAA,UAAQ;AAAA,MACPR,SAAS;AAAA,QACPS,aAAaC,OAAAA,KACXV,mCAASS,aACTE,uBAAAA,QAAuBF,aACvBF,IAAIK,8BAAOH,WAAW,CAAC;AAAA,QAEzBI,OAAOH,OAAAA,KACLV,mCAASa,OACTF,uBAAAA,QAAuBE,OACvBN,IAAIK,8BAAOC,KAAK,CAAC;AAAA,MAErB;AAAA,MACAZ,WAAWS,OACTT,KAAAA,WACAD,mCAASc,MACTH,+BAAuBG,IAAI;AAAA,MAE7BV;AAAAA,MACAW,SAASZ;AAAAA,MAAY,GACjBE;AAAAA,MAAMH;AAAAA,IAAAA,CAED;AAAA,EAAA,CAGF;AAEjB;;"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
+ const styles = {
5
+ paper: {
6
+ width: "80%",
7
+ maxWidth: "80%",
8
+ maxHeight: `calc(100% - (2 * ${uikitReactCore.theme.dialog.margin}))`
9
+ },
10
+ closeButton: {
11
+ display: "none"
12
+ }
13
+ };
14
+ exports.styles = styles;
15
+ //# sourceMappingURL=WizardContainer.styles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContainer.styles.cjs","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,eAAAA,MAAMC,OAAOC;AAAAA,EAC9C;AAAA,EACAC,aAAa;AAAA,IACXC,SAAS;AAAA,EACX;AACF;;"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
+ const classKeys = ["root", "paper", "closeButton"];
5
+ const wizardContainerClasses = uikitReactCore.getClasses(classKeys, "HvWizardContainer");
6
+ const wizardContainerClasses$1 = wizardContainerClasses;
7
+ exports.default = wizardContainerClasses$1;
8
+ //# sourceMappingURL=wizardContainerClasses.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizardContainerClasses.cjs","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,eAC7BF,WAAAA,WACA,mBAAmB;AAGrB,MAAA,2BAAeC;;"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const clsx_m = require("../../../../../../node_modules/clsx/dist/clsx.m.cjs");
4
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
5
+ const LoadingContainer_styles = require("./LoadingContainer.styles.cjs");
6
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
7
+ const LoadingContainer = ({
8
+ children,
9
+ hidden,
10
+ ...others
11
+ }) => {
12
+ var _a, _b, _c;
13
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
14
+ children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
15
+ style: {
16
+ top: 0,
17
+ left: 0,
18
+ height: "100%",
19
+ width: "100%"
20
+ },
21
+ className: clsx_m.clsx((_a = LoadingContainer_styles.styles) == null ? void 0 : _a.overlay, !hidden && ((_b = LoadingContainer_styles.styles) == null ? void 0 : _b.blur)),
22
+ children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvLoading, {
23
+ classes: {
24
+ root: clsx_m.clsx((_c = LoadingContainer_styles.styles) == null ? void 0 : _c.loading)
25
+ },
26
+ hidden,
27
+ ...others
28
+ })
29
+ }), /* @__PURE__ */ jsxRuntime.jsx("div", {
30
+ style: {
31
+ display: "flow-root"
32
+ },
33
+ children
34
+ })]
35
+ });
36
+ };
37
+ exports.LoadingContainer = LoadingContainer;
38
+ //# sourceMappingURL=LoadingContainer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingContainer.cjs","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,yCACEC,WAAAA,UAAA;AAAA,IAAAH,WACEI,2BAAAA,IAAA,OAAA;AAAA,MACEC,OAAO;AAAA,QACLC,KAAK;AAAA,QACLC,MAAM;AAAA,QACNC,QAAQ;AAAA,QACRC,OAAO;AAAA,MACT;AAAA,MACAC,WAAWC,OAAKC,MAAAA,wCAAAA,mBAAQC,SAAS,CAACZ,YAAUW,wCAAAA,mBAAQE,KAAI;AAAA,MAAEd,yCAEzDe,0BAAS;AAAA,QACRC,SAAS;AAAA,UAAEC,MAAMN,OAAAA,MAAKC,6BAAAA,WAAAA,mBAAQM,OAAO;AAAA,QAAE;AAAA,QACvCjB;AAAAA,QAAe,GACXC;AAAAA,MAAAA,CAAM;AAAA,IAAA,CACV,GAEJE,2BAAAA,IAAA,OAAA;AAAA,MAAKC,OAAO;AAAA,QAAEc,SAAS;AAAA,MAAY;AAAA,MAAEnB;AAAAA,IAAAA,CAAiB,CAAA;AAAA,EAAA,CACrD;AAEP;;"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
+ const material = require("@mui/material");
5
+ const styles = {
6
+ loading: {
7
+ width: "100%",
8
+ height: "100%"
9
+ },
10
+ overlay: {
11
+ position: "absolute",
12
+ transition: "background-Color .2s ease",
13
+ zIndex: -1
14
+ },
15
+ blur: {
16
+ backgroundColor: material.alpha(uikitReactCore.hexToRgbA(uikitReactCore.theme.colors.atmo2), 0.8),
17
+ zIndex: uikitReactCore.theme.zIndices.modal
18
+ }
19
+ };
20
+ exports.styles = styles;
21
+ //# sourceMappingURL=LoadingContainer.styles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingContainer.styles.cjs","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,SAAMC,MAAAA,yBAAUC,eAAAA,MAAMC,OAAOC,KAAK,GAAG,GAAG;AAAA,IACzDP,QAAQK,eAAAA,MAAMG,SAASC;AAAAA,EACzB;AACF;;"}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const react = require("@emotion/react");
4
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
5
+ const clsx_m = require("../../../../../../node_modules/clsx/dist/clsx.m.cjs");
6
+ const wizardContentClasses = require("./wizardContentClasses.cjs");
7
+ const usehooksTs = require("usehooks-ts");
8
+ const WizardContent_styles = require("./WizardContent.styles.cjs");
9
+ const React = require("react");
10
+ const WizardContext = require("../WizardContext/WizardContext.cjs");
11
+ const LoadingContainer = require("./LoadingContainer.cjs");
12
+ const jsxRuntime = require("@emotion/react/jsx-runtime");
13
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
14
+ const React__default = /* @__PURE__ */ _interopDefault(React);
15
+ const DRAWER_PERCENTAGE = 0.3;
16
+ const DRAWER_MIN_WIDTH = 280;
17
+ const HvWizardContent = ({
18
+ classes,
19
+ fixedHeight = false,
20
+ loading = false,
21
+ children,
22
+ summaryContent
23
+ }) => {
24
+ const {
25
+ context,
26
+ updateContext,
27
+ summary,
28
+ tab
29
+ } = React.useContext(WizardContext.HvWizardContext);
30
+ const arrayChildren = React__default.default.Children.toArray(children);
31
+ const initialContext = arrayChildren.reduce((acc, child, index) => {
32
+ const invalid = "mustValidate" in child.props && child.props.mustValidate === true ? false : null;
33
+ const valid = invalid ?? (index === 0 || null);
34
+ return {
35
+ ...acc,
36
+ [index]: {
37
+ ...child.props,
38
+ form: {},
39
+ valid,
40
+ touched: index === 0
41
+ }
42
+ };
43
+ }, {});
44
+ const summaryRef = React.useRef();
45
+ const resizedRef = React.useRef({
46
+ height: 0,
47
+ width: 0
48
+ });
49
+ const [containerRef, sizes] = usehooksTs.useElementSize();
50
+ const [summaryHeight, setSummaryHeight] = React.useState(0);
51
+ const [summaryWidth, setSummaryWidth] = React.useState(0);
52
+ const [summaryLeft, setSummaryLeft] = React.useState(0);
53
+ const updateSummaryMeasures = React.useCallback((newSizes) => {
54
+ const modalWidth = newSizes.width;
55
+ const drawerWidth = modalWidth * DRAWER_PERCENTAGE;
56
+ setSummaryHeight(newSizes.height);
57
+ setSummaryWidth(Math.max(drawerWidth, DRAWER_MIN_WIDTH));
58
+ setSummaryLeft(modalWidth - Math.max(drawerWidth, DRAWER_MIN_WIDTH));
59
+ resizedRef.current = {
60
+ height: newSizes.height,
61
+ width: newSizes.width
62
+ };
63
+ }, []);
64
+ React.useEffect(() => {
65
+ var _a, _b, _c;
66
+ const pageHeight = (_c = (_b = (_a = summaryRef.current) == null ? void 0 : _a.getBoundingClientRect) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.height;
67
+ if (summary && sizes.height !== resizedRef.current.height || sizes.width !== resizedRef.current.width) {
68
+ updateSummaryMeasures(sizes);
69
+ }
70
+ if (pageHeight && sizes.height !== pageHeight) {
71
+ updateSummaryMeasures({
72
+ width: sizes.width,
73
+ height: pageHeight
74
+ });
75
+ }
76
+ }, [tab, sizes, summary, updateSummaryMeasures]);
77
+ React.useEffect(() => {
78
+ updateContext(initialContext);
79
+ }, []);
80
+ React.useEffect(() => {
81
+ var _a;
82
+ if (tab && !((_a = context[tab]) == null ? void 0 : _a.touched)) {
83
+ const updatedContext = Object.entries(context).reduce((acc, [key, childState]) => ({
84
+ ...acc,
85
+ ...+key <= tab ? {
86
+ [key]: {
87
+ ...childState,
88
+ touched: true,
89
+ valid: (childState == null ? void 0 : childState.valid) ?? true
90
+ }
91
+ } : {
92
+ [key]: childState
93
+ }
94
+ }), {});
95
+ updateContext(updatedContext);
96
+ }
97
+ }, [tab]);
98
+ const translateX = summaryWidth ? summaryWidth + 10 : 450;
99
+ return /* @__PURE__ */ jsxRuntime.jsx(react.ClassNames, {
100
+ children: ({
101
+ css
102
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
103
+ className: clsx_m.clsx(classes == null ? void 0 : classes.summaryRef, wizardContentClasses.default.summaryRef, css(WizardContent_styles.styles.summaryRef)),
104
+ ref: (el) => {
105
+ containerRef(el);
106
+ if (el) {
107
+ summaryRef.current = el;
108
+ }
109
+ },
110
+ children: [summary !== null && /* @__PURE__ */ jsxRuntime.jsx("div", {
111
+ className: clsx_m.clsx(classes == null ? void 0 : classes.summarySticky, wizardContentClasses.default.summarySticky, css(WizardContent_styles.styles.summarySticky)),
112
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", {
113
+ className: clsx_m.clsx(classes == null ? void 0 : classes.summaryContainer, wizardContentClasses.default.summaryContainer, css(WizardContent_styles.styles.summaryContainer)),
114
+ style: {
115
+ left: summaryLeft,
116
+ width: summaryWidth,
117
+ height: summaryHeight,
118
+ transform: `translate(${summary ? 0 : translateX}px, 0)`
119
+ },
120
+ children: summaryContent
121
+ })
122
+ }), /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvDialogContent, {
123
+ className: clsx_m.clsx(classes == null ? void 0 : classes.contentContainer, wizardContentClasses.default.contentContainer, css(WizardContent_styles.styles.contentContainer), fixedHeight && clsx_m.clsx(classes == null ? void 0 : classes.fixedHeight, wizardContentClasses.default.fixedHeight, css(WizardContent_styles.styles.fixedHeight))),
124
+ indentContent: true,
125
+ children: /* @__PURE__ */ jsxRuntime.jsx(LoadingContainer.LoadingContainer, {
126
+ hidden: !loading,
127
+ children: React__default.default.Children.map(arrayChildren, (child, index) => {
128
+ if (index === tab) {
129
+ return React__default.default.cloneElement(child, {
130
+ tab
131
+ });
132
+ }
133
+ return null;
134
+ })
135
+ })
136
+ })]
137
+ })
138
+ });
139
+ };
140
+ exports.HvWizardContent = HvWizardContent;
141
+ //# sourceMappingURL=WizardContent.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContent.cjs","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,MAAAA,WAAWC,cAAAA,eAAe;AAE3E,QAAMC,gBAAgBC,eAAAA,QAAMC,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,MAAAA;AACnB,QAAMC,aAAaD,MAAAA,OAAO;AAAA,IAAEE,QAAQ;AAAA,IAAGC,OAAO;AAAA,EAAA,CAAG;AACjD,QAAM,CAACC,cAAcC,KAAK,IAAIC,WAAgB,eAAA;AAE9C,QAAM,CAACC,eAA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D,mCAASyE,kBACTX,6BAAqBW,kBACrBd,IAAII,4BAAOU,gBAAgB,GAC3BxE,eACE4D,YACE7D,mCAASC,aACT6D,qBAAqB7D,QAAAA,aACrB0D,IAAII,qBAAAA,OAAO9D,WAAW,CAAC,CACxB;AAAA,QAELyE,eAAa;AAAA,QAAAvE,yCAEZwE,mCAAgB;AAAA,UAACC,QAAQ,CAAC1E;AAAAA,UAAQC,UAChCS,eAAMC,QAAAA,SAASgE,IAAIlE,eAAe,CAACO,OAAOC,UAAU;AACnD,gBAAIA,UAAUX,KAAK;AACVI,qBAAAA,eAAAA,QAAMkE,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
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
+ const styles = {
5
+ contentContainer: {
6
+ position: "relative",
7
+ padding: 20,
8
+ marginLeft: 0,
9
+ minHeight: 400,
10
+ overflowX: "hidden"
11
+ },
12
+ fixedHeight: {
13
+ minHeight: "calc(100vh - 387px)"
14
+ },
15
+ summaryRef: {
16
+ flex: 1,
17
+ overflowY: "auto",
18
+ overflowX: "hidden"
19
+ },
20
+ summarySticky: {
21
+ position: "sticky",
22
+ top: 0,
23
+ zIndex: 1
24
+ },
25
+ summaryContainer: {
26
+ position: "absolute",
27
+ top: 0,
28
+ minWidth: 280,
29
+ boxShadow: uikitReactCore.theme.colors.shadow,
30
+ backgroundColor: uikitReactCore.theme.colors.atmo1,
31
+ transition: "transform 0.3s",
32
+ transitionTimingFunction: "ease-in-out",
33
+ overflowY: "scroll"
34
+ }
35
+ };
36
+ exports.styles = styles;
37
+ //# sourceMappingURL=WizardContent.styles.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContent.styles.cjs","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,eAAAA,MAAMC,OAAOC;AAAAA,IACxBC,iBAAiBH,eAAAA,MAAMC,OAAOG;AAAAA,IAC9BC,YAAY;AAAA,IACZC,0BAA0B;AAAA,IAC1Bb,WAAW;AAAA,EACb;AACF;;"}