Skip to content

Commit fe690f4

Browse files
committed
Merge master into skrastev/localization
2 parents 6c03c0c + 3e65c73 commit fe690f4

39 files changed

+468
-80
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@types/source-map": "0.5.2",
7575
"express": "^5.1.0",
7676
"fflate": "^0.8.1",
77-
"igniteui-theming": "^19.2.1",
77+
"igniteui-theming": "^19.2.3",
7878
"igniteui-trial-watermark": "^3.1.0",
7979
"lodash-es": "^4.17.21",
8080
"rxjs": "^7.8.2",

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"tslib": "^2.3.0",
7474
"igniteui-trial-watermark": "^3.1.0",
7575
"lodash-es": "^4.17.21",
76-
"igniteui-theming": "^19.2.1",
76+
"igniteui-theming": "^19.2.3",
7777
"@igniteui/material-icons-extended": "^3.1.0"
7878
},
7979
"peerDependencies": {

projects/igniteui-angular/src/lib/core/styles/components/switch/_switch-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132

133133
@if $variant != 'material' {
134134
%switch-thumb {
135-
background: var-get($theme, 'border-hover-color');
135+
background: var-get($theme, 'thumb-off-hover-color');
136136
}
137137

138138
%switch-thumb--x {

projects/igniteui-angular/src/lib/core/styles/themes/_core.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// Used to configure color accessibility for charts
99
@use 'igniteui-theming/sass/color/functions' as color;
10+
@use 'igniteui-theming/sass/themes/mixins' as theming;
1011

1112
// Common components
1213
@use '../components/_common/igx-control';
@@ -113,6 +114,8 @@
113114
}
114115
}
115116

117+
@include theming.spacing();
118+
116119
@property --_progress-integer {
117120
syntax: '<integer>';
118121
initial-value: 0;

projects/igniteui-angular/src/lib/core/styles/themes/generators/_base.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,6 @@
8484
--ig-size-small: 1;
8585
--ig-size-medium: 2;
8686
--ig-size-large: 3;
87-
88-
--ig-spacing-small: 1;
89-
--ig-spacing-medium: 1;
90-
--ig-spacing-large: 1;
91-
92-
--ig-spacing-inline-small: 1;
93-
--ig-spacing-inline-medium: 1;
94-
--ig-spacing-inline-large: 1;
95-
96-
--ig-spacing-block-small: 1;
97-
--ig-spacing-block-medium: 1;
98-
--ig-spacing-block-large: 1;
9987
}
10088

10189
@if not(list.index($exclude, 'palette')) {

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,17 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy, CellT
703703
}
704704
}
705705

706+
@HostBinding('attr.aria-rowindex')
707+
protected get ariaRowIndex(): number {
708+
// +2 because aria-rowindex is 1-based and the first row is the header
709+
return this.rowIndex + 2;
710+
}
711+
712+
@HostBinding('attr.aria-colindex')
713+
protected get ariaColIndex(): number {
714+
return this.column.index + 1;
715+
}
716+
706717
@ViewChild('defaultCell', { read: TemplateRef, static: true })
707718
protected defaultCellTemplate: TemplateRef<any>;
708719

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,15 @@ export abstract class IgxGridBaseDirective implements GridType,
18391839
@HostBinding('class.igx-grid')
18401840
protected baseClass = 'igx-grid';
18411841

1842+
@HostBinding('attr.aria-colcount')
1843+
protected get ariaColCount(): number {
1844+
return this.visibleColumns.length;
1845+
}
1846+
1847+
@HostBinding('attr.aria-rowcount')
1848+
protected get ariaRowCount(): number {
1849+
return this._rendered ? this._rowCount : null;
1850+
}
18421851

18431852
/**
18441853
* Gets/Sets the resource strings.
@@ -2766,13 +2775,10 @@ export abstract class IgxGridBaseDirective implements GridType,
27662775
public get activeDescendant() {
27672776
const activeElem = this.navigation.activeNode;
27682777

2769-
if (!activeElem || !Object.keys(activeElem).length) {
2770-
return this.id;
2778+
if (!activeElem || !Object.keys(activeElem).length || activeElem.row < 0) {
2779+
return null;
27712780
}
2772-
2773-
return activeElem.row < 0 ?
2774-
`${this.id}_${activeElem.row}_${activeElem.mchCache.level}_${activeElem.column}` :
2775-
`${this.id}_${activeElem.row}_${activeElem.column}`;
2781+
return `${this.id}_${activeElem.row}_${activeElem.column}`;
27762782
}
27772783

27782784
/** @hidden @internal */
@@ -3303,6 +3309,7 @@ export abstract class IgxGridBaseDirective implements GridType,
33033309
private _sortDescendingHeaderIconTemplate: TemplateRef<IgxGridHeaderTemplateContext> = null;
33043310
private _gridSize: Size = Size.Large;
33053311
private _defaultRowHeight = 50;
3312+
private _rowCount: number;
33063313

33073314
/**
33083315
* @hidden @internal
@@ -4124,6 +4131,7 @@ export abstract class IgxGridBaseDirective implements GridType,
41244131
if (this.hasColumnsToAutosize) {
41254132
this.autoSizeColumnsInView();
41264133
}
4134+
this._calculateRowCount();
41274135
this._rendered = true;
41284136
});
41294137
Promise.resolve().then(() => this.rendered.next(true));
@@ -6766,6 +6774,7 @@ export abstract class IgxGridBaseDirective implements GridType,
67666774

67676775
this.initColumns(this._columns, (col: IgxColumnComponent) => this.columnInit.emit(col));
67686776
this.columnListDiffer.diff(this.columnList);
6777+
this._calculateRowCount();
67696778

67706779
this.columnList.changes
67716780
.pipe(takeUntil(this.destroy$))
@@ -7990,6 +7999,17 @@ export abstract class IgxGridBaseDirective implements GridType,
79907999
}
79918000
}
79928001

8002+
private _calculateRowCount(): void {
8003+
if (this.verticalScrollContainer?.isRemote) {
8004+
this._rowCount = this.verticalScrollContainer.totalItemCount ?? 0;
8005+
} else if (this.paginator) {
8006+
this._rowCount = this.totalRecords ?? 0;
8007+
} else {
8008+
this._rowCount = this.verticalScrollContainer?.igxForOf?.length ?? 0;
8009+
}
8010+
this._rowCount += 1; // include header row
8011+
}
8012+
79938013
private initLocale() {
79948014
initi18n(this.localeId);
79958015
this._defaultLocale = getCurrentI18n();

0 commit comments

Comments
 (0)