Skip to content

Commit a5c39b9

Browse files
authored
Merge branch 'master' into ganastasov/feat-14905-master
2 parents 5ea07dc + a197299 commit a5c39b9

File tree

15 files changed

+108
-56
lines changed

15 files changed

+108
-56
lines changed

package-lock.json

Lines changed: 5 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": "^4.21.1",
7676
"fflate": "^0.8.1",
77-
"igniteui-theming": "^14.1.1",
77+
"igniteui-theming": "^14.2.0",
7878
"igniteui-trial-watermark": "^3.0.2",
7979
"lodash-es": "^4.17.21",
8080
"rxjs": "^7.8.0",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@
201201
"version": "18.2.0",
202202
"description": "Updates Ignite UI for Angular from v18.1.x to v18.2.0",
203203
"factory": "./update-18_2_0"
204+
},
205+
"migration-41": {
206+
"version": "18.2.3",
207+
"description": "Updates Ignite UI for Angular from v18.2.0 to v18.2.3",
208+
"factory": "./update-18_2_3"
204209
}
205210
}
206211
}
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": "$header-time-period-color",
6+
"remove": true,
7+
"owner": "time-picker-theme",
8+
"type":"property"
9+
}
10+
]
11+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 = '18.2.3';
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-41';
17+
18+
it('should remove the $header-time-period-color property from the time-picker-theme', async () => {
19+
appTree.create(
20+
`/testSrc/appPrefix/component/test.component.scss`,
21+
`$custom-time-picker: time-picker-theme(
22+
$text-color: red,
23+
$header-time-period-color: pink
24+
);`
25+
);
26+
27+
const tree = await schematicRunner
28+
.runSchematic(migrationName, {}, appTree);
29+
30+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
31+
`$custom-time-picker: time-picker-theme(
32+
$text-color: red
33+
);`
34+
);
35+
});
36+
});
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 = '18.2.3';
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/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"igniteui-trial-watermark": "^3.0.2",
7575
"lodash-es": "^4.17.21",
7676
"uuid": "^9.0.0",
77-
"igniteui-theming": "^14.1.0",
77+
"igniteui-theming": "^14.2.0",
7878
"@igniteui/material-icons-extended": "^3.0.0"
7979
},
8080
"peerDependencies": {

projects/igniteui-angular/src/lib/core/styles/components/dialog/_dialog-theme.scss

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
@include css-vars($theme);
8888

8989
$variant: map.get($theme, '_meta', 'variant');
90-
$bootstrap-theme: map.get($theme, variant) == 'bootstrap';
90+
$bootstrap-theme: map.get($theme, '_meta', 'variant') == 'bootstrap';
9191

9292
$dialog-min-width: map.get((
9393
'material': rem(280px),
@@ -96,21 +96,21 @@
9696
), $variant);
9797

9898
$dialog-title-padding: map.get((
99-
'material': rem(24px) rem(24px) rem(12px) rem(24px),
99+
'material': rem(16px) rem(24px) rem(0px) rem(24px),
100100
'fluent': rem(16px) rem(24px) rem(24px) rem(24px),
101101
'bootstrap': rem(16px),
102102
'indigo': rem(24px) rem(24px) 0 rem(24px),
103103
), $variant);
104104

105105
$dialog-message-padding: map.get((
106-
'material': rem(12px) rem(24px),
106+
'material': rem(14px) rem(24px),
107107
'fluent': 0 rem(24px) rem(20px) rem(24px),
108108
'bootstrap': rem(16px),
109109
'indigo': rem(16px) rem(24px),
110110
), $variant);
111111

112112
$dialog-actions-padding: map.get((
113-
'material': rem(8px),
113+
'material': 0 rem(8px) rem(8px),
114114
'fluent': 0 rem(24px) rem(24px) rem(24px),
115115
'bootstrap': rem(16px),
116116
'indigo': rem(16px) rem(24px) rem(24px) rem(24px),
@@ -180,23 +180,16 @@
180180
flex-flow: row nowrap;
181181
justify-content: flex-end;
182182
padding: $dialog-actions-padding;
183+
gap: if($variant == 'indigo', rem(16px), rem(8px));
183184

184185
@if $bootstrap-theme {
185186
border-top: rem(1px) solid var-get($theme, 'border-color');
186187
}
187188

188-
button + button {
189-
margin-inline-start: rem(8px);
190-
}
191-
192189
@if $variant == 'indigo' {
193190
.igx-button {
194191
--ig-size: 2;
195192
}
196-
197-
button + button {
198-
margin-inline-start: rem(16px);
199-
}
200193
}
201194
}
202195
}

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-component.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
@extend %time-picker__wrapper !optional;
2525
}
2626

27-
@include e(header-ampm) {
28-
@extend %time-picker__header-ampm !optional;
29-
}
30-
3127
@include e(header-hour){
3228
@extend %time-picker__header-hour !optional;
3329
}

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-theme.scss

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
/// @param {Color} $disabled-item-background [null] - The background color for disabled values .
2424
/// @param {Color} $header-background [null] - The header background color of a time picker.
2525
/// @param {Color} $header-hour-text-color [null] - The header hour text color of a time picker.
26-
/// @param {Color} $header-time-period-color [null] - The header AM/PM text color of a time picker.
2726
/// @param {Color} $background-color [null] - The time-picker panel background color.
2827
/// @param {Number} $time-item-size [null] - The height of the time item.
2928
/// @param {Color} $divider-color [null] - The color for the actions area divider.
@@ -56,7 +55,6 @@
5655
$disabled-item-background: null,
5756
$header-background: null,
5857
$header-hour-text-color: null,
59-
$header-time-period-color: null,
6058
$background-color: null,
6159
$modal-shadow: null,
6260
$dropdown-shadow: null,
@@ -85,12 +83,6 @@
8583
$header-hour-text-color: text-contrast($header-background);
8684
}
8785

88-
@if not($header-time-period-color) and $header-background {
89-
@if meta.type-of($header-background) == 'color' {
90-
$header-time-period-color: rgba(text-contrast($header-background), .8);
91-
}
92-
}
93-
9486
@if not($selected-text-color) and $active-item-background {
9587
$selected-text-color: text-contrast($active-item-background);
9688
}
@@ -135,7 +127,6 @@
135127
disabled-item-background: $disabled-item-background,
136128
header-background: $header-background,
137129
header-hour-text-color: $header-hour-text-color,
138-
header-time-period-color: $header-time-period-color,
139130
background-color: $background-color,
140131
modal-shadow: $modal-shadow,
141132
dropdown-shadow: $dropdown-shadow,
@@ -162,15 +153,15 @@
162153
$picker-buttons-padding: map.get((
163154
'material': rem(8px),
164155
'fluent': rem(8px),
165-
'bootstrap': rem(16px),
156+
'bootstrap': rem(8px),
166157
'indigo': rem(8px) rem(16px),
167158
), $variant);
168159

169160
$picker-header-padding: map.get((
170-
'material': rem(24px) rem(16px),
161+
'material': rem(16px) rem(24px),
171162
'fluent': rem(16px),
172163
'bootstrap': rem(16px),
173-
'indigo': rem(16px) rem(24px) ,
164+
'indigo': rem(16px),
174165
), $variant);
175166

176167
%time-picker-display {
@@ -287,7 +278,7 @@
287278
}
288279

289280
%time-picker__item {
290-
width: if($variant == 'indigo', rem(46px), rem(54px));
281+
width: rem(46px);
291282
padding: rem(5px) rem(10px);
292283
border-radius: var-get($theme, 'active-item-border-radius');
293284
height: var-get($theme, 'time-item-size');
@@ -355,10 +346,6 @@
355346
}
356347
}
357348

358-
%time-picker__header-ampm {
359-
color: var-get($theme, 'header-time-period-color');
360-
}
361-
362349
%time-picker__header--vertical {
363350
@if $variant == 'indigo' {
364351
min-width: rem(136px);
@@ -371,18 +358,14 @@
371358
%time-picker__header-hour {
372359
display: flex;
373360
color: var-get($theme, 'header-hour-text-color');
361+
margin: 0;
374362

375363
[dir='rtl'] & {
376364
flex-direction: row-reverse;
377365
justify-content: flex-end;
378366
}
379367
}
380368

381-
%time-picker__header-ampm,
382-
%time-picker__header-hour {
383-
margin: 0;
384-
}
385-
386369
%time-picker__buttons {
387370
display: flex;
388371
min-height: sizable(rem(40px), rem(44px), rem(48px));
@@ -413,24 +396,20 @@
413396
header-hour: 'h4',
414397
selected-time: 'h5'
415398
)) {
416-
$time-period: map.get($categories, 'header-time-period');
417399
$header-hour: map.get($categories, 'header-hour');
418400
$selected-time: map.get($categories, 'selected-time');
419401

420-
421-
%time-picker__header-ampm {
422-
@include type-style($time-period, false);
423-
}
424-
425402
%time-picker__header-hour {
426403
@include type-style($header-hour, false) {
427404
margin-top: 0;
405+
margin-bottom: 0;
428406
}
429407
}
430408

431409
%time-picker__item--selected {
432410
@include type-style($selected-time) {
433411
margin-top: 0;
412+
margin-bottom: 0;
434413
}
435414
}
436415
}

0 commit comments

Comments
 (0)