@alfalab/core-components-steps 1.1.2 → 1.1.3
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.
- package/Component.js +9 -11
- package/components/step/Component.js +18 -20
- package/components/step/index.css +26 -26
- package/components/step/index.js +2 -4
- package/components/step-indicator/Component.js +5 -7
- package/components/step-indicator/index.css +2 -2
- package/components/step-indicator/index.js +1 -3
- package/cssm/Component.js +11 -13
- package/cssm/components/step/Component.js +34 -36
- package/cssm/components/step/index.js +2 -4
- package/cssm/components/step-indicator/Component.js +5 -7
- package/cssm/components/step-indicator/index.js +1 -3
- package/cssm/index.js +2 -4
- package/esm/Component.js +2 -2
- package/esm/components/step/Component.js +2 -2
- package/esm/components/step/index.css +26 -26
- package/esm/components/step/index.js +2 -2
- package/esm/components/step-indicator/Component.js +1 -1
- package/esm/components/step-indicator/index.css +2 -2
- package/esm/components/step-indicator/index.js +1 -1
- package/esm/index.css +3 -3
- package/esm/index.js +2 -2
- package/index.css +3 -3
- package/index.js +2 -4
- package/modern/Component.js +3 -3
- package/modern/components/step/Component.js +2 -2
- package/modern/components/step/index.css +26 -26
- package/modern/components/step/index.js +2 -2
- package/modern/components/step-indicator/Component.js +1 -1
- package/modern/components/step-indicator/index.css +2 -2
- package/modern/components/step-indicator/index.js +1 -1
- package/modern/index.css +3 -3
- package/modern/index.js +3 -3
- package/package.json +2 -2
package/Component.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var components_step_Component = require('./components/step/Component.js');
|
|
@@ -9,22 +7,22 @@ require('@alfalab/hooks');
|
|
|
9
7
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
10
8
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
11
9
|
require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
12
|
-
require('@alfalab/core-components-badge');
|
|
13
10
|
require('./components/step-indicator/Component.js');
|
|
11
|
+
require('@alfalab/core-components-badge');
|
|
14
12
|
|
|
15
|
-
function
|
|
13
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
14
|
|
|
17
|
-
var React__default = /*#__PURE__*/
|
|
18
|
-
var cn__default = /*#__PURE__*/
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
17
|
|
|
20
|
-
var styles = {"component":"
|
|
18
|
+
var styles = {"component":"steps__component_1qx39","vertical":"steps__vertical_1qx39"};
|
|
21
19
|
require('./index.css')
|
|
22
20
|
|
|
23
21
|
var Steps = function (_a) {
|
|
24
22
|
var _b;
|
|
25
23
|
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, checkIsStepDisabled = _a.checkIsStepDisabled, checkIsStepError = _a.checkIsStepError, checkIsStepWarning = _a.checkIsStepWarning, checkIsStepWaiting = _a.checkIsStepWaiting, checkIsStepPositive = _a.checkIsStepPositive, checkIsStepCustom = _a.checkIsStepCustom, onChange = _a.onChange, dataTestId = _a.dataTestId;
|
|
26
24
|
var _h = React.useState(activeStepProp || defaultActiveStep), activeStep = _h[0], setActiveStep = _h[1];
|
|
27
|
-
var stepsLength = React__default
|
|
25
|
+
var stepsLength = React__default.default.Children.count(children);
|
|
28
26
|
React.useEffect(function () {
|
|
29
27
|
if (activeStepProp) {
|
|
30
28
|
setActiveStep(activeStepProp);
|
|
@@ -38,9 +36,9 @@ var Steps = function (_a) {
|
|
|
38
36
|
};
|
|
39
37
|
if (!stepsLength)
|
|
40
38
|
return null;
|
|
41
|
-
return (React__default
|
|
39
|
+
return (React__default.default.createElement("div", { className: cn__default.default(className, styles.component, (_b = {},
|
|
42
40
|
_b[styles.vertical] = isVerticalAlign,
|
|
43
|
-
_b)), "data-test-id": dataTestId }, React__default
|
|
41
|
+
_b)), "data-test-id": dataTestId }, React__default.default.Children.map(children, function (step, index) {
|
|
44
42
|
var stepNumber = index + 1;
|
|
45
43
|
var isSelected = stepNumber === activeStep;
|
|
46
44
|
var isStepCompleted = isMarkCompletedSteps && stepNumber < activeStep;
|
|
@@ -52,7 +50,7 @@ var Steps = function (_a) {
|
|
|
52
50
|
var customStepIndicator = checkIsStepCustom && checkIsStepCustom(stepNumber);
|
|
53
51
|
var isNotLastStep = stepsLength !== stepNumber;
|
|
54
52
|
var isInteractive = !disabled && interactive;
|
|
55
|
-
return (React__default
|
|
53
|
+
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 }, step));
|
|
56
54
|
})));
|
|
57
55
|
};
|
|
58
56
|
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var hooks = require('@alfalab/hooks');
|
|
8
6
|
var CheckmarkCircleMIcon = require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
9
7
|
var ClockMIcon = require('@alfalab/icons-glyph/ClockMIcon');
|
|
10
8
|
var ExclamationCircleMIcon = require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
11
|
-
require('@alfalab/core-components-badge');
|
|
12
9
|
var components_stepIndicator_Component = require('../step-indicator/Component.js');
|
|
10
|
+
require('@alfalab/core-components-badge');
|
|
13
11
|
|
|
14
|
-
function
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
13
|
|
|
16
|
-
var React__default = /*#__PURE__*/
|
|
17
|
-
var cn__default = /*#__PURE__*/
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
16
|
|
|
19
17
|
/******************************************************************************
|
|
20
18
|
Copyright (c) Microsoft Corporation.
|
|
@@ -43,7 +41,7 @@ var __assign = function () {
|
|
|
43
41
|
return __assign.apply(this, arguments);
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
var styles = {"step":"
|
|
44
|
+
var styles = {"step":"steps__step_1wzux","vertical":"steps__vertical_1wzux","interactive":"steps__interactive_1wzux","disabled":"steps__disabled_1wzux","text":"steps__text_1wzux","indicator":"steps__indicator_1wzux","option":"steps__option_1wzux","dash":"steps__dash_1wzux","completed":"steps__completed_1wzux","focused":"steps__focused_1wzux","selected":"steps__selected_1wzux","checkbox":"steps__checkbox_1wzux","dot":"steps__dot_1wzux","error":"steps__error_1wzux","unordered":"steps__unordered_1wzux","completedIndicator":"steps__completedIndicator_1wzux"};
|
|
47
45
|
require('./index.css')
|
|
48
46
|
|
|
49
47
|
var Step = function (_a) {
|
|
@@ -68,37 +66,37 @@ var Step = function (_a) {
|
|
|
68
66
|
};
|
|
69
67
|
var getStepIndicator = function () {
|
|
70
68
|
if (customStepIndicator) {
|
|
71
|
-
return React__default
|
|
69
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, __assign({}, customStepIndicator));
|
|
72
70
|
}
|
|
73
71
|
if (isError) {
|
|
74
|
-
return React__default
|
|
72
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'negative', content: React__default.default.createElement(ExclamationCircleMIcon.ExclamationCircleMIcon, null) });
|
|
75
73
|
}
|
|
76
74
|
if (isWarning) {
|
|
77
|
-
return React__default
|
|
75
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'attention', content: React__default.default.createElement(ExclamationCircleMIcon.ExclamationCircleMIcon, null) });
|
|
78
76
|
}
|
|
79
77
|
if (isWaiting) {
|
|
80
|
-
return React__default
|
|
78
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'secondary', content: React__default.default.createElement(ClockMIcon.ClockMIcon, null) });
|
|
81
79
|
}
|
|
82
80
|
if (isPositive) {
|
|
83
|
-
return React__default
|
|
81
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'positive', content: React__default.default.createElement(CheckmarkCircleMIcon.CheckmarkCircleMIcon, null) });
|
|
84
82
|
}
|
|
85
83
|
if (isStepCompleted) {
|
|
86
|
-
return (React__default
|
|
84
|
+
return (React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'positive', content: React__default.default.createElement(CheckmarkCircleMIcon.CheckmarkCircleMIcon, null), className: styles.completedIndicator }));
|
|
87
85
|
}
|
|
88
86
|
if (!ordered) {
|
|
89
|
-
return (React__default
|
|
90
|
-
React__default
|
|
87
|
+
return (React__default.default.createElement("div", { className: styles.checkbox },
|
|
88
|
+
React__default.default.createElement("span", { className: styles.dot })));
|
|
91
89
|
}
|
|
92
90
|
return stepNumber;
|
|
93
91
|
};
|
|
94
92
|
var renderDash = function () {
|
|
95
93
|
var _a;
|
|
96
|
-
return (React__default
|
|
94
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles.dash, (_a = {},
|
|
97
95
|
_a[styles.vertical] = isVerticalAlign,
|
|
98
96
|
_a[styles.completed] = isStepCompleted,
|
|
99
97
|
_a)) }));
|
|
100
98
|
};
|
|
101
|
-
return (React__default
|
|
99
|
+
return (React__default.default.createElement("div", { role: 'button', tabIndex: 0, ref: stepRef, className: cn__default.default(styles.step, (_b = {},
|
|
102
100
|
_b[styles.completed] = isStepCompleted,
|
|
103
101
|
_b[styles.error] = isError,
|
|
104
102
|
_b[styles.selected] = isSelected,
|
|
@@ -107,17 +105,17 @@ var Step = function (_a) {
|
|
|
107
105
|
_b[styles.vertical] = isVerticalAlign,
|
|
108
106
|
_b[styles.interactive] = interactive,
|
|
109
107
|
_b)), onClick: handleButtonClick, onKeyDown: handleKeyDown },
|
|
110
|
-
React__default
|
|
108
|
+
React__default.default.createElement("div", { className: cn__default.default(styles.indicator, (_c = {},
|
|
111
109
|
_c[styles.vertical] = isVerticalAlign,
|
|
112
110
|
_c[styles.interactive] = interactive,
|
|
113
111
|
_c)) },
|
|
114
|
-
React__default
|
|
112
|
+
React__default.default.createElement("div", { className: cn__default.default(styles.option, (_d = {},
|
|
115
113
|
_d[styles.unordered] = !ordered,
|
|
116
114
|
_d[styles.vertical] = isVerticalAlign,
|
|
117
115
|
_d[styles.error] = isError,
|
|
118
116
|
_d)) }, getStepIndicator()),
|
|
119
117
|
isNotLastStep && isVerticalAlign && renderDash()),
|
|
120
|
-
React__default
|
|
118
|
+
React__default.default.createElement("div", { className: cn__default.default(styles.text, (_e = {},
|
|
121
119
|
_e[styles.interactive] = interactive,
|
|
122
120
|
_e)), onClick: handleTextClick }, children),
|
|
123
121
|
isNotLastStep && !isVerticalAlign && renderDash()));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9mw7p */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -33,33 +33,33 @@
|
|
|
33
33
|
--steps-option-svg-color: var(--color-light-graphic-positive);
|
|
34
34
|
--steps-dash-border: 2px solid var(--color-light-graphic-positive);
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.steps__step_1wzux {
|
|
37
37
|
display: flex;
|
|
38
38
|
outline: none
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.steps__step_1wzux:not(.steps__vertical_1wzux) {
|
|
41
41
|
align-items: center;
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.steps__step_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):hover {
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.steps__step_1wzux.steps__disabled_1wzux:hover .steps__text_1wzux {
|
|
47
47
|
background: unset;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.steps__step_1wzux.steps__disabled_1wzux .steps__indicator_1wzux {
|
|
50
50
|
cursor: unset;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.steps__indicator_1wzux {
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
display: flex;
|
|
55
55
|
align-items: center;
|
|
56
56
|
margin-right: var(--gap-2xs)
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.steps__indicator_1wzux.steps__vertical_1wzux {
|
|
59
59
|
flex-direction: column;
|
|
60
60
|
margin-right: var(--gap-xs);
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.steps__option_1wzux {
|
|
63
63
|
font-size: 14px;
|
|
64
64
|
line-height: 20px;
|
|
65
65
|
font-weight: 700;
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
height: 24px;
|
|
74
74
|
border-radius: var(--border-radius-circle)
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
.steps__option_1wzux.steps__vertical_1wzux {
|
|
77
77
|
margin-top: var(--gap-xs);
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
.steps__dash_1wzux {
|
|
80
80
|
flex: 1 1 auto;
|
|
81
81
|
min-width: 24px;
|
|
82
82
|
border-top: 2px solid var(--color-light-border-primary);
|
|
83
83
|
margin-right: var(--gap-xs)
|
|
84
84
|
}
|
|
85
|
-
.
|
|
85
|
+
.steps__dash_1wzux.steps__completed_1wzux {
|
|
86
86
|
border-top: var(--steps-dash-border);
|
|
87
87
|
}
|
|
88
|
-
.
|
|
88
|
+
.steps__dash_1wzux.steps__vertical_1wzux {
|
|
89
89
|
min-width: unset;
|
|
90
90
|
min-height: 24px;
|
|
91
91
|
margin-right: 0;
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
border-left: 2px solid var(--color-light-border-primary);
|
|
94
94
|
border-top: none;
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
.steps__dash_1wzux.steps__completed_1wzux.steps__vertical_1wzux {
|
|
97
97
|
border-left: var(--steps-dash-border);
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
.steps__text_1wzux {
|
|
100
100
|
font-size: 16px;
|
|
101
101
|
line-height: 24px;
|
|
102
102
|
font-weight: 400;
|
|
@@ -107,24 +107,24 @@
|
|
|
107
107
|
border-radius: var(--gap-xs);
|
|
108
108
|
height: min-content
|
|
109
109
|
}
|
|
110
|
-
.
|
|
110
|
+
.steps__text_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):hover {
|
|
111
111
|
background: var(--color-light-bg-primary-inverted-alpha-7);
|
|
112
112
|
}
|
|
113
|
-
.
|
|
113
|
+
.steps__text_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):active {
|
|
114
114
|
background: var(--color-light-bg-primary-inverted-alpha-15);
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.steps__focused_1wzux {
|
|
117
117
|
outline: var(--gap-3xs) solid var(--focus-color);
|
|
118
118
|
outline-offset: var(--gap-3xs);
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.steps__selected_1wzux .steps__text_1wzux {
|
|
121
121
|
color: var(--color-light-graphic-primary);
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.steps__selected_1wzux .steps__option_1wzux {
|
|
124
124
|
color: var(--color-light-graphic-primary-inverted);
|
|
125
125
|
background: var(--color-light-graphic-primary);
|
|
126
126
|
}
|
|
127
|
-
.
|
|
127
|
+
.steps__checkbox_1wzux {
|
|
128
128
|
display: flex;
|
|
129
129
|
justify-content: center;
|
|
130
130
|
align-items: center;
|
|
@@ -133,22 +133,22 @@
|
|
|
133
133
|
height: 20px;
|
|
134
134
|
border: 2px solid var(--color-light-graphic-quaternary);
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
.steps__dot_1wzux {
|
|
137
137
|
width: 10px;
|
|
138
138
|
height: 10px;
|
|
139
139
|
border-radius: var(--border-radius-circle);
|
|
140
140
|
background: var(--color-light-graphic-quaternary);
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
.steps__selected_1wzux .steps__checkbox_1wzux {
|
|
143
143
|
border: 2px solid var(--color-light-graphic-primary)
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.steps__selected_1wzux .steps__checkbox_1wzux .steps__dot_1wzux {
|
|
146
146
|
background: var(--color-light-graphic-primary);
|
|
147
147
|
}
|
|
148
|
-
.
|
|
148
|
+
.steps__option_1wzux:not(.steps__error_1wzux).steps__unordered_1wzux {
|
|
149
149
|
background: unset;
|
|
150
150
|
}
|
|
151
|
-
.
|
|
151
|
+
.steps__completedIndicator_1wzux > [class*='positive'] {
|
|
152
152
|
color: var(--steps-option-svg-color);
|
|
153
153
|
background-color: var(--steps-option-svg-color);
|
|
154
154
|
}
|
package/components/step/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var components_step_Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
|
-
var components_step_Component = require('./Component.js');
|
|
8
6
|
require('@alfalab/hooks');
|
|
9
7
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
10
8
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
11
9
|
require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
12
|
-
require('@alfalab/core-components-badge');
|
|
13
10
|
require('../step-indicator/Component.js');
|
|
11
|
+
require('@alfalab/core-components-badge');
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var coreComponentsBadge = require('@alfalab/core-components-badge');
|
|
8
6
|
|
|
9
|
-
function
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
8
|
|
|
11
|
-
var React__default = /*#__PURE__*/
|
|
12
|
-
var cn__default = /*#__PURE__*/
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
11
|
|
|
14
|
-
var styles = {"component":"
|
|
12
|
+
var styles = {"component":"steps__component_89css"};
|
|
15
13
|
require('./index.css')
|
|
16
14
|
|
|
17
15
|
var StepIndicator = function (_a) {
|
|
18
16
|
var content = _a.content, iconColor = _a.iconColor, className = _a.className;
|
|
19
|
-
return (React__default
|
|
17
|
+
return (React__default.default.createElement(coreComponentsBadge.Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn__default.default(styles.component, className), content: content }));
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
exports.StepIndicator = StepIndicator;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var components_stepIndicator_Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
6
|
require('@alfalab/core-components-badge');
|
|
8
|
-
var components_stepIndicator_Component = require('./Component.js');
|
|
9
7
|
|
|
10
8
|
|
|
11
9
|
|
package/cssm/Component.js
CHANGED
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var components_step_Component = require('./components/step/Component.js');
|
|
6
|
+
var styles = require('./index.module.css');
|
|
8
7
|
require('@alfalab/hooks');
|
|
9
8
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
10
9
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
11
10
|
require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
11
|
+
require('./components/step-indicator/Component.js');
|
|
12
12
|
require('@alfalab/core-components-badge/cssm');
|
|
13
13
|
require('./components/step-indicator/index.module.css');
|
|
14
|
-
require('./components/step-indicator/Component.js');
|
|
15
14
|
require('./components/step/index.module.css');
|
|
16
|
-
var styles = require('./index.module.css');
|
|
17
15
|
|
|
18
|
-
function
|
|
16
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
19
17
|
|
|
20
|
-
var React__default = /*#__PURE__*/
|
|
21
|
-
var cn__default = /*#__PURE__*/
|
|
22
|
-
var styles__default = /*#__PURE__*/
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
20
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
23
21
|
|
|
24
22
|
var Steps = function (_a) {
|
|
25
23
|
var _b;
|
|
26
24
|
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, checkIsStepDisabled = _a.checkIsStepDisabled, checkIsStepError = _a.checkIsStepError, checkIsStepWarning = _a.checkIsStepWarning, checkIsStepWaiting = _a.checkIsStepWaiting, checkIsStepPositive = _a.checkIsStepPositive, checkIsStepCustom = _a.checkIsStepCustom, onChange = _a.onChange, dataTestId = _a.dataTestId;
|
|
27
25
|
var _h = React.useState(activeStepProp || defaultActiveStep), activeStep = _h[0], setActiveStep = _h[1];
|
|
28
|
-
var stepsLength = React__default
|
|
26
|
+
var stepsLength = React__default.default.Children.count(children);
|
|
29
27
|
React.useEffect(function () {
|
|
30
28
|
if (activeStepProp) {
|
|
31
29
|
setActiveStep(activeStepProp);
|
|
@@ -39,9 +37,9 @@ var Steps = function (_a) {
|
|
|
39
37
|
};
|
|
40
38
|
if (!stepsLength)
|
|
41
39
|
return null;
|
|
42
|
-
return (React__default
|
|
43
|
-
_b[styles__default
|
|
44
|
-
_b)), "data-test-id": dataTestId }, React__default
|
|
40
|
+
return (React__default.default.createElement("div", { className: cn__default.default(className, styles__default.default.component, (_b = {},
|
|
41
|
+
_b[styles__default.default.vertical] = isVerticalAlign,
|
|
42
|
+
_b)), "data-test-id": dataTestId }, React__default.default.Children.map(children, function (step, index) {
|
|
45
43
|
var stepNumber = index + 1;
|
|
46
44
|
var isSelected = stepNumber === activeStep;
|
|
47
45
|
var isStepCompleted = isMarkCompletedSteps && stepNumber < activeStep;
|
|
@@ -53,7 +51,7 @@ var Steps = function (_a) {
|
|
|
53
51
|
var customStepIndicator = checkIsStepCustom && checkIsStepCustom(stepNumber);
|
|
54
52
|
var isNotLastStep = stepsLength !== stepNumber;
|
|
55
53
|
var isInteractive = !disabled && interactive;
|
|
56
|
-
return (React__default
|
|
54
|
+
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 }, step));
|
|
57
55
|
})));
|
|
58
56
|
};
|
|
59
57
|
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var hooks = require('@alfalab/hooks');
|
|
8
6
|
var CheckmarkCircleMIcon = require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
9
7
|
var ClockMIcon = require('@alfalab/icons-glyph/ClockMIcon');
|
|
10
8
|
var ExclamationCircleMIcon = require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
11
|
-
require('@alfalab/core-components-badge/cssm');
|
|
12
|
-
require('../step-indicator/index.module.css');
|
|
13
9
|
var components_stepIndicator_Component = require('../step-indicator/Component.js');
|
|
14
10
|
var styles = require('./index.module.css');
|
|
11
|
+
require('@alfalab/core-components-badge/cssm');
|
|
12
|
+
require('../step-indicator/index.module.css');
|
|
15
13
|
|
|
16
|
-
function
|
|
14
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
17
15
|
|
|
18
|
-
var React__default = /*#__PURE__*/
|
|
19
|
-
var cn__default = /*#__PURE__*/
|
|
20
|
-
var styles__default = /*#__PURE__*/
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
21
19
|
|
|
22
20
|
/******************************************************************************
|
|
23
21
|
Copyright (c) Microsoft Corporation.
|
|
@@ -68,57 +66,57 @@ var Step = function (_a) {
|
|
|
68
66
|
};
|
|
69
67
|
var getStepIndicator = function () {
|
|
70
68
|
if (customStepIndicator) {
|
|
71
|
-
return React__default
|
|
69
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, __assign({}, customStepIndicator));
|
|
72
70
|
}
|
|
73
71
|
if (isError) {
|
|
74
|
-
return React__default
|
|
72
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'negative', content: React__default.default.createElement(ExclamationCircleMIcon.ExclamationCircleMIcon, null) });
|
|
75
73
|
}
|
|
76
74
|
if (isWarning) {
|
|
77
|
-
return React__default
|
|
75
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'attention', content: React__default.default.createElement(ExclamationCircleMIcon.ExclamationCircleMIcon, null) });
|
|
78
76
|
}
|
|
79
77
|
if (isWaiting) {
|
|
80
|
-
return React__default
|
|
78
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'secondary', content: React__default.default.createElement(ClockMIcon.ClockMIcon, null) });
|
|
81
79
|
}
|
|
82
80
|
if (isPositive) {
|
|
83
|
-
return React__default
|
|
81
|
+
return React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'positive', content: React__default.default.createElement(CheckmarkCircleMIcon.CheckmarkCircleMIcon, null) });
|
|
84
82
|
}
|
|
85
83
|
if (isStepCompleted) {
|
|
86
|
-
return (React__default
|
|
84
|
+
return (React__default.default.createElement(components_stepIndicator_Component.StepIndicator, { iconColor: 'positive', content: React__default.default.createElement(CheckmarkCircleMIcon.CheckmarkCircleMIcon, null), className: styles__default.default.completedIndicator }));
|
|
87
85
|
}
|
|
88
86
|
if (!ordered) {
|
|
89
|
-
return (React__default
|
|
90
|
-
React__default
|
|
87
|
+
return (React__default.default.createElement("div", { className: styles__default.default.checkbox },
|
|
88
|
+
React__default.default.createElement("span", { className: styles__default.default.dot })));
|
|
91
89
|
}
|
|
92
90
|
return stepNumber;
|
|
93
91
|
};
|
|
94
92
|
var renderDash = function () {
|
|
95
93
|
var _a;
|
|
96
|
-
return (React__default
|
|
97
|
-
_a[styles__default
|
|
98
|
-
_a[styles__default
|
|
94
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.dash, (_a = {},
|
|
95
|
+
_a[styles__default.default.vertical] = isVerticalAlign,
|
|
96
|
+
_a[styles__default.default.completed] = isStepCompleted,
|
|
99
97
|
_a)) }));
|
|
100
98
|
};
|
|
101
|
-
return (React__default
|
|
102
|
-
_b[styles__default
|
|
103
|
-
_b[styles__default
|
|
104
|
-
_b[styles__default
|
|
105
|
-
_b[styles__default
|
|
106
|
-
_b[styles__default
|
|
107
|
-
_b[styles__default
|
|
108
|
-
_b[styles__default
|
|
99
|
+
return (React__default.default.createElement("div", { role: 'button', tabIndex: 0, ref: stepRef, className: cn__default.default(styles__default.default.step, (_b = {},
|
|
100
|
+
_b[styles__default.default.completed] = isStepCompleted,
|
|
101
|
+
_b[styles__default.default.error] = isError,
|
|
102
|
+
_b[styles__default.default.selected] = isSelected,
|
|
103
|
+
_b[styles__default.default.disabled] = disabled,
|
|
104
|
+
_b[styles__default.default.focused] = focused,
|
|
105
|
+
_b[styles__default.default.vertical] = isVerticalAlign,
|
|
106
|
+
_b[styles__default.default.interactive] = interactive,
|
|
109
107
|
_b)), onClick: handleButtonClick, onKeyDown: handleKeyDown },
|
|
110
|
-
React__default
|
|
111
|
-
_c[styles__default
|
|
112
|
-
_c[styles__default
|
|
108
|
+
React__default.default.createElement("div", { className: cn__default.default(styles__default.default.indicator, (_c = {},
|
|
109
|
+
_c[styles__default.default.vertical] = isVerticalAlign,
|
|
110
|
+
_c[styles__default.default.interactive] = interactive,
|
|
113
111
|
_c)) },
|
|
114
|
-
React__default
|
|
115
|
-
_d[styles__default
|
|
116
|
-
_d[styles__default
|
|
117
|
-
_d[styles__default
|
|
112
|
+
React__default.default.createElement("div", { className: cn__default.default(styles__default.default.option, (_d = {},
|
|
113
|
+
_d[styles__default.default.unordered] = !ordered,
|
|
114
|
+
_d[styles__default.default.vertical] = isVerticalAlign,
|
|
115
|
+
_d[styles__default.default.error] = isError,
|
|
118
116
|
_d)) }, getStepIndicator()),
|
|
119
117
|
isNotLastStep && isVerticalAlign && renderDash()),
|
|
120
|
-
React__default
|
|
121
|
-
_e[styles__default
|
|
118
|
+
React__default.default.createElement("div", { className: cn__default.default(styles__default.default.text, (_e = {},
|
|
119
|
+
_e[styles__default.default.interactive] = interactive,
|
|
122
120
|
_e)), onClick: handleTextClick }, children),
|
|
123
121
|
isNotLastStep && !isVerticalAlign && renderDash()));
|
|
124
122
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var components_step_Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
|
-
var components_step_Component = require('./Component.js');
|
|
8
6
|
require('@alfalab/hooks');
|
|
9
7
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
10
8
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
11
9
|
require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
10
|
+
require('../step-indicator/Component.js');
|
|
12
11
|
require('@alfalab/core-components-badge/cssm');
|
|
13
12
|
require('../step-indicator/index.module.css');
|
|
14
|
-
require('../step-indicator/Component.js');
|
|
15
13
|
require('./index.module.css');
|
|
16
14
|
|
|
17
15
|
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var coreComponentsBadge = require('@alfalab/core-components-badge/cssm');
|
|
8
6
|
var styles = require('./index.module.css');
|
|
9
7
|
|
|
10
|
-
function
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
9
|
|
|
12
|
-
var React__default = /*#__PURE__*/
|
|
13
|
-
var cn__default = /*#__PURE__*/
|
|
14
|
-
var styles__default = /*#__PURE__*/
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
15
13
|
|
|
16
14
|
var StepIndicator = function (_a) {
|
|
17
15
|
var content = _a.content, iconColor = _a.iconColor, className = _a.className;
|
|
18
|
-
return (React__default
|
|
16
|
+
return (React__default.default.createElement(coreComponentsBadge.Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn__default.default(styles__default.default.component, className), content: content }));
|
|
19
17
|
};
|
|
20
18
|
|
|
21
19
|
exports.StepIndicator = StepIndicator;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var components_stepIndicator_Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
6
|
require('@alfalab/core-components-badge/cssm');
|
|
8
7
|
require('./index.module.css');
|
|
9
|
-
var components_stepIndicator_Component = require('./Component.js');
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
|
package/cssm/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
6
|
require('./components/step/Component.js');
|
|
@@ -9,12 +8,11 @@ require('@alfalab/hooks');
|
|
|
9
8
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
10
9
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
11
10
|
require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
11
|
+
require('./components/step-indicator/Component.js');
|
|
12
12
|
require('@alfalab/core-components-badge/cssm');
|
|
13
13
|
require('./components/step-indicator/index.module.css');
|
|
14
|
-
require('./components/step-indicator/Component.js');
|
|
15
14
|
require('./components/step/index.module.css');
|
|
16
15
|
require('./index.module.css');
|
|
17
|
-
var Component = require('./Component.js');
|
|
18
16
|
|
|
19
17
|
|
|
20
18
|
|
package/esm/Component.js
CHANGED
|
@@ -5,10 +5,10 @@ import '@alfalab/hooks';
|
|
|
5
5
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
6
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
8
|
-
import '@alfalab/core-components-badge/esm';
|
|
9
8
|
import './components/step-indicator/Component.js';
|
|
9
|
+
import '@alfalab/core-components-badge/esm';
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"
|
|
11
|
+
var styles = {"component":"steps__component_1qx39","vertical":"steps__vertical_1qx39"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var Steps = function (_a) {
|
|
@@ -4,8 +4,8 @@ import { useFocus } from '@alfalab/hooks';
|
|
|
4
4
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
5
5
|
import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
|
|
6
6
|
import { ExclamationCircleMIcon } from '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
7
|
-
import '@alfalab/core-components-badge/esm';
|
|
8
7
|
import { StepIndicator } from '../step-indicator/Component.js';
|
|
8
|
+
import '@alfalab/core-components-badge/esm';
|
|
9
9
|
|
|
10
10
|
/******************************************************************************
|
|
11
11
|
Copyright (c) Microsoft Corporation.
|
|
@@ -34,7 +34,7 @@ var __assign = function () {
|
|
|
34
34
|
return __assign.apply(this, arguments);
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
var styles = {"step":"
|
|
37
|
+
var styles = {"step":"steps__step_1wzux","vertical":"steps__vertical_1wzux","interactive":"steps__interactive_1wzux","disabled":"steps__disabled_1wzux","text":"steps__text_1wzux","indicator":"steps__indicator_1wzux","option":"steps__option_1wzux","dash":"steps__dash_1wzux","completed":"steps__completed_1wzux","focused":"steps__focused_1wzux","selected":"steps__selected_1wzux","checkbox":"steps__checkbox_1wzux","dot":"steps__dot_1wzux","error":"steps__error_1wzux","unordered":"steps__unordered_1wzux","completedIndicator":"steps__completedIndicator_1wzux"};
|
|
38
38
|
require('./index.css')
|
|
39
39
|
|
|
40
40
|
var Step = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9mw7p */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -33,33 +33,33 @@
|
|
|
33
33
|
--steps-option-svg-color: var(--color-light-graphic-positive);
|
|
34
34
|
--steps-dash-border: 2px solid var(--color-light-graphic-positive);
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.steps__step_1wzux {
|
|
37
37
|
display: flex;
|
|
38
38
|
outline: none
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.steps__step_1wzux:not(.steps__vertical_1wzux) {
|
|
41
41
|
align-items: center;
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.steps__step_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):hover {
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.steps__step_1wzux.steps__disabled_1wzux:hover .steps__text_1wzux {
|
|
47
47
|
background: unset;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.steps__step_1wzux.steps__disabled_1wzux .steps__indicator_1wzux {
|
|
50
50
|
cursor: unset;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.steps__indicator_1wzux {
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
display: flex;
|
|
55
55
|
align-items: center;
|
|
56
56
|
margin-right: var(--gap-2xs)
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.steps__indicator_1wzux.steps__vertical_1wzux {
|
|
59
59
|
flex-direction: column;
|
|
60
60
|
margin-right: var(--gap-xs);
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.steps__option_1wzux {
|
|
63
63
|
font-size: 14px;
|
|
64
64
|
line-height: 20px;
|
|
65
65
|
font-weight: 700;
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
height: 24px;
|
|
74
74
|
border-radius: var(--border-radius-circle)
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
.steps__option_1wzux.steps__vertical_1wzux {
|
|
77
77
|
margin-top: var(--gap-xs);
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
.steps__dash_1wzux {
|
|
80
80
|
flex: 1 1 auto;
|
|
81
81
|
min-width: 24px;
|
|
82
82
|
border-top: 2px solid var(--color-light-border-primary);
|
|
83
83
|
margin-right: var(--gap-xs)
|
|
84
84
|
}
|
|
85
|
-
.
|
|
85
|
+
.steps__dash_1wzux.steps__completed_1wzux {
|
|
86
86
|
border-top: var(--steps-dash-border);
|
|
87
87
|
}
|
|
88
|
-
.
|
|
88
|
+
.steps__dash_1wzux.steps__vertical_1wzux {
|
|
89
89
|
min-width: unset;
|
|
90
90
|
min-height: 24px;
|
|
91
91
|
margin-right: 0;
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
border-left: 2px solid var(--color-light-border-primary);
|
|
94
94
|
border-top: none;
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
.steps__dash_1wzux.steps__completed_1wzux.steps__vertical_1wzux {
|
|
97
97
|
border-left: var(--steps-dash-border);
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
.steps__text_1wzux {
|
|
100
100
|
font-size: 16px;
|
|
101
101
|
line-height: 24px;
|
|
102
102
|
font-weight: 400;
|
|
@@ -107,24 +107,24 @@
|
|
|
107
107
|
border-radius: var(--gap-xs);
|
|
108
108
|
height: min-content
|
|
109
109
|
}
|
|
110
|
-
.
|
|
110
|
+
.steps__text_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):hover {
|
|
111
111
|
background: var(--color-light-bg-primary-inverted-alpha-7);
|
|
112
112
|
}
|
|
113
|
-
.
|
|
113
|
+
.steps__text_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):active {
|
|
114
114
|
background: var(--color-light-bg-primary-inverted-alpha-15);
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.steps__focused_1wzux {
|
|
117
117
|
outline: var(--gap-3xs) solid var(--focus-color);
|
|
118
118
|
outline-offset: var(--gap-3xs);
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.steps__selected_1wzux .steps__text_1wzux {
|
|
121
121
|
color: var(--color-light-graphic-primary);
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.steps__selected_1wzux .steps__option_1wzux {
|
|
124
124
|
color: var(--color-light-graphic-primary-inverted);
|
|
125
125
|
background: var(--color-light-graphic-primary);
|
|
126
126
|
}
|
|
127
|
-
.
|
|
127
|
+
.steps__checkbox_1wzux {
|
|
128
128
|
display: flex;
|
|
129
129
|
justify-content: center;
|
|
130
130
|
align-items: center;
|
|
@@ -133,22 +133,22 @@
|
|
|
133
133
|
height: 20px;
|
|
134
134
|
border: 2px solid var(--color-light-graphic-quaternary);
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
.steps__dot_1wzux {
|
|
137
137
|
width: 10px;
|
|
138
138
|
height: 10px;
|
|
139
139
|
border-radius: var(--border-radius-circle);
|
|
140
140
|
background: var(--color-light-graphic-quaternary);
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
.steps__selected_1wzux .steps__checkbox_1wzux {
|
|
143
143
|
border: 2px solid var(--color-light-graphic-primary)
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.steps__selected_1wzux .steps__checkbox_1wzux .steps__dot_1wzux {
|
|
146
146
|
background: var(--color-light-graphic-primary);
|
|
147
147
|
}
|
|
148
|
-
.
|
|
148
|
+
.steps__option_1wzux:not(.steps__error_1wzux).steps__unordered_1wzux {
|
|
149
149
|
background: unset;
|
|
150
150
|
}
|
|
151
|
-
.
|
|
151
|
+
.steps__completedIndicator_1wzux > [class*='positive'] {
|
|
152
152
|
color: var(--steps-option-svg-color);
|
|
153
153
|
background-color: var(--steps-option-svg-color);
|
|
154
154
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export { Step } from './Component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
3
|
-
export { Step } from './Component.js';
|
|
4
4
|
import '@alfalab/hooks';
|
|
5
5
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
6
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
8
|
-
import '@alfalab/core-components-badge/esm';
|
|
9
8
|
import '../step-indicator/Component.js';
|
|
9
|
+
import '@alfalab/core-components-badge/esm';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Badge } from '@alfalab/core-components-badge/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"steps__component_89css"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var StepIndicator = function (_a) {
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: li0ej */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
/* Hard up */
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.steps__component_1qx39 {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
flex-direction: row
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.steps__component_1qx39.steps__vertical_1qx39 {
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
align-items: flex-start;
|
|
18
18
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Steps } from './Component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
3
4
|
import './components/step/Component.js';
|
|
@@ -5,6 +6,5 @@ import '@alfalab/hooks';
|
|
|
5
6
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
6
7
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
7
8
|
import '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
8
|
-
import '@alfalab/core-components-badge/esm';
|
|
9
9
|
import './components/step-indicator/Component.js';
|
|
10
|
-
|
|
10
|
+
import '@alfalab/core-components-badge/esm';
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: li0ej */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
/* Hard up */
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.steps__component_1qx39 {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
flex-direction: row
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.steps__component_1qx39.steps__vertical_1qx39 {
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
align-items: flex-start;
|
|
18
18
|
}
|
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
6
|
require('./components/step/Component.js');
|
|
@@ -9,9 +8,8 @@ require('@alfalab/hooks');
|
|
|
9
8
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
10
9
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
11
10
|
require('@alfalab/icons-glyph/ExclamationCircleMIcon');
|
|
12
|
-
require('@alfalab/core-components-badge');
|
|
13
11
|
require('./components/step-indicator/Component.js');
|
|
14
|
-
|
|
12
|
+
require('@alfalab/core-components-badge');
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
|
package/modern/Component.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import { Step } from './components/step/Component.js';
|
|
3
4
|
import '@alfalab/hooks';
|
|
4
5
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
5
6
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
6
7
|
import '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
7
|
-
import '@alfalab/core-components-badge/modern';
|
|
8
8
|
import './components/step-indicator/Component.js';
|
|
9
|
-
import
|
|
9
|
+
import '@alfalab/core-components-badge/modern';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const styles = {"component":"steps__component_1qx39","vertical":"steps__vertical_1qx39"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
const Steps = ({ className, children, defaultActiveStep = 1, activeStep: activeStepProp, isMarkCompletedSteps = true, isVerticalAlign = false, ordered = true, interactive = true, checkIsStepDisabled, checkIsStepError, checkIsStepWarning, checkIsStepWaiting, checkIsStepPositive, checkIsStepCustom, onChange, dataTestId, }) => {
|
|
@@ -4,10 +4,10 @@ import { useFocus } from '@alfalab/hooks';
|
|
|
4
4
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
5
5
|
import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
|
|
6
6
|
import { ExclamationCircleMIcon } from '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
7
|
-
import '@alfalab/core-components-badge/modern';
|
|
8
7
|
import { StepIndicator } from '../step-indicator/Component.js';
|
|
8
|
+
import '@alfalab/core-components-badge/modern';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const styles = {"step":"steps__step_1wzux","vertical":"steps__vertical_1wzux","interactive":"steps__interactive_1wzux","disabled":"steps__disabled_1wzux","text":"steps__text_1wzux","indicator":"steps__indicator_1wzux","option":"steps__option_1wzux","dash":"steps__dash_1wzux","completed":"steps__completed_1wzux","focused":"steps__focused_1wzux","selected":"steps__selected_1wzux","checkbox":"steps__checkbox_1wzux","dot":"steps__dot_1wzux","error":"steps__error_1wzux","unordered":"steps__unordered_1wzux","completedIndicator":"steps__completedIndicator_1wzux"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Step = ({ children, stepNumber, isSelected, disabled, ordered, isPositive, isError, isWarning, isWaiting, customStepIndicator, isStepCompleted, onClick, interactive, isVerticalAlign, isNotLastStep, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9mw7p */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -33,33 +33,33 @@
|
|
|
33
33
|
--steps-option-svg-color: var(--color-light-graphic-positive);
|
|
34
34
|
--steps-dash-border: 2px solid var(--color-light-graphic-positive);
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.steps__step_1wzux {
|
|
37
37
|
display: flex;
|
|
38
38
|
outline: none
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.steps__step_1wzux:not(.steps__vertical_1wzux) {
|
|
41
41
|
align-items: center;
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.steps__step_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):hover {
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.steps__step_1wzux.steps__disabled_1wzux:hover .steps__text_1wzux {
|
|
47
47
|
background: unset;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.steps__step_1wzux.steps__disabled_1wzux .steps__indicator_1wzux {
|
|
50
50
|
cursor: unset;
|
|
51
51
|
}
|
|
52
|
-
.
|
|
52
|
+
.steps__indicator_1wzux {
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
display: flex;
|
|
55
55
|
align-items: center;
|
|
56
56
|
margin-right: var(--gap-2xs)
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.steps__indicator_1wzux.steps__vertical_1wzux {
|
|
59
59
|
flex-direction: column;
|
|
60
60
|
margin-right: var(--gap-xs);
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.steps__option_1wzux {
|
|
63
63
|
font-size: 14px;
|
|
64
64
|
line-height: 20px;
|
|
65
65
|
font-weight: 700;
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
height: 24px;
|
|
74
74
|
border-radius: var(--border-radius-circle)
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
.steps__option_1wzux.steps__vertical_1wzux {
|
|
77
77
|
margin-top: var(--gap-xs);
|
|
78
78
|
}
|
|
79
|
-
.
|
|
79
|
+
.steps__dash_1wzux {
|
|
80
80
|
flex: 1 1 auto;
|
|
81
81
|
min-width: 24px;
|
|
82
82
|
border-top: 2px solid var(--color-light-border-primary);
|
|
83
83
|
margin-right: var(--gap-xs)
|
|
84
84
|
}
|
|
85
|
-
.
|
|
85
|
+
.steps__dash_1wzux.steps__completed_1wzux {
|
|
86
86
|
border-top: var(--steps-dash-border);
|
|
87
87
|
}
|
|
88
|
-
.
|
|
88
|
+
.steps__dash_1wzux.steps__vertical_1wzux {
|
|
89
89
|
min-width: unset;
|
|
90
90
|
min-height: 24px;
|
|
91
91
|
margin-right: 0;
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
border-left: 2px solid var(--color-light-border-primary);
|
|
94
94
|
border-top: none;
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
.steps__dash_1wzux.steps__completed_1wzux.steps__vertical_1wzux {
|
|
97
97
|
border-left: var(--steps-dash-border);
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
.steps__text_1wzux {
|
|
100
100
|
font-size: 16px;
|
|
101
101
|
line-height: 24px;
|
|
102
102
|
font-weight: 400;
|
|
@@ -107,24 +107,24 @@
|
|
|
107
107
|
border-radius: var(--gap-xs);
|
|
108
108
|
height: min-content
|
|
109
109
|
}
|
|
110
|
-
.
|
|
110
|
+
.steps__text_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):hover {
|
|
111
111
|
background: var(--color-light-bg-primary-inverted-alpha-7);
|
|
112
112
|
}
|
|
113
|
-
.
|
|
113
|
+
.steps__text_1wzux.steps__interactive_1wzux:not(.steps__disabled_1wzux):active {
|
|
114
114
|
background: var(--color-light-bg-primary-inverted-alpha-15);
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.steps__focused_1wzux {
|
|
117
117
|
outline: var(--gap-3xs) solid var(--focus-color);
|
|
118
118
|
outline-offset: var(--gap-3xs);
|
|
119
119
|
}
|
|
120
|
-
.
|
|
120
|
+
.steps__selected_1wzux .steps__text_1wzux {
|
|
121
121
|
color: var(--color-light-graphic-primary);
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.steps__selected_1wzux .steps__option_1wzux {
|
|
124
124
|
color: var(--color-light-graphic-primary-inverted);
|
|
125
125
|
background: var(--color-light-graphic-primary);
|
|
126
126
|
}
|
|
127
|
-
.
|
|
127
|
+
.steps__checkbox_1wzux {
|
|
128
128
|
display: flex;
|
|
129
129
|
justify-content: center;
|
|
130
130
|
align-items: center;
|
|
@@ -133,22 +133,22 @@
|
|
|
133
133
|
height: 20px;
|
|
134
134
|
border: 2px solid var(--color-light-graphic-quaternary);
|
|
135
135
|
}
|
|
136
|
-
.
|
|
136
|
+
.steps__dot_1wzux {
|
|
137
137
|
width: 10px;
|
|
138
138
|
height: 10px;
|
|
139
139
|
border-radius: var(--border-radius-circle);
|
|
140
140
|
background: var(--color-light-graphic-quaternary);
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
.steps__selected_1wzux .steps__checkbox_1wzux {
|
|
143
143
|
border: 2px solid var(--color-light-graphic-primary)
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.steps__selected_1wzux .steps__checkbox_1wzux .steps__dot_1wzux {
|
|
146
146
|
background: var(--color-light-graphic-primary);
|
|
147
147
|
}
|
|
148
|
-
.
|
|
148
|
+
.steps__option_1wzux:not(.steps__error_1wzux).steps__unordered_1wzux {
|
|
149
149
|
background: unset;
|
|
150
150
|
}
|
|
151
|
-
.
|
|
151
|
+
.steps__completedIndicator_1wzux > [class*='positive'] {
|
|
152
152
|
color: var(--steps-option-svg-color);
|
|
153
153
|
background-color: var(--steps-option-svg-color);
|
|
154
154
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export { Step } from './Component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
3
4
|
import '@alfalab/hooks';
|
|
4
5
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
5
6
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
6
7
|
import '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
7
|
-
import '@alfalab/core-components-badge/modern';
|
|
8
8
|
import '../step-indicator/Component.js';
|
|
9
|
-
|
|
9
|
+
import '@alfalab/core-components-badge/modern';
|
|
@@ -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
|
-
|
|
5
|
+
const styles = {"component":"steps__component_89css"};
|
|
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 }));
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: li0ej */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
/* Hard up */
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.steps__component_1qx39 {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
flex-direction: row
|
|
14
14
|
}
|
|
15
|
-
.
|
|
15
|
+
.steps__component_1qx39.steps__vertical_1qx39 {
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
align-items: flex-start;
|
|
18
18
|
}
|
package/modern/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
export { Steps } from './Component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
4
|
+
import './components/step/Component.js';
|
|
3
5
|
import '@alfalab/hooks';
|
|
4
6
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
5
7
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
6
8
|
import '@alfalab/icons-glyph/ExclamationCircleMIcon';
|
|
7
|
-
import '@alfalab/core-components-badge/modern';
|
|
8
9
|
import './components/step-indicator/Component.js';
|
|
9
|
-
import '
|
|
10
|
-
export { Steps } from './Component.js';
|
|
10
|
+
import '@alfalab/core-components-badge/modern';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-steps",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@alfalab/core-components-badge": "^4.0.
|
|
20
|
+
"@alfalab/core-components-badge": "^4.0.4",
|
|
21
21
|
"@alfalab/hooks": "^1.13.0",
|
|
22
22
|
"@alfalab/icons-glyph": "^2.71.0",
|
|
23
23
|
"classnames": "^2.3.1"
|