Skip to content

Commit 4e2732c

Browse files
authored
Merge branch '18.2.x' into didimmova/vhelper-scrollbar-size-18.2.x
2 parents c13c40a + e3f83b3 commit 4e2732c

23 files changed

+615
-92
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": "^4.21.0",
7676
"fflate": "^0.8.1",
77-
"igniteui-theming": "^14.2.0",
77+
"igniteui-theming": "^14.2.1",
7878
"igniteui-trial-watermark": "^3.0.2",
7979
"lodash-es": "^4.17.21",
8080
"rxjs": "^7.8.0",

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.2.0",
77+
"igniteui-theming": "^14.2.1",
7878
"@igniteui/material-icons-extended": "^3.0.0"
7979
},
8080
"peerDependencies": {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
@include e(input) {
5353
@extend %form-group-input !optional;
54-
@extend %chrome-autofill-fix !optional;
54+
@extend %autofill-background-fix !optional;
5555
@extend %edge-clear-icon-fix !optional;
5656

5757
&:hover {
@@ -403,6 +403,7 @@
403403

404404
// Type border START
405405
@include m(border) {
406+
@extend %form-group-display--border !optional;
406407
@extend %form-group-display--no-margin !optional;
407408

408409
@include e(bundle) {

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

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,25 @@
393393
}
394394
}
395395

396+
@if $variant == 'material' {
397+
%form-group-display--border {
398+
&:has(input:-webkit-autofill, input:autofill) {
399+
%igx-input-group__notch--border {
400+
border-block-start-color: transparent;
401+
}
402+
403+
%form-group-label {
404+
--label-position: #{sizable(18px, 22px, 26px)};
405+
406+
transform: translateY(calc(var(--label-position) * -1));
407+
margin-top: 0;
408+
overflow: hidden;
409+
will-change: font-size, color, transform;
410+
}
411+
}
412+
}
413+
}
414+
396415
%form-group-display--box {
397416
%form-group-border {
398417
margin-bottom: 0;
@@ -463,6 +482,20 @@
463482
--size: var(--input-icon) !important;
464483
}
465484
}
485+
486+
@if $variant == 'material' {
487+
&:not(%form-group-display--border) {
488+
&:has(input:-webkit-autofill, input:autofill) {
489+
%form-group-label {
490+
--floating-label-position: -73%;
491+
492+
@include type-style('caption');
493+
494+
transform: translateY(var(--floating-label-position));
495+
}
496+
}
497+
}
498+
}
466499
}
467500

468501
%form-group-placeholder {
@@ -1179,13 +1212,20 @@
11791212
}
11801213
}
11811214

1182-
%chrome-autofill-fix {
1215+
// This is a hack that removes the autofill background and it's essential,
1216+
// otherwise the background is on top of the floating label in material theme.
1217+
// The !important flag is because bootstrap theme(and potentially feature themes) is overriding the transition delay.
1218+
%autofill-background-fix {
11831219
&:-webkit-autofill,
11841220
&:-webkit-autofill:hover,
11851221
&:-webkit-autofill:focus,
1186-
&:-webkit-autofill:active {
1187-
-webkit-transition-delay: 99999s;
1188-
transition-delay: 99999s;
1222+
&:-webkit-autofill:active,
1223+
&:autofill,
1224+
&:autofill:hover,
1225+
&:autofill:focus,
1226+
&:autofill:active, {
1227+
-webkit-transition-delay: 99999s !important;
1228+
transition-delay: 99999s !important;
11891229
}
11901230
}
11911231

@@ -1980,7 +2020,15 @@
19802020
map.get($bootstrap-inline-padding, 'cosy'),
19812021
map.get($bootstrap-inline-padding, 'comfortable')
19822022
);
1983-
transition: box-shadow .15s ease-out, border .15s ease-out;
2023+
}
2024+
2025+
// The :not selector is needed otherwise bootstrap will override the %autofill-background-fix
2026+
%form-group-display--bootstrap {
2027+
:not(:has(input:-webkit-autofill, input:autofill)) {
2028+
%bootstrap-input {
2029+
transition: box-shadow .15s ease-out, border .15s ease-out;
2030+
}
2031+
}
19842032
}
19852033

19862034
%bootstrap-input,

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,14 @@
502502

503503
&:hover {
504504
background: var-get($theme, 'step-hover-background');
505-
color: var-get($theme, 'title-hover-color');
505+
506+
%igx-stepper__step-title {
507+
color: var-get($theme, 'title-hover-color');
508+
}
509+
510+
%igx-stepper__step-subtitle {
511+
color: var-get($theme, 'subtitle-hover-color');
512+
}
506513
}
507514

508515
@if $variant != material {

projects/igniteui-angular/src/lib/core/styles/components/tabs/_tabs-theme.scss

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
button-ripple-color: $button-ripple-color,
188188
border-color: $border-color,
189189
border-radius: $border-radius,
190+
border-color--hover: $border-color--hover,
190191
theme: map.get($schema, '_meta', 'theme'),
191192
_meta: map.merge(if($meta, $meta, ()), (
192193
variant: map.get($schema, '_meta', 'theme'),
@@ -267,6 +268,21 @@
267268
}
268269
}
269270
}
271+
272+
@if $bootstrap-theme {
273+
position: relative;
274+
275+
&::after {
276+
content: '';
277+
position: absolute;
278+
bottom: 0;
279+
inset-inline-start: 0;
280+
width: 100%;
281+
height: rem(1px);
282+
background: var-get($theme, 'border-color');
283+
z-index: 0;
284+
}
285+
}
270286
}
271287

272288
%tabs-header-content {
@@ -278,19 +294,6 @@
278294
%tabs-header-wrapper {
279295
position: relative;
280296
flex-grow: 1;
281-
282-
@if $bootstrap-theme {
283-
&::after {
284-
content: '';
285-
position: absolute;
286-
bottom: 0;
287-
inset-inline-start: 0;
288-
width: 100%;
289-
height: rem(1px);
290-
background: var-get($theme, 'border-color');
291-
z-index: 0;
292-
}
293-
}
294297
}
295298

296299
%tabs-header-scroll {
@@ -454,7 +457,7 @@
454457
&:focus {
455458
border-top: rem(1px) solid transparent;
456459
border-inline: none;
457-
border-bottom: rem(1px) solid var-get($theme, 'border-color');
460+
border-bottom: rem(1px) solid var-get($theme, 'border-color--hover');
458461
}
459462

460463
igx-icon {

projects/igniteui-angular/src/lib/directives/text-highlight/text-highlight.directive.spec.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,17 @@ describe('IgxHighlight', () => {
299299
expect(() => component.highlight.activateIfNecessary()).not.toThrowError();
300300
});
301301

302+
it('Should not throw when attempting to activate a non-existing group.', () => {
303+
const fix = TestBed.createComponent(HighlightLoremIpsumComponent);
304+
fix.detectChanges();
305+
306+
const component: HighlightLoremIpsumComponent = fix.debugElement.componentInstance;
307+
component.highlightText('a');
308+
component.groupName = 'test1';
309+
fix.detectChanges();
310+
311+
expect(() => component.highlight.activateIfNecessary()).not.toThrowError();
312+
});
302313
});
303314

304315
@Component({

projects/igniteui-angular/src/lib/directives/text-highlight/text-highlight.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export class IgxTextHighlightDirective implements AfterViewInit, AfterViewChecke
318318
public activateIfNecessary(): void {
319319
const group = this.service.highlightGroupsMap.get(this.groupName);
320320

321-
if (group.index >= 0 && group.column === this.column && group.row === this.row && compareMaps(this.metadata, group.metadata)) {
321+
if (group && group.index >= 0 && group.column === this.column && group.row === this.row && compareMaps(this.metadata, group.metadata)) {
322322
this.activate(group.index);
323323
}
324324
}

projects/igniteui-angular/src/lib/directives/tooltip/tooltip-target.directive.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
217217
return;
218218
}
219219

220+
this.target.tooltipTarget = this;
221+
220222
const showingArgs = { target: this, tooltip: this.target, cancel: false };
221223
this.tooltipShow.emit(showingArgs);
222224

@@ -258,7 +260,6 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
258260
/**
259261
* @hidden
260262
*/
261-
@HostListener('touchstart')
262263
public onTouchStart() {
263264
if (this.tooltipDisabled) {
264265
return;
@@ -270,7 +271,6 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
270271
/**
271272
* @hidden
272273
*/
273-
@HostListener('document:touchstart', ['$event'])
274274
public onDocumentTouchStart(event) {
275275
if (this.tooltipDisabled) {
276276
return;
@@ -301,19 +301,27 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
301301
this._overlayDefaults.closeOnEscape = true;
302302

303303
this.target.closing.pipe(takeUntil(this.destroy$)).subscribe((event) => {
304+
if (this.target.tooltipTarget !== this) {
305+
return;
306+
}
307+
304308
const hidingArgs = { target: this, tooltip: this.target, cancel: false };
305309
this.tooltipHide.emit(hidingArgs);
306310

307311
if (hidingArgs.cancel) {
308312
event.cancel = true;
309313
}
310314
});
315+
316+
this.nativeElement.addEventListener('touchstart', this.onTouchStart = this.onTouchStart.bind(this), { passive: true });
311317
}
312318

313319
/**
314320
* @hidden
315321
*/
316322
public ngOnDestroy() {
323+
this.hideTooltip();
324+
this.nativeElement.removeEventListener('touchstart', this.onTouchStart);
317325
this.destroy$.next();
318326
this.destroy$.complete();
319327
}
@@ -334,6 +342,8 @@ export class IgxTooltipTargetDirective extends IgxToggleActionDirective implemen
334342
this.target.toBeHidden = false;
335343
}
336344

345+
this.target.tooltipTarget = this;
346+
337347
const showingArgs = { target: this, tooltip: this.target, cancel: false };
338348
this.tooltipShow.emit(showingArgs);
339349

0 commit comments

Comments
 (0)