Skip to content

Commit 31531d0

Browse files
authored
Merge branch '20.0.x' into rivanova/fix-15848-master
2 parents f3ac19d + 7858574 commit 31531d0

File tree

75 files changed

+4811
-1124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+4811
-1124
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 20.0.2
6+
7+
### New Features
8+
- **Separating Button and Icon Button Themes** - The `button-theme` and `icon-button-theme` functions are still available, but for more targeted customization, you can now use the specific theme function for each button type.
9+
- **Component Themes Enchancements** - Component themes have been improved to automatically calculate all necessary states (e.g., hover, focus, active) based on just a few key values. For example, customizing a contained button requires only a background color:
10+
```scss
11+
$custom-contained-button: contained-button-theme(
12+
$background: #09f;
13+
);
14+
```
15+
516
## 20.0.0
617

718
### General

projects/igniteui-angular-elements/src/app/wrapper/wrapper.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export class TemplateWrapperComponent {
1616

1717
public templateFunctions: TemplateFunction[] = [];
1818
public templateRendered = new Subject<HTMLElement>();
19-
2019
private childParts: WeakMap<HTMLElement, RootPart> = new WeakMap();
2120

2221
/**
@@ -28,7 +27,7 @@ export class TemplateWrapperComponent {
2827
public templateRefs: QueryList<TemplateRef<any>>;
2928

3029
constructor(private cdr: ChangeDetectorRef) { }
31-
30+
3231
protected litRender(container: HTMLElement, templateFunc: (arg: any) => TemplateResult, arg: any) {
3332
const part = render(templateFunc(arg), container);
3433

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@
231231
"version": "20.0.0",
232232
"description": "Updates Ignite UI for Angular from v19.2.0 to v20.0.0",
233233
"factory": "./update-20_0_0"
234+
},
235+
"migration-47": {
236+
"version": "20.0.2",
237+
"description": "Updates Ignite UI for Angular from v20.0.0 to v20.0.2",
238+
"factory": "./update-20_0_2"
234239
}
235240
}
236241
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../common/schema/theme-changes.schema.json",
3+
"changes": [
4+
{
5+
"name": "$interim-bottom-line-color",
6+
"remove": true,
7+
"owner": "input-group-theme",
8+
"type": "property"
9+
}
10+
]
11+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import * as path from 'path';
2+
3+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
4+
import { setupTestTree } from '../common/setup.spec';
5+
6+
const version = '20.0.2';
7+
8+
describe(`Update to ${version}`, () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
12+
beforeEach(() => {
13+
appTree = setupTestTree();
14+
});
15+
16+
const migrationName = 'migration-47';
17+
18+
it('should remove the $interim-bottom-line-color property from the input-group theme', async () => {
19+
const testFilePath = `/testSrc/appPrefix/component/test.component.scss`;
20+
21+
appTree.create(
22+
testFilePath,
23+
`$my-input-group-theme: input-group-theme(
24+
$box-background: #ccc,
25+
$interim-bottom-line-color: orange,
26+
);`
27+
);
28+
29+
const tree = await schematicRunner.runSchematic(migrationName, {}, appTree);
30+
31+
expect(tree.readContent(testFilePath)).toEqual(
32+
`$my-input-group-theme: input-group-theme(
33+
$box-background: #ccc,
34+
);`
35+
);
36+
});
37+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '20.0.2';
9+
10+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
11+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
12+
const update = new UpdateChanges(__dirname, host, context);
13+
update.applyChanges();
14+
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ng-content select="[igxLabel]"></ng-content>
44
</ng-container>
55
<ng-container ngProjectAs="igx-prefix">
6-
<ng-content select="igx-prefix"></ng-content>
6+
<ng-content select="igx-prefix,[igxPrefix]"></ng-content>
77
</ng-container>
88
<ng-container ngProjectAs="igx-hint, [igxHint]">
99
<ng-content select="igx-hint, [igxHint]"></ng-content>
@@ -15,7 +15,7 @@
1515
[attr.aria-labelledby]="ariaLabelledBy || label?.id || placeholder"
1616
(blur)="onBlur()" />
1717
<ng-container ngProjectAs="igx-suffix">
18-
<ng-content select="igx-suffix"></ng-content>
18+
<ng-content select="igx-suffix,[igxSuffix]"></ng-content>
1919
</ng-container>
2020
@if (displayValue) {
2121
<igx-suffix [attr.aria-label]="resourceStrings.igx_combo_clearItems_placeholder" class="igx-combo__clear-button"

projects/igniteui-angular/src/lib/core/styles/components/_common/_igx-vhelper.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
position: absolute;
1313
top: 0;
1414
inset-inline-end: 0;
15+
width: var(--vhelper-scrollbar-size);
1516
}
1617

1718
%vhelper--horizontal {

projects/igniteui-angular/src/lib/core/styles/components/action-strip/_action-strip-theme.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@
4141
}
4242

4343
$theme: digest-schema($action-strip-schema);
44-
$meta: map.get($theme, '_meta');
4544

4645
@if not($icon-color) and $actions-background {
47-
$icon-color: text-contrast($actions-background);
46+
$icon-color: adaptive-contrast(var(--actions-background));
4847
}
4948

5049
@if not($actions-border-radius) {
@@ -58,10 +57,6 @@
5857
icon-color: $icon-color,
5958
delete-action: $delete-action,
6059
actions-border-radius: $actions-border-radius,
61-
theme: map.get($schema, '_meta', 'theme'),
62-
_meta: map.merge(if($meta, $meta, ()), (
63-
variant: map.get($schema, '_meta', 'theme')
64-
)),
6560
));
6661
}
6762

@@ -71,7 +66,7 @@
7166
@mixin action-strip($theme) {
7267
@include css-vars($theme);
7368

74-
$variant: map.get($theme, '_meta', 'variant');
69+
$variant: map.get($theme, '_meta', 'theme');
7570
$icon-button-size: map.get((
7671
'material': rem(36px),
7772
'fluent': rem(32px),

projects/igniteui-angular/src/lib/core/styles/components/avatar/_avatar-theme.scss

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@
4141
}
4242

4343
$theme: digest-schema($avatar-schema);
44-
$meta: map.get($theme, '_meta');
4544

4645
@if not($color) and $background {
47-
$color: text-contrast($background);
46+
$color: adaptive-contrast(var(--background));
47+
}
48+
49+
@if not($icon-color) and $background {
50+
$icon-color: adaptive-contrast(var(--background));
4851
}
4952

5053
@return extend($theme, (
@@ -54,10 +57,6 @@
5457
icon-color: $icon-color,
5558
border-radius: $border-radius,
5659
size: $size,
57-
theme: map.get($schema, '_meta', 'theme'),
58-
_meta: map.merge(if($meta, $meta, ()), (
59-
variant: map.get($schema, '_meta', 'theme')
60-
)),
6160
));
6261
}
6362

@@ -67,8 +66,8 @@
6766
@mixin avatar($theme) {
6867
@include css-vars($theme);
6968

70-
$variant: map.get($theme, '_meta', 'variant');
71-
69+
$variant: map.get($theme, '_meta', 'theme');
70+
7271
%igx-avatar-display {
7372
@include sizable();
7473

0 commit comments

Comments
 (0)