Skip to content

Commit bc8daa2

Browse files
author
MPopov
committed
final touches to the layout.
1 parent 88875aa commit bc8daa2

File tree

9 files changed

+124
-66
lines changed

9 files changed

+124
-66
lines changed

Diff for: projects/igniteui-angular/src/lib/core/styles/components/stepper/_stepper-component.scss

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@
3131
@extend %igx-stepper__step-content !optional;
3232
}
3333

34-
@include e(step, $m: active) {
35-
@extend %igx-stepper__step--active !optional;
34+
@include e(step-content-wrapper) {
35+
@extend %igx-stepper__step-content-wrapper !optional;
36+
}
37+
38+
@include e(step, $m: current) {
39+
@extend %igx-stepper__step--current !optional;
3640
}
3741

3842
@include e(step, $m: skip) {

Diff for: projects/igniteui-angular/src/lib/core/styles/components/stepper/_stepper-theme.scss

+70-49
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
$title-color: null,
2424
$subtitle-color: null,
2525
$incomplete-color: null,
26-
//$complete-color: null,
27-
//$error-color: null,
28-
//$optional-color: null,
29-
//$current-color: null,
30-
//$disabled-color: null,
26+
$current-color: null,
27+
$step-line: null,
28+
$complete-step-line: null,
3129
) {
32-
$name: 'igx-switch';
30+
$name: 'igx-stepper';
3331
$switch-schema: ();
3432

3533
@if map-has-key($schema, $name) {
@@ -43,10 +41,14 @@
4341
@return extend($theme, (
4442
name: $name,
4543
palette: $palette,
44+
4645
step-hover-background: $step-hover-background,
4746
title-color: $title-color,
4847
subtitle-color: $subtitle-color,
4948
incomplete-color: $incomplete-color,
49+
current-color: $current-color,
50+
step-line: $step-line,
51+
complete-step-line: $complete-step-line,
5052
));
5153
}
5254

@@ -59,6 +61,9 @@
5961

6062
$variant: map-get($theme, variant);
6163

64+
$dashed-border: #fff;
65+
$dashed-border-size: rem(20px) rem(1px);
66+
6267
$left: if-ltr(left, right);
6368
$right: if-ltr(right, left);
6469

@@ -72,7 +77,6 @@
7277
%stepper-display {
7378
flex-direction: column;
7479
width: 100%;
75-
overflow: hidden;
7680
}
7781

7882
%igx-stepper__header {
@@ -81,37 +85,55 @@
8185
}
8286

8387
%igx-stepper__body {
84-
overflow: hidden;
8588
position: relative
8689
}
8790

91+
%stepper-display,
92+
%igx-stepper__body,
93+
%igx-stepper__step-header,
94+
%igx-stepper__title-wrapper {
95+
overflow: hidden;
96+
}
97+
8898
%igx-stepper__step {
8999
position: relative;
90100
flex-direction: column;
91101
align-content: center;
92102
justify-content: center;
103+
align-self: flex-start;
93104

94105
&:last-of-type {
95-
&::before {
96-
display: none;
106+
%igx-stepper__step-content-wrapper {
107+
&::before {
108+
display: none;
109+
}
97110
}
98111
}
99112
}
100113

101114
%igx-stepper__step-header {
102-
padding: rem(24px);
103115
display: flex;
104-
align-content: center;
116+
align-items: center;
117+
padding: rem(24px);
118+
position: relative;
119+
120+
igx-icon,
121+
igx-avatar,
122+
igx-badge,
123+
igx-circular-bar,
124+
[igxbutton] {
125+
max-height: rem(24px);
126+
max-width: rem(24px);
127+
}
105128

106129
&:hover {
107-
//background: --var($theme, 'title-color');
108-
background: rgba(255, 255, 255, .1);
130+
background: --var($theme, 'step-hover-background');
109131
}
110132
}
111133

112-
%igx-stepper__step--active {
134+
%igx-stepper__step--current {
113135
%igx-stepper__step-icon {
114-
color: #4dff12;
136+
color: --var($theme, 'current-color');
115137
}
116138
}
117139

@@ -131,21 +153,6 @@
131153
cursor: default;
132154
}
133155

134-
%igx-stepper__step-content {
135-
margin-#{$left}: rem(36px);
136-
position: relative;
137-
138-
&::before {
139-
content: '';
140-
position: absolute;
141-
top: rem(-16px);
142-
bottom: rem(-16px);
143-
#{$left}: rem(0);
144-
width: rem(1px);
145-
background: #999;
146-
}
147-
}
148-
149156
%igx-stepper__body-content {
150157
display: block;
151158
position: absolute;
@@ -160,7 +167,7 @@
160167
z-index: -1;
161168
}
162169

163-
%igx-stepper__step-content,
170+
%igx-stepper__step-content-wrapper,
164171
%igx-stepper__body-content {
165172
padding: 0 rem(24px) rem(24px) rem(24px);
166173
}
@@ -170,8 +177,23 @@
170177
position: relative;
171178
}
172179

180+
%igx-stepper__step-content-wrapper {
181+
margin-#{$left}: rem(36px);
182+
position: relative;
183+
184+
&::before {
185+
content: '';
186+
position: absolute;
187+
top: rem(-16px);
188+
bottom: rem(-16px);
189+
#{$left}: rem(0);
190+
width: rem(1px);
191+
background: #999;
192+
}
193+
}
194+
173195
%igx-stepper__step-icon {
174-
color: #09f;
196+
color: --var($theme, 'incomplete-color');
175197
margin-#{$right}: rem(12px);
176198
}
177199

@@ -185,16 +207,14 @@
185207

186208
%igx-stepper__title-wrapper {
187209
width: 100%;
188-
overflow: hidden;
189210
white-space: nowrap;
190211
text-overflow: ellipsis;
191212
min-width: rem(50px);
192213
}
193214

194215
%igx-stepper__title {
195-
color: #fff;
216+
color: --var($theme, 'title-color');
196217
text-overflow: ellipsis;
197-
overflow: hidden;
198218
}
199219

200220
%igx-stepper__title--top {
@@ -211,31 +231,31 @@
211231
}
212232

213233
%igx-stepper__step {
234+
position: relative;
235+
overflow: hidden;
214236
flex-direction: row;
215237
flex-grow: 1;
216238

217-
&::after {
239+
&::after,
240+
&::before {
218241
content: '';
219242
width: auto;
220-
height: 1px;
221243
flex: 1;
222-
top: rem(-13px);
244+
top: rem(36px);
223245
position: relative;
224-
align-self: center;
225-
background: #999;
246+
border-top: rem(1px) solid --var($theme, 'step-line');
226247
}
227248

228249
&:last-of-type {
229-
flex-basis: 0;
230-
231250
%igx-stepper__step-header::after,
232251
&::after {
233252
display: none;
234253
}
235254
}
236255

237256
&:first-of-type {
238-
%igx-stepper__step-header::before {
257+
%igx-stepper__step-header::before,
258+
&::before {
239259
display: none;
240260
}
241261
}
@@ -244,20 +264,17 @@
244264
%igx-stepper__step-header {
245265
display: flex;
246266
flex-direction: column;
247-
justify-content: center;
267+
justify-content: flex-start;
248268
align-items: center;
249-
position: relative;
250269
padding: rem(24px) rem(32px);
251-
margin: 0 rem(8px);
252270
cursor: pointer;
253271

254272
&::before,
255273
&::after {
256274
top: rem(36px);
257275
content: '';
258276
position: absolute;
259-
height: rem(1px);
260-
background: #999;
277+
border-top: rem(1px) solid --var($theme, 'step-line');
261278
width: calc(50% - 16px);
262279
}
263280

@@ -279,6 +296,10 @@
279296
%igx-stepper__step-icon {
280297
margin: 0;
281298
}
299+
300+
%igx-stepper__step-content-wrapper {
301+
text-align: center;
302+
}
282303
}
283304
}
284305

Diff for: projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_stepper.scss

+13-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,19 @@ $_light-stepper: (
2626

2727
incomplete-color: (
2828
igx-color: ('grays', 400)
29-
)
29+
),
30+
31+
current-color: (
32+
igx-color: ('primary', 500)
33+
),
34+
35+
step-line: (
36+
igx-color: ('grays', 200)
37+
),
38+
39+
complete-step-line: (
40+
igx-color: ('grays', 900)
41+
),
3042
);
3143

3244
/// Generates a fluent stepper schema.

Diff for: projects/igniteui-angular/src/lib/core/styles/typography/_typography.scss

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
@import '../components/slider/slider-theme';
3434
@import '../components/snackbar/snackbar-theme';
3535
@import '../components/switch/switch-theme';
36+
@import '../components/stepper/stepper-theme';
3637
@import '../components/tabs/tabs-theme';
3738
@import '../components/time-picker/time-picker-theme';
3839
@import '../components/toast/toast-theme';

Diff for: projects/igniteui-angular/src/lib/stepper/igx-stepper.component.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
AfterViewInit, Component, HostBinding, OnDestroy, OnInit,
55
Input, Output, EventEmitter, ContentChildren, QueryList, ElementRef, NgModule
66
} from '@angular/core';
7-
import { IgxCarouselComponentBase } from 'igniteui-angular';
7+
import {IgxCarouselComponentBase, IgxRippleModule} from 'igniteui-angular';
88
import { Subject } from 'rxjs';
99
import { takeUntil } from 'rxjs/operators';
1010
import { growVerIn, growVerOut } from '../animations/grow';
@@ -245,7 +245,8 @@ export class IgxStepperComponent extends IgxCarouselComponentBase implements OnI
245245

246246
@NgModule({
247247
imports: [
248-
CommonModule
248+
CommonModule,
249+
IgxRippleModule
249250
],
250251
declarations: [
251252
IgxStepComponent,

Diff for: projects/igniteui-angular/src/lib/stepper/step/igx-step.component.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88
</div>
99
</ng-template>
1010

11-
<div class="igx-stepper__step-header" [ngClass]="stepHeaderClasses" (click)="onPointerDown($event)">
11+
<div class="igx-stepper__step-header" igxRipple [ngClass]="stepHeaderClasses" (click)="onPointerDown($event)">
1212
<ng-content select='[igxStepIcon]'></ng-content>
1313
<div class="igx-stepper__title-wrapper">
1414
<ng-container *ngTemplateOutlet="defaultLabel"></ng-container>
1515
</div>
1616
</div>
1717

1818
<ng-container *ngIf="!isHorizontal">
19-
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
19+
<div class="igx-stepper__step-content-wrapper">
20+
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
21+
</div>
2022
</ng-container>
23+

Diff for: projects/igniteui-angular/src/lib/stepper/step/igx-step.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export class IgxStepComponent extends ToggleAnimationPlayer implements OnInit, A
312312

313313
public get stepHeaderClasses() {
314314
if (this.active) {
315-
return 'igx-stepper__step--active';
315+
return 'igx-stepper__step--current';
316316
}
317317
if (this.disabled) {
318318
return 'igx-stepper__step--disabled';

0 commit comments

Comments
 (0)