@activecollab/components 1.0.218 → 1.0.220

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.
@@ -14,48 +14,4 @@ Object.keys(_Dialog).forEach(function (key) {
14
14
  }
15
15
  });
16
16
  });
17
- var _DialogContent = require("./DialogContent");
18
- Object.keys(_DialogContent).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _DialogContent[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function get() {
24
- return _DialogContent[key];
25
- }
26
- });
27
- });
28
- var _DialogContentDivider = require("./DialogContentDivider");
29
- Object.keys(_DialogContentDivider).forEach(function (key) {
30
- if (key === "default" || key === "__esModule") return;
31
- if (key in exports && exports[key] === _DialogContentDivider[key]) return;
32
- Object.defineProperty(exports, key, {
33
- enumerable: true,
34
- get: function get() {
35
- return _DialogContentDivider[key];
36
- }
37
- });
38
- });
39
- var _DialogTitle = require("./DialogTitle");
40
- Object.keys(_DialogTitle).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _DialogTitle[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function get() {
46
- return _DialogTitle[key];
47
- }
48
- });
49
- });
50
- var _DialogActions = require("./DialogActions");
51
- Object.keys(_DialogActions).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _DialogActions[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function get() {
57
- return _DialogActions[key];
58
- }
59
- });
60
- });
61
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n// @TODO:\n// Nakon refaktora Dialog komponente na legacy AC-u i Next-u, obrisati individualne exporte.\n// Korisčenje će se svesti samo na `import { Dialog } from @activecollab/components`.\n\n// <Dialog>\n// <Dialog.Title>Hello</Dialog.Title>\n// itd...\n// </Dialog>\n\nexport * from \"./DialogContent\";\nexport * from \"./DialogContentDivider\";\nexport * from \"./DialogTitle\";\nexport * from \"./DialogActions\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAUA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.EditableContent = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _utils = require("../../utils");
9
10
  var _Styles = require("./Styles");
10
11
  var _excluded = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef"];
11
12
  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); }
@@ -23,7 +24,12 @@ var EditableContent = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
23
24
  inputProps = _ref.inputProps,
24
25
  wrapRef = _ref.wrapRef,
25
26
  props = _objectWithoutProperties(_ref, _excluded);
27
+ var intInputRef = (0, _react.useRef)(null);
28
+ var handleRef = (0, _utils.useForkRef)(ref, intInputRef);
26
29
  var handleBlur = (0, _react.useCallback)(function (evt) {
30
+ if (intInputRef !== null && intInputRef !== void 0 && intInputRef.current) {
31
+ intInputRef.current.scrollLeft = 0;
32
+ }
27
33
  typeof (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur) === "function" && (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur(evt));
28
34
  }, [inputProps]);
29
35
  return /*#__PURE__*/_react.default.createElement(_Styles.StyledDiv, _extends({
@@ -35,7 +41,7 @@ var EditableContent = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
35
41
  weight: weight,
36
42
  $disabled: disabled
37
43
  }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.value), /*#__PURE__*/_react.default.createElement(_Styles.StyledInput, _extends({}, inputProps, {
38
- ref: ref,
44
+ ref: handleRef,
39
45
  forwardedAs: "input",
40
46
  variant: variant,
41
47
  weight: weight,
@@ -1 +1 @@
1
- {"version":3,"file":"EditableContent.js","names":["EditableContent","forwardRef","ref","className","variant","weight","disabled","inputProps","wrapRef","props","handleBlur","useCallback","evt","onBlur","value","displayName"],"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"sourcesContent":["import React, { forwardRef, Ref, useCallback } from \"react\";\nimport { Variant } from \"../Typography/Typography\";\nimport { StyledDiv, StyledInput, StyledSpan } from \"./Styles\";\n\nexport interface EditableContentInterface {\n /** Typography variant. */\n variant?: Variant;\n /** Typography weight. */\n weight?: \"light\" | \"regular\" | \"bold\" | \"medium\";\n /** Input props. */\n inputProps?: Partial<React.ComponentPropsWithoutRef<\"input\">>;\n /** Disable edit mode. */\n disabled?: boolean;\n /** Wrapper reference. */\n wrapRef?: Ref<HTMLDivElement>;\n}\n\nexport const EditableContent = forwardRef<\n HTMLDivElement,\n EditableContentInterface &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof EditableContentInterface>\n>(\n (\n {\n className,\n variant = \"Body 2\",\n weight,\n disabled = false,\n inputProps,\n wrapRef,\n ...props\n },\n ref\n ) => {\n const handleBlur = useCallback(\n (evt) => {\n typeof inputProps?.onBlur === `function` && inputProps?.onBlur(evt);\n },\n [inputProps]\n );\n\n return (\n <StyledDiv className={className} ref={wrapRef} {...props}>\n <StyledSpan\n variant={variant}\n forwardedAs=\"span\"\n weight={weight}\n $disabled={disabled}\n >\n {inputProps?.value}\n </StyledSpan>\n <StyledInput\n {...inputProps}\n ref={ref}\n forwardedAs=\"input\"\n variant={variant}\n weight={weight}\n value={inputProps?.value}\n onBlur={handleBlur}\n disabled={disabled}\n />\n </StyledDiv>\n );\n }\n);\n\nEditableContent.displayName = \"EditableContent\";\n"],"mappings":";;;;;;;AAAA;AAEA;AAA8D;AAAA;AAAA;AAAA;AAAA;AAAA;AAevD,IAAMA,eAAe,gBAAG,IAAAC,iBAAU,EAKvC,gBAUEC,GAAG,EACA;EAAA,IATDC,SAAS,QAATA,SAAS;IAAA,oBACTC,OAAO;IAAPA,OAAO,6BAAG,QAAQ;IAClBC,MAAM,QAANA,MAAM;IAAA,qBACNC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;IAChBC,UAAU,QAAVA,UAAU;IACVC,OAAO,QAAPA,OAAO;IACJC,KAAK;EAIV,IAAMC,UAAU,GAAG,IAAAC,kBAAW,EAC5B,UAACC,GAAG,EAAK;IACP,QAAOL,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEM,MAAM,gBAAe,KAAIN,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEM,MAAM,CAACD,GAAG,CAAC;EACrE,CAAC,EACD,CAACL,UAAU,CAAC,CACb;EAED,oBACE,6BAAC,iBAAS;IAAC,SAAS,EAAEJ,SAAU;IAAC,GAAG,EAAEK;EAAQ,GAAKC,KAAK,gBACtD,6BAAC,kBAAU;IACT,OAAO,EAAEL,OAAQ;IACjB,WAAW,EAAC,MAAM;IAClB,MAAM,EAAEC,MAAO;IACf,SAAS,EAAEC;EAAS,GAEnBC,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEO,KAAK,CACP,eACb,6BAAC,mBAAW,eACNP,UAAU;IACd,GAAG,EAAEL,GAAI;IACT,WAAW,EAAC,OAAO;IACnB,OAAO,EAAEE,OAAQ;IACjB,MAAM,EAAEC,MAAO;IACf,KAAK,EAAEE,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEO,KAAM;IACzB,MAAM,EAAEJ,UAAW;IACnB,QAAQ,EAAEJ;EAAS,GACnB,CACQ;AAEhB,CAAC,CACF;AAAC;AAEFN,eAAe,CAACe,WAAW,GAAG,iBAAiB"}
1
+ {"version":3,"file":"EditableContent.js","names":["EditableContent","forwardRef","ref","className","variant","weight","disabled","inputProps","wrapRef","props","intInputRef","useRef","handleRef","useForkRef","handleBlur","useCallback","evt","current","scrollLeft","onBlur","value","displayName"],"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"sourcesContent":["import React, { forwardRef, Ref, useCallback, useRef } from \"react\";\nimport { useForkRef } from \"../../utils\";\nimport { Variant } from \"../Typography/Typography\";\nimport { StyledDiv, StyledInput, StyledSpan } from \"./Styles\";\n\nexport interface EditableContentInterface {\n /** Typography variant. */\n variant?: Variant;\n /** Typography weight. */\n weight?: \"light\" | \"regular\" | \"bold\" | \"medium\";\n /** Input props. */\n inputProps?: Partial<React.ComponentPropsWithoutRef<\"input\">>;\n /** Disable edit mode. */\n disabled?: boolean;\n /** Wrapper reference. */\n wrapRef?: Ref<HTMLDivElement>;\n}\n\nexport const EditableContent = forwardRef<\n HTMLDivElement,\n EditableContentInterface &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof EditableContentInterface>\n>(\n (\n {\n className,\n variant = \"Body 2\",\n weight,\n disabled = false,\n inputProps,\n wrapRef,\n ...props\n },\n ref\n ) => {\n const intInputRef = useRef<HTMLInputElement>(null);\n const handleRef = useForkRef(ref, intInputRef);\n\n const handleBlur = useCallback(\n (evt) => {\n if (intInputRef?.current) {\n intInputRef.current.scrollLeft = 0;\n }\n typeof inputProps?.onBlur === `function` && inputProps?.onBlur(evt);\n },\n [inputProps]\n );\n\n return (\n <StyledDiv className={className} ref={wrapRef} {...props}>\n <StyledSpan\n variant={variant}\n forwardedAs=\"span\"\n weight={weight}\n $disabled={disabled}\n >\n {inputProps?.value}\n </StyledSpan>\n <StyledInput\n {...inputProps}\n ref={handleRef}\n forwardedAs=\"input\"\n variant={variant}\n weight={weight}\n value={inputProps?.value}\n onBlur={handleBlur}\n disabled={disabled}\n />\n </StyledDiv>\n );\n }\n);\n\nEditableContent.displayName = \"EditableContent\";\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AAA8D;AAAA;AAAA;AAAA;AAAA;AAAA;AAevD,IAAMA,eAAe,gBAAG,IAAAC,iBAAU,EAKvC,gBAUEC,GAAG,EACA;EAAA,IATDC,SAAS,QAATA,SAAS;IAAA,oBACTC,OAAO;IAAPA,OAAO,6BAAG,QAAQ;IAClBC,MAAM,QAANA,MAAM;IAAA,qBACNC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;IAChBC,UAAU,QAAVA,UAAU;IACVC,OAAO,QAAPA,OAAO;IACJC,KAAK;EAIV,IAAMC,WAAW,GAAG,IAAAC,aAAM,EAAmB,IAAI,CAAC;EAClD,IAAMC,SAAS,GAAG,IAAAC,iBAAU,EAACX,GAAG,EAAEQ,WAAW,CAAC;EAE9C,IAAMI,UAAU,GAAG,IAAAC,kBAAW,EAC5B,UAACC,GAAG,EAAK;IACP,IAAIN,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEO,OAAO,EAAE;MACxBP,WAAW,CAACO,OAAO,CAACC,UAAU,GAAG,CAAC;IACpC;IACA,QAAOX,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEY,MAAM,gBAAe,KAAIZ,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEY,MAAM,CAACH,GAAG,CAAC;EACrE,CAAC,EACD,CAACT,UAAU,CAAC,CACb;EAED,oBACE,6BAAC,iBAAS;IAAC,SAAS,EAAEJ,SAAU;IAAC,GAAG,EAAEK;EAAQ,GAAKC,KAAK,gBACtD,6BAAC,kBAAU;IACT,OAAO,EAAEL,OAAQ;IACjB,WAAW,EAAC,MAAM;IAClB,MAAM,EAAEC,MAAO;IACf,SAAS,EAAEC;EAAS,GAEnBC,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEa,KAAK,CACP,eACb,6BAAC,mBAAW,eACNb,UAAU;IACd,GAAG,EAAEK,SAAU;IACf,WAAW,EAAC,OAAO;IACnB,OAAO,EAAER,OAAQ;IACjB,MAAM,EAAEC,MAAO;IACf,KAAK,EAAEE,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEa,KAAM;IACzB,MAAM,EAAEN,UAAW;IACnB,QAAQ,EAAER;EAAS,GACnB,CACQ;AAEhB,CAAC,CACF;AAAC;AAEFN,eAAe,CAACqB,WAAW,GAAG,iBAAiB"}
@@ -46,7 +46,7 @@ var Step = function Step(_ref) {
46
46
  onClick: onClose,
47
47
  variant: "text gray",
48
48
  disabled: changingStepInProgress
49
- }, /*#__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, {
49
+ }, /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null))), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Content, null, children), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.ContentDivider, null), /*#__PURE__*/_react.default.createElement(_Dialog.Dialog.Actions, null, /*#__PURE__*/_react.default.createElement(_StepActionButton.StepActionButton, {
50
50
  isLast: isLast,
51
51
  actionLabel: actionLabel,
52
52
  onNextButtonClick: onActionButtonClick
@@ -1 +1 @@
1
- {"version":3,"file":"Step.js","names":["Step","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","actionLabel","shouldRenderNextButton","changingStepInProgress","skip","onActionButtonClick","useCallback","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"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 skip?: 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 skip = 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 !skip ? (\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 ) : null;\n};\n\nStep.displayName = \"Step\";\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAKkB;AAAA;AAiBX,IAAMA,IAAe,GAAG,SAAlBA,IAAe,OAatB;EAAA,IAZJC,KAAK,QAALA,KAAK;IACLC,MAAM,QAANA,MAAM;IACNC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,iBAAiB,QAAjBA,iBAAiB;IACjBC,qBAAqB,QAArBA,qBAAqB;IACrBC,OAAO,QAAPA,OAAO;IACPC,QAAQ,QAARA,QAAQ;IAAA,wBACRC,WAAW;IAAXA,WAAW,iCAAG,SAAS;IAAA,6BACvBC,sBAAsB;IAAtBA,sBAAsB,sCAAG,IAAI;IAAA,6BAC7BC,sBAAsB;IAAtBA,sBAAsB,sCAAG,KAAK;IAAA,iBAC9BC,IAAI;IAAJA,IAAI,0BAAG,KAAK;EAEZ,IAAMC,mBAAmB,GAAG,IAAAC,kBAAW,EAAC,YAAM;IAC5C,IAAIZ,MAAM,IAAIK,OAAO,EAAE;MACrB,OAAOA,OAAO,EAAE;IAClB;IAEA,OAAOF,iBAAiB,IAAIA,iBAAiB,EAAE;EACjD,CAAC,EAAE,CAACH,MAAM,EAAEK,OAAO,EAAEF,iBAAiB,CAAC,CAAC;EAExC,OAAO,CAACO,IAAI,gBACV,yEACE,6BAAC,wBAAgB,qBACf,6BAAC,4BAAoB,QAClBX,KAAK,IAAIA,KAAK,GAAG,CAAC,gBACjB,6BAAC,cAAM;IACL,OAAO,EAAEK,qBAAsB;IAC/B,OAAO,EAAC,WAAW;IACnB,SAAS,EAAC,kBAAkB;IAC5B,QAAQ,EAAEK;EAAuB,gBAEjC,6BAAC,0BAAmB,OAAG,CAChB,GACP,IAAI,eACR,6BAAC,uBAAe,qBACd,6BAAC,oBAAQ,QAAEP,KAAK,CAAY,eAC5B,6BAAC,mBAAO,QAAED,QAAQ,CAAW,CACb,CACG,eACvB,6BAAC,cAAM;IACL,OAAO,EAAEI,OAAQ;IACjB,OAAO,EAAC,WAAW;IACnB,QAAQ,EAAEI;EAAuB,gBAEjC,6BAAC,sBAAe,OAAG,CACZ,CACQ,eACnB,6BAAC,4BAAoB,OAAG,EACvBD,sBAAsB,gBACrB,yEACE,6BAAC,qBAAa,QAAEF,QAAQ,CAAiB,eACzC,6BAAC,4BAAoB,OAAG,eACxB,6BAAC,qBAAa,qBACZ,6BAAC,kCAAgB;IACf,MAAM,EAAEN,MAAO;IACf,WAAW,EAAEO,WAAY;IACzB,iBAAiB,EAAEI;EAAoB,EACvC,CACY,CACf,gBAEH,6BAAC,wBAAgB,QAAEL,QAAQ,CAC5B,CACA,GACD,IAAI;AACV,CAAC;AAAC;AAEFR,IAAI,CAACe,WAAW,GAAG,MAAM"}
1
+ {"version":3,"file":"Step.js","names":["Step","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","actionLabel","shouldRenderNextButton","changingStepInProgress","skip","onActionButtonClick","useCallback","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\nimport { Button } from \"../Button\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { StepActionButton } from \"./StepActionButton\";\nimport { Dialog } 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 skip?: 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 skip = 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 !skip ? (\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 <Dialog.ContentDivider />\n {shouldRenderNextButton ? (\n <>\n <Dialog.Content>{children}</Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <StepActionButton\n isLast={isLast}\n actionLabel={actionLabel}\n onNextButtonClick={onActionButtonClick}\n />\n </Dialog.Actions>\n </>\n ) : (\n <StyledCustomStep>{children}</StyledCustomStep>\n )}\n </>\n ) : null;\n};\n\nStep.displayName = \"Step\";\n"],"mappings":";;;;;;;AAAA;AACA;A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;EAAuB,gBAEjC,6BAAC,sBAAe,OAAG,CACZ,CACQ,eACnB,6BAAC,cAAM,CAAC,cAAc,OAAG,EACxBD,sBAAsB,gBACrB,yEACE,6BAAC,cAAM,CAAC,OAAO,QAAEF,QAAQ,CAAkB,eAC3C,6BAAC,cAAM,CAAC,cAAc,OAAG,eACzB,6BAAC,cAAM,CAAC,OAAO,qBACb,6BAAC,kCAAgB;IACf,MAAM,EAAEN,MAAO;IACf,WAAW,EAAEO,WAAY;IACzB,iBAAiB,EAAEI;EAAoB,EACvC,CACa,CAChB,gBAEH,6BAAC,wBAAgB,QAAEL,QAAQ,CAC5B,CACA,GACD,IAAI;AACV,CAAC;AAAC;AAEFR,IAAI,CAACe,WAAW,GAAG,MAAM"}
@@ -1,6 +1,2 @@
1
1
  export * from "./Dialog";
2
- export * from "./DialogContent";
3
- export * from "./DialogContentDivider";
4
- export * from "./DialogTitle";
5
- export * from "./DialogActions";
6
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAUzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,15 +1,2 @@
1
1
  export * from "./Dialog";
2
- // @TODO:
3
- // Nakon refaktora Dialog komponente na legacy AC-u i Next-u, obrisati individualne exporte.
4
- // Korisčenje će se svesti samo na `import { Dialog } from @activecollab/components`.
5
-
6
- // <Dialog>
7
- // <Dialog.Title>Hello</Dialog.Title>
8
- // itd...
9
- // </Dialog>
10
-
11
- export * from "./DialogContent";
12
- export * from "./DialogContentDivider";
13
- export * from "./DialogTitle";
14
- export * from "./DialogActions";
15
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n// @TODO:\n// Nakon refaktora Dialog komponente na legacy AC-u i Next-u, obrisati individualne exporte.\n// Korisčenje će se svesti samo na `import { Dialog } from @activecollab/components`.\n\n// <Dialog>\n// <Dialog.Title>Hello</Dialog.Title>\n// itd...\n// </Dialog>\n\nexport * from \"./DialogContent\";\nexport * from \"./DialogContentDivider\";\nexport * from \"./DialogTitle\";\nexport * from \"./DialogActions\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,iBAAiB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n"],"mappings":"AAAA,cAAc,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditableContent.d.ts","sourceRoot":"","sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,GAAG,EAAe,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGnD,MAAM,WAAW,wBAAwB;IAEvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEjD,UAAU,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,yuJA+C3B,CAAC"}
1
+ {"version":3,"file":"EditableContent.d.ts","sourceRoot":"","sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,GAAG,EAAuB,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGnD,MAAM,WAAW,wBAAwB;IAEvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEjD,UAAU,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,yuJAqD3B,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  var _excluded = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef"];
4
- import React, { forwardRef, useCallback } from "react";
4
+ import React, { forwardRef, useCallback, useRef } from "react";
5
+ import { useForkRef } from "../../utils";
5
6
  import { StyledDiv, StyledInput, StyledSpan } from "./Styles";
6
7
  export var EditableContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
8
  var className = _ref.className,
@@ -13,7 +14,12 @@ export var EditableContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
14
  inputProps = _ref.inputProps,
14
15
  wrapRef = _ref.wrapRef,
15
16
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
17
+ var intInputRef = useRef(null);
18
+ var handleRef = useForkRef(ref, intInputRef);
16
19
  var handleBlur = useCallback(function (evt) {
20
+ if (intInputRef != null && intInputRef.current) {
21
+ intInputRef.current.scrollLeft = 0;
22
+ }
17
23
  typeof (inputProps == null ? void 0 : inputProps.onBlur) === "function" && (inputProps == null ? void 0 : inputProps.onBlur(evt));
18
24
  }, [inputProps]);
19
25
  return /*#__PURE__*/React.createElement(StyledDiv, _extends({
@@ -25,7 +31,7 @@ export var EditableContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
25
31
  weight: weight,
26
32
  $disabled: disabled
27
33
  }, inputProps == null ? void 0 : inputProps.value), /*#__PURE__*/React.createElement(StyledInput, _extends({}, inputProps, {
28
- ref: ref,
34
+ ref: handleRef,
29
35
  forwardedAs: "input",
30
36
  variant: variant,
31
37
  weight: weight,
@@ -1 +1 @@
1
- {"version":3,"file":"EditableContent.js","names":["React","forwardRef","useCallback","StyledDiv","StyledInput","StyledSpan","EditableContent","ref","className","variant","weight","disabled","inputProps","wrapRef","props","handleBlur","evt","onBlur","value","displayName"],"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"sourcesContent":["import React, { forwardRef, Ref, useCallback } from \"react\";\nimport { Variant } from \"../Typography/Typography\";\nimport { StyledDiv, StyledInput, StyledSpan } from \"./Styles\";\n\nexport interface EditableContentInterface {\n /** Typography variant. */\n variant?: Variant;\n /** Typography weight. */\n weight?: \"light\" | \"regular\" | \"bold\" | \"medium\";\n /** Input props. */\n inputProps?: Partial<React.ComponentPropsWithoutRef<\"input\">>;\n /** Disable edit mode. */\n disabled?: boolean;\n /** Wrapper reference. */\n wrapRef?: Ref<HTMLDivElement>;\n}\n\nexport const EditableContent = forwardRef<\n HTMLDivElement,\n EditableContentInterface &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof EditableContentInterface>\n>(\n (\n {\n className,\n variant = \"Body 2\",\n weight,\n disabled = false,\n inputProps,\n wrapRef,\n ...props\n },\n ref\n ) => {\n const handleBlur = useCallback(\n (evt) => {\n typeof inputProps?.onBlur === `function` && inputProps?.onBlur(evt);\n },\n [inputProps]\n );\n\n return (\n <StyledDiv className={className} ref={wrapRef} {...props}>\n <StyledSpan\n variant={variant}\n forwardedAs=\"span\"\n weight={weight}\n $disabled={disabled}\n >\n {inputProps?.value}\n </StyledSpan>\n <StyledInput\n {...inputProps}\n ref={ref}\n forwardedAs=\"input\"\n variant={variant}\n weight={weight}\n value={inputProps?.value}\n onBlur={handleBlur}\n disabled={disabled}\n />\n </StyledDiv>\n );\n }\n);\n\nEditableContent.displayName = \"EditableContent\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAOC,WAAW,QAAQ,OAAO;AAE3D,SAASC,SAAS,EAAEC,WAAW,EAAEC,UAAU,QAAQ,UAAU;AAe7D,OAAO,IAAMC,eAAe,gBAAGL,UAAU,CAKvC,gBAUEM,GAAG,EACA;EAAA,IATDC,SAAS,QAATA,SAAS;IAAA,oBACTC,OAAO;IAAPA,OAAO,6BAAG,QAAQ;IAClBC,MAAM,QAANA,MAAM;IAAA,qBACNC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;IAChBC,UAAU,QAAVA,UAAU;IACVC,OAAO,QAAPA,OAAO;IACJC,KAAK;EAIV,IAAMC,UAAU,GAAGb,WAAW,CAC5B,UAACc,GAAG,EAAK;IACP,QAAOJ,UAAU,oBAAVA,UAAU,CAAEK,MAAM,gBAAe,KAAIL,UAAU,oBAAVA,UAAU,CAAEK,MAAM,CAACD,GAAG,CAAC;EACrE,CAAC,EACD,CAACJ,UAAU,CAAC,CACb;EAED,oBACE,oBAAC,SAAS;IAAC,SAAS,EAAEJ,SAAU;IAAC,GAAG,EAAEK;EAAQ,GAAKC,KAAK,gBACtD,oBAAC,UAAU;IACT,OAAO,EAAEL,OAAQ;IACjB,WAAW,EAAC,MAAM;IAClB,MAAM,EAAEC,MAAO;IACf,SAAS,EAAEC;EAAS,GAEnBC,UAAU,oBAAVA,UAAU,CAAEM,KAAK,CACP,eACb,oBAAC,WAAW,eACNN,UAAU;IACd,GAAG,EAAEL,GAAI;IACT,WAAW,EAAC,OAAO;IACnB,OAAO,EAAEE,OAAQ;IACjB,MAAM,EAAEC,MAAO;IACf,KAAK,EAAEE,UAAU,oBAAVA,UAAU,CAAEM,KAAM;IACzB,MAAM,EAAEH,UAAW;IACnB,QAAQ,EAAEJ;EAAS,GACnB,CACQ;AAEhB,CAAC,CACF;AAEDL,eAAe,CAACa,WAAW,GAAG,iBAAiB"}
1
+ {"version":3,"file":"EditableContent.js","names":["React","forwardRef","useCallback","useRef","useForkRef","StyledDiv","StyledInput","StyledSpan","EditableContent","ref","className","variant","weight","disabled","inputProps","wrapRef","props","intInputRef","handleRef","handleBlur","evt","current","scrollLeft","onBlur","value","displayName"],"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"sourcesContent":["import React, { forwardRef, Ref, useCallback, useRef } from \"react\";\nimport { useForkRef } from \"../../utils\";\nimport { Variant } from \"../Typography/Typography\";\nimport { StyledDiv, StyledInput, StyledSpan } from \"./Styles\";\n\nexport interface EditableContentInterface {\n /** Typography variant. */\n variant?: Variant;\n /** Typography weight. */\n weight?: \"light\" | \"regular\" | \"bold\" | \"medium\";\n /** Input props. */\n inputProps?: Partial<React.ComponentPropsWithoutRef<\"input\">>;\n /** Disable edit mode. */\n disabled?: boolean;\n /** Wrapper reference. */\n wrapRef?: Ref<HTMLDivElement>;\n}\n\nexport const EditableContent = forwardRef<\n HTMLDivElement,\n EditableContentInterface &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof EditableContentInterface>\n>(\n (\n {\n className,\n variant = \"Body 2\",\n weight,\n disabled = false,\n inputProps,\n wrapRef,\n ...props\n },\n ref\n ) => {\n const intInputRef = useRef<HTMLInputElement>(null);\n const handleRef = useForkRef(ref, intInputRef);\n\n const handleBlur = useCallback(\n (evt) => {\n if (intInputRef?.current) {\n intInputRef.current.scrollLeft = 0;\n }\n typeof inputProps?.onBlur === `function` && inputProps?.onBlur(evt);\n },\n [inputProps]\n );\n\n return (\n <StyledDiv className={className} ref={wrapRef} {...props}>\n <StyledSpan\n variant={variant}\n forwardedAs=\"span\"\n weight={weight}\n $disabled={disabled}\n >\n {inputProps?.value}\n </StyledSpan>\n <StyledInput\n {...inputProps}\n ref={handleRef}\n forwardedAs=\"input\"\n variant={variant}\n weight={weight}\n value={inputProps?.value}\n onBlur={handleBlur}\n disabled={disabled}\n />\n </StyledDiv>\n );\n }\n);\n\nEditableContent.displayName = \"EditableContent\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAOC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AACnE,SAASC,UAAU,QAAQ,aAAa;AAExC,SAASC,SAAS,EAAEC,WAAW,EAAEC,UAAU,QAAQ,UAAU;AAe7D,OAAO,IAAMC,eAAe,gBAAGP,UAAU,CAKvC,gBAUEQ,GAAG,EACA;EAAA,IATDC,SAAS,QAATA,SAAS;IAAA,oBACTC,OAAO;IAAPA,OAAO,6BAAG,QAAQ;IAClBC,MAAM,QAANA,MAAM;IAAA,qBACNC,QAAQ;IAARA,QAAQ,8BAAG,KAAK;IAChBC,UAAU,QAAVA,UAAU;IACVC,OAAO,QAAPA,OAAO;IACJC,KAAK;EAIV,IAAMC,WAAW,GAAGd,MAAM,CAAmB,IAAI,CAAC;EAClD,IAAMe,SAAS,GAAGd,UAAU,CAACK,GAAG,EAAEQ,WAAW,CAAC;EAE9C,IAAME,UAAU,GAAGjB,WAAW,CAC5B,UAACkB,GAAG,EAAK;IACP,IAAIH,WAAW,YAAXA,WAAW,CAAEI,OAAO,EAAE;MACxBJ,WAAW,CAACI,OAAO,CAACC,UAAU,GAAG,CAAC;IACpC;IACA,QAAOR,UAAU,oBAAVA,UAAU,CAAES,MAAM,gBAAe,KAAIT,UAAU,oBAAVA,UAAU,CAAES,MAAM,CAACH,GAAG,CAAC;EACrE,CAAC,EACD,CAACN,UAAU,CAAC,CACb;EAED,oBACE,oBAAC,SAAS;IAAC,SAAS,EAAEJ,SAAU;IAAC,GAAG,EAAEK;EAAQ,GAAKC,KAAK,gBACtD,oBAAC,UAAU;IACT,OAAO,EAAEL,OAAQ;IACjB,WAAW,EAAC,MAAM;IAClB,MAAM,EAAEC,MAAO;IACf,SAAS,EAAEC;EAAS,GAEnBC,UAAU,oBAAVA,UAAU,CAAEU,KAAK,CACP,eACb,oBAAC,WAAW,eACNV,UAAU;IACd,GAAG,EAAEI,SAAU;IACf,WAAW,EAAC,OAAO;IACnB,OAAO,EAAEP,OAAQ;IACjB,MAAM,EAAEC,MAAO;IACf,KAAK,EAAEE,UAAU,oBAAVA,UAAU,CAAEU,KAAM;IACzB,MAAM,EAAEL,UAAW;IACnB,QAAQ,EAAEN;EAAS,GACnB,CACQ;AAEhB,CAAC,CACF;AAEDL,eAAe,CAACiB,WAAW,GAAG,iBAAiB"}
@@ -2,7 +2,7 @@ import React, { useCallback } from "react";
2
2
  import { Button } from "../Button";
3
3
  import { ArrowBackMobileIcon, CancelCrossIcon } from "../Icons";
4
4
  import { StepActionButton } from "./StepActionButton";
5
- import { DialogActions, DialogContent, DialogContentDivider } from "../Dialog";
5
+ import { Dialog } from "../Dialog";
6
6
  import { Caption2, Header3 } from "../Typography";
7
7
  import { StyledStepTitle, StyledStepHeaderLeft, StyledStepHeader, StyledCustomStep } from "./Styles";
8
8
  export var Step = function Step(_ref) {
@@ -37,7 +37,7 @@ export var Step = function Step(_ref) {
37
37
  onClick: onClose,
38
38
  variant: "text gray",
39
39
  disabled: changingStepInProgress
40
- }, /*#__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
+ }, /*#__PURE__*/React.createElement(CancelCrossIcon, null))), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dialog.Content, null, children), /*#__PURE__*/React.createElement(Dialog.ContentDivider, null), /*#__PURE__*/React.createElement(Dialog.Actions, null, /*#__PURE__*/React.createElement(StepActionButton, {
41
41
  isLast: isLast,
42
42
  actionLabel: actionLabel,
43
43
  onNextButtonClick: onActionButtonClick
@@ -1 +1 @@
1
- {"version":3,"file":"Step.js","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","skip","onActionButtonClick","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"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 skip?: 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 skip = 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 !skip ? (\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 ) : null;\n};\n\nStep.displayName = \"Step\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAmBC,WAAW,QAAQ,OAAO;AACzD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,UAAU;AAC/D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,aAAa,EAAEC,aAAa,EAAEC,oBAAoB,QAAQ,WAAW;AAC9E,SAASC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AACjD,SACEC,eAAe,EACfC,oBAAoB,EACpBC,gBAAgB,EAChBC,gBAAgB,QACX,UAAU;AAiBjB,OAAO,IAAMC,IAAe,GAAG,SAAlBA,IAAe,OAatB;EAAA,IAZJC,KAAK,QAALA,KAAK;IACLC,MAAM,QAANA,MAAM;IACNC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,iBAAiB,QAAjBA,iBAAiB;IACjBC,qBAAqB,QAArBA,qBAAqB;IACrBC,OAAO,QAAPA,OAAO;IACPC,QAAQ,QAARA,QAAQ;IAAA,wBACRC,WAA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,QAAQ,CAC5B,CACA,GACD,IAAI;AACV,CAAC;AAEDR,IAAI,CAACc,WAAW,GAAG,MAAM"}
1
+ {"version":3,"file":"Step.js","names":["React","useCallback","Button","ArrowBackMobileIcon","CancelCrossIcon","StepActionButton","Dialog","Caption2","Header3","StyledStepTitle","StyledStepHeaderLeft","StyledStepHeader","StyledCustomStep","Step","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","actionLabel","shouldRenderNextButton","changingStepInProgress","skip","onActionButtonClick","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\nimport { Button } from \"../Button\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { StepActionButton } from \"./StepActionButton\";\nimport { Dialog } 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 skip?: 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 skip = 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 !skip ? (\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 <Dialog.ContentDivider />\n {shouldRenderNextButton ? (\n <>\n <Dialog.Content>{children}</Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <StepActionButton\n isLast={isLast}\n actionLabel={actionLabel}\n onNextButtonClick={onActionButtonClick}\n />\n </Dialog.Actions>\n </>\n ) : (\n <StyledCustomStep>{children}</StyledCustomStep>\n )}\n </>\n ) : null;\n};\n\nStep.displayName = \"Step\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAmBC,WAAW,QAAQ,OAAO;AACzD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,UAAU;AAC/D,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AACjD,SACEC,eAAe,EACfC,oBAAoB,EACpBC,gBAAgB,EAChBC,gBAAgB,QACX,UAAU;AAiBjB,OAAO,IAAMC,IAAe,GAAG,SAAlBA,IAAe,OAatB;EAAA,IAZJC,KAAK,QAALA,KAAK;IACLC,MAAM,QAANA,MAAM;IACNC,QAAQ,QAARA,QAAQ;IACRC,KAAK,QAALA,KAAK;IACLC,iBAAiB,QAAjBA,iBAAiB;IACjBC,qBAAqB,QAArBA,qBAAqB;IACrBC,OAAO,QAAPA,OAAO;IACPC,QAAQ,QAARA,QAAQ;IAAA,wBACRC,WAAW;IAAXA,WAAW,iCAAG,SAAS;IAAA,6BACvBC,sBAAsB;IAAtBA,sBAAsB,sCAAG,IAAI;IAAA,6BAC7BC,sBAAsB;IAAtBA,sBAAsB,sCAA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dist/index.js CHANGED
@@ -11600,7 +11600,12 @@
11600
11600
  inputProps = _ref.inputProps,
11601
11601
  wrapRef = _ref.wrapRef,
11602
11602
  props = _objectWithoutProperties(_ref, _excluded$5);
11603
+ var intInputRef = React.useRef(null);
11604
+ var handleRef = useForkRef(ref, intInputRef);
11603
11605
  var handleBlur = React.useCallback(function (evt) {
11606
+ if (intInputRef !== null && intInputRef !== void 0 && intInputRef.current) {
11607
+ intInputRef.current.scrollLeft = 0;
11608
+ }
11604
11609
  typeof (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur) === "function" && (inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur(evt));
11605
11610
  }, [inputProps]);
11606
11611
  return /*#__PURE__*/React__default["default"].createElement(StyledDiv, _extends({
@@ -11612,7 +11617,7 @@
11612
11617
  weight: weight,
11613
11618
  $disabled: disabled
11614
11619
  }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.value), /*#__PURE__*/React__default["default"].createElement(StyledInput, _extends({}, inputProps, {
11615
- ref: ref,
11620
+ ref: handleRef,
11616
11621
  forwardedAs: "input",
11617
11622
  variant: variant,
11618
11623
  weight: weight,
@@ -12292,7 +12297,7 @@
12292
12297
  onClick: onClose,
12293
12298
  variant: "text gray",
12294
12299
  disabled: changingStepInProgress
12295
- }, /*#__PURE__*/React__default["default"].createElement(CancelCrossIcon$1, null))), /*#__PURE__*/React__default["default"].createElement(DialogContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(DialogContent, null, children), /*#__PURE__*/React__default["default"].createElement(DialogContentDivider, null), /*#__PURE__*/React__default["default"].createElement(DialogActions, null, /*#__PURE__*/React__default["default"].createElement(StepActionButton, {
12300
+ }, /*#__PURE__*/React__default["default"].createElement(CancelCrossIcon$1, null))), /*#__PURE__*/React__default["default"].createElement(Dialog.ContentDivider, null), shouldRenderNextButton ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Dialog.Content, null, children), /*#__PURE__*/React__default["default"].createElement(Dialog.ContentDivider, null), /*#__PURE__*/React__default["default"].createElement(Dialog.Actions, null, /*#__PURE__*/React__default["default"].createElement(StepActionButton, {
12296
12301
  isLast: isLast,
12297
12302
  actionLabel: actionLabel,
12298
12303
  onNextButtonClick: onActionButtonClick
@@ -12452,10 +12457,6 @@
12452
12457
  exports.DependencyIcon = DependencyIcon$1;
12453
12458
  exports.DependencySmallIcon = DependencySmallIcon$1;
12454
12459
  exports.Dialog = Dialog;
12455
- exports.DialogActions = DialogActions;
12456
- exports.DialogContent = DialogContent;
12457
- exports.DialogContentDivider = DialogContentDivider;
12458
- exports.DialogTitle = DialogTitle;
12459
12460
  exports.DiscussionAddIcon = DiscussionAddIcon$1;
12460
12461
  exports.DollarCheckmarkIcon = DollarCheckmarkIcon$1;
12461
12462
  exports.DollarCheckmarkSmallIcon = DollarCheckmarkSmallIcon$1;