@activecollab/components 1.0.173 → 1.0.175

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 (39) hide show
  1. package/dist/cjs/components/Typography/Typography.js +1 -1
  2. package/dist/cjs/components/Typography/Typography.js.map +1 -1
  3. package/dist/cjs/components/Wizard/Step.js +68 -0
  4. package/dist/cjs/components/Wizard/Step.js.map +1 -0
  5. package/dist/cjs/components/Wizard/StepActionButton.js +32 -0
  6. package/dist/cjs/components/Wizard/StepActionButton.js.map +1 -0
  7. package/dist/cjs/components/Wizard/Styles.js +39 -0
  8. package/dist/cjs/components/Wizard/Styles.js.map +1 -0
  9. package/dist/cjs/components/Wizard/Wizard.js +94 -0
  10. package/dist/cjs/components/Wizard/Wizard.js.map +1 -0
  11. package/dist/cjs/components/Wizard/WizardContext.js +23 -0
  12. package/dist/cjs/components/Wizard/WizardContext.js.map +1 -0
  13. package/dist/esm/components/Typography/Typography.js +1 -1
  14. package/dist/esm/components/Typography/Typography.js.map +1 -1
  15. package/dist/esm/components/Wizard/Step.d.ts +16 -0
  16. package/dist/esm/components/Wizard/Step.d.ts.map +1 -0
  17. package/dist/esm/components/Wizard/Step.js +46 -0
  18. package/dist/esm/components/Wizard/Step.js.map +1 -0
  19. package/dist/esm/components/Wizard/StepActionButton.d.ts +10 -0
  20. package/dist/esm/components/Wizard/StepActionButton.d.ts.map +1 -0
  21. package/dist/esm/components/Wizard/StepActionButton.js +18 -0
  22. package/dist/esm/components/Wizard/StepActionButton.js.map +1 -0
  23. package/dist/esm/components/Wizard/Styles.d.ts +5 -0
  24. package/dist/esm/components/Wizard/Styles.d.ts.map +1 -0
  25. package/dist/esm/components/Wizard/Styles.js +18 -0
  26. package/dist/esm/components/Wizard/Styles.js.map +1 -0
  27. package/dist/esm/components/Wizard/Wizard.d.ts +9 -0
  28. package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -0
  29. package/dist/esm/components/Wizard/Wizard.js +62 -0
  30. package/dist/esm/components/Wizard/Wizard.js.map +1 -0
  31. package/dist/esm/components/Wizard/WizardContext.d.ts +13 -0
  32. package/dist/esm/components/Wizard/WizardContext.d.ts.map +1 -0
  33. package/dist/esm/components/Wizard/WizardContext.js +9 -0
  34. package/dist/esm/components/Wizard/WizardContext.js.map +1 -0
  35. package/dist/index.js +1 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.min.js +1 -1
  38. package/dist/index.min.js.map +1 -1
  39. package/package.json +1 -1
@@ -38,7 +38,7 @@ var Typography = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
38
38
  _ref$tabularNums = _ref.tabularNums,
39
39
  tabularNums = _ref$tabularNums === void 0 ? false : _ref$tabularNums,
40
40
  _ref$letterSpacing = _ref.letterSpacing,
41
- letterSpacing = _ref$letterSpacing === void 0 ? "regular" : _ref$letterSpacing,
41
+ letterSpacing = _ref$letterSpacing === void 0 ? "tight" : _ref$letterSpacing,
42
42
  _ref$lineHeight = _ref.lineHeight,
43
43
  lineHeight = _ref$lineHeight === void 0 ? "regular" : _ref$lineHeight,
44
44
  _ref$align = _ref.align,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/Typography/Typography.tsx"],"names":["Typography","ref","variant","as","color","italic","tabularNums","letterSpacing","lineHeight","align","decoration","transform","overflow","whitespace","wordBreak","weight","className","children","props","Component","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;AAuEO,IAAMA,UAA0D,gBACrE,uBACE,gBAoBEC,GApBF,EAqBK;AAAA,0BAnBDC,OAmBC;AAAA,MAnBDA,OAmBC,6BAnBS,SAmBT;AAAA,MAlBDC,EAkBC,QAlBDA,EAkBC;AAAA,wBAjBDC,KAiBC;AAAA,MAjBDA,KAiBC,2BAjBO,SAiBP;AAAA,yBAhBDC,MAgBC;AAAA,MAhBDA,MAgBC,4BAhBQ,KAgBR;AAAA,8BAfDC,WAeC;AAAA,MAfDA,WAeC,iCAfa,KA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WAAX,GAAyB,YAAzB","sourcesContent":["import React, { HTMLAttributes, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { StyledTypography } from \"./Styles\";\nimport {\n PolymorphicComponentPropsWithRef,\n PolymorphicRef,\n} from \"../../utils/types\";\nexport interface ITypographyProps extends HTMLAttributes<HTMLElement> {\n /** Font color. */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"quaternary\"\n | \"theme-primary\"\n | \"theme-secondary\"\n | \"only-white\"\n | \"only-black\"\n | \"page-paper\"\n | \"success\"\n | \"alert\"\n | \"warning\";\n /** Tabular numbers. */\n tabularNums?: boolean;\n /** Italic font style. */\n italic?: boolean;\n /** Font letter spacing. */\n letterSpacing?: \"tight\" | \"regular\" | \"wide\";\n /** Font line height. */\n lineHeight?: \"tight\" | \"regular\" | \"loose\";\n /** Font align. */\n align?: \"left\" | \"center\" | \"right\" | \"justify\";\n /** Underline font style. */\n decoration?: \"underline\" | \"line-through\" | \"none\";\n /** Font transform. */\n transform?: \"uppercase\" | \"lowercase\" | \"capitalize\" | \"regular\";\n /** Font overflow. */\n overflow?: \"truncate\" | \"ellipsis\" | \"visible\";\n /** Font whitespace. */\n whitespace?:\n | \"regular\"\n | \"no-wrap\"\n | \"pre\"\n | \"pre-wrap\"\n | \"pre-line\"\n | \"break-spaces\";\n /** Font word break. */\n wordBreak?: \"regular\" | \"smart\" | \"all\";\n /** Custom className for styling. */\n className?: string;\n /** Element variant. */\n variant?:\n | \"Title 1\"\n | \"Title 2\"\n | \"Header 2\"\n | \"Header 3\"\n | \"Body 1\"\n | \"Body 2\"\n | \"Caption 1\"\n | \"Caption 2\";\n /** Font weight. */\n weight?: \"light\" | \"regular\" | \"medium\" | \"bold\";\n /** Font size. */\n size?: \"32\" | \"18\" | \"16\" | \"14\" | \"12\" | \"10\";\n}\n\nexport type TypographyProps<C extends React.ElementType> =\n PolymorphicComponentPropsWithRef<C, ITypographyProps>;\n\nexport type TypographyComponent = <C extends React.ElementType = \"div\">(\n props: TypographyProps<C>\n) => React.ReactElement | null;\n\nexport const Typography: TypographyComponent & { displayName?: string } =\n forwardRef(\n <C extends React.ElementType = \"div\">(\n {\n variant = \"Title 1\",\n as,\n color = \"primary\",\n italic = false,\n tabularNums = false,\n letterSpacing = \"regular\",\n lineHeight = \"regular\",\n align = \"left\",\n decoration = \"none\",\n transform = \"regular\",\n overflow = \"visible\",\n whitespace = \"regular\",\n wordBreak = \"regular\",\n weight = \"regular\",\n className,\n children,\n ...props\n }: TypographyProps<C>,\n ref?: PolymorphicRef<C>\n ) => {\n const Component = as || \"div\";\n return (\n <StyledTypography\n as={Component}\n className={classNames(\"typography\", className)}\n $italic={italic}\n $tabularNums={tabularNums}\n $letterSpacing={letterSpacing}\n $lineHeight={lineHeight}\n $align={align}\n $decoration={decoration}\n $transform={transform}\n $overflow={overflow}\n $whitespace={whitespace}\n $wordBreak={wordBreak}\n $variant={variant}\n $color={color}\n $weight={weight}\n ref={ref}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n }\n );\n\nTypography.displayName = \"Typography\";\n"],"file":"Typography.js"}
1
+ {"version":3,"sources":["../../../../src/components/Typography/Typography.tsx"],"names":["Typography","ref","variant","as","color","italic","tabularNums","letterSpacing","lineHeight","align","decoration","transform","overflow","whitespace","wordBreak","weight","className","children","props","Component","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;AAuEO,IAAMA,UAA0D,gBACrE,uBACE,gBAoBEC,GApBF,EAqBK;AAAA,0BAnBDC,OAmBC;AAAA,MAnBDA,OAmBC,6BAnBS,SAmBT;AAAA,MAlBDC,EAkBC,QAlBDA,EAkBC;AAAA,wBAjBDC,KAiBC;AAAA,MAjBDA,KAiBC,2BAjBO,SAiBP;AAAA,yBAhBDC,MAgBC;AAAA,MAhBDA,MAgBC,4BAhBQ,KAgBR;AAAA,8BAfDC,WAeC;AAAA,MAfDA,WAeC,iCAfa,KAeb;AAAA,gCAdDC,aAcC;AAA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":["import React, { HTMLAttributes, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { StyledTypography } from \"./Styles\";\nimport {\n PolymorphicComponentPropsWithRef,\n PolymorphicRef,\n} from \"../../utils/types\";\nexport interface ITypographyProps extends HTMLAttributes<HTMLElement> {\n /** Font color. */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"quaternary\"\n | \"theme-primary\"\n | \"theme-secondary\"\n | \"only-white\"\n | \"only-black\"\n | \"page-paper\"\n | \"success\"\n | \"alert\"\n | \"warning\";\n /** Tabular numbers. */\n tabularNums?: boolean;\n /** Italic font style. */\n italic?: boolean;\n /** Font letter spacing. */\n letterSpacing?: \"tight\" | \"regular\" | \"wide\";\n /** Font line height. */\n lineHeight?: \"tight\" | \"regular\" | \"loose\";\n /** Font align. */\n align?: \"left\" | \"center\" | \"right\" | \"justify\";\n /** Underline font style. */\n decoration?: \"underline\" | \"line-through\" | \"none\";\n /** Font transform. */\n transform?: \"uppercase\" | \"lowercase\" | \"capitalize\" | \"regular\";\n /** Font overflow. */\n overflow?: \"truncate\" | \"ellipsis\" | \"visible\";\n /** Font whitespace. */\n whitespace?:\n | \"regular\"\n | \"no-wrap\"\n | \"pre\"\n | \"pre-wrap\"\n | \"pre-line\"\n | \"break-spaces\";\n /** Font word break. */\n wordBreak?: \"regular\" | \"smart\" | \"all\";\n /** Custom className for styling. */\n className?: string;\n /** Element variant. */\n variant?:\n | \"Title 1\"\n | \"Title 2\"\n | \"Header 2\"\n | \"Header 3\"\n | \"Body 1\"\n | \"Body 2\"\n | \"Caption 1\"\n | \"Caption 2\";\n /** Font weight. */\n weight?: \"light\" | \"regular\" | \"medium\" | \"bold\";\n /** Font size. */\n size?: \"32\" | \"18\" | \"16\" | \"14\" | \"12\" | \"10\";\n}\n\nexport type TypographyProps<C extends React.ElementType> =\n PolymorphicComponentPropsWithRef<C, ITypographyProps>;\n\nexport type TypographyComponent = <C extends React.ElementType = \"div\">(\n props: TypographyProps<C>\n) => React.ReactElement | null;\n\nexport const Typography: TypographyComponent & { displayName?: string } =\n forwardRef(\n <C extends React.ElementType = \"div\">(\n {\n variant = \"Title 1\",\n as,\n color = \"primary\",\n italic = false,\n tabularNums = false,\n letterSpacing = \"tight\",\n lineHeight = \"regular\",\n align = \"left\",\n decoration = \"none\",\n transform = \"regular\",\n overflow = \"visible\",\n whitespace = \"regular\",\n wordBreak = \"regular\",\n weight = \"regular\",\n className,\n children,\n ...props\n }: TypographyProps<C>,\n ref?: PolymorphicRef<C>\n ) => {\n const Component = as || \"div\";\n return (\n <StyledTypography\n as={Component}\n className={classNames(\"typography\", className)}\n $italic={italic}\n $tabularNums={tabularNums}\n $letterSpacing={letterSpacing}\n $lineHeight={lineHeight}\n $align={align}\n $decoration={decoration}\n $transform={transform}\n $overflow={overflow}\n $whitespace={whitespace}\n $wordBreak={wordBreak}\n $variant={variant}\n $color={color}\n $weight={weight}\n ref={ref}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n }\n );\n\nTypography.displayName = \"Typography\";\n"],"file":"Typography.js"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Step = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _Button = require("../Button");
13
+
14
+ var _Icons = require("../Icons");
15
+
16
+ var _StepActionButton = require("./StepActionButton");
17
+
18
+ var _Dialog = require("../Dialog");
19
+
20
+ var _Typography = require("../Typography");
21
+
22
+ var _Styles = require("./Styles");
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ var Step = function Step(_ref) {
29
+ var index = _ref.index,
30
+ isLast = _ref.isLast,
31
+ subtitle = _ref.subtitle,
32
+ title = _ref.title,
33
+ onNextButtonClick = _ref.onNextButtonClick,
34
+ onPreviousButtonClick = _ref.onPreviousButtonClick,
35
+ onClose = _ref.onClose,
36
+ children = _ref.children,
37
+ _ref$actionLabel = _ref.actionLabel,
38
+ actionLabel = _ref$actionLabel === void 0 ? "Proceed" : _ref$actionLabel,
39
+ _ref$shouldRenderNext = _ref.shouldRenderNextButton,
40
+ shouldRenderNextButton = _ref$shouldRenderNext === void 0 ? true : _ref$shouldRenderNext,
41
+ _ref$changingStepInPr = _ref.changingStepInProgress,
42
+ changingStepInProgress = _ref$changingStepInPr === void 0 ? false : _ref$changingStepInPr;
43
+ var onActionButtonClick = (0, _react.useCallback)(function () {
44
+ if (isLast && onClose) {
45
+ return onClose();
46
+ }
47
+
48
+ return onNextButtonClick && onNextButtonClick();
49
+ }, [isLast, onClose, onNextButtonClick]);
50
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Styles.StyledStepHeader, null, /*#__PURE__*/_react.default.createElement(_Styles.StyledStepHeaderLeft, null, index && index > 0 ? /*#__PURE__*/_react.default.createElement(_Button.Button, {
51
+ onClick: onPreviousButtonClick,
52
+ variant: "text gray",
53
+ className: "tw--ml-3 tw-mr-2",
54
+ disabled: changingStepInProgress
55
+ }, /*#__PURE__*/_react.default.createElement(_Icons.ArrowBackMobileIcon, null)) : null, /*#__PURE__*/_react.default.createElement(_Styles.StyledStepTitle, null, /*#__PURE__*/_react.default.createElement(_Typography.Caption2, null, title), /*#__PURE__*/_react.default.createElement(_Typography.Header3, null, subtitle))), /*#__PURE__*/_react.default.createElement(_Button.Button, {
56
+ onClick: onClose,
57
+ variant: "text gray",
58
+ disabled: changingStepInProgress
59
+ }, /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null))), /*#__PURE__*/_react.default.createElement(_Dialog.DialogContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.DialogContent, null, children), /*#__PURE__*/_react.default.createElement(_Dialog.DialogContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.DialogActions, null, /*#__PURE__*/_react.default.createElement(_StepActionButton.StepActionButton, {
60
+ isLast: isLast,
61
+ actionLabel: actionLabel,
62
+ onNextButtonClick: onActionButtonClick
63
+ }))) : /*#__PURE__*/_react.default.createElement(_Styles.StyledCustomStep, null, children));
64
+ };
65
+
66
+ exports.Step = Step;
67
+ Step.displayName = "Step";
68
+ //# sourceMappingURL=Step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/Step.tsx"],"names":["Step","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","actionLabel","shouldRenderNextButton","changingStepInProgress","onActionButtonClick","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;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A0BE,6BAAC,4BAAD,OA1BF,EA2BGD,sBAAsB,gBACrB,yEACE,6BAAC,qBAAD,QAAgBF,QAAhB,CADF,eAEE,6BAAC,4BAAD,OAFF,eAGE,6BAAC,qBAAD,qBACE,6BAAC,kCAAD;AACE,IAAA,MAAM,EAAEN,MADV;AAEE,IAAA,WAAW,EAAEO,WAFf;AAGE,IAAA,iBAAiB,EAAEG;AAHrB,IADF,CAHF,CADqB,gBAarB,6BAAC,wBAAD,QAAmBJ,QAAnB,CAxCJ,CADF;AA6CD,CAlEM;;;AAoEPR,IAAI,CAACa,WAAL,GAAmB,MAAnB","sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\nimport { Button } from \"../Button\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { StepActionButton } from \"./StepActionButton\";\nimport { DialogActions, DialogContent, DialogContentDivider } from \"../Dialog\";\nimport { Caption2, Header3 } from \"../Typography\";\nimport {\n StyledStepTitle,\n StyledStepHeaderLeft,\n StyledStepHeader,\n StyledCustomStep,\n} from \"./Styles\";\n\nexport interface IStep {\n index?: number;\n isLast?: boolean;\n subtitle: string;\n title?: string;\n onNextButtonClick?: () => void;\n onPreviousButtonClick?: () => void;\n onClose?: () => void;\n children: ReactNode;\n actionLabel?: string;\n shouldRenderNextButton?: boolean;\n changingStepInProgress?: boolean;\n}\n\nexport const Step: FC<IStep> = ({\n index,\n isLast,\n subtitle,\n title,\n onNextButtonClick,\n onPreviousButtonClick,\n onClose,\n children,\n actionLabel = \"Proceed\",\n shouldRenderNextButton = true,\n changingStepInProgress = false,\n}) => {\n const onActionButtonClick = useCallback(() => {\n if (isLast && onClose) {\n return onClose();\n }\n\n return onNextButtonClick && onNextButtonClick();\n }, [isLast, onClose, onNextButtonClick]);\n\n return (\n <>\n <StyledStepHeader>\n <StyledStepHeaderLeft>\n {index && index > 0 ? (\n <Button\n onClick={onPreviousButtonClick}\n variant=\"text gray\"\n className=\"tw--ml-3 tw-mr-2\"\n disabled={changingStepInProgress}\n >\n <ArrowBackMobileIcon />\n </Button>\n ) : null}\n <StyledStepTitle>\n <Caption2>{title}</Caption2>\n <Header3>{subtitle}</Header3>\n </StyledStepTitle>\n </StyledStepHeaderLeft>\n <Button\n onClick={onClose}\n variant=\"text gray\"\n disabled={changingStepInProgress}\n >\n <CancelCrossIcon />\n </Button>\n </StyledStepHeader>\n <DialogContentDivider />\n {shouldRenderNextButton ? (\n <>\n <DialogContent>{children}</DialogContent>\n <DialogContentDivider />\n <DialogActions>\n <StepActionButton\n isLast={isLast}\n actionLabel={actionLabel}\n onNextButtonClick={onActionButtonClick}\n />\n </DialogActions>\n </>\n ) : (\n <StyledCustomStep>{children}</StyledCustomStep>\n )}\n </>\n );\n};\n\nStep.displayName = \"Step\";\n"],"file":"Step.js"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StepActionButton = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _Button = require("../Button");
11
+
12
+ var _Icons = require("../Icons");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ var StepActionButton = function StepActionButton(_ref) {
17
+ var onNextButtonClick = _ref.onNextButtonClick,
18
+ _ref$actionLabel = _ref.actionLabel,
19
+ actionLabel = _ref$actionLabel === void 0 ? "Proceed" : _ref$actionLabel,
20
+ isLast = _ref.isLast,
21
+ disabled = _ref.disabled,
22
+ className = _ref.className;
23
+ return /*#__PURE__*/_react.default.createElement(_Button.Button, {
24
+ className: className,
25
+ onClick: onNextButtonClick,
26
+ disabled: disabled
27
+ }, actionLabel, !isLast ? /*#__PURE__*/_react.default.createElement(_Icons.ArrowRightIcon, null) : null);
28
+ };
29
+
30
+ exports.StepActionButton = StepActionButton;
31
+ StepActionButton.displayName = "StepActionButton";
32
+ //# sourceMappingURL=StepActionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/StepActionButton.tsx"],"names":["StepActionButton","onNextButtonClick","actionLabel","isLast","disabled","className","displayName"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAUO,IAAMA,gBAAuC,GAAG,SAA1CA,gBAA0C,OAMjD;AAAA,MALJC,iBAKI,QALJA,iBAKI;AAAA,8BAJJC,WAII;AAAA,MAJJA,WAII,iCAJU,SAIV;AAAA,MAHJC,MAGI,QAHJA,MAGI;AAAA,MAFJC,QAEI,QAFJA,QAEI;AAAA,MADJC,SACI,QADJA,SACI;AACJ,sBACE,6BAAC,cAAD;AACE,IAAA,SAAS,EAAEA,SADb;AAEE,IAAA,OAAO,EAAEJ,iBAFX;AAGE,IAAA,QAAQ,EAAEG;AAHZ,KAKGF,WALH,EAMG,CAACC,MAAD,gBAAU,6BAAC,qBAAD,OAAV,GAA+B,IANlC,CADF;AAUD,CAjBM;;;AAmBPH,gBAAgB,CAACM,WAAjB,GAA+B,kBAA/B","sourcesContent":["import React, { FC } from \"react\";\nimport { Button } from \"../Button\";\nimport { ArrowRightIcon } from \"../Icons\";\n\nexport interface IStepActionButton {\n isLast?: boolean;\n onNextButtonClick?: () => void;\n actionLabel?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport const StepActionButton: FC<IStepActionButton> = ({\n onNextButtonClick,\n actionLabel = \"Proceed\",\n isLast,\n disabled,\n className,\n}) => {\n return (\n <Button\n className={className}\n onClick={onNextButtonClick}\n disabled={disabled}\n >\n {actionLabel}\n {!isLast ? <ArrowRightIcon /> : null}\n </Button>\n );\n};\n\nStepActionButton.displayName = \"StepActionButton\";\n"],"file":"StepActionButton.js"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledStepTitle = exports.StyledStepHeaderLeft = exports.StyledStepHeader = exports.StyledCustomStep = void 0;
7
+
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ var StyledStepHeader = _styledComponents.default.div.withConfig({
13
+ displayName: "Styles__StyledStepHeader",
14
+ componentId: "sc-88drbd-0"
15
+ })(["display:flex;padding:12px 12px 12px 32px;justify-content:space-between;"]);
16
+
17
+ exports.StyledStepHeader = StyledStepHeader;
18
+
19
+ var StyledStepTitle = _styledComponents.default.div.withConfig({
20
+ displayName: "Styles__StyledStepTitle",
21
+ componentId: "sc-88drbd-1"
22
+ })(["display:flex;flex-direction:column;"]);
23
+
24
+ exports.StyledStepTitle = StyledStepTitle;
25
+
26
+ var StyledStepHeaderLeft = _styledComponents.default.div.withConfig({
27
+ displayName: "Styles__StyledStepHeaderLeft",
28
+ componentId: "sc-88drbd-2"
29
+ })(["display:flex;"]);
30
+
31
+ exports.StyledStepHeaderLeft = StyledStepHeaderLeft;
32
+
33
+ var StyledCustomStep = _styledComponents.default.div.withConfig({
34
+ displayName: "Styles__StyledCustomStep",
35
+ componentId: "sc-88drbd-3"
36
+ })(["overflow-y:auto;"]);
37
+
38
+ exports.StyledCustomStep = StyledCustomStep;
39
+ //# sourceMappingURL=Styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/Styles.ts"],"names":["StyledStepHeader","styled","div","StyledStepTitle","StyledStepHeaderLeft","StyledCustomStep"],"mappings":";;;;;;;AAAA;;;;AAEO,IAAMA,gBAAgB,GAAGC,0BAAOC,GAAV;AAAA;AAAA;AAAA,+EAAtB;;;;AAMA,IAAMC,eAAe,GAAGF,0BAAOC,GAAV;AAAA;AAAA;AAAA,2CAArB;;;;AAKA,IAAME,oBAAoB,GAAGH,0BAAOC,GAAV;AAAA;AAAA;AAAA,qBAA1B;;;;AAIA,IAAMG,gBAAgB,GAAGJ,0BAAOC,GAAV;AAAA;AAAA;AAAA,wBAAtB","sourcesContent":["import styled from \"styled-components\";\n\nexport const StyledStepHeader = styled.div`\n display: flex;\n padding: 12px 12px 12px 32px;\n justify-content: space-between;\n`;\n\nexport const StyledStepTitle = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledStepHeaderLeft = styled.div`\n display: flex;\n`;\n\nexport const StyledCustomStep = styled.div`\n overflow-y: auto;\n`;\n"],"file":"Styles.js"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Wizard = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _Dialog = require("../Dialog");
13
+
14
+ var _Step = require("./Step");
15
+
16
+ var _WizardContext = require("./WizardContext");
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
+
24
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
25
+
26
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
27
+
28
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
29
+
30
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
31
+
32
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
+
34
+ var Wizard = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
35
+ var title = _ref.title,
36
+ open = _ref.open,
37
+ onClose = _ref.onClose,
38
+ children = _ref.children;
39
+ var childrenCollection = (0, _react.useMemo)(function () {
40
+ return _react.default.Children.toArray(children);
41
+ }, [children]);
42
+
43
+ var _useState = (0, _react.useState)(0),
44
+ _useState2 = _slicedToArray(_useState, 2),
45
+ activeStep = _useState2[0],
46
+ setActiveStep = _useState2[1];
47
+
48
+ var _useState3 = (0, _react.useState)(false),
49
+ _useState4 = _slicedToArray(_useState3, 2),
50
+ changingStepInProgress = _useState4[0],
51
+ setChangingStepInProgress = _useState4[1];
52
+
53
+ var onNextButtonClick = (0, _react.useCallback)(function () {
54
+ setActiveStep(activeStep + 1);
55
+ }, [activeStep]);
56
+ var onPreviousButtonClick = (0, _react.useCallback)(function () {
57
+ setActiveStep(activeStep - 1);
58
+ }, [activeStep]);
59
+ var onCloseCallback = (0, _react.useCallback)(function () {
60
+ setActiveStep(0);
61
+ onClose();
62
+ }, [onClose]);
63
+ var renderActiveStep = (0, _react.useMemo)(function () {
64
+ var element = childrenCollection[activeStep];
65
+
66
+ if ((element === null || element === void 0 ? void 0 : element.type) === _Step.Step) {
67
+ return /*#__PURE__*/_react.default.cloneElement(element, {
68
+ index: activeStep,
69
+ isLast: childrenCollection.length - 1 === activeStep,
70
+ title: title,
71
+ onNextButtonClick: onNextButtonClick,
72
+ onPreviousButtonClick: onPreviousButtonClick,
73
+ onClose: onCloseCallback,
74
+ changingStepInProgress: changingStepInProgress
75
+ });
76
+ }
77
+
78
+ return null;
79
+ }, [activeStep, changingStepInProgress, childrenCollection, onCloseCallback, onNextButtonClick, onPreviousButtonClick, title]);
80
+ return /*#__PURE__*/_react.default.createElement(_WizardContext.WizardContextProvider, {
81
+ value: {
82
+ activeStep: activeStep,
83
+ setActiveStep: setActiveStep,
84
+ close: onCloseCallback,
85
+ setChangingStepInProgress: setChangingStepInProgress
86
+ }
87
+ }, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
88
+ ref: ref,
89
+ open: open
90
+ }, renderActiveStep));
91
+ });
92
+ exports.Wizard = Wizard;
93
+ Wizard.displayName = "Wizard";
94
+ //# sourceMappingURL=Wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/Wizard.tsx"],"names":["Wizard","ref","title","open","onClose","children","childrenCollection","React","Children","toArray","activeStep","setActiveStep","changingStepInProgress","setChangingStepInProgress","onNextButtonClick","onPreviousButtonClick","onCloseCallback","renderActiveStep","element","type","Step","cloneElement","index","isLast","length","close","displayName"],"mappings":";;;;;;;;;AAAA;;AAQA;;AACA;;AACA;;;;;;;;;;;;;;;;;;AASO,IAAMA,MAAM,gBAAG,uBACpB,gBAAqCC,GAArC,EAA6C;AAAA,MAA1CC,KAA0C,QAA1CA,KAA0C;AAAA,MAAnCC,IAAmC,QAAnCA,IAAmC;AAAA,MAA7BC,OAA6B,QAA7BA,OAA6B;AAAA,MAApBC,QAAoB,QAApBA,QAAoB;AAC3C,MAAMC,kBAAkB,GAAG,oBACzB;AAAA,WAAMC,eAAMC,QAAN,CAAeC,OAAf,CAAuBJ,QAAvB,CAAN;AAAA,GADyB,EAEzB,CAACA,QAAD,CAFyB,CAA3B;;AAKA,kBAAoC,qBAAS,CAAT,CAApC;AAAA;AAAA,MAAOK,UAAP;AAAA,MAAmBC,aAAnB;;AACA,mBAA4D,qBAAS,KAAT,CAA5D;AAAA;AAAA,MAAOC,sBAAP;AAAA,MAA+BC,yBAA/B;;AAEA,MAAMC,iBAAiB,GAAG,wBAAY,YAAM;AAC1CH,IAAAA,aAAa,CAACD,UAAU,GAAG,CAAd,CAAb;AACD,GAFyB,EAEvB,CAACA,UAAD,CAFuB,CAA1B;AAIA,MAAMK,qBAAqB,GAAG,wBAAY,YAAM;AAC9CJ,IAAAA,aAAa,CAACD,UAAU,GAAG,CAAd,CAAb;AACD,GAF6B,EAE3B,CAACA,UAAD,CAF2B,CAA9B;AAIA,MAAMM,eAAe,GAAG,wBAAY,YAAM;AACxCL,IAAAA,aAAa,CAAC,CAAD,CAAb;AACAP,IAAAA,OAAO;AACR,GAHuB,EAGrB,CAACA,OAAD,CAHqB,CAAxB;AAKA,MAAMa,gBAAgB,GAAG,oBAAQ,YAAM;AACrC,QAAMC,OAAO,GAAGZ,kBAAkB,CAACI,UAAD,CAAlC;;AAEA,QAAI,CAAAQ,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAEC,IAAT,MAAkBC,UAAtB,EAA4B;AAC1B,0BAAOb,eAAMc,YAAN,CAAmBH,OAAnB,EAA4B;AACjCI,QAAAA,KAAK,EAAEZ,UAD0B;AAEjCa,QAAAA,MAAM,EAAEjB,kBAAkB,CAACkB,MAAnB,GAA4B,CAA5B,KAAkCd,UAFT;AAGjCR,QAAAA,KAAK,EAAEA,KAH0B;AAIjCY,QAAAA,iBAAiB,EAAEA,iBAJc;AAKjCC,QAAAA,qBAAqB,EAAEA,qBALU;AAMjCX,QAAAA,OAAO,EAAEY,eANwB;AAOjCJ,QAAAA,sBAAsB,EAAEA;AAPS,OAA5B,CAAP;AASD;;AAED,WAAO,IAAP;AACD,GAhBwB,EAgBtB,CACDF,UADC,EAEDE,sBAFC,EAGDN,kBAHC,EAIDU,eAJC,EAKDF,iBALC,EAMDC,qBANC,EAODb,KAPC,CAhBsB,CAAzB;AA0BA,sBACE,6BAAC,oCAAD;AACE,IAAA,KAAK,EAAE;AACLQ,MAAAA,UAAU,EAAVA,UADK;AAELC,MAAAA,aAAa,EAAbA,aAFK;AAGLc,MAAAA,KAAK,EAAET,eAHF;AAILH,MAAAA,yBAAyB,EAAzBA;AAJK;AADT,kBAQE,6BAAC,cAAD;AAAQ,IAAA,GAAG,EAAEZ,GAAb;AAAkB,IAAA,IAAI,EAAEE;AAAxB,KACGc,gBADH,CARF,CADF;AAcD,CA/DmB,CAAf;;AAkEPjB,MAAM,CAAC0B,WAAP,GAAqB,QAArB","sourcesContent":["import React, {\n forwardRef,\n ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\nimport { Dialog } from \"../Dialog\";\nimport { Step } from \"./Step\";\nimport { WizardContextProvider } from \"./WizardContext\";\n\nexport interface IWizard {\n title: string;\n open: boolean;\n onClose: () => void;\n children: ReactNode;\n}\n\nexport const Wizard = forwardRef<HTMLDivElement, IWizard>(\n ({ title, open, onClose, children }, ref) => {\n const childrenCollection = useMemo(\n () => React.Children.toArray(children),\n [children]\n );\n\n const [activeStep, setActiveStep] = useState(0);\n const [changingStepInProgress, setChangingStepInProgress] = useState(false);\n\n const onNextButtonClick = useCallback(() => {\n setActiveStep(activeStep + 1);\n }, [activeStep]);\n\n const onPreviousButtonClick = useCallback(() => {\n setActiveStep(activeStep - 1);\n }, [activeStep]);\n\n const onCloseCallback = useCallback(() => {\n setActiveStep(0);\n onClose();\n }, [onClose]);\n\n const renderActiveStep = useMemo(() => {\n const element = childrenCollection[activeStep] as ReactElement;\n\n if (element?.type === Step) {\n return React.cloneElement(element, {\n index: activeStep,\n isLast: childrenCollection.length - 1 === activeStep,\n title: title,\n onNextButtonClick: onNextButtonClick,\n onPreviousButtonClick: onPreviousButtonClick,\n onClose: onCloseCallback,\n changingStepInProgress: changingStepInProgress,\n });\n }\n\n return null;\n }, [\n activeStep,\n changingStepInProgress,\n childrenCollection,\n onCloseCallback,\n onNextButtonClick,\n onPreviousButtonClick,\n title,\n ]);\n\n return (\n <WizardContextProvider\n value={{\n activeStep,\n setActiveStep,\n close: onCloseCallback,\n setChangingStepInProgress,\n }}\n >\n <Dialog ref={ref} open={open}>\n {renderActiveStep}\n </Dialog>\n </WizardContextProvider>\n );\n }\n);\n\nWizard.displayName = \"Wizard\";\n"],"file":"Wizard.js"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useWizardContext = exports.default = exports.WizardContextProvider = exports.WizardContextConsumer = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var WizardContext = /*#__PURE__*/(0, _react.createContext)({});
11
+ var WizardContextProvider = WizardContext.Provider;
12
+ exports.WizardContextProvider = WizardContextProvider;
13
+ var WizardContextConsumer = WizardContext.Consumer;
14
+ exports.WizardContextConsumer = WizardContextConsumer;
15
+
16
+ var useWizardContext = function useWizardContext() {
17
+ return (0, _react.useContext)(WizardContext);
18
+ };
19
+
20
+ exports.useWizardContext = useWizardContext;
21
+ var _default = WizardContext;
22
+ exports.default = _default;
23
+ //# sourceMappingURL=WizardContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/WizardContext.ts"],"names":["WizardContext","WizardContextProvider","Provider","WizardContextConsumer","Consumer","useWizardContext"],"mappings":";;;;;;;AAAA;;AASA,IAAMA,aAAa,gBAAG,0BAA8B,EAA9B,CAAtB;AAEO,IAAMC,qBAAqB,GAAGD,aAAa,CAACE,QAA5C;;AACA,IAAMC,qBAAqB,GAAGH,aAAa,CAACI,QAA5C;;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,SAAsB,uBAAWL,aAAX,CAAtB;AAAA,CAAzB;;;eAEQA,a","sourcesContent":["import { createContext, useContext } from \"react\";\n\ninterface IWizardContext {\n activeStep?: number;\n setActiveStep?: (integer) => void;\n close?: () => void;\n setChangingStepInProgress?: (boolean) => void;\n}\n\nconst WizardContext = createContext<IWizardContext>({});\n\nexport const WizardContextProvider = WizardContext.Provider;\nexport const WizardContextConsumer = WizardContext.Consumer;\n\nexport const useWizardContext = (): IWizardContext => useContext(WizardContext);\n\nexport default WizardContext;\n"],"file":"WizardContext.js"}
@@ -15,7 +15,7 @@ export var Typography = /*#__PURE__*/forwardRef(function (_ref, ref) {
15
15
  _ref$tabularNums = _ref.tabularNums,
16
16
  tabularNums = _ref$tabularNums === void 0 ? false : _ref$tabularNums,
17
17
  _ref$letterSpacing = _ref.letterSpacing,
18
- letterSpacing = _ref$letterSpacing === void 0 ? "regular" : _ref$letterSpacing,
18
+ letterSpacing = _ref$letterSpacing === void 0 ? "tight" : _ref$letterSpacing,
19
19
  _ref$lineHeight = _ref.lineHeight,
20
20
  lineHeight = _ref$lineHeight === void 0 ? "regular" : _ref$lineHeight,
21
21
  _ref$align = _ref.align,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/Typography/Typography.tsx"],"names":["React","forwardRef","classNames","StyledTypography","Typography","ref","variant","as","color","italic","tabularNums","letterSpacing","lineHeight","align","decoration","transform","overflow","whitespace","wordBreak","weight","className","children","props","Component","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgCC,UAAhC,QAAkD,OAAlD;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AAuEA,OAAO,IAAMC,UAA0D,gBACrEH,UAAU,CACR,gBAoBEI,GApBF,EAqBK;AAAA,0BAnBDC,OAmBC;AAAA,MAnBDA,OAmBC,6BAnBS,SAmBT;AAAA,MAlBDC,EAkBC,QAlBDA,EAkBC;AAAA,wBAjBDC,KAiBC;AAAA,MAjBDA,KAiBC,2BAjBO,SAiBP;AAAA,yBAhBDC,MAgBC;AAAA,MAhBDA,MAgBC,4BAhBQ,KAgBR;AAAA,8BAfDC,WAeC;AAAA,MAfDA,WAeC,iCAfa,KAeb;AAAA,gCAdDC,aAcC;AAAA,MAdDA,aAcC,mCAde,SAcf;AAAA,6BAbDC,UAaC;AAAA,MAbDA,UAaC,gCAbY,SAaZ;AAAA,wBAZDC,KAYC;AAAA,MAZDA,KAYC,2BAZO,MAYP;AAAA,6BAXDC,UAWC;AAAA,MAXDA,UAWC,gCAXY,MAWZ;AAAA,4BAVDC,SAUC;AAAA,MAVDA,SAUC,+BAVW,SAUX;AAAA,2BATDC,QASC;AAAA,MATDA,QASC,8BATU,SASV;AAAA,6BARDC,UAQC;AAAA,MARDA,UAQC,gCARY,SAQZ;AAAA,4BAPDC,SAOC;AAAA,MAPDA,SAOC,+BAPW,SAOX;AAAA,yBANDC,MAMC;AAAA,MANDA,MAMC,4BANQ,SAMR;AAAA,MALDC,SAKC,QALDA,SAKC;AAAA,MAJDC,QAIC,QAJDA,QAIC;AAAA,MAHEC,KAGF;;AACH,MAAMC,SAAS,GAAGhB,EAAE,IAAI,KAAxB;AACA,sBACE,oBAAC,gBAAD;AACE,IAAA,EAAE,EAAEgB,SADN;AAEE,IAAA,SAAS,EAAErB,UAAU,CAAC,YAAD,EAAekB,SAAf,CAFvB;AAGE,IAAA,OAAO,EAAEX,MAHX;AAIE,IAAA,YAAY,EAAEC,WAJhB;AAKE,IAAA,cAAc,EAAEC,aALlB;AAME,IAAA,WAAW,EAAEC,UANf;AAOE,IAAA,MAAM,EAAEC,KAPV;AAQE,IAAA,WAAW,EAAEC,UARf;AASE,IAAA,UAAU,EAAEC,SATd;AAUE,IAAA,SAAS,EAAEC,QAVb;AAWE,IAAA,WAAW,EAAEC,UAXf;AAYE,IAAA,UAAU,EAAEC,SAZd;AAaE,IAAA,QAAQ,EAAEZ,OAbZ;AAcE,IAAA,MAAM,EAAEE,KAdV;AAeE,IAAA,OAAO,EAAEW,MAfX;AAgBE,IAAA,GAAG,EAAEd;AAhBP,KAiBMiB,KAjBN,GAmBGD,QAnBH,CADF;AAuBD,CA/CO,CADL;AAmDPjB,UAAU,CAACoB,WAAX,GAAyB,YAAzB","sourcesContent":["import React, { HTMLAttributes, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { StyledTypography } from \"./Styles\";\nimport {\n PolymorphicComponentPropsWithRef,\n PolymorphicRef,\n} from \"../../utils/types\";\nexport interface ITypographyProps extends HTMLAttributes<HTMLElement> {\n /** Font color. */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"quaternary\"\n | \"theme-primary\"\n | \"theme-secondary\"\n | \"only-white\"\n | \"only-black\"\n | \"page-paper\"\n | \"success\"\n | \"alert\"\n | \"warning\";\n /** Tabular numbers. */\n tabularNums?: boolean;\n /** Italic font style. */\n italic?: boolean;\n /** Font letter spacing. */\n letterSpacing?: \"tight\" | \"regular\" | \"wide\";\n /** Font line height. */\n lineHeight?: \"tight\" | \"regular\" | \"loose\";\n /** Font align. */\n align?: \"left\" | \"center\" | \"right\" | \"justify\";\n /** Underline font style. */\n decoration?: \"underline\" | \"line-through\" | \"none\";\n /** Font transform. */\n transform?: \"uppercase\" | \"lowercase\" | \"capitalize\" | \"regular\";\n /** Font overflow. */\n overflow?: \"truncate\" | \"ellipsis\" | \"visible\";\n /** Font whitespace. */\n whitespace?:\n | \"regular\"\n | \"no-wrap\"\n | \"pre\"\n | \"pre-wrap\"\n | \"pre-line\"\n | \"break-spaces\";\n /** Font word break. */\n wordBreak?: \"regular\" | \"smart\" | \"all\";\n /** Custom className for styling. */\n className?: string;\n /** Element variant. */\n variant?:\n | \"Title 1\"\n | \"Title 2\"\n | \"Header 2\"\n | \"Header 3\"\n | \"Body 1\"\n | \"Body 2\"\n | \"Caption 1\"\n | \"Caption 2\";\n /** Font weight. */\n weight?: \"light\" | \"regular\" | \"medium\" | \"bold\";\n /** Font size. */\n size?: \"32\" | \"18\" | \"16\" | \"14\" | \"12\" | \"10\";\n}\n\nexport type TypographyProps<C extends React.ElementType> =\n PolymorphicComponentPropsWithRef<C, ITypographyProps>;\n\nexport type TypographyComponent = <C extends React.ElementType = \"div\">(\n props: TypographyProps<C>\n) => React.ReactElement | null;\n\nexport const Typography: TypographyComponent & { displayName?: string } =\n forwardRef(\n <C extends React.ElementType = \"div\">(\n {\n variant = \"Title 1\",\n as,\n color = \"primary\",\n italic = false,\n tabularNums = false,\n letterSpacing = \"regular\",\n lineHeight = \"regular\",\n align = \"left\",\n decoration = \"none\",\n transform = \"regular\",\n overflow = \"visible\",\n whitespace = \"regular\",\n wordBreak = \"regular\",\n weight = \"regular\",\n className,\n children,\n ...props\n }: TypographyProps<C>,\n ref?: PolymorphicRef<C>\n ) => {\n const Component = as || \"div\";\n return (\n <StyledTypography\n as={Component}\n className={classNames(\"typography\", className)}\n $italic={italic}\n $tabularNums={tabularNums}\n $letterSpacing={letterSpacing}\n $lineHeight={lineHeight}\n $align={align}\n $decoration={decoration}\n $transform={transform}\n $overflow={overflow}\n $whitespace={whitespace}\n $wordBreak={wordBreak}\n $variant={variant}\n $color={color}\n $weight={weight}\n ref={ref}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n }\n );\n\nTypography.displayName = \"Typography\";\n"],"file":"Typography.js"}
1
+ {"version":3,"sources":["../../../../src/components/Typography/Typography.tsx"],"names":["React","forwardRef","classNames","StyledTypography","Typography","ref","variant","as","color","italic","tabularNums","letterSpacing","lineHeight","align","decoration","transform","overflow","whitespace","wordBreak","weight","className","children","props","Component","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgCC,UAAhC,QAAkD,OAAlD;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,gBAAT,QAAiC,UAAjC;AAuEA,OAAO,IAAMC,UAA0D,gBACrEH,UAAU,CACR,gBAoBEI,GApBF,EAqBK;AAAA,0BAnBDC,OAmBC;AAAA,MAnBDA,OAmBC,6BAnBS,SAmBT;AAAA,MAlBDC,EAkBC,QAlBDA,EAkBC;AAAA,wBAjBDC,KAiBC;AAAA,MAjBDA,KAiBC,2BAjBO,SAiBP;AAAA,yBAhBDC,MAgBC;AAAA,MAhBDA,MAgBC,4BAhBQ,KAgBR;AAAA,8BAfDC,WAeC;AAAA,MAfDA,WAeC,iCAfa,KAeb;AAAA,gCAdDC,aAcC;AAAA,MAdDA,aAcC,mCAde,OAcf;AAAA,6BAbDC,UAaC;AAAA,MAbDA,UAaC,gCAbY,SAaZ;AAAA,wBAZDC,KAYC;AAAA,MAZDA,KAYC,2BAZO,MAYP;AAAA,6BAXDC,UAWC;AAAA,MAXDA,UAWC,gCAXY,MAWZ;AAAA,4BAVDC,SAUC;AAAA,MAVDA,SAUC,+BAVW,SAUX;AAAA,2BATDC,QASC;AAAA,MATDA,QASC,8BATU,SASV;AAAA,6BARDC,UAQC;AAAA,MARDA,UAQC,gCARY,SAQZ;AAAA,4BAPDC,SAOC;AAAA,MAPDA,SAOC,+BAPW,SAOX;AAAA,yBANDC,MAMC;AAAA,MANDA,MAMC,4BANQ,SAMR;AAAA,MALDC,SAKC,QALDA,SAKC;AAAA,MAJDC,QAIC,QAJDA,QAIC;AAAA,MAHEC,KAGF;;AACH,MAAMC,SAAS,GAAGhB,EAAE,IAAI,KAAxB;AACA,sBACE,oBAAC,gBAAD;AACE,IAAA,EAAE,EAAEgB,SADN;AAEE,IAAA,SAAS,EAAErB,UAAU,CAAC,YAAD,EAAekB,SAAf,CAFvB;AAGE,IAAA,OAAO,EAAEX,MAHX;AAIE,IAAA,YAAY,EAAEC,WAJhB;AAKE,IAAA,cAAc,EAAEC,aALlB;AAME,IAAA,WAAW,EAAEC,UANf;AAOE,IAAA,MAAM,EAAEC,KAPV;AAQE,IAAA,WAAW,EAAEC,UARf;AASE,IAAA,UAAU,EAAEC,SATd;AAUE,IAAA,SAAS,EAAEC,QAVb;AAWE,IAAA,WAAW,EAAEC,UAXf;AAYE,IAAA,UAAU,EAAEC,SAZd;AAaE,IAAA,QAAQ,EAAEZ,OAbZ;AAcE,IAAA,MAAM,EAAEE,KAdV;AAeE,IAAA,OAAO,EAAEW,MAfX;AAgBE,IAAA,GAAG,EAAEd;AAhBP,KAiBMiB,KAjBN,GAmBGD,QAnBH,CADF;AAuBD,CA/CO,CADL;AAmDPjB,UAAU,CAACoB,WAAX,GAAyB,YAAzB","sourcesContent":["import React, { HTMLAttributes, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { StyledTypography } from \"./Styles\";\nimport {\n PolymorphicComponentPropsWithRef,\n PolymorphicRef,\n} from \"../../utils/types\";\nexport interface ITypographyProps extends HTMLAttributes<HTMLElement> {\n /** Font color. */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"quaternary\"\n | \"theme-primary\"\n | \"theme-secondary\"\n | \"only-white\"\n | \"only-black\"\n | \"page-paper\"\n | \"success\"\n | \"alert\"\n | \"warning\";\n /** Tabular numbers. */\n tabularNums?: boolean;\n /** Italic font style. */\n italic?: boolean;\n /** Font letter spacing. */\n letterSpacing?: \"tight\" | \"regular\" | \"wide\";\n /** Font line height. */\n lineHeight?: \"tight\" | \"regular\" | \"loose\";\n /** Font align. */\n align?: \"left\" | \"center\" | \"right\" | \"justify\";\n /** Underline font style. */\n decoration?: \"underline\" | \"line-through\" | \"none\";\n /** Font transform. */\n transform?: \"uppercase\" | \"lowercase\" | \"capitalize\" | \"regular\";\n /** Font overflow. */\n overflow?: \"truncate\" | \"ellipsis\" | \"visible\";\n /** Font whitespace. */\n whitespace?:\n | \"regular\"\n | \"no-wrap\"\n | \"pre\"\n | \"pre-wrap\"\n | \"pre-line\"\n | \"break-spaces\";\n /** Font word break. */\n wordBreak?: \"regular\" | \"smart\" | \"all\";\n /** Custom className for styling. */\n className?: string;\n /** Element variant. */\n variant?:\n | \"Title 1\"\n | \"Title 2\"\n | \"Header 2\"\n | \"Header 3\"\n | \"Body 1\"\n | \"Body 2\"\n | \"Caption 1\"\n | \"Caption 2\";\n /** Font weight. */\n weight?: \"light\" | \"regular\" | \"medium\" | \"bold\";\n /** Font size. */\n size?: \"32\" | \"18\" | \"16\" | \"14\" | \"12\" | \"10\";\n}\n\nexport type TypographyProps<C extends React.ElementType> =\n PolymorphicComponentPropsWithRef<C, ITypographyProps>;\n\nexport type TypographyComponent = <C extends React.ElementType = \"div\">(\n props: TypographyProps<C>\n) => React.ReactElement | null;\n\nexport const Typography: TypographyComponent & { displayName?: string } =\n forwardRef(\n <C extends React.ElementType = \"div\">(\n {\n variant = \"Title 1\",\n as,\n color = \"primary\",\n italic = false,\n tabularNums = false,\n letterSpacing = \"tight\",\n lineHeight = \"regular\",\n align = \"left\",\n decoration = \"none\",\n transform = \"regular\",\n overflow = \"visible\",\n whitespace = \"regular\",\n wordBreak = \"regular\",\n weight = \"regular\",\n className,\n children,\n ...props\n }: TypographyProps<C>,\n ref?: PolymorphicRef<C>\n ) => {\n const Component = as || \"div\";\n return (\n <StyledTypography\n as={Component}\n className={classNames(\"typography\", className)}\n $italic={italic}\n $tabularNums={tabularNums}\n $letterSpacing={letterSpacing}\n $lineHeight={lineHeight}\n $align={align}\n $decoration={decoration}\n $transform={transform}\n $overflow={overflow}\n $whitespace={whitespace}\n $wordBreak={wordBreak}\n $variant={variant}\n $color={color}\n $weight={weight}\n ref={ref}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n }\n );\n\nTypography.displayName = \"Typography\";\n"],"file":"Typography.js"}
@@ -0,0 +1,16 @@
1
+ import { FC, ReactNode } from "react";
2
+ export interface IStep {
3
+ index?: number;
4
+ isLast?: boolean;
5
+ subtitle: string;
6
+ title?: string;
7
+ onNextButtonClick?: () => void;
8
+ onPreviousButtonClick?: () => void;
9
+ onClose?: () => void;
10
+ children: ReactNode;
11
+ actionLabel?: string;
12
+ shouldRenderNextButton?: boolean;
13
+ changingStepInProgress?: boolean;
14
+ }
15
+ export declare const Step: FC<IStep>;
16
+ //# sourceMappingURL=Step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Step.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAa1D,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,KAAK,CAkE1B,CAAC"}
@@ -0,0 +1,46 @@
1
+ import React, { useCallback } from "react";
2
+ import { Button } from "../Button";
3
+ import { ArrowBackMobileIcon, CancelCrossIcon } from "../Icons";
4
+ import { StepActionButton } from "./StepActionButton";
5
+ import { DialogActions, DialogContent, DialogContentDivider } from "../Dialog";
6
+ import { Caption2, Header3 } from "../Typography";
7
+ import { StyledStepTitle, StyledStepHeaderLeft, StyledStepHeader, StyledCustomStep } from "./Styles";
8
+ export var Step = function Step(_ref) {
9
+ var index = _ref.index,
10
+ isLast = _ref.isLast,
11
+ subtitle = _ref.subtitle,
12
+ title = _ref.title,
13
+ onNextButtonClick = _ref.onNextButtonClick,
14
+ onPreviousButtonClick = _ref.onPreviousButtonClick,
15
+ onClose = _ref.onClose,
16
+ children = _ref.children,
17
+ _ref$actionLabel = _ref.actionLabel,
18
+ actionLabel = _ref$actionLabel === void 0 ? "Proceed" : _ref$actionLabel,
19
+ _ref$shouldRenderNext = _ref.shouldRenderNextButton,
20
+ shouldRenderNextButton = _ref$shouldRenderNext === void 0 ? true : _ref$shouldRenderNext,
21
+ _ref$changingStepInPr = _ref.changingStepInProgress,
22
+ changingStepInProgress = _ref$changingStepInPr === void 0 ? false : _ref$changingStepInPr;
23
+ var onActionButtonClick = useCallback(function () {
24
+ if (isLast && onClose) {
25
+ return onClose();
26
+ }
27
+
28
+ return onNextButtonClick && onNextButtonClick();
29
+ }, [isLast, onClose, onNextButtonClick]);
30
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledStepHeader, null, /*#__PURE__*/React.createElement(StyledStepHeaderLeft, null, index && index > 0 ? /*#__PURE__*/React.createElement(Button, {
31
+ onClick: onPreviousButtonClick,
32
+ variant: "text gray",
33
+ className: "tw--ml-3 tw-mr-2",
34
+ disabled: changingStepInProgress
35
+ }, /*#__PURE__*/React.createElement(ArrowBackMobileIcon, null)) : null, /*#__PURE__*/React.createElement(StyledStepTitle, null, /*#__PURE__*/React.createElement(Caption2, null, title), /*#__PURE__*/React.createElement(Header3, null, subtitle))), /*#__PURE__*/React.createElement(Button, {
36
+ onClick: onClose,
37
+ variant: "text gray",
38
+ disabled: changingStepInProgress
39
+ }, /*#__PURE__*/React.createElement(CancelCrossIcon, null))), /*#__PURE__*/React.createElement(DialogContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DialogContent, null, children), /*#__PURE__*/React.createElement(DialogContentDivider, null), /*#__PURE__*/React.createElement(DialogActions, null, /*#__PURE__*/React.createElement(StepActionButton, {
40
+ isLast: isLast,
41
+ actionLabel: actionLabel,
42
+ onNextButtonClick: onActionButtonClick
43
+ }))) : /*#__PURE__*/React.createElement(StyledCustomStep, null, children));
44
+ };
45
+ Step.displayName = "Step";
46
+ //# sourceMappingURL=Step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/Step.tsx"],"names":["React","useCallback","Button","ArrowBackMobileIcon","CancelCrossIcon","StepActionButton","DialogActions","DialogContent","DialogContentDivider","Caption2","Header3","StyledStepTitle","StyledStepHeaderLeft","StyledStepHeader","StyledCustomStep","Step","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","actionLabel","shouldRenderNextButton","changingStepInProgress","onActionButtonClick","displayName"],"mappings":"AAAA,OAAOA,KAAP,IAA+BC,WAA/B,QAAkD,OAAlD;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,mBAAT,EAA8BC,eAA9B,QAAqD,UAArD;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,aAAT,EAAwBC,aAAxB,EAAuCC,oBAAvC,QAAmE,WAAnE;AACA,SAASC,QAAT,EAAmBC,OAAnB,QAAkC,eAAlC;AACA,SACEC,eADF,EAEEC,oBAFF,EAGEC,gBAHF,EAIEC,gBAJF,QAKO,UALP;AAqBA,OAAO,IAAMC,IAAe,GAAG,SAAlBA,IAAkB,OAYzB;AAAA,MAXJC,KAWI,QAXJA,KAWI;AAAA,MAVJC,MAUI,QAVJA,MAUI;AAAA,MATJC,QASI,QATJA,QASI;AAAA,MARJC,KAQI,QARJA,KAQI;AAAA,MAPJC,iBAOI,QAPJA,iBAOI;AAAA,MANJC,qBAMI,QANJA,qBA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iB,EAAEG;AAHrB,IADF,CAHF,CADqB,gBAarB,oBAAC,gBAAD,QAAmBJ,QAAnB,CAxCJ,CADF;AA6CD,CAlEM;AAoEPR,IAAI,CAACa,WAAL,GAAmB,MAAnB","sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\nimport { Button } from \"../Button\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { StepActionButton } from \"./StepActionButton\";\nimport { DialogActions, DialogContent, DialogContentDivider } from \"../Dialog\";\nimport { Caption2, Header3 } from \"../Typography\";\nimport {\n StyledStepTitle,\n StyledStepHeaderLeft,\n StyledStepHeader,\n StyledCustomStep,\n} from \"./Styles\";\n\nexport interface IStep {\n index?: number;\n isLast?: boolean;\n subtitle: string;\n title?: string;\n onNextButtonClick?: () => void;\n onPreviousButtonClick?: () => void;\n onClose?: () => void;\n children: ReactNode;\n actionLabel?: string;\n shouldRenderNextButton?: boolean;\n changingStepInProgress?: boolean;\n}\n\nexport const Step: FC<IStep> = ({\n index,\n isLast,\n subtitle,\n title,\n onNextButtonClick,\n onPreviousButtonClick,\n onClose,\n children,\n actionLabel = \"Proceed\",\n shouldRenderNextButton = true,\n changingStepInProgress = false,\n}) => {\n const onActionButtonClick = useCallback(() => {\n if (isLast && onClose) {\n return onClose();\n }\n\n return onNextButtonClick && onNextButtonClick();\n }, [isLast, onClose, onNextButtonClick]);\n\n return (\n <>\n <StyledStepHeader>\n <StyledStepHeaderLeft>\n {index && index > 0 ? (\n <Button\n onClick={onPreviousButtonClick}\n variant=\"text gray\"\n className=\"tw--ml-3 tw-mr-2\"\n disabled={changingStepInProgress}\n >\n <ArrowBackMobileIcon />\n </Button>\n ) : null}\n <StyledStepTitle>\n <Caption2>{title}</Caption2>\n <Header3>{subtitle}</Header3>\n </StyledStepTitle>\n </StyledStepHeaderLeft>\n <Button\n onClick={onClose}\n variant=\"text gray\"\n disabled={changingStepInProgress}\n >\n <CancelCrossIcon />\n </Button>\n </StyledStepHeader>\n <DialogContentDivider />\n {shouldRenderNextButton ? (\n <>\n <DialogContent>{children}</DialogContent>\n <DialogContentDivider />\n <DialogActions>\n <StepActionButton\n isLast={isLast}\n actionLabel={actionLabel}\n onNextButtonClick={onActionButtonClick}\n />\n </DialogActions>\n </>\n ) : (\n <StyledCustomStep>{children}</StyledCustomStep>\n )}\n </>\n );\n};\n\nStep.displayName = \"Step\";\n"],"file":"Step.js"}
@@ -0,0 +1,10 @@
1
+ import { FC } from "react";
2
+ export interface IStepActionButton {
3
+ isLast?: boolean;
4
+ onNextButtonClick?: () => void;
5
+ actionLabel?: string;
6
+ disabled?: boolean;
7
+ className?: string;
8
+ }
9
+ export declare const StepActionButton: FC<IStepActionButton>;
10
+ //# sourceMappingURL=StepActionButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepActionButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/StepActionButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlC,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAiBlD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { Button } from "../Button";
3
+ import { ArrowRightIcon } from "../Icons";
4
+ export var StepActionButton = function StepActionButton(_ref) {
5
+ var onNextButtonClick = _ref.onNextButtonClick,
6
+ _ref$actionLabel = _ref.actionLabel,
7
+ actionLabel = _ref$actionLabel === void 0 ? "Proceed" : _ref$actionLabel,
8
+ isLast = _ref.isLast,
9
+ disabled = _ref.disabled,
10
+ className = _ref.className;
11
+ return /*#__PURE__*/React.createElement(Button, {
12
+ className: className,
13
+ onClick: onNextButtonClick,
14
+ disabled: disabled
15
+ }, actionLabel, !isLast ? /*#__PURE__*/React.createElement(ArrowRightIcon, null) : null);
16
+ };
17
+ StepActionButton.displayName = "StepActionButton";
18
+ //# sourceMappingURL=StepActionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/StepActionButton.tsx"],"names":["React","Button","ArrowRightIcon","StepActionButton","onNextButtonClick","actionLabel","isLast","disabled","className","displayName"],"mappings":"AAAA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,cAAT,QAA+B,UAA/B;AAUA,OAAO,IAAMC,gBAAuC,GAAG,SAA1CA,gBAA0C,OAMjD;AAAA,MALJC,iBAKI,QALJA,iBAKI;AAAA,8BAJJC,WAII;AAAA,MAJJA,WAII,iCAJU,SAIV;AAAA,MAHJC,MAGI,QAHJA,MAGI;AAAA,MAFJC,QAEI,QAFJA,QAEI;AAAA,MADJC,SACI,QADJA,SACI;AACJ,sBACE,oBAAC,MAAD;AACE,IAAA,SAAS,EAAEA,SADb;AAEE,IAAA,OAAO,EAAEJ,iBAFX;AAGE,IAAA,QAAQ,EAAEG;AAHZ,KAKGF,WALH,EAMG,CAACC,MAAD,gBAAU,oBAAC,cAAD,OAAV,GAA+B,IANlC,CADF;AAUD,CAjBM;AAmBPH,gBAAgB,CAACM,WAAjB,GAA+B,kBAA/B","sourcesContent":["import React, { FC } from \"react\";\nimport { Button } from \"../Button\";\nimport { ArrowRightIcon } from \"../Icons\";\n\nexport interface IStepActionButton {\n isLast?: boolean;\n onNextButtonClick?: () => void;\n actionLabel?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport const StepActionButton: FC<IStepActionButton> = ({\n onNextButtonClick,\n actionLabel = \"Proceed\",\n isLast,\n disabled,\n className,\n}) => {\n return (\n <Button\n className={className}\n onClick={onNextButtonClick}\n disabled={disabled}\n >\n {actionLabel}\n {!isLast ? <ArrowRightIcon /> : null}\n </Button>\n );\n};\n\nStepActionButton.displayName = \"StepActionButton\";\n"],"file":"StepActionButton.js"}
@@ -0,0 +1,5 @@
1
+ export declare const StyledStepHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const StyledStepTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledStepHeaderLeft: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledCustomStep: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ //# sourceMappingURL=Styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,oEAI5B,CAAC;AAEF,eAAO,MAAM,eAAe,oEAG3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAEhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAE5B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import styled from "styled-components";
2
+ export var StyledStepHeader = styled.div.withConfig({
3
+ displayName: "Styles__StyledStepHeader",
4
+ componentId: "sc-88drbd-0"
5
+ })(["display:flex;padding:12px 12px 12px 32px;justify-content:space-between;"]);
6
+ export var StyledStepTitle = styled.div.withConfig({
7
+ displayName: "Styles__StyledStepTitle",
8
+ componentId: "sc-88drbd-1"
9
+ })(["display:flex;flex-direction:column;"]);
10
+ export var StyledStepHeaderLeft = styled.div.withConfig({
11
+ displayName: "Styles__StyledStepHeaderLeft",
12
+ componentId: "sc-88drbd-2"
13
+ })(["display:flex;"]);
14
+ export var StyledCustomStep = styled.div.withConfig({
15
+ displayName: "Styles__StyledCustomStep",
16
+ componentId: "sc-88drbd-3"
17
+ })(["overflow-y:auto;"]);
18
+ //# sourceMappingURL=Styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/Wizard/Styles.ts"],"names":["styled","StyledStepHeader","div","StyledStepTitle","StyledStepHeaderLeft","StyledCustomStep"],"mappings":"AAAA,OAAOA,MAAP,MAAmB,mBAAnB;AAEA,OAAO,IAAMC,gBAAgB,GAAGD,MAAM,CAACE,GAAV;AAAA;AAAA;AAAA,+EAAtB;AAMP,OAAO,IAAMC,eAAe,GAAGH,MAAM,CAACE,GAAV;AAAA;AAAA;AAAA,2CAArB;AAKP,OAAO,IAAME,oBAAoB,GAAGJ,MAAM,CAACE,GAAV;AAAA;AAAA;AAAA,qBAA1B;AAIP,OAAO,IAAMG,gBAAgB,GAAGL,MAAM,CAACE,GAAV;AAAA;AAAA;AAAA,wBAAtB","sourcesContent":["import styled from \"styled-components\";\n\nexport const StyledStepHeader = styled.div`\n display: flex;\n padding: 12px 12px 12px 32px;\n justify-content: space-between;\n`;\n\nexport const StyledStepTitle = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledStepHeaderLeft = styled.div`\n display: flex;\n`;\n\nexport const StyledCustomStep = styled.div`\n overflow-y: auto;\n`;\n"],"file":"Styles.js"}
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from "react";
2
+ export interface IWizard {
3
+ title: string;
4
+ open: boolean;
5
+ onClose: () => void;
6
+ children: ReactNode;
7
+ }
8
+ export declare const Wizard: React.ForwardRefExoticComponent<IWizard & React.RefAttributes<HTMLDivElement>>;
9
+ //# sourceMappingURL=Wizard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wizard.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Wizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAKf,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,gFAgElB,CAAC"}