@alfalab/core-components-steps 1.6.3 → 1.7.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 (36) hide show
  1. package/Component.js +1 -1
  2. package/components/step/Component.js +1 -1
  3. package/components/step/index.css +31 -31
  4. package/components/step-indicator/Component.js +1 -1
  5. package/components/step-indicator/index.css +2 -2
  6. package/esm/Component.js +1 -1
  7. package/esm/components/step/Component.js +1 -1
  8. package/esm/components/step/index.css +31 -31
  9. package/esm/components/step-indicator/Component.js +1 -1
  10. package/esm/components/step-indicator/index.css +2 -2
  11. package/esm/index.css +3 -3
  12. package/index.css +3 -3
  13. package/modern/Component.js +1 -1
  14. package/modern/components/step/Component.js +1 -1
  15. package/modern/components/step/index.css +31 -31
  16. package/modern/components/step-indicator/Component.js +1 -1
  17. package/modern/components/step-indicator/index.css +2 -2
  18. package/modern/index.css +3 -3
  19. package/moderncssm/Component.d.ts +99 -0
  20. package/moderncssm/Component.js +39 -0
  21. package/moderncssm/components/step/Component.d.ts +80 -0
  22. package/moderncssm/components/step/Component.js +89 -0
  23. package/moderncssm/components/step/index.d.ts +1 -0
  24. package/moderncssm/components/step/index.js +1 -0
  25. package/moderncssm/components/step/index.module.css +170 -0
  26. package/moderncssm/components/step-indicator/Component.d.ts +6 -0
  27. package/moderncssm/components/step-indicator/Component.js +8 -0
  28. package/moderncssm/components/step-indicator/index.d.ts +1 -0
  29. package/moderncssm/components/step-indicator/index.js +1 -0
  30. package/moderncssm/components/step-indicator/index.module.css +3 -0
  31. package/moderncssm/index.d.ts +1 -0
  32. package/moderncssm/index.js +1 -0
  33. package/moderncssm/index.module.css +12 -0
  34. package/package.json +4 -4
  35. package/src/components/step/index.module.css +1 -1
  36. package/src/index.module.css +1 -1
@@ -1,4 +1,4 @@
1
- /* hash: zeykt */
1
+ /* hash: uzdw6 */
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);
@@ -37,26 +37,26 @@
37
37
  } :root {
38
38
  --steps-option-svg-color: var(--color-light-status-positive);
39
39
  --steps-dash-border: 2px solid var(--color-light-status-positive);
40
- } .steps__step_wyak7 {
40
+ } .steps__step_14of2 {
41
41
  display: flex;
42
42
  outline: none
43
- } .steps__step_wyak7:not(.steps__vertical_wyak7) {
43
+ } .steps__step_14of2:not(.steps__vertical_14of2) {
44
44
  align-items: center;
45
- } .steps__step_wyak7.steps__interactive_wyak7:not(.steps__disabled_wyak7):hover {
45
+ } .steps__step_14of2.steps__interactive_14of2:not(.steps__disabled_14of2):hover {
46
46
  cursor: pointer;
47
- } .steps__step_wyak7.steps__disabled_wyak7:hover .steps__text_wyak7 {
47
+ } .steps__step_14of2.steps__disabled_14of2:hover .steps__text_14of2 {
48
48
  background: unset;
49
- } .steps__step_wyak7.steps__disabled_wyak7 .steps__indicator_wyak7 {
49
+ } .steps__step_14of2.steps__disabled_14of2 .steps__indicator_14of2 {
50
50
  cursor: unset;
51
- } .steps__indicator_wyak7 {
51
+ } .steps__indicator_14of2 {
52
52
  cursor: pointer;
53
53
  display: flex;
54
54
  align-items: center;
55
55
  margin-right: var(--gap-4)
56
- } .steps__indicator_wyak7.steps__vertical_wyak7 {
56
+ } .steps__indicator_14of2.steps__vertical_14of2 {
57
57
  flex-direction: column;
58
58
  margin-right: var(--gap-8);
59
- } .steps__option_wyak7 {
59
+ } .steps__option_14of2 {
60
60
  font-size: 14px;
61
61
  line-height: 20px;
62
62
  font-weight: 700;
@@ -69,33 +69,33 @@
69
69
  min-width: 24px;
70
70
  height: 24px;
71
71
  border-radius: var(--border-radius-circle)
72
- } .steps__option_wyak7.steps__vertical_wyak7 {
72
+ } .steps__option_14of2.steps__vertical_14of2 {
73
73
  margin-top: var(--gap-8);
74
- } .steps__dash_wyak7 {
74
+ } .steps__dash_14of2 {
75
75
  flex: 1 1 auto;
76
76
  min-width: 24px;
77
77
  border-top: 2px solid var(--color-light-neutral-translucent-300);
78
78
  margin-right: var(--gap-8)
79
- } .steps__dash_wyak7.steps__size-16_wyak7 {
79
+ } .steps__dash_14of2.steps__size-16_14of2 {
80
80
  min-width: 16px;
81
- } .steps__dash_wyak7.steps__size-8_wyak7 {
81
+ } .steps__dash_14of2.steps__size-8_14of2 {
82
82
  min-width: 8px;
83
- } .steps__dash_wyak7.steps__completed_wyak7 {
83
+ } .steps__dash_14of2.steps__completed_14of2 {
84
84
  border-top: var(--steps-dash-border);
85
- } .steps__dash_wyak7.steps__vertical_wyak7 {
85
+ } .steps__dash_14of2.steps__vertical_14of2 {
86
86
  min-width: unset;
87
87
  min-height: 24px;
88
88
  margin-right: 0;
89
89
  margin-top: var(--gap-8);
90
90
  border-left: 2px solid var(--color-light-neutral-translucent-300);
91
91
  border-top: none
92
- } .steps__dash_wyak7.steps__vertical_wyak7.steps__size-16_wyak7 {
92
+ } .steps__dash_14of2.steps__vertical_14of2.steps__size-16_14of2 {
93
93
  min-height: 16px;
94
- } .steps__dash_wyak7.steps__vertical_wyak7.steps__size-8_wyak7 {
94
+ } .steps__dash_14of2.steps__vertical_14of2.steps__size-8_14of2 {
95
95
  min-height: 8px;
96
- } .steps__dash_wyak7.steps__completed_wyak7.steps__vertical_wyak7 {
96
+ } .steps__dash_14of2.steps__completed_14of2.steps__vertical_14of2 {
97
97
  border-left: var(--steps-dash-border);
98
- } .steps__text_wyak7 {
98
+ } .steps__text_14of2 {
99
99
  font-size: 16px;
100
100
  line-height: 24px;
101
101
  font-weight: 400;
@@ -105,19 +105,19 @@
105
105
  color: var(--color-light-text-primary);
106
106
  border-radius: var(--gap-8);
107
107
  height: min-content
108
- } .steps__text_wyak7.steps__interactive_wyak7:not(.steps__disabled_wyak7):hover {
108
+ } .steps__text_14of2.steps__interactive_14of2:not(.steps__disabled_14of2):hover {
109
109
  background: var(--color-light-transparent-default-hover);
110
- } .steps__text_wyak7.steps__interactive_wyak7:not(.steps__disabled_wyak7):active {
110
+ } .steps__text_14of2.steps__interactive_14of2:not(.steps__disabled_14of2):active {
111
111
  background: var(--color-light-transparent-default-press);
112
- } .steps__focused_wyak7 {
112
+ } .steps__focused_14of2 {
113
113
  outline: var(--gap-2) solid var(--focus-color);
114
114
  outline-offset: var(--gap-2);
115
- } .steps__selected_wyak7 .steps__text_wyak7 {
115
+ } .steps__selected_14of2 .steps__text_14of2 {
116
116
  color: var(--color-light-text-primary);
117
- } .steps__selected_wyak7 .steps__option_wyak7 {
117
+ } .steps__selected_14of2 .steps__option_14of2 {
118
118
  color: var(--color-light-text-primary-inverted);
119
119
  background: var(--color-light-neutral-translucent-1300);
120
- } .steps__checkbox_wyak7 {
120
+ } .steps__checkbox_14of2 {
121
121
  display: flex;
122
122
  justify-content: center;
123
123
  align-items: center;
@@ -125,20 +125,20 @@
125
125
  width: 20px;
126
126
  height: 20px;
127
127
  border: 2px solid var(--color-light-neutral-translucent-300);
128
- } .steps__dot_wyak7 {
128
+ } .steps__dot_14of2 {
129
129
  width: 10px;
130
130
  height: 10px;
131
131
  border-radius: var(--border-radius-circle);
132
132
  background: var(--color-light-neutral-translucent-300);
133
- } .steps__selected_wyak7 .steps__checkbox_wyak7 {
133
+ } .steps__selected_14of2 .steps__checkbox_14of2 {
134
134
  border: 2px solid var(--color-light-neutral-translucent-1300)
135
- } .steps__selected_wyak7 .steps__checkbox_wyak7 .steps__dot_wyak7 {
135
+ } .steps__selected_14of2 .steps__checkbox_14of2 .steps__dot_14of2 {
136
136
  background: var(--color-light-neutral-translucent-1300);
137
- } .steps__option_wyak7:not(.steps__error_wyak7).steps__unordered_wyak7 {
137
+ } .steps__option_14of2:not(.steps__error_14of2).steps__unordered_14of2 {
138
138
  background: unset;
139
- } .steps__completedIndicator_wyak7 > [class*='positive'] {
139
+ } .steps__completedIndicator_14of2 > [class*='positive'] {
140
140
  color: var(--steps-option-svg-color);
141
141
  background-color: var(--steps-option-svg-color);
142
- } .steps__fullWidth_wyak7 {
142
+ } .steps__fullWidth_14of2 {
143
143
  width: 100%;
144
144
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Badge } from '@alfalab/core-components-badge/modern';
4
4
 
5
- const styles = {"component":"steps__component_1igwc"};
5
+ const styles = {"component":"steps__component_18el7"};
6
6
  require('./index.css')
7
7
 
8
8
  const StepIndicator = ({ content, iconColor, className }) => (React.createElement(Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn(styles.component, className), content: content }));
@@ -1,4 +1,4 @@
1
- /* hash: 1e3fn */
2
- .steps__component_1igwc.steps__component_1igwc {
1
+ /* hash: 19nuy */
2
+ .steps__component_18el7.steps__component_18el7 {
3
3
  padding: 0;
4
4
  }
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1i2a1 */
1
+ /* hash: jq6h1 */
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 */
@@ -18,11 +18,11 @@
18
18
  /* новые значения, используйте их */
19
19
  } :root {
20
20
  } :root {
21
- } .steps__component_airbo {
21
+ } .steps__component_t81r1 {
22
22
  display: flex;
23
23
  align-items: center;
24
24
  flex-direction: row
25
- } .steps__component_airbo.steps__vertical_airbo {
25
+ } .steps__component_t81r1.steps__vertical_t81r1 {
26
26
  flex-direction: column;
27
27
  align-items: flex-start;
28
28
  }
@@ -0,0 +1,99 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ReactNode } from "react";
4
+ import { StepIndicatorProps } from "./components/step-indicator/index";
5
+ type StepsProps = {
6
+ /**
7
+ * Дополнительный класс
8
+ */
9
+ className?: string;
10
+ /**
11
+ * Дочерние элементы
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Активный шаг, указанный по умолчанию
16
+ * @default 1
17
+ */
18
+ defaultActiveStep?: number;
19
+ /**
20
+ * Активный шаг
21
+ */
22
+ activeStep?: number;
23
+ /**
24
+ * Управление возможностью отключения пометки пройденного шага
25
+ * @default true
26
+ */
27
+ 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
+ /**
52
+ * Кастомный метод для управления состоянием disabled шага и
53
+ * возможностью перехода на этот шаг
54
+ * @param stepNumber - номер шага
55
+ * @return Флаг состояния disabled
56
+ */
57
+ checkIsStepDisabled?: (stepNumber: number) => boolean;
58
+ /**
59
+ * Кастомный метод для управления состоянием шага error
60
+ * @param stepNumber - номер шага
61
+ * @return Флаг состояния error
62
+ */
63
+ checkIsStepError?: (stepNumber: number) => boolean;
64
+ /**
65
+ * Кастомный метод для управления состоянием шага warning
66
+ * @param stepNumber - номер шага
67
+ * @return Флаг состояния warning
68
+ */
69
+ checkIsStepWarning?: (stepNumber: number) => boolean;
70
+ /**
71
+ * Кастомный метод для управления состоянием шага waiting
72
+ * @param stepNumber - номер шага
73
+ * @return Флаг состояния waiting
74
+ */
75
+ checkIsStepWaiting?: (stepNumber: number) => boolean;
76
+ /**
77
+ * Кастомный метод для управления состоянием шага positive
78
+ * @param stepNumber - номер шага
79
+ * @return Флаг состояния positive
80
+ */
81
+ checkIsStepPositive?: (stepNumber: number) => boolean;
82
+ /**
83
+ * Кастомный метод для установки кастомного индикатора шага
84
+ * @param stepNumber - номер шага
85
+ * @return Объект StepIndicatorProps { className, content, iconColor } или null
86
+ */
87
+ checkIsStepCustom?: (stepNumber: number) => StepIndicatorProps | null;
88
+ /**
89
+ * Обработчик клика на шаг
90
+ * @param stepNumber - номер активного шага
91
+ */
92
+ onChange?: (stepNumber: number) => void;
93
+ /**
94
+ * Идентификатор для систем автоматизированного тестирования
95
+ */
96
+ dataTestId?: string;
97
+ };
98
+ declare const Steps: React.FC<StepsProps>;
99
+ export { StepsProps, Steps };
@@ -0,0 +1,39 @@
1
+ import React, { useState } from 'react';
2
+ import cn from 'classnames';
3
+ import { Step } from './components/step/Component.js';
4
+ import styles from './index.module.css';
5
+
6
+ const Steps = ({ className, children, defaultActiveStep = 1, activeStep: activeStepProp, isMarkCompletedSteps = true, isVerticalAlign = false, ordered = true, interactive = true, fullWidth = false, minSpaceBetweenSteps = 24, checkIsStepDisabled, checkIsStepError, checkIsStepWarning, checkIsStepWaiting, checkIsStepPositive, checkIsStepCustom, onChange, dataTestId, }) => {
7
+ const uncontrolled = activeStepProp === undefined;
8
+ const [activeStep, setActiveStep] = useState(defaultActiveStep);
9
+ const stepsLength = React.Children.count(children);
10
+ const handleStepClick = (stepNumber) => {
11
+ if (uncontrolled) {
12
+ setActiveStep(stepNumber);
13
+ }
14
+ if (onChange) {
15
+ onChange(stepNumber);
16
+ }
17
+ };
18
+ if (!stepsLength)
19
+ return null;
20
+ const visibleActiveStep = uncontrolled ? activeStep : activeStepProp;
21
+ return (React.createElement("div", { className: cn(className, styles.component, {
22
+ [styles.vertical]: isVerticalAlign,
23
+ }), "data-test-id": dataTestId }, React.Children.map(children, (step, index) => {
24
+ const stepNumber = index + 1;
25
+ const isSelected = stepNumber === visibleActiveStep;
26
+ const isStepCompleted = isMarkCompletedSteps && stepNumber < visibleActiveStep;
27
+ const disabled = checkIsStepDisabled ? checkIsStepDisabled(stepNumber) : false;
28
+ const isPositive = checkIsStepPositive ? checkIsStepPositive(stepNumber) : false;
29
+ const isError = checkIsStepError ? checkIsStepError(stepNumber) : false;
30
+ const isWarning = checkIsStepWarning ? checkIsStepWarning(stepNumber) : false;
31
+ const isWaiting = checkIsStepWaiting ? checkIsStepWaiting(stepNumber) : false;
32
+ const customStepIndicator = checkIsStepCustom && checkIsStepCustom(stepNumber);
33
+ const isNotLastStep = stepsLength !== stepNumber;
34
+ const isInteractive = !disabled && interactive;
35
+ return (React.createElement(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));
36
+ })));
37
+ };
38
+
39
+ export { Steps };
@@ -0,0 +1,80 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ReactNode } from "react";
4
+ import { StepIndicatorProps } from "../step-indicator/index";
5
+ type StepProps = {
6
+ /**
7
+ * Название шага
8
+ */
9
+ children: ReactNode;
10
+ /**
11
+ * Номер шага
12
+ */
13
+ stepNumber: number;
14
+ /**
15
+ * Маркер того, что текущий шаг выбран
16
+ */
17
+ isSelected: boolean;
18
+ /**
19
+ * Маркер того, что текущий шаг доступен для клика
20
+ */
21
+ disabled: boolean;
22
+ /**
23
+ * Управление отображением номера шага
24
+ */
25
+ ordered?: boolean;
26
+ /**
27
+ * Включение / отключение интерактивности шагов
28
+ */
29
+ interactive?: boolean;
30
+ /**
31
+ * Маркер того, что текущий шаг находится в состоянии "Positive"
32
+ */
33
+ isPositive: boolean;
34
+ /**
35
+ * Маркер того, что текущий шаг находится в состоянии "Error"
36
+ */
37
+ isError: boolean;
38
+ /**
39
+ * Маркер того, что текущий шаг находится в состоянии "Warning"
40
+ */
41
+ isWarning: boolean;
42
+ /**
43
+ * Маркер того, что текущий шаг находится в состоянии "Waiting"
44
+ */
45
+ isWaiting: boolean;
46
+ /**
47
+ * Маркер того, что текущий шаг нужно пометить как завершенный
48
+ */
49
+ isStepCompleted: boolean;
50
+ /**
51
+ * Свойства кастомного индикатора текущего шага
52
+ */
53
+ customStepIndicator?: StepIndicatorProps | null;
54
+ /**
55
+ * Управление ориентацией компонента
56
+ * @default false
57
+ */
58
+ isVerticalAlign?: boolean;
59
+ /**
60
+ * Указывает, является ли текущий шаг последним в списке
61
+ */
62
+ isNotLastStep?: boolean;
63
+ /**
64
+ * Маркер того, что шаг растягивается на всю ширину блока
65
+ * для вертикальной ориентации
66
+ */
67
+ fullWidth?: boolean;
68
+ /**
69
+ * Минимальное расстояние между шагами
70
+ * @default 24
71
+ */
72
+ minSpaceBetweenSteps?: 8 | 16 | 24;
73
+ /**
74
+ * Обработчик нажатия на текущей шаг
75
+ * @param stepNumber - номер шага
76
+ */
77
+ onClick: (stepNumber: number) => void;
78
+ };
79
+ declare const Step: React.FC<StepProps>;
80
+ export { StepProps, Step };
@@ -0,0 +1,89 @@
1
+ import React, { useRef } from 'react';
2
+ import cn from 'classnames';
3
+ import { useFocus } from '@alfalab/hooks';
4
+ import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
5
+ import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
6
+ import { ExclamationCircleMIcon } from '@alfalab/icons-glyph/ExclamationCircleMIcon';
7
+ import { StepIndicator } from '../step-indicator/Component.js';
8
+ import styles from './index.module.css';
9
+
10
+ const SIZE_TO_CLASSNAME_MAP = {
11
+ 8: 'size-8',
12
+ 16: 'size-16',
13
+ 24: 'size-24',
14
+ };
15
+ const Step = ({ children, stepNumber, isSelected, disabled, ordered, isPositive, isError, isWarning, isWaiting, customStepIndicator, isStepCompleted, onClick, interactive, isVerticalAlign, isNotLastStep, fullWidth, minSpaceBetweenSteps = 24, }) => {
16
+ const stepRef = useRef(null);
17
+ const [focused] = useFocus(stepRef, 'keyboard');
18
+ const handleButtonClick = () => {
19
+ if (!disabled && interactive && onClick) {
20
+ onClick(stepNumber);
21
+ }
22
+ };
23
+ const handleTextClick = (e) => {
24
+ if (!interactive) {
25
+ e.stopPropagation();
26
+ }
27
+ };
28
+ const handleKeyDown = (event) => {
29
+ if (event.key === 'Enter') {
30
+ handleButtonClick();
31
+ }
32
+ };
33
+ const getStepIndicator = () => {
34
+ if (customStepIndicator) {
35
+ return React.createElement(StepIndicator, { ...customStepIndicator });
36
+ }
37
+ if (isError) {
38
+ return React.createElement(StepIndicator, { iconColor: 'negative', content: React.createElement(ExclamationCircleMIcon, null) });
39
+ }
40
+ if (isWarning) {
41
+ return React.createElement(StepIndicator, { iconColor: 'attention', content: React.createElement(ExclamationCircleMIcon, null) });
42
+ }
43
+ if (isWaiting) {
44
+ return React.createElement(StepIndicator, { iconColor: 'secondary', content: React.createElement(ClockMIcon, null) });
45
+ }
46
+ if (isPositive) {
47
+ return React.createElement(StepIndicator, { iconColor: 'positive', content: React.createElement(CheckmarkCircleMIcon, null) });
48
+ }
49
+ if (isStepCompleted) {
50
+ return (React.createElement(StepIndicator, { iconColor: 'positive', content: React.createElement(CheckmarkCircleMIcon, null), className: styles.completedIndicator }));
51
+ }
52
+ if (!ordered) {
53
+ return (React.createElement("div", { className: styles.checkbox },
54
+ React.createElement("span", { className: styles.dot })));
55
+ }
56
+ return stepNumber;
57
+ };
58
+ const renderDash = () => (React.createElement("div", { className: cn(styles.dash, {
59
+ [styles.vertical]: isVerticalAlign,
60
+ [styles.completed]: isStepCompleted,
61
+ }, styles[SIZE_TO_CLASSNAME_MAP[minSpaceBetweenSteps]]) }));
62
+ return (React.createElement("div", { role: 'button', tabIndex: 0, ref: stepRef, className: cn(styles.step, {
63
+ [styles.completed]: isStepCompleted,
64
+ [styles.error]: isError,
65
+ [styles.selected]: isSelected,
66
+ [styles.disabled]: disabled,
67
+ [styles.focused]: focused,
68
+ [styles.vertical]: isVerticalAlign,
69
+ [styles.interactive]: interactive,
70
+ [styles.fullWidth]: fullWidth && isVerticalAlign,
71
+ }), onClick: handleButtonClick, onKeyDown: handleKeyDown },
72
+ React.createElement("div", { className: cn(styles.indicator, {
73
+ [styles.vertical]: isVerticalAlign,
74
+ [styles.interactive]: interactive,
75
+ }) },
76
+ React.createElement("div", { className: cn(styles.option, {
77
+ [styles.unordered]: !ordered,
78
+ [styles.vertical]: isVerticalAlign,
79
+ [styles.error]: isError,
80
+ }) }, getStepIndicator()),
81
+ isNotLastStep && isVerticalAlign && renderDash()),
82
+ React.createElement("div", { className: cn(styles.text, {
83
+ [styles.interactive]: interactive,
84
+ [styles.fullWidth]: fullWidth && isVerticalAlign,
85
+ }), onClick: handleTextClick }, children),
86
+ isNotLastStep && !isVerticalAlign && renderDash()));
87
+ };
88
+
89
+ export { Step };
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1 @@
1
+ export { Step } from './Component.js';