@alfalab/core-components-steps 1.6.2 → 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.
- package/Component.js +1 -1
- package/components/step/Component.js +1 -1
- package/components/step/index.css +56 -49
- package/components/step-indicator/Component.js +1 -1
- package/components/step-indicator/index.css +2 -2
- package/cssm/components/step/index.module.css +25 -18
- package/cssm/components/step-indicator/index.module.css +1 -1
- package/cssm/index.module.css +9 -5
- package/esm/Component.js +1 -1
- package/esm/components/step/Component.js +1 -1
- package/esm/components/step/index.css +56 -49
- package/esm/components/step-indicator/Component.js +1 -1
- package/esm/components/step-indicator/index.css +2 -2
- package/esm/index.css +12 -8
- package/index.css +12 -8
- package/modern/Component.js +1 -1
- package/modern/components/step/Component.js +1 -1
- package/modern/components/step/index.css +56 -49
- package/modern/components/step-indicator/Component.js +1 -1
- package/modern/components/step-indicator/index.css +2 -2
- package/modern/index.css +12 -8
- package/moderncssm/Component.d.ts +99 -0
- package/moderncssm/Component.js +39 -0
- package/moderncssm/components/step/Component.d.ts +80 -0
- package/moderncssm/components/step/Component.js +89 -0
- package/moderncssm/components/step/index.d.ts +1 -0
- package/moderncssm/components/step/index.js +1 -0
- package/moderncssm/components/step/index.module.css +170 -0
- package/moderncssm/components/step-indicator/Component.d.ts +6 -0
- package/moderncssm/components/step-indicator/Component.js +8 -0
- package/moderncssm/components/step-indicator/index.d.ts +1 -0
- package/moderncssm/components/step-indicator/index.js +1 -0
- package/moderncssm/components/step-indicator/index.module.css +3 -0
- package/moderncssm/index.d.ts +1 -0
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.module.css +12 -0
- package/package.json +5 -3
- package/src/components/step/index.module.css +10 -10
- package/src/components/step-indicator/index.module.css +1 -1
- package/src/index.module.css +1 -1
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--steps-option-svg-color: var(--color-light-status-positive);
|
|
5
|
+
--steps-dash-border: 2px solid var(--color-light-status-positive);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.step {
|
|
9
|
+
display: flex;
|
|
10
|
+
outline: none
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.step:not(.vertical) {
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.step.interactive:not(.disabled):hover {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.step.disabled:hover .text {
|
|
22
|
+
background: unset;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.step.disabled .indicator {
|
|
26
|
+
cursor: unset;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.indicator {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
margin-right: var(--gap-4)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.indicator.vertical {
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
margin-right: var(--gap-8);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.option {
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
line-height: 20px;
|
|
44
|
+
font-weight: 700;
|
|
45
|
+
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
color: var(--color-light-text-primary);
|
|
50
|
+
background: var(--color-light-neutral-translucent-300);
|
|
51
|
+
min-width: 24px;
|
|
52
|
+
height: 24px;
|
|
53
|
+
border-radius: var(--border-radius-circle)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.option.vertical {
|
|
57
|
+
margin-top: var(--gap-8);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dash {
|
|
61
|
+
flex: 1 1 auto;
|
|
62
|
+
min-width: 24px;
|
|
63
|
+
border-top: 2px solid var(--color-light-neutral-translucent-300);
|
|
64
|
+
margin-right: var(--gap-8)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dash.size-16 {
|
|
68
|
+
min-width: 16px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dash.size-8 {
|
|
72
|
+
min-width: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dash.completed {
|
|
76
|
+
border-top: var(--steps-dash-border);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.dash.vertical {
|
|
80
|
+
min-width: unset;
|
|
81
|
+
min-height: 24px;
|
|
82
|
+
margin-right: 0;
|
|
83
|
+
margin-top: var(--gap-8);
|
|
84
|
+
border-left: 2px solid var(--color-light-neutral-translucent-300);
|
|
85
|
+
border-top: none
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dash.vertical.size-16 {
|
|
89
|
+
min-height: 16px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dash.vertical.size-8 {
|
|
93
|
+
min-height: 8px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.dash.completed.vertical {
|
|
97
|
+
border-left: var(--steps-dash-border);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.text {
|
|
101
|
+
font-size: 16px;
|
|
102
|
+
line-height: 24px;
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
|
|
105
|
+
transition: background 0.2s;
|
|
106
|
+
padding: var(--gap-8);
|
|
107
|
+
color: var(--color-light-text-primary);
|
|
108
|
+
border-radius: var(--gap-8);
|
|
109
|
+
height: min-content
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.text.interactive:not(.disabled):hover {
|
|
113
|
+
background: var(--color-light-transparent-default-hover);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.text.interactive:not(.disabled):active {
|
|
117
|
+
background: var(--color-light-transparent-default-press);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.focused {
|
|
121
|
+
outline: var(--gap-2) solid var(--focus-color);
|
|
122
|
+
outline-offset: var(--gap-2);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.selected .text {
|
|
126
|
+
color: var(--color-light-text-primary);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.selected .option {
|
|
130
|
+
color: var(--color-light-text-primary-inverted);
|
|
131
|
+
background: var(--color-light-neutral-translucent-1300);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.checkbox {
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
align-items: center;
|
|
138
|
+
border-radius: var(--border-radius-circle);
|
|
139
|
+
width: 20px;
|
|
140
|
+
height: 20px;
|
|
141
|
+
border: 2px solid var(--color-light-neutral-translucent-300);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.dot {
|
|
145
|
+
width: 10px;
|
|
146
|
+
height: 10px;
|
|
147
|
+
border-radius: var(--border-radius-circle);
|
|
148
|
+
background: var(--color-light-neutral-translucent-300);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.selected .checkbox {
|
|
152
|
+
border: 2px solid var(--color-light-neutral-translucent-1300)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.selected .checkbox .dot {
|
|
156
|
+
background: var(--color-light-neutral-translucent-1300);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.option:not(.error).unordered {
|
|
160
|
+
background: unset;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.completedIndicator > [class*='positive'] {
|
|
164
|
+
color: var(--steps-option-svg-color);
|
|
165
|
+
background-color: var(--steps-option-svg-color);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.fullWidth {
|
|
169
|
+
width: 100%;
|
|
170
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BadgeProps } from "@alfalab/core-components-badge";
|
|
4
|
+
type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;
|
|
5
|
+
declare const StepIndicator: React.FC<StepIndicatorProps>;
|
|
6
|
+
export { StepIndicatorProps, StepIndicator };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Badge } from '@alfalab/core-components-badge/moderncssm';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
|
|
6
|
+
const StepIndicator = ({ content, iconColor, className }) => (React.createElement(Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn(styles.component, className), content: content }));
|
|
7
|
+
|
|
8
|
+
export { StepIndicator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StepIndicator } from './Component.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Steps } from './Component.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-steps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-badge": "^5.
|
|
17
|
+
"@alfalab/core-components-badge": "^5.6.0",
|
|
18
18
|
"@alfalab/hooks": "^1.13.0",
|
|
19
19
|
"@alfalab/icons-glyph": "^2.139.0",
|
|
20
20
|
"classnames": "^2.3.1",
|
|
21
21
|
"tslib": "^2.4.0"
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
"themesVersion": "13.1.0",
|
|
24
|
+
"varsVersion": "9.12.0"
|
|
23
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '@alfalab/core-components-
|
|
1
|
+
@import '@alfalab/core-components-vars/src/index.css';
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
4
|
--steps-option-svg-color: var(--color-light-status-positive);
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
cursor: pointer;
|
|
35
35
|
display: flex;
|
|
36
36
|
align-items: center;
|
|
37
|
-
margin-right: var(--gap-
|
|
37
|
+
margin-right: var(--gap-4);
|
|
38
38
|
|
|
39
39
|
&.vertical {
|
|
40
40
|
flex-direction: column;
|
|
41
|
-
margin-right: var(--gap-
|
|
41
|
+
margin-right: var(--gap-8);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
border-radius: var(--border-radius-circle);
|
|
56
56
|
|
|
57
57
|
&.vertical {
|
|
58
|
-
margin-top: var(--gap-
|
|
58
|
+
margin-top: var(--gap-8);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
flex: 1 1 auto;
|
|
64
64
|
min-width: 24px;
|
|
65
65
|
border-top: 2px solid var(--color-light-neutral-translucent-300);
|
|
66
|
-
margin-right: var(--gap-
|
|
66
|
+
margin-right: var(--gap-8);
|
|
67
67
|
|
|
68
68
|
&.size-16 {
|
|
69
69
|
min-width: 16px;
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
min-width: unset;
|
|
82
82
|
min-height: 24px;
|
|
83
83
|
margin-right: 0;
|
|
84
|
-
margin-top: var(--gap-
|
|
84
|
+
margin-top: var(--gap-8);
|
|
85
85
|
border-left: 2px solid var(--color-light-neutral-translucent-300);
|
|
86
86
|
border-top: none;
|
|
87
87
|
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
@mixin paragraph_primary_medium;
|
|
104
104
|
|
|
105
105
|
transition: background 0.2s;
|
|
106
|
-
padding: var(--gap-
|
|
106
|
+
padding: var(--gap-8);
|
|
107
107
|
color: var(--color-light-text-primary);
|
|
108
|
-
border-radius: var(--gap-
|
|
108
|
+
border-radius: var(--gap-8);
|
|
109
109
|
height: min-content;
|
|
110
110
|
|
|
111
111
|
&.interactive:not(.disabled) {
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.focused {
|
|
123
|
-
outline: var(--gap-
|
|
124
|
-
outline-offset: var(--gap-
|
|
123
|
+
outline: var(--gap-2) solid var(--focus-color);
|
|
124
|
+
outline-offset: var(--gap-2);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.selected {
|
package/src/index.module.css
CHANGED