Skip to content

Commit f12f6b2

Browse files
authored
Merge branch '11.0.x' into row-edit-temp-emit-evt-btns-args
2 parents be2bac9 + 557c1ef commit f12f6b2

File tree

23 files changed

+257
-124
lines changed

23 files changed

+257
-124
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "ng serve --open --configuration hmr",
77
"start:es5": "ng serve --open --configuration es5",
88
"build": "ng build",
9-
"test": "ng test",
9+
"test": "ng test igniteui-angular",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
1212
"test:lib": "ng test igniteui-angular --watch=false --no-progress --code-coverage",

projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
class="igx-calendar-picker__prev"
1313
(click)="previousYear()"
1414
(keydown)="changeYearKB($event, false)"
15-
[ngStyle]="{'min-width.%': 25, 'left': 0}">
15+
[ngStyle]="{'min-width.%': 25, 'left': 0}"
1616
role="button"
17-
[attr.aria-label]"'Previous Year ' + previousYear()"
18-
data-action="prev"
19-
17+
[attr.aria-label]="'Previous Year ' + getPreviousYear()"
18+
data-action="prev">
2019
<igx-icon fontSet="material">keyboard_arrow_left</igx-icon>
2120
</div>
2221
<div [style.width.%]="100">
@@ -35,10 +34,10 @@
3534
class="igx-calendar-picker__next"
3635
(click)="nextYear()"
3736
(keydown)="changeYearKB($event)"
38-
[ngStyle]="{'min-width.%': 25,'right': 0}">
37+
[ngStyle]="{'min-width.%': 25,'right': 0}"
3938
role="button"
40-
[attr.aria-label]"'Next Year ' + nextYear()"
41-
data-action="next"
39+
[attr.aria-label]="'Next Year ' + getNextYear()"
40+
data-action="next">
4241

4342
<igx-icon fontSet="material">keyboard_arrow_right</igx-icon>
4443
</div>

projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,28 @@ describe('IgxMonthPicker', () => {
6161
expect(currentYear.nativeElement.textContent.trim()).toMatch('2019');
6262
});
6363

64+
it('should properly render month picker rowheader elements', () => {
65+
const fixture = TestBed.createComponent(IgxMonthPickerSampleComponent);
66+
fixture.detectChanges();
67+
68+
const dom = fixture.debugElement;
69+
const monthPicker = fixture.componentInstance.monthPicker;
70+
71+
const yearBtn = dom.query(By.css('.igx-calendar-picker__date'));
72+
const prev = dom.query(By.css('.igx-calendar-picker__prev'));
73+
const next = dom.query(By.css('.igx-calendar-picker__next'));
74+
75+
expect(prev.nativeElement.getAttribute('aria-label')).toEqual('Previous Year ' + monthPicker.getPreviousYear());
76+
expect(prev.nativeElement.getAttribute('role')).toEqual('button');
77+
expect(prev.nativeElement.getAttribute('data-action')).toEqual('prev');
78+
79+
expect(next.nativeElement.getAttribute('aria-label')).toEqual('Next Year ' + monthPicker.getNextYear());
80+
expect(next.nativeElement.getAttribute('role')).toEqual('button');
81+
expect(next.nativeElement.getAttribute('data-action')).toEqual('next');
82+
83+
expect(yearBtn.nativeElement.getAttribute('aria-live')).toEqual('polite');
84+
});
85+
6486
it('should properly set @Input properties and setters', () => {
6587
const fixture = TestBed.createComponent(IgxMonthPickerSampleComponent);
6688
fixture.detectChanges();

projects/igniteui-angular/src/lib/calendar/month-picker/month-picker.component.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ export class IgxMonthPickerComponent extends IgxMonthPickerBaseDirective {
201201
}
202202
}
203203

204+
/**
205+
* @hidden
206+
*/
207+
public getNextYear() {
208+
return this.calendarModel.getNextYear(this.viewDate).getFullYear();
209+
}
210+
211+
/**
212+
* @hidden
213+
*/
214+
public getPreviousYear() {
215+
return this.calendarModel.getPrevYear(this.viewDate).getFullYear();
216+
}
217+
204218
/**
205219
* @hidden
206220
*/

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,9 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
11791179
if ((this.ngControl.control.touched || this.ngControl.control.dirty) &&
11801180
(this.ngControl.control.validator || this.ngControl.control.asyncValidator)) {
11811181
if (!this.collapsed || this.inputGroup.isFocused) {
1182-
this.valid = this.ngControl.valid ? IgxComboState.VALID : IgxComboState.INVALID;
1182+
this.valid = this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.VALID;
11831183
} else {
1184-
this.valid = this.ngControl.valid ? IgxComboState.INITIAL : IgxComboState.INVALID;
1184+
this.valid = this.ngControl.invalid ? IgxComboState.INVALID : IgxComboState.INITIAL;
11851185
}
11861186
}
11871187
this.manageRequiredAsterisk();
@@ -1201,7 +1201,7 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
12011201
public onBlur() {
12021202
if (this.collapsed) {
12031203
this._onTouchedCallback();
1204-
if (this.ngControl && !this.ngControl.valid) {
1204+
if (this.ngControl && this.ngControl.invalid) {
12051205
this.valid = IgxComboState.INVALID;
12061206
} else {
12071207
this.valid = IgxComboState.INITIAL;

projects/igniteui-angular/src/lib/core/styles/components/button-group/_button-group-theme.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
/// @param {Color} $item-selected-border-color [null] - The border color for a selected item from the button group.
3030
/// @param {Color} $item-selected-hover-background [null] - The background color for a selected item in hover or focus state in the button group.
3131
/// @param {Color} $selected-shadow-color [null] - The color for a focused button item in hover or focus state in the button group.
32-
3332
///
3433
/// @param {border-radius} $border-radius [null] - The border radius used for button-group component.
3534
///

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-component.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@
169169
@include e(input) {
170170
@extend %form-group-input--disabled !optional;
171171
}
172+
173+
@include e(textarea) {
174+
@extend %form-group-textarea--disabled !optional;
175+
}
172176
}
173177

174178
@include mx(disabled, required) {
@@ -185,6 +189,10 @@
185189
@include e(input) {
186190
@extend %form-group-input--disabled !optional;
187191
}
192+
193+
@include e(textarea) {
194+
@extend %form-group-textarea--disabled !optional;
195+
}
188196
}
189197

190198
@include m(cosy) {

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-theme.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,14 @@
10561056
}
10571057
}
10581058

1059+
%form-group-textarea--disabled {
1060+
color: --var($theme, 'disabled-text-color') !important;
1061+
1062+
&::placeholder {
1063+
color: --var($theme, 'disabled-placeholder-color');
1064+
}
1065+
}
1066+
10591067
%form-group-textarea--cosy {
10601068
min-height: rem(82px, map-get($base-scale-size, 'cosy'));
10611069
margin-#{$right}: -#{rem(16px, map-get($base-scale-size, 'cosy'))};

projects/igniteui-angular/src/lib/core/styles/components/slider/_slider-theme.scss

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
/// @param {Color} $track-color [null] - The color of the track.
1212
/// @param {Color} $track-step-color [null] - The color of the track steps.
1313
/// @param {Color} $thumb-color [null] - The color of the thumb.
14+
/// @param {Color} $thumb-focus-color [null] - The focus color of the thumb.
15+
///
1416
/// @param {Color} $label-background-color [null] - The background color of the bubble label.
1517
/// @param {Color} $label-text-color [null] - The text color of the bubble label.
1618
///
@@ -81,6 +83,7 @@
8183
track-hover-color: $track-hover-color,
8284
thumb-color: $thumb-color,
8385
thumb-hover-color: $thumb-hover-color,
86+
thumb-focus-color: $thumb-focus-color,
8487
label-background-color: $label-background-color,
8588
label-text-color: $label-text-color,
8689
disabled-thumb-color: $disabled-thumb-color,
@@ -93,7 +96,6 @@
9396
tick-label-color-tall: $tick-label-color-tall,
9497
tick-color: $tick-color,
9598
tick-color-tall: $tick-color-tall,
96-
thumb-focus-color: $thumb-focus-color,
9799
));
98100
}
99101

@@ -118,6 +120,13 @@
118120
indigo-design: 2px
119121
), $variant);
120122

123+
$slider-outline-width: map-get((
124+
material: 3px,
125+
fluent: 0,
126+
bootstrap: 3px,
127+
indigo-design: 3px
128+
), $variant);
129+
121130
// Slide ticks
122131
$tick-push: rem(4px);
123132
$base-tick-height: rem(8px);
@@ -408,9 +417,11 @@
408417
transform: scale(.8);
409418
}
410419

411-
@if $variant == 'indigo-design' {
412-
&:focus %igx-thumb-dot::before {
413-
box-shadow: 0 0 0 rem(3px) --var($theme, 'thumb-focus-color');
420+
&:focus %igx-thumb-dot::before {
421+
box-shadow: 0 0 0 rem($slider-outline-width) --var($theme, 'thumb-focus-color');
422+
423+
@if $variant == 'fluent' {
424+
border-color: --var($theme, 'thumb-focus-color') !important;
414425
}
415426
}
416427
}
@@ -419,9 +430,12 @@
419430
&:hover %igx-thumb-label {
420431
opacity: 0;
421432
}
422-
@if $variant == 'indigo-design' {
423-
&:focus %igx-thumb-dot::before {
424-
box-shadow: none;
433+
434+
&:focus %igx-thumb-dot::before {
435+
box-shadow: none;
436+
437+
@if $variant == 'fluent' {
438+
border-color: --var($theme, 'thumb-disabled-border-color') !important;
425439
}
426440
}
427441
}

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_checkbox.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ $_light-checkbox: extend(
5656
/// @prop {Number} border-radius [2px] - The border radius used for checkbox. Can be a fraction between 0 and 1, pixels, or percent.
5757
/// @prop {Number} border-radius-ripple [2px] - The border radius used for checkbox ripple. Can be a fraction between 0 and 1, pixels, or percent.
5858
/// @property {Map} focus-outline-color [igx-color: ('grays', 800)] - The focus outlined color.
59-
6059
///
6160
/// @requires {function} extend
6261
/// @requires {Map} $_light-checkbox

0 commit comments

Comments
 (0)