@alfalab/core-components-steps 1.7.5 → 1.8.0

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 (75) hide show
  1. package/Component.d.ts +8 -33
  2. package/Component.js +6 -3
  3. package/components/step/Component.d.ts +9 -33
  4. package/components/step/Component.js +26 -14
  5. package/components/step/index.css +44 -39
  6. package/components/step-indicator/Component.js +1 -1
  7. package/components/step-indicator/index.css +6 -3
  8. package/cssm/Component.d.ts +8 -33
  9. package/cssm/Component.js +5 -2
  10. package/cssm/components/step/Component.d.ts +9 -33
  11. package/cssm/components/step/Component.js +25 -13
  12. package/cssm/components/step/index.module.css +21 -16
  13. package/cssm/components/step-indicator/index.module.css +4 -1
  14. package/cssm/index.module.css +3 -0
  15. package/cssm/shared/index.d.ts +1 -0
  16. package/cssm/shared/index.js +9 -0
  17. package/cssm/types/common-props.d.ts +41 -0
  18. package/cssm/types/common-props.js +2 -0
  19. package/cssm/utils/getStepsTestIds.d.ts +5 -0
  20. package/cssm/utils/getStepsTestIds.js +14 -0
  21. package/esm/Component.d.ts +8 -33
  22. package/esm/Component.js +6 -3
  23. package/esm/components/step/Component.d.ts +9 -33
  24. package/esm/components/step/Component.js +26 -14
  25. package/esm/components/step/index.css +44 -39
  26. package/esm/components/step-indicator/Component.js +1 -1
  27. package/esm/components/step-indicator/index.css +6 -3
  28. package/esm/index.css +6 -3
  29. package/esm/shared/index.d.ts +1 -0
  30. package/esm/shared/index.js +1 -0
  31. package/esm/types/common-props.d.ts +41 -0
  32. package/esm/types/common-props.js +1 -0
  33. package/esm/utils/getStepsTestIds.d.ts +5 -0
  34. package/esm/utils/getStepsTestIds.js +10 -0
  35. package/index.css +6 -3
  36. package/modern/Component.d.ts +8 -33
  37. package/modern/Component.js +6 -3
  38. package/modern/components/step/Component.d.ts +9 -33
  39. package/modern/components/step/Component.js +27 -13
  40. package/modern/components/step/index.css +44 -39
  41. package/modern/components/step-indicator/Component.js +1 -1
  42. package/modern/components/step-indicator/index.css +6 -3
  43. package/modern/index.css +6 -3
  44. package/modern/shared/index.d.ts +1 -0
  45. package/modern/shared/index.js +1 -0
  46. package/modern/types/common-props.d.ts +41 -0
  47. package/modern/types/common-props.js +1 -0
  48. package/modern/utils/getStepsTestIds.d.ts +5 -0
  49. package/modern/utils/getStepsTestIds.js +10 -0
  50. package/moderncssm/Component.d.ts +8 -33
  51. package/moderncssm/Component.js +5 -2
  52. package/moderncssm/components/step/Component.d.ts +9 -33
  53. package/moderncssm/components/step/Component.js +26 -12
  54. package/moderncssm/components/step/index.module.css +18 -18
  55. package/moderncssm/shared/index.d.ts +1 -0
  56. package/moderncssm/shared/index.js +1 -0
  57. package/moderncssm/types/common-props.d.ts +41 -0
  58. package/moderncssm/types/common-props.js +1 -0
  59. package/moderncssm/utils/getStepsTestIds.d.ts +5 -0
  60. package/moderncssm/utils/getStepsTestIds.js +10 -0
  61. package/package.json +4 -3
  62. package/shared/index.d.ts +1 -0
  63. package/shared/index.js +9 -0
  64. package/shared/package.json +3 -0
  65. package/src/Component.tsx +18 -40
  66. package/src/components/step/Component.tsx +49 -57
  67. package/src/components/step/index.module.css +19 -17
  68. package/src/shared/index.ts +1 -0
  69. package/src/shared/package.json +3 -0
  70. package/src/types/common-props.ts +48 -0
  71. package/src/utils/getStepsTestIds.ts +8 -0
  72. package/types/common-props.d.ts +41 -0
  73. package/types/common-props.js +2 -0
  74. package/utils/getStepsTestIds.d.ts +5 -0
  75. package/utils/getStepsTestIds.js +14 -0
package/Component.d.ts CHANGED
@@ -1,16 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ReactNode } from "react";
4
3
  import { StepIndicatorProps } from "./components/step-indicator/index";
4
+ import { CommonProps } from "./types/common-props";
5
5
  type StepsProps = {
6
6
  /**
7
7
  * Дополнительный класс
8
8
  */
9
9
  className?: string;
10
- /**
11
- * Дочерние элементы
12
- */
13
- children: ReactNode;
14
10
  /**
15
11
  * Активный шаг, указанный по умолчанию
16
12
  * @default 1
@@ -25,29 +21,6 @@ type StepsProps = {
25
21
  * @default true
26
22
  */
27
23
  isMarkCompletedSteps?: boolean;
28
- /**
29
- * Управление ориентацией компонента
30
- * @default false
31
- */
32
- isVerticalAlign?: boolean;
33
- /**
34
- * Управление отображением номера шага
35
- */
36
- ordered?: boolean;
37
- /**
38
- * Включение / отключение интерактивности шагов
39
- */
40
- interactive?: boolean;
41
- /**
42
- * Растягивание шагов на всю ширину блока для вертикальной ориентации
43
- * @default false
44
- */
45
- fullWidth?: boolean;
46
- /**
47
- * Минимальное расстояние между шагами
48
- * @default 24
49
- */
50
- minSpaceBetweenSteps?: 8 | 16 | 24;
51
24
  /**
52
25
  * Кастомный метод для управления состоянием disabled шага и
53
26
  * возможностью перехода на этот шаг
@@ -61,6 +34,12 @@ type StepsProps = {
61
34
  * @return Флаг состояния error
62
35
  */
63
36
  checkIsStepError?: (stepNumber: number) => boolean;
37
+ /**
38
+ * Кастомный метод для управления состоянием шага criticalError
39
+ * @param stepNumber - номер шага
40
+ * @return Флаг состояния error
41
+ */
42
+ checkIsStepCriticalError?: (stepNumber: number) => boolean;
64
43
  /**
65
44
  * Кастомный метод для управления состоянием шага warning
66
45
  * @param stepNumber - номер шага
@@ -90,10 +69,6 @@ type StepsProps = {
90
69
  * @param stepNumber - номер активного шага
91
70
  */
92
71
  onChange?: (stepNumber: number) => void;
93
- /**
94
- * Идентификатор для систем автоматизированного тестирования
95
- */
96
- dataTestId?: string;
97
- };
72
+ } & CommonProps;
98
73
  declare const Steps: React.FC<StepsProps>;
99
74
  export { StepsProps, Steps };
package/Component.js CHANGED
@@ -11,12 +11,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
13
 
14
- var styles = {"component":"steps__component_eyi6g","vertical":"steps__vertical_eyi6g"};
14
+ var styles = {"component":"steps__component_4vqw7","vertical":"steps__vertical_4vqw7"};
15
15
  require('./index.css')
16
16
 
17
17
  var Steps = function (_a) {
18
18
  var _b;
19
- var className = _a.className, children = _a.children, _c = _a.defaultActiveStep, defaultActiveStep = _c === void 0 ? 1 : _c, activeStepProp = _a.activeStep, _d = _a.isMarkCompletedSteps, isMarkCompletedSteps = _d === void 0 ? true : _d, _e = _a.isVerticalAlign, isVerticalAlign = _e === void 0 ? false : _e, _f = _a.ordered, ordered = _f === void 0 ? true : _f, _g = _a.interactive, interactive = _g === void 0 ? true : _g, _h = _a.fullWidth, fullWidth = _h === void 0 ? false : _h, _j = _a.minSpaceBetweenSteps, minSpaceBetweenSteps = _j === void 0 ? 24 : _j, checkIsStepDisabled = _a.checkIsStepDisabled, checkIsStepError = _a.checkIsStepError, checkIsStepWarning = _a.checkIsStepWarning, checkIsStepWaiting = _a.checkIsStepWaiting, checkIsStepPositive = _a.checkIsStepPositive, checkIsStepCustom = _a.checkIsStepCustom, onChange = _a.onChange, dataTestId = _a.dataTestId;
19
+ var className = _a.className, children = _a.children, _c = _a.defaultActiveStep, defaultActiveStep = _c === void 0 ? 1 : _c, activeStepProp = _a.activeStep, _d = _a.isMarkCompletedSteps, isMarkCompletedSteps = _d === void 0 ? true : _d, _e = _a.isVerticalAlign, isVerticalAlign = _e === void 0 ? false : _e, _f = _a.ordered, ordered = _f === void 0 ? true : _f, _g = _a.interactive, interactive = _g === void 0 ? true : _g, _h = _a.fullWidth, fullWidth = _h === void 0 ? false : _h, _j = _a.minSpaceBetweenSteps, minSpaceBetweenSteps = _j === void 0 ? 24 : _j, checkIsStepDisabled = _a.checkIsStepDisabled, checkIsStepError = _a.checkIsStepError, checkIsStepCriticalError = _a.checkIsStepCriticalError, checkIsStepWarning = _a.checkIsStepWarning, checkIsStepWaiting = _a.checkIsStepWaiting, checkIsStepPositive = _a.checkIsStepPositive, checkIsStepCustom = _a.checkIsStepCustom, onChange = _a.onChange, dataTestId = _a.dataTestId, completedDashColor = _a.completedDashColor;
20
20
  var uncontrolled = activeStepProp === undefined;
21
21
  var _k = React.useState(defaultActiveStep), activeStep = _k[0], setActiveStep = _k[1];
22
22
  var stepsLength = React__default.default.Children.count(children);
@@ -40,12 +40,15 @@ var Steps = function (_a) {
40
40
  var disabled = checkIsStepDisabled ? checkIsStepDisabled(stepNumber) : false;
41
41
  var isPositive = checkIsStepPositive ? checkIsStepPositive(stepNumber) : false;
42
42
  var isError = checkIsStepError ? checkIsStepError(stepNumber) : false;
43
+ var isCriticalError = checkIsStepCriticalError
44
+ ? checkIsStepCriticalError(stepNumber)
45
+ : false;
43
46
  var isWarning = checkIsStepWarning ? checkIsStepWarning(stepNumber) : false;
44
47
  var isWaiting = checkIsStepWaiting ? checkIsStepWaiting(stepNumber) : false;
45
48
  var customStepIndicator = checkIsStepCustom && checkIsStepCustom(stepNumber);
46
49
  var isNotLastStep = stepsLength !== stepNumber;
47
50
  var isInteractive = !disabled && interactive;
48
- return (React__default.default.createElement(components_step_Component.Step, { stepNumber: stepNumber, isSelected: isSelected, isStepCompleted: isStepCompleted, disabled: disabled, isPositive: isPositive, isError: isError, isWarning: isWarning, isWaiting: isWaiting, customStepIndicator: customStepIndicator, onClick: handleStepClick, ordered: ordered, interactive: isInteractive, isVerticalAlign: isVerticalAlign, isNotLastStep: isNotLastStep, key: stepNumber, fullWidth: fullWidth, minSpaceBetweenSteps: minSpaceBetweenSteps }, step));
51
+ return (React__default.default.createElement(components_step_Component.Step, { stepNumber: stepNumber, isSelected: isSelected, isStepCompleted: isStepCompleted, disabled: disabled, isPositive: isPositive, isError: isError, isCriticalError: isCriticalError, isWarning: isWarning, isWaiting: isWaiting, customStepIndicator: customStepIndicator, onClick: handleStepClick, ordered: ordered, interactive: isInteractive, isVerticalAlign: isVerticalAlign, isNotLastStep: isNotLastStep, key: stepNumber, fullWidth: fullWidth, minSpaceBetweenSteps: minSpaceBetweenSteps, completedDashColor: completedDashColor, dataTestId: dataTestId }, step));
49
52
  })));
50
53
  };
51
54
 
@@ -1,12 +1,7 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { ReactNode } from "react";
1
+ import { FC } from 'react';
2
+ import { CommonProps } from "../../types/common-props";
4
3
  import { StepIndicatorProps } from "../step-indicator/index";
5
4
  type StepProps = {
6
- /**
7
- * Название шага
8
- */
9
- children: ReactNode;
10
5
  /**
11
6
  * Номер шага
12
7
  */
@@ -19,14 +14,6 @@ type StepProps = {
19
14
  * Маркер того, что текущий шаг доступен для клика
20
15
  */
21
16
  disabled: boolean;
22
- /**
23
- * Управление отображением номера шага
24
- */
25
- ordered?: boolean;
26
- /**
27
- * Включение / отключение интерактивности шагов
28
- */
29
- interactive?: boolean;
30
17
  /**
31
18
  * Маркер того, что текущий шаг находится в состоянии "Positive"
32
19
  */
@@ -35,6 +22,10 @@ type StepProps = {
35
22
  * Маркер того, что текущий шаг находится в состоянии "Error"
36
23
  */
37
24
  isError: boolean;
25
+ /**
26
+ * Маркер того, что текущий шаг находится в состоянии "isCriticalError"
27
+ */
28
+ isCriticalError: boolean;
38
29
  /**
39
30
  * Маркер того, что текущий шаг находится в состоянии "Warning"
40
31
  */
@@ -51,30 +42,15 @@ type StepProps = {
51
42
  * Свойства кастомного индикатора текущего шага
52
43
  */
53
44
  customStepIndicator?: StepIndicatorProps | null;
54
- /**
55
- * Управление ориентацией компонента
56
- * @default false
57
- */
58
- isVerticalAlign?: boolean;
59
45
  /**
60
46
  * Указывает, является ли текущий шаг последним в списке
61
47
  */
62
48
  isNotLastStep?: boolean;
63
- /**
64
- * Маркер того, что шаг растягивается на всю ширину блока
65
- * для вертикальной ориентации
66
- */
67
- fullWidth?: boolean;
68
- /**
69
- * Минимальное расстояние между шагами
70
- * @default 24
71
- */
72
- minSpaceBetweenSteps?: 8 | 16 | 24;
73
49
  /**
74
50
  * Обработчик нажатия на текущей шаг
75
51
  * @param stepNumber - номер шага
76
52
  */
77
53
  onClick: (stepNumber: number) => void;
78
- };
79
- declare const Step: React.FC<StepProps>;
80
- export { StepProps, Step };
54
+ } & CommonProps;
55
+ declare const Step: FC<StepProps>;
56
+ export { Step };
@@ -5,9 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
+ var coreComponentsShared = require('@alfalab/core-components-shared');
8
9
  var hooks = require('@alfalab/hooks');
9
10
  var CheckmarkCircleMIcon = require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
10
11
  var ClockMIcon = require('@alfalab/icons-glyph/ClockMIcon');
12
+ var CrossCompactMIcon = require('@alfalab/icons-glyph/CrossCompactMIcon');
11
13
  var ExclamationCircleMIcon = require('@alfalab/icons-glyph/ExclamationCircleMIcon');
12
14
  var components_stepIndicator_Component = require('../step-indicator/Component.js');
13
15
 
@@ -16,17 +18,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
16
18
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
17
19
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
18
20
 
19
- var styles = {"step":"steps__step_13yrt","vertical":"steps__vertical_13yrt","interactive":"steps__interactive_13yrt","disabled":"steps__disabled_13yrt","text":"steps__text_13yrt","indicator":"steps__indicator_13yrt","option":"steps__option_13yrt","dash":"steps__dash_13yrt","size-16":"steps__size-16_13yrt","size-8":"steps__size-8_13yrt","completed":"steps__completed_13yrt","focused":"steps__focused_13yrt","selected":"steps__selected_13yrt","checkbox":"steps__checkbox_13yrt","dot":"steps__dot_13yrt","error":"steps__error_13yrt","unordered":"steps__unordered_13yrt","completedIndicator":"steps__completedIndicator_13yrt","fullWidth":"steps__fullWidth_13yrt"};
21
+ var styles = {"step":"steps__step_1aema","horizontal":"steps__horizontal_1aema","vertical":"steps__vertical_1aema","interactive":"steps__interactive_1aema","disabled":"steps__disabled_1aema","text":"steps__text_1aema","indicator":"steps__indicator_1aema","option":"steps__option_1aema","dash":"steps__dash_1aema","completed":"steps__completed_1aema","textWrapper":"steps__textWrapper_1aema","gap-24":"steps__gap-24_1aema","gap-32":"steps__gap-32_1aema","focused":"steps__focused_1aema","selected":"steps__selected_1aema","checkbox":"steps__checkbox_1aema","dot":"steps__dot_1aema","error":"steps__error_1aema","unordered":"steps__unordered_1aema","completedIndicator":"steps__completedIndicator_1aema","fullWidth":"steps__fullWidth_1aema"};
20
22
  require('./index.css')
21
23
 
22
- var SIZE_TO_CLASSNAME_MAP = {
23
- 8: 'size-8',
24
- 16: 'size-16',
25
- 24: 'size-24',
26
- };
27
24
  var Step = function (_a) {
28
- var _b, _c, _d, _e;
29
- var children = _a.children, stepNumber = _a.stepNumber, isSelected = _a.isSelected, disabled = _a.disabled, ordered = _a.ordered, isPositive = _a.isPositive, isError = _a.isError, isWarning = _a.isWarning, isWaiting = _a.isWaiting, customStepIndicator = _a.customStepIndicator, isStepCompleted = _a.isStepCompleted, onClick = _a.onClick, interactive = _a.interactive, isVerticalAlign = _a.isVerticalAlign, isNotLastStep = _a.isNotLastStep, fullWidth = _a.fullWidth, _f = _a.minSpaceBetweenSteps, minSpaceBetweenSteps = _f === void 0 ? 24 : _f;
25
+ var _b, _c, _d, _e, _f;
26
+ var children = _a.children, stepNumber = _a.stepNumber, isSelected = _a.isSelected, disabled = _a.disabled, ordered = _a.ordered, isPositive = _a.isPositive, isError = _a.isError, isCriticalError = _a.isCriticalError, isWarning = _a.isWarning, isWaiting = _a.isWaiting, customStepIndicator = _a.customStepIndicator, isStepCompleted = _a.isStepCompleted, onClick = _a.onClick, interactive = _a.interactive, isVerticalAlign = _a.isVerticalAlign, isNotLastStep = _a.isNotLastStep, fullWidth = _a.fullWidth, _g = _a.minSpaceBetweenSteps, minSpaceBetweenSteps = _g === void 0 ? 24 : _g, completedDashColor = _a.completedDashColor, dataTestId = _a.dataTestId;
30
27
  var stepRef = React.useRef(null);
31
28
  var focused = hooks.useFocus(stepRef, 'keyboard')[0];
32
29
  var handleButtonClick = function () {
@@ -48,6 +45,9 @@ var Step = function (_a) {
48
45
  if (customStepIndicator) {
49
46
  return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, tslib.__assign({}, customStepIndicator));
50
47
  }
48
+ if (isCriticalError) {
49
+ return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'negative', content: React__default.default.createElement(CrossCompactMIcon.CrossCompactMIcon, null) });
50
+ }
51
51
  if (isError) {
52
52
  return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'negative', content: React__default.default.createElement(ExclamationCircleMIcon.ExclamationCircleMIcon, null) });
53
53
  }
@@ -69,14 +69,22 @@ var Step = function (_a) {
69
69
  }
70
70
  return stepNumber;
71
71
  };
72
+ var getCustomDashColor = function () {
73
+ if (isStepCompleted && completedDashColor) {
74
+ return {
75
+ borderColor: completedDashColor,
76
+ };
77
+ }
78
+ return {};
79
+ };
72
80
  var renderDash = function () {
73
81
  var _a;
74
82
  return (React__default.default.createElement("div", { className: cn__default.default(styles.dash, (_a = {},
75
83
  _a[styles.vertical] = isVerticalAlign,
76
84
  _a[styles.completed] = isStepCompleted,
77
- _a), styles[SIZE_TO_CLASSNAME_MAP[minSpaceBetweenSteps]]) }));
85
+ _a)), style: tslib.__assign({}, getCustomDashColor()) }));
78
86
  };
79
- return (React__default.default.createElement("div", { role: 'button', tabIndex: 0, ref: stepRef, className: cn__default.default(styles.step, (_b = {},
87
+ return (React__default.default.createElement("div", { "data-test-id": coreComponentsShared.getDataTestId(dataTestId, 'step'), role: 'button', tabIndex: 0, ref: stepRef, className: cn__default.default(styles.step, (_b = {},
80
88
  _b[styles.completed] = isStepCompleted,
81
89
  _b[styles.error] = isError,
82
90
  _b[styles.selected] = isSelected,
@@ -85,6 +93,7 @@ var Step = function (_a) {
85
93
  _b[styles.vertical] = isVerticalAlign,
86
94
  _b[styles.interactive] = interactive,
87
95
  _b[styles.fullWidth] = fullWidth && isVerticalAlign,
96
+ _b[styles.horizontal] = !isVerticalAlign,
88
97
  _b)), onClick: handleButtonClick, onKeyDown: handleKeyDown },
89
98
  React__default.default.createElement("div", { className: cn__default.default(styles.indicator, (_c = {},
90
99
  _c[styles.vertical] = isVerticalAlign,
@@ -96,10 +105,13 @@ var Step = function (_a) {
96
105
  _d[styles.error] = isError,
97
106
  _d)) }, getStepIndicator()),
98
107
  isNotLastStep && isVerticalAlign && renderDash()),
99
- React__default.default.createElement("div", { className: cn__default.default(styles.text, (_e = {},
100
- _e[styles.interactive] = interactive,
101
- _e[styles.fullWidth] = fullWidth && isVerticalAlign,
102
- _e)), onClick: handleTextClick }, children),
108
+ React__default.default.createElement("div", { className: cn__default.default(styles.textWrapper, styles["gap-".concat(minSpaceBetweenSteps)], (_e = {},
109
+ _e[styles.vertical] = isVerticalAlign,
110
+ _e)) },
111
+ React__default.default.createElement("div", { className: cn__default.default(styles.text, (_f = {},
112
+ _f[styles.interactive] = interactive,
113
+ _f[styles.fullWidth] = fullWidth && isVerticalAlign,
114
+ _f)), onClick: handleTextClick }, children)),
103
115
  isNotLastStep && !isVerticalAlign && renderDash()));
104
116
  };
105
117
 
@@ -1,4 +1,4 @@
1
- /* hash: 19qpt */
1
+ /* hash: uhdkm */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-translucent-1300: rgba(3, 3, 6, 0.88);
@@ -25,39 +25,46 @@
25
25
  } :root {
26
26
  --gap-3xs: 2px; /* deprecated */
27
27
  --gap-2xs: 4px; /* deprecated */
28
- --gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
28
+ --gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */
29
+ --gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
29
30
 
30
31
  /* новые значения, используйте их */
31
- --gap-0: 0;
32
+
33
+ /* no-unit может приводить к проблемам в calc (#1559) */
34
+ /* stylelint-disable-next-line length-zero-no-unit */
35
+ --gap-0: 0px;
32
36
  --gap-2: var(--gap-3xs);
33
37
  --gap-4: var(--gap-2xs);
34
38
  --gap-8: var(--gap-xs);
39
+ --gap-16: var(--gap-m);
35
40
  } :root {
36
41
  } :root {
37
42
  --focus-color: var(--color-light-status-info);
38
43
  } /* сбрасывает синюю подсветку при нажатии */ :root {
39
44
  --steps-option-svg-color: var(--color-light-status-positive);
40
45
  --steps-dash-border: 2px solid var(--color-light-status-positive);
41
- } .steps__step_13yrt {
46
+ } .steps__step_1aema {
42
47
  display: flex;
43
48
  outline: none
44
- } .steps__step_13yrt:not(.steps__vertical_13yrt) {
49
+ } .steps__step_1aema.steps__horizontal_1aema {
50
+ flex-grow: 1;
51
+ } .steps__step_1aema:not(.steps__vertical_1aema) {
45
52
  align-items: center;
46
- } .steps__step_13yrt.steps__interactive_13yrt:not(.steps__disabled_13yrt):hover {
53
+ } .steps__step_1aema.steps__interactive_1aema:not(.steps__disabled_1aema):hover {
47
54
  cursor: pointer;
48
- } .steps__step_13yrt.steps__disabled_13yrt:hover .steps__text_13yrt {
55
+ } .steps__step_1aema.steps__disabled_1aema:hover .steps__text_1aema {
49
56
  background: unset;
50
- } .steps__step_13yrt.steps__disabled_13yrt .steps__indicator_13yrt {
57
+ } .steps__step_1aema.steps__disabled_1aema .steps__indicator_1aema {
51
58
  cursor: unset;
52
- } .steps__indicator_13yrt {
59
+ } .steps__indicator_1aema {
53
60
  cursor: pointer;
54
61
  display: flex;
55
62
  align-items: center;
56
63
  margin-right: var(--gap-4)
57
- } .steps__indicator_13yrt.steps__vertical_13yrt {
64
+ } .steps__indicator_1aema.steps__vertical_1aema {
58
65
  flex-direction: column;
59
66
  margin-right: var(--gap-8);
60
- } .steps__option_13yrt {
67
+ } .steps__option_1aema {
61
68
  font-size: 14px;
62
69
  line-height: 20px;
63
70
  font-weight: 700;
@@ -70,33 +77,31 @@
70
77
  min-width: 24px;
71
78
  height: 24px;
72
79
  border-radius: var(--border-radius-circle)
73
- } .steps__option_13yrt.steps__vertical_13yrt {
80
+ } .steps__option_1aema.steps__vertical_1aema {
74
81
  margin-top: var(--gap-8);
75
- } .steps__dash_13yrt {
82
+ } .steps__dash_1aema {
76
83
  flex: 1 1 auto;
77
84
  min-width: 24px;
78
85
  border-top: 2px solid var(--color-light-neutral-translucent-300);
79
86
  margin-right: var(--gap-8)
80
- } .steps__dash_13yrt.steps__size-16_13yrt {
81
- min-width: 16px;
82
- } .steps__dash_13yrt.steps__size-8_13yrt {
83
- min-width: 8px;
84
- } .steps__dash_13yrt.steps__completed_13yrt {
87
+ } .steps__dash_1aema.steps__completed_1aema {
85
88
  border-top: var(--steps-dash-border);
86
- } .steps__dash_13yrt.steps__vertical_13yrt {
89
+ } .steps__dash_1aema.steps__vertical_1aema {
87
90
  min-width: unset;
88
- min-height: 24px;
91
+ min-height: 8px;
89
92
  margin-right: var(--gap-0);
90
93
  margin-top: var(--gap-8);
91
94
  border-left: 2px solid var(--color-light-neutral-translucent-300);
92
- border-top: none
93
- } .steps__dash_13yrt.steps__vertical_13yrt.steps__size-16_13yrt {
94
- min-height: 16px;
95
- } .steps__dash_13yrt.steps__vertical_13yrt.steps__size-8_13yrt {
96
- min-height: 8px;
97
- } .steps__dash_13yrt.steps__completed_13yrt.steps__vertical_13yrt {
95
+ border-top: none;
96
+ } .steps__dash_1aema.steps__completed_1aema.steps__vertical_1aema {
98
97
  border-left: var(--steps-dash-border);
99
- } .steps__text_13yrt {
98
+ } .steps__textWrapper_1aema.steps__vertical_1aema {
99
+ min-height: 48px
100
+ } .steps__textWrapper_1aema.steps__vertical_1aema.steps__gap-24_1aema {
101
+ margin-bottom: var(--gap-8);
102
+ } .steps__textWrapper_1aema.steps__vertical_1aema.steps__gap-32_1aema {
103
+ margin-bottom: var(--gap-16);
104
+ } .steps__text_1aema {
100
105
  font-size: 16px;
101
106
  line-height: 24px;
102
107
  font-weight: 400;
@@ -106,19 +111,19 @@
106
111
  color: var(--color-light-text-primary);
107
112
  border-radius: var(--gap-8);
108
113
  height: min-content
109
- } .steps__text_13yrt.steps__interactive_13yrt:not(.steps__disabled_13yrt):hover {
114
+ } .steps__text_1aema.steps__interactive_1aema:not(.steps__disabled_1aema):hover {
110
115
  background: var(--color-light-transparent-default-hover);
111
- } .steps__text_13yrt.steps__interactive_13yrt:not(.steps__disabled_13yrt):active {
116
+ } .steps__text_1aema.steps__interactive_1aema:not(.steps__disabled_1aema):active {
112
117
  background: var(--color-light-transparent-default-press);
113
- } .steps__focused_13yrt {
118
+ } .steps__focused_1aema {
114
119
  outline: var(--gap-2) solid var(--focus-color);
115
120
  outline-offset: var(--gap-2);
116
- } .steps__selected_13yrt .steps__text_13yrt {
121
+ } .steps__selected_1aema .steps__text_1aema {
117
122
  color: var(--color-light-text-primary);
118
- } .steps__selected_13yrt .steps__option_13yrt {
123
+ } .steps__selected_1aema .steps__option_1aema {
119
124
  color: var(--color-light-text-primary-inverted);
120
125
  background: var(--color-light-neutral-translucent-1300);
121
- } .steps__checkbox_13yrt {
126
+ } .steps__checkbox_1aema {
122
127
  display: flex;
123
128
  justify-content: center;
124
129
  align-items: center;
@@ -126,20 +131,20 @@
126
131
  width: 20px;
127
132
  height: 20px;
128
133
  border: 2px solid var(--color-light-neutral-translucent-300);
129
- } .steps__dot_13yrt {
134
+ } .steps__dot_1aema {
130
135
  width: 10px;
131
136
  height: 10px;
132
137
  border-radius: var(--border-radius-circle);
133
138
  background: var(--color-light-neutral-translucent-300);
134
- } .steps__selected_13yrt .steps__checkbox_13yrt {
139
+ } .steps__selected_1aema .steps__checkbox_1aema {
135
140
  border: 2px solid var(--color-light-neutral-translucent-1300)
136
- } .steps__selected_13yrt .steps__checkbox_13yrt .steps__dot_13yrt {
141
+ } .steps__selected_1aema .steps__checkbox_1aema .steps__dot_1aema {
137
142
  background: var(--color-light-neutral-translucent-1300);
138
- } .steps__option_13yrt:not(.steps__error_13yrt).steps__unordered_13yrt {
143
+ } .steps__option_1aema:not(.steps__error_1aema).steps__unordered_1aema {
139
144
  background: unset;
140
- } .steps__completedIndicator_13yrt > [class*='positive'] {
145
+ } .steps__completedIndicator_1aema > [class*='positive'] {
141
146
  color: var(--steps-option-svg-color);
142
147
  background-color: var(--steps-option-svg-color);
143
- } .steps__fullWidth_13yrt {
148
+ } .steps__fullWidth_1aema {
144
149
  width: 100%;
145
150
  }
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
13
 
14
- var styles = {"component":"steps__component_1ct8i"};
14
+ var styles = {"component":"steps__component_1rt27"};
15
15
  require('./index.css')
16
16
 
17
17
  var StepIndicator = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1jm63 */
1
+ /* hash: 14ctu */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -16,9 +16,12 @@
16
16
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
17
17
 
18
18
  /* новые значения, используйте их */
19
- --gap-0: 0;
19
+
20
+ /* no-unit может приводить к проблемам в calc (#1559) */
21
+ /* stylelint-disable-next-line length-zero-no-unit */
22
+ --gap-0: 0px;
20
23
  } :root {
21
24
  } :root {
22
- } /* сбрасывает синюю подсветку при нажатии */ .steps__component_1ct8i.steps__component_1ct8i {
25
+ } /* сбрасывает синюю подсветку при нажатии */ .steps__component_1rt27.steps__component_1rt27 {
23
26
  padding: var(--gap-0);
24
27
  }
@@ -1,16 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { ReactNode } from "react";
4
3
  import { StepIndicatorProps } from "./components/step-indicator/index";
4
+ import { CommonProps } from "./types/common-props";
5
5
  type StepsProps = {
6
6
  /**
7
7
  * Дополнительный класс
8
8
  */
9
9
  className?: string;
10
- /**
11
- * Дочерние элементы
12
- */
13
- children: ReactNode;
14
10
  /**
15
11
  * Активный шаг, указанный по умолчанию
16
12
  * @default 1
@@ -25,29 +21,6 @@ type StepsProps = {
25
21
  * @default true
26
22
  */
27
23
  isMarkCompletedSteps?: boolean;
28
- /**
29
- * Управление ориентацией компонента
30
- * @default false
31
- */
32
- isVerticalAlign?: boolean;
33
- /**
34
- * Управление отображением номера шага
35
- */
36
- ordered?: boolean;
37
- /**
38
- * Включение / отключение интерактивности шагов
39
- */
40
- interactive?: boolean;
41
- /**
42
- * Растягивание шагов на всю ширину блока для вертикальной ориентации
43
- * @default false
44
- */
45
- fullWidth?: boolean;
46
- /**
47
- * Минимальное расстояние между шагами
48
- * @default 24
49
- */
50
- minSpaceBetweenSteps?: 8 | 16 | 24;
51
24
  /**
52
25
  * Кастомный метод для управления состоянием disabled шага и
53
26
  * возможностью перехода на этот шаг
@@ -61,6 +34,12 @@ type StepsProps = {
61
34
  * @return Флаг состояния error
62
35
  */
63
36
  checkIsStepError?: (stepNumber: number) => boolean;
37
+ /**
38
+ * Кастомный метод для управления состоянием шага criticalError
39
+ * @param stepNumber - номер шага
40
+ * @return Флаг состояния error
41
+ */
42
+ checkIsStepCriticalError?: (stepNumber: number) => boolean;
64
43
  /**
65
44
  * Кастомный метод для управления состоянием шага warning
66
45
  * @param stepNumber - номер шага
@@ -90,10 +69,6 @@ type StepsProps = {
90
69
  * @param stepNumber - номер активного шага
91
70
  */
92
71
  onChange?: (stepNumber: number) => void;
93
- /**
94
- * Идентификатор для систем автоматизированного тестирования
95
- */
96
- dataTestId?: string;
97
- };
72
+ } & CommonProps;
98
73
  declare const Steps: React.FC<StepsProps>;
99
74
  export { StepsProps, Steps };
package/cssm/Component.js CHANGED
@@ -15,7 +15,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
15
15
 
16
16
  var Steps = function (_a) {
17
17
  var _b;
18
- var className = _a.className, children = _a.children, _c = _a.defaultActiveStep, defaultActiveStep = _c === void 0 ? 1 : _c, activeStepProp = _a.activeStep, _d = _a.isMarkCompletedSteps, isMarkCompletedSteps = _d === void 0 ? true : _d, _e = _a.isVerticalAlign, isVerticalAlign = _e === void 0 ? false : _e, _f = _a.ordered, ordered = _f === void 0 ? true : _f, _g = _a.interactive, interactive = _g === void 0 ? true : _g, _h = _a.fullWidth, fullWidth = _h === void 0 ? false : _h, _j = _a.minSpaceBetweenSteps, minSpaceBetweenSteps = _j === void 0 ? 24 : _j, checkIsStepDisabled = _a.checkIsStepDisabled, checkIsStepError = _a.checkIsStepError, checkIsStepWarning = _a.checkIsStepWarning, checkIsStepWaiting = _a.checkIsStepWaiting, checkIsStepPositive = _a.checkIsStepPositive, checkIsStepCustom = _a.checkIsStepCustom, onChange = _a.onChange, dataTestId = _a.dataTestId;
18
+ var className = _a.className, children = _a.children, _c = _a.defaultActiveStep, defaultActiveStep = _c === void 0 ? 1 : _c, activeStepProp = _a.activeStep, _d = _a.isMarkCompletedSteps, isMarkCompletedSteps = _d === void 0 ? true : _d, _e = _a.isVerticalAlign, isVerticalAlign = _e === void 0 ? false : _e, _f = _a.ordered, ordered = _f === void 0 ? true : _f, _g = _a.interactive, interactive = _g === void 0 ? true : _g, _h = _a.fullWidth, fullWidth = _h === void 0 ? false : _h, _j = _a.minSpaceBetweenSteps, minSpaceBetweenSteps = _j === void 0 ? 24 : _j, checkIsStepDisabled = _a.checkIsStepDisabled, checkIsStepError = _a.checkIsStepError, checkIsStepCriticalError = _a.checkIsStepCriticalError, checkIsStepWarning = _a.checkIsStepWarning, checkIsStepWaiting = _a.checkIsStepWaiting, checkIsStepPositive = _a.checkIsStepPositive, checkIsStepCustom = _a.checkIsStepCustom, onChange = _a.onChange, dataTestId = _a.dataTestId, completedDashColor = _a.completedDashColor;
19
19
  var uncontrolled = activeStepProp === undefined;
20
20
  var _k = React.useState(defaultActiveStep), activeStep = _k[0], setActiveStep = _k[1];
21
21
  var stepsLength = React__default.default.Children.count(children);
@@ -39,12 +39,15 @@ var Steps = function (_a) {
39
39
  var disabled = checkIsStepDisabled ? checkIsStepDisabled(stepNumber) : false;
40
40
  var isPositive = checkIsStepPositive ? checkIsStepPositive(stepNumber) : false;
41
41
  var isError = checkIsStepError ? checkIsStepError(stepNumber) : false;
42
+ var isCriticalError = checkIsStepCriticalError
43
+ ? checkIsStepCriticalError(stepNumber)
44
+ : false;
42
45
  var isWarning = checkIsStepWarning ? checkIsStepWarning(stepNumber) : false;
43
46
  var isWaiting = checkIsStepWaiting ? checkIsStepWaiting(stepNumber) : false;
44
47
  var customStepIndicator = checkIsStepCustom && checkIsStepCustom(stepNumber);
45
48
  var isNotLastStep = stepsLength !== stepNumber;
46
49
  var isInteractive = !disabled && interactive;
47
- return (React__default.default.createElement(components_step_Component.Step, { stepNumber: stepNumber, isSelected: isSelected, isStepCompleted: isStepCompleted, disabled: disabled, isPositive: isPositive, isError: isError, isWarning: isWarning, isWaiting: isWaiting, customStepIndicator: customStepIndicator, onClick: handleStepClick, ordered: ordered, interactive: isInteractive, isVerticalAlign: isVerticalAlign, isNotLastStep: isNotLastStep, key: stepNumber, fullWidth: fullWidth, minSpaceBetweenSteps: minSpaceBetweenSteps }, step));
50
+ return (React__default.default.createElement(components_step_Component.Step, { stepNumber: stepNumber, isSelected: isSelected, isStepCompleted: isStepCompleted, disabled: disabled, isPositive: isPositive, isError: isError, isCriticalError: isCriticalError, isWarning: isWarning, isWaiting: isWaiting, customStepIndicator: customStepIndicator, onClick: handleStepClick, ordered: ordered, interactive: isInteractive, isVerticalAlign: isVerticalAlign, isNotLastStep: isNotLastStep, key: stepNumber, fullWidth: fullWidth, minSpaceBetweenSteps: minSpaceBetweenSteps, completedDashColor: completedDashColor, dataTestId: dataTestId }, step));
48
51
  })));
49
52
  };
50
53