@alfalab/core-components-steps 3.0.3-alfasans → 3.0.4

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 (57) hide show
  1. package/components/step/Component.d.ts +2 -2
  2. package/components/step/Component.js +8 -11
  3. package/components/step/Component.js.map +1 -1
  4. package/components/step/index.css +35 -39
  5. package/components/step/index.module.css.js +1 -1
  6. package/components/step/index.module.css.js.map +1 -1
  7. package/components/step-indicator/Component.d.ts +5 -1
  8. package/components/step-indicator/Component.js +3 -3
  9. package/components/step-indicator/Component.js.map +1 -1
  10. package/components/step-indicator/index.css +1 -1
  11. package/components/step-indicator/index.module.css.js +1 -1
  12. package/cssm/components/step/Component.d.ts +2 -2
  13. package/cssm/components/step/Component.js +8 -11
  14. package/cssm/components/step/Component.js.map +1 -1
  15. package/cssm/components/step/index.module.css +5 -9
  16. package/cssm/components/step-indicator/Component.d.ts +5 -1
  17. package/cssm/components/step-indicator/Component.js +3 -3
  18. package/cssm/components/step-indicator/Component.js.map +1 -1
  19. package/esm/components/step/Component.d.ts +2 -2
  20. package/esm/components/step/Component.js +8 -11
  21. package/esm/components/step/Component.js.map +1 -1
  22. package/esm/components/step/index.css +35 -39
  23. package/esm/components/step/index.module.css.js +1 -1
  24. package/esm/components/step/index.module.css.js.map +1 -1
  25. package/esm/components/step-indicator/Component.d.ts +5 -1
  26. package/esm/components/step-indicator/Component.js +3 -3
  27. package/esm/components/step-indicator/Component.js.map +1 -1
  28. package/esm/components/step-indicator/index.css +1 -1
  29. package/esm/components/step-indicator/index.module.css.js +1 -1
  30. package/esm/index.css +2 -2
  31. package/esm/index.module.css.js +1 -1
  32. package/index.css +2 -2
  33. package/index.module.css.js +1 -1
  34. package/modern/components/step/Component.d.ts +2 -2
  35. package/modern/components/step/Component.js +8 -11
  36. package/modern/components/step/Component.js.map +1 -1
  37. package/modern/components/step/index.css +35 -39
  38. package/modern/components/step/index.module.css.js +1 -1
  39. package/modern/components/step/index.module.css.js.map +1 -1
  40. package/modern/components/step-indicator/Component.d.ts +5 -1
  41. package/modern/components/step-indicator/Component.js +2 -2
  42. package/modern/components/step-indicator/Component.js.map +1 -1
  43. package/modern/components/step-indicator/index.css +1 -1
  44. package/modern/components/step-indicator/index.module.css.js +1 -1
  45. package/modern/index.css +2 -2
  46. package/modern/index.module.css.js +1 -1
  47. package/moderncssm/components/step/Component.d.ts +2 -2
  48. package/moderncssm/components/step/Component.js +8 -11
  49. package/moderncssm/components/step/Component.js.map +1 -1
  50. package/moderncssm/components/step/index.module.css +3 -6
  51. package/moderncssm/components/step-indicator/Component.d.ts +5 -1
  52. package/moderncssm/components/step-indicator/Component.js +2 -2
  53. package/moderncssm/components/step-indicator/Component.js.map +1 -1
  54. package/package.json +6 -6
  55. package/src/components/step/Component.tsx +10 -17
  56. package/src/components/step/index.module.css +1 -2
  57. package/src/components/step-indicator/Component.tsx +10 -7
@@ -23,9 +23,8 @@
23
23
  --gap-16: var(--gap-m);
24
24
  }
25
25
  :root {
26
- --font-family-alfasans:
27
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
28
- Helvetica, sans-serif;
26
+ --font-family-system:
27
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
29
28
  }
30
29
  :root {
31
30
  --focus-color: var(--color-light-status-info);
@@ -34,45 +33,44 @@
34
33
  --steps-option-svg-color: var(--color-light-status-positive);
35
34
  --steps-dash-border: 2px solid var(--color-light-status-positive);
36
35
  }
37
- .steps__step_1cth5 {
36
+ .steps__step_1fw7g {
38
37
  display: flex;
39
38
  outline: none;
40
39
  }
41
- .steps__step_1cth5.steps__horizontal_1cth5 {
40
+ .steps__step_1fw7g.steps__horizontal_1fw7g {
42
41
  flex-grow: 1;
43
42
  }
44
- .steps__step_1cth5:not(.steps__vertical_1cth5) {
43
+ .steps__step_1fw7g:not(.steps__vertical_1fw7g) {
45
44
  align-items: center;
46
45
  }
47
- .steps__step_1cth5:last-of-type .steps__textWrapper_1cth5.steps__vertical_1cth5 {
46
+ .steps__step_1fw7g:last-of-type .steps__textWrapper_1fw7g.steps__vertical_1fw7g {
48
47
  margin-bottom: var(--gap-0);
49
48
  }
50
- .steps__step_1cth5.steps__interactive_1cth5:not(.steps__disabled_1cth5):hover {
49
+ .steps__step_1fw7g.steps__interactive_1fw7g:not(.steps__disabled_1fw7g):hover {
51
50
  cursor: pointer;
52
51
  }
53
- .steps__step_1cth5.steps__disabled_1cth5:hover .steps__text_1cth5 {
52
+ .steps__step_1fw7g.steps__disabled_1fw7g:hover .steps__text_1fw7g {
54
53
  background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
55
54
  background: initial;
56
55
  }
57
- .steps__step_1cth5.steps__disabled_1cth5 .steps__indicator_1cth5 {
56
+ .steps__step_1fw7g.steps__disabled_1fw7g .steps__indicator_1fw7g {
58
57
  cursor: inherit;
59
58
  }
60
- .steps__indicator_1cth5 {
59
+ .steps__indicator_1fw7g {
61
60
  cursor: pointer;
62
61
  display: flex;
63
62
  align-items: center;
64
63
  margin-right: var(--gap-4);
65
64
  }
66
- .steps__indicator_1cth5.steps__vertical_1cth5 {
65
+ .steps__indicator_1fw7g.steps__vertical_1fw7g {
67
66
  flex-direction: column;
68
67
  margin-right: var(--gap-8);
69
68
  }
70
- .steps__option_1cth5 {
69
+ .steps__option_1fw7g {
71
70
  font-size: 14px;
72
71
  line-height: 20px;
73
72
  font-weight: 700;
74
- letter-spacing: 0.47px;
75
- font-family: var(--font-family-alfasans);
73
+ font-family: var(--font-family-system);
76
74
 
77
75
  display: flex;
78
76
  align-items: center;
@@ -83,19 +81,19 @@
83
81
  height: 24px;
84
82
  border-radius: var(--border-radius-circle);
85
83
  }
86
- .steps__option_1cth5.steps__vertical_1cth5 {
84
+ .steps__option_1fw7g.steps__vertical_1fw7g {
87
85
  margin-top: var(--gap-8);
88
86
  }
89
- .steps__dash_1cth5 {
87
+ .steps__dash_1fw7g {
90
88
  flex: 1 1 auto;
91
89
  min-width: 24px;
92
90
  border-top: 2px solid var(--color-light-neutral-translucent-300);
93
91
  margin-right: var(--gap-8);
94
92
  }
95
- .steps__dash_1cth5.steps__completed_1cth5 {
93
+ .steps__dash_1fw7g.steps__completed_1fw7g {
96
94
  border-top: var(--steps-dash-border);
97
95
  }
98
- .steps__dash_1cth5.steps__vertical_1cth5 {
96
+ .steps__dash_1fw7g.steps__vertical_1fw7g {
99
97
  min-width: 0;
100
98
  min-width: initial;
101
99
  min-height: 8px;
@@ -104,24 +102,23 @@
104
102
  border-left: 2px solid var(--color-light-neutral-translucent-300);
105
103
  border-top: none;
106
104
  }
107
- .steps__dash_1cth5.steps__completed_1cth5.steps__vertical_1cth5 {
105
+ .steps__dash_1fw7g.steps__completed_1fw7g.steps__vertical_1fw7g {
108
106
  border-left: var(--steps-dash-border);
109
107
  }
110
- .steps__textWrapper_1cth5.steps__vertical_1cth5 {
108
+ .steps__textWrapper_1fw7g.steps__vertical_1fw7g {
111
109
  min-height: 48px;
112
110
  }
113
- .steps__textWrapper_1cth5.steps__vertical_1cth5.steps__gap-24_1cth5 {
111
+ .steps__textWrapper_1fw7g.steps__vertical_1fw7g.steps__gap-24_1fw7g {
114
112
  margin-bottom: var(--gap-8);
115
113
  }
116
- .steps__textWrapper_1cth5.steps__vertical_1cth5.steps__gap-32_1cth5 {
114
+ .steps__textWrapper_1fw7g.steps__vertical_1fw7g.steps__gap-32_1fw7g {
117
115
  margin-bottom: var(--gap-16);
118
116
  }
119
- .steps__text_1cth5 {
117
+ .steps__text_1fw7g {
120
118
  font-size: 16px;
121
119
  line-height: 24px;
122
120
  font-weight: 400;
123
- letter-spacing: -0.24px;
124
- font-family: var(--font-family-alfasans);
121
+ font-family: var(--font-family-system);
125
122
 
126
123
  transition: background 0.2s;
127
124
  padding: var(--gap-8);
@@ -130,24 +127,24 @@
130
127
  height: -moz-min-content;
131
128
  height: min-content;
132
129
  }
133
- .steps__text_1cth5.steps__interactive_1cth5:not(.steps__disabled_1cth5):hover {
130
+ .steps__text_1fw7g.steps__interactive_1fw7g:not(.steps__disabled_1fw7g):hover {
134
131
  background: var(--color-light-transparent-default-hover);
135
132
  }
136
- .steps__text_1cth5.steps__interactive_1cth5:not(.steps__disabled_1cth5):active {
133
+ .steps__text_1fw7g.steps__interactive_1fw7g:not(.steps__disabled_1fw7g):active {
137
134
  background: var(--color-light-transparent-default-press);
138
135
  }
139
- .steps__focused_1cth5 {
136
+ .steps__focused_1fw7g {
140
137
  outline: var(--gap-2) solid var(--focus-color);
141
138
  outline-offset: var(--gap-2);
142
139
  }
143
- .steps__selected_1cth5 .steps__text_1cth5 {
140
+ .steps__selected_1fw7g .steps__text_1fw7g {
144
141
  color: var(--color-light-text-primary);
145
142
  }
146
- .steps__selected_1cth5 .steps__option_1cth5 {
143
+ .steps__selected_1fw7g .steps__option_1fw7g {
147
144
  color: var(--color-light-text-primary-inverted);
148
145
  background: var(--color-light-neutral-translucent-1300);
149
146
  }
150
- .steps__checkbox_1cth5 {
147
+ .steps__checkbox_1fw7g {
151
148
  display: flex;
152
149
  justify-content: center;
153
150
  align-items: center;
@@ -156,26 +153,25 @@
156
153
  height: 20px;
157
154
  border: 2px solid var(--color-light-neutral-translucent-300);
158
155
  }
159
- .steps__dot_1cth5 {
156
+ .steps__dot_1fw7g {
160
157
  width: 10px;
161
158
  height: 10px;
162
159
  border-radius: var(--border-radius-circle);
163
160
  background: var(--color-light-neutral-translucent-300);
164
161
  }
165
- .steps__selected_1cth5 .steps__checkbox_1cth5 {
162
+ .steps__selected_1fw7g .steps__checkbox_1fw7g {
166
163
  border: 2px solid var(--color-light-neutral-translucent-1300);
167
164
  }
168
- .steps__selected_1cth5 .steps__checkbox_1cth5 .steps__dot_1cth5 {
165
+ .steps__selected_1fw7g .steps__checkbox_1fw7g .steps__dot_1fw7g {
169
166
  background: var(--color-light-neutral-translucent-1300);
170
167
  }
171
- .steps__option_1cth5:not(.steps__error_1cth5).steps__unordered_1cth5 {
168
+ .steps__option_1fw7g:not(.steps__error_1fw7g).steps__unordered_1fw7g {
172
169
  background: transparent none repeat 0 0 / auto auto padding-box border-box scroll;
173
170
  background: initial;
174
171
  }
175
- .steps__completedIndicator_1cth5 > [class*='positive'] {
176
- color: var(--steps-option-svg-color);
172
+ .steps__completedIndicator_1fw7g[class*='positive-checkmark'] {
177
173
  background-color: var(--steps-option-svg-color);
178
174
  }
179
- .steps__fullWidth_1cth5 {
175
+ .steps__fullWidth_1fw7g {
180
176
  width: 100%;
181
177
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"step":"steps__step_1cth5","horizontal":"steps__horizontal_1cth5","vertical":"steps__vertical_1cth5","textWrapper":"steps__textWrapper_1cth5","interactive":"steps__interactive_1cth5","disabled":"steps__disabled_1cth5","text":"steps__text_1cth5","indicator":"steps__indicator_1cth5","option":"steps__option_1cth5","dash":"steps__dash_1cth5","completed":"steps__completed_1cth5","gap-24":"steps__gap-24_1cth5","gap-32":"steps__gap-32_1cth5","focused":"steps__focused_1cth5","selected":"steps__selected_1cth5","checkbox":"steps__checkbox_1cth5","dot":"steps__dot_1cth5","error":"steps__error_1cth5","unordered":"steps__unordered_1cth5","completedIndicator":"steps__completedIndicator_1cth5","fullWidth":"steps__fullWidth_1cth5"};
3
+ const styles = {"step":"steps__step_1fw7g","horizontal":"steps__horizontal_1fw7g","vertical":"steps__vertical_1fw7g","textWrapper":"steps__textWrapper_1fw7g","interactive":"steps__interactive_1fw7g","disabled":"steps__disabled_1fw7g","text":"steps__text_1fw7g","indicator":"steps__indicator_1fw7g","option":"steps__option_1fw7g","dash":"steps__dash_1fw7g","completed":"steps__completed_1fw7g","gap-24":"steps__gap-24_1fw7g","gap-32":"steps__gap-32_1fw7g","focused":"steps__focused_1fw7g","selected":"steps__selected_1fw7g","checkbox":"steps__checkbox_1fw7g","dot":"steps__dot_1fw7g","error":"steps__error_1fw7g","unordered":"steps__unordered_1fw7g","completedIndicator":"steps__completedIndicator_1fw7g","fullWidth":"steps__fullWidth_1fw7g"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/step/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n --steps-option-svg-color: var(--color-light-status-positive);\n --steps-dash-border: 2px solid var(--color-light-status-positive);\n}\n\n.step {\n display: flex;\n outline: none;\n\n &.horizontal {\n flex-grow: 1;\n }\n\n &:not(.vertical) {\n align-items: center;\n }\n\n &:last-of-type .textWrapper.vertical {\n margin-bottom: var(--gap-0);\n }\n}\n\n.step.interactive:not(.disabled):hover {\n cursor: pointer;\n}\n\n.step.disabled:hover {\n & .text {\n background: unset;\n }\n}\n\n.step.disabled {\n & .indicator {\n cursor: unset;\n }\n}\n\n.indicator {\n cursor: pointer;\n display: flex;\n align-items: center;\n margin-right: var(--gap-4);\n\n &.vertical {\n flex-direction: column;\n margin-right: var(--gap-8);\n }\n}\n\n.option {\n @mixin accent_primary_small;\n\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--color-light-text-primary);\n background: var(--color-light-neutral-translucent-300);\n min-width: 24px;\n height: 24px;\n border-radius: var(--border-radius-circle);\n\n &.vertical {\n margin-top: var(--gap-8);\n }\n}\n\n.dash {\n flex: 1 1 auto;\n min-width: 24px;\n border-top: 2px solid var(--color-light-neutral-translucent-300);\n margin-right: var(--gap-8);\n\n &.completed {\n border-top: var(--steps-dash-border);\n }\n\n &.vertical {\n min-width: unset;\n min-height: 8px;\n margin-right: var(--gap-0);\n margin-top: var(--gap-8);\n border-left: 2px solid var(--color-light-neutral-translucent-300);\n border-top: none;\n }\n\n &.completed.vertical {\n border-left: var(--steps-dash-border);\n }\n}\n\n.textWrapper {\n &.vertical {\n min-height: 48px;\n\n &.gap-24 {\n margin-bottom: var(--gap-8);\n }\n\n &.gap-32 {\n margin-bottom: var(--gap-16);\n }\n }\n}\n\n.text {\n @mixin paragraph_primary_medium;\n\n transition: background 0.2s;\n padding: var(--gap-8);\n color: var(--color-light-text-primary);\n border-radius: var(--gap-8);\n height: min-content;\n\n &.interactive:not(.disabled) {\n &:hover {\n background: var(--color-light-transparent-default-hover);\n }\n\n &:active {\n background: var(--color-light-transparent-default-press);\n }\n }\n}\n\n.focused {\n outline: var(--gap-2) solid var(--focus-color);\n outline-offset: var(--gap-2);\n}\n\n.selected {\n & .text {\n color: var(--color-light-text-primary);\n }\n\n & .option {\n color: var(--color-light-text-primary-inverted);\n background: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.checkbox {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-circle);\n width: 20px;\n height: 20px;\n border: 2px solid var(--color-light-neutral-translucent-300);\n}\n\n.dot {\n width: 10px;\n height: 10px;\n border-radius: var(--border-radius-circle);\n background: var(--color-light-neutral-translucent-300);\n}\n\n.selected .checkbox {\n border: 2px solid var(--color-light-neutral-translucent-1300);\n\n & .dot {\n background: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.option:not(.error).unordered {\n background: unset;\n}\n\n.completedIndicator > [class*='positive'] {\n color: var(--steps-option-svg-color);\n background-color: var(--steps-option-svg-color);\n}\n\n.fullWidth {\n width: 100%;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,MAAM,CAAC,mBAAmB,CAAC,YAAY,CAAC,yBAAyB,CAAC,UAAU,CAAC,uBAAuB,CAAC,aAAa,CAAC,0BAA0B,CAAC,aAAa,CAAC,0BAA0B,CAAC,UAAU,CAAC,uBAAuB,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,SAAS,CAAC,sBAAsB,CAAC,UAAU,CAAC,uBAAuB,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,oBAAoB,CAAC,WAAW,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,iCAAiC,CAAC,WAAW,CAAC,wBAAwB,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/step/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n --steps-option-svg-color: var(--color-light-status-positive);\n --steps-dash-border: 2px solid var(--color-light-status-positive);\n}\n\n.step {\n display: flex;\n outline: none;\n\n &.horizontal {\n flex-grow: 1;\n }\n\n &:not(.vertical) {\n align-items: center;\n }\n\n &:last-of-type .textWrapper.vertical {\n margin-bottom: var(--gap-0);\n }\n}\n\n.step.interactive:not(.disabled):hover {\n cursor: pointer;\n}\n\n.step.disabled:hover {\n & .text {\n background: unset;\n }\n}\n\n.step.disabled {\n & .indicator {\n cursor: unset;\n }\n}\n\n.indicator {\n cursor: pointer;\n display: flex;\n align-items: center;\n margin-right: var(--gap-4);\n\n &.vertical {\n flex-direction: column;\n margin-right: var(--gap-8);\n }\n}\n\n.option {\n @mixin accent_primary_small;\n\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--color-light-text-primary);\n background: var(--color-light-neutral-translucent-300);\n min-width: 24px;\n height: 24px;\n border-radius: var(--border-radius-circle);\n\n &.vertical {\n margin-top: var(--gap-8);\n }\n}\n\n.dash {\n flex: 1 1 auto;\n min-width: 24px;\n border-top: 2px solid var(--color-light-neutral-translucent-300);\n margin-right: var(--gap-8);\n\n &.completed {\n border-top: var(--steps-dash-border);\n }\n\n &.vertical {\n min-width: unset;\n min-height: 8px;\n margin-right: var(--gap-0);\n margin-top: var(--gap-8);\n border-left: 2px solid var(--color-light-neutral-translucent-300);\n border-top: none;\n }\n\n &.completed.vertical {\n border-left: var(--steps-dash-border);\n }\n}\n\n.textWrapper {\n &.vertical {\n min-height: 48px;\n\n &.gap-24 {\n margin-bottom: var(--gap-8);\n }\n\n &.gap-32 {\n margin-bottom: var(--gap-16);\n }\n }\n}\n\n.text {\n @mixin paragraph_primary_medium;\n\n transition: background 0.2s;\n padding: var(--gap-8);\n color: var(--color-light-text-primary);\n border-radius: var(--gap-8);\n height: min-content;\n\n &.interactive:not(.disabled) {\n &:hover {\n background: var(--color-light-transparent-default-hover);\n }\n\n &:active {\n background: var(--color-light-transparent-default-press);\n }\n }\n}\n\n.focused {\n outline: var(--gap-2) solid var(--focus-color);\n outline-offset: var(--gap-2);\n}\n\n.selected {\n & .text {\n color: var(--color-light-text-primary);\n }\n\n & .option {\n color: var(--color-light-text-primary-inverted);\n background: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.checkbox {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-circle);\n width: 20px;\n height: 20px;\n border: 2px solid var(--color-light-neutral-translucent-300);\n}\n\n.dot {\n width: 10px;\n height: 10px;\n border-radius: var(--border-radius-circle);\n background: var(--color-light-neutral-translucent-300);\n}\n\n.selected .checkbox {\n border: 2px solid var(--color-light-neutral-translucent-1300);\n\n & .dot {\n background: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.option:not(.error).unordered {\n background: unset;\n}\n\n.completedIndicator[class*='positive-checkmark'] {\n background-color: var(--steps-option-svg-color);\n}\n\n.fullWidth {\n width: 100%;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,MAAM,CAAC,mBAAmB,CAAC,YAAY,CAAC,yBAAyB,CAAC,UAAU,CAAC,uBAAuB,CAAC,aAAa,CAAC,0BAA0B,CAAC,aAAa,CAAC,0BAA0B,CAAC,UAAU,CAAC,uBAAuB,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,SAAS,CAAC,sBAAsB,CAAC,UAAU,CAAC,uBAAuB,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,oBAAoB,CAAC,WAAW,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,iCAAiC,CAAC,WAAW,CAAC,wBAAwB,CAAC;;;;"}
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type BadgeProps } from '@alfalab/core-components-badge/modern';
3
+ import { type StatusBadgeProps } from '@alfalab/core-components-status-badge/modern';
4
+ /** @description В `@alfalab/core-components@51.0.0` тип будет изменен на Pick<StatusBadgeProps, 'view' | 'className' | 'colors'> */
3
5
  export type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;
4
- export declare const StepIndicator: React.FC<StepIndicatorProps>;
6
+ type StatusBadgeIndicatorProps = Pick<StatusBadgeProps, 'view' | 'className' | 'colors'>;
7
+ export declare const StepIndicator: React.FC<StatusBadgeIndicatorProps>;
8
+ export {};
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { Badge } from '@alfalab/core-components-badge/modern';
3
+ import { StatusBadge } from '@alfalab/core-components-status-badge/modern';
4
4
  import styles from './index.module.css.js';
5
5
 
6
- const StepIndicator = ({ content, iconColor, className }) => (React.createElement(Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn(styles.component, className), content: content }));
6
+ const StepIndicator = ({ view, className, colors }) => (React.createElement(StatusBadge, { size: 24, view: view, colors: colors, className: cn(styles.component, className) }));
7
7
 
8
8
  export { StepIndicator };
9
9
  //# sourceMappingURL=Component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/step-indicator/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Badge, type BadgeProps } from '@alfalab/core-components-badge';\n\nimport styles from './index.module.css';\n\nexport type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;\n\nexport const StepIndicator: React.FC<StepIndicatorProps> = ({ content, iconColor, className }) => (\n <Badge\n size='l'\n view='icon'\n iconColor={iconColor}\n className={cn(styles.component, className)}\n content={content}\n />\n);\n"],"names":[],"mappings":";;;;;MASa,aAAa,GAAiC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MACzF,oBAAC,KAAK,EAAA,EACF,IAAI,EAAC,GAAG,EACR,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1C,OAAO,EAAE,OAAO,EAClB,CAAA;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/step-indicator/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { type BadgeProps } from '@alfalab/core-components-badge';\nimport { StatusBadge, type StatusBadgeProps } from '@alfalab/core-components-status-badge';\n\nimport styles from './index.module.css';\n\n/** @description В `@alfalab/core-components@51.0.0` тип будет изменен на Pick<StatusBadgeProps, 'view' | 'className' | 'colors'> */\nexport type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;\n\ntype StatusBadgeIndicatorProps = Pick<StatusBadgeProps, 'view' | 'className' | 'colors'>;\n\nexport const StepIndicator: React.FC<StatusBadgeIndicatorProps> = ({ view, className, colors }) => (\n <StatusBadge\n size={24}\n view={view}\n colors={colors}\n className={cn(styles.component, className)}\n />\n);\n"],"names":[],"mappings":";;;;;AAaa,MAAA,aAAa,GAAwC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAC1F,KAAC,CAAA,aAAA,CAAA,WAAW,IACR,IAAI,EAAE,EAAE,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAA,CAC5C;;;;"}
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  --gap-0: 0px;
3
3
  }
4
- .steps__component_of9bi.steps__component_of9bi {
4
+ .steps__component_1s7m6.steps__component_1s7m6 {
5
5
  padding: var(--gap-0);
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"steps__component_of9bi"};
3
+ const styles = {"component":"steps__component_1s7m6"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
package/modern/index.css CHANGED
@@ -1,9 +1,9 @@
1
- .steps__component_jczr4 {
1
+ .steps__component_671rj {
2
2
  display: flex;
3
3
  align-items: center;
4
4
  flex-direction: row;
5
5
  }
6
- .steps__component_jczr4.steps__vertical_jczr4 {
6
+ .steps__component_671rj.steps__vertical_671rj {
7
7
  flex-direction: column;
8
8
  align-items: flex-start;
9
9
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"steps__component_jczr4","vertical":"steps__vertical_jczr4"};
3
+ const styles = {"component":"steps__component_671rj","vertical":"steps__vertical_671rj"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,7 +1,7 @@
1
1
  import { type FC } from 'react';
2
2
  import { type CommonProps } from '../../types/common-props';
3
3
  import { type StepIndicatorProps } from '../step-indicator';
4
- type StepProps = {
4
+ interface StepProps extends CommonProps {
5
5
  /**
6
6
  * Номер шага
7
7
  */
@@ -51,6 +51,6 @@ type StepProps = {
51
51
  * @param stepNumber - номер шага
52
52
  */
53
53
  onClick: (stepNumber: number) => void;
54
- } & CommonProps;
54
+ }
55
55
  export declare const Step: FC<StepProps>;
56
56
  export {};
@@ -1,11 +1,8 @@
1
1
  import React, { useRef } from 'react';
2
2
  import cn from 'classnames';
3
+ import { Badge } from '@alfalab/core-components-badge/moderncssm';
3
4
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
4
5
  import { useFocus } from '@alfalab/hooks';
5
- import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
6
- import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
7
- import { CrossCompactMIcon } from '@alfalab/icons-glyph/CrossCompactMIcon';
8
- import { ExclamationCircleMIcon } from '@alfalab/icons-glyph/ExclamationCircleMIcon';
9
6
  import { StepIndicator } from '../step-indicator/Component.js';
10
7
  import styles from './index.module.css';
11
8
 
@@ -29,25 +26,25 @@ const Step = ({ children, stepNumber, isSelected, disabled, ordered, isPositive,
29
26
  };
30
27
  const getStepIndicator = () => {
31
28
  if (customStepIndicator) {
32
- return React.createElement(StepIndicator, { ...customStepIndicator });
29
+ return React.createElement(Badge, { view: 'icon', size: 'l', ...customStepIndicator });
33
30
  }
34
31
  if (isCriticalError) {
35
- return React.createElement(StepIndicator, { iconColor: 'negative', content: React.createElement(CrossCompactMIcon, null) });
32
+ return React.createElement(StepIndicator, { view: 'negative-cross' });
36
33
  }
37
34
  if (isError) {
38
- return React.createElement(StepIndicator, { iconColor: 'negative', content: React.createElement(ExclamationCircleMIcon, null) });
35
+ return React.createElement(StepIndicator, { view: 'negative-alert' });
39
36
  }
40
37
  if (isWarning) {
41
- return React.createElement(StepIndicator, { iconColor: 'attention', content: React.createElement(ExclamationCircleMIcon, null) });
38
+ return React.createElement(StepIndicator, { view: 'attention-alert' });
42
39
  }
43
40
  if (isWaiting) {
44
- return React.createElement(StepIndicator, { iconColor: 'secondary', content: React.createElement(ClockMIcon, null) });
41
+ return React.createElement(StepIndicator, { view: 'neutral-operation' });
45
42
  }
46
43
  if (isPositive) {
47
- return React.createElement(StepIndicator, { iconColor: 'positive', content: React.createElement(CheckmarkCircleMIcon, null) });
44
+ return React.createElement(StepIndicator, { view: 'positive-checkmark' });
48
45
  }
49
46
  if (isStepCompleted) {
50
- return (React.createElement(StepIndicator, { iconColor: 'positive', content: React.createElement(CheckmarkCircleMIcon, null), className: styles.completedIndicator }));
47
+ return (React.createElement(StepIndicator, { view: 'positive-checkmark', className: styles.completedIndicator }));
51
48
  }
52
49
  if (!ordered) {
53
50
  return (React.createElement("div", { className: styles.checkbox },
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/step/Component.tsx"],"sourcesContent":["import React, { type FC, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { useFocus } from '@alfalab/hooks';\nimport { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';\nimport { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';\nimport { CrossCompactMIcon } from '@alfalab/icons-glyph/CrossCompactMIcon';\nimport { ExclamationCircleMIcon } from '@alfalab/icons-glyph/ExclamationCircleMIcon';\n\nimport { type CommonProps } from '../../types/common-props';\nimport { StepIndicator, type StepIndicatorProps } from '../step-indicator';\n\nimport styles from './index.module.css';\n\ntype StepProps = {\n /**\n * Номер шага\n */\n stepNumber: number;\n\n /**\n * Маркер того, что текущий шаг выбран\n */\n isSelected: boolean;\n\n /**\n * Маркер того, что текущий шаг доступен для клика\n */\n disabled: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Positive\"\n */\n isPositive: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Error\"\n */\n isError: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"isCriticalError\"\n */\n isCriticalError: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Warning\"\n */\n isWarning: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Waiting\"\n */\n isWaiting: boolean;\n\n /**\n * Маркер того, что текущий шаг нужно пометить как завершенный\n */\n isStepCompleted: boolean;\n\n /**\n * Свойства кастомного индикатора текущего шага\n */\n customStepIndicator?: StepIndicatorProps | null;\n\n /**\n * Указывает, является ли текущий шаг последним в списке\n */\n isNotLastStep?: boolean;\n\n /**\n * Обработчик нажатия на текущей шаг\n * @param stepNumber - номер шага\n */\n onClick: (stepNumber: number) => void;\n} & CommonProps;\n\nexport const Step: FC<StepProps> = ({\n children,\n stepNumber,\n isSelected,\n disabled,\n ordered,\n isPositive,\n isError,\n isCriticalError,\n isWarning,\n isWaiting,\n customStepIndicator,\n isStepCompleted,\n onClick,\n interactive,\n isVerticalAlign,\n isNotLastStep,\n fullWidth,\n minSpaceBetweenSteps = 24,\n completedDashColor,\n dataTestId,\n}) => {\n const stepRef = useRef<HTMLDivElement>(null);\n\n const [focused] = useFocus(stepRef, 'keyboard');\n\n const handleButtonClick = () => {\n if (!disabled && interactive && onClick) {\n onClick(stepNumber);\n }\n };\n\n const handleTextClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!interactive) {\n e.stopPropagation();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter') {\n handleButtonClick();\n }\n };\n\n const getStepIndicator = () => {\n if (customStepIndicator) {\n return <StepIndicator {...customStepIndicator} />;\n }\n if (isCriticalError) {\n return <StepIndicator iconColor='negative' content={<CrossCompactMIcon />} />;\n }\n if (isError) {\n return <StepIndicator iconColor='negative' content={<ExclamationCircleMIcon />} />;\n }\n if (isWarning) {\n return <StepIndicator iconColor='attention' content={<ExclamationCircleMIcon />} />;\n }\n if (isWaiting) {\n return <StepIndicator iconColor='secondary' content={<ClockMIcon />} />;\n }\n if (isPositive) {\n return <StepIndicator iconColor='positive' content={<CheckmarkCircleMIcon />} />;\n }\n if (isStepCompleted) {\n return (\n <StepIndicator\n iconColor='positive'\n content={<CheckmarkCircleMIcon />}\n className={styles.completedIndicator}\n />\n );\n }\n if (!ordered) {\n return (\n <div className={styles.checkbox}>\n <span className={styles.dot} />\n </div>\n );\n }\n\n return stepNumber;\n };\n\n const getCustomDashColor = () => {\n if (isStepCompleted && completedDashColor) {\n return {\n borderColor: completedDashColor,\n };\n }\n\n return {};\n };\n\n const renderDash = () => (\n <div\n className={cn(styles.dash, {\n [styles.vertical]: isVerticalAlign,\n [styles.completed]: isStepCompleted,\n })}\n style={{\n ...getCustomDashColor(),\n }}\n />\n );\n\n return (\n <div\n data-test-id={getDataTestId(dataTestId, 'step')}\n role='button'\n tabIndex={0}\n ref={stepRef}\n className={cn(styles.step, {\n [styles.completed]: isStepCompleted,\n [styles.error]: isError,\n [styles.selected]: isSelected,\n [styles.disabled]: disabled,\n [styles.focused]: focused,\n [styles.vertical]: isVerticalAlign,\n [styles.interactive]: interactive,\n [styles.fullWidth]: fullWidth && isVerticalAlign,\n [styles.horizontal]: !isVerticalAlign,\n })}\n onClick={handleButtonClick}\n onKeyDown={handleKeyDown}\n >\n <div\n className={cn(styles.indicator, {\n [styles.vertical]: isVerticalAlign,\n [styles.interactive]: interactive,\n })}\n >\n <div\n className={cn(styles.option, {\n [styles.unordered]: !ordered,\n [styles.vertical]: isVerticalAlign,\n [styles.error]: isError,\n })}\n >\n {getStepIndicator()}\n </div>\n {isNotLastStep && isVerticalAlign && renderDash()}\n </div>\n <div\n className={cn(styles.textWrapper, styles[`gap-${minSpaceBetweenSteps}`], {\n [styles.vertical]: isVerticalAlign,\n })}\n >\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n <div\n className={cn(styles.text, {\n [styles.interactive]: interactive,\n [styles.fullWidth]: fullWidth && isVerticalAlign,\n })}\n onClick={handleTextClick}\n >\n {children}\n </div>\n </div>\n {isNotLastStep && !isVerticalAlign && renderDash()}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;MA8Ea,IAAI,GAAkB,CAAC,EAChC,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,UAAU,EACV,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,WAAW,EACX,eAAe,EACf,aAAa,EACb,SAAS,EACT,oBAAoB,GAAG,EAAE,EACzB,kBAAkB,EAClB,UAAU,GACb,KAAI;AACD,IAAA,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC;IAE5C,MAA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E,CACjB;AACL,YAAA,aAAa,IAAI,eAAe,IAAI,UAAU,EAAE,CAC/C;AACN,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA,IAAA,EAAO,oBAAoB,CAAA,CAAE,CAAC,EAAE;AACrE,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe;aACrC,CAAC,EAAA;AAGF,YAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE;AACvB,oBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,WAAW;AACjC,oBAAA,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,IAAI,eAAe;AACnD,iBAAA,CAAC,EACF,OAAO,EAAE,eAAe,EAEvB,EAAA,QAAQ,CACP,CACJ;QACL,aAAa,IAAI,CAAC,eAAe,IAAI,UAAU,EAAE,CAChD;AAEd;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/step/Component.tsx"],"sourcesContent":["import React, { type FC, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { Badge } from '@alfalab/core-components-badge';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { useFocus } from '@alfalab/hooks';\n\nimport { type CommonProps } from '../../types/common-props';\nimport { StepIndicator, type StepIndicatorProps } from '../step-indicator';\n\nimport styles from './index.module.css';\n\ninterface StepProps extends CommonProps {\n /**\n * Номер шага\n */\n stepNumber: number;\n\n /**\n * Маркер того, что текущий шаг выбран\n */\n isSelected: boolean;\n\n /**\n * Маркер того, что текущий шаг доступен для клика\n */\n disabled: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Positive\"\n */\n isPositive: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Error\"\n */\n isError: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"isCriticalError\"\n */\n isCriticalError: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Warning\"\n */\n isWarning: boolean;\n\n /**\n * Маркер того, что текущий шаг находится в состоянии \"Waiting\"\n */\n isWaiting: boolean;\n\n /**\n * Маркер того, что текущий шаг нужно пометить как завершенный\n */\n isStepCompleted: boolean;\n\n /**\n * Свойства кастомного индикатора текущего шага\n */\n customStepIndicator?: StepIndicatorProps | null;\n\n /**\n * Указывает, является ли текущий шаг последним в списке\n */\n isNotLastStep?: boolean;\n\n /**\n * Обработчик нажатия на текущей шаг\n * @param stepNumber - номер шага\n */\n onClick: (stepNumber: number) => void;\n}\n\nexport const Step: FC<StepProps> = ({\n children,\n stepNumber,\n isSelected,\n disabled,\n ordered,\n isPositive,\n isError,\n isCriticalError,\n isWarning,\n isWaiting,\n customStepIndicator,\n isStepCompleted,\n onClick,\n interactive,\n isVerticalAlign,\n isNotLastStep,\n fullWidth,\n minSpaceBetweenSteps = 24,\n completedDashColor,\n dataTestId,\n}) => {\n const stepRef = useRef<HTMLDivElement>(null);\n\n const [focused] = useFocus(stepRef, 'keyboard');\n\n const handleButtonClick = () => {\n if (!disabled && interactive && onClick) {\n onClick(stepNumber);\n }\n };\n\n const handleTextClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!interactive) {\n e.stopPropagation();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter') {\n handleButtonClick();\n }\n };\n\n const getStepIndicator = () => {\n if (customStepIndicator) {\n return <Badge view='icon' size='l' {...customStepIndicator} />;\n }\n if (isCriticalError) {\n return <StepIndicator view='negative-cross' />;\n }\n if (isError) {\n return <StepIndicator view='negative-alert' />;\n }\n if (isWarning) {\n return <StepIndicator view='attention-alert' />;\n }\n if (isWaiting) {\n return <StepIndicator view='neutral-operation' />;\n }\n if (isPositive) {\n return <StepIndicator view='positive-checkmark' />;\n }\n if (isStepCompleted) {\n return (\n <StepIndicator view='positive-checkmark' className={styles.completedIndicator} />\n );\n }\n if (!ordered) {\n return (\n <div className={styles.checkbox}>\n <span className={styles.dot} />\n </div>\n );\n }\n\n return stepNumber;\n };\n\n const getCustomDashColor = () => {\n if (isStepCompleted && completedDashColor) {\n return {\n borderColor: completedDashColor,\n };\n }\n\n return {};\n };\n\n const renderDash = () => (\n <div\n className={cn(styles.dash, {\n [styles.vertical]: isVerticalAlign,\n [styles.completed]: isStepCompleted,\n })}\n style={{\n ...getCustomDashColor(),\n }}\n />\n );\n\n return (\n <div\n data-test-id={getDataTestId(dataTestId, 'step')}\n role='button'\n tabIndex={0}\n ref={stepRef}\n className={cn(styles.step, {\n [styles.completed]: isStepCompleted,\n [styles.error]: isError,\n [styles.selected]: isSelected,\n [styles.disabled]: disabled,\n [styles.focused]: focused,\n [styles.vertical]: isVerticalAlign,\n [styles.interactive]: interactive,\n [styles.fullWidth]: fullWidth && isVerticalAlign,\n [styles.horizontal]: !isVerticalAlign,\n })}\n onClick={handleButtonClick}\n onKeyDown={handleKeyDown}\n >\n <div\n className={cn(styles.indicator, {\n [styles.vertical]: isVerticalAlign,\n [styles.interactive]: interactive,\n })}\n >\n <div\n className={cn(styles.option, {\n [styles.unordered]: !ordered,\n [styles.vertical]: isVerticalAlign,\n [styles.error]: isError,\n })}\n >\n {getStepIndicator()}\n </div>\n {isNotLastStep && isVerticalAlign && renderDash()}\n </div>\n <div\n className={cn(styles.textWrapper, styles[`gap-${minSpaceBetweenSteps}`], {\n [styles.vertical]: isVerticalAlign,\n })}\n >\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}\n <div\n className={cn(styles.text, {\n [styles.interactive]: interactive,\n [styles.fullWidth]: fullWidth && isVerticalAlign,\n })}\n onClick={handleTextClick}\n >\n {children}\n </div>\n </div>\n {isNotLastStep && !isVerticalAlign && renderDash()}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;MA2Ea,IAAI,GAAkB,CAAC,EAChC,QAAQ,EACR,UAAU,EACV,UAAU,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,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA,IAAA,EAAO,oBAAoB,CAAA,CAAE,CAAC,EAAE;AACrE,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe;aACrC,CAAC,EAAA;AAGF,YAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE;AACvB,oBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,WAAW;AACjC,oBAAA,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,IAAI,eAAe;AACnD,iBAAA,CAAC,EACF,OAAO,EAAE,eAAe,EAEvB,EAAA,QAAQ,CACP,CACJ;QACL,aAAa,IAAI,CAAC,eAAe,IAAI,UAAU,EAAE,CAChD;AAEd;;;;"}
@@ -51,8 +51,7 @@
51
51
  font-size: 14px;
52
52
  line-height: 20px;
53
53
  font-weight: 700;
54
- letter-spacing: 0.47px;
55
- font-family: var(--font-family-alfasans);
54
+ font-family: var(--font-family-system);
56
55
 
57
56
  display: flex;
58
57
  align-items: center;
@@ -109,8 +108,7 @@
109
108
  font-size: 16px;
110
109
  line-height: 24px;
111
110
  font-weight: 400;
112
- letter-spacing: -0.24px;
113
- font-family: var(--font-family-alfasans);
111
+ font-family: var(--font-family-system);
114
112
 
115
113
  transition: background 0.2s;
116
114
  padding: var(--gap-8);
@@ -172,8 +170,7 @@
172
170
  background: initial;
173
171
  }
174
172
 
175
- .completedIndicator > [class*='positive'] {
176
- color: var(--steps-option-svg-color);
173
+ .completedIndicator[class*='positive-checkmark'] {
177
174
  background-color: var(--steps-option-svg-color);
178
175
  }
179
176
 
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type BadgeProps } from '@alfalab/core-components-badge/moderncssm';
3
+ import { type StatusBadgeProps } from '@alfalab/core-components-status-badge/moderncssm';
4
+ /** @description В `@alfalab/core-components@51.0.0` тип будет изменен на Pick<StatusBadgeProps, 'view' | 'className' | 'colors'> */
3
5
  export type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;
4
- export declare const StepIndicator: React.FC<StepIndicatorProps>;
6
+ type StatusBadgeIndicatorProps = Pick<StatusBadgeProps, 'view' | 'className' | 'colors'>;
7
+ export declare const StepIndicator: React.FC<StatusBadgeIndicatorProps>;
8
+ export {};
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { Badge } from '@alfalab/core-components-badge/moderncssm';
3
+ import { StatusBadge } from '@alfalab/core-components-status-badge/moderncssm';
4
4
  import styles from './index.module.css';
5
5
 
6
- const StepIndicator = ({ content, iconColor, className }) => (React.createElement(Badge, { size: 'l', view: 'icon', iconColor: iconColor, className: cn(styles.component, className), content: content }));
6
+ const StepIndicator = ({ view, className, colors }) => (React.createElement(StatusBadge, { size: 24, view: view, colors: colors, className: cn(styles.component, className) }));
7
7
 
8
8
  export { StepIndicator };
9
9
  //# sourceMappingURL=Component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/step-indicator/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Badge, type BadgeProps } from '@alfalab/core-components-badge';\n\nimport styles from './index.module.css';\n\nexport type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;\n\nexport const StepIndicator: React.FC<StepIndicatorProps> = ({ content, iconColor, className }) => (\n <Badge\n size='l'\n view='icon'\n iconColor={iconColor}\n className={cn(styles.component, className)}\n content={content}\n />\n);\n"],"names":[],"mappings":";;;;;MASa,aAAa,GAAiC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MACzF,oBAAC,KAAK,EAAA,EACF,IAAI,EAAC,GAAG,EACR,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1C,OAAO,EAAE,OAAO,EAClB,CAAA;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/step-indicator/Component.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { type BadgeProps } from '@alfalab/core-components-badge';\nimport { StatusBadge, type StatusBadgeProps } from '@alfalab/core-components-status-badge';\n\nimport styles from './index.module.css';\n\n/** @description В `@alfalab/core-components@51.0.0` тип будет изменен на Pick<StatusBadgeProps, 'view' | 'className' | 'colors'> */\nexport type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;\n\ntype StatusBadgeIndicatorProps = Pick<StatusBadgeProps, 'view' | 'className' | 'colors'>;\n\nexport const StepIndicator: React.FC<StatusBadgeIndicatorProps> = ({ view, className, colors }) => (\n <StatusBadge\n size={24}\n view={view}\n colors={colors}\n className={cn(styles.component, className)}\n />\n);\n"],"names":[],"mappings":";;;;;AAaa,MAAA,aAAa,GAAwC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAC1F,KAAC,CAAA,aAAA,CAAA,WAAW,IACR,IAAI,EAAE,EAAE,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAA,CAC5C;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-steps",
3
- "version": "3.0.3-alfasans",
3
+ "version": "3.0.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,10 +10,10 @@
10
10
  "main": "index.js",
11
11
  "module": "./esm/index.js",
12
12
  "dependencies": {
13
- "@alfalab/core-components-badge": "7.0.2-alfasans",
14
- "@alfalab/core-components-shared": "2.1.1-alfasans",
13
+ "@alfalab/core-components-badge": "^7.0.2",
14
+ "@alfalab/core-components-shared": "^2.1.1",
15
+ "@alfalab/core-components-status-badge": "^3.0.2",
15
16
  "@alfalab/hooks": "^1.13.1",
16
- "@alfalab/icons-glyph": "^2.260.0",
17
17
  "classnames": "^2.5.1",
18
18
  "tslib": "^2.4.0"
19
19
  },
@@ -25,6 +25,6 @@
25
25
  "access": "public",
26
26
  "directory": "dist"
27
27
  },
28
- "themesVersion": "15.0.2-alfasans",
29
- "varsVersion": "11.0.2-alfasans"
28
+ "themesVersion": "15.0.2",
29
+ "varsVersion": "11.0.2"
30
30
  }
@@ -1,19 +1,16 @@
1
1
  import React, { type FC, useRef } from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
+ import { Badge } from '@alfalab/core-components-badge';
4
5
  import { getDataTestId } from '@alfalab/core-components-shared';
5
6
  import { useFocus } from '@alfalab/hooks';
6
- import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
7
- import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
8
- import { CrossCompactMIcon } from '@alfalab/icons-glyph/CrossCompactMIcon';
9
- import { ExclamationCircleMIcon } from '@alfalab/icons-glyph/ExclamationCircleMIcon';
10
7
 
11
8
  import { type CommonProps } from '../../types/common-props';
12
9
  import { StepIndicator, type StepIndicatorProps } from '../step-indicator';
13
10
 
14
11
  import styles from './index.module.css';
15
12
 
16
- type StepProps = {
13
+ interface StepProps extends CommonProps {
17
14
  /**
18
15
  * Номер шага
19
16
  */
@@ -74,7 +71,7 @@ type StepProps = {
74
71
  * @param stepNumber - номер шага
75
72
  */
76
73
  onClick: (stepNumber: number) => void;
77
- } & CommonProps;
74
+ }
78
75
 
79
76
  export const Step: FC<StepProps> = ({
80
77
  children,
@@ -122,30 +119,26 @@ export const Step: FC<StepProps> = ({
122
119
 
123
120
  const getStepIndicator = () => {
124
121
  if (customStepIndicator) {
125
- return <StepIndicator {...customStepIndicator} />;
122
+ return <Badge view='icon' size='l' {...customStepIndicator} />;
126
123
  }
127
124
  if (isCriticalError) {
128
- return <StepIndicator iconColor='negative' content={<CrossCompactMIcon />} />;
125
+ return <StepIndicator view='negative-cross' />;
129
126
  }
130
127
  if (isError) {
131
- return <StepIndicator iconColor='negative' content={<ExclamationCircleMIcon />} />;
128
+ return <StepIndicator view='negative-alert' />;
132
129
  }
133
130
  if (isWarning) {
134
- return <StepIndicator iconColor='attention' content={<ExclamationCircleMIcon />} />;
131
+ return <StepIndicator view='attention-alert' />;
135
132
  }
136
133
  if (isWaiting) {
137
- return <StepIndicator iconColor='secondary' content={<ClockMIcon />} />;
134
+ return <StepIndicator view='neutral-operation' />;
138
135
  }
139
136
  if (isPositive) {
140
- return <StepIndicator iconColor='positive' content={<CheckmarkCircleMIcon />} />;
137
+ return <StepIndicator view='positive-checkmark' />;
141
138
  }
142
139
  if (isStepCompleted) {
143
140
  return (
144
- <StepIndicator
145
- iconColor='positive'
146
- content={<CheckmarkCircleMIcon />}
147
- className={styles.completedIndicator}
148
- />
141
+ <StepIndicator view='positive-checkmark' className={styles.completedIndicator} />
149
142
  );
150
143
  }
151
144
  if (!ordered) {
@@ -170,8 +170,7 @@
170
170
  background: unset;
171
171
  }
172
172
 
173
- .completedIndicator > [class*='positive'] {
174
- color: var(--steps-option-svg-color);
173
+ .completedIndicator[class*='positive-checkmark'] {
175
174
  background-color: var(--steps-option-svg-color);
176
175
  }
177
176
 
@@ -1,18 +1,21 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- import { Badge, type BadgeProps } from '@alfalab/core-components-badge';
4
+ import { type BadgeProps } from '@alfalab/core-components-badge';
5
+ import { StatusBadge, type StatusBadgeProps } from '@alfalab/core-components-status-badge';
5
6
 
6
7
  import styles from './index.module.css';
7
8
 
9
+ /** @description В `@alfalab/core-components@51.0.0` тип будет изменен на Pick<StatusBadgeProps, 'view' | 'className' | 'colors'> */
8
10
  export type StepIndicatorProps = Pick<BadgeProps, 'content' | 'iconColor' | 'className'>;
9
11
 
10
- export const StepIndicator: React.FC<StepIndicatorProps> = ({ content, iconColor, className }) => (
11
- <Badge
12
- size='l'
13
- view='icon'
14
- iconColor={iconColor}
12
+ type StatusBadgeIndicatorProps = Pick<StatusBadgeProps, 'view' | 'className' | 'colors'>;
13
+
14
+ export const StepIndicator: React.FC<StatusBadgeIndicatorProps> = ({ view, className, colors }) => (
15
+ <StatusBadge
16
+ size={24}
17
+ view={view}
18
+ colors={colors}
15
19
  className={cn(styles.component, className)}
16
- content={content}
17
20
  />
18
21
  );